-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PropertiesFileTransformer breaks Reproducible builds in 8.1.1 #856
Comments
@agascon do you have something to demonstrates the issue? It doesn't appear that any of the changes were actually overridden in the merge (https://github.com/johnrengelman/shadow/blob/main/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/PropertiesFileTransformer.groovy#L185-L203). It was just 2 changes that were in the same place, but the 3-way merge accounted for it. Additionally, the tests added in e46bd204917bc004c1a92c7d1ffa36250b192904https://github.com/johnrengelman/shadow/commit/e46bd204917bc004c1a92c7d1ffa36250b192904 are still passing. |
Unfortunately the project where I detected this is private but will try to provide something. I understand problem is in https://github.com/johnrengelman/shadow/blob/main/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/PropertiesFileTransformer.groovy#L253. That store method is not the one overridden in CleanProperties. |
I created an Spring Boot dummy application and setup shadow in build script. When using version 8.1.0 and between 2 separate builds...
However, when using 8.1.1...
And in this last case...
|
build.gradle
|
In any case, I have clear where the problem is, if had time will try to raise a PR with the fix |
Thanks! I think we just need a test to trigger this. I’m not sure why the overridden method wouldn’t be getting invoked. Or why the existing tests wouldn’t be failing. If you beat me to getting a test or fix into a PR, awesome. I may have some time to get dog into it this weekend. |
Raised a PR, please check... |
I'm facing this issue too. I see the PR above from more than a year ago. Any chance this gets some traction? |
Looks @johnrengelman is looking to transfer the project to new maintainers. See this discussion... If there is a new repo when this PR can be pushed, I'm also interesting on having this fixed. |
Shadow Version
8.1.1
Gradle Version
Not relevant.
Expected Behavior
PropertiesFileTransformer supports having reproducible builds by not introducing any timestamp dependant of the build time.
Actual Behavior
Fix for supporting reproducible builds introduced in e46bd20 in 8.0.0 were overridden by 9bffd1e in 8.1.1
PropertiesFileTransformer is back to use Properties class and it's introducing timestamps into transformed files.
The text was updated successfully, but these errors were encountered: