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

Pulling SRP from wrong repository #10737

Open
jasagredo opened this issue Jan 10, 2025 · 3 comments
Open

Pulling SRP from wrong repository #10737

jasagredo opened this issue Jan 10, 2025 · 3 comments

Comments

@jasagredo
Copy link
Collaborator

Describe the bug

I'm not sure how I triggered this, but I got the following after doing a major rebase of my current branch:

➜ cabal build all
remote: Enumerating objects: 491, done.
remote: Counting objects: 100% (259/259), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 491 (delta 220), reused 233 (delta 215), pack-reused 232 (from 2)
Receiving objects: 100% (491/491), 180.39 KiB | 1.69 MiB/s, done.
Resolving deltas: 100% (240/240), completed with 71 local objects.
From github.com:IntersectMBO/ouroboros-consensus
 + 7993903f5...c1fafb367 bolt12/reusable-diffusion-3 -> origin/bolt12/reusable-diffusion-3  (forced update)
 * [new branch]          coot/public-network-state -> origin/coot/public-network-state
 + 2e5d4d875...6b0701bc3 fraser-iohk/one-era-gen-tx-id-bytestring -> origin/fraser-iohk/one-era-gen-tx-id-bytestring  (forced update)
 * [new tag]             release-ouroboros-consensus-0.22.0.0 -> release-ouroboros-consensus-0.22.0.0
 * [new tag]             release-ouroboros-consensus-cardano-0.21.0.0 -> release-ouroboros-consensus-cardano-0.21.0.0
 * [new tag]             release-ouroboros-consensus-diffusion-0.19.0.0 -> release-ouroboros-consensus-diffusion-0.19.0.0
 * [new tag]             release-ouroboros-consensus-protocol-0.10.0.0 -> release-ouroboros-consensus-protocol-0.10.0.0
fatal: Could not parse object 'fb9b71f3bc33f8de673c6427736f09bf7972e81f'.

with this cabal.project excerpt:

...

source-repository-package
  type: git
  location: https://github.com/IntersectMBO/cardano-base.git
  tag: fb9b71f3bc33f8de673c6427736f09bf7972e81f
  subdir:
    cardano-crypto-class
  --sha256: sha256-ExQ497FDYlmQyZaXOTddU+KraAUHnTAqPiyt055v0+M=

The output seems to indicate it tried to pull that reference from the project git repo, instead of from the one indicated in the SRP.

A rm -rf dist-newstyle and cabal build all succeeded in pulling the right git refs from the right repos.

To Reproduce

I don't have a reproducer yet.

System information

  • Operating system: Windows 11 24H2, MSYS2 CLANG64
  • cabal 3.12.1.0, ghc 9.6.6
@philderbeast
Copy link
Collaborator

I see the --sha256: comment. If that is for haskell.nix, Updo can generate a sha256map.

@jasagredo
Copy link
Collaborator Author

jasagredo commented Jan 10, 2025

It is indeed for haskell.nix. Can Updo generate the sha256 without having Nix on the system? I am on Windows (which has no Nix) so I always struggle to generate those.

EDIT: Ah I see it ends up calling nix-prefetch-git so no luck this time :'(

@philderbeast
Copy link
Collaborator

Yes you're right, it calls nix-prefetch-git. I haven't tried getting nix-prefetch-git, the bash script, to work on Windows outside of nix. I expect it would be a challenge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants