Odin
Odin copied to clipboard
`-vet-packages` Must Be Before `-vet-unused-procedures`
Context
If you do odin run . -vet-unused-procedures -vet-packages:main, you will receive the error:
-vet-unused-procedures must be used with -vet-packages
It works correctly if you swap the flag order.
Expected Behavior
Allowed, since flag order shouldn't matter.
Odin: dev-2024-10:af9ae4897 OS: Windows 11 Professional (version: 23H2), build 22631.4169 CPU: AMD Ryzen 7 3700X 8-Core Processor RAM: 65489 MiB Backend: LLVM 18.1.8
This is less of a bug, but just because of how the evaluation of the thing works.
I can make it work, but sometimes flag order SHOULD matter. I am not sure if this is one of those cases or not.
Would it be possible to fix the message for now, since it's incorrect either way? Something like:
There must be a
-vet-packagesflag before the-vet-unused-proceduresflag.
which covers both cases (missing flag and incorrect order).
The documentation is unclear on how -vet-packages is supposed to be used without -vet-unused-procedures. It says it can be used or on a per file with +vet tags but currently it just fails no matter what unless -vet-packages is passed. Having a list of what a +vet tag is in the help would be a good idea too.