Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier selection of known release channels #1050

Open
hasufell opened this issue Apr 29, 2024 · 3 comments
Open

Easier selection of known release channels #1050

hasufell opened this issue Apr 29, 2024 · 3 comments

Comments

@hasufell
Copy link
Member

  1. ask during bootstrap script which release channels should be activated
  2. maybe have aliases for known release channels, so that the user can do ghcup config add-release-channel prereleases
    • where should the mapping exist? In ghcup code, another yaml or in one of the "base" yamls?
  3. Support selecting/managing release channels via the TUI

@lsmor

@lsmor
Copy link
Collaborator

lsmor commented May 5, 2024

About the first two points.... I got no idea. About this:

3. Support selecting/managing release channels via the TUI

Surely we can a new button in the contex menu, with "Add release channel" and something like this

|--------------- Add New Channel -----------------|
|                                                 |
| From known Channels: ◦ nightlies                |
|                      ◉ prereleases              |
|                      ◦ latest                   |
|                                                 |
| From URL:  [ Enter your URL here           ]    |
|---------------- Add New Channel ----------------|

@dfordivam
Copy link
Collaborator

dfordivam commented Oct 7, 2024

  • ask during bootstrap script which release channels should be activated

In interactive mode we can add support for this, in both unix and win.

		warn "Do you want to enable other release channels?"
		warn "The following release channels can be enabled during installation"
		warn "cross, nightlies, prereleases, and vanilla"
		warn ""
		warn "[Y] Yes  [N] No  [?] Help (default is \"N\")."
		warn ""

Then loop and ask for each channel Y/N, giving brief info about each and their URL.
We can limit this to cross, prereleases, and vanilla only (ie not include nightlies here)

Other ways of getting inputs may be more complicated than this.

  • maybe have aliases for known release channels, so that the user can do ghcup config add-release-channel prereleases

    • where should the mapping exist? In ghcup code, another yaml or in one of the "base" yamls?

Aliases can be added in ghcup code

  • Support selecting/managing release channels via the TUI

We can add a Context Menu for GHCup, which allows various config related changes, including channel selection.

The context menu can be opened by moving focus on any "GHCup" row and pressing "Enter"
In TUI the GHCup row is always shown, even in case of an empty metadata file.

Currently "Install" menu is shown in GHCup, we can add more things to it gradually.

There should be checkboxes for each of the channels; on "Save" the config will be updated.
There could be an additional Text input field (via popup) which allows adding custom URLs

 ┌─────────────────────────────────────────Context Menu for GHCup 0.1.30.0────────────────────────────────────────┐
 │┌───────┐                                                                                                       │
 ││Install│        Advance Installation Settings                                                                  │
 │└───────┘                                                                                                       │
 │┌──────────┐                                                                                                    │
 ││Configure │     Release Channels                                                                               │
 │└──────────┘                                                                                                    │
 │                                                                                                                │
 │Press q to go back                                                                                              │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌────────────────────────────────────────Configure Release Channels──────────────────────────────────────────────┐
 │┌──────────────────┐                                                                                            │
 ││Save Configuration│ Save configuration, and enable below release channels                                      │
 │└──────────────────┘                                                                                            │
 │─────────────────────────────────────────────────────── o ──────────────────────────────────────────────────────│
 │Main (default) [  ✓  ]                                                                                          │
 │       Vanilla [  ✗  ] Similar to Main, but only uses upstream bindists (no patches/fixes are applied,          │
 │                       no missing platforms added). Maintained by the upstream developers                       │
 │         Cross [  ✗  ] Contains experimental cross compilers                                                    │
 │   Prereleases [  ✗  ] Contains pre-releases of all tools                                                       │
 │     Nightlies [  ✗  ] contains ghc nightlies                                                                   │
 │        Custom │ file:///my-custom-metadata.yaml                                                              │ │
 │        Custom │Press enter to add a Custom URL to a release channel                                          │ │
 │                                                                                                                │
 │Press q to go back, Press Enter to edit the highlighted field                                                   │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

We can show error if no metadata is selected.

@dfordivam
Copy link
Collaborator

maybe have aliases for known release channels, so that the user can do ghcup config add-release-channel prereleases

where should the mapping exist? In ghcup code, another yaml or in one of the "base" yamls?

This can be tackled first, by adding aliases in ghcup code for cross, prereleases, and vanilla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants