Skip to content

Fix inferring the crate name #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Conversation

weiznich
Copy link
Member

The old implementation assumed that we always have a top level crate, which cannot be assumed in general. We now reverse the path and try striping everything including src. Afterwards we assume that the directory on top of that is the parent crate name. That's still hacky, but works for our use-case. For a better solution we would query cargo-metadata for informations and then use that to resolve the crate names.

The old implementation assumed that we always have a top level crate,
which cannot be assumed in general. We now reverse the path and try
striping everything including `src`. Afterwards we assume that the
directory on top of that is the parent crate name. That's still hacky,
but works for our use-case. For a better solution we would query
cargo-metadata for informations and then use that to resolve the crate names.
@weiznich weiznich self-assigned this Nov 19, 2024
@SwishSwushPow SwishSwushPow merged commit 00a0669 into main Nov 21, 2024
2 checks passed
@SwishSwushPow SwishSwushPow deleted the fix/crate_name_inference branch November 21, 2024 09:08
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.

2 participants