Open
Description
The {- cabal: ... -}
and {- project: ... -}
(with #7997) blocks of a script parse of full the full executable
grammar and cabal.project
grammar respectively, regardless of whether such fields make sense. Also many fields are broken because using fake-package (see #6977) means that the directory the script project file is relative to is not the same as the directory the script is actually in.
Script specific validation should be added for these blocks.
Executable fields that should warn:
main-is
this will be overridden to be the scriptscope
is meaningless for a script, but I don't think it actually breaks anything if setinstall-includes:
install is not supported for scripts
Executable fields that don't work as expected with relative paths because of fake-package:
other-modules
hs-source-dirs:
includes:
include-dirs:
c-sources:
cxx-sources:
asm-sources:
cmm-sources:
js-sources:
extra-lib-dirs:
extra-framework-dirs:
Project fields that should warn:
run-tests:
scripts can't specify testswrite-ghc-environment-files:
gets put in/is relative to wrong directory because of fake-package
Project fields that don't work as expected with relative paths because of fake-package:
packages:
optional-packages:
extra-prog-path:
extra-include-dirs:
extra-lib-dirs:
extra-framework-dirs:
remote-repo-cache:
logs-dir: