Gs/fix servant asset serve dir redirect - #5
Open
augyg wants to merge 3 commits into
Open
Conversation
Re-enable multi-repl: True in skeleton/cabal.project. The prior disable comment blamed a GHC 9.14 "LinkInMemory" panic; the real trigger is buildable unit files with no exposed-modules of their own (only reexported-modules or similar). GHC's multi-repl driver routes empty units through Pipeline.hs's LinkInMemory path even when the interpreter is enabled, and panics. See GHC issues #25366 and #26073. frontend-wasm and frontend-js were the offenders: both only reexport Frontend, no own exposed-modules. Added a one-line Placeholder module + hs-source-dirs to each so the unit files have at least one target. cabal repl --enable-multi-repl now loads 20 modules across common + frontend + backend + landing-page + frontend-wasm in one GHCi session on GHC 9.14.1.
serveStaticDir was using Snap.serveDirectory for static asset dirs, which does trailing-slash canonicalization on directory-shaped paths. Every hashed-asset entry (produced by jenga-asset-manifest) is a directory containing type/target/encodings metadata files, so requests like /ghcjs/all.js got 302'd to /ghcjs/all.js/ and then fell through to the SPA HTML — the browser tried to parse HTML as JS and errored. Swap to Jenga.Asset.Serve.Snap.serveAssets, which reads the type file, follows the target redirect to the hashed filename, and serves with proper caching + encoding negotiation. Matches obelisk-v1's serveStaticAssets shape. Verified end-to-end on a NixOS VBox deploy: /ghcjs/all.js now returns 302 -> hashed target -> 200 text/javascript with immutable caching, and the reflex-dom frontend actually loads.
The obelisk-oauth-common.cabal had `extra-source-files: CHANGELOG.md` referencing a file that never existed in the common/ subdir at any rev. Older cabal / haskell.nix silently ignored the missing file; newer haskell.nix errors with Cabal-6661 during plan generation, breaking any `jenga deploy push` invocation that touches this dep. Fix committed upstream on gs/jenga-port; bumping submodule to pick it up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have:
developbranchhlint .(lint found code you did not write can be left alone)$(nix-build -A selftest --no-out-link)nix-build release.nix -A build.x86_64-linux --no-out-link(orx86_64-darwinon macOS)