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

moon_config docs: clarify that post-processed Ast shapes differ between parse_moon_mod (deps object) and parse_moon_pkg (import array)

Aperta Adatta ai principianti
#201 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à
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
documentation

Direzione di ricerca

Inizia dal README di moon_config e dagli entry point parse_moon_mod e parse_moon_pkg, confrontando le strutture post-elaborate documentate per moon.mod, moon.pkg e moon.work. Il lavoro è completato quando la documentazione distingue chiaramente deps come un oggetto modulo-versione da import come un array di oggetti percorso/alias, incluso il comportamento di @version.

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

Descrizione

Summary

moonbitlang/moon_config post-processes each manifest into different shapes, and the README examples show both without calling out the difference:

  • parse_moon_mod: the import { ... } block is rewritten into a top-level deps object — keys are module paths with any @version suffix stripped, values are the pinned versions:

    { "name": "example/app", "deps": { "moonbitlang/x": "0.4.6" } }
    
  • parse_moon_pkg: import stays an array of objects with path (and alias) fields:

    { "import": [{ "path": "moonbitlang/core/json", "alias": "json" }] }
    

Why it matters

Tooling built on parse_moon_mod naturally looks for an import array first (mirroring parse_moon_pkg's shape and the source syntax) and finds nothing — the imports now live under a differently-shaped deps key. The asymmetry (key rename import → deps, array → object, @version stripping) is easy to trip over since all three files (moon.mod / moon.pkg / moon.work) share the same DSL syntax.

Suggestion

A short note in the moon_config README (or the per-function docstrings) clarifying the per-file post-processed shapes — e.g. "moon.mod imports are merged into a deps object (module → version, @version stripped); moon.pkg keeps import as an array of {path, alias} objects".

Context: we build workspace release tooling on top of moon_config and hit exactly this while extracting member dependency graphs. Happy to send a docs PR if helpful.

Lingua principale
MoonBit
Stelle
35
Fork
10
Merge medio
7h 25m
PR unite (30g)
16

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 moonbitlang/parser

Tutte le issue di moonbitlang/parser

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.