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

Update resolvers, migrate to crypton #109

Merged
merged 10 commits into from
Jan 6, 2025
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
32 changes: 17 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ on:
branches: main

jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: generate
uses: freckle/stack-action/generate-matrix@v4
outputs:
stack-yamls: ${{ steps.generate.outputs.stack-yamls }}

test:
needs: generate
runs-on: ubuntu-latest
services:
faktory:
Expand All @@ -19,29 +29,21 @@ jobs:

strategy:
matrix:
stack-yaml:
- stack-nightly.yaml # ghc-9.8
- stack.yaml # ghc-9.6
- stack-lts-21.25.yaml # ghc-9.4
- stack-lts-20.26.yaml # ghc-9.2
- stack-lts-19.33.yaml # ghc-9.0
- stack-lts-18.28.yaml # ghc-8.10
- stack-lts-16.31.yaml # ghc-8.8
stack-yaml: ${{ fromJSON(needs.generate.outputs.stack-yamls) }}
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: freckle/stack-action@v4
with:
stack-yaml: ${{ matrix.stack-yaml }}
- uses: actions/checkout@v4
- uses: freckle/stack-action@v5
env:
STACK_YAML: ${{ matrix.stack-yaml }}
FAKTORY_URL: tcp://localhost:7419

hlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/hlint-setup@v2
- uses: haskell/actions/hlint-run@v2
- uses: actions/checkout@v4
- uses: haskell-actions/hlint-setup@v2
- uses: haskell-actions/hlint-run@v2
with:
fail-on: warning
18 changes: 18 additions & 0 deletions .github/workflows/restyled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Restyled

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
restyled:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: restyled-io/actions/setup@v4
- uses: restyled-io/actions/run@v4
with:
suggestions: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.stack-work
dist-newstyle
stack-*.yaml.lock
1 change: 1 addition & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- ignore: {name: "Use list comprehension"}
- ignore: {name: "Reduce duplication"}
- ignore: {name: "Avoid restricted qualification", within: Faktory.Prelude}
- ignore: {name: "Functor law"}

# Custom Warnings
- warn: {lhs: fromJust, rhs: fromJustNote}
Expand Down
2 changes: 2 additions & 0 deletions .stack-all
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[versions]
oldest = lts-16
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [_Unreleased_](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.1.3.0...main)
## [_Unreleased_](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.1.3.1...main)

## [v1.1.3.1](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.1.3.0...v1.1.3.1)

- Replace `cryptonite` with `crypton`

## [v1.1.3.0](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.1.2.7...v1.1.3.0)

Expand Down
9 changes: 5 additions & 4 deletions faktory.cabal
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
cabal-version: 1.18

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.37.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: 93c05d233611150574822d2e7e5b79a7f5016dbfb15705ce42d76a2cab18ec5a
-- hash: bfbcf37e9bee321d67996f4eff37053400c98d38d55290a1110538ce9725f266

name: faktory
version: 1.1.3.0
version: 1.1.3.1
synopsis: Faktory Worker for Haskell
description: Haskell client and worker process for the Faktory background job server.
.
Expand Down Expand Up @@ -109,8 +109,9 @@ library
, aeson-casing
, base ==4.*
, bytestring
, crypton
, crypton-connection
, cryptonite
, data-default
, errors
, megaparsec
, memory
Expand Down
9 changes: 2 additions & 7 deletions library/Faktory/Connection.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Faktory.Connection
import Faktory.Prelude

import Control.Applicative ((<|>))
import Data.Default (def)
import Data.Maybe (fromMaybe)
import Data.Void
import Network.Connection.Compat
Expand Down Expand Up @@ -75,13 +76,7 @@ connect ConnectionInfo {..} = bracketOnError open connectionClose pure
, connectionPort = connectionInfoPort
, connectionUseSecure =
if connectionInfoTls
then
Just
TLSSettingsSimple
{ settingDisableCertificateValidation = False
, settingDisableSession = False
, settingUseServerName = False
}
then Just def
else Nothing
, connectionUseSocks = Nothing
}
Expand Down
2 changes: 0 additions & 2 deletions library/Faktory/Job.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ toPairs Job {..} =
, "reserve_for" .= joReserveFor jobOptions
]

-- brittany-disable-next-binding

instance FromJSON args => FromJSON (Job args) where
parseJSON = withObject "Job" $ \o ->
Job
Expand Down
2 changes: 0 additions & 2 deletions library/Faktory/JobFailure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ data JobFailure = JobFailure
}
deriving stock (Show)

-- brittany-disable-next-binding

instance FromJSON JobFailure where
parseJSON = withObject "Failure" $ \o ->
JobFailure
Expand Down
2 changes: 0 additions & 2 deletions library/Faktory/JobOptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ data JobOptions = JobOptions
deriving stock (Eq, Show, Generic)
deriving (Semigroup, Monoid) via GenericSemigroupMonoid JobOptions

-- brittany-disable-next-binding

instance FromJSON JobOptions where
parseJSON = withObject "JobOptions" $ \o ->
JobOptions
Expand Down
2 changes: 0 additions & 2 deletions library/Network/Connection/Compat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import Network.Connection hiding (connectTo)
import Network.Socket
import qualified Network.Socket as S

-- brittany --exactprint-only

connectTo :: ConnectionContext -> ConnectionParams -> IO Connection
connectTo cg cParams =
bracketOnError
Expand Down
7 changes: 4 additions & 3 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: faktory
version: 1.1.3.0
version: 1.1.3.1
category: Network
author: Freckle Engineering
maintainer: [email protected]
Expand Down Expand Up @@ -99,8 +99,9 @@ library:
- aeson
- aeson-casing
- bytestring
- crypton
- crypton-connection
- cryptonite
- data-default
- errors
- megaparsec
- memory
Expand All @@ -110,8 +111,8 @@ library:
- random
- resource-pool
- safe-exceptions
- semigroups >= 0.19.1
- scanner
- semigroups >= 0.19.1
- text
- time
- unix
Expand Down
61 changes: 0 additions & 61 deletions stack-lts-16.31.yaml.lock

This file was deleted.

61 changes: 0 additions & 61 deletions stack-lts-18.28.yaml.lock

This file was deleted.

Loading
Loading