-
Notifications
You must be signed in to change notification settings - Fork 696
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
source-repository-package branch failure #6888
Comments
An example output
and looks like we have an unsolved TODO cabal/cabal-install/Distribution/Client/VCS.hs Lines 628 to 629 in 5ce6b08
|
For anyone else who arrives at this, you can work around it by |
- Temporarily remove Elm generation, due to library incompatibility. - Override some package bounds, including overly broad changes for base and template-haskell. - Use pre-release of Streamly, requiring a small change to adapt to generalisation of `postscanlM'`, and introducing a lot of deprecation warnings. - Use an unmerged fork of Servant. Necessary to make my own copy due to haskell/cabal#6888.
After all this time, I have suddenly accidentally discovered that Admittedly, now that I look, the documentation clearly states:
So this issue isn't quite as high priority as I'd thought. Would still be nice though! |
@georgefst What if you aren't specifying |
Well, then, as it stands, you can't use |
I see, thanks for the clarification. (I got confused because the example at the top of this issue uses a branch, not a tag, and it's exactly the usecase I'm concerned about.) |
I also came across this. On searching for the error packages: *
source-repository-package
type: git
location: [email protected]:purebred-mua/purebred-email.git
tag: 19e06063d03c477f33f3add82c1b4f7c6e77b801 |
I think "tag" is an attempt to use VCS-agnostic terminology. But it is a little confusing since Git has its own separate concept of a "tag". |
maybe "revision" would be a more appropriate name (though changing it is probably more pain than it's worth) |
Strongly agreed! |
Personally I don't agree. |
Fair enough, I can see the argument. This is getting very off-topic though. |
This wouldn't be weird at all. I would prefer to specify both branch and tag (aka revision), if it meant that cabal would only fetch that specific branch and the changes in it. Most of the time this is the behavior I want, I don't want the whole repository. |
Specifying the branch has no relation to how much of the repository cabal (or rather git run by cabal) will fetch. |
I'm aware of that, but it should is what I was trying to get at. |
Hmm, should it? I don't see the connection between specifying the branch name and how much of the repository cabal should fetch. |
Oh, it absolutely does (or can). Instead of doing a full clone, you would just do something like
Instead of fetching all the branches and tags and all revisions in the repo, that gives you just that branch, its files, and its history - which can save significantly on time, bandwidth, and disk space. As an example, this is how nix typically clones git repos and it is able to clone repos much more rapidly than stack or cabal, both of which have to do a full clone because you can only specify the revision you want. Some hardliners would argue that this is the way that git (and other DVCSs) is meant to be used. |
Yes indeed that would be a nice feature. The reason that I said I don't see the connection is that commit hashes can be shallow-fetched too, not just branches or tags:
EDIT: I was mistaken that this functionality had been removed from git.
|
EDIT: this comment is now somewhat redundant |
Update: it is possible to shallow-fetch commit hashes, as long as the server enables support for it, which GitHub does, for example, and as long as you use the full, unabbreviated commit hash. See my edits above. |
Yes, you can do that as long as the commit is on the default branch. As far as I'm aware, if it is not on the default branch, then it will not work. |
Here's an example of fetching from a commit that is on
|
(Admittedly you can only fetch commits that are on some branch, but that's a much less severe requirement.) |
Holy cow! I wish all tools did it this way! The amount of time I've spent waiting for both stack and cabal to do full clones of git repos can literally be counted in days. If they did this that would probably cut it down to less than an hour. |
Yeah, this feature seems desirable and simple enough that I'm willing to proclaim I want to implement it (but then probably not actually implement it). |
hi, after #7625 the code started to use
i got:
It continues working with master. |
(actually revs not tags) to work around haskell/cabal#6888
I finally got sufficiently annoyed by this issue that I decided to fix it..... (at least for git repos) |
Same here, it is making hard to run the pipeline in HLS with LSP package changed |
With:
at the top of my
cabal.project
, I get the failurefatal: '--detach' cannot be used with '-b/-B/--orphan'
. Unclear what's causing this. It works fine withmaster
.git
version is2.7.4
, which is pretty old (can't upgrade right now on my work machine), so if that's the issue, I'll just work around it.The text was updated successfully, but these errors were encountered: