Commit 327ebe8
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 f6aced9 commit 327ebe8
270 files changed
Lines changed: 252 additions & 90 deletions
File tree
- packages/cli/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
- 03ab749bcc50897baa0a63bb57f4586e
- 29ed803249bce1510f546ffecda10ef8
- 53530f0f36e55202b455e38d3f7eb507
- settings
- 93057b27a2ddcf1967e4fa9ecd7ab05e
- d96eb18f5f099c5c333a69ed7f0ec124
- init
- ebbf9e0af523567d1424882652c51228
- proj
- 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 | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | 297 | | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
306 | 307 | | |
Lines changed: 32 additions & 0 deletions
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments