Skip to content

Replace wai-session with dedicated forked packages - #2582

Merged
mpscholten merged 1 commit into
masterfrom
feature/wai-session-packages
Mar 24, 2026
Merged

Replace wai-session with dedicated forked packages#2582
mpscholten merged 1 commit into
masterfrom
feature/wai-session-packages

Conversation

@mpscholten

Copy link
Copy Markdown
Member

Summary

  • Replaces wai-session (last release 2018) with wai-session-maybe — module Network.Wai.Session.Maybe
  • Replaces wai-session-clientsession (last release 2012) with wai-session-clientsession-deferred — module Network.Wai.Session.ClientSession.Deferred
  • Removes the Nix overlay patches that were applying upstream PRs (#17, #5)

The upstream packages are unmaintained and IHP's patches change the SessionStore type in a backwards-incompatible way (IO ByteStringIO (Maybe ByteString)). Publishing as separate packages with distinct module names avoids carrying Nix patches and allows coexistence with the original packages in dependency trees.

Test plan

  • ghci type check passes (105 modules loaded)
  • IHP tests pass (470 examples, 0 failures)
  • ihp-ide tests pass (396 examples, 0 failures)
  • CI (nix flake check --impure)

🤖 Generated with Claude Code

Switch from patched upstream packages to dedicated forks:
- wai-session -> wai-session-maybe (Network.Wai.Session.Maybe)
- wai-session-clientsession -> wai-session-clientsession-deferred (Network.Wai.Session.ClientSession.Deferred)

The upstream packages are unmaintained (last releases 2018/2012) and IHP's
patches change the SessionStore type in a backwards-incompatible way
(IO ByteString -> IO (Maybe ByteString)). Publishing as separate packages
avoids carrying Nix overlay patches and allows coexistence with the
original packages in dependency trees.

Repos:
- https://github.com/digitallyinduced/wai-session-maybe
- https://github.com/digitallyinduced/wai-session-clientsession-deferred

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions

Copy link
Copy Markdown

Core Size & Compile Allocations Benchmark

Metric Baseline (master) This PR Change
Core size 16060452 bytes 16062814 bytes 0.0%
Compile allocations 40139491984 bytes 40136824160 bytes -0.0%

Core size within threshold
Compile allocations within threshold

HTTP Latency (GET /, 200 runs)

Metric Baseline (master) This PR Change
Mean 12.35ms 12.29ms -0.5%
Median 11.38ms 11.60ms
Stddev 3.48ms 2.81ms
Min 7.78ms 9.10ms
Max 27.91ms 25.73ms

HTTP latency within threshold

Top 10 modules (this PR)

Module Size (bytes)
Web.Controller.Comments.thr 893309
Web.Controller.Threads.thr 860964
Web.Controller.Users.thr 821358
Admin.Controller.Admins.thr 654438
Admin.Controller.UserBadges.thr 587771
Web.FrontController.thr 562385
Web.Types.thr 547347
Web.View.Layout.thr 472430
Web.View.Threads.Show.thr 428465
Web.Routes.thr 423681

@mpscholten
mpscholten merged commit 6979866 into master Mar 24, 2026
2 checks passed
@mpscholten
mpscholten deleted the feature/wai-session-packages branch March 24, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant