Commit 95899e7
committed
test(manifest): resolve the JVM compat fixtures' deps from generated stub artifacts
The maven-compat smoke fixture declared commons-io, junit and hamcrest as real
artifacts from Maven Central purely to get a graph shape: an external prod dep,
a test-scope dep and its transitive. No fixture code imports them, so they were
never compiled against or executed - but they still aged into GHSA-78wr-2p64-hpwj,
a Dependabot alert, and a version bump.
gradle-compat already solved this: make-localrepo.sh generated a tiny file-based
Maven repo of empty-jar stubs at test time. That generator moves up a directory to
test/make-stub-repo.sh, gains the ability to give a stub its own dependency, and
now serves all three fixtures. maven-compat resolves demo.ext:tool (prod),
demo.ext:harness (test) and its transitive demo.ext:harness-core through a
<repository> whose URL smoke-test.sh passes as -Dstub.repo.url; sbt-compat
resolves demo.ext:tool and demo.ext:harness the same way.
The suites also stop using the developer's home caches. compat-cache.sh resolves
one cache root under the temp dir, overridable by SOCKET_COMPAT_CACHE, and each
tool is pointed at it: Maven by -Dmaven.repo.local, Gradle by -g, sbt by
-Dsbt.ivy.home and COURSIER_CACHE. The root is stable so each tool's own closure
is downloaded once, but the stub artifacts are evicted before every run, so a run
can never pass on a stale copy of the thing under test. Nothing is read from or
written to ~/.m2, ~/.gradle or ~/.ivy2, and records.tsv no longer embeds a path
under the developer's home.
Assertions prove exactly what they proved before, still matching on
groupId:artifactId with no version written in any test, and still keying on the
.jar suffix rather than any path. The transitive check is now unconditional: with
a stub graph it is deterministic, so its absence is a defect rather than a
junit-version detail.
Each build tool still fetches its own closure from Central - Maven's plugins pull
commons-io themselves - so this is not a fully offline fixture. It declares no
third-party dependency of its own.1 parent 3dcaae0 commit 95899e7
272 files changed
Lines changed: 262 additions & 94 deletions
File tree
- src/commands/manifest/scripts/test
- gradle-compat
- .gradle-home
- caches
- 8.14
- dependencies-accessors
- file-changes
- fileContent
- fileHashes
- groovy-dsl
- 40eebb7fa45b3770a072424730a8a959
- metadata
- 49750af9d60d72bfabd6b109d604cb94
- classes/settings
- instrumented/settings
- metadata
- 839e58da451023bf932576ba495dc49c
- metadata
- b2c91c80a24a1c3e529dfbd233626a12
- classes/proj
- instrumented/proj
- metadata
- bdca522d30a4b8ff7282b988b9895621
- classes/init
- instrumented/init
- metadata
- bde3c4434d09e9669f4bef28942a7791
- metadata
- md-rule
- md-supplier
- transforms
- jars-9
- 66b42a5ec33682c10f19ae33dda188cd
- settings
- 772480d27e1fd3e4b352ca8246461cbc
- 7e10609ec09db6f5083ca3c5f8d8463a
- 9cf8879af73823a1abf5c5b552480a20
- bb90ed000079483e8be69c5f96abd9a7
- proj
- ef441d569ca57290cf7bd6fc743c1e3d
- init
- journal-1
- modules-2
- daemon
- 8.14
- native
- 0.2.7/aarch64-macos
- 1def1411415f61bf3af743bc5b6707747c0891f09f0c88961ee8f79bc544acac/osx-aarch64
- jansi/1.18/osx
- project
- maven-compat
- project
- app
- sbt-compat
- project
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
0 commit comments