Open-CMSIS-Pack / cmsis-toolbox

CMSIS-Toolbox
https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/README.md#cmsis-toolbox
Apache License 2.0
67 stars 20 forks source link

[Bug]: csolution list configs command crashes under macOS and Windows on Arm64 #188

Open KeilChris opened 2 weeks ago

KeilChris commented 2 weeks ago

Is there an existing issue for this?

Current Behavior

Please check the attached project. I opened it in VS Code on macOS and Windows on Arm64. I did a cbuild setup MyName.csolution.yml --context-set --context MyName.Debug+A31G112 --packs --update-rte and afterwards a csolution list configs The tool cashes on both operating systems. csolutionCrash.zip

Expected Behavior

It should list something and not crash.

Steps To Reproduce

See above

Affected tools

Affected operating systems

Environment

macOS 15.0.1 and Windows 11 in a Parallels VM on macOS.

jkrech commented 2 weeks ago

Just for the sake of clarity: You are neither specifying the csolution.yml file nor a context or context-set for listing the configs: I had expected something like:

  csolution list configs MyName.csolution.yml [--context-set]

Would that command "crash" for you as well?

On windows I get:

csolutionCrash>csolution list configs

csolutionCrash>echo %ERRORLEVEL%
-1073741819

which does not right.

However when I run:

csolutionCrash>csolution list configs MyName.csolution.yml -S
csolutionCrash/MyName.cbuild-set.yml - info csolution: file is already up-to-date
../RTE/Device/A31G112/A31G11x.h@1.0.0 (up to date) from ABOV::Device:Startup@1.0.0
../RTE/Device/A31G112/option_A31G11x.s@1.0.0 (up to date) from ABOV::Device:Startup@1.0.0
../RTE/Device/A31G112/startup_A31G11x.s@1.0.0 (up to date) from ABOV::Device:Startup@1.0.0
../RTE/Device/A31G112/system_A31G11x.c@1.0.0 (up to date) from ABOV::Device:Startup@1.0.0
../RTE/Device/A31G112/system_A31G11x.h@1.0.0 (up to date) from ABOV::Device:Startup@1.0.0

In my opinion the command line parser must throw an error if no *.csolution.yml is specified and the usage/help must make *.csolution.yml mandatory.

KeilChris commented 2 weeks ago

I tried your proposal, and it works. I was just using the "short form" as I read it in the documentation (I will fix that). Still, as you say, it should throw an error and not crash silently.