Skip to content

Commit f92359c

Browse files
committed
first cut at maintainer documentation
Highly incomplete. Also, revise contributor documentation including moving some things to the maintainer documentation and absorbing the old maintainers list which is now at the top.
1 parent 012e9da commit f92359c

File tree

2 files changed

+157
-66
lines changed

2 files changed

+157
-66
lines changed

CONTRIBUTING.md

Lines changed: 34 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Contributing to Cabal
22

3+
## The fortnightly meeting
4+
5+
We have a dev call every 2 weeks at https://meet.jit.si/FavourableEvilsAnnounceAppallingly. All contributors and potential contributors are welcome.
6+
7+
8+
## Issue triage [![Open Source Helpers](https://www.codetriage.com/haskell/cabal/badges/users.svg)](https://www.codetriage.com/haskell/cabal)
9+
10+
You can contribute by triaging issues, which may include reproducing bug reports or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to cabal on CodeTriage](https://www.codetriage.com/haskell/cabal).
11+
12+
313
## Building Cabal for hacking
414

515
If you use the `cabal` executable from the latest version of the
@@ -62,7 +72,7 @@ $ cabal build cabal-tests # etc...
6272
There are two ways to run tests: in CI with GitHub actions and locally with
6373
`./validate.sh`.
6474

65-
### Using GitHub Actions.
75+
### Using GitHub Actions
6676

6777
If you are not in a hurry, the most convenient way to run tests on Cabal
6878
is to make a branch on GitHub and then open a pull request; our
@@ -87,7 +97,7 @@ Some tips for using GitHub Actions effectively:
8797
already failed), be nice to others and cancel the rest of the jobs,
8898
so that other commits on the build queue can be processed.
8999

90-
### How to debug a failing CI test.
100+
### How to debug a failing CI test
91101

92102
One of the annoying things about running tests on CI is when they
93103
fail, there is often no easy way to further troubleshoot the broken
@@ -107,7 +117,7 @@ failures:
107117
a specific operating system? If so, try reproducing the
108118
problem on the specific configuration.
109119

110-
4. Is the test failing on a GitHub Actions per-GHC build.
120+
4. Is the test failing on a GitHub Actions per-GHC build?
111121
In this case, if you click on "Branch", you can get access to
112122
the precise binaries that were built by GitHub Actions that are being
113123
tested. If you have an Ubuntu system, you can download
@@ -116,7 +126,7 @@ failures:
116126
If none of these let you reproduce, there might be some race condition
117127
or continuous integration breakage; please file a bug.
118128

119-
### Running tests locally.
129+
### Running tests locally
120130

