-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve development workflow (ghcid
with jsaddle-warp
)
#1323
Conversation
GHC 9.10 doesn't work on Linux due to an incompatibility in the file watching library: haskell-fswatch/hinotify#38. Signed-off-by: George Thomas <[email protected]>
Signed-off-by: George Thomas <[email protected]>
This has been broken since we split in to separate executable and library components. Cabal defaults to the library in the case of ambiguity, and the `primer-miso` library doesn't contain a `main`. Signed-off-by: George Thomas <[email protected]>
Signed-off-by: George Thomas <[email protected]>
The old version was actually fairly useless, since the executable component barely contained any interesting code. Signed-off-by: George Thomas <[email protected]>
@@ -4,5 +4,11 @@ | |||
|
|||
include ../makefiles/common.mk | |||
|
|||
# TODO The last line here shouldn't be necessary. | |||
# For some reason, GHCID is failing to discover the right paths to watch. |
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 tried to look in to why we need to manually specify the paths. I think it's to do with using multiple components, but I still couldn't reproduce the issue in a simpler project. Anyway, I'd prefer to move to Ghciwatch eventually, but it doesn't yet support multiple components at all: MercuryTechnologies/ghciwatch#316.
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.
Also, I considered adding lib:primer
and --reload ../primer/src
, in order to also pick up changes to the core library. But this brings the minimum reload time from about 0.5s on my machine to around 3s, even when the only changes are in the frontend components.
Without any of these issues, the command could be as simple as ghcid -c "cabal repl all" -Wr --reload frontend/style.css
.
Is
|
On a related note, I tried to unify the shells so that we only need one, as I understand it's a bit of a pain, but until |
It's actually the former. This workflow doesn't use Wasm at all.
I suspect you've got a |
I did remove For whatever reason, I did have one lying around. I deleted that and ran
I ran Anyway, I am able to load the editor in the browser now, which is cool! I guess this means we can have native Primer in the browser, as well as Wasm? |
Hmm. I don't know how to explain that. I didn't have to do it, but then I regularly use a non-Nix Haskell toolchain anyway and regularly update my index.
That's odd as well, given that it looks like GHCI has crashed. Plus it's not clear why it's crashed. What happens when you just run
Sort of. With |
Sorry, I see that my earlier comment was confusing. The error message I showed is what I got before I ran
Yeah, it's never exactly been clear to me how this part of the stack works, either. In any case, what I meant by "native Primer in the browser" is that we can run the native executable (at native speeds), but interact with it in the browser, and we don't need a JS/TS frontend. |
Property test failure with interpreter. May be worth recording. |
Yeah, this is a common failure: #1240 I'll merge manually. |
@dhess Can you let me know whether
make develop-frontend
works for you? I think I've solved all the issues from #1304 (comment), but I haven't tested on MacOS.