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

Bump aeson from 1.5.* to 2.0.* #120

Merged
merged 5 commits into from
Apr 19, 2022
Merged

Bump aeson from 1.5.* to 2.0.* #120

merged 5 commits into from
Apr 19, 2022

Conversation

ReinierMaas
Copy link
Contributor

@ReinierMaas ReinierMaas commented Mar 29, 2022

XRef: #118

This is the first try to overwrite the packages such that stack can compile with aeson 2.0.* available.

This adds a Haskell overlay in the process.

This overwrites the minimal set of packages in the ./nix/haskell-overlay.nix to enable aeson 2.0.*.


The current state is that the dependencies compile but the package itself needs to be modified to work with the updated aeson package.

$ nix run -c stack build
vaultenv-real> build (lib + exe)
Preprocessing library for vaultenv-real-0.14.0..
Building library for vaultenv-real-0.14.0..
Preprocessing executable 'vaultenv' for vaultenv-real-0.14.0..
Building executable 'vaultenv' for vaultenv-real-0.14.0..
[1 of 2] Compiling Main [SecretsFile changed]

/home/reinier/channable/vaultenv/app/Main.hs:156:65: error:
    • Couldn't match type: Data.Aeson.KeyMap.KeyMap Aeson.Value
                     with: HashMap Text Aeson.Value
      Expected: HashMap Text Aeson.Value
        Actual: Aeson.Object
    • In the second argument of ‘mapMaybe’, namely ‘obj’
      In the first argument of ‘MountInfo’, namely
        ‘(mapMaybe (\ v -> parseMaybe getType v) obj)’
      In the second argument of ‘($)’, namely
        ‘MountInfo (mapMaybe (\ v -> parseMaybe getType v) obj)’
    |
156 |         pure $ MountInfo (mapMaybe (\v -> parseMaybe getType v) obj)
    |                                                                 ^^^

--  While building package vaultenv-real-0.14.0 (scroll up to its section to see the error) using:
      /home/reinier/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2 --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-3.4.1.0 build lib:vaultenv-real exe:vaultenv --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

@ReinierMaas ReinierMaas self-assigned this Mar 29, 2022
@ReinierMaas ReinierMaas changed the base branch from master to ghc-8.6.5-to-9.0.2 March 29, 2022 16:42
@ReinierMaas ReinierMaas changed the title Bump GHC from 8.6.5 to 9.0.2 Bump aeson from 1.5.* to 2.0.* Mar 29, 2022
@ReinierMaas
Copy link
Contributor Author

ReinierMaas commented Mar 31, 2022

I couldn't get static binary to work on this branch so am currently building that on the master branch to see if it was working on my machine. I will then work my way up to the GHC migration branch and get it to compile there with the newer stackage LTS version and necessary Hackage snapshot. Later I can try to make it compile with this branch where certain packages are overridden.


Update this didn't work on master.

@ReinierMaas ReinierMaas marked this pull request as ready for review March 31, 2022 12:51
Copy link
Member

@crtschin crtschin left a comment

Choose a reason for hiding this comment

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

LGTM

@ReinierMaas
Copy link
Contributor Author

@OpsBotPrime merge

@OpsBotPrime
Copy link
Contributor

Merge rejected: the target branch must be the integration branch.

@ReinierMaas
Copy link
Contributor Author

Yes merge bot, I want to merge both branches at once...

@ReinierMaas ReinierMaas changed the base branch from ghc-8.6.5-to-9.0.2 to master April 19, 2022 13:46
@ReinierMaas
Copy link
Contributor Author

@OpsBotPrime merge

@OpsBotPrime
Copy link
Contributor

Pull request approved for merge by @ReinierMaas, rebasing now.

ReinierMaas and others added 5 commits April 19, 2022 15:47
This is done in preperation of moving to `aeson 2.0.*`.
This adds a Haskell overlay in the process.
Approved-by: ReinierMaas
Auto-deploy: false
@OpsBotPrime
Copy link
Contributor

Rebased as 4cd7431, waiting for CI …

@OpsBotPrime OpsBotPrime merged commit 4cd7431 into master Apr 19, 2022
@ReinierMaas ReinierMaas deleted the aeson-1.5.--to-2.0.- branch April 19, 2022 13:57
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.

3 participants