on 1237b89 help sign in
stackage/MAINTAINERS.md
222 lines 12 kB history raw
1This project is built around the concept of maintainers taking responsibility for making their packages work with the rest of the stable ecosystem, usually meaning the newest version of all dependencies. This is a social contract, and is not reflected in the codebase in any way.
3The idea behind Stackage is that, if all packages work with the newest versions of dependencies, we avoid dependency hell. Specifically, we aim for:
5* All packages are buildable and testable from Hackage. We recommend [the Stack Travis script](https://docs.haskellstack.org/en/stable/travis_ci/), which ensures a package is not accidentally incomplete.
6* 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).
7* 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](https://www.fpcomplete.com/blog/2014/05/lenient-lower-bounds)).
9Packages in Stackage are not patched: all package changes occur upstream in Hackage.
11## Adding a package
13Anyone can add any package to Stackage but you may only add packages under your own name. It's highly encouraged that the actual package maintainer is also the Stackage maintainer, if that is not the case you should drop the package maintainer a note first.
15To add your package you can edit [`build-constraints.yaml`](https://github.com/fpco/stackage/blob/master/build-constraints.yaml) directly on github or fork the project. There's a section called `packages` where you would add yourself and your packages:
17 "My Name <myemail@example.com> @mygithubuser":
18 - package1
19 - package2
20 - package3
22If your library depends on a C library, please add it to the `debian-bootstrap.sh` script.
24After doing that commit with a message like "add foo-bar" and send a pull request.
26The continuous integration job will do some checks to see if your package's dependencies are up-to-date.
28The CI job notably doesn't compile packages, run tests, build documentation, or find missing C libraries.
29If you want to be proactive or if CI fails, you can make sure that your package builds against the latest nightly:
31```
32# Build from the tarball on Hackage to check for missing files
33$ stack unpack yourpackage && cd yourpackage-*
34# Generate a pristine stack.yaml, adding any missing extra-deps
35$ rm -f stack.yaml && stack init --resolver nightly --solver
36# Build, generate docs, test, and build benchmarks
37$ stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
38```
40This approach works well, but has two limitations you should be aware
41of:
43* It won't notify you of restrictive upper bounds in your package if
44 Stackage has the same upper bounds. For that reason, we recommend
45 using [Packdeps](http://packdeps.haskellers.com/) (see "Following
46 dependency upgrades" below).
47* If the latest Stackage Nightly is missing some of the latest
48 packages, your build above may succeed whereas the Travis job may
49 fail. Again: Packdeps will help you detect this situation.
51Alternatively, you can build with `cabal`. Note that this may end up
52using older dependency versions:
54```
55$ ghc --version # Should be the same as the latest nightly, it's in the title of https://www.stackage.org/nightly
56$ cabal update
57$ cabal get PACKAGE
58$ cd PACKAGE-*
59$ cabal sandbox init # Should give "Creating a new sandbox" and not "Using an existing sandbox".
60$ cabal install --enable-tests --enable-benchmarks --dry-run | grep latest # Should give no results
61$ cabal install --enable-tests --enable-benchmarks --allow-newer
62$ cabal test
63$ cabal haddock
64```
66## Github and Notifications
68Stackage uses Github notifications to reduce overhead of contacting individual
69package maintainers through various channels. As a package maintainer, you will
70receive notifications for a number of reasons, package build failures of
71different sorts, blockages and bounds issues, etc.
73Please note, Github does some throttling on the number people that can be
74notified within one issue. This means that on issues created with a large
75number of packages affected, maintainers may not receive a notification. This
76is not ideal, but Stackage is largely a manual process and done on a best
77effort basis.
79## Uploading a new package version
81When a new version of a package in Stackage is uploaded to Hackage, we automatically try to include it in Stackage. That can result in a number of possible failures. If there is a failure we temporarily introduce an upper bound, and open a GitHub issue ticket to resolve the issue.
83If the new version doesn't compile then the package author should upload a fixed version.
85If a package's test suite is failing, the first job is to investigate why. If this is due to a bad interaction with versions of other packages in Stackage, then it is the responsibility of the maintainer to fix the test suite. In some situations, it is acceptable to not run the test suite.
87## Following dependency upgrades
89If a new version of a dependency is released your package may fail to
90build or tests may fail. In most cases we will add an upper bound on
91the dependency so that your package remains in nightly. We'll also
92create a github issue pinging you with the bounds issues or give build
93logs showing failures. It's then up to you to modify your package.
95We recommend that you also follow the dependencies of your packages on
96[Packdeps](http://packdeps.haskellers.com/) (typically using the RSS
97feeds) as well as that often gives you notice ahead of stackage
98issues. There are cases where we will not notice a new release of a
99package because of other upper bounds that are in place.
101If a package is not updated in time, it may be temporarily removed
102from Stackage by the curator team. We strive to notify you when this
103happens. If it does you are always welcome to file another pull
104request to add it back.
106We typically use fairly long windows before disabling packages, but it
107is decided on a case-by-case basis.
109* If restrictive version bounds are the only problem, we will give
110 maintainers at least a week to respond.
111* If there are real breaking changes, the curator team will retain
112 more discretion on how long a window to give before dropping
113 packages.
114* We usually drop all upper bounds and disable packages when we create
115 a new Long Term Support (LTS) major version.
116* There are rare cases where an upper bound or build failure are hard
117 to deal with so then we may disable
119**NOTE** Previously we had stricter time limits, but we decided to
120remove that: Anyone is free to add a package to Stackage regardless of
121responsiveness guarantees. However, as stated above, we may elect to
122temporarily remove a package if it is not updated in a timely manner.
124## Delays
126Maintainers are humans, humans get sick/have babies/go on
127holiday. Sometimes a dependency upgrade is extra time consuming.
129Consider finding a co-maintainer with access to SCM and Hackage to
130help you out.
132We appreciate if you notify us of any expected delays in the Github
133issues, some kind soul might decide to help out.
135## Upgrading to a new GHC version
137The Stackage curation team tries to move Stackage Nightly to new
138versions of GHC quickly as they become available, while keeping LTS
139Haskell on a regular release schedule. For package maintainers, the
140most important impacts of a new GHC release are:
142* We will typically do a sweep through the Stackage upper bounds and
143 remove blocking packages. We prefer to do it this way rather than
144 ask other maintainers to backport fixes.
145 * We will definitely do this at a GHC major version release, and
146 may do so at a minor version release
147* Packages that are incompatible with the newest GHC version will be
148 temporarily disabled
150If your package ends up being temporarily disabled from Stackage
151Nightly, please simply send a pull request to add it back once it and
152its dependencies are compatible with the newest GHC version.
154Note that it is _not_ a goal of LTS Haskell to track the latest
155version of GHC. If you want the latest and greatest, Stackage Nightly
156is your best bet. In particular, LTS Haskell will often&mdash;but not
157always&mdash;avoid upgrading to the first point release of GHC
158releases (e.g., 8.2.1) to allow further testing and to get the
159benefits of the first bugfix release (e.g., 8.2.2).
161## Adding a package to an LTS snapshot
163The steps above affect the Stackage Nightly builds, but do not directly affect
164LTS Haskell builds. When we build a new LTS Haskell major version (anything
165ending in `.0`), the package set is taken from Stackage Nightly. Therefore, by
166following the above steps, you can get your package into the next major LTS
167Haskell release.
169If you would like to get your package added to an existing LTS Haskell major
170release (e.g., if `lts-8.9` is out, you would want your package to appear in
171`lts-8.10`), please do the following in addition to the steps above:
173* Check that your package can be built with that LTS major version (e.g. `stack build --test --bench --haddock --resolver lts-8.10`)
174* Open up a new issue on the [lts-haskell repo](https://github.com/fpco/lts-haskell/issues/new)
175 * Specify the LTS major versions you would like your packages to go into (e.g. lts-8)
176 * Provide a list of packages you would like added
177 * If relevant, mention any upper bounds that are needed on those packages
178* Be patient! The LTS releases are less frequent than Nightly. The
179 Stackage curators will try to get to your issue as soon as possible,
180 but it may take some time.
181* We gradually stop maintaining old LTS major versions, so your
182 request may take longer or be declined if it's for an old LTS.
184## LTS package guarantees and exceptions
186In general, we try to stick to some rules when it comes to the
187packages included in LTS minor bumps. In particular:
189* If a package exists in LTS-X.Y, it should also exist in LTS-X.(Y+1)
190* We should not include a major version bump of a package between
191 LTS-X.Y and LTS-X.(Y+1)
193However, there are some cases where exceptions may be made, based
194purely on Stackage Curator discretion. The most common examples are:
196* If a package does not follow the PVP in its version number policy,
197 applying the standard version bump rules would not necessarily
198 makes sense. As an example, suppose package `foo` decides to
199 follow SemVer instead of the PVP. By our standard rules of version
200 bumps, a change from `foo-1.2.0` to `foo-1.3.0` would be
201 considered a major version bump, and disallowed in an LTS minor
202 version bump. However, if a package is following SemVer, this
203 would not be a breaking change, and curators may elect to include
204 it.
206* If a package has overly restrictive version bounds on a
207 dependency, in particular constraining a minor version
208 unnecessarily, we may drop that package instead of artificially
209 holding back the dependency. As an example: suppose `LTS-20.1`
210 includes `foo-1.2.0` and `bar-1`. `bar-1` has a dependency `foo >=
211 1.2.0 && < 1.2.1`, which is overly constrained on the minor
212 version number according to the PVP. Then `foo-1.2.1` is
213 released. The Stackage Curator team would have two choices:
215 * Reject `foo-1.2.1` from `LTS-20.2`, since that is what `bar-1`
216 requires.
217 * Drop `bar-1` from `LTS-20.2`, and allow `foo-1.2.1`.
219 Decisions will need to be taken on a case-by-case basis, and may
220 depend on such issues as whether an important bugfix or security
221 update in included. The curator team may also try to notify the
222 author of `bar` to try and get a patched version released.