Repository navigation
comline add (onto main) - #41
Merged
Merged
Conversation
Declares another Comline package as a dependency, the fourth step of the editor-dependency design: comline add shared_types ../shared-types comline add net --git <uri> --commit <sha> --version 1.2.0 The dependency is resolved first with core's own deps::resolve (a git pin is fetched into .comline/deps-cache/, then compiled), so an entry that wouldn't resolve is never written. Its entry then goes into config.idp's `dependencies` block (created at the end if there's none) as a text edit in the file's own indentation, with `hash` pinned to the content just compiled; --no-hash leaves it unpinned. The edit is read back with core's parser before anything is written: it must declare exactly what was declared before plus the new entry. Refused, leaving config.idp alone: a name that's already declared, that isn't an identifier, or that's already one of the package's own namespaces (`use <name>::…` would mean both); a directory that isn't a package; a dependency that doesn't compile. A path dependency is a positional DIR rather than `--path`, which is already the global "run against this directory" flag. Also: docs/cli.md said `check` writes nothing to .comline/, but it fetches git dependencies into .comline/deps-cache/.
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
Lands
comline addonmain. It was reviewed and merged as cli#40, but cli#40 was stacked on cli#39's branch and merged into that branch after cli#39 had already merged, so it never reachedmain.Same branch and commit as cli#40 (
ed2aa8a), which sits directly onmain: this diff is exactly cli#40's.What it does, from cli#40:
deps::resolve(a git pin is fetched into.comline/deps-cache/), so an entry that wouldn't resolve is never written.config.idp'sdependenciesblock as a text edit in the file's own formatting.hashto the content just compiled;--no-hashskips it.It refuses, leaving
config.idpalone, a name that's already declared, isn't an identifier, or is already one of the package's own namespaces; a directory that isn't a package; and a dependency that doesn't compile.Test plan
cargo test,cargo clippy --all-targets -- -D warningsandcargo fmt --check: clean on this commit. This PR also gets the CI run cli#40 never had: the workflow only runs on PRs intomain.config.idpedit, and end-to-end tests on the real binary (path dependency pinned and importable, then a change to it failscheckwith "hash mismatch";--no-hash; each refusal; a git dependency at a pinned commit), as described in cli#40.