Skip to content

docs(codegen): fix .gitignore example to show target attribution comment#59

Merged
raphaelvigee merged 2 commits into
mainfrom
claude/laughing-lovelace-o8yxsz
Jul 1, 2026
Merged

docs(codegen): fix .gitignore example to show target attribution comment#59
raphaelvigee merged 2 commits into
mainfrom
claude/laughing-lovelace-o8yxsz

Conversation

@raphaelvigee

Copy link
Copy Markdown
Member

Summary

Triggered by hephbuild/heph#143 (commit 9a482a9), which fixed a bug in heph tool gen-gitignore: the managed .gitignore block now pairs each pattern with a # //pkg:target attribution comment on its own line above the pattern, instead of the old (broken) trailing pattern # //pkg:target form — git only treats # as a comment when it starts the line, so the old inline form was a literal, non-matching pattern.

I confirmed against hephbuild/heph master that every entry produced by a fresh heph tool gen-gitignore scan always carries this attribution comment (Engine::codegen_copy_gitignore_patterns in crates/engine/src/engine/gitignore.rs unconditionally sets addr: Some(addr.clone())), so the example in website/docs/concepts/codegen.md — which previously showed only a bare pattern line with no attribution — didn't reflect real output either before or after this fix.

  • Updated the .gitignore example in the "Keeping .gitignore in sync" section to show the # //fmt:generated attribution line above /fmt/generated.txt, matching the target name already used elsewhere in the same doc's examples.
  • Added a sentence noting the comment always sits on its own line above the pattern (never trailing), matching the underlying git constraint the source PR fixed.
  • No other docs or plugin skill reference files (plugins/heph-expert/skills/heph/references/*.md, plugins/heph-go/skills/heph-go/references/*.md) contain a rendered .gitignore example, so no further changes were needed there.

Test plan

  • Not built locally per routine instructions (no build env available in this session) — recommend a normal doc preview/build check in CI.
  • Verified raw file content on the branch has correct YAML frontmatter and the updated example block.

🤖 Generated with Claude Code


Generated by Claude Code

The heph-managed .gitignore block pairs each pattern with a `# //pkg:target`
comment naming the emitting target, rendered on its own line above the
pattern (hephbuild/heph#143). Update the example to match real output.
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚡ Cloudflare Pages preview

Preview https://2b7a68a6.hephbuild.pages.dev
Commit 039559d

@raphaelvigee raphaelvigee merged commit 4b73fd8 into main Jul 1, 2026
3 checks passed
@raphaelvigee raphaelvigee deleted the claude/laughing-lovelace-o8yxsz branch July 1, 2026 13:00
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