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

Upgrade to LTS 22.26 GHC 9.6.5 #5142

Merged
merged 34 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2d1bf19
Mostly Upgrade LTS to ghc 9.6.5
ChrisPenner Jun 26, 2024
61b2666
Temporarily ignore deprecations from jose
ChrisPenner Jun 27, 2024
4a9b358
Swap from x509 to crypton-x509 since old packages are abandoned
ChrisPenner Jun 27, 2024
61e0522
Fix redundant liftA2 imports
ChrisPenner Jun 27, 2024
745660d
Fix servant request stuff
ChrisPenner Jun 27, 2024
a7f234a
Use random token rather than NanoID
ChrisPenner Jun 27, 2024
f3d4455
Update opt-parse help
ChrisPenner Jun 27, 2024
7538111
Upgrade watch expression stuff
ChrisPenner Jun 27, 2024
b85bea8
Clean up stack.yaml pins
ChrisPenner Jun 27, 2024
87e15d7
Bump stack version in CI
ChrisPenner Jun 27, 2024
06e730d
Attempt to bump nix flake
ChrisPenner Jun 27, 2024
c97d93e
lsp 2.3.0.0
neduard Jun 27, 2024
a35d706
Use GHC.IsList
neduard Jun 27, 2024
95a0eb9
cleanup cabal
neduard Jun 27, 2024
c3fe983
Merge neduard's lsp fixes
ChrisPenner Jun 27, 2024
5dcc096
update transcripts
ChrisPenner Jun 27, 2024
e94f870
Remove Primes from module names
ChrisPenner Jun 27, 2024
563e148
Resolve conflicts with trunk
ChrisPenner Jun 27, 2024
8f694f1
Add note about deprecations
ChrisPenner Jun 27, 2024
15f236a
Add issue number
ChrisPenner Jun 27, 2024
121d51c
Don’t export packages for individual build tools
sellout Jun 27, 2024
d0f4c70
Remove the non-haskell.nix devShell
sellout Jun 27, 2024
01e0351
Switch `nixos-unstable` to `release-23.11`
sellout Jun 27, 2024
a5b9864
Don’t hide `unison-project` in an overlay
sellout Jun 27, 2024
ba13de4
Remove dead code
sellout Jun 27, 2024
86819b8
Remove reference to non-existent Cabal component
sellout Jun 27, 2024
110b5ca
Actually cache UCM in CI
sellout Jun 27, 2024
f25af69
Override tool versions directly in the package set
sellout Jun 27, 2024
dad9d6d
Minor simplification of haskell-nix-flake
sellout Jun 27, 2024
7b373d7
Eliminate `only-tools` devShell
sellout Jun 27, 2024
f2c8020
Can now include the devShells in `all` package
sellout Jun 27, 2024
5ae7963
Merge branch 'simplifying-nix' into cp/ghc-upgrade
sellout Jun 27, 2024
c47bdcf
Get Nix build working with GHC 9.6.5
sellout Jun 27, 2024
ecf5fe1
Merge pull request #5155 from sellout/cp/ghc-upgrade
aryairani Jul 6, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/bundle-ucm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:

- name: install stack
uses: unisonweb/actions/stack/install@main
with:
stack-version: 2.15.5
Comment on lines +42 to +43
Copy link
Contributor

@aryairani aryairani Jun 27, 2024

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.


- name: build
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ jobs:
- name: install stack
if: steps.cache-ucm-binaries.outputs.cache-hit != 'true'
uses: unisonweb/actions/stack/install@main
with:
stack-version: 2.15.5

# Build deps, then build local code. Splitting it into two steps just allows us to see how much time each step
# takes.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/haddocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:

- name: install stack
uses: unisonweb/actions/stack/install@main
with:
stack-version: 2.15.5

- name: build with haddocks
working-directory: unison
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-transcripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:

- name: install stack
uses: unisonweb/actions/stack/install@main
with:
stack-version: 2.15.5

# One of the transcripts fails if the user's git name hasn't been set.
- name: set git user info
Expand Down
2 changes: 1 addition & 1 deletion codebase2/util-serialization/U/Util/Serialization.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

module U.Util.Serialization where

import Control.Applicative (Applicative (liftA2), liftA3)
import Control.Applicative (liftA3)
import Control.Monad (foldM, replicateM, replicateM_, when)
import Data.Bits (Bits, clearBit, setBit, shiftL, shiftR, testBit, (.|.))
import Data.ByteString (ByteString, readFile, writeFile)
Expand Down
15 changes: 11 additions & 4 deletions contrib/cabal.project
Copy link
Contributor Author

@ChrisPenner ChrisPenner Jun 27, 2024

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.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ packages:
parser-typechecker
unison-core
unison-cli
unison-cli-main
unison-hashing-v2
unison-merge
unison-share-api
unison-share-projects-api
unison-syntax
Expand All @@ -46,10 +48,12 @@ source-repository-package
tag: 9275eea7982dabbf47be2ba078ced669ae7ef3d5

constraints:
fsnotify < 0.4,
crypton-x509-store <= 1.6.8,
servant <= 0.19.1,
optparse-applicative <= 0.17.1.0
lsp == 2.3.0.0,
fsnotify == 0.4.1.0,
crypton-x509-store == 1.6.9,
servant == 0.20.1,
optparse-applicative == 0.18.1.0,
tls == 1.8.0

-- For now there is no way to apply ghc-options for all local packages
-- See https://cabal.readthedocs.io/en/latest/cabal-project.html#package-configuration-options
Expand Down Expand Up @@ -128,6 +132,9 @@ package unison-core
package unison-hashing-v2
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info

package unison-merge
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info

package unison-share-api
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info

Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
]
(system: let
versions = {
ghc = "928";
ghc = "965";
Copy link
Contributor Author

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.

ormolu = "0.5.2.0";
hls = "2.4.0.0";
stack = "2.13.1";
hls = "2.9.0.0";
stack = "2.15.5";
hpack = "0.35.2";
};
overlays = [
Expand Down
2 changes: 1 addition & 1 deletion lib/unison-pretty-printer/src/Unison/Util/SyntaxText.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Unison.HashQualified (HashQualified)
import Unison.Name (Name)
import Unison.Pattern (SeqOp)
import Unison.Prelude
import Unison.Referent' (Referent')
import Unison.ReferentPrime (Referent')
import Unison.Util.AnnotatedText (AnnotatedText (..), annotate, segment)

type SyntaxText' r = AnnotatedText (Element r)
Expand Down
4 changes: 2 additions & 2 deletions lib/unison-sqlite/src/Unison/Sqlite/Connection.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type just changed.

logQuery (Sql sql []) Nothing
Direct.Sqlite.exec database sql `catch` \(exception :: Sqlite.SQLError) ->
throwSqliteQueryException
Expand All @@ -184,7 +184,7 @@ executeStatements conn@(Connection _ _ (Sqlite.Connection database)) sql = do

-- With results, without checks

queryStreamRow :: Sqlite.FromRow a => Connection -> Sql -> (IO (Maybe a) -> IO r) -> IO r
queryStreamRow :: (Sqlite.FromRow a) => Connection -> Sql -> (IO (Maybe a) -> IO r) -> IO r
queryStreamRow conn@(Connection _ _ conn0) sql@(Sql s params) callback =
run `catch` \(exception :: Sqlite.SQLError) ->
throwSqliteQueryException
Expand Down
9 changes: 4 additions & 5 deletions parser-typechecker/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ when:

dependencies:
- ListLike
- NanoID
- aeson
- ansi-terminal
- asn1-encoding
Expand Down Expand Up @@ -81,7 +80,7 @@ dependencies:
- nonempty-containers
- open-browser
- openapi3
- optparse-applicative >= 0.16.1.0
- optparse-applicative
- pem
- pretty-simple
- primitive
Expand Down Expand Up @@ -140,9 +139,9 @@ dependencies:
- warp
- witch
- witherable
- x509
- x509-store
- x509-system
- crypton-x509
- crypton-x509-store
- crypton-x509-system
- yaml
- zlib

Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Codebase/BranchUtil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Unison.Codebase.Branch (Branch, Branch0)
import Unison.Codebase.Branch qualified as Branch
import Unison.Codebase.Path (Path)
import Unison.Codebase.Path qualified as Path
import Unison.HashQualified' (HashQualified (HashQualified, NameOnly))
import Unison.HashQualifiedPrime (HashQualified (HashQualified, NameOnly))
import Unison.Names (Names)
import Unison.Names qualified as Names
import Unison.Prelude
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Codebase/Path.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ import Data.Sequence (Seq ((:<|), (:|>)))
import Data.Sequence qualified as Seq
import Data.Text qualified as Text
import GHC.Exts qualified as GHC
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.Name (Name)
import Unison.Name qualified as Name
import Unison.NameSegment (NameSegment)
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Codebase/Path/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Text.Megaparsec qualified as P
import Text.Megaparsec.Char qualified as P (char)
import Text.Megaparsec.Internal qualified as P (withParsecT)
import Unison.Codebase.Path
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.Prelude hiding (empty, toList)
import Unison.ShortHash (ShortHash)
import Unison.Syntax.Lexer qualified as Lexer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import Unison.Pattern qualified as Pattern
import Unison.Prelude
import Unison.Reference qualified as Reference
import Unison.Referent qualified as Referent
import Unison.Referent' qualified as Referent'
import Unison.ReferentPrime qualified as Referent'
import Unison.Sqlite qualified as Sqlite
import Unison.Symbol (Symbol)
import Unison.Term qualified as Term
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/PrettyPrintEnv.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Unison.ConstructorReference (ConstructorReference)
import Unison.ConstructorType qualified as CT
import Unison.HashQualified (HashQualified)
import Unison.HashQualified qualified as HQ
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.LabeledDependency (LabeledDependency)
import Unison.LabeledDependency qualified as LD
import Unison.Name (Name)
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/PrettyPrintEnv/Names.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Unison.PrettyPrintEnv.Names
where

import Data.Set qualified as Set
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.Name (Name)
import Unison.Name qualified as Name
import Unison.Names (Names)
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/PrintError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Unison.ABT qualified as ABT
import Unison.Builtin.Decls (unitRef, pattern TupleType')
import Unison.ConstructorReference (ConstructorReference, GConstructorReference (..))
import Unison.HashQualified (HashQualified)
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.Kind (Kind)
import Unison.Kind qualified as Kind
import Unison.KindInference.Error.Pretty (prettyKindError)
Expand Down
4 changes: 2 additions & 2 deletions parser-typechecker/src/Unison/Runtime/ANF/Serialize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import Data.Serialize.Put (runPutLazy)
import Data.Text (Text)
import Data.Word (Word16, Word32, Word64)
import GHC.Stack
import GHC.IsList qualified (fromList)
import Unison.ABT.Normalized (Term (..))
import Unison.Reference (Reference, Reference' (Builtin), pattern Derived)
import Unison.Runtime.ANF as ANF hiding (Tag)
import Unison.Runtime.Array qualified as PA
import Unison.Runtime.Exception
import Unison.Runtime.Serialize
import Unison.Util.EnumContainers qualified as EC
Expand Down Expand Up @@ -682,7 +682,7 @@ getBLit v =
NegT -> Neg <$> getPositive
CharT -> Char <$> getChar
FloatT -> Float <$> getFloat
ArrT -> Arr . PA.fromList <$> getList (getValue v)
ArrT -> Arr . GHC.IsList.fromList <$> getList (getValue v)

putRefs :: (MonadPut m) => [Reference] -> m ()
putRefs rs = putFoldable putReference rs
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Runtime/Array.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import Data.Primitive.PrimArray as EPA hiding
import Data.Primitive.PrimArray qualified as PA
import Data.Primitive.Types
import Data.Word (Word8)
import GHC.Exts (toList)
import GHC.IsList (toList )

#ifdef ARRAY_CHECK
import GHC.Stack
Expand Down
1 change: 0 additions & 1 deletion parser-typechecker/src/Unison/Runtime/MCode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ module Unison.Runtime.MCode
)
where

import Control.Applicative (liftA2)
import Data.Bifunctor (bimap, first)
import Data.Bits (shiftL, shiftR, (.|.))
import Data.Coerce
Expand Down
1 change: 0 additions & 1 deletion parser-typechecker/src/Unison/Runtime/Serialize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

module Unison.Runtime.Serialize where

import Control.Applicative (liftA2)
import Control.Monad (replicateM)
import Data.Bits (Bits)
import Data.ByteString qualified as B
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Syntax/NamePrinter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Unison.Syntax.NamePrinter where

import Data.Text qualified as Text
import Unison.HashQualified qualified as HQ
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.LabeledDependency (LabeledDependency)
import Unison.LabeledDependency qualified as LD
import Unison.Name (Name)
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Syntax/TermParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Unison.Builtin.Decls qualified as DD
import Unison.ConstructorReference (ConstructorReference, GConstructorReference (..))
import Unison.ConstructorType qualified as CT
import Unison.HashQualified qualified as HQ
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.Name (Name)
import Unison.Name qualified as Name
import Unison.NameSegment qualified as NameSegment
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Syntax/TermPrinter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import Unison.ConstructorReference (GConstructorReference (..))
import Unison.ConstructorReference qualified as ConstructorReference
import Unison.ConstructorType qualified as CT
import Unison.HashQualified qualified as HQ
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.Name (Name)
import Unison.Name qualified as Name
import Unison.NameSegment (NameSegment)
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/tests/Unison/Test/Codebase/Path.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Data.Maybe (fromJust)
import EasyTest
import Unison.Codebase.Path (Path (..), Path' (..), Relative (..))
import Unison.Codebase.Path.Parse (parseHQSplit', parseShortHashOrHQSplit')
import Unison.HashQualified' qualified as HQ'
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.NameSegment.Internal (NameSegment (NameSegment))
import Unison.Prelude
import Unison.ShortHash qualified as SH
Expand Down
20 changes: 9 additions & 11 deletions parser-typechecker/unison-parser-typechecker.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.2.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -224,7 +224,6 @@ library
build-depends:
IntervalMap
, ListLike
, NanoID
, aeson
, ansi-terminal
, asn1-encoding
Expand All @@ -244,6 +243,9 @@ library
, concurrent-output
, configurator
, containers >=0.6.3
, crypton-x509
, crypton-x509-store
, crypton-x509-system
, cryptonite
, data-default
, data-memocombinators
Expand Down Expand Up @@ -284,7 +286,7 @@ library
, nonempty-containers
, open-browser
, openapi3
, optparse-applicative >=0.16.1.0
, optparse-applicative
, pem
, pretty-simple
, primitive
Expand Down Expand Up @@ -343,9 +345,6 @@ library
, warp
, witch
, witherable
, x509
, x509-store
, x509-system
, yaml
, zlib
default-language: Haskell2010
Expand Down Expand Up @@ -420,7 +419,6 @@ test-suite parser-typechecker-tests
build-depends:
IntervalMap
, ListLike
, NanoID
, aeson
, ansi-terminal
, asn1-encoding
Expand All @@ -441,6 +439,9 @@ test-suite parser-typechecker-tests
, concurrent-output
, configurator
, containers >=0.6.3
, crypton-x509
, crypton-x509-store
, crypton-x509-system
, cryptonite
, data-default
, data-memocombinators
Expand Down Expand Up @@ -484,7 +485,7 @@ test-suite parser-typechecker-tests
, nonempty-containers
, open-browser
, openapi3
, optparse-applicative >=0.16.1.0
, optparse-applicative
, pem
, pretty-simple
, primitive
Expand Down Expand Up @@ -545,9 +546,6 @@ test-suite parser-typechecker-tests
, warp
, witch
, witherable
, x509
, x509-store
, x509-system
, yaml
, zlib
default-language: Haskell2010
Expand Down
Loading
Loading