-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Error when the source-url is wrong-ish and does not end in .git is LTA #383
Comments
.git is absolutely required. How else can you figure out what to use to download a given url without doing something unacceptable like trying to download it with multiple getters and guessing which one worked? |
Also if zef could just guess what the type was it would just use the appropriate adapter in the first place instead of providing a hint |
@ugexe that's quite clear and it's tested when they're added to the ecosystem. But either in CPAN, or due to any other unexpected issue, it can be wrong. So maybe the error should point in that direction. |
Again, how is it supposed to point you in the right direction? And if it would why wouldn't it just Do The Right Thing? How can it tell if "http://foo.com/blarg" is actually a git repository and not anything else (something that might be understood with a plugin) without downloading it? How does it do these things when using plugins that may or may not add the functionality required to parse some given uri? My point being is that even though it sounds nice to have doesn't mean it can be done without either an insane amount of effort, breaking consistency elsewhere, hard coupling, or maybe not at all -- when this can more appropriately be handled at the ecosystem level. If you are suggesting it is broken $somewhere_else, then why not fix the problem $somewhere_else instead? |
Context
See tony-o/raku-fez#11
The file it can't extract from is the (wrongly set) web page https://github.com/tony-o/raku-fez, and the file it can't extract from is then a web site.
Expected Behavior
Well, this one is really tricking. We're talking about a source-url that is correct, that is one extension removed from the correct one which could actually be interpreted (ending in .git), so I would say it's, in general, almost impossible to know what's the intention of the author. It would really need fine-tuning of heuristics here. Maybe the heuristics should include looking at the extension in the URL and/or the type returned by the system.
Actual Behavior
An error stating they don't understand the downloaded URL, but it does not include the original URL, or says what it was looking for, or has any hints on the actual type.
Steps to Reproduce
.git
from thesource-url
in any distribution.zef install distro
Your Environment
0.9.4
The text was updated successfully, but these errors were encountered: