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

Add GHC resolver endpoint, ghc-x.y.z/cabal.config? #322

Open
philderbeast opened this issue Nov 29, 2023 · 2 comments
Open

Add GHC resolver endpoint, ghc-x.y.z/cabal.config? #322

philderbeast opened this issue Nov 29, 2023 · 2 comments

Comments

@philderbeast
Copy link

In the Stack docs, it says we can use resolver: ghc-x.y.z.

  • LTS Haskell snapshots, e.g. resolver: lts-21.13
  • Stackage Nightly snapshots, e.g. resolver: nightly-2023-09-24
  • No snapshot, just use packages shipped with the compiler. For GHC this looks like resolver: ghc-9.6.2

SOURCE: resolver or snapshot

I can get a cabal.config file for LTS and nightly resolvers. Could we provide a cabal.config for ghc-x.y.z resolvers too? If so then I'd expect it would show packages shipped with the compiler.

$ curl https://www.stackage.org/lts-21.22/cabal.config --silent | sed -n 1,8p
-- NOTE: Due to revisions, this file may not work. See:
-- https://github.com/fpco/stackage-server/issues/232

-- Stackage snapshot from: http://www.stackage.org/snapshot/lts-21.22
-- Please place this file next to your .cabal file as cabal.config
-- To only use tested packages, uncomment the following line:
-- remote-repo: stackage-lts-21.22:http://www.stackage.org/lts-21.22
with-compiler: ghc-9.4.8
$ curl https://www.stackage.org/nightly-2023-11-28/cabal.config --silent | sed -n 1,8p
-- NOTE: Due to revisions, this file may not work. See:
-- https://github.com/fpco/stackage-server/issues/232

-- Stackage snapshot from: http://www.stackage.org/snapshot/nightly-2023-11-28
-- Please place this file next to your .cabal file as cabal.config
-- To only use tested packages, uncomment the following line:
-- remote-repo: stackage-nightly-2023-11-28:http://www.stackage.org/nightly-2023-11-28
with-compiler: ghc-9.6.3
$ curl https://www.stackage.org/ghc-9.4.8/cabal.config --silent
<!doctype html>
<html>
...
<div class="container"><h1>Not Found</h1>
<p>/ghc-9.4.8/cabal.config</p>
</div>
...</html>⏎
@chreekat
Copy link
Member

In principle I don't see why not. But the info needs to come from GHC somehow.

The snapshot config files are generated on the fly: https://github.com/commercialhaskell/stackage-server/blob/master/src/Handler/StackageHome.hs#L66

@chreekat
Copy link
Member

chreekat commented Apr 22, 2024

I discovered that https://github.com/commercialhaskell/stackage-content/blob/master/stack/global-hints.yaml exists, but it's not made available over HTTP anywhere.

(It's used by stackage-server-cron, which reads the file off the filesystem.)

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

2 participants