elm-github-install
elm-github-install copied to clipboard
Package author and name are not case sensitive.
I have the following in an elm-package.json:
"dependencies": {
"elm-lang/core": "5.0.0 <= v < 6.0.0",
"tsfoster/elm-heap": "2.1.0 <= v < 3.0.0"
},
This installs fine with elm-github-install, as it seems to just use the auther/package name in building a URL to access github.
When I try to install this with elm-pakcage
Error: Your .elm/packages/ directory may be corrupted. I was led to believe that
tsfoster/elm-heap existed, but I could not find anything when I went to look up
the published versions of this package.
The actual package name is 'TSFoster/elm-heap'.
It seems that to elm-make, elm-reactor and elm-publish the case sensitivity of the author and package name is important.
This causes a problem, as I am in the habit of using elm-github-install instead of elm-package install for the extra flexibility it gives me, but if I am not careful this can lead to publishing an elm-package.json that is invalid.
It would be better if elm-github-install enforced the same behaviour as the core elm tools?
Thanks for bringing this up! :+1:
It would be better if elm-github-install enforced the same behaviour as the core elm tools?
In this case yes.
There are two things here:
- there is no central repository where we could check the name
- we need to check if the package name is different than the git url without including the github API since every git repository can be used not just github
I think I might also raise this as an issue against elm-package - as elm-package publish lets you publish an invalid elm-package.json. However, elm-make is capableof detecting that the package name is wrong since it fails like above. It might be helpful to the consistency of the published packages if elm-package publish were to re-scan and check that all the dependencies correctly match up to already published packages, then the mistake would be caught at that time.