-
Notifications
You must be signed in to change notification settings - Fork 272
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
Upgrade to LTS 22.26 GHC 9.6.5 #5142
Conversation
28d9375
to
06e730d
Compare
cc @sellout |
with: | ||
stack-version: 2.15.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also change the default on unisonweb/actions/stack/install
if we like that better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I figured it was a bit of a chicken-and-egg thing. TBH I kind of like specifying here because it's easy to see what it's using and easy to bump again in the future 😄
I'm glad you added it as an arg for that step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I like specifying it in this project too; I just wish we didn't have to specify it 4 times in this project, but maybe that's fine. Replace All.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can read JSON in GH workflows, and also in Nix (I don’t know if there are other places we need versions).
So, we could write a dependency-versions.json
file or something that the flake can read into its versions
attrSet, and that workflows can read as well. I’ve been wanting to extract it from the flake anyway.
Nice! On testing, could you smoke test that the new file watch code works locally |
I would normally agree with you, but haskell.nix (which is still used a lot by our flake) doesn’t support much in the way of GHC. But I’ll give it a shot. |
b844f1d
to
5dcc096
Compare
contrib/cabal.project
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contributed by neduard for keeping the cabal build up to date. I haven't tested this myself.
flake.nix
Outdated
@@ -27,10 +27,10 @@ | |||
] | |||
(system: let | |||
versions = { | |||
ghc = "928"; | |||
ghc = "965"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't actually work.
@@ -172,7 +172,7 @@ execute conn@(Connection _ _ conn0) sql@(Sql s params) = do | |||
-- | |||
-- This function does not support parameters, and is mostly useful for executing DDL and migrations. | |||
executeStatements :: Connection -> Text -> IO () | |||
executeStatements conn@(Connection _ _ (Sqlite.Connection database)) sql = do | |||
executeStatements conn@(Connection _ _ (Sqlite.Connection database _tempNameCounter)) sql = do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type just changed.
@ChrisPenner Ok excellent, thanks. In that case, I'm just holding to sort out the Nix questions, which we'll try to do later this afternoon. I'll start a Discord thread to answer the question of which versions we should be pinning. |
@sellout "No space left on device" for |
A re-run succeeded. I grabbed the log archive before and after. I’m guessing it needed to build something the first time that it didn’t the second1, and that pulled in enough transitive deps to push us over the limit. Since this job builds the devShells as well as the Cabal packages, it should contain all the dependencies (tooling & Haskell libs) needed by Unison no matter which Unison packages need to be rebuilt in a given PR, but we could just be very close to the limit. We could probably break this into multiple jobs, so one makes sure all the dependencies are built, and a second only ever builds Unison packages. On the plus side, even if this job fails, it will at least push what it’s finished to the cache, so a re-run is more likely to succeed (as it just did) … but we definitely don’t want to be manually re-running the job on every PR. And pinning certain packages (GHC, HLS, etc.) in Cachix can make sure they don’t get GCed. Footnotes
|
So we'll plan to merge this after #5041; I'm going to clear the approval so I don't merge it by accident. |
@aryairani I checked out the conflicts with #5041 and I'm not too concerned, nothing major; that is, assuming Ormolu has already been re-run on this branch right? |
It hasn’t – it appears that in general CI only checks Ormolu against files that were modified in the PR (which is good), and at least some things had slipped through in the period that CI wasn’t running Ormolu1. But I do think it’s good practice to run Ormolu all at once when we upgrade it. It’s just unfortunate that it’s difficult to separate upgrading Ormolu from the rest of this PR. I can run Ormolu as another commit on this PR, or we can do a separate PR immediately after this. I also figured since we were waiting on #5041, that running Ormolu after we merge that would be prudent. And since I couldn’t figure out where I linked this before, here is the effect of running Ormolu on top of this PR: sellout@694b065 Footnotes
|
@ChrisPenner You can be in charge of merging this PR when you are ready. There is also an |
Ah, thanks Greg, yeah we can wait then. I'm getting pretty close with project roots now anyways :) |
Hey @ChrisPenner , I was trying out this branch and I needed some changes from trunk so I had a go at merging it in & fixing the conflicts: neduard#3 - figured you'll probably encounter the same so it might be worth sharing in case it saves you a bit of time. As before feel free to either cherrypick or simply use as a reference. Something worth pointing out is that I had to revert #5192 since numerals requires |
@neduard I used Otherwise, is there a similar directive to |
That's a much better shout @aryairani , thanks! I was so focused on getting it to build that I didn't think of other ways of solving it. I've raised the PR upstream and in the meantime worked around it by adding the following to
|
Okay great — neduard#3 is merged though, is that still where to look? |
Thanks, @neduard. We really need to get a Cabal GitHub check into CI (even if it’s not required). It should generally be trivial to keep it in sync, but easy to overlook without a reminder. |
Yeah, the Cabal Github check is missing a) because we didn't have anyone to maintain the .cabal file (no longer true) and b) because it would have doubled the resources needed to run CI (not fully true anymore, but not a non-issue either). I guess we could run cabal build on linux only; wouldn't have run tests. We should have some sort of build cache. |
I opened #5225 so we could avoid conflating this discussion (my apologies for starting it here), and so we have somewhere to point when it comes up again. |
@ChrisPenner @aryairani #5224 ready for merge into this one (or directly into trunk if you so wish) 😊 - please have a look at the description as there's a couple of things I'm unsure regarding updating a few transcripts and the jit tests potentially being cached but still requiring a couple of small updates - hoping you'll know more! |
Reviewing the last merge into unisonweb#5142, I noticed some duplicated and out- of-date information. This brings things up-to-date and slightly reduces the duplication. - bumped Ormolu used by ci.yaml from 0.5.2.0 to 0.7.2.0, to match flake.nix - removed Markdown that claimed ci.yaml was using Ormolu 0.5.0.1 - moved description from `base-codebase` in Markdown to comment on `runtime_tests_codebase` in ci.yaml (and updated it to refer to builtin-tests/interpreter-tests.md instead of builtin-tests/base.md) - removed `unison_src_test_results` as it’s no longer managed as a single variable - moved other comments from Markdown to ci.yaml - added Markdown recommending to look in ci.yaml for specifics - rearranges the order of vars in ci.yaml to match the order they were presented in Markdown One thing I wasn’t sure how to map over: Markdown claims Racket 8.7 is used in CI, but ci.yaml doesn’t mention any Racket version.
With unisonweb#5142, Ormolu was upgraded from 0.5.2.0 to 0.7.2.0. This formats the codebase to avoid spurious formatting comingled in other commits. Almost all of the changes are simply wrapping single constraints in parens, like ```diff -hashBranch :: forall m. Monad m => Branch m -> m BranchHash +hashBranch :: forall m. (Monad m) => Branch m -> m BranchHash ``` There is also some reordering of language pragmas and imports, indentation correction (some of which gets precedence wrong), and switching some Haddock from `-- ^` to `-- |` .
Overview
Upgrades to LTS 22.26; GHC 9.6.5
Recommended you update your local GHCup to:
HLS 2.9.0.0
andStack 2.15.5
Does someone who knows nix want to update the flake as well? It seems ghc 965 isn't being found, I'm sure it's an easy fix for someone who knows how it works 🙃
Implementation notes
x509-*
tocrypton-x509-*
libs since HVR quit HaskellInteresting/controversial decisions
Not really
Test coverage
Existing tests
Loose ends