-
Notifications
You must be signed in to change notification settings - Fork 691
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
Package fails to build only as source-repository-package dependency, only in certain contexts #8187
Comments
Could you paste somewhere a whole log of the failure with |
Where do I find this? (I have access to the contents of the |
I guess, run |
I have access to the contents of the |
Sure, no rush. Actually, that reminds me, that should be |
From {
"type": "configured",
"id": "shggth-0.1-36793c2f",
"pkg-name": "shoggoth",
"pkg-version": "0.1",
"flags": { "install-agda": false },
"style": "global",
"pkg-src": {
"type": "source-repo",
"source-repo": {
"type": "git",
"location": "https://github.com/wenkokke/shoggoth",
"tag": "949a43cab17aff6d49653d24e1a021898a7d4aa4"
}
},
"pkg-src-sha256": "00d0a4828642f84c5cf3ab8b3fd0099eb5f3be5286ae4072c8c1a7b20f25db5f",
"depends": [
"sn-1.5.6.0-02421f7e",
"base-4.14.3.0",
"bmp-0.4.0-c817ea12",
"bytestring-0.10.12.0",
"chrstdtct-1.1.0.2-5d452a9b",
"ctprc-0.7-afbd1683",
"containers-0.6.5.1",
"dt-dflt-clss-0.1.2.0-5baedbb4",
"directory-1.3.6.0",
"dclyt-0.4-b5c764c2",
"flmnp-0.3.6.3-e0a1956a",
"filepath-1.4.2.1",
"frntmttr-0.1.0.2-35388d2a",
"hsmn-1.0.3-60c416c2",
"hsss-0.8.0-29b5c336",
"mtl-2.2.2",
"pndc-2.18-b040173e",
"pndc-typs-1.22.2-6734c9bf",
"shk-0.19.6-9ed18ffb",
"tgsp-0.14.8-b536f052",
"text-1.2.4.1",
"txt-c-0.7.1.0-21406b30",
"txt-rgx-rplc-0.1.1.4-7200ae66",
"time-1.9.3",
"transformers-0.5.6.2",
"nrdrd-cntnrs-0.2.19.1-6baae5d4",
"vctr-0.12.3.1-1402bc13",
"yml-0.11.8.0-c27ff54c"
],
"exe-depends": [],
"component-name": "lib"
}, This might indicate that the issue is a consequence of the fact that the package is installed globally, and the fact that the version number—which I have been leaving the same—takes precedence over the commit hash? |
Globally? Which package? That may break in so many ways, perhaps including the one you hypothesise. I've also heard removing stray |
Aeson is in the build plan with an older version: {
"type": "configured",
"id": "sn-1.5.6.0-02421f7e",
"pkg-name": "aeson",
"pkg-version": "1.5.6.0",
"flags": {
"bytestring-builder": false,
"cffi": false,
"developer": false,
"fast": false
},
"style": "global",
"pkg-src": {
"type": "repo-tar",
"repo": { "type": "secure-repo", "uri": "http://hackage.haskell.org/" }
},
"pkg-cabal-sha256": "5003bb6fd260d2e2d5a51dee2bf5c8e8f29e4e0e0288fef805c22dcc80ecab06",
"pkg-src-sha256": "0361c34be3d2ec945201f02501693436fbda10dcc549469481a084b2de22bfe8",
"depends": [
"ttprsc-0.13.2.5-0effffb7",
"base-4.14.3.0",
"bs-cmpt-bttrs-0.11.2-168a6838",
"bytestring-0.10.12.0",
"containers-0.6.5.1",
"dt-fx-0.3.2-dbb0ea8c",
"deepseq-1.4.4.0",
"dlst-1.0-34d69780",
"ghc-prim-0.6.1",
"hshbl-1.3.5.0-111dd363",
"prmtv-0.7.3.0-41733dbd",
"scntfc-0.3.7.0-50f80d3a",
"strct-0.4.0.1-0df4efd2",
"tggd-0.8.6.1-0ed977a4",
"template-haskell-2.16.0.0",
"text-1.2.4.1",
"th-bstrctn-0.4.3.0-51001f19",
"ths-1.1.1.1-a7262edc",
"time-1.9.3",
"tm-cmpt-1.9.6.1-58a8243f",
"nrdrd-cntnrs-0.2.19.1-6baae5d4",
"d-typs-1.0.5-ef0bbb42",
"vctr-0.12.3.1-1402bc13"
],
"exe-depends": [],
"component-name": "lib"
}, |
I suppose this could mean that, because I do not specify a lower bound, cabal picks an older version, and then reports the compile failure saying that the module that I am asking for only exists in the hidden package That would also explain why this error only occurs in certain contexts; some contexts might force the package to use a lower or higher version. It might be a good idea to have a specific error message for this case:
|
Yes, it's possible that's what is happening. Does providing a lower bound fix the original failures? I like your idea for improving the error message. Would you mind opening it as a separate feature request ticket? |
Describe the bug
A simple Haskell package with helper functions builds just fine, both as a standalone package and as a source-repository-package dependency in one context, but fails to build as a source repository package in a different context.
To Reproduce
Steps to reproduce the behavior:
cabal v2-build
The command fails with the following error message:
However,
aeson
is verifiably inbuild-depends
!Expected behavior
The package builds just fine, or at least fails with a different error message.
System information
Additional context
...
The text was updated successfully, but these errors were encountered: