Skip to content

Package author and name are not case sensitive. #41

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

Open
rupertlssmith opened this issue Aug 25, 2017 · 2 comments
Open

Package author and name are not case sensitive. #41

rupertlssmith opened this issue Aug 25, 2017 · 2 comments

Comments

@rupertlssmith
Copy link

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?

@gdotdesign
Copy link
Owner

Thanks for bringing this up! 👍

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

@rupertlssmith
Copy link
Author

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.

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

2 participants