Skip to content

Document Stackage use with remote project config - #8083

Merged
jneira merged 2 commits into
haskell:masterfrom
ysangkok:janus/explain-stackage
Apr 7, 2022
Merged

jneira merged 2 commits into
haskell:masterfrom
ysangkok:janus/explain-stackage

Conversation

@ysangkok

@ysangkok ysangkok commented Apr 5, 2022

Copy link
Copy Markdown
Member

This may be a bit too opinionated, and I'd be happy to water it down. But I think it would be nice to explain how to use Stackage, and how it compares.

@Mikolaj Mikolaj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds great.

Comment thread doc/developing-packages.rst Outdated

If you use the following ``cabal.project`` file, the packages of the snapshot
would be constrained to specific versions. The Cabal solver is then liberated
from determining which versions to use, since it has already been determined

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if liberated would be appropiate here. In fact the solver is constrained to use those versions, no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok, I have removed this part in the new version of the PR which is af9cb08

Comment thread doc/developing-packages.rst Outdated
::

packages: .
import https://www.stackage.org/lts-19.2/cabal.config

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if it would be too much info but you could leverage if's to import several lts on ghc version in the same cabal.project

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let's defer this to a future PR. I think it is nice to have a simple example.

Comment thread doc/developing-packages.rst Outdated
which specifies all of your dependencies' versions.

A disadvantage of this approach is that consumers who don't use Stackage may
suffer from the lacking bounds on your package. If published to Hackage, people

@jneira jneira Apr 5, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The usage of lts does not imply necessarily not using bounds in .cabal files. In fact i would recommend use them anyways, in the form ^>=1.0 || ^>=2.1 || ... if you want to support several ghcs/lts's. So you will have the lts and .cabal files checked one against the other and no stackage users will be happy.

I think lts usage should not be seen as a way to avoid set cabal bounds but a way to ensure your build is reproducible. And .cabal bounds would help to accomplish it too

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This discussion as a whole is too gentle. Hackage uploads, by hackage policy, should conform to the pvp, full stop: https://hackage.haskell.org/upload

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The section should simply point out that project files, including imports of other project files, do not get bundled in cabal package tarballs, and so project files are intended for use in local development environments, not for distribution. And it should point out that packages intended for distribution should have pvp compliant version bounds.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok, I have added the suggestion by @gbaz in 79d84d5.

Comment thread doc/developing-packages.rst Outdated
:ref:`remote project configuration file<conditionals and imports>`:.
This frees you from having to determine the acceptable version bounds for your
dependencies, as described in the previous section.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This doesn't free you from anything. It just lets you further constrain things.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was removed in the revised PR.

@gbaz

gbaz commented Apr 5, 2022

Copy link
Copy Markdown
Collaborator

Adding a reference to stackage is reasonable, I suppose. However, I don't think that any of this material belongs in the quickstart section -- this is a feature of project files, and project files don't belong in quickstart at all. They're an advanced feature, and quickstart is supposed to describe a simple, minimal workflow.

@ysangkok

ysangkok commented Apr 5, 2022

Copy link
Copy Markdown
Member Author

All right, lots of problems with this it seems, so I'll close

@ysangkok ysangkok closed this Apr 5, 2022
@ysangkok
ysangkok deleted the janus/explain-stackage branch April 5, 2022 13:57
@Mikolaj

Mikolaj commented Apr 5, 2022

Copy link
Copy Markdown
Member

Hey, what about my enthusiastic review? :D

I'm sure this can be scavenged (but no pressure).

@ysangkok
ysangkok restored the janus/explain-stackage branch April 5, 2022 19:40
@ysangkok ysangkok reopened this Apr 5, 2022

@jneira jneira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, many thanks for the rework
i would like to know @gbaz thoughts before merge though

@jneira
jneira requested a review from gbaz April 7, 2022 10:44

@gbaz gbaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm!

@jneira
jneira merged commit f90d541 into haskell:master Apr 7, 2022
@ysangkok
ysangkok deleted the janus/explain-stackage branch April 7, 2022 17:49
@fgaz fgaz mentioned this pull request Nov 18, 2022
10 tasks
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

Successfully merging this pull request may close these issues.

4 participants