You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasted precious minutes trying to debug what's wrong when I made a mistake in defining and using a flag. The mistake I made was to put a ':' in the flag stanza of the cabal file, like this:
flag native:
When I ran stack build --flag unicode-transforms:native it just said:
These flags are used without having been defined: native
This is likely to be a cabal issue.
But what's strange is that with this mistake stack allows me to put any random name as a package name in stack.yaml flags section and on the command line flag spec without noticing anything wrong. E.g.
cueball:/vol/hosts/cueball/workspace/projects/unicode-transforms$ cat stack.yaml
flags:
hahaha:
native: true
extra-package-dbs: []
packages:
- '.'
extra-deps:
- data-list-sequences-0.1
resolver: lts-5.8
cueball:/vol/hosts/cueball/workspace/projects/unicode-transforms$ stack build --flag xxx:native
These flags are used without having been defined: native
The text was updated successfully, but these errors were encountered:
mgsloan@computer:~/fpco/test-stack/issue1995/unicode-transforms$ stack build --flag hrrm:native
Invalid flag specification:
- Package 'hrrm' not found (specified on command line)
- Package 'hahaha' not found (specified in stack.yaml)
I wasted precious minutes trying to debug what's wrong when I made a mistake in defining and using a flag. The mistake I made was to put a ':' in the flag stanza of the cabal file, like this:
flag native:
When I ran stack
build --flag unicode-transforms:native
it just said:These flags are used without having been defined: native
This is likely to be a cabal issue.
But what's strange is that with this mistake stack allows me to put any random name as a package name in stack.yaml flags section and on the command line flag spec without noticing anything wrong. E.g.
The text was updated successfully, but these errors were encountered: