Skip to content

Keep SDK template manifests cargo-readable - #135

Merged
nicabarnimble merged 1 commit into
mainfrom
fix/cargo-readable-sdk-templates
Jul 1, 2026
Merged

Keep SDK template manifests cargo-readable#135
nicabarnimble merged 1 commit into
mainfrom
fix/cargo-readable-sdk-templates

Conversation

@nicabarnimble

@nicabarnimble nicabarnimble commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keeps SDK cargo-generate template manifests parseable by Cargo before template rendering.
  • Replaces invalid {{ package_name }} package names in template Cargo.toml files with valid default package names.
  • Removes noisy Cargo git-dependency diagnostics for downstream consumers that pin patina-sdk from this repository.

Why / Design

Cargo scans Cargo.toml files in git dependencies before any cargo-generate rendering happens. The template manifests used raw Liquid placeholders in [package].name, which made Cargo report invalid package names whenever another repo depended on patina-sdk by git rev.

This keeps the template manifests syntactically valid as checked-in TOML. It does not change SDK manifest parsing or runtime behavior.

Changes

  • sdk/template/Cargo.toml: valid default package name.
  • sdk/template/checks/diagnostics/Cargo.toml: valid default diagnostics package name.
  • sdk/template-legacy/Cargo.toml: valid default package name.

Validation

Local:

  • cargo metadata --no-deps --format-version 1
  • cargo test -p patina-sdk --no-default-features --features manifest
  • cargo test --test template_end_to_end -- --nocapture — passed; cargo-generate e2e skipped because cargo generate is not installed locally.

GitHub Actions:

  • Require Linked Issue — passed
  • Lint — passed
  • Test — passed
  • Release — passed
  • Retrieval Benchmark — skipped

Compatibility / Operations

  • Downstream git dependencies can pin this exact rev to avoid Cargo diagnostics from SDK template manifests.
  • No schema, SDK API, or runtime contract changes.

Follow-ups

  • If cargo-generate package-name substitution remains required for these standalone SDK templates, add an explicit generation hook or migrate these files to a template-safe representation in a follow-up.

@nicabarnimble
nicabarnimble merged commit 5106ef0 into main Jul 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant