Move Bundler settings parsing out of ruby_crawler into formats/gem/settings.rs, and read .bundle/config keys with one parser (two drifted today)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
Start with crates/socket-patch-core/src/crawlers/ruby_crawler.rs around bundle_config_setting_with and formats/gem/mirror.rs (config_key and the key loop), then compare how each reads .bundle/config lines. Step 1 is the parser move into formats/gem/settings.rs, which needs design choices about which key rules win. Done when formats/gem/* no longer imports crawlers::*, one key parser remains, and the ruby crawler, gem vendor, redirect and mirror tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[agent] Filed by the scheduled architecture audit (audit-core). Register: register.
Kind: refactor (placement plus a duplicated parser; extends E20/#833). Register ID: A57.
Problem
- Bundler settings logic lives in the crawler. About 1,260 lines of it sit in
crawlers/ruby_crawler.rsL1270-L2530:`` config scalar parsing and unquoting, the global and app config locations, the cache dir, the loaded manifest and lockfile, and the moved root. - Format modules import from that crawler.
formats/gem/manifest.rsL58 andformats/gem/mirror.rsL16 import fromcrawlers::ruby_crawler, and so dovendor/gem.rs,vendor/lock_inventory/gem.rs,vex/discover/gem.rs,hosted/engine.rs,patch/redirect/upstream/gem.rsand the CLI. - The
.bundle/configkey line is parsed twice, and the copies drifted:ruby_crawler::bundle_config_setting_withL2449-L2461 matchesKEY:as a plain prefix: it acceptsKEY:valuewith no space, does not decode quoted keys, and does not normalize legacy keys.formats/gem/mirror.rsL125-L230 (config_keyand the key loop) requires": ", decodes Bundler 4.1's quoted keys, and normalizes dot/dash keys.- The drift is latent for
BUNDLE_PATH/BUNDLE_GEMFILE/BUNDLE_LOCKFILE, because Bundler quotes only keys that contain:.
- The Gemfile/gems.rb manifest name list is written twice:
ruby_crawler.rsL276 andhosted/engine.rsL1167.formats/gem/mod.rsalready holdsBUNDLER_LOCKS.
Proposed change
This is a tracking issue; do the steps in order.
- Create
formats/gem/settings.rsand move the pure parsers there: the config-map parse (one key-line reader, followingmirror.rs's rules), unquote,bundler_truthy, and the tier rules from #1931. Also move aBUNDLER_MANIFEST_FILESconst there. - Leave only file and env I/O in the crawler, as a
BundlerEnv::ambient()snapshot that replaces the 4 copies of the ambient-env tuple (L47, L169, L591, L670). - Repoint the
formats/gem,vendor,vex,hostedand redirect imports.
Size
About 10 files; mostly moves (~1,000 lines moved, ~−80 net).
Acceptance criteria
- Behavior is unchanged: the ruby crawler, gem vendor, gem redirect and mirror tests pass.
formats/gem/*no longer importscrawlers::*.- One
.bundle/configkey parser remains.
- Ngôn ngữ chính
- Rust
- Star
- 9
- Fork
- 2
- Merge trung bình
- 20 giờ 9 phút
- Pull request đã merge (30 ngày)
- 629
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SocketDev/socket-patch
-
bug pm:nuget
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
SocketDev/socket-patch#2023 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged arch-audit priority:p3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
SocketDev/socket-patch#1860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged arch-audit priority:p3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SocketDev/socket-patch#1838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Nightly gem e2e red on bundler 1.17/2.1: CRLF source-block rollback unattributableCó thể đã có người làm @mikolalysenko đã nhận 1 ngày trước. Đang mởci-janitor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
SocketDev/socket-patch#1997 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
arch-audit refactor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
SocketDev/socket-patch#1993 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SocketDev/socket-patch
Issue tương tự
-
A match arm above the largest i64 is compared as 0Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
DioxusLabs/dioxus#6063 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`nsh-core` fails to compile when taffy's default `calc` feature is enabled elsewhere in the graphĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
longbridge/nsh#966 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows docs: pin a tested ConPTY version for Kitty graphics; 1.25.260930003 corrupts large uploadsĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
raphamorim/rio#2021 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: status text is out of dateĐang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
non7top/sigstore-shell#38 ·
Maintainer thường phản hồi trong vòng 1 ngày