Odin icon indicating copy to clipboard operation
Odin copied to clipboard

`-vet-packages` Must Be Before `-vet-unused-procedures`

Open dozn opened this issue 1 year ago • 2 comments

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

dozn avatar Oct 01 '24 18:10 dozn

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.

gingerBill avatar Oct 02 '24 14:10 gingerBill

Would it be possible to fix the message for now, since it's incorrect either way? Something like:

There must be a -vet-packages flag before the -vet-unused-procedures flag.

which covers both cases (missing flag and incorrect order).

dozn avatar Oct 02 '24 16:10 dozn

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.

Feoramund avatar May 23 '25 10:05 Feoramund