Closed makspll closed 6 months ago
I think this is an issue of us not properly resolving workspaces, so we don't grab the correct paths.
failed to read `/bevy_mod_scripting/Cargo.toml`
looks very wrong.
This was supposed to be fixed with https://github.com/cross-rs/cross/pull/684 but I think an assumption done there has been broken.
Should be fixed with #939, can you reproduce the issue with cross installed from the main branch?
https://github.com/makspll/bevy_mod_scripting/blame/10dcca992a5bdcd172b293e54a3f6dcdbbd848f2/crates/languages/bevy_mod_scripting_lua_derive/Cargo.toml#L26 this is the reason I think. Try using workspace = true
here
Sorry, linked the wrong line, should be https://github.com/makspll/bevy_mod_scripting/blob/10dcca992a5bdcd172b293e54a3f6dcdbbd848f2/crates/languages/bevy_mod_scripting_lua_derive/Cargo.toml#L43
the problem is basically that you're traversing down to much, if anything it should be path = "../../.."
, fixing that line makes the project build for me on cross 0.2.5
So to summarize, cross 0.2.5 mounts the cargo workspace at /project
, the manifest at $workspace/crates/languages/bevy_mod_scripting_lua_derive/Cargo.toml
points to a folder that travels one folder outside the workspace, ../../../../bevy_mod_scripting
. The fourth ..
is /
meaning the path becomes /bevy_mod_scripting
which is not correct for how the workspace is mounted.
You can reproduce this issue without cross by renaming the repos folder to something else, here's me doing it on windows by renaming bevy_mod_scripting
to bevy_mod_scripting_renamed
error: failed to load manifest for workspace member `G:\workspace\bevy_mod_scripting_renamed\crates\bevy_script_api`
Caused by:
failed to load manifest for dependency `bevy_mod_scripting_lua_derive`
Caused by:
failed to load manifest for dependency `bevy_mod_scripting`
Caused by:
failed to read `G:\workspace\bevy_mod_scripting\Cargo.toml`
Caused by:
The system cannot find the path specified. (os error 3)
Oh good catch! I wonder why this doesn't break on a normal build?
Checklist
Describe your issue
Cross randomly stopped working in our CI at bevy_mod_scripting, as described here: https://github.com/houseabsolute/actions-rust-cross/issues/15
What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
0.2.5
Example
in root of the workspace at: https://github.com/makspll/bevy_mod_scripting
Causes:
Additional information / notes
No response