Add `sync` command
This is my first take at a sync
command which upgrades GHCup (like upgrade
does) and installs all tools at the recommended version.
Closes #169 (nice)
Notes:
- The error-handling is pretty rudimentary. I'll have to thread all the
ExitCode
s together somehow. Advice on this would be appreciated; I'm not super familiar with the libraries here. - Right now, it only updates tools; it won't install new ones. It would be nice if it supported this.
- Should this command have all the options of the
upgrade
andinstall
commands? I think a nice set of defaults is fine, at least for a first release of this feature.
Edited by Rebecca Turner
Merge request reports
Activity
There's already:
ghcup upgrade ghcup run --install --ghc recommended --cabal recommended --stack recommended --hls recommended
Do we need another command that does almost the same?
Maybe, maybe not.
In general I'm also not entirely sure whether "sync" is a good naming.
I'm leaning more towards extending
ghcup upgrade
and making its behavior smarter.E.g.
ghcup upgrade --tools=<ghc|cabal|stack|hls|installed|all> --channel=<recommended|latest>
. But I'm not sold on the design yet.Another question is... we actually would want to upgrade the ghcup binary first, before installing e.g. GHC. We need a way to preserve all cli arguments and then invoke the new binary again.
Edited by Julian Ospaldadded typeimprovement label
Please register or sign in to reply