Read gradle-wrapper.properties through one parser: the hosted and vendored Gradle 6.8 gates read the wrapper version two different ways and disagree on `distributionUrl = …`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- build-system, devtools
調査の方向性
Start in crawlers/gradle_cache.rs (parse_properties and WrapperProps::of), then compare with wrapper_version in gradle/graph.rs and vendor/jvm/mod.rs, and wrapper_init_dirs in gradle/home.rs. Run graph::tests::android_kmp_and_wrapper_version and the parse_properties_* tests first to confirm the baseline. Done means one properties reader serves both gates and the five table rows give the same version from the hosted and vendored paths. This is a multi-file refactor that proposes moving code between modules, so confirm the design with a maintainer before starting.
索引モデルが issue の本文から書いたものです。
説明
[agent] Filed by the scheduled architecture audit (audit-core). Register: #1830 register.
Kind: bug. Register ID: A72.
Problem
gradle/wrapper/gradle-wrapper.properties is read by three different readers, and they disagree on which Gradle version a build pins:
crawlers::gradle_cache::parse_properties+WrapperProps::of:``` a realjava.util.Propertiesreader (`=`/`:`/whitespace separators, escapes, continuation lines, a later key wins). Used only for init-script discovery.gradle::graph::wrapper_version: takes the first line that starts withdistributionUrl(sodistributionUrlBackup=…matches too) and joins no continuation lines. It drives the hosted "Gradle 6.8 or newer" refusal (redirect/gradle.rs L697-L705).````vendor::jvm::wrapper_version: needs the exact prefixdistributionUrl=(no spaces around=, no:, no BOM). It drives the vendored "Gradle 6.8 or newer" refusal (vendor/jvm/gradle.rs L261-L266) and the Maven-wrapper warnings (maven_reactor.rs L154-L160).`````
A fourth spot derives the distribution name from the URL again: GradleHome::wrapper_init_dirs beside WrapperProps::name.``````
Executed (the three functions copied verbatim from main @ cbbbdb9 into a scratch crate):
gradle-wrapper.properties |
graph (hosted gate) |
vendor::jvm (vendored gate) |
parse_properties (what Gradle reads) |
|---|---|---|---|
distributionUrl = https\\://…/gradle-6.7-bin.zip |
(6, 7, 0): refused | None: not refused | gradle-6.7 |
BOM + distributionUrl=…/gradle-6.7-bin.zip |
(6, 7, 0): refused | None: not refused | gradle-6.7 |
distributionUrlBackup=…/gradle-6.9.4… then distributionUrl=…/gradle-8.14.3… |
(6, 9, 4) | (8, 14, 3) | gradle-8.14.3 |
two distributionUrl lines, 6.9.4 then 8.14.3 |
(6, 9, 4) | (6, 9, 4) | gradle-8.14.3 (last wins) |
distributionUrl=…/distributions/\\ + continuation gradle-8.14.3-bin.zip |
None | None | gradle-8.14.3 |
So a Gradle 6.7 build written with distributionUrl = … (or saved with a BOM) is refused in hosted mode and vendored anyway. The two hosted/vendored gates also feed the major that selects Gradle 6 vs 7+ range semantics.
Proposed change
- Move
parse_propertiesandWrapperPropsout ofcrawlers::gradle_cacheinto a puregradle::wrappermodule overTextReadFn(thegradlemodule already forbidsstd::fs;WrapperProps::ofkeeps a thin disk adapter in the crawler). - Add
WrapperProps::version() -> Option<(u32, u32, u32)>and deletegraph::wrapper_version. - Make
vendor::jvm::wrapper_versionread through the same properties parser for both tools (.mvn/wrapper/maven-wrapper.propertiesis a.propertiesfile too), or delete it in favour of the shared one. home::wrapper_init_dirstakes the distribution name fromWrapperProps::nameinstead of re-deriving it.
Size
4–5 files (gradle/{mod,graph,home}.rs, new gradle/wrapper.rs, crawlers/gradle_cache.rs, vendor/jvm/mod.rs); about −60/+40 lines.
Acceptance criteria
- One properties reader for wrapper files;
grep -rn 'strip_prefix("distributionUrl' cratesfinds nothing. - New unit cases for the five rows above, asserting the same version from the hosted and the vendored gate.
graph::tests::android_kmp_and_wrapper_versionandgradle_cache'sparse_properties_*tests keep passing (moved with the code).
Generated by Claude Code
- 主要言語
- Rust
- スター
- 9
- フォーク
- 2
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 309
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SocketDev/socket-patch のほかの issue
-
Windows unit tests fail on main: pnpm-registry-overrides fixtures are checked out as CRLF (mixes CRLF and LF line endings)対応中かも @mikolalysenko が今日担当しました。 オープンagent:claimed agent:triaged ci-janitor priority:p1
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
SocketDev/socket-patch#2238 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged arch-audit priority:p3 refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
SocketDev/socket-patch#1860 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged arch-audit priority:p3 refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SocketDev/socket-patch#1838 ·
メンテナーはふだん 1 日以内に返信
-
Nightly: pnpm11_registry_route_is_cleaned_up_when_a_patch_is_not_needed fails on Windows (pnpm records the RUNNER~1 short path as a second importer)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンagent:triaged ci-janitor priority:p1
難易度 3/5 半日 初心者へのやさしさ 42/100
SocketDev/socket-patch#2235 ·
メンテナーはふだん 1 日以内に返信
-
Agent mode reports a gem whose installed file was edited as "not installed on this host" / "not found on disk", `apply --check` says to run `apply`, and `rollback` exits 1 with "modified after patching" on every run対応中かも @mikolalysenko が今日担当しました。 オープンagent:claimed agent:triaged bug bughunt pm:bundler priority:p1 ux
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
SocketDev/socket-patch#2231 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
SocketDev/socket-patch の issue をすべて見る
似ている issue
-
area: cli good first issue type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
renaming a provider to a taken name fails with a raw sql error対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea:storage kind:bug priority:p3 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug bugfix
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
storytold/photocraft#16975 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信