Hi everyone,
I have features like sokol defined in my .nimble file (as shown below), and I need to know how to enable the sokol feature when executing nimble test:
feature "sokol":
requires "sokol >= 0.6.0"
feature "opengl":
requires "opengl >= 1.2.9"
feature "dev":
requires "sdl2 >= 2.0.5"
Are there specific flags or syntax for enabling features during nimble test? Any official docs on this would also be greatly appreciated. Thanks!
https://nim-lang.github.io/nimble/create-packages.html#features-experimental
An implicit feature, dev, is always activated when developing a package. It is useful for requiring development-specific dependencies.
The example given is for testing.
HTHs
Thanks a lot for the tip!
The dev feature does pull in the sokol dependency, but it doesn’t activate the feature.nvg.sokol flag.
As a workaround, I’m planning to manually define this symbol for my test runs.
# when feature is activated
when defined(feature.nvg.sokol):
import sokol
# workaround, manually define this symbol
> nimble --parser:declarative -d:feature.nvg.sokol test