121131
The [`./validate.sh`](./validate.sh) script runs all the test suites. It takes
122132
various options to restrict the test suites it runs; use `--help` to list them.
@@ -358,10 +368,6 @@ If your pull request consists of several commits, consider using `squash+merge
358368
me` instead of `merge me`: the Mergify bot will squash all the commits into one
359369
and concatenate the commit messages of the commits before merging.
360370
361-
There is also a `merge+no rebase` label. Use this very sparingly, as not rebasing
362-
severely complicates Git history. It is intended for special circumstances, as when
363-
the PR branch cannot or should not be modified. If you have any questions about it,
364-
please ask us.
365371
366372
### Pull Requests & Issues
367373
@@ -371,32 +377,34 @@ your proposed design, UX considerations, tradeoffs etc. and work them out with
371377
other contributors. The PR itself is for implementation.
372378
373379
If a PR becomes out of sync with its issue, go back to the issue, update
374-
it, and continue the conversation there. Telltale signs of Issue/PR diverging
380+
it, and continue the conversation there. Telltale signs of an issue and PR diverging
375381
are, for example: the PR growing bigger in scope; lengthy discussions
376382
about things that are *not* implementation choices; a change in design.
377383
378384
If your PR is trivial you can omit this process (but explain in the PR why you
379385
think it does not warrant an issue). Feel free to open a new issue (or new
380386
issues) when appropriate.
381387
388+
382389
### Pull request size
383390
384-
Keep your pull requests small, write one pull request per feature, let
391+
Keep your pull requests small, write one pull request per feature, make
385392
the content of the pull request match the title of the pull request.
386393
387-
To get merged, your pull request needs to be reviewed by two other
394+
As mentioned above, your pull request needs to be reviewed by two other
388395
contributors. Large pull requests are daunting to inspect, and the
389396
back-and-forth between the author and reviewer can get frustrating and
390397
difficult to follow.
391398
392-
Split your pull requests in multiple ones if possible (e.g. a refactor
399+
Split your pull requests into multiple ones if possible (e.g. a refactor
393400
and a feature implementation should go in two different pull requests).
394401
This is *especially* important when we decide to backport a pull request
395402
(be it fix or a feature).
396403
397404
Thorough reviews mean fewer regressions, keeping your pull requests small
398405
will improve Cabal codebase quality.
399406
407+
400408
### Pull requests for `gh` users
401409
402410
Are you a [`gh`](https://cli.github.com/) (GitHub’s official command line tool)
@@ -410,16 +418,17 @@ This way you will not erase the
410418
[PR template](https://github.com/haskell/cabal/blob/master/.github/pull_request_template.md)
411419
all contributors use.
412420
421+
413422
## Changelog
414423
415-
Anything that changes `cabal-install:exe:cabal` or changes exports from library
416-
modules or changes behaviour of functions exported from packages published to
424+
Anything that changes `cabal-install:exe:cabal`, changes exports from library
425+
modules, or changes behaviour of functions exported from packages published to
417426
hackage is a <a id="user-visible-change">user-visible change</a>. Raising the
418427
lower bound on `base` is most definitely a user-visible change because it
419428
excludes versions of GHC from being able to build these packages.
420429
421430
When opening a pull request with a user-visible change, you should write one
422-
changelog entry (or more in case of multiple independent changes) — the
431+
changelog entry (or more in case of multiple independent changes). The
423432
information will end up in our release notes.
424433
425434
Changelogs for the next release are stored in the `changelog.d` directory.
@@ -493,16 +502,18 @@ add an entry in `doc/file-format-changelog.rst`.
493502

494503
### Is my change `significant`?
495504

496-
Use your best judgement and if unsure ask other maintainers. If your PR fixes
497-
a specific ticket, how busy was the discussion there? A new command or option
498-
most likely warrants a `significance: significant` tag, same with command
499-
line changes that disrupts the workflow of many users or an API change
500-
that requires substantial time to integrate in a program.
505+
Use your best judgement and if unsure ask the
506+
[maintainers](https://github.com/haskell/cabal-CABAL-MAINTAINERS.md).
507+
If your PR fixes a specific ticket, how busy was the discussion there?
508+
A new command or option most likely warrants a `significance: significant`
509+
tag, as do command line changes that disrupt the workflow of many users or
510+
API changes that require substantial updates for downstream users.
501511

502512
Put yourself in the shoes of the user: would you appreciate seeing this
503513
change highlighted in the announcement post or release notes overview? If
504514
so, add `significance: significant`.
505515

516+
506517
## Communicating
507518

508519
There are a few main venues of communication:
@@ -516,20 +527,13 @@ There are a few main venues of communication:
516527
* You can join the channel using a web client, even anonymously: https://web.libera.chat/#hackage
517528
* Alternatively you can join it using [matrix](https://matrix.org/): https://matrix.to/#/#hackage:matrix.org
518529

519-
## Releases
520-
521-
Notes for how to make a release are at the
522-
wiki page ["Making a release"](https://github.com/haskell/cabal/wiki/Making-a-release).
523-
Currently, [@emilypi](https://github.com/emilypi), [@fgaz](https://github.com/fgaz) and [@Mikolaj](https://github.com/Mikolaj) have access to
524-
`haskell.org/cabal`, and [@Mikolaj](https://github.com/Mikolaj) is the point of contact for getting
525-
permissions.
526530

527531
## Preview Releases
528532

529533
We make preview releases available to facilitate testing of development builds.
530534

531535
Artifacts can be found on the [`cabal-head` release page](https://github.com/haskell/cabal/releases/tag/cabal-head).
532-
The Validate CI pipeline generates tarballs with a `cabal` executable. The executable gets uploaded to this release by the pipelines that run on `master`.
536+
The Build and release CI pipeline generates tarballs with a `cabal` executable. The executable gets uploaded to this release by the pipelines that run on `master`.
533537

534538
We currently make available builds for:
535539
- Linux, dynamically linked (requiring `zlib`, `gmp`, `glibc`)
@@ -546,37 +550,12 @@ and then build by calling `cabal build cabal-install --enable-executable-static`
546550

547551
Auto-generated API documentation for the `master` branch of Cabal is automatically uploaded here: http://haskell.github.io/cabal-website/doc/html/Cabal/.
548552

549-
## Issue triage [![Open Source Helpers](https://www.codetriage.com/haskell/cabal/badges/users.svg)](https://www.codetriage.com/haskell/cabal)
550-
551-
You can contribute by triaging issues which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to cabal on CodeTriage](https://www.codetriage.com/haskell/cabal).
552553

553554
## Hackage Revisions
554555

555556
We are reactive rather than proactive with revising bounds on our dependencies
556557
for code already released on Hackage. If you would benefit from a version bump,
557558
please, open a ticket and get familiar with
558559
[our revision policy](https://github.com/haskell/cabal/issues/9531#issuecomment-1866930240).
559-
560-
The burden of proof that the bump is harmless remains with you, but we have a CI
561-
setup to show that our main pipeline ("Validate") is fine with the bump. To use
562-
it, someone with enough permissions needs to go on the
563-
[Validate workflow page](https://github.com/haskell/cabal/actions/workflows/validate.yml)
564-
and dispatch it manually by clicking "Run workflow".
565-
566-
Running workflow manually as discussed above allows you to supply two inputs:
567-
568-
> allow-newer line
569-
> constraints line
570-
571-
Going via an example, imagine that Cabal only allows `tar` or version less then
572-
or equal to 0.6, and you want to bump it to 0.6. Then, to show that Validate
573-
succeeds with `tar` 0.6, you should input
574-
575-
- `tar` to the "allow-newer line"
576-
- `tar ==0.6` to the "constraints line"
577-
578-
Hopefully, running the Validate pipeline with these inputs succeeds and you
579-
supply the link to the run in the ticket about bumping the bound and making a revision.
580-
581-
If interested in technical details, refer to the parts of `validate.yml` that
582-
mention `hackage-revisions`.
560+
You should ensure that the bump is harmless remains with you, but we will test in our CI
561+
before making the revision.

MAINTAINERS.md

Lines changed: 123 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
## List of Maintainers
1+
# Cabal maintainer documentation
22

3-
a.k.a. The Cabal Maintainers Team:
3+
This document outlines some of the things that cabal maintainers should know. Contributors shouldn't need anything in here, unless they're working on the CI system or need an executive decision from a repo maintainer below. (If you find that you do, please open an issue pointing out what needs to be moved to the contributor documentation.)
4+
5+
This is a first draft; many things are as yet missing. Open an issue if you need something added here.
6+
7+
8+
## Maintainers
9+
10+
The Cabal Maintainers Team consists of:
411

512
* Mikolaj Konarski ([`@Mikolaj`](https://github.com/Mikolaj), [email protected], [`ce1ed8ae0b011d8c`](https://keyserver.ubuntu.com/pks/lookup?op=vindex&search=0xce1ed8ae0b011d8c))
613

@@ -10,23 +17,128 @@ a.k.a. The Cabal Maintainers Team:
1017

1118
* Brandon Allbery ([`@geekosaur`](https://github.com/geekosaur), [email protected], [`227ee1942b0bdb95`](https://keyserver.ubuntu.com/pks/lookup?op=vindex&search=0x227ee1942b0bdb95))
1219

13-
* Matthew Pickering ([`@mpickering`](https://github.com/mpickering), [email protected])
14-
15-
### How we compose this list
20+
* Matthew Pickering ([`@mpickering`](https://github.com/mpickering), [email protected])
1621

17-
The main goal of the team is to ensure that Cabal is keeping up with the ever-evolving Haskell ecosystem.
18-
In practical terms this means producing releases of the packages in this repository on a regular basis: we usually have to release at least as often as does GHC due to an intimate connection between the compiler and the build system.
19-
Hence, the people listed above (in chronological order by when they joined the team) are those who are currently available for carrying out the release procedures.
22+
The main goal of the team is to ensure that Cabal is keeping up with the ever-evolving Haskell ecosystem. In practical terms this means producing releases of the packages in this repository on a regular basis: we usually have to release at least as often as does GHC due to an intimate connection between the compiler and the build system. Hence, the people listed above (in chronological order by when they joined the team) are those who are currently available for carrying out the release procedures.
2023

2124
Successful maintenance requires coordination, and the team engages in three main ways:
2225

2326
- attending to issues and PRs on GitHub;
2427

2528
- discussing Cabal on the [Matrix channel](https://matrix.to/#/#hackage:matrix.org);
2629

27-
- meeting biweekly in video calls with agenda prepared asynchronously in a Markdown document, which also holds the meeting notes.
30+
- meeting biweekly in video calls with agenda prepared asynchronously in a [Markdown document](https://hackmd.io/ytXS6xrAS2mTyPVxdUS6OA?both), which also holds the meeting notes.
2831

2932
Worth noting that the meetings are open to everyone interested in Cabal, especially aspiring and returning Cabal contributors. Ask on Matrix how to join.
3033

31-
Most of the current team are volunteers, and we are happy to receive any help.
32-
If you want to participate in Cabal maintenance as defined above (e.g. take on some release tasks), get in touch: open a GitHub discussion or send a message on Matrix.
34+
Most of the current team are volunteers, and we are happy to receive any help. If you want to participate in Cabal maintenance as defined above (e.g. take on some release tasks), get in touch: open a GitHub discussion or send a message on Matrix.
35+
36+
37+
## Workflows
38+
39+
The standard workflows are:
40+
41+
- `bootstrap.yml`: bootstrap a cabal from prepared JSONs (see `make bootstrap-jsons`)
42+
- `validate.yml`: build a cabal with extra assertions and run the full test suite on it
43+
- `changelogs.yml`: validate `changelog.d` files using [`changelog-d`]
44+
- `dependabot.yml`: check `dependabot` configuration (sadly, not automatic; we lifted this from Ubuntu's CI)
45+
- `lint.yml`: run `hlint` on cabal sources
46+
- `format.yml`: check source formatting using Fourmolu v0.12
47+
- `quick-jobs.yml`: various (formerly) quick checks
48+
- `release.yaml`: build devel / release binaries for multiple platforms
49+
- `typos.yml`: look for typos in documentation
50+
- `users-guide.yml`: generate the users guide, creating an artifact
51+
- `whitespace.yml`: check for extraneous whitespace in various files
52+
- `check-sdist.yml`: make sure cabal can be built against the `Cabal` bootlib (see e.g. #10931, #9863)
53+
- `release.yml`: build release binaries, either as part of a release or for testing
54+
55+
The validate workflow performs a number of tests on tier-1 platforms:
56+
57+
- on current GHCs (see the list of ghc versions in the jobs `matrix` in `validate.yml`) it runs through the full suite of tests (`lib-tests`, `lib-suite`, `cli-tests`, and `cli-suite`)
58+
- on older GHCs (see the `extra-ghc` entries in `validate-old-ghcs`) it only runs `lib-suite-extras`, which is a cut-down test suite
59+
- it builds but doesn't validate (for some reason) a static `cabal` on Alpine with MUSL
60+
- it dogfoods `cabal` by having it build itself
61+
62+
You can use a manual dispatch on the validate workflow. It has two optional parameters:
63+
- `allow-newer line` will add an `allow-newer:` entry to the project file. Don't include the prefix.
64+
- `constraints line` will similarly add a `constraints:` entry.
65+
66+
The bootstrap workflow verifies that cabal can be built from pregenerated JSONs, for use in bootstrapping cabal on a new platform (since cabal is self-hosted). Note that, while we test this on release branches currently, bootstrapping is only supported from `master`.
67+
68+
The release workflow tests that PRs result in releasable `cabal`s, and is also used to produce `cabal` for releases. It can be dispatched manually or via a label `run release build`. It also performs daily draft releases starting at 00:00 UTC. It builds, tests, and releases for a wide variety of platforms, not all of which are considered Tier I for cabal development. (See list of tiers below.)
69+
70+
71+
## Actions
72+
73+
Currently there is only one local action:
74+
75+
- `reusable-release.yaml`: the actual guts of `release.yaml` above.
76+
77+
The `validate-actions` branch in development will add more reusable actions for `validate.yml` in order to reduce duplication and make it more maintainable, and at that time `reusable-release` will likely be moved with the other reusable actions.
78+
79+
80+
## Support tiers
81+
82+
Currently we support the following platforms as Tier 1:
83+
84+
- MacOS on AArch64
85+
- X86-64 (aka AMD64)
86+
- Windows (10 and 11)
87+
88+
Tier 2 platforms are:
89+
90+
- FreeBSD (AMD64 only)
91+
- Alpine/MUSL static build
92+
- MacOS on Intel
93+
- X86 (deprecated)
94+
- ARM Linux (Debian and Alpine)
95+
96+
We do not currently test on tier 2 platforms, but support for that is coming.
97+
98+
99+
## CI
100+
101+
Mergify requires 2 approvals and a 2-day cooldown period before merging on `master`. Release branches are different, because we don't normally commit directly to them except during a release.
102+
103+
The rules for PRs on release branches are:
104+
105+
- only 1 approval needed for backports via Mergify (`@mergifyio backport branch`), otherwise 2 as usual
106+
- no cooldown period, since either it's a backport of a PR that already received scrutiny or we're in the middle of a release and need things to move along
107+
108+
Note that you should not make (or approve) a PR directly to a release branch, unless it's necessary for release (usually this would be changelogs, but occasionally is needed for manual backports with conflicts).
109+
110+
111+
## GPG keys
112+
113+
All maintainers who are authorized to make release binaries should have GPG keys cross-signed with other maintainers' keys. @f-a and @geekosaur can help with this if a new maintainer is onboarded.
114+
115+
116+
## Releases
117+
118+
Notes for how to make a release are at the
119+
wiki page ["Making a release"](https://github.com/haskell/cabal/wiki/Making-a-release).
120+
Currently, [@emilypi](https://github.com/emilypi), [@fgaz](https://github.com/fgaz) and [@Mikolaj](https://github.com/Mikolaj) have access to
121+
`haskell.org/cabal`, and [@Mikolaj](https://github.com/Mikolaj) is the point of contact for getting
122+
permissions.
123+
124+
125+
## Hackage Revisions
126+
127+
We have a CI setup to test that our main pipeline ("Validate") accepts a proposed revision. To use
128+
it, go to the
129+
[Validate workflow page](https://github.com/haskell/cabal/actions/workflows/validate.yml)
130+
and dispatch it manually by clicking "Run workflow". As noted above in ["Workflows"](#workflows),
131+
you can specify `allow-newer:` and `constraints:` entries reflecting the proposed revision.
132+
133+
For example, imagine that Cabal only allows `tar` or version less then
134+
or equal to 0.6, and you want to bump it to 0.6. Then, to show that Validate
135+
succeeds with `tar` 0.6, you should input
136+
137+
- `tar` for the `allow-newer line`
138+
- `tar ==0.6` for the `constraints line`
139+
140+
Hopefully, running the Validate pipeline with these inputs succeeds, and you
141+
should link to the run in the ticket about bumping the bound and making a revision.
142+
143+
If you are interested in the technical details, refer to the parts of `validate.yml` that
144+
mention `hackage-revisions`.

0 commit comments

Comments
 (0)