diff --git a/GHCup.md b/GHCup.md index f178212..529c39b 100644 --- a/GHCup.md +++ b/GHCup.md @@ -2,7 +2,7 @@ % Julian Ospald % June 07, 2024 -# GHCup +# Introduction ## What is GHCup? @@ -35,25 +35,25 @@ ## GHCup today -::: incremental +[Haskell Survey 2022](https://taylor.fausak.me/2022/11/18/haskell-survey-results/#s2q1): + +![](survey.png) + +. . . -* [Haskell Survey 2022](https://taylor.fausak.me/2022/11/18/haskell-survey-results/#s2q1) - * ![](survey.png) - over **17k** LOC Haskell - supports all platforms: Linux, Windows, macOS, FreeBSD -::: - ## GHCup and haskell.org -::: incremental +The default installer: + +![](downloads.png) + +. . . -* the default installer - - ![](downloads.png) * provides infrastructure (home page, downloads) -::: - ## GHCup and the Haskell Foundation ::: incremental @@ -64,6 +64,8 @@ ::: +# Philosophy + ## What is a good installer? ::: incremental @@ -122,7 +124,7 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l ::: -## Upstream +## Upstream (dependencies) ::: incremental @@ -133,7 +135,7 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l ::: -## Downstream +## Downstream (dependents) ::: incremental @@ -149,6 +151,8 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l ::: +# Bits and pieces + ## How does it work? ::: incremental @@ -156,12 +160,13 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l * **Architectural components** - ![](sh-file.png){#id .class height=32px} bootstrap scripts - ![](exe-file.png){#id .class height=32px} ghcup binary (compiled) - - ![](config-file.png){#id .class height=32px} ghcup-metadata (configuration files) + - ![](config-file.png){#id .class height=32px} ghcup-metadata * **Logical components** - ![](terminal.png){#id .class height=32px} cli interface - ![](file.png){#id .class height=32px} file layout / installation destination - ![](tar.png){#id .class height=32px} bindist selection - ![](brick-final-clearbg.png){#id .class height=32px} tui interface + - ![](config.svg){#id .class height=32px} configuration ::: @@ -170,12 +175,13 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l * **Architectural components** - [ ] ![](sh-file.png){#id .class height=32px} bootstrap scripts - [x] ![](exe-file.png){#id .class height=32px} ghcup binary (compiled) - - [ ] ![](config-file.png){#id .class height=32px} ghcup-metadata (configuration files) + - [ ] ![](config-file.png){#id .class height=32px} ghcup-metadata * **Logical components** - [x] ![](terminal.png){#id .class height=32px} cli interface - [ ] ![](file.png){#id .class height=32px} file layout / installation destination - [ ] ![](tar.png){#id .class height=32px} bindist selection - [ ] ![](brick-final-clearbg.png){#id .class height=32px} tui interface + - [ ] ![](config.svg){#id .class height=32px} configuration ## Basic CLI @@ -205,12 +211,13 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l * **Architectural components** - [ ] ![](sh-file.png){#id .class height=32px} bootstrap scripts - [x] ![](exe-file.png){#id .class height=32px} ghcup binary (compiled) - - [ ] ![](config-file.png){#id .class height=32px} ghcup-metadata (configuration files) + - [ ] ![](config-file.png){#id .class height=32px} ghcup-metadata * **Logical components** - [ ] ![](terminal.png){#id .class height=32px} cli interface - [x] ![](file.png){#id .class height=32px} file layout / installation destination - [ ] ![](tar.png){#id .class height=32px} bindist selection - [ ] ![](brick-final-clearbg.png){#id .class height=32px} tui interface + - [ ] ![](config.svg){#id .class height=32px} configuration ## File layout @@ -243,12 +250,13 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l * **Architectural components** - [ ] ![](sh-file.png){#id .class height=32px} bootstrap scripts - [x] ![](exe-file.png){#id .class height=32px} ghcup binary (compiled) - - [x] ![](config-file.png){#id .class height=32px} ghcup-metadata (configuration files) + - [x] ![](config-file.png){#id .class height=32px} ghcup-metadata * **Logical components** - [ ] ![](terminal.png){#id .class height=32px} cli interface - [ ] ![](file.png){#id .class height=32px} file layout / installation destination - [x] ![](tar.png){#id .class height=32px} bindist selection - [ ] ![](brick-final-clearbg.png){#id .class height=32px} tui interface + - [ ] ![](config.svg){#id .class height=32px} configuration ## Bindist selection (sysinfo) @@ -293,13 +301,100 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l * **Architectural components** - [ ] ![](sh-file.png){#id .class height=32px} bootstrap scripts - [x] ![](exe-file.png){#id .class height=32px} ghcup binary (compiled) - - [ ] ![](config-file.png){#id .class height=32px} ghcup-metadata (configuration files) + - [ ] ![](config-file.png){#id .class height=32px} ghcup-metadata * **Logical components** - [ ] ![](terminal.png){#id .class height=32px} cli interface - [ ] ![](file.png){#id .class height=32px} file layout / installation destination - [ ] ![](tar.png){#id .class height=32px} bindist selection - [x] ![](brick-final-clearbg.png){#id .class height=32px} tui interface + - [ ] ![](config.svg){#id .class height=32px} configuration ## TUI interface -![](matrix.png){#id .class height=600px} +![](matrix.png){#id .class height=550px} + +## Configuration (context) + +* **Architectural components** + - [X] ![](sh-file.png){#id .class height=32px} bootstrap scripts + - [x] ![](exe-file.png){#id .class height=32px} ghcup binary (compiled) + - [x] ![](config-file.png){#id .class height=32px} ghcup-metadata +* **Logical components** + - [ ] ![](terminal.png){#id .class height=32px} cli interface + - [ ] ![](file.png){#id .class height=32px} file layout / installation destination + - [ ] ![](tar.png){#id .class height=32px} bindist selection + - [ ] ![](brick-final-clearbg.png){#id .class height=32px} tui interface + - [x] ![](config.svg){#id .class height=32px} configuration + +## Configuration + +::: incremental + +* Types of configuration: + - environment variables + - cli switches / TUI options + - config file (`~/.ghcup/config.yaml`) +* e.g. + - env: `GHCUP_INSTALL_BASE_PREFIX` (default `$HOME`) + - cli: `ghcup install ghc -u ` + - config: `url-source` (selecting and mixing "channels") + - file/http/https URI + - `GHCupURL` + - `StackSetupURL` + +::: + +## Phew + +![](headache.png){#id .class height=550px} + +# Contributing + +## How to contribute + +**Some live action:** + +- project structure +- building the project (flags and project files) +- small code walkthrough + +## The future + +::: incremental + +- nightlies +- revisions +- curating old releases +- beefed up `ghcup compile` interface +- TUF? +- supporting more tools (installer DSL) + +::: + +## Advanced topics + +- bootstrap scripts +- windows and MSYS2 +- security +- HLS/GHC interaction +- reproducibility +- stack integration +- bindist work (curation) +- isolated installs +- mirrors + +## Cool things to contribute to + +- documentation +- discussions +- deciding on defaults (metadata etc.) +- API for e.g. stack +- Dhall +- manpage (via [optparse-applicative](https://github.com/pcapriotti/optparse-applicative/issues/176)?) +- TUI (@lsmor) +- YAML schema for metadata +- integration test +- cross compiler support +- nightlies +- "health check" command + diff --git a/NOTES.md b/NOTES.md index ce3bbfe..b1d0904 100644 --- a/NOTES.md +++ b/NOTES.md @@ -8,14 +8,21 @@ - unix vs holistic user experience - non-goals (invoking pkg manager) -- relasionships +- relationships + +- Code walkthrougs + - Version file, Types file (GHCup types) - advanced topics + - bootstrap scripts + - windows and MSYS2 - security - HLS/GHC interaction - reproducibility - stack integration - bindist work (curation) + - isolated installs + - mirrors - contributing - repos @@ -26,7 +33,6 @@ - metadata variants - bootstrap script -- Version file, Types file (GHCup types) - for the future diff --git a/config.svg b/config.svg new file mode 100644 index 0000000..f7f7a85 --- /dev/null +++ b/config.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/headache.png b/headache.png new file mode 100644 index 0000000..527ed1b Binary files /dev/null and b/headache.png differ diff --git a/install-flow.dia b/install-flow.dia new file mode 100644 index 0000000..79a73b2 Binary files /dev/null and b/install-flow.dia differ