elm-package
elm-package copied to clipboard
Add support for bitbucket and gitlab
Is there any reason why a package has to be made available on github? Could bitbucket and gitlab be supported?
Mostly asking because I use gitlab for everything, but I also assume that being host independent would be a good thing.
It's probably possible, but we'd need to account for the different sites APIs for downloading packages, and it's just not at the top of the priority list.
Elm-package works entirely on tags, so what you can do is work using GitLab or BitBucket, then push your tags to GitHub and elm-package publish them.
On Sun, Feb 7, 2016 at 4:15 PM, Robin Heggelund Hansen < [email protected]> wrote:
Is there any reason why a package has to be made available on github? Could bitbucket and gitlab be supported?
Mostly asking because I use gitlab for everything, but I also assume that being host independent would be a good thing
— Reply to this email directly or view it on GitHub https://github.com/elm-lang/elm-package/issues/189.
I'm facing the same problem here as my application is hosted on gitlab.
I'm not developing an open-source package, but just my own application containing an elm-package.json for dependencies.
When doing elm package install, I've got the following error:
elm package install
Error: Error reading file elm-package.json:
Problem with the `repository` field.
The given domain does not start with <https://github.com/>
I expect elm package install to work as npm install does, so I don't see why it relies on the repository field for the install task.
I have to put a dummy repository for my install to work like that:
"repository": "http://github.com/whatever/whatever.git",
Yes, Support for bitbucket and bitlab repositories will be appreciated and also we need a way to publish private packages as that will help with client packages which can't be open source. And the beauty is SemVer of private packages.
I am planning to build custom elm-package which will support this feature. Would love if we had this feature in the official elm binaries.
@JoeyEremondi Could it be an idea to just make elm-package use git directly?
These are all important ideas, but nothing is going to change without a proper proposal that addresses the issues with these.
I agree that it's silly that we need a dummy repo just to install a project.
But, for example, if we allow arbitrary Git repos, how do we enforce SemVer? How do we avoid publishing a package to the central repo that isn't on GitHub?
I'd take a look at the feature request guidelines. Someone can write up a full proposal for this, and discuss it on elm-dev.
In particular, focus on why this is a blocker for you i.e. why it is stopping you from using Elm today.
For what it worth, here is my experience.
I'm currently learning Elm, I started something like two days ago and loving it for now. To practice, I wanted to start a small project, nothing too fancy, just a Pomodoro timer.
In the meantime, I wanted to try GitLab. This new side project was the perfect opportunity.
And here I am.
At first, I thought that repository field in my elm-package.json was not a correct git url, and that Elm was throwing at me some kind of outdated error message. But nah. So, I went to the Slack channel to get informations and someone pointed this issue to me.
That's obviously not a real problem in my case, but that was disappointing.
Is there any news about this ?
I want this feature too. Any updates about that ?
No. And experience does not suggest that asking more often will make it happen earlier.
As a package manager, I think it does not make sense to limit where the package is hosted, especially given git is designed to be decentralised.
As mentioned by @JoeyEremondi, elm depends on tag for downloading package, but this does not mean we have to use Github api directly. For example it can be done by
git ls-remote --tags [email protected]:elm-lang/elm-compiler.git
Is there any other Github specific feature that elm is relying on? I'd be more than happy to contribute.
What's up about this? I use gitlab and I am forced to write a dummy value in the repository field.
FYI there is a third party package manager that installs packages from any git repo, I have not try it though. https://github.com/gdotdesign/elm-github-install
@Boiethios The repository field is only relevant for packages, not for applications. I'd recommend just leaving it as the default. As far as I know, it will be removed for applications in 0.19.
The issue here is not whether elm-package can live on Bitbucket or Gitlab, but recognise that some people may have internal projects under development that are not yet ready to be open-sourced, and they need the repository url for their build system.
also, there is no support for applications that will never become a library. NPM has a field now called private, and it prevents accidental publishing code that isn't intended to be a library for use.
It's silly that the project will not even compile without the url starting with the regex https?://github.com/. What if my repo link is [email protected]:Spaxe/test.git? (which by the way, is a valid GitHub link!)
@Spaxe this will be fixed in 0.19
Thanks, good to know. Maybe this needs a ref
Looking at the header of GitHub now makes me sad. :( We are moving out. This issue becoming more global and urgent for my Elm projects.
@Skinney can it be closed now that 0.19 is out? I didn't find anything regarding this issue in the changelog though.
As far as I know, projects are still tied to github for publishing. My "this will be fixed in 0.19" comment was regarding users needing to specify a github url in their elm.json file.