GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [MSHARED-1285] use an up-to-date scanner instead the newscanner by laeubi · Pull Request #77 · apache/maven-filtering Conversation
|
|
Any chances to get some progress into this PR? From an Eclipse user perspective this issue is really annoying as some resources are not copied to the target/classes folder. //cc @khmarbaise |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
tests are failing.
Is there any way to do this that doesn't use plexus at all? E.g. something in commons-io instead?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
obviously not... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
FWIW, the (single) test failure I get with this PR is this one: I don't know anything about this project/codebase, but as an Eclipse user impacted by this I was curious, and the last PR build is too old and the failure logs are not available anymore. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@laeubi would it be possible to add a unit test that showcases the issue and the proposed fix? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It should be possible to reproduce the problem a testcase should be setup like this:
Result is only Another case is that you modify the target file (but not the source) then the mojo will never update that file as long as one do not modify the source file. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I dig into the test issue. Test verifies the following behavior:
I think there is an issue with the test implementation. Not sure why, but the original code does not trigger So the issue for this test failure is in TestIncrementalBuildContext (org.sonatype.plexus:plexus-build-api:tests). Not sure how to handle this.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@lalmeras many many thanks for looking into the test!
This is actually deprecated/removed in later versions exactly because no one can know what the test wants to assert... so the best would be to simply copy it in the plugin here and adjust as needed, or even better using a mock. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Already done it (copy/fix TestIncrementalBuildContext). It doesn't work out of the box as there is other tests that rely on this bug to work. And another bug in getRelpath. But I agree the best option is to retrieve/fix/adapt TestIncrementalBuildContext so that the 4 tests that use it work and actually test the effective filtering behavior. Just not as simple as it seems. I plan to work on it. I'll keep this issue updated about my work on it. Once the tests fixed, I think it'll be easier to write a test exposing the current issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Here is a branch with my proposal : https://github.com/lalmeras/maven-filtering/commits/MSHARED-1285
Both commits built with success with java 8 / java 17 / mvn 3.8. I finally understand why old tests work. It is because they relied only on Scanner behavior, and not isUptodate / hasDelta methods. So they accommodate nicely with the buggy TestIncrementalBuildContext. No work done on this issue's testcase. I can work on it if this first proposal seems OK. I do not open another PR; feel free to integrate my proposal in this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@lalmeras just open a PR for the testcases I think that can be easier to manage also we then have direct PR validation! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Done ! #82 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I update my branch https://github.com/lalmeras/maven-filtering/commits/MSHARED-1285 with the following change :
@laeubi I'm not sure to understand what is the current / expected behavior for this use-case. Can you give a more precise description ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@lalmeras great to see you make progress on this 👍 For the second case assume the following:
What happens now is that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@laeubi Can you check lalmeras@dbe1367#diff-a52a7b8a0ff570c181fe18ab238b693c21243d40870dd2d8178340247755bba5R152 ? Pay attention that my test assumes that BuildContext can reply appropriately Am I missing something ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@lalmeras I think you are right that m2e assumes that if the target is newer than the source it is up-todate... but I think that can be ignored for now as this is an implementation detail of the context, the important part is that if |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you for your feedback. @laeubi Do you want to update your PR with my proposal so we now both have unit test demonstrating your use case (and failing with the current codebase) and your fix. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@lalmeras can you open a PR here so we see the test is currently failing? I'll then fetch the PR and add my one on top of it to prove it fixes the failing test! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Current incremental build does not honor isUptodate(), so changed or removed target resources are not refreshed until sources are modified or a full build is performed. 2 new testcases exhibits this issue (one for missing target resource, one for modified target resource). As stub BuildContext provides appropriate isUptodate results, build should refresh this resources. Current implementation prevents BuildContext implementors to trigger appropriate resource refresh by tweaking isUptodate implementation. See javadoc in BuildContext#newScanner javadoc that advices that incremental build may be performed with a full resource scanning and a isUptodate call to refresh only needed resources.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It currently fails on test-time will need to investigate what it wants here... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
They are test-cases that handle filter modification. Expected behavior (checked by these tests) is to perform a full-build (this is the case where ignoreDelta := true is delta is found on filters). I address this issue in my previous work by adapting your original fix (restoring ignoreDelta behavior, using ignoreDelta to adapt file scan) : see this commit lalmeras@2525912 (I previously posted this comment on #83 :-( ) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@lalmeras thanks for clarification, thinking more about it I wonder if |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think ignoreDelta for this case is a well-founded behavior. It checks specifically filter files (not filtered files). If source for filters values is changed, I think it is expected that all resources are refreshed, hence the ignoreDelta. isUptodate usage will not allow you to to reproduce this behavior during the scanning time. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@lalmeras sounds reasonable, I have now adjust the code accordingly (and slightly restructured the flow), now my local build shows all test passing! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
All checks have passed! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Currently it could happen that the scanner misses changed files (because they are not part of the delta) or copies files even if they have not changed (e.g. because the output has changes). This uses now a different approach, instead of only handling the delta files, we scan all inputs and compare if they are up-to-date with the output.
|
Can this be merged? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Do you have any approx. arrival date for a release including this fix? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
We do not plan releases. Someone has to stand up as RM for this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Then the question is maybe is there someone who can drive the release and is willing to do so ... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm doing a review of maven shared projects now and will do a release for this project also. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Any progress, @slachiewicz? There is a 3.3.2 tag, but the release did not find its way to Maven Central. Do you know why @gnodet? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The release is still under vote. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks for the feedback... this is not a publicly visible process, right? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@OLibutzki the development process of Apache projects generally is public - you can help by testing and casting your vote as well - just reply to the voting mail. However, unless you are part of the project management committee, you vote will not count as binding. A release vote is successful with at least 3 +1 votes after at least 72h and no -1 vote. See https://www.apache.org/foundation/voting.html |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@gnodet Thanks for pushing that release ahead! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Resolve #270 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Resolve #270 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.