elm-package icon indicating copy to clipboard operation
elm-package copied to clipboard

Add support for bitbucket and gitlab

Open robinheghan opened this issue 9 years ago • 18 comments
trafficstars

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.

robinheghan avatar Feb 08 '16 00:02 robinheghan

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.

JoeyEremondi avatar Feb 08 '16 00:02 JoeyEremondi

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",

vjousse avatar May 16 '16 18:05 vjousse

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.

sudhirvkumar avatar May 16 '16 21:05 sudhirvkumar

@JoeyEremondi Could it be an idea to just make elm-package use git directly?

robinheghan avatar May 19 '16 23:05 robinheghan

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.

JoeyEremondi avatar May 20 '16 00:05 JoeyEremondi

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 ?

antoinerey avatar Aug 11 '16 14:08 antoinerey

I want this feature too. Any updates about that ?

ben181231 avatar Aug 17 '16 18:08 ben181231

No. And experience does not suggest that asking more often will make it happen earlier.

jvoigtlaender avatar Aug 17 '16 20:08 jvoigtlaender

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.

b123400 avatar Aug 22 '16 11:08 b123400

What's up about this? I use gitlab and I am forced to write a dummy value in the repository field.

real-felix avatar Oct 22 '17 08:10 real-felix

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

b123400 avatar Oct 22 '17 08:10 b123400

@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.

zwilias avatar Oct 22 '17 10:10 zwilias

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 avatar Mar 16 '18 04:03 Spaxe

@Spaxe this will be fixed in 0.19

robinheghan avatar Mar 16 '18 14:03 robinheghan

Thanks, good to know. Maybe this needs a ref

Spaxe avatar Mar 17 '18 21:03 Spaxe

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.

SergKam avatar Jun 06 '18 21:06 SergKam

@Skinney can it be closed now that 0.19 is out? I didn't find anything regarding this issue in the changelog though.

Mouvedia avatar Aug 21 '18 13:08 Mouvedia

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.

robinheghan avatar Aug 21 '18 13:08 robinheghan