[UX] resolve --dry-run output full dependency graph as a plan, consumable by unpack

未关闭
#9 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
8/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
go
领域
cli, devtools

调研方向

The issue asks for --dry-run to print the full resolved dependency graph as a plan that unpack can consume, with a lockfile as the shared artifact. Read the resolve, unpack and dry-run paths first to see how they currently duplicate fetch and verify logic. The open questions on metadata-only lookup, conflicting pins and removal previews need maintainer decisions before any code. Work should not start until those are settled.

由索引模型根据 Issue 内容生成。

描述

Summary 🤖

grcli should behave like a typical package manager for Gemara artifact dependencies: resolve → lock → sync. Given a root artifact, compute its full transitive dependency graph, record what was found as a durable lockfile, then make a local directory match that lockfile exactly -- fetch what's missing, verify it, and remove what's no longer needed. Fetching/verifying/writing should be one reusable operation driven entirely by a lockfile -- not something resolve and unpack each implement separately.

The lockfile should also work disconnected from the network: a fully offline directory (or archive) plus its lockfile should be independently re-verifiable by anyone, with no need to trust whoever produced it.

Why

A caller should be able to see the full resolved dependency set — every version, every conflict, every license — before any content is fetched. That preview becomes the input to the fetch/sync step, so the expensive graph-walk only ever has to happen once per resolution. It also gives a natural hook for auditing (license compatibility across the whole graph) before committing to anything, and gives downstream tooling (policy engines, offline/airgapped consumers) a stable, inspectable artifact to build on instead of having to re-derive it.

This covers some of the authoring flows for compliance-as-code: reading a single artifact, and syncing a project's full dependency set to disk. grcli's responsibility ends at producing a correct, verified, synced tree plus its lockfile. Aggregation or derived artifacts can be part of consumer workflow.

Open Questions

  • Can the full resolved graph (versions, digests, licenses) be known without fetching full artifact content, or does that require a cheaper metadata-only lookup per dependency?
  • When the resolved graph disagrees with itself (same dependency pinned to two different versions), should the fetch/sync step refuse to proceed, or proceed and surface the disagreement for something downstream to handle?
  • When syncing a local directory to match a lockfile, should content no longer referenced by the lockfile be removed automatically, and if so, how does a caller preview that removal before it happens?
  • Should re-verifying an already-fetched, offline dependency set require any network access at all, or must it be fully self-contained?
主要语言
Go
星标
0
派生
2
平均合并
1 天 15 小时
30 天内合并 PR
6

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

gemaraproj/grcli 的其他 Issue

查看 gemaraproj/grcli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。