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

Use Cardano Haskell package repository ("CHaP") #797

Merged
merged 21 commits into from
Nov 21, 2022
Merged

Use Cardano Haskell package repository ("CHaP") #797

merged 21 commits into from
Nov 21, 2022

Conversation

andreabedini
Copy link
Contributor

This PR replaces most source-repository-package stanzas in cabal.project with packages fetched from our Cardano Haskell package repository.

Unfortunately some packages in CHaP still have broken version bounds so we need to manually specify a bunch of constraints to make sure we have a plan we can build.

I still need to revisit the documentation in CONTRIBUTING.

Copy link
Contributor

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Great stuff, hopefully the constraints will die in due course.

cabal.project Outdated Show resolved Hide resolved
@andreabedini
Copy link
Contributor Author

the failure doesn't seem to have anything to do with CHaP

unpacking sources
unpacking source archive /nix/store/0fhy2yp7avaaxcvvk7iw9y4zz9zzxbsp-plutus-apps-root-playground-common-test-playground-common-test-root
source root is plutus-apps-root-playground-common-test-playground-common-test-root
patching sources
building
all tests
  Auth.TypesSpec
    OAuthToken JSON handling
      should be able to parse a github response: FAIL
        Exception: /nix/store/swckk3qwxhhii52wird3gb61698gwc4l-playground-common-test-playground-common-test-1.0.0.0-data/share/ghc-8.10.7/x86_64-linux-ghc-8.10.7/playground-common-1.0.0.0/test/oAuthToken1.json: openBinaryFile: does not exist (No such file or directory)
        Use -p '/should be able to parse a github response/' to rerun this test only.
  Schema
    toSchema
      Encoding of various types:                 OK
    toArgument
      Encoding of various types:                 OK
  TH
    Schemas compile as expected:                 OK
  mkKnownCurrencies
    Serialisation:                               OK

1 out of 5 tests failed (0.04s)```

@koslambrou
Copy link
Contributor

the failure doesn't seem to have anything to do with CHaP

That's the same error as #757 which tries to bump haskell.nix and hackage.nix. Is using CHaP making us use a more recent version of those packages?

@michaelpj
Copy link
Contributor

Andrea just bumped haskell.nix in this PR also, so it probably has the same bug as that one. Needs a newer haskell.nix. Ideally we just fix that other PR soon!

@andreabedini
Copy link
Contributor Author

andreabedini commented Nov 14, 2022

WUT? I force pushed and GitHub closed the PR. 🤷 I cannot reopen it. I'll open a new PR.

Edit: oh I see what happened, git commit failed with the ususal No .pre-commit-config.yaml file was found and I didn't notice, so when I force-pushed I had reset the branch to the same commit as main. Which GitHub took as "closing the PR". 🤷

-- Should follow cardano-node
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-config
tag: 1646e9167fab36c0bff82317743b96efa2d3adaa

-- Should follow cardano-wallet.
-- This is needed because we rely on an unreleased feature
-- https://github.com/input-output-hk/cardano-ledger/pull/3111
Copy link
Contributor

Choose a reason for hiding this comment

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

🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding insult to the injury, cardano-ledger just got a new release out and that feature is not included 😭

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, their new release is based on functionality that was done on August. Not really up to date. Don't know why though.

cabal.project Outdated Show resolved Hide resolved
cabal.project Outdated Show resolved Hide resolved
cabal.project Show resolved Hide resolved
@andreabedini andreabedini marked this pull request as draft November 14, 2022 12:33
CONTRIBUTING.adoc Outdated Show resolved Hide resolved
CONTRIBUTING.adoc Outdated Show resolved Hide resolved
@andreabedini
Copy link
Contributor Author

I had to reintroduce a srp for cardano-node because cardano-git-rev cardano-submit-api trace-dispatcher trace-resources trace-forward were not released to chap along with cardano-node 1.35.4. Hopefully this is only temporary.

@michaelpj
Copy link
Contributor

I had to reintroduce a srp for cardano-node because cardano-git-rev cardano-submit-api trace-dispatcher trace-resources trace-forward were not released to chap along with cardano-node 1.35.4.

Are those packages that we depend on, or ones that the released packages depend on? We could probably release those now if they should have been released.

@michaelpj
Copy link
Contributor

Can we move to the Hackage quickcheck-dynamic now, perhaps?

@andreabedini
Copy link
Contributor Author

@michaelpj

Are those packages that we depend on, or ones that the released packages depend on? We could probably release those now if they should have been released.

we use cardano-submit-api in plutus-example, the other ones are transitive. We just released trace-dispatcher and trace-forward which are the critical ones.

@andreabedini
Copy link
Contributor Author

Can we move to the Hackage quickcheck-dynamic now, perhaps?

yes but it's not entirely trivial, we have ticket for that PLT-1239

@andreabedini
Copy link
Contributor Author

I think this is the best we can do for the moment.

@andreabedini andreabedini marked this pull request as ready for review November 17, 2022 10:14
Copy link
Contributor

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

We'll need to resolve the ledger issue before we can publish plutus-apps libs to CHaP, and also there's going to be a lot of local recompilation for folks still until we do, but I agree this is the best we can do for now 👍

CONTRIBUTING.adoc Outdated Show resolved Hide resolved
cabal.project Outdated Show resolved Hide resolved
cabal.project Show resolved Hide resolved
-- Should follow cardano-node
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-config
tag: 1646e9167fab36c0bff82317743b96efa2d3adaa

-- Should follow cardano-wallet.
-- This is needed because we rely on an unreleased feature
-- https://github.com/input-output-hk/cardano-ledger/pull/3111
Copy link
Contributor

Choose a reason for hiding this comment

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

Well, their new release is based on functionality that was done on August. Not really up to date. Don't know why though.

@andreabedini andreabedini merged commit 7d3687d into main Nov 21, 2022
@andreabedini andreabedini deleted the chap branch November 21, 2022 03:20
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.

4 participants