Tuesday, January 7, 2025

Re: Digest for google-web-toolkit@googlegroups.com - 12 updates in 3 topics

Thanks - I knew that Maven was explicitly opt-in, but several Gradle projects I've worked on have hit this issue so I assumed it was a facet of Gradle itself. Turns out instead, a single plugin shared among these projects, only referenced indirectly, was traversing the tasks of all projects and applying this. I guess you can draw an analogy to a maven parent pom doing configuration you didn't expect, except any plugin with access to the Project instance could technically have done this.

I also excluded Bazel, as the few developers who use it beyond trivial examples already will need to deeply understand its internals, and so would already expect this.

On Tuesday, January 7, 2025 at 3:52:48 AM UTC-6 Thomas Broyer wrote:
On Monday, January 6, 2025 at 4:46:51 PM UTC+1 Colin Alworth wrote:
Take a little care with testing/validating etag though - stock Jetty at least does not hash the file to produce this (to avoid the expense of reading the entire file to produce the hash, then re-reading it from start to stream it), but uses the file modification date assuming is a valid proxy for changes.

 
Thwarting this, gradle helpfully sets file metadata in a jar/war to a point decades in the past, regardless of actual values, to ensure its own caching isn't impacted by files being refreshed.

Gradle doesn't do that by default, this is part of an explicit configuration to get reproducible builds: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:preserveFileTimestamps
You'd have the same issues with Bazel (does reproducible builds by default) or Maven (https://maven.apache.org/guides/mini/guide-reproducible-builds.html)

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/b1fb0d17-b8cf-4b46-b9e0-aa50f057d078n%40googlegroups.com.

No comments:

Post a Comment