Skip to content

#+vet tags nullify command line build -vet parameters #6067

@BigBoyBarney

Description

@BigBoyBarney

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Odin: dev-2025-12
OS: Debian GNU/Linux forky/sid, Linux 6.17.8-300.fc43.x86_64
CPU: AMD Ryzen 7 5800X3D 8-Core Processor
RAM: 32004 MiB
Backend: LLVM 19.1.7

The following code snippet illustrates the issue:

package main

main :: proc() {
	x: int
}
  • If we run odin check . on this, or odin build, this builds just fine.
  • If we run odin check . -vet, it errors, with 'x' declared but not used as expected.
  • If we add any #+vet to the top of the file, the error is ignored:
#+vet cast
package main

main :: proc() {
	x: int
}

odin check . -vet and odin build -vet show no error and build just fine, even though it should error.

The main case where this is an issue is #+vet explicit-allocators, which must be a file flag. So it effectively means that #+vet explicit-allocators disables every other form of vetting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions