Supported Go entry point for building a map

オープン
#178 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
api, cli, documentation

調査の方向性

Start by reading the wiring in internal/cli/map.go and the compatibility guidance in docs/COMPATIBILITY.md. Review the map fixtures and existing CLI behavior before deciding the public package types, compatibility promise, and runnable examples. Done means the library and CLI produce equal validated output, with a contract test and updated compatibility documentation.

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

説明

follow-up

Goal

Give Go programs a supported way to build a dircue map in-process, without shelling out to the CLI.

Current state (1.0.0)

  • The module github.com/war-and-code/dircue exposes about 29 packages under pkg/, for example pkg/scanner.Scan, pkg/mapbuild.Build and pkg/mapdoc.
  • Producing a map means wiring the scanner, the deployables and intent collectors, the source digest and document validation together. That wiring lives in internal/cli/map.go, which outside code cannot import.
  • There are no library docs or examples.
  • docs/COMPATIBILITY.md states that pkg/ packages are unsupported and may change or move within 1.x.

Proposal

  • Add one small public entry point, sketched below.
    doc, err := dircuemap.Build(ctx, path, dircuemap.Options{...})
    
    • It returns a validated mapdoc.Document equal to dircue map --json output for the same inputs and settings.
    • The same function should back the CLI, so the two can't drift.
  • Decide which types the entry point exposes (the document model, options and errors), and document them with runnable examples.
  • Add a contract test that compares library output with CLI output over the map fixtures.
  • Decide the compatibility promise for the new package, and record it in docs/COMPATIBILITY.md.

Out of scope

Stabilizing every pkg/ package. See the companion issue on which packages stay public.

主要言語
Go
スター
0
フォーク
0
平均マージ
6時間 18分
マージ済み PR(30日)
16

環境構築

はじめの一歩

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

war-and-code/dircue のほかの issue

war-and-code/dircue の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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