Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving over to crypton backend #81

Merged
merged 8 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
cabal:
name: cabal / ghc-${{matrix.ghc}} / ${{ matrix.os }}
continue-on-error: ${{ matrix.ghc == '9.10.1'}}
continue-on-error: ${{ matrix.ghc == '9.10.1' || matrix.os == 'macOS-latest' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -21,22 +21,22 @@ jobs:
- "9.0.2"
- "9.2.8"
- "9.4.8"
- "9.6.5"
- "9.6.6"
- "9.8.2"
- "9.10.1"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
#if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'

- uses: haskell/actions/setup@v2
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache cabal-store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
Expand Down Expand Up @@ -68,20 +68,20 @@ jobs:
- "--resolver lts-19" # GHC 9.0.2
- "--resolver lts-20" # GHC 9.2.8
- "--resolver lts-21" # GHC 9.4.8
- "--resolver lts-22" # GHC 9.6.5
- "--resolver lts-22" # GHC 9.6.6
- "--resolver nightly" # GHC 9.8.2

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
#if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'

- uses: haskell/actions/setup@v2
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
stack-version: ${{ matrix.stack }}
enable-stack: true

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache ~/.stack
with:
path: ~/.stack
Expand Down
2 changes: 1 addition & 1 deletion password-cli/password-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ executable password-cli
build-depends:
base
, bytestring >= 0.9 && < 1
, password ^>= 3.0.3.0
, password ^>= 3.0.3.0 || ^>= 3.1.0.0
, password-types ^>= 1.0
, optparse-applicative >= 0.14.3 && < 0.19
, text >= 1.2 && < 3
Expand Down
6 changes: 6 additions & 0 deletions password/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for `password`

## 3.1.0.0

- Switched default cryptographic backend library from `cryptonite` to `crypton`.
The `crypton` flag is now a no-op, and the `cryptonite` flag is needed to build
the `password` library using the `cryptonite` library.

## 3.0.4.0

- Support `base64` package up to and including `base64-1.0`.
Expand Down
22 changes: 8 additions & 14 deletions password/password.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 1.12

name: password
version: 3.0.4.0
version: 3.1.0.0
category: Data
synopsis: Hashing and checking of passwords
description:
Expand Down Expand Up @@ -58,13 +58,13 @@ flag bcrypt

flag crypton
description: Use the [crypton] library as the cryptographic backend.
(Does nothing since version 3.1.0.0; might be removed in a future major version)
default: False
manual: True

flag cryptonite
description:
Use the [cryptonite] library as the cryptographic backend.
(Does nothing until a future major version)
default: False
manual: True

Expand Down Expand Up @@ -120,15 +120,12 @@ library
-Wall
default-language:
Haskell2010
-- At some future major version bump, this should
-- be changed to the [cryptonite] flag and that
-- `if flag(cryptonite) build-depends: cryptonite`
if flag(crypton)
if flag(cryptonite)
build-depends:
crypton >= 0.31 && < 1.1
cryptonite >= 0.15.1 && < 0.31
else
build-depends:
cryptonite >= 0.15.1 && < 0.31
crypton >= 0.31 && < 1.1

test-suite doctests
type:
Expand Down Expand Up @@ -215,12 +212,9 @@ test-suite password-tasty
if flag(scrypt)
cpp-options:
-DCABAL_FLAG_scrypt
-- At some future major version bump, this should
-- be changed to the [cryptonite] flag and that
-- `if flag(cryptonite) build-depends: cryptonite`
if flag(crypton)
if flag(cryptonite)
build-depends:
crypton
cryptonite
else
build-depends:
cryptonite
crypton
5 changes: 3 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-22.24
resolver: lts-22.28

# User packages to be built.
# Various formats can be used as shown in the example below.
Expand All @@ -41,7 +41,8 @@ packages:
# Dependency packages to be pulled from upstream that are not in the resolver
# using the same syntax as the packages field.
# (e.g., acme-missiles-0.3)
extra-deps: []
extra-deps:
- crypton-1.0.0

# Override default flag values for local packages and extra-deps
# flags: {}
Expand Down
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
sha256: 28a863b358647f2d952fe7085ba11561aeb63eca6bc6fd1ce8fcf1cfe63717f5
size: 719127
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/24.yaml
original: lts-22.24
sha256: 87da71cb0ae9ee1ea1bf51a8eb9812f39f779be76abc0a3c926defd8afda05d1
size: 719139
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/28.yaml
original: lts-22.28
Loading