spago icon indicating copy to clipboard operation
spago copied to clipboard

`spago search-set` command

Open klntsky opened this issue 6 years ago • 7 comments

We could add a command like this, that could be used to open https://spacchetti.github.io/starsuit/#search:%s in the browser, where %s is a search query.

klntsky avatar Dec 02 '19 12:12 klntsky

spacchetti/starsuit#1 is a blocker. We might add multiple tags, which will change the URL pattern.

klntsky avatar Dec 02 '19 12:12 klntsky

@klntsky I agree on having the command, but why open a remote webpage and not the local docs? (This would also avoid the blocker)

f-f avatar Dec 15 '19 05:12 f-f

Because we don't have everything that is in the set locally.

klntsky avatar Dec 15 '19 10:12 klntsky

Right. I was recently considering that downloading the whole package set for every project would actually be not that bad, because:

  • with the global cache you would just download it once
  • because of the above, starting projects offline would be totally feasible - it currently isn't because you'd have to download stuff if you wanted to use a library that is in the set but not cached, I got bitten by this recently

So the idea would be:

  • have spago install actually download all libraries in the set to the cache, and only copy to .spago the ones used in the project
  • unless people do spago search-set, which would copy all of them and generate docs locally

f-f avatar Dec 18 '19 10:12 f-f

Of course we could do both, e.g. default local and remote with spago search-set --remote

f-f avatar Dec 18 '19 10:12 f-f

have spago install actually download all libraries in the set to the cache, and only copy to .spago the ones used in the project unless people do spago search-set, which would copy all of them and generate docs locally

Downloading the whole set is not required for spago install, so it's better to do it before search-set.

Also, purescript/package-sets/issues/490 is still unresolved.

klntsky avatar Dec 18 '19 10:12 klntsky

Also, purescript/package-sets/issues/490 is still unresolved

Right, it's not yet implemented in package-sets CI, but it is almost solved in practice: basically we started having @spacchettibotti automatically upgrade dependencies in there (see e.g. https://github.com/purescript/package-sets/pull/547), and part of what it does is to run spago verify-set (which includes trying to ACME-build the whole thing as per the latest release) after trying to upgrade packages. Code here: https://github.com/spacchetti/spago/blob/b99fe06eaded5d73b63c188f43fea7892e6dced9/app/Curator.hs#L449-L454

So this check is not running on 100% of the PRs, but it is run every time there's a new release out of some package in the set, which is pretty often

f-f avatar Dec 18 '19 14:12 f-f