From 5d950969a80b76b604e50035307e2009bc1bd23b Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Tue, 14 Apr 2026 14:11:50 +0200 Subject: [PATCH 1/7] depend only on crypton >=1.1 --- hsaml2.cabal | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/hsaml2.cabal b/hsaml2.cabal index cc5a7d2..6eb7e20 100644 --- a/hsaml2.cabal +++ b/hsaml2.cabal @@ -69,18 +69,12 @@ library SAML2.Bindings.Internal c-sources: SAML2/XML/libxml2_stub.c - if flag(crypton) - build-depends: - crypton, - crypton-x509, - crypton-asn1-types, - crypton-asn1-encoding - else - build-depends: - cryptonite, - x509, - asn1-types >= 0.2, - asn1-encoding + build-depends: + crypton >=1.1, + crypton-x509, + crypton-asn1-types, + crypton-asn1-encoding, + ram build-depends: base >=4.8 && <5, base64-bytestring, @@ -93,7 +87,6 @@ library invertible, invertible-hxt, lens, - memory, mtl, network-uri, process, @@ -121,14 +114,9 @@ test-suite tests XML.Signature default-language: Haskell2010 ghc-options: -Wall - if flag(crypton) - build-depends: - crypton, - crypton-x509 - else - build-depends: - cryptonite, - x509 + build-depends: + crypton, + crypton-x509 build-depends: base, base64-bytestring, From 1d192376e52aa5fdfc908c81f452f1db2d23f79f Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Wed, 15 Apr 2026 12:59:25 +0200 Subject: [PATCH 2/7] lower boundary for crypton --- hsaml2.cabal | 2 +- stack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hsaml2.cabal b/hsaml2.cabal index 6eb7e20..5279def 100644 --- a/hsaml2.cabal +++ b/hsaml2.cabal @@ -70,7 +70,7 @@ library c-sources: SAML2/XML/libxml2_stub.c build-depends: - crypton >=1.1, + crypton >=1.0.6, crypton-x509, crypton-asn1-types, crypton-asn1-encoding, diff --git a/stack.yaml b/stack.yaml index 014d746..b339c11 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-20.26 +resolver: nightly-2026-01-19 packages: - . extra-deps: From 69b3c9fd9d4beadc6bca289ad8ed73f8fdbbb7dc Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Wed, 15 Apr 2026 13:07:04 +0200 Subject: [PATCH 3/7] try and fix versions with stack --- stack.yaml | 1 + stack.yaml.lock | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/stack.yaml b/stack.yaml index b339c11..97afe68 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,5 +2,6 @@ resolver: nightly-2026-01-19 packages: - . extra-deps: +- crypton-1.0.6 - invertible-0.2.0.8 - invertible-hxt-0.1 diff --git a/stack.yaml.lock b/stack.yaml.lock index bd8f7dc..d6e6e1e 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -4,6 +4,13 @@ # https://docs.haskellstack.org/en/stable/lock_files packages: +- completed: + hackage: crypton-1.0.6@sha256:6686b3517a065530a5b10fd7b186055815d79b30b15c5eb27cb87a1794595ddd,16653 + pantry-tree: + sha256: a610b645a866c77dfc947af400685930b191e681e73280466451e46448960cfe + size: 23412 + original: + hackage: crypton-1.0.6 - completed: hackage: invertible-0.2.0.8@sha256:a6bfbf7e48a1744716134d8c73b3dec2d668ee13ba2c7cffce73621a275d559f,3628 pantry-tree: @@ -20,7 +27,7 @@ packages: hackage: invertible-hxt-0.1 snapshots: - completed: - sha256: 5a59b2a405b3aba3c00188453be172b85893cab8ebc352b1ef58b0eae5d248a2 - size: 650475 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/26.yaml - original: lts-20.26 + sha256: daa0c3bbf71e6cfdfde7638457b6657b7ec96a242261b70dc261d255ad80462f + size: 719997 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2026/1/19.yaml + original: nightly-2026-01-19 From 23831523c1d88d63e6f433a0b9617da357b9104c Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Wed, 15 Apr 2026 13:08:45 +0200 Subject: [PATCH 4/7] fix cache action --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be43c70..6b3093b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: with: ghc-version: '9.2.8' enable-stack: true - - uses: actions/cache@v1 + - uses: actions/cache@v4 with: path: ~/.stack key: ${{ runner.os }}-stack-${{ hashFiles('hsaml2.cabal') }}-${{ hashFiles('stack.yaml') }} From 28488e7bb4c71a72b5289d4b3a25329b0a7472c4 Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Wed, 15 Apr 2026 13:23:32 +0200 Subject: [PATCH 5/7] add ram to stack.yaml --- stack.yaml | 1 + stack.yaml.lock | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/stack.yaml b/stack.yaml index 97afe68..9e46ed5 100644 --- a/stack.yaml +++ b/stack.yaml @@ -5,3 +5,4 @@ extra-deps: - crypton-1.0.6 - invertible-0.2.0.8 - invertible-hxt-0.1 +- ram-0.22.0 diff --git a/stack.yaml.lock b/stack.yaml.lock index d6e6e1e..4df83ac 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -25,6 +25,13 @@ packages: size: 195 original: hackage: invertible-hxt-0.1 +- completed: + hackage: ram-0.22.0@sha256:f6ce64a025929eb6ce42deeb80d072960a9ea2d83b9b9b28de668cc2b623127c,2814 + pantry-tree: + sha256: 701a4505989d85ba17aabe4695bc63eabffbbb61fc6af195c63e526d77181f83 + size: 2285 + original: + hackage: ram-0.22.0 snapshots: - completed: sha256: daa0c3bbf71e6cfdfde7638457b6657b7ec96a242261b70dc261d255ad80462f From c6047c103985623ff7bfa174fa7e5f4995bc8f0e Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Wed, 15 Apr 2026 15:14:40 +0200 Subject: [PATCH 6/7] =?UTF-8?q?adjust=20boundaries=20for=20crypton=20?= =?UTF-8?q?=F0=9F=92=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hsaml2.cabal | 4 ++-- stack.yaml | 1 - stack.yaml.lock | 7 ------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/hsaml2.cabal b/hsaml2.cabal index 5279def..9741581 100644 --- a/hsaml2.cabal +++ b/hsaml2.cabal @@ -70,11 +70,11 @@ library c-sources: SAML2/XML/libxml2_stub.c build-depends: - crypton >=1.0.6, + crypton >=1.0.6 && <1.1, crypton-x509, crypton-asn1-types, crypton-asn1-encoding, - ram + memory build-depends: base >=4.8 && <5, base64-bytestring, diff --git a/stack.yaml b/stack.yaml index 9e46ed5..97afe68 100644 --- a/stack.yaml +++ b/stack.yaml @@ -5,4 +5,3 @@ extra-deps: - crypton-1.0.6 - invertible-0.2.0.8 - invertible-hxt-0.1 -- ram-0.22.0 diff --git a/stack.yaml.lock b/stack.yaml.lock index 4df83ac..d6e6e1e 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -25,13 +25,6 @@ packages: size: 195 original: hackage: invertible-hxt-0.1 -- completed: - hackage: ram-0.22.0@sha256:f6ce64a025929eb6ce42deeb80d072960a9ea2d83b9b9b28de668cc2b623127c,2814 - pantry-tree: - sha256: 701a4505989d85ba17aabe4695bc63eabffbbb61fc6af195c63e526d77181f83 - size: 2285 - original: - hackage: ram-0.22.0 snapshots: - completed: sha256: daa0c3bbf71e6cfdfde7638457b6657b7ec96a242261b70dc261d255ad80462f From aeac7839464a7a7b8c566728b5435ffe2b826839 Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Fri, 17 Apr 2026 13:54:23 +0200 Subject: [PATCH 7/7] Fix stack CI: pin crypton-x509 1.8.0 and align GHC/flag The nightly-2026-01-19 resolver has crypton-x509 < 1.8.0, which still depends on asn1-types. But hsaml2.cabal unconditionally uses crypton-asn1-types, causing GHC to see two incompatible ASN1Object types. Pin crypton-x509-1.8.0 (and its crypton-asn1-* deps) in extra-deps to ensure consistent package identity. Also remove --flag hsaml2:-crypton from CI commands: the flag is defined in the cabal file but has no if/else conditionals, so it was a no-op. Update GHC to 9.12.2 to match the nightly-2026-01-19 resolver. --- .github/workflows/main.yml | 7 +++---- stack.yaml | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b3093b..c604b45 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v2 - uses: haskell-actions/setup@v2 with: - ghc-version: '9.2.8' + ghc-version: '9.12.2' enable-stack: true - uses: actions/cache@v4 with: @@ -20,7 +20,6 @@ jobs: ${{ runner.os }}-stack- ${{ runner.os }}- - name: build - run: stack build --system-ghc --flag hsaml2:-crypton + run: stack build --system-ghc - name: test - run: stack test --system-ghc --flag hsaml2:-crypton - + run: stack test --system-ghc diff --git a/stack.yaml b/stack.yaml index 97afe68..70c6d3c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -3,5 +3,9 @@ packages: - . extra-deps: - crypton-1.0.6 +- crypton-x509-1.8.0 +- crypton-asn1-types-0.4.1 +- crypton-asn1-encoding-0.10.0 +- crypton-asn1-parse-0.10.0 - invertible-0.2.0.8 - invertible-hxt-0.1