-
Notifications
You must be signed in to change notification settings - Fork 197
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
fix non-GHCJS compilation #1566
base: master
Are you sure you want to change the base?
Conversation
cabal.project
Outdated
@@ -10,3 +10,6 @@ packages: | |||
codeworld-server/ | |||
codeworld-base/ | |||
funblocks-client/ | |||
|
|||
constraints: | |||
ghcjs-dom ==0.9.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really go in the cabal file (presumably in codeworld-api/codeworld-api.cabal
) rather than here. To be honest, I'm a little surprised that there's a cabal.project file checked in. That seems wrong...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea; moved to funblocks-client.cabal
.
Regarding the cabal.project
file, I know the primary way to build CodeWorld is with the scripts provided; needed for GHC patches, etc. IMO the cabal.project
file is useful nonetheless. For one, I'm trying to get the whole project building with Nix #1523 and cabal.project
is needed for that (if using https://github.com/input-output-hk/haskell.nix).
cabal.project
Outdated
@@ -10,3 +10,6 @@ packages: | |||
codeworld-server/ | |||
codeworld-base/ | |||
funblocks-client/ | |||
|
|||
constraints: | |||
haskell-src-meta ==0.8.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this can go anywhere else, because it is a transient dependency.
haskell-src-meta
is only used directly by codeworld-available-pkgs
, which is not in this cabal.project
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think reflex
fails to build with haskell-src-meta-0.8.8
, but only as a dependency of CodeWorld. I can't reproduce the error in reflex
by itself.
The transitive dependency is here
https://github.com/peterbecich/reflex/blob/823afd9424234cbe0134051f09a6710e54509cec/reflex.cabal#L183-L189
cabal build all --flags="use-template-haskell"
succeeds with haskell-src-meta-0.8.8
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll try to reproduce the failure and understand what's going on. If this is the case, though, I still think the constraint should be added in codeworld-api.cabal
By adding it in cabal.project
, you make builds initially appear to succeed, but then the codeworld-api
that gets deployed to hackage may still fail to build for actual users. Honestly, I'd rather know that it's broken than make it appear to work in development and then break when deployed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the error with haskell-src-meta-0.8.8
:
src/Language/Haskell/Meta/Syntax/Translate.hs:493:19: error:
Not in scope: data constructor ‘Exts.DerivVia’
Perhaps you meant ‘Exts.Deriving’ (imported from Language.Haskell.Exts.Syntax)
Module ‘Language.Haskell.Exts.Syntax’ does not export ‘DerivVia’.
|
493 | toDerivStrategy [email protected]{} = noTHyet "toDerivStrategy" "2.14" d
| ^^^^^^^^^^^^^
cabal: Failed to build haskell-src-meta-0.8.8 (which is required by
test:unit-tests from codeworld-api-0.7.0, exe:codeworld-game-bot from
codeworld-game-server-0.1 and others). See the build log above for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will solve it: haskell-party/haskell-src-meta#32
872426c
to
9631a55
Compare
haskell-party/haskell-src-meta#32 published to Hackage
needed to build `haskell-src-meta-0.8.8`
`regex-tdfa-text` included now https://hackage.haskell.org/package/regex-tdfa-1.3.1.0/docs/Text-Regex-TDFA-Text.html
With GHC 8.6.5 this succeeds locally for me: