Move Bundler settings parsing out of ruby_crawler into formats/gem/settings.rs, and read .bundle/config keys with one parser (two drifted today)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 22/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
[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.
- Lenguaje dominante
- Rust
- Estrellas
- 9
- Forks
- 2
- Merge medio
- 20 h 47 min
- PR fusionados (30 d)
- 681
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SocketDev/socket-patch
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
SocketDev/socket-patch#1860 ·
Los mantenedores suelen responder en 1 día
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SocketDev/socket-patch#1838 ·
Los mantenedores suelen responder en 1 día
-
arch-audit refactor
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
SocketDev/socket-patch#1993 ·
Los mantenedores suelen responder en 1 día
-
arch-audit refactor
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
SocketDev/socket-patch#1992 ·
Los mantenedores suelen responder en 1 día
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
SocketDev/socket-patch#1987 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de SocketDev/socket-patch
Issues similares
-
docs(metrics): replace stale src/metrics.rs line anchors in dashboard-metrics.md with symbol namesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
vfarcic/dot-agent-deck#2079 ·
Los mantenedores suelen responder en 1 día
-
修改文件名时主键盘上的数字无法输入Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
qingjian-team/qingjian#894 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
rubys/roundhouse#1757 ·
-
[Feature] 侧边栏Agent HTTP请求UA适配Abiertoenhancement user-priority/P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
t8y2/dbx#14196 · 1 comentario ·
Los mantenedores suelen responder en 1 día