-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
v.pref: error for v file.v --unknown-option
#21391
Conversation
I agree that not reporting an error for
|
Testing on your branch, shows that it behaves differently than your demonstration:
... which is nice. |
wow a response, and yeah, it is acting different, my bad. ok give me a bit to work on this, I might have to retitle this issue. |
Personally, I would like for it to warn about options after the filename. This is one way It can be a bit confusing to new users as to why it is ok to have |
yes I agree. that is why I want this worked out. I realized what I was doing. doing a double dash I want to make some statements, and we can discuss, before I start making any changes $ ./v -o hello-skip.c -skip-unused examples/hello_world.v
$ ./v -o hello-maybe-skip.c examples/hello_world.v -skip-unused
$ ./v -o hello-wont-skip.c examples/hello_world.v --skip-unused
$ ./v -o nothing.c --skip-unused examples/hello_world.v
Unknown argument `--skip-unused`
$ diff -q hello-skip.c hello-maybe-skip.c
$ diff -q hello-skip.c hello-wont-skip.c
Files hello-skip.c and hello-wont-skip.c differ |
(rebased over master and resolved conflicts) |
… behaviour for `v file.vsh -some -options`
v file.v --unknown-option
(rebased again, since master had an unrelated error, that is now fixed) |
@spytheman The PR unfortunately comes with a regression. It might the reason for #21621 It's not possible to run some V commands with flags anymore. E.g. if there is directory with the name of the command, like having a
|
Describe the Problem
Compiling a single code file with flags does not give a warning, and continues the compile.
This will work on real or fake flags
This does not look nice and could cause unknown usage.
Show the Change
This change reports an error and exits as such. It will report the same error if the argument is valid or not, but it is clear what the problem is.