Open gamemaker1 opened 3 years ago
Taking a crack at this issue, will link a PR for it shortly!
I thought you actually tried importing http-negotiator
, in which case what you expected to see was an error message telling you that was an invalid module name.
The fact that it told you the module doesn't exist when you tried importing http_negotiator
was perfectly valid, since it didn't exist.
The fact that it told you the module doesn't exist when you tried importing http_negotiator was perfectly valid, since it didn't exist.
I agree. It is valid since it does not exist, but it is confusing that it 'renames' the module you are searching for when it says it cannot find the module.
Also, I do not see any reason why any underscores in the module name should be converted to dashes, especially since dashes are pretty much invalid in V.
Please let me know if there's something I've missed.
Thanks!
It's only a problem if github (or whatever repo system houses the module) doesn't allow underscores.
I don't think even that is a problem - the final download happens using git clone --depth=1 $mod.url
OR hg clone $mod.url
:
// -- From /cmd/tools/vpm.v
vcs_install_cmd := supported_vcs_install_cmds[vcs]
cmd := '$vcs_install_cmd "$mod.url" "$final_module_path"'
cmdres := os.execute(cmd)
The V tool does not even attempt to generate a URL based on mod name and author name, it simply uses the URL provided by the author when they create the module in VPM.
Let me know if I'm overlooking something that uses/benefits from this (replace underscores with dashes) behaviour.
Thanks
V version: V 0.2.2 012b3f0 OS: Linux; Arch Linux; 64 bit
What did you do? Ran
v install http_negotiator
(that module didn't exist when I ran the command)What did you expect to see?
Snake case while printing module name:
What did you see instead?
Kebab case instead: