Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`darnit config migrate` drops comments in `.project/darnit.yaml`

Aperta
#524 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cli, tooling

Direzione di ricerca

First check whether features 040 and 042 have landed, since the issue says the behavior may differ on main until then. Read packages/darnit/src/darnit/config/operator/migrate.py and compare _write_yaml_file with the round-trip helper used by darnit.config.context_writes and update_project_config. Add the requested test; done means comments survive migration and invalid existing .project/ files are rejected with validation errors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

interface-cli module-core quality

Applies once features 040 and 042 land (branch 042-candidate-integrity, not yet merged); until then the behaviour described may differ on main.

migrate_baseline_toml (packages/darnit/src/darnit/config/operator/migrate.py) writes .project/darnit.yaml through _write_yaml_file, which re-dumps the whole document and keeps only the leading header comment. Inline comments, comments between sections, and key formatting in an existing darnit.yaml are lost. Since feature 042, darnit.config.context_writes and update_project_config use a ruamel round-trip that preserves them (framework-design.md 7.9, FR-020).

Proposed fix: write the migrated controls: claims through the same round-trip helper, and refuse (with the validation errors) when either .project/ file is present but invalid, as the other writers do. Add a test that a commented darnit.yaml keeps its comments after darnit config migrate.

Lingua principale
Python
Stelle
22
Fork
27
Merge medio
1g 20h
PR unite (30g)
39

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di darnitdevorg/darnit

Tutte le issue di darnitdevorg/darnit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.