Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#201 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
領域
documentation

調査の方向性

moon_config README と parse_moon_mod および parse_moon_pkg のエントリーポイントから始め、moon.mod、moon.pkg、moon.work について文書化された後処理済みの形状を比較します。完了の条件は、ドキュメントで deps がモジュールからバージョンへのオブジェクトであり、import がパス/エイリアスオブジェクトの配列であることを、@version の動作も含めて明確に区別していることです。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
MoonBit
スター
35
フォーク
10
平均マージ
7時間 25分
マージ済み PR(30日)
16

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

moonbitlang/parser のほかの issue

moonbitlang/parser の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。