Fix crate loading from bare relative paths - #134
Merged
lorisleiva merged 1 commit intoAug 19, 2026
Conversation
lorisleiva
marked this pull request as ready for review
August 19, 2026 08:58
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Member
Author
Merge activity
|
lorisleiva
changed the base branch from
08-19-propagate_optional_account_strategy_from_instruction_enums_to_their_variants
to
graphite-base/134
August 19, 2026 09:01
This PR fixes `CrateStore::load` (and therefore `codama-rs generate-idl`) failing on bare single-segment relative paths such as `generate-idl interface`. `cargo_toml`'s `complete_from_path` expects the path to the Cargo.toml file and resolves the package directory from its parent, but it was given the raw user-supplied path: a bare segment has the empty path as parent (IO `NotFound`), and a `./`-prefixed path made autodiscovery scan the current directory instead of the crate. It now receives the canonicalised manifest path that `CrateStore::load` already computes, making all path spellings behave identically.
lorisleiva
force-pushed
the
08-19-fix_crate_loading_from_bare_relative_paths
branch
from
August 19, 2026 09:02
ad5d7fc to
2f7202a
Compare
lorisleiva
deleted the
08-19-fix_crate_loading_from_bare_relative_paths
branch
August 27, 2026 15:41
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.

This PR fixes
CrateStore::load(and thereforecodama-rs generate-idl) failing on bare single-segment relative paths such asgenerate-idl interface.cargo_toml'scomplete_from_pathexpects the path to the Cargo.toml file and resolves the package directory from its parent, but it was given the raw user-supplied path: a bare segment has the empty path as parent (IONotFound), and a./-prefixed path made autodiscovery scan the current directory instead of the crate. It now receives the canonicalised manifest path thatCrateStore::loadalready computes, making all path spellings behave identically.