-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validation for valid fields in script metadata blocks #8024
Comments
Is |
I'd also like to have |
It would be great if the project meta data can support package configurations, in order to support non-hackage dependencies including local ones. (coming from #9084) |
We still have to run the build script with GHC 9.4, since we need to override `dhall`, and can't override `source-repository-package` for scripts (haskell/cabal#8562, haskell/cabal#8024 (comment)).
The problem is bigger than that: While these changes are a step in the right direction, in the short term it's been a big regression that we can no longer sensibly override dependencies. I've honestly considered publishing some of my temporary forks to Hackage because of this, and that's not behaviour we want to encourage! Is supporting |
My suspicion is that this is a matter of some flag plumbing, and not a huge conceptual obstacle. |
FWIW, passing |
The
{- cabal: ... -}
and{- project: ... -}
(with #7997) blocks of a script parse of full the fullexecutable
grammar andcabal.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 scriptsExecutable 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-packageProject 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:
The text was updated successfully, but these errors were encountered: