-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
tools.vpm: support again http
installs when installing from an url (workaround)
#19914
Conversation
Please also add a test for |
One could argue that we shouldn't be supporting |
Yep, I'm fine with not having it merged but when we say http support has ended instead. |
Yes, but we are using it here as a workaround, for a more fundamental problem, that will need lots of discussions and decisions, while @Wertzui123 and lots of others that depend on that quirk will be waiting/blocked otherwise :-| . Github redirects to https anyways:
|
http
installs when installing from urlhttp
installs when installing from an url (workaround)
http
installs when installing from an url (workaround)http
installs when installing from an url (workaround)
Updated as discussed. Though with the deprecation warning of |
@Wertzui123 Regarding the deprecation of http: to retain the behavior of the install location and resolve the warning, you can already register the module as vpm module and install it directly via the identifier Restoring the old behavior imho remains restoring an exploit. URL installs were programmed with the intention to be installed into the global namespace. That's how URL installs were understood and used by common modules like v-analzyer. It was a bug that paths of |
name := get_name_from_url(ident) or { | ||
is_http := if ident.starts_with('http://') { | ||
vpm_warn('installing `${ident}` via http. | ||
${' '.repeat('warning: '.len)}`http` support is deprecated, switch to `https` to ensure future compatibility.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just use vpm_warn 2 times?
Ok thank you. I published the library back when VPM was broken for a while so I never registered it there. Yet I still think URL installs should not install the module to the global namespace and instead they should contain the authors name. |
Yes, it likely will go in that direction. For now - with the recently added version install feature - the tiny advantage of two different install locations is that you can install different versions already, one via url one via the vpm registry. Handling of multiple installed versions under a central install location will eventually be implemented, it's not a prio atm. |
Until we make a decision on eventual changes of the default install location of url installs this enables http installs to work like https installs.
🤖[deprecated] Generated by Copilot at 436b7c4
Improve
vpm
tool by refactoring tests, adding a new test case, and supporting bothhttps
andhttp
URLs for module installation.🤖[deprecated] Generated by Copilot at 436b7c4
vpm
to install modules fromhttp
URLs (link)test_install_from_git_url
tocommon.v
to avoid duplication (link)vsl
fromhttps
URL (link)