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

Implement support for nightlies #824

Closed
hasufell opened this issue May 1, 2023 · 7 comments
Closed

Implement support for nightlies #824

hasufell opened this issue May 1, 2023 · 7 comments

Comments

@hasufell
Copy link
Member Author

hasufell commented May 1, 2023

WIP PR: #825

@mpickering
Copy link

@hasufell
Copy link
Member Author

hasufell commented May 5, 2023

User interface

query nightlies in a specific range

Nightlies are hidden by default due to the amount of entries. Installed versions are always shown regardless.

$ ghcup list --show-nightly --since 2022-12-07 --until 2022-12-31
   Tool Version        Tags                         Notes
✗  ghc  9.6.0.20221207 nightly,base-4.18.0.0        2022-12-07
✗  ghc  9.6.0.20221208 nightly,base-4.18.0.0        2022-12-08
✗  ghc  9.6.0.20221209 nightly,base-4.18.0.0        2022-12-09
✗  ghc  9.6.0.20221210 nightly,base-4.18.0.0        2022-12-10
✗  ghc  9.6.0.20221211 nightly,base-4.18.0.0        2022-12-11
✗  ghc  9.6.0.20221212 nightly,base-4.18.0.0        2022-12-12
✗  ghc  9.6.0.20221213 nightly,base-4.18.0.0        2022-12-13
✗  ghc  9.6.0.20221214 nightly,base-4.18.0.0        2022-12-14
✗  ghc  9.6.0.20221215 nightly,base-4.18.0.0        2022-12-15
✗  ghc  9.6.0.20221216 nightly,base-4.18.0.0        2022-12-16
✗  ghc  9.6.0.20221217 nightly,base-4.18.0.0        2022-12-17
✗  ghc  9.6.0.20221218 nightly,base-4.18.0.0        2022-12-18
✗  ghc  9.6.0.20221219 nightly,base-4.18.0.0        2022-12-19
✗  ghc  9.6.0.20221220 nightly,base-4.18.0.0        2022-12-20
✗  ghc  9.6.0.20221221 nightly,base-4.18.0.0        2022-12-21
✗  ghc  9.6.0.20221222 nightly,base-4.18.0.0        2022-12-22
✗  ghc  9.6.0.20221223 nightly,base-4.18.0.0        2022-12-23
✗  ghc  9.6.0.20221224 nightly,base-4.18.0.0        2022-12-24
✗  ghc  9.6.0.20221225 nightly,base-4.18.0.0        2022-12-25
✗  ghc  9.6.0.20221226 nightly,base-4.18.0.0        2022-12-26
✗  ghc  9.6.0.20221227 nightly,base-4.18.0.0        2022-12-27
✗  ghc  9.6.0.20221228 nightly,base-4.18.0.0        2022-12-28
✗  ghc  9.6.0.20221229 nightly,base-4.18.0.0        2022-12-29
✗  ghc  9.6.0.20221230 nightly,base-4.18.0.0        2022-12-30
✗  ghc  9.6.0.20221231 latest-nightly,base-4.18.0.0 2022-12-31

Hide nightlies and "old" GHCs:

$ ghcup list --hide-old
   Tool  Version  Tags                      Notes
✗  ghc   8.4.4    base-4.11.1.0
✗  ghc   8.6.5    base-4.12.0.0
✗  ghc   8.8.4    base-4.13.0.0
✓  ghc   8.10.7   base-4.14.3.0             hls-powered
✗  ghc   9.0.2    base-4.15.1.0             hls-powered
✔✔ ghc   9.2.7    recommended,base-4.16.4.0 hls-powered
✗  ghc   9.4.4    base-4.17.0.0             hls-powered
✓  ghc   9.4.5    base-4.17.1.0
✓  ghc   9.6.1    latest,base-4.18.0.0      hls-powered
✓  cabal 3.6.2.0  recommended
✗  cabal 3.8.1.0
✔✔ cabal 3.10.1.0 latest
✗  hls   1.9.1.0
✔✔ hls   1.10.0.0 latest,recommended
✗  stack 2.7.5
✗  stack 2.9.1
✔✔ stack 2.9.3    latest,recommended
✔✔ ghcup 0.1.19.2 latest,recommended

ghcup tui

ghcup tui will only show latest-nightly (and installed nightlies) and none else:

ghcup_nightly

Installation

You can install via date (only nightlies will have the date info attached for now):

$ ghcup install ghc 2022-12-31
[ Info  ] downloading: https://downloads.haskell.org/~ghc/9.6.0.20221231/ghc-9.6.0.20221231-x86_64-rocky8-linux.tar.xz as file /home/hasufell/.ghcup/cache/ghc-9.6.0.20221231-x86_64-rocky8-linux.tar.xz
...

Performance concerns

A nightly metadata for an entire year (365 entries) with 4 bindist entries per day has been generated here: https://gist.github.com/hasufell/ad710e5218969b15b39a1c3eaba2ccfd

It's 840KB big. GHCup parses and prints this in 300ms... that is fast enough. We would expect that a nightly metadata file only contains entries for the running year, so 840KB is the max. At a new year, we'll back up the old one for legacy use.

A note on GHC branches

This is theoretically agnostic of GHC branches as long as the GHC versions are unique. If there are multiple GHC nightly versions per day, a ghcup install ghc 2023-05-05 would pick the highest version.

@hasufell
Copy link
Member Author

hasufell commented May 9, 2023

@hasufell
Copy link
Member Author

It's happening fellas.

@hasufell
Copy link
Member Author

@hasufell
Copy link
Member Author

Done

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

No branches or pull requests

2 participants