purescript / spago

🍝 PureScript package manager and build tool
BSD 3-Clause "New" or "Revised" License
793 stars 132 forks source link

`spago search-set` command #518

Open klntsky opened 4 years ago

klntsky commented 4 years ago

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 commented 4 years ago

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

f-f commented 4 years ago

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

klntsky commented 4 years ago

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

f-f commented 4 years ago

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

So the idea would be:

f-f commented 4 years ago

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

klntsky commented 4 years ago

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.

f-f commented 4 years ago

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