Skip to content
Snippets Groups Projects

Add `sync` command

Open Rebecca Turner requested to merge rebeccat/ghcup-hs:sync into master

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 ExitCodes 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 and install 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Rebecca Turner added 1 commit

    added 1 commit

    Compare with previous version

  • Rebecca Turner changed the description

    changed the description

  • Tests are failing but it doesn't look like it's due to my changes.

  • 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 Ospald
Please register or sign in to reply
Loading