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

Cabal is inconsistent: cabal check errors on git:// but cabal get is happy fetching these #10661

Open
phadej opened this issue Dec 20, 2024 · 7 comments

Comments

@phadej
Copy link
Collaborator

phadej commented Dec 20, 2024

See #10659

@ulysses4ever ulysses4ever changed the title Cabal is hypocritical: the cabal check errors on git:// but cabal get is perfectly happy fetching these. Cabal is inconsistent: cabal check errors on git:// but cabal get is happy fetching these Dec 20, 2024
@ulysses4ever
Copy link
Collaborator

The problem with moving the error to cabal get is that the user can't do anything about a Hackage package that uses git:// and that the user wants to get. Whereas at cabal check time you presumably have control over the package description and can fix the issue.

@geekosaur
Copy link
Collaborator

Is it possible to warn and ask for confirmation?

@ffaf1
Copy link
Collaborator

ffaf1 commented Dec 21, 2024

Is it possible to warn and ask for confirmation?

It would break many check-against-all-of-hackage scripts I fear.

@phadej
Copy link
Collaborator Author

phadej commented Dec 22, 2024

The problem with moving the error to ...

Do both

Whereas at cabal check time you

You don't. Some maintainer does, if they care.

It would break many check-against-all-of-hackage scripts I fear.

Offer a force flag. (c.f. git push)

@geekosaur
Copy link
Collaborator

And/or default to force if stdin or stdout isn't a tty.

@phadej
Copy link
Collaborator Author

phadej commented Dec 22, 2024

It would break many check-against-all-of-hackage scripts I fear.

EDIT: cabal get -s may fail anyway, if there are no repository info, or it's incorrect/obsolete.

@phadej
Copy link
Collaborator Author

phadej commented Dec 22, 2024

And/or default to force if stdin or stdout isn't a tty.

Then there should be a fag to make cabal get -s fail. Both are probably good to have, with default being less important then. But IMHO, if cabal check fails by default, so should cabal get -s.

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

4 participants