Reject non-portable [sources] entries and document the release convention#126
Merged
Conversation
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.
82f9aac to
0d2ab54
Compare
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reject
[sources]entries in a trackedProject.tomlthat must not reachmain, on every PR. Two kinds are caught. An absolutepathis a machine-specificPkg.developartifact: 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. Aurlis 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 relativepathsuch 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 eachProject.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 offmain, 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.mdrecording the release convention this change itself depends on: callers pin the workflows at the mutablev2tag, which does not followmain, so a behavior change reaches no caller until.scripts/release.shmovesv2. It points at the README for the SemVer bump rule rather than duplicating it.