Skip to content

Reject non-portable [sources] entries and document the release convention#126

Merged
mtfishman merged 3 commits into
mainfrom
mf/reject-absolute-sources-paths
Jul 10, 2026
Merged

Reject non-portable [sources] entries and document the release convention#126
mtfishman merged 3 commits into
mainfrom
mf/reject-absolute-sources-paths

Conversation

@mtfishman

@mtfishman mtfishman commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Reject [sources] entries in a tracked Project.toml that must not reach main, on every PR. Two kinds are caught. An absolute path is a machine-specific Pkg.develop artifact: it resolves the dependency from a location that exists only on the author's machine, and stays green on CI (where the path is absent), so nothing in the existing pipeline catches it. A url is a cross-repo branch pin: legitimate while a dependent PR is in review, but once merged it resolves the dependency from an unregistered branch. A relative path such as ".." (a subproject pointing at its own package) is legitimate and allowed.

The check runs as an ungated step in VersionCheck, so callers need no new workflow file. It parses each Project.toml, handles both the [sources.Name] and inline-table forms, and fails with a message naming every offending entry. Failing on draft PRs is intended: the goal is to keep these entries off main, and a dependent PR simply drops its pin before it is ready. The behavior is documented under the Version Check section of the README.

Also adds a repo-local CLAUDE.md recording the release convention this change itself depends on: callers pin the workflows at the mutable v2 tag, which does not follow main, so a behavior change reaches no caller until .scripts/release.sh moves v2. It points at the README for the SemVer bump rule rather than duplicating it.

Fail any PR whose tracked `Project.toml` declares a `[sources]` entry that must not reach `main`: an absolute `path` (a machine-specific `Pkg.develop` leak that stays green on CI, where the path is absent) or a `url` (a cross-repo branch pin that resolves the dep from an unregistered branch once merged). A relative `path` such as `".."` for a subproject is allowed. Runs as an ungated step in `VersionCheck`, handling both the `[sources.Name]` and inline-table forms.
@mtfishman mtfishman force-pushed the mf/reject-absolute-sources-paths branch from 82f9aac to 0d2ab54 Compare July 10, 2026 16:39
@mtfishman mtfishman changed the title VersionCheck: reject absolute [sources] paths in Project.toml VersionCheck: reject non-portable [sources] entries in Project.toml Jul 10, 2026
Callers consume these workflows at the mutable `v2` tag, which does not follow `main`, so a behavior-changing merge reaches no caller until a release moves `v2`. Capture that in a repo-local `CLAUDE.md`: a behavior-changing merge must be followed by `.scripts/release.sh`, with the bump chosen per the README's SemVer rule.
@mtfishman mtfishman changed the title VersionCheck: reject non-portable [sources] entries in Project.toml Reject non-portable [sources] entries and document the release convention Jul 10, 2026
Describe the non-portable `[sources]` check under the Version Check section: the entries it rejects (an absolute `path`, a `url`), what it allows (a relative `path`), and that it runs on every PR regardless of draft state.
@mtfishman mtfishman merged commit 39a9291 into main Jul 10, 2026
4 checks passed
@mtfishman mtfishman deleted the mf/reject-absolute-sources-paths branch July 10, 2026 16:49
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