2

I'm a bit confused about how a dependency on a package affects including it in Stackage LTS; specifically, if

does package A have to be excluded from LTS-X.Y, particularly if

orome
  • 45,163
  • 57
  • 202
  • 418
  • Yes. but I guess the point of the LTS is to have packages that "just work". which is why those that are problematic aren't listed. However I am aware of some packages in LTS that don't compile with stack out-of-the-box in some cases, specifically because stack doesn't set up msys properly on windows. So I'm not sure anymore – Mor A. Oct 14 '18 at 19:09
  • @M.Aroosi That's what confuses me: A works with LTS-X.Y + B, and A would work if B were in LTS-X.Y, and B would work as part of LTS. In other words, B and A would both "just work" together and as part of LTS. – orome Oct 14 '18 at 19:14

2 Answers2

1

Yes, for every package in a given Stackage snapshot, all of its transitive dependencies are also in the snapshot. Also, packages are only included if the package's maintainer agrees to keep it up to date with respect to its dependencies. There are more details about this in the README on github. An excerpt:

  • All packages are buildable and testable from Hackage. We recommend the Stack Travis script, which ensures a package is not accidentally incomplete.
  • All packages are compatible with the newest versions of all dependencies (You can find restrictive upper bounds by visiting http://packdeps.haskellers.com/feed?needle=PACKAGENAME).
  • All packages in a snapshot are compatible with the versions of libraries that ship with the GHC used in the snapshot (more information on lenient lower bounds).
bergey
  • 3,041
  • 11
  • 17
  • So in a situation like the one described, A has to find a way to abandon its dependency on B. Correct? – orome Oct 15 '18 at 01:51
  • 1
    Your options are to adopt MissingH, stop depending on it, or not put your package in Stackage. – bergey Oct 15 '18 at 02:10
  • Let’s assume the whole point of the question is find a way for a to be in LTS. – orome Oct 15 '18 at 02:28
1

I'll copy/paste my answer on github


does package A have to be excluded?

No, it doesn't have to be excluded. Here's why:

even if the only reason B is excluded is because of a test suite dependency

In this case, we can add B to the build plan and mark it under the skipped-tests section in order to avoid pulling in its test suite dependencies. This is true of both LTS and nightly snapshots.

(However, a preferable course of action would be to remedy B's dependency issue so that the test suite can be run.)


To further clarify, in response to @bergey's answer:

packages are only included if the package's maintainer agrees to keep it up to date with respect to its dependencies

This is only true of packages explicitly included. Some packages are transitive dependencies, which are included implicitly, and are not necessarily held to such strict standards. (However, in the future we may eliminate the concept of implicit inclusion and instead include all packages explicitly.)

Exceptions can also be made so that a package may be included, even though its test suite or its benchmarks have incompatible dependency constraints with the snapsnot.

Of course the preferred way to go is to not need to make such exceptions, and we encourage all maintainers to keep all of their build targets up to date.

Finally, allow me to note that this question would probably be more well suited for the stackage mailing list, which is admittedly not well publicied or utilized.

Dan Burton
  • 53,238
  • 27
  • 117
  • 198