Open alexfmpe opened 5 years ago
Is ob run
perhaps just not showing the Setup errors here? I would expect it actually hits them just as any cabal
command would.
Seems like this now leads to an infinite reload cycle
, mtl
, text
+ default-extensions:
+ x
exposed-modules:
(...)
Reloading...
/run/user/1000/ghc24799_0/ghc_35.hspp
/run/user/1000/ghc24799_0/ghc_40.hspp:1:14: error:
Cannot parse LANGUAGE pragma
Expecting comma-separated list of language options,
each starting with a capital letter
E.g. {-# LANGUAGE TemplateHaskell, GADTs #-}
|
1 | {-# LANGUAGE x #-}
| ^
Reloading...
/run/user/1000/ghc24799_0/ghc_40.hspp
/run/user/1000/ghc24799_0/ghc_45.hspp:1:14: error:
Cannot parse LANGUAGE pragma
Expecting comma-separated list of language options,
each starting with a capital letter
E.g. {-# LANGUAGE TemplateHaskell, GADTs #-}
|
1 | {-# LANGUAGE x #-}
| ^
Reloading...
/run/user/1000/ghc24799_0/ghc_45.hspp
(...)
@alexfmpe Any idea how we can fix this issue? I can reproduce the issue as per your comment above, the infinite reload cycle still exists...
We inject cabal extensions in their package modules so that multiple packages can exist in ob run
even though ghci itself doesn't distinguish packages and would just mash all extensions together.
It looks like we also do this with unknown extensions
https://github.com/obsidiansystems/obelisk/blob/master/lib/command/src/Obelisk/Command/Preprocessor.hs#L81 which is why the LANGUAGE x
ends up in source.
I don't see why that would trigger an infinite cycle though. Looking at the weird .hspp
filenames I wonder if there's some sanity checking happening after the preprocessor runs but before it's combined with normal source
I'm also not sure if we should let unknown extensions through. Even without the inifinite cycle it seems like a typo there would lead to a confusing error message
Adding a non-existent extension (e.g. typo) to
default-extensions
makes it so that only module extensions are active. For instance, starting with the obelisk skeletoncauses
ob run
to error withThe error only becomes apparent when
nix-build -A ghc.common
fails withbecause the British spelling is only available on 8.6.