Skip to content

feat(plugin-go): resolve heph.go.build_addr pkg relative to caller - #295

Merged
raphaelvigee merged 1 commit into
masterfrom
raphaelvigee/go-build-addr-relative
Jul 31, 2026
Merged

feat(plugin-go): resolve heph.go.build_addr pkg relative to caller#295
raphaelvigee merged 1 commit into
masterfrom
raphaelvigee/go-build-addr-relative

Conversation

@raphaelvigee

Copy link
Copy Markdown
Member

Summary

  • heph.go.build_addr("./cmd") / "../cmd" now resolve relative to the calling BUILD file's package (via join_rel_checked_pkg), mirroring load()'s existing relative-path handling.
  • Absolute pkg strings (e.g. "mylib", "@heph/go/std/fmt") behave exactly as before.
  • Escaping the workspace root (e.g. "../../escape") errors, same as other relative-path resolution in the codebase.

Test plan

  • cargo test -p plugin-go build_addr — 8/8 pass (added 3 new: dot-slash, dot-dot-slash, escape-error)
  • lint

`heph.go.build_addr("./cmd")`/`"../cmd"` now resolve against the calling
BUILD file's package via join_rel_checked_pkg, same as load()'s relative
path handling. Absolute pkg strings are unaffected.
@raphaelvigee
raphaelvigee enabled auto-merge (squash) July 31, 2026 16:00
@raphaelvigee
raphaelvigee merged commit e9fa09b into master Jul 31, 2026
22 checks passed
@raphaelvigee
raphaelvigee deleted the raphaelvigee/go-build-addr-relative branch July 31, 2026 16:18
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