spago icon indicating copy to clipboard operation
spago copied to clipboard

Ability to install package from github or smth similar

Open xgrommx opened this issue 5 years ago • 9 comments

Hello! In bower I have some ability like installing package from github. For example: bower i user/packagename#hash

Will be nice to have this approach in spago

xgrommx avatar Sep 06 '19 21:09 xgrommx

@xgrommx Do you mean that you'd like to install a package from Github that isn't available in the package set already? If so you can add the package to your packages.dhall as described here - does that do what you want?

elliotdavies avatar Sep 10 '19 13:09 elliotdavies

@elliotdavies I mean that when I have my purescript code on github and I want to install it without publishing to spago packages.

xgrommx avatar Sep 10 '19 19:09 xgrommx

Adding your package to your local projects packages.dhall file doesn't require you to add it to the package set that spago uses.

JordanMartinez avatar Sep 10 '19 19:09 JordanMartinez

@JordanMartinez okay what if I want add several packages?

xgrommx avatar Sep 10 '19 21:09 xgrommx

You just do it multiple times (example)

JordanMartinez avatar Sep 10 '19 21:09 JordanMartinez

Or, if you want to override something... example

JordanMartinez avatar Sep 10 '19 21:09 JordanMartinez

@xgrommx did the above suggestions work for you?

As a sidenote, I wondered many times if it would make sense to add a command line helper to add/override packages, something like spago install https://github.com/slamdata/purescript-aff.git#master?

f-f avatar Sep 16 '19 13:09 f-f

@f-f I think this would be particularly helpful for identifying and adding the dependencies of the requested package, as using an override (at least the last time I attempted to use an override) requires identifying the dependencies of the override package manually.

I am very much in favor of such a command line helper.

Benjmhart avatar Nov 21 '19 16:11 Benjmhart

I like the idea of a command line helper but I think we should be aware that it takes us in the direction of a full set of commands to view and edit packages.dhall from the command line. So we probably end up with spago ls overrides, spago ls additions, spago remove https://github.com/slamdata/purescript-aff.git#master and so forth.

That would be lovely -- I would prefer it to editing packages.dhall. But it may be a chunk of work and I think if we start down that path we should have our eyes open.

JamieBallingall avatar Apr 12 '20 17:04 JamieBallingall