diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml index e8f0fdba954..34cb5ffc99a 100644 --- a/.github/workflows/github-page.yml +++ b/.github/workflows/github-page.yml @@ -1,6 +1,8 @@ name: "Haddock documentation" on: + workflow_dispatch: + pull_request: # TODO: remove push: branches: - master @@ -14,48 +16,52 @@ jobs: shell: bash steps: - - name: Install Nix - uses: cachix/install-nix-action@v18 + - uses: actions/checkout@v6 + + - uses: cachix/install-nix-action@v31 with: - # Use last stable nixos channel and the same nix as in channel: - nix_path: nixpkgs=channel:nixos-24.05 github_access_token: ${{ secrets.GITHUB_TOKEN }} extra_nix_config: | + accept-flake-config = true access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - experimental-features = nix-command flakes - allow-import-from-derivation = true - substituters = https://cache.nixos.org https://cache.iog.io - trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - - uses: actions/checkout@v4 + # GHC 9.14 avoids the tyConStupidTheta panic in GHC 9.6 haddock + - uses: rrbutani/use-nix-shell-action@v1 + with: + devShell: .#ghc914 - - name: Fetch nix cache and update cabal indices + - name: Update cabal indices run: | - nix develop --command \ - cabal update + cabal update - name: Build whole project run: | - nix develop --command \ - cabal build all + cabal build all - name: Build documentation run: | - nix develop --command \ - cabal haddock-project --local --output=./haddocks --internal --foreign-libraries + cabal haddock-project --local --output=./haddocks --internal --foreign-libraries - name: Compress haddocks run: | tar -czf haddocks.tgz -C haddocks . - name: Upload haddocks artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 if: ${{ always() }} continue-on-error: true with: name: haddocks path: ./haddocks.tgz + - name: Upload cabal logs + uses: actions/upload-artifact@v7 + if: failure() + continue-on-error: true + with: + name: cabal-haddock-logs + path: ~/.cache/cabal/logs/ + - name: Deploy documentation to gh-pages 🚀 if: github.ref == 'refs/heads/master' uses: peaceiris/actions-gh-pages@v4 diff --git a/.gitignore b/.gitignore index fa56a0bd882..872ffff5644 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,5 @@ cardano-tracer/cardano-tracer-test .idea/ .codex + +.serena diff --git a/cabal.project b/cabal.project index 7d699e8d362..05b7ae638de 100644 --- a/cabal.project +++ b/cabal.project @@ -87,6 +87,134 @@ allow-newer: , io-sim:time , io-classes:time +if impl(ghc >= 9.12) + allow-newer: + -- we need newer io-classes: https://github.com/input-output-hk/typed-protocols/tree/coot/io-classes-1.9 + , io-classes:time + , ouroboros-network:time + , nothunks:time + , network-mux:time + +-- cabal-allow-newer +if impl(ghc >= 9.14) + allow-newer: + , aeson:QuickCheck + , aeson:containers + , aeson:template-haskell + , aeson:time + , bin:QuickCheck + , bin:base + , binary:containers + , binary-orphans:base + , blockio:base + , blockio:io-classes + , boring:base + , bytestring-trie:base + , canonical-json:containers + , cardano-addresses:containers + , cardano-addresses:template-haskell + , cardano-diffusion:io-classes + , cardano-prelude:canonical-json + , cborg:base + , cborg:containers + , cborg-json:base + , compact:base + , config-ini:containers + , constraints:boring + , constraints-extras:template-haskell + , criterion:microstache + , data-elevator:base + , dec:base + , dependent-map:containers + , dictionary-sharing:containers + , diff-containers:base + , discrimination:ghc-bignum + , discrimination-ieee754:base + , fin:QuickCheck + , fin:base + , fin:universe-base + , fs-sim:QuickCheck + , ghc:binary + , ghc:time + , grapesy:base + , grapesy:containers + , grpc-spec:base + , grpc-spec:containers + , hedgehog-extras:base + , hedgehog-quickcheck:QuickCheck + , http-api-data:text-iso8601 + , indexed-traversable:base + , indexed-traversable:containers + , indexed-traversable-instances:base + , io-classes:base + , io-sim:io-classes + , lens-family:base + , lens-family:containers + , lens-family:lens-family-core + , lens-family-core:containers + , lsm-tree:base + , lsm-tree:cborg + , lsm-tree:containers + , lsm-tree:io-classes + , microstache:base + , microstache:containers + , network-mux:io-classes + , nonempty-vector:base + , ordered-containers:containers + , ouroboros-consensus:cborg + , ouroboros-consensus:fs-sim + , ouroboros-consensus:io-classes + , ouroboros-consensus:quickcheck-state-machine + , ouroboros-network:io-classes + , parsec:base + , plutus-core:dependent-map + , plutus-ledger-api:plutus-core + , proto-lens:base + , proto-lens:lens-family + , proto-lens-arbitrary:base + , proto-lens-discrimination:base + , proto-lens-optparse:base + , proto-lens-protobuf-types:base + , proto-lens-protoc:base + , proto-lens-protoc:ghc + , proto-lens-runtime:base + , proto-lens-setup:base + , quickcheck-instances:QuickCheck + , quickcheck-instances:array + , quickcheck-instances:base + , quickcheck-instances:containers + , quickcheck-instances:uuid-types + , quickcheck-state-machine:QuickCheck + , ral:QuickCheck + , ral:base + , ral:fin + , ral:indexed-traversable + , safe-wild-cards:template-haskell + , semialign:base + , semialign:containers + , serdoc-core:template-haskell + , serialise:base + , serialise:containers + , serialise:time + , text:array + , text:base + , text:template-haskell + , text-iso8601:time + , these:base + , time-compat:time + , trace-dispatcher:aeson + , tree-diff:QuickCheck + , tree-diff:base + , tree-diff:containers + , tree-diff:semialign + , tree-diff:time + , typed-protocols:io-classes + , universe-base:base + , universe-base:containers + , unix:time + , uuid-types:template-haskell + , with-utf8:base + -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. diff --git a/flake.lock b/flake.lock index 07c24c46639..d7ef013e553 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1777742585, - "narHash": "sha256-ZzXz2vOhqethlqPgBExPXEnKWvaTbidsIxh5MGv+pwE=", + "lastModified": 1779876270, + "narHash": "sha256-FA9E1EaQvPITpO/8weQyi7p3KHgyNb9GiwM6F96Aoeo=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "e8a483522ee73c8c9493ea6055553e5c2532e66b", + "rev": "cb63b6483a5d6ce36fb07815736315bd4408162e", "type": "github" }, "original": { @@ -50,23 +50,6 @@ "type": "github" } }, - "cabal-32": { - "flake": false, - "locked": { - "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", - "owner": "haskell", - "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", - "type": "github" - } - }, "cabal-34": { "flake": false, "locked": { @@ -224,11 +207,11 @@ "hackage-for-stackage": { "flake": false, "locked": { - "lastModified": 1762302430, - "narHash": "sha256-thtGuIGrodKEfZPh+Sv22m1BR2zxNQY8RCsGlBWroj4=", + "lastModified": 1779843318, + "narHash": "sha256-cWLBO9BgvuwTVOZXeftlJhxtcddmqizwd5rAX0Nz8oY=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "c5dc9e01d45948892915b5394f23986277fb0ccb", + "rev": "4560659e7993e2def37183f82391e923d754acc0", "type": "github" }, "original": { @@ -289,7 +272,6 @@ "haskellNix": { "inputs": { "HTTP": "HTTP", - "cabal-32": "cabal-32", "cabal-34": "cabal-34", "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", @@ -304,6 +286,7 @@ "hls-2.0": "hls-2.0", "hls-2.10": "hls-2.10", "hls-2.11": "hls-2.11", + "hls-2.12": "hls-2.12", "hls-2.2": "hls-2.2", "hls-2.3": "hls-2.3", "hls-2.4": "hls-2.4", @@ -322,16 +305,17 @@ "nixpkgs-2405": "nixpkgs-2405", "nixpkgs-2411": "nixpkgs-2411", "nixpkgs-2505": "nixpkgs-2505", + "nixpkgs-2511": "nixpkgs-2511", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1762315551, - "narHash": "sha256-7uaB/UpiFn/+gf7s5NMpSTTUv5Ws30DjsmmqZry+1cY=", + "lastModified": 1779845279, + "narHash": "sha256-oueOhF5SXd7aBVkrhCh5pZZsfrwWUiEDlbkA8eAHmoU=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "ef52c36b9835c77a255befe2a20075ba71e3bfab", + "rev": "12ece1db206e31f634215a52f0a55f4349831e0f", "type": "github" }, "original": { @@ -424,6 +408,23 @@ "type": "github" } }, + "hls-2.12": { + "flake": false, + "locked": { + "lastModified": 1758709460, + "narHash": "sha256-xkI8MIIVEVARskfWbGAgP5sHG/lyeKnkm0LIOJ19X5w=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "7d983de4fa7ff54369f6dd31444bdb9869aec83e", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.12.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hls-2.2": { "flake": false, "locked": { @@ -620,11 +621,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1755243078, - "narHash": "sha256-GLbl1YaohKdpzZVJFRdcI1O1oE3F3uBer4lFv3Yy0l8=", + "lastModified": 1775620557, + "narHash": "sha256-10x8/G0x3eR/++XRHPx4MBuqlnc6+N+ajIxXyLkG+nU=", "owner": "stable-haskell", "repo": "iserv-proxy", - "rev": "150605195cb7183a6fb7bed82f23fedf37c6f52a", + "rev": "3f7b2815307c20a0dfd816bdf4a39ab86af3e0d4", "type": "github" }, "original": { @@ -699,11 +700,11 @@ }, "nixpkgs-2411": { "locked": { - "lastModified": 1748037224, - "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", + "lastModified": 1751290243, + "narHash": "sha256-kNf+obkpJZWar7HZymXZbW+Rlk3HTEIMlpc6FCNz0Ds=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", + "rev": "5ab036a8d97cb9476fbe81b09076e6e91d15e1b6", "type": "github" }, "original": { @@ -715,11 +716,11 @@ }, "nixpkgs-2505": { "locked": { - "lastModified": 1757716134, - "narHash": "sha256-OYoZLWvmCnCTCJQwaQlpK1IO5nkLnLLoUW8wwmPmrfU=", + "lastModified": 1764560356, + "narHash": "sha256-M5aFEFPppI4UhdOxwdmceJ9bDJC4T6C6CzCK1E2FZyo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e85b5aa112a98805a016bbf6291e726debbc448a", + "rev": "6c8f0cca84510cc79e09ea99a299c9bc17d03cb6", "type": "github" }, "original": { @@ -729,13 +730,29 @@ "type": "github" } }, + "nixpkgs-2511": { + "locked": { + "lastModified": 1775749320, + "narHash": "sha256-msT6frWJSQ2WR+0cpk+KPcZdLTLagUIsJwQwIX9JNSo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "74b87959b2d16f59f54d8559cf3cf26b9d907949", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-25.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { - "lastModified": 1759070547, - "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", + "lastModified": 1775888245, + "narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "647e5c14cbd5067f44ac86b74f014962df460840", + "rev": "13043924aaa7375ce482ebe2494338e058282925", "type": "github" }, "original": { @@ -817,11 +834,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1762301584, - "narHash": "sha256-yLihKEbngbLV1EhuLJSencMCtrDM2sYGsVZkX8xlSK8=", + "lastModified": 1779842247, + "narHash": "sha256-hfPd20D1Ptyo/J0pV8bF9ZJtHAvvlK2G3F8B3D+WYJs=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "ce12bd44df0b5488bdbbe8762d79379e2bc76d62", + "rev": "b2228d3697cf66c5c99acb290a943ff750acd8cd", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9d2e94b87f8..42988d5ffa2 100644 --- a/flake.nix +++ b/flake.nix @@ -189,6 +189,7 @@ default = shell.dev; cluster = shell; profiled = project.profiled.shell; + ghc914 = project.projectVariants.ghc914.shell; }; # NixOS tests a sandboxed mainnet edge node with submit-api, ensuring diff --git a/nix/haskell.nix b/nix/haskell.nix index 372101c7323..1824343904a 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -23,8 +23,8 @@ let src = ../.; name = "cardano-node"; compiler-nix-name = lib.mkDefault (if pkgs.stdenv.hostPlatform.isWindows then windowsCompilerNixName else "ghc967"); - # Extra-compilers - # flake.variants = lib.genAttrs ["ghc$VERSION"] (x: {compiler-nix-name = x;}); + # Used for haddock generation (avoids GHC 9.6 tyConStupidTheta panic) + flake.variants = lib.genAttrs ["ghc914"] (x: {compiler-nix-name = x;}); cabalProjectLocal = '' repository cardano-haskell-packages-local url: file:${CHaP}