[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15137956#comment-15137956 ] ASF subversion and git services commented on LUCENE-6995: - Commit b0e769c3ec598dd7398cc8df123bc4c41069e2c3 in lucene-solr's branch refs/heads/branch_5_4 from [~thetaphi] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b0e769c ] LUCENE-6995, LUCENE-6938: Add branch change trigger to common-build.xml to keep sane build on GIT branch change > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: master, 5.x > > Attachments: LUCENE-6995.patch, LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15118039#comment-15118039 ] Uwe Schindler commented on LUCENE-6995: --- I committed this. I think we should open another issues about the multiple build dir change. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch, LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15118034#comment-15118034 ] ASF subversion and git services commented on LUCENE-6995: - Commit 0ef36fcdd107084a2ac3156943f01eb5f7dd9c74 in lucene-solr's branch refs/heads/branch_5x from [~thetaphi] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0ef36fc ] LUCENE-6995, LUCENE-6938: Add branch change trigger to common-build.xml to keep sane build on GIT branch change > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch, LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15118028#comment-15118028 ] ASF subversion and git services commented on LUCENE-6995: - Commit 424a647af4d093915108221bcd4390989303b426 in lucene-solr's branch refs/heads/master from [~thetaphi] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=424a647 ] LUCENE-6995, LUCENE-6938: Add branch change trigger to common-build.xml to keep sane build on GIT branch change > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch, LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117550#comment-15117550 ] Uwe Schindler commented on LUCENE-6995: --- I have no problem committing and pushing this soon. I just want to be sure that maybe others also tested it with his/her Git installation. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117539#comment-15117539 ] Robert Muir commented on LUCENE-6995: - Can we iterate by committing this solution first, then working on the separate build directory as a followup. Again, the current situation is a real problem, because the errors you see look like corruption. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117531#comment-15117531 ] Michael McCandless commented on LUCENE-6995: +1 to close this trap ASAP. The errors you hit when {{ant}} doesn't realize you've switched git branches are awful. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117355#comment-15117355 ] Dawid Weiss commented on LUCENE-6995: - Yes, absolutely. Ant clean should really clean everything. As a side note, I use this *very* often: {code} git clean -xfd {code} This removes everything (including all ignored files, etc.) and restores a pristine checkout state. Just in case somebody finds it useful. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117354#comment-15117354 ] Uwe Schindler commented on LUCENE-6995: --- bq. I guess it will force us to fix places in the build/python scripts/whatever that might have a hardcoded `build/` somewhere, and so on. That is the main issue. The current patch does not add much magic, it just does ensure that when you change the branch that you have no build artifacts (what does "ant clean" does otherwise?). I like the idea, too. The patch here is just a good first stab! > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117337#comment-15117337 ] Robert Muir commented on LUCENE-6995: - {quote} If so, it'd be an interesting exercise to not clean after a branch switch but have branch-dedicated build folder. This way you could actually switch a branch and then continue working as usual because it should work flawlessly. [quote} This is an interesting idea. But if we do this, I think it should be `build/` and ant clean still removes build entirely (means it still *really* cleans). I guess it will force us to fix places in the build/python scripts/whatever that might have a hardcoded `build/` somewhere, and so on. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117331#comment-15117331 ] Erik Hatcher commented on LUCENE-6995: -- bq. ...have branch-dedicated build folder I like that idea! I guess it's manually possible now with {{-Dbuild.dir=my_branch_dir}}? > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117322#comment-15117322 ] Dawid Weiss commented on LUCENE-6995: - Ok, but this isn't related to timestamps on version-controlled files, only on the fact that build artefacts coexist? If so, it'd be an interesting exercise to not clean after a branch switch but have branch-dedicated build folder. This way you could actually switch a branch and then continue working as usual because it should work flawlessly. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117304#comment-15117304 ] Robert Muir commented on LUCENE-6995: - It happened to me twice this morning already. Just doing things like running tests and forgetting to clean when switching branches. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117268#comment-15117268 ] Dawid Weiss commented on LUCENE-6995: - I think it's your build folders that are in an insane state, not the checked out files? I'm not against this patch, I just find it odd you're experiencing the issue because I've never had any problem with it (yes, git will not wipe out any ignored files automatically -- these are ignored after all -- but it'll switch any versioned files and update timestamps properly). Please make this an opt-out feature. I prefer to git clean the build folder myself, actually (faster than ant). > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117255#comment-15117255 ] Uwe Schindler commented on LUCENE-6995: --- I think the problem is also that when changing branches you may have still compiled artifacts somewhere laying around. The idea here was to be on safe side and do ant-clean on branch change automatically. We can add some property to disable it that you can put into your {{~/lucene.build.properties}}. At least I see those problems like Robert's all the time. [~dawid.weiss]: I think, the patch will only check a branch change, not a "downgrade" to earlier commit (have no tried, maybe its different). I think changing a branch is a different behaviour inside git. For me the checkout is always in some partly insane state with build artifacts. > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117214#comment-15117214 ] Dawid Weiss commented on LUCENE-6995: - This is interesting because I don't see this behavior. When I checkout a historical branch, it just updates timestamps on changed files in the working copy, but updates them to checkout time? {code} $ ls -l build.xml -rw-r--r-- 1 dweiss dweiss 35579 Jan 26 14:55 build.xml # historical hash from Sep. 5: $ git checkout 8f5259b4ff2d5f0 $ ls -l build.xml -rw-r--r-- 1 dweiss dweiss 25633 Jan 26 14:56 build.xml {code} > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6995) Add branch change trigger to common-build.xml to keep sane build on GIT branch change
[ https://issues.apache.org/jira/browse/LUCENE-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117213#comment-15117213 ] Robert Muir commented on LUCENE-6995: - this is a really good idea. otherwise we are going to get bug reports that look like data corruption: {noformat} [junit4]> Caused by: java.lang.IllegalArgumentException: Version is too old, should be at least 2 (got 0) [junit4]> at org.apache.lucene.util.packed.PackedInts.checkVersion(PackedInts.java:77) [junit4]> at org.apache.lucene.util.packed.PackedInts.getDecoder(PackedInts.java:742) [junit4]> at org.apache.lucene.codecs.lucene50.ForUtil.(ForUtil.java:64) [junit4]> ... 50 more {noformat} > Add branch change trigger to common-build.xml to keep sane build on GIT > branch change > - > > Key: LUCENE-6995 > URL: https://issues.apache.org/jira/browse/LUCENE-6995 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build >Reporter: Uwe Schindler >Assignee: Uwe Schindler > Fix For: Trunk, 5.x > > Attachments: LUCENE-6995.patch > > > Currently build systems like Ant or Maven cannot correctly handle the > following typical Git workflow: > - You do some stuff, run some tests > - You quickly switch the branch to something else (e.g., master -> branch_5x) > - If you then run tests or compile, you get crazy error messages because all > the up-to-date checking does not work. To fix you have to run "ant clean" on > root folder. > The reason for this behaviour is how switching branches works: "it just > replaces your working copy with another verson and different file > modification dates (in most cases earlier ones!). This breaks Ant's and > Javac'c uptodate checking. > This patch will add some check to common-build (which is done before > "resolve" through a dependency of "init" task) to keep track of current > branch: > - It copies {{.git/HEAD}} into the build folder as "reference point". > - Before compiling (on init), it does a file compare of current HEAD file > with the clone in build dir. If it does not yet exists (clean checkout) or if > it is identical, it just proceeds > - If the file contents changed, it will trigger "ant clean" on the LuSolr > root folder automatically and print message. > The status is passed down to sub-builds using {{*.uptodate}} property, so the > check is only done once. > Robert an I tried this out in serveral combinations, works fine. > Any comments? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org