Re: [hibernate-dev] Build and AnnotationProcessors
On 17 Jan 2013, at 9:33 PM, Brett Meyer wrote: > "Get the sources and load it directly in your IDE. IMO that is stupid." > > Honestly, that's always been the absolute *first* thing I do. I'd argue that > most contributing developers are interested in the src, first and foremost. For sure. I am not saying that you should not be able to load the sources into an IDE, but does the IDE need to be able to compile the project out of the box? That's in my opinion a different question. Also there might be a question of performance. Would adding the annotation processors to the IDE javac calls not also mean that the processors are called on each incremental compile? The only processor which really matters during the development is the logging annotation processor. It would be nice if when adding a new log method the interface would be updated automatically, but if that implies a notably change in performance I rather stick to manually rebuild the Log interface when I am adding a new log method. You can always configure your annotation processor manually. > My intentions for working on the Eclipse generation was to make IDE setup as > painless as possible. Is it important to have a well-developed build > process? Of course. > But it's also important to balance that with removing as many roadblocks as > possible that might detract contributors. Right, it needs to be a balance. However, I don't think that we have lost a contributor over this. --Hardy ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Build and AnnotationProcessors
On 17 Jan 2013, at 9:53 PM, Steve Ebersole wrote: > Personally I find it funny. To me this question of "circularity" is exactly > the same. Works great in the build in any and all ways, but the IDEs have > issue with it to varying degrees. Yet everyone wants to change the > circularity thing because of the IDE. Not me :-) --Hardy ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Build and AnnotationProcessors
1) Making IDE setup simpler does not necessarily mean making the CLI builds more complicated. That is a somewhat obvious statement, but one I think we need to keep in mind here. 2) The AnnotationProcessor question was kind of a separate question. I am curious why you think that combining the AP output into one dir (well one per "source set", aka "main" and "test") is "less organized" than what we do now? Unless you navigate (aka, cd ...) into those generated sources and need to know which sources came from which processor; and I can't fathom the benefit of that, can't see the use case for doing that. 3) There is still this separate question altogether of whether the CLI and IDE builds should share compilation output paths. It is quite possible to say that Gradle continues to compile project sources into target/classes/{sourceSetName} but that we let the IDE project compile into its own compilation paths (IDEA prefers out/{production|test}/{moduleName} e.g.). As to the specific question of performance, I can't say. We can't do that today, so its not something I can answer in regards to the Hibernate codebase. And as far as "processor which really matter", how quickly you throw your metamodel generator work under the bus :) But I'd say that generating that stuff matters just as much. Tests are kinda important ya know ;) On 04/18/2013 07:27 AM, Hardy Ferentschik wrote: > On 17 Jan 2013, at 9:33 PM, Brett Meyer wrote: > >> "Get the sources and load it directly in your IDE. IMO that is stupid." >> >> Honestly, that's always been the absolute *first* thing I do. I'd argue >> that most contributing developers are interested in the src, first and >> foremost. > For sure. I am not saying that you should not be able to load the sources > into an IDE, but does the IDE need to be able to compile the > project out of the box? That's in my opinion a different question. > > Also there might be a question of performance. Would adding the annotation > processors to the IDE javac calls not also mean that the processors > are called on each incremental compile? > > The only processor which really matters during the development is the logging > annotation processor. It would be nice if when adding a new log method > the interface would be updated automatically, but if that implies a notably > change in performance I rather stick to manually rebuild the Log interface > when > I am adding a new log method. You can always configure your annotation > processor manually. > >> My intentions for working on the Eclipse generation was to make IDE setup >> as painless as possible. Is it important to have a well-developed build >> process? Of course. >> But it's also important to balance that with removing as many roadblocks as >> possible that might detract contributors. > Right, it needs to be a balance. However, I don't think that we have lost a > contributor over this. > > --Hardy ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] Checkstyle: enforced!
Hi all, yesterday we merged checkstyle integration in Hibernate OGM: it's going to fail the compile phase if there are violations (!). By doing so, we also had to re-style a large portion of code, as surprisingly even though I though we where very careful on style and whitespace inspections, human eye is still far behind the power of such a tool. Sorry for the conflicts this caused: we hope it's a smaller price to pay compared to the long term benefits. I realize this might look very inconvenient initially to have it fail during some quick experimental hacking, but the purpose is to encourage applying the correct autoformatting styles in your IDE: it should not annoy you once you get use to obey the rules. The purpose is to reduce the back-and-forth discussions for which pull requests have been delayed for style reasons, not using tabs for indent, missing/wrong copyright headers... also it should reduce conflicts in the future. This definitely will look annoying initially, but please try surviging the initial push back and fix your style. If it still is annoying in the long run we can discuss relaxing the rules or demoting it from a compile failure to some warning levels. If things don't look too bad (i.e. I don't get enough complaints) I will soon send a pull request for Search too, and I hope other projects will follow. Cheers, Sanne ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
Nice! Curious how you got checkstyle to validate that tabs are used for indent? On Apr 18, 2013 9:49 AM, "Sanne Grinovero" wrote: > Hi all, > > yesterday we merged checkstyle integration in Hibernate OGM: it's > going to fail the compile phase if there are violations (!). > > By doing so, we also had to re-style a large portion of code, as > surprisingly even though I though we where very careful on style and > whitespace inspections, human eye is still far behind the power of > such a tool. Sorry for the conflicts this caused: we hope it's a > smaller price to pay compared to the long term benefits. > > I realize this might look very inconvenient initially to have it fail > during some quick experimental hacking, but the purpose is to > encourage applying the correct autoformatting styles in your IDE: it > should not annoy you once you get use to obey the rules. > > The purpose is to reduce the back-and-forth discussions for which pull > requests have been delayed for style reasons, not using tabs for > indent, missing/wrong copyright headers... > also it should reduce conflicts in the future. > > This definitely will look annoying initially, but please try surviging > the initial push back and fix your style. > If it still is annoying in the long run we can discuss relaxing the > rules or demoting it from a compile failure to some warning levels. If > things don't look too bad (i.e. I don't get enough complaints) I will > soon send a pull request for Search too, and I hope other projects > will follow. > > Cheers, > Sanne > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
On 18 April 2013 15:51, Steve Ebersole wrote: > Nice! > > Curious how you got checkstyle to validate that tabs are used for indent? Davide created this regex: https://github.com/hibernate/hibernate-ogm/blob/master/src/main/build-config/checkstyle.xml#L36 Sanne > > On Apr 18, 2013 9:49 AM, "Sanne Grinovero" wrote: >> >> Hi all, >> >> yesterday we merged checkstyle integration in Hibernate OGM: it's >> going to fail the compile phase if there are violations (!). >> >> By doing so, we also had to re-style a large portion of code, as >> surprisingly even though I though we where very careful on style and >> whitespace inspections, human eye is still far behind the power of >> such a tool. Sorry for the conflicts this caused: we hope it's a >> smaller price to pay compared to the long term benefits. >> >> I realize this might look very inconvenient initially to have it fail >> during some quick experimental hacking, but the purpose is to >> encourage applying the correct autoformatting styles in your IDE: it >> should not annoy you once you get use to obey the rules. >> >> The purpose is to reduce the back-and-forth discussions for which pull >> requests have been delayed for style reasons, not using tabs for >> indent, missing/wrong copyright headers... >> also it should reduce conflicts in the future. >> >> This definitely will look annoying initially, but please try surviging >> the initial push back and fix your style. >> If it still is annoying in the long run we can discuss relaxing the >> rules or demoting it from a compile failure to some warning levels. If >> things don't look too bad (i.e. I don't get enough complaints) I will >> soon send a pull request for Search too, and I hope other projects >> will follow. >> >> Cheers, >> Sanne >> ___ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
On 18 Jan 2013, at 4:48 PM, Sanne Grinovero wrote: > Hi all, > > yesterday we merged checkstyle integration in Hibernate OGM: it's > going to fail the compile phase if there are violations (!). +1 Joining the ranks of Validator and Search :-) Btw, in HV Gunnar convinced me to attache the checkstyle plugin to the verify phase. This way you can hack away w/o caring too much about a coding style since the compile will work. However, a full 'mvn install' will fail. --Hardy ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
Yeah, I was just about to suggest that :) 2013/4/18 Hardy Ferentschik > > On 18 Jan 2013, at 4:48 PM, Sanne Grinovero wrote: > > > Hi all, > > > > yesterday we merged checkstyle integration in Hibernate OGM: it's > > going to fail the compile phase if there are violations (!). > > +1 Joining the ranks of Validator and Search :-) > > Btw, in HV Gunnar convinced me to attache the checkstyle plugin to the > verify phase. > This way you can hack away w/o caring too much about a coding style since > the compile > will work. However, a full 'mvn install' will fail. > > --Hardy > > > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
On 18 April 2013 16:13, Gunnar Morling wrote: > Yeah, I was just about to suggest that :) Good idea, but isn't it true that if your IDE is correctly setup it doesn't matter? I'm not sure about IDEA, but Eclipse detects the checkstyle rules and shows violations right away. > 2013/4/18 Hardy Ferentschik >> >> >> On 18 Jan 2013, at 4:48 PM, Sanne Grinovero wrote: >> >> > Hi all, >> > >> > yesterday we merged checkstyle integration in Hibernate OGM: it's >> > going to fail the compile phase if there are violations (!). >> >> +1 Joining the ranks of Validator and Search :-) To clarify, the set of rules defined in OGM are significantly stricter than what we had in Search initially. Cheers, Sanne >> >> Btw, in HV Gunnar convinced me to attache the checkstyle plugin to the >> verify phase. >> This way you can hack away w/o caring too much about a coding style since >> the compile >> will work. However, a full 'mvn install' will fail. >> >> --Hardy >> >> >> ___ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev > > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
On 18 Jan 2013, at 5:27 PM, Sanne Grinovero wrote: > On 18 April 2013 16:13, Gunnar Morling wrote: >> Yeah, I was just about to suggest that :) > > Good idea, but isn't it true that if your IDE is correctly setup it doesn't > matter? True, but sometimes you might want to ignore the rules. > I'm not sure about IDEA, but Eclipse detects the checkstyle rules and > shows violations right away. Not sure, I don't have any check style plugin enabled in Idea. And again, it is a question of IDE vs build. Wether and how you configure your IDE to conform to the coding standard is one thing and where and how you check the standard as part of the build is another. --Hardy ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
Also you're not always in your IDE. For instance I recently tried to change something experimentally in the AS code base, just using my text editor (no, it was not vi ;). Then CS can really be in the way for compilation/tests. So I think it makes most sense to have it in the "verify" phase. 2013/4/18 Hardy Ferentschik > > On 18 Jan 2013, at 5:27 PM, Sanne Grinovero wrote: > > > On 18 April 2013 16:13, Gunnar Morling wrote: > >> Yeah, I was just about to suggest that :) > > > > Good idea, but isn't it true that if your IDE is correctly setup it > doesn't matter? > > True, but sometimes you might want to ignore the rules. > > > I'm not sure about IDEA, but Eclipse detects the checkstyle rules and > > shows violations right away. > > Not sure, I don't have any check style plugin enabled in Idea. And again, > it > is a question of IDE vs build. Wether and how you configure your IDE to > conform to the coding standard is one thing and where and how you check > the standard as part of the build is another. > > --Hardy > > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
On 18 April 2013 16:56, Gunnar Morling wrote: > Also you're not always in your IDE. For instance I recently tried to change > something experimentally in the AS code base, just using my text editor (no, > it was not vi ;). Then CS can really be in the way for compilation/tests. So > I think it makes most sense to have it in the "verify" phase. Good points. My only fear is that 90% of occasional contributors will not run mvn install, but rather use mvn test IF you're lucky. Many don't even run the tests ;-) But ok, that's moot as soon as we finish integration with CI as it would reject the pull.. I'll change it. Sanne ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
I don't have any particular objection to set it on the verify phase. I tend to always use mvn install anyway. The argument I can use to promote the compile phase (for sake of discussion only) I like the fact that I can check the code writing mvn compile, therefore without starting any test. If you think you are going to prototype something big you can always you can always change the attribute failsOnError to false. On Thu, Apr 18, 2013 at 4:56 PM, Gunnar Morling wrote: > Also you're not always in your IDE. For instance I recently tried to change > something experimentally in the AS code base, just using my text editor > (no, it was not vi ;). Then CS can really be in the way for > compilation/tests. So I think it makes most sense to have it in the > "verify" phase. > > > 2013/4/18 Hardy Ferentschik > > > > > On 18 Jan 2013, at 5:27 PM, Sanne Grinovero wrote: > > > > > On 18 April 2013 16:13, Gunnar Morling wrote: > > >> Yeah, I was just about to suggest that :) > > > > > > Good idea, but isn't it true that if your IDE is correctly setup it > > doesn't matter? > > > > True, but sometimes you might want to ignore the rules. > > > > > I'm not sure about IDEA, but Eclipse detects the checkstyle rules and > > > shows violations right away. > > > > Not sure, I don't have any check style plugin enabled in Idea. And again, > > it > > is a question of IDE vs build. Wether and how you configure your IDE to > > conform to the coding standard is one thing and where and how you check > > the standard as part of the build is another. > > > > --Hardy > > > > > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
On 18 April 2013 17:12, Davide D'Alto wrote: > I don't have any particular objection to set it on the verify phase. I tend > to always use mvn install anyway. > > The argument I can use to promote the compile phase (for sake of discussion > only) > I like the fact that I can check the code writing mvn compile, therefore > without starting any test. > If you think you are going to prototype something big you can always you > can always change the attribute failsOnError to false. right but if this motivates people to hardcode -DfailsOnError-false in their scripts, we're back to square one ;-) ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
On 18 Jan 2013, at 6:15 PM, Sanne Grinovero wrote: > On 18 April 2013 17:12, Davide D'Alto wrote: >> I don't have any particular objection to set it on the verify phase. I tend >> to always use mvn install anyway. >> >> The argument I can use to promote the compile phase (for sake of discussion >> only) >> I like the fact that I can check the code writing mvn compile, therefore >> without starting any test. >> If you think you are going to prototype something big you can always you >> can always change the attribute failsOnError to false. > > right but if this motivates people to hardcode -DfailsOnError-false in > their scripts, we're back to square one ;-) bottom line is that one of the core devs will integrate the pull request and as part of it verify/test it. If the contributor did fail to match the style we can respond and hopefully we even automate the pull request build. --Hardy ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] IRC Developer Meeting - 4/18
Discussed few different topics today: CI builds, EE7/4.3 status and integration with JBoss AS 8, 4.2 release, recent Gradle update and others. [11:27] Minutes: http://transcripts.jboss.org/meeting/irc.freenode.org/hibernate-dev/2013/hibernate-dev.2013-04-18-14.59.html [11:27] Minutes (text): http://transcripts.jboss.org/meeting/irc.freenode.org/hibernate-dev/2013/hibernate-dev.2013-04-18-14.59.txt [11:27] Log: http://transcripts.jboss.org/meeting/irc.freenode.org/hibernate-dev/2013/hibernate-dev.2013-04-18-14.59.log.html ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
IDEA has a checkstyle plugin (and a jdepend plugin fwiw). And it will also immediately show violations in the editor (as well as collect them in the problems window). It does not auto detect the settings however, you need to point it to the file. You can still compile, run tests, etc. Very ideal imo. On 04/18/2013 10:27 AM, Sanne Grinovero wrote: > On 18 April 2013 16:13, Gunnar Morling wrote: >> Yeah, I was just about to suggest that :) > Good idea, but isn't it true that if your IDE is correctly setup it > doesn't matter? > I'm not sure about IDEA, but Eclipse detects the checkstyle rules and > shows violations right away. > > >> 2013/4/18 Hardy Ferentschik >>> >>> On 18 Jan 2013, at 4:48 PM, Sanne Grinovero wrote: >>> Hi all, yesterday we merged checkstyle integration in Hibernate OGM: it's going to fail the compile phase if there are violations (!). >>> +1 Joining the ranks of Validator and Search :-) > To clarify, the set of rules defined in OGM are significantly stricter > than what we had in Search initially. > > Cheers, > Sanne > >>> Btw, in HV Gunnar convinced me to attache the checkstyle plugin to the >>> verify phase. >>> This way you can hack away w/o caring too much about a coding style since >>> the compile >>> will work. However, a full 'mvn install' will fail. >>> >>> --Hardy >>> >>> >>> ___ >>> hibernate-dev mailing list >>> hibernate-dev@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/hibernate-dev >> > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Checkstyle: enforced!
btw, I just installed the checkstyle and findbugs plugin on our CI server :D On Apr 19, 2013, at 12:44 AM, Steve Ebersole wrote: > IDEA has a checkstyle plugin (and a jdepend plugin fwiw). And it will > also immediately show violations in the editor (as well as collect them > in the problems window). It does not auto detect the settings however, > you need to point it to the file. > > You can still compile, run tests, etc. Very ideal imo. > > > On 04/18/2013 10:27 AM, Sanne Grinovero wrote: >> On 18 April 2013 16:13, Gunnar Morling wrote: >>> Yeah, I was just about to suggest that :) >> Good idea, but isn't it true that if your IDE is correctly setup it >> doesn't matter? >> I'm not sure about IDEA, but Eclipse detects the checkstyle rules and >> shows violations right away. >> >> >>> 2013/4/18 Hardy Ferentschik On 18 Jan 2013, at 4:48 PM, Sanne Grinovero wrote: > Hi all, > > yesterday we merged checkstyle integration in Hibernate OGM: it's > going to fail the compile phase if there are violations (!). +1 Joining the ranks of Validator and Search :-) >> To clarify, the set of rules defined in OGM are significantly stricter >> than what we had in Search initially. >> >> Cheers, >> Sanne >> Btw, in HV Gunnar convinced me to attache the checkstyle plugin to the verify phase. This way you can hack away w/o caring too much about a coding style since the compile will work. However, a full 'mvn install' will fail. --Hardy ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev >>> >> ___ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev > > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev - Best Regards, Strong Liu http://about.me/stliu/bio ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev