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

Update resolvers, migrate to crypton #109

merged 10 commits into from
Jan 6, 2025

Conversation

pbrisbin
Copy link
Member

@pbrisbin pbrisbin commented Jan 5, 2025

Reconfigure stack.yaml files

e178e82

  1. Use stack-all, and follow its major-only naming convention

    There's no reason to care about minor, and keeping the file names
    stable if/when it changes means we don't have to change required
    statuses on GitHub (which are named after the matrix values).

  2. Remove all lockfiles except stack.yaml.lock

    These lockfiles are important for reproducibility, which, if it
    matters at all for this project, only matters for the stack.yaml
    build. Builds of other resolvers almost-always only occur on CI. And
    when they occur locally, they may or may not generate/update lock
    files (they won't if using stack-all). To avoid confusion from that
    inconsistency, we'll git-ignore them so their [non]presence becomes a
    local concern.

Rev actions, use generate-matrix

950179a

Use Default TLSSettings, support crypton-connection >= 0.4.0

44c3e88

We were re-specifying the defaults already1, which was fine until
0.4.0 added a new member of a type that is not easily constructed
(Supported). In fact, the library seems to want you to construct it
via the Default instance (which we don't normally prefer), so we might
as well do the whole record like that to avoid any CPP on the specific
field.

Ignore Functor law

70bcb31

Remove old Brittany pragmas

cb806a0

Add Restyled workflow

83ac7b6

Switch cryptonite with crypton

46c5942

commercialhaskell/stackage#7474

Footnotes

  1. https://hackage.haskell.org/package/crypton-connection-0.4.3/docs/src/Network.Connection.Types.html#line-95

1. Use stack-all, and follow its major-only naming convention

   There's no reason to care about minor, and keeping the file names
   stable if/when it changes means we don't have to change required
   statuses on GitHub (which are named after the matrix values).

2. Remove all lockfiles except `stack.yaml.lock`

   These lockfiles are important for reproducibility, which, if it
   matters at all for this project, only matters for the `stack.yaml`
   build. Builds of other resolvers almost-always only occur on CI. And
   when they occur locally, they may or may not generate/update lock
   files (they won't if using `stack-all`). To avoid confusion from that
   inconsistency, we'll git-ignore them so their [non]presence becomes a
   local concern.
We were re-specifying the defaults already[^1], which was fine until
0.4.0 added a new member of a type that is not easily constructed
(`Supported`). In fact, the library seems to want you to construct it
via the `Default` instance (which we don't normally prefer), so we might
as well do the whole record like that to avoid any CPP on the specific
field.

[^1]: https://hackage.haskell.org/package/crypton-connection-0.4.3/docs/src/Network.Connection.Types.html#line-95
@pbrisbin pbrisbin changed the title pb/crypton Update resolvers, migrate to crypton Jan 5, 2025
@pbrisbin pbrisbin requested a review from chris-martin January 5, 2025 17:10
@pbrisbin pbrisbin marked this pull request as ready for review January 5, 2025 17:10
@pbrisbin pbrisbin enabled auto-merge (rebase) January 6, 2025 16:08
@chris-martin
Copy link
Contributor

These lockfiles are important for reproducibility, which, if it matters at all for this project, only matters for the stack.yaml build.

Is the general rule here that Stack lockfiles should only be checked in for configs that build some application artifact that we want to use?

@chris-martin
Copy link
Contributor

It seems an irksome result that we now have a pair of CI jobs test (stack.yaml) and test (stack-lts23.yaml) that redundantly perform the exact same build.

@pbrisbin pbrisbin merged commit ef71c7a into main Jan 6, 2025
12 checks passed
@pbrisbin pbrisbin deleted the pb/crypton branch January 6, 2025 18:25
@pbrisbin
Copy link
Member Author

pbrisbin commented Jan 6, 2025

Is the general rule here that Stack lockfiles should only be checked in for configs that build some application artifact that we want to use?

I think that's the most important use-case for reproducibility, yes.

@pbrisbin
Copy link
Member Author

pbrisbin commented Jan 6, 2025

It seems an irksome result that

Be the symlink you want to see in the world

@chris-martin
Copy link
Contributor

chris-martin commented Jan 6, 2025

If stack.yaml is a symlink to stack-ltsXX.yaml, will freckle/stack-action/generate-matrix still add it to the matrix? (I would not want it to.)

@pbrisbin
Copy link
Member Author

pbrisbin commented Jan 6, 2025

stack-action/generate-matrix is just a glorified find. It looks like we could add -type f here and it would not include the symlink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants