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

Main channel vs vanilla #167

Open
suhail-singh opened this issue Jan 16, 2024 · 3 comments
Open

Main channel vs vanilla #167

suhail-singh opened this issue Jan 16, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@suhail-singh
Copy link

suhail-singh commented Jan 16, 2024

Continuing the discussion from #166.

How to determine the set of patches/fixes applied

For tools whose binaries are available in both main and vanilla channels,
say HLS 2.5.0.0, what are the differences in terms of the specific
"patches/fixes" (as stated in the README.md) that are applied to main? How
would an end-user of ghcup determine that?

Which takes precedence

If one were to enable the vanilla channel in addition to the main via
below, which channel would be given priority when installing tools whose
binaries are available in both channels?

ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml

Answering the above myself: ^ reading the source of config.yaml in ghcup-hs,
it's clear that later entries would win. I.e, in the example above vanilla
would take precedence over main. From config.yaml source:

# Where to get GHC/cabal/hls download info/versions from. This is a list that performs
# union over tool versions, preferring the later entries.

Thank you to both the upstream and ghcup maintainers for their continued
efforts.

@hasufell
Copy link
Member

For tools whose binaries are available in both main and vanilla channels,
say HLS 2.5.0.0, what are the differences in terms of the specific
"patches/fixes" (as stated in the README.md) that are applied to main? How
would an end-user of ghcup determine that?

Source code patches are communicated via post-install messages with links. See

3.6.2.0-p1:
viTags: []
viPostInstall: |
This is a distributor release to fix https://github.com/haskell/security-advisories/blob/main/advisories/hackage/cabal-install/HSEC-2023-0015.md
The applied downstream patches can be viewed here: https://github.com/hasufell/cabal/tree/cabal-install-v3.6.2.1
Upstream PR: https://github.com/haskell/cabal/issues/9451
You can alternatively update to 3.10.2.0 or later.

Patches/fixes to build systems (such as GHC) are not documented properly.

E.g., here are all the GHC bindists where I had to backport the DESTDIR bugfix, because GHC developers don't curate their bindists: https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/curated/

Answering the above myself: ^ reading the source of config.yaml in ghcup-hs,
it's clear that later entries would win. I.e, in the example above vanilla
would take precedence over main. From config.yaml source:

It is definitely not recommended to enable both vanilla and non-vanilla channels. These are "main channels" so to speak and they are self-consistent (e.g. GHC and HLS versions are ABI compatible). Those invariants potentially go out the window if you mix them.

I advise against using the vanilla channel for regular users. These are not curated and experience has shown that upstream does not invest a lot of time in bindist quality.

@suhail-singh
Copy link
Author

Thank you for the detailed response.

It is definitely not recommended to enable both vanilla and non-vanilla
channels. These are "main channels" so to speak and they are self-consistent
(e.g. GHC and HLS versions are ABI compatible). Those invariants potentially
go out the window if you mix them.

Ah! That is a valuable invariant. Thank you for pointing it out.

It might be helpful to explicitly note in the documentation the guarantees (or
aspirational invariances, to be more accurate) that do or don't exist both
within a channel, as well as across channels.

@hasufell
Copy link
Member

It might be helpful to explicitly note in the documentation the guarantees

https://hasufell.github.io/posts/2023-11-14-ghcup-is-not-an-installer.html

@hasufell hasufell added the documentation Improvements or additions to documentation label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants