Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/github-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
substituters = https://cache.iog.io/ https://cache.nixos.org/

- uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#ghc914
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
devShell: .#ghc914
devShell: .#haddock

Could we use haddock name for the haddock shell? It'll be a tad more maintainable in case ghc version changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a point in that, if you change the ghc version for that shell, then the pages ci action is going to break silently. But I don't think changing the name to haddock is a good idea because it kind of suggests the dev shell includes the haddock, which it doesn't.

More arguments against the suggested change:

  • It follows the pattern of the existing "stable" shell, which is called ".#ghc967"
  • It doesn't have to be exclusive to haddock generation, it is a normal ghc914 shell that could be used for anything really.
  • The comment close to where it is defined makes it already explains it is used for haddock generation.

I was initially considering naming the variable something like latest or unstable instead of haddock, but I was afraid that wasn't accurate enough.


- name: Update cabal indices
run: |
Expand Down
15 changes: 11 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
defaultCompiler = "ghc9122";
# Used for cross compilation for windows.
crossCompilerVersion = defaultCompiler;
# Used for haddock generation (avoids GHC 9.12 tyConStupidTheta panic)
haddockCompiler = "ghc914";
in
inputs.flake-utils.lib.eachSystem supportedSystems (
system: let
Expand Down Expand Up @@ -226,7 +228,11 @@
# TODO remove this module when removing proto-lens SRP
# Override proto-lens source to use fixed symlinks (inputMap provides the fixed
# source for plan computation; this module provides it for the build phase)
({lib, config, ...}: let
({
lib,
config,
...
}: let
protoLensPackages = [
"proto-lens"
"proto-lens-arbitrary"
Expand All @@ -242,9 +248,10 @@
"proto-lens-benchmarks"
];
in {
packages = lib.genAttrs
packages =
lib.genAttrs
(builtins.filter (p: config.packages ? ${p}) protoLensPackages)
(p: { src = lib.mkForce (fixProtoLensSrc + "/${p}"); });
(p: {src = lib.mkForce (fixProtoLensSrc + "/${p}");});
})
({...}: {
packages.cardano-api = {
Expand Down Expand Up @@ -306,7 +313,7 @@
then defaultCompiler
else stableCompiler;
in
lib.genAttrs [osDependentStableCompiler crossCompilerVersion] (compiler-nix-name: {
lib.genAttrs [osDependentStableCompiler crossCompilerVersion haddockCompiler] (compiler-nix-name: {
Comment thread
palas marked this conversation as resolved.
inherit compiler-nix-name;
});
}
Expand Down
Loading