-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Fix sdist build for optional path dependencies #1084
Conversation
✅ Deploy Preview for maturin-guide canceled.
|
db6a1df
to
15f6b3e
Compare
15f6b3e
to
21ab189
Compare
This does not work actually, build from sdist fails $ cargo build
error: failed to load manifest for dependency `polars`
Caused by:
failed to load manifest for dependency `polars-algo`
Caused by:
failed to read `/Users/messense/Projects/maturin/dist/polars-0.14.9/local_dependencies/polars/polars-algo/Cargo.toml`
Caused by:
No such file or directory (os error 2) |
// Cargo.toml contains relative paths, and we're already in LOCAL_DEPENDENCIES_FOLDER | ||
toml_edit::value(format!("../{}", dep_name)) | ||
}; | ||
rewritten = true; | ||
if !known_path_deps.contains_key(&dep_name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of #1084 (comment), I think we need to somehow add the optional path deps to known_path_deps
even if they're not activated by Cargo features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately there isn't enough metadata:
"dependencies": [
{
"name": "polars-algo",
"source": null,
"req": "^0.23.0",
"kind": null,
"rename": null,
"optional": true,
"uses_default_features": true,
"features": [],
"target": null,
"registry": null,
"path": "/Users/messense/Projects/polars/polars/polars-algo"
}
]
and the optional polars-algo
dep isn't present at packages
, thus we can only get its name and path, but we also need it's id which is unavailable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reminds me of #720 (comment), we might be able to workaround this by using dependencies
instead of the structured dep
.
Co-authored-by: Maximilian Köhl <mail@koehlma.de>
fd2a4b3
to
eb909d5
Compare
Fixes #1083 by also bundling optional path dependencies.