-
Notifications
You must be signed in to change notification settings - Fork 121
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
"Task not found" with workspace AND "root package" #644
Comments
@tower120 thanks for reporting. |
@tower120 I just pushed a fix in the dev branch 0.35.11 and would love your feedback. can you try it out and tell if it works well? |
I'm unfamiliar with compiler crates. How can I build/apply it? |
you can look at this explanation https://doc.rust-lang.org/cargo/commands/cargo-install.html#synopsis |
Looks like the same error with project attached in issue. |
meaning its ignoring the 'root' package? can you show me the output please? |
|
Maybe my cargo-make not updated, because git's xxxx.11 is marked as xxxx.10 inside Crate.toml? |
I only update the version when i publish so thats ok. |
I just downloaded issue attachment and tried with it, to double check. It is the same error I just wrote. |
|
ok that should be set since you want in the member to access a task that is defined in the root. right? |
I think no - since I don't want member tasks to be build through |
Or that was not the question? I just looked at doc - it looked like I didn't need |
let me explain a bit. i just took your example, uncommented that env var comment and made it used and it worked well. |
I did
Doesn't that install compiled git version? I uncommented CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE - I still have the same error as above. |
@tower120 here is what i did. can you please check it and compare with your test?
cargo install --git https://github.com/sagiegurari/cargo-make.git --branch 0.35.11
mkdir -p ./tasknotfound
cd ./tasknotfound
wget https://github.com/sagiegurari/cargo-make/files/8484155/cargo_make_test.zip
unzip ./cargo_make_test.zip
cd ./cargo_make_test
output: cargo make build-test-1
[cargo-make] INFO - cargo make 0.35.10
[cargo-make] INFO - Project: cargo_make_test
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: build-test-1
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: workspace
/workspace/misc-test/tasknotfound/cargo_make_test
[cargo-make][1] INFO - Project: crate1
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: build-test-1
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
[cargo-make][1] INFO - Running Task: build-test-1
Compiling crate1 v0.1.0 (/workspace/misc-test/tasknotfound/cargo_make_test/crates/crate1)
error[E0463]: can't find crate for `std`
|
= note: the `x86_64-pc-windows-msvc` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-pc-windows-msvc`
For more information about this error, try `rustc --explain E0463`.
error: could not compile `crate1` due to previous error
[cargo-make][1] ERROR - Error while executing command, exit code: 101
[cargo-make][1] WARN - Build Failed.
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 4 - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
[tasks.echo]
command = "echo"
args = ["current member: ${CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER}"] The output was: cargo make echo
[cargo-make] INFO - cargo make 0.35.10
[cargo-make] INFO - Project: cargo_make_test
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: echo
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: workspace
/workspace/misc-test/tasknotfound/cargo_make_test
[cargo-make][1] INFO - Project: crate1
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: echo
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
[cargo-make][1] INFO - Execute Command: "echo" "current member: crate1"
current member: crate1
[cargo-make][1] INFO - Build Done in 0.20 seconds.
[cargo-make][1] INFO - Project: cargo_make_test
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: echo
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
[cargo-make][1] INFO - Execute Command: "echo" "current member: ."
current member: .
[cargo-make][1] INFO - Build Done in 0.21 seconds.
[cargo-make] INFO - Build Done in 0.79 seconds. as you can see both member '.' (root) and crate1 were invoked. |
Looks like you repeat my steps, but result is different on my local machine. Could you increase crate version number in dev branch? I have filling that somehow crates.io version is still in use. |
@tower120 you can fork that branch to you and update it and than install it from your fork. |
I tried to increase version and install. Still no luck. |
try to use 'which' to see which cargo-make executable is used and see where cargo install pushes it. maybe its different places |
How? I'm on Windows. For example:
|
oh, windows :). so try to delete it, and run it and see if it fails (it should). then install again. |
Unistalled then installed. No effect - still |
so maybe i got a bug on windows? |
Just FYI - I already migrated to powershell script. |
ok, something is strange to me here... |
per the spec, in order to bevy_test to be considered workspace root, it must have the [workspace] tag |
Damn, sorry. I tried that with a wrong project. |
great news. i was worried I got more 'windows' specific issues since i don't have windows to try it on..... so happy its resolved. |
@tower120 this is now officially released. |
Great! Thanks! |
In crate with workspace AND "root package":
cargo make build
/test/etc. ignores "root package"cargo make 'task_name'
(without CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE) results in "Task not found". Adding CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE ignores "root package".Basic
cargo build
/test works fine.See attachment.
The text was updated successfully, but these errors were encountered: