-
Notifications
You must be signed in to change notification settings - Fork 332
Upgrade to GHC 9.2.4 #2810
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
Merged
Merged
Upgrade to GHC 9.2.4 #2810
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
ccd17ca
Use GHC 9.2.4 in nix and cabal
smatting b347f05
Fix bug in generate-local-nix-packages.sh
smatting 8c2a26d
partial-isomorphisms: remove pin
smatting 6f88d55
type-errors: skip tests
smatting 1c6d298
binary-parsers: jailbreak
smatting 7650bc5
th-desugar: unpin
smatting ab02f24
imports: Remove hiding Option and option
smatting 5557575
use generic-data_1_0_0_0
smatting cb77263
tinylog: use new fork
smatting 3e68220
kind-generics(-th): bump to newer versions
smatting 75645fc
kind-generics-th: jailbreak
smatting 29ae9bb
singletons: remove pin
smatting a70bd03
wai-predicates: use new fork
smatting b5a6d30
hspec-wai: pin to commit 6984a0
smatting a7c82fc
hscim: fix compilation and tests after by hspec-wai upgrade
smatting 0e12168
saml2-web-sso: pin to b79a45
smatting 7c55aaf
extended: fix compilation
smatting 170c7fd
types-common: refactor Data.Range w/ GHC.TypeNats
smatting bf7b95f
singletons: pin libarries to new release
smatting ae4c084
wire-api: fix compilation
smatting 90e2944
wire-api-federation: fix compilation
smatting 18448d6
polysemy-wire-zoo: fix compilation
smatting 73fe69a
imports: dont export Data.List.singleton
smatting 3532953
federator: fix compilation
smatting 11318c7
galley: fix compilation
smatting 7c7f789
bloodhound: bump to abf819
smatting 0099c4b
brig: fix compilation
smatting ae40488
cargohold: fix compilation
smatting de11ae6
gundeck: fix compilation
smatting c8ed6f8
stern: fix compilation
smatting dba1027
assets: fix compilation
smatting b43e382
move wire forks repos from axeman to wireapp/forks
smatting 7aa419f
Add docs with workflow hints when upgrading
smatting c4faef6
Apply suggestions from code review
smatting c6a75e0
Apply suggestions from code review
smatting File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| with-compiler: ghc-8.10.7 | ||
| with-compiler: ghc-9.2.4 | ||
|
|
||
| packages: | ||
| libs/api-bot/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Upgrading | ||
|
|
||
| Here are some workflow suggestions when you're trying to upgrade packages (or GHC) in wire-server. | ||
|
|
||
| - Use and install https://github.com/maralorn/nix-output-monitor when building nix derivations locally. It shows you the dependency tree building as well as the progress. This can give you a feeling how much progress you've made. | ||
|
|
||
| - The `.envrc` environment probably won't load anymore. To fix this adjust the for packages that get passed to `shellFor` in `wire-server.nix`. In the beginning you might want to start out with an empty list as an argument. | ||
|
|
||
| - You can explore our nix derivations via `nix repl` and then `:l ./nix` to load the attrset in `./nix/default.nix`. For example to see which version of `aeson` will be used you can evaluate `wireServer.haskellPackages.aeson.version`. TAB-autocompletion also tells you if multiple versions of a package are included in the `nixpkgs` pin, e.g. `aeson_1_5_6_0`, `aeson_2_1_1_0`, which can be used in `manual-overrides.nix` to overwrite the default, e.g. `aeson`. | ||
|
|
||
| - Your goal is to make all packages compile again with nix. Start small by trying to build single packages, e.g. `wire-api` or any external dependencies. | ||
| ``` | ||
| nix-build ./nix -A wireServer.haskellPackagesUnoptimizedNoDocs.wire-api | ||
| ``` | ||
|
|
||
| - When a dependency doesn't build anymore because of unmet version constraints see if you can use a never version (`haskell-pins.nix`, or `manual-overrides.nix` if multiple versions of the package are included in the `nixpkgs` pin). Also check out the git repo or issue tracker of the dependency to find forks that work. You can also try removing versions constraints of packages: see `doJailbreak` in `manual-overrides.nix`. | ||
|
|
||
| - If test-suites of a dependency don't compile, or cannot be run because they require IO interaction you can disable them: see `dontCheck` in `manual-overrides.nix` | ||
|
|
||
| - To force a rebuild of the nix shell delete the `.env` directory and run `direnv reload` | ||
|
|
||
| - If you need to fix code in a dependency consider forking it and creating a PR to the upstream after successful integration. Clone the repo and then symlink it inside `libs/` then run `generate-local-nix-packages.sh` to temporarily include its dependencies in the development shell. Make sure to include the package in `shellFor`. If you've got a working shell you can check the output of `ghc-pkg dump` to see the list of nix-provided ghc packages used by cabal. | ||
|
|
||
| - Consider using `ghcid --command "cabal repl <package>"` when fixing packages | ||
|
|
||
| - Delete the `dist-newstyle` directory everytime you upgrade the nix environment, without any exception. That is because cabal does not pick up changes to the `ghc-pkg` set (defined the development shell). Cabal will complain about missing dependencies in these cases. | ||
|
|
||
| - When trying to build any packages with cabal (e.g. for fixing code in a depencency or fixing local packages), make sure you've got the right package set in the `shellFor` argument and the right transitive dependencies in `cabal.project`. It takes a couple of tries to get both: a nix provided environment that works, and cabal not complaining about missing dependencies when building inside the environment. | ||
|
|
||
| - It might happen that a package's test suite dependencies are not available in the nix environment. When you try to build with cabal it might try to build these external dependencies (which you want to avoid). What might work in these cases is to temporarily update the `default.nix` file (generated by `generate-local-nix-packages.sh`) to add the test suits dependencies to the library section. | ||
|
|
||
| - If cabal is complaining about a missing `libsodium`, add `sodium-crypt-sign` to the `shellFor` environment. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.