-
Notifications
You must be signed in to change notification settings - Fork 701
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
Local name for source-repository-package? #8039
Comments
For the first question, add this to your .cabal file:
|
You can upload packages without dependencies being on Hackage. It's not a good idea as the package will be unbuildable. If I understand what you are trying to do, you could rename the fork of your dependency and upload it, if it's meant to be permanent solution. Adding
Another solution is to use internal libraries or just vendoring the sources as is. e.g. Keep it simple. |
Thanks for the answers so far. I'd like to fill in some of the gaps in the docs around this if that's OK. |
Yes, please do! |
Could Cabal produce a warning when running Seems like this could lead to errors when the CI uses |
I think we can close this as the initial questions have been resolved. |
(with regards to "Could Cabal produce a warning when running cabal sdist about source-repository-package being ignored?" i don't think that would be a good approach. I've worked on plenty of packages that are both designed for sdist and also happen to have some pinned source-repository-package stuff specific to a local development or ci environment) |
With
cabal sdist
gettingghc-corroborate
ready for upload to hackage, how do I include the source forghc-tcplugins-extra
from a renamed fork and how do I includecabal.project
? Is hackage hermetic, can we only upload packages with the full set of dependencies already on hackage? So far the candidate package has uploaded without hackage complaining.It looks like we can use non-hackage dependencies #2189 (also #5351). In this case I want avoid a dependency on hackage and use a fork of it.
I have a hunch I can alter the project file to make this happen but I can't follow the docs. If add
source-repository-package
to the project can I drop the git submodule?In Specifying Packages from Remote Version Control Locations I cannot see a way to use a local name different to the repo name.
Here's what I've tried by way of
cabal sdist
:I can't quite follow the last error message. Isn't
ghc-corroborate
a package as it has its ownghc-corroborate.cabal
file?The error phrasing of "component library" to refer to a component that is a library is confusing (can we not use the library's name in the error message?). I can report the manual doesn't mention "component library" but does mention "library component".
cabal/cabal-install/src/Distribution/Client/CmdSdist.hs
Lines 311 to 313 in c72b866
The text was updated successfully, but these errors were encountered: