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

Document how stack uses the Cabal library in Architecture.md #4494

Merged
merged 5 commits into from
Feb 11, 2019

Conversation

dbaynard
Copy link
Contributor

@dbaynard dbaynard commented Jan 8, 2019

Relates to #3049, #4475, #4488.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

@dbaynard dbaynard force-pushed the document-cabal-lib branch from 5cf2fa7 to 514abbe Compare January 8, 2019 14:04
@dbaynard dbaynard requested a review from snoyberg January 8, 2019 14:07
@dbaynard
Copy link
Contributor Author

dbaynard commented Jan 8, 2019

The bulk of the content may belong in a different document.

Copy link
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks! Some comments added.

doc/faq.md Outdated Show resolved Hide resolved
doc/faq.md Outdated Show resolved Hide resolved
doc/faq.md Outdated Show resolved Hide resolved
doc/faq.md Outdated

1. The version used to compile stack, which is not necessarily present on stack users’ machines.

Stack will always be compiled using the most recent stable version of Cabal-the-library.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really true. We may attempt to do that, but we could for example release a point release of an older Stack release without upgrading to the newest Cabal library version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc/faq.md Outdated Show resolved Hide resolved
doc/faq.md Outdated

5. Stack uses `ghc-pkg` to identify the Cabal version it should use for the setup executable for a build.
The build output is stored in a directory `.stack-work/dist/Cabal-xxxxx` named for the Cabal version used to compile the setup executable.
Together, this means it is only possible to know for sure which Cabal version ought to be used if the corresponding compiler is installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess details about global-hints.yaml will appear in the master branch as a part of docs updates for the next release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah — I didn't know that global-hints.yaml was new. What should we say here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand the idea behind that file is to have information about boot packages without having GHC installed, currently it's used in (to be removed) Stack.Snapshot and in https://github.com/commercialhaskell/stack/blob/master/src/Stack/SourceMap.hs#L196 but that's actual for master, not for stable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've indicated this will change in stack 2.0

@dbaynard
Copy link
Contributor Author

Two commits:

  1. Address straightforward issues.
  2. Refactor completely to fix more complicated ones.

I still have a few things left to do, here (e.g. the TODO).

@dbaynard
Copy link
Contributor Author

I need to put this in a new document, rather than the FAQ. Also, I'd like to rebase to take advantage of working CI on stable. I'll do all that when the content is OK.

@dbaynard
Copy link
Contributor Author

I think this is ready, in terms of content (assuming the latest addition is correct; it is what my logs suggest though I haven't dug into the code). It should go in a new file, though, rather than the FAQ (perhaps with the 'What is the relationship between stack and cabal' bit directly above, too).

Copy link
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work here @dbaynard!

@dbaynard
Copy link
Contributor Author

Actually, I moved the new material into Architecture, rather than a new document, and added links. I'll merge when it clears appveyor.

@dbaynard dbaynard changed the title Document how stack uses the Cabal library in FAQ Document how stack uses the Cabal library in Architecture.md Feb 11, 2019
@dbaynard dbaynard merged commit 22ec911 into commercialhaskell:stable Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants