sagiegurari / cargo-make

Rust task runner and build tool.
https://sagiegurari.github.io/cargo-make/
Apache License 2.0
2.53k stars 124 forks source link

Minor: Integration into conda environment #1119

Closed MementoRC closed 1 month ago

MementoRC commented 1 month ago

Describe The Bug

We have a conda-forge recipe for cargo-make: https://github.com/conda-forge/cargo-make-feedstock The latest update broke one of the simplistic tests we performed on the built package: cargo-make --help (makers --help sitll works) for every releases. For now we have commentted out the test to continue provide the up-to-date package. It would be great if you could confirm that the behavior is discontinued, or could suggest a simple test to validate the correct behavior of cargo-make within the conda environment

To Reproduce

cargo-make --help

Error Stack

+ cargo-make -h
`cliparser::types::ParserError` error. InvalidCommandLine("Command does not match spec, command line: [\"cargo-make\", \"-h\"]")
exit code 731
MementoRC commented 1 month ago

If you wish to be added to the list of maintainer, please submit an issue: https://github.com/conda-forge/cargo-make-feedstock/issues/new?assignees=&labels=&projects=&template=2-bot-commands.yml with: @conda-forge-admin, please add user @sagiegurari

sagiegurari commented 1 month ago

thanks for reporting. my guess its related to #1112 by @SamuelMarks if he can solve it, amazing. if not, unfortunately I won't have availability for coming 2 weeks :( and than I'll be able to check it out.

SamuelMarks commented 1 month ago

Yes I'll take a look at the --version and --help flags when I get back (getting ☕ now)


Update 0: it breaks here https://github.com/sagiegurari/cliparser/blob/e8f2bfb/src/parser.rs#L169

Might need to send that project of yours a PR


Update 1: Sent through this simple change, tell me if it resolves your issue @MementoRC https://github.com/sagiegurari/cliparser/pull/3


Update 2: Actually @MementoRC now that my #1120 is merged everything might work, try pointing to cargo-make@master


Update 3: Hmmm

$ makers --version
cargo-make 0.37.14
$ cargo make --version
cargo-make 0.37.14
$ cargo-make --version
`cliparser::types::ParserError` error. InvalidCommandLine("Command does not match spec, command line: [\"cargo-make\", \"--version\"]")
exit code 731
MementoRC commented 1 month ago

Thanks for the updates. conda-forge recipe builds on top of official releases or tags and we allowed the latest version to go live based upon your initial response. We will revisit at the next release

sagiegurari commented 1 month ago

@MementoRC sorry didn't have a computer available for a while. going back to this it seems odd it ever worked for you. probably some bug.

there are 3 ways to run cargo make

  1. makers
  2. cargo make
  3. cargo-make make # this one basically because how 'cargo' works

its strange it worked differently. 2 and 3 are for cargo integration so its always a sub command while the first is standalone so it doesn't need the 'extra' make sub command.

can you change the test to: cargo-make make -h instead?

MementoRC commented 1 month ago

Ok, I will try it with the new release

MementoRC commented 1 month ago

All good. Released. Thank you