Skip to content

Commit 7d1fd6b

Browse files
committed
Update CONTRIBUTING.md + add changelog entry
1 parent bf8dff5 commit 7d1fd6b

File tree

4 files changed

+36
-52
lines changed

4 files changed

+36
-52
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -26,54 +26,23 @@ cabal v2-build Cabal:unit-tests # build Cabal's unit test suite
2626
cabal v2-build cabal-tests # etc...
2727
~~~~
2828

29-
**Dogfooding HEAD.**
30-
Many of the core developers of Cabal dogfood `cabal-install` HEAD
31-
when doing development on Cabal. This helps us identify bugs
32-
which were missed by the test suite and easily experiment with new
33-
features.
34-
35-
The recommended workflow in this case is slightly different: you will
36-
maintain two Cabal source trees: your production tree (built with a
37-
released version of Cabal) which always tracks `master` and which you
38-
update only when you want to move to a new version of Cabal to dogfood,
39-
and your development tree (built with your production Cabal) that you
40-
actually do development on.
41-
42-
In more detail, suppose you have checkouts of Cabal at `~/cabal-prod`
43-
and `~/cabal-dev`, and you have a release copy of cabal installed at
44-
`/opt/cabal/2.4/bin/cabal`. First, build your production tree:
45-
46-
~~~~
47-
cd ~/cabal-prod
48-
/opt/cabal/2.4/bin/cabal v2-build cabal
49-
~~~~
50-
51-
This will produce a cabal binary (see also: [Where are my build products?](http://cabal.readthedocs.io/en/latest/nix-local-build.html#where-are-my-build-products)
52-
). Add this binary to your PATH,
53-
and then use it to build your development copy:
54-
55-
~~~~
56-
cd ~/cabal-dev
57-
cabal v2-build cabal
58-
~~~~
59-
6029
Running tests
6130
-------------
6231

63-
**Using Travis and AppVeyor.**
32+
**Using Github Actions and AppVeyor.**
6433
If you are not in a hurry, the most convenient way to run tests on Cabal
6534
is to make a branch on GitHub and then open a pull request; our
66-
continuous integration service on Travis and AppVeyor will build and
35+
continuous integration service on Github Actions and AppVeyor will build and
6736
test your code. Title your PR with WIP so we know that it does not need
6837
code review.
6938

70-
Some tips for using Travis effectively:
39+
Some tips for using Github Actions effectively:
7140

72-
* Travis builds take a long time. Use them when you are pretty
41+
* Github Actions builds take a long time. Use them when you are pretty
7342
sure everything is OK; otherwise, try to run relevant tests locally
7443
first.
7544

76-
* Watch over your jobs on the [Travis website](http://travis-ci.org).
45+
* Watch over your jobs on the [Github Actions website](http://github.org/haskell/cabal/actions).
7746
If you know a build of yours is going to fail (because one job has
7847
already failed), be nice to others and cancel the rest of the jobs,
7948
so that other commits on the build queue can be processed.
@@ -97,10 +66,9 @@ failures:
9766
a specific operating system? If so, try reproducing the
9867
problem on the specific configuration.
9968

100-
4. Is the test failing on a Travis per-GHC build
101-
([for example](https://travis-ci.org/haskell-pushbot/cabal-binaries/builds/208128401))?
69+
4. Is the test failing on a Github Actions per-GHC build.
10270
In this case, if you click on "Branch", you can get access to
103-
the precise binaries that were built by Travis that are being
71+
the precise binaries that were built by Github Actions that are being
10472
tested. If you have an Ubuntu system, you can download
10573
the binaries and run them directly.
10674

@@ -137,21 +105,16 @@ There are also other test suites:
137105
on some utility functions in cabal-install you should run this test
138106
suite.
139107

140-
* `cabal-install:solver-quickcheck` are QuickCheck tests on
141-
cabal-install's dependency solver. If you are working
142-
on the solver you should run this test suite.
108+
* `cabal-install:long-tests` are QuickCheck tests on
109+
cabal-install's dependency solver, VCS, and file monitoring code.
110+
If you are working on the solver you should run this test suite.
143111

144112
* `cabal-install:integration-tests2` are integration tests on some
145113
top-level API functions inside the `cabal-install` source code.
146114

147115
For these test executables, `-p` which applies a regex filter to the test
148-
names.
149-
150-
**Testing `cabal-install` Locally**
151-
152-
If you are testing `cabal-install` locally, you may refer to its [TESTING.md](cabal-install/TESTING.md) for
153-
instructions on how to use the `Makefile` to produce the appropriate `.cabal` file
154-
with test targets. From there, you may add tests in the usual way.
116+
names. When running `cabal-install` test suites, one need only use `cabal test` or
117+
`cabal run <test-target>` in order to test locally.
155118

156119

157120
Conventions

cabal-install/cabal-install.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ library
239239

240240

241241
executable cabal
242-
import: warnings, base-dep, cabal-dep, cabal-install-solver-dep
242+
import: warnings, base-dep, cabal-dep
243243
main-is: Main.hs
244244
hs-source-dirs: main
245245
default-language: Haskell2010

changelog.d/pr-7358

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
synopsis: Expose `cabal-install` as library
2+
prs: #7358
3+
issues: #7224 #6090 #4798 #3781 #1597
4+
significance: significant
5+
description {
6+
7+
- Exposes `cabal-install` as a library, bumping the `cabal-install` cabal version to 2.2, and removing the dogfooding framework surrounding `cabal-install` to facilitate easier testing.
8+
9+
- Moves `cabal-install-solver` out to its own directory, and treats it as its own separate project. Addresses #6090, #7224, and #3781
10+
11+
- Enable HPC coverage:
12+
13+
- absorb `cabal-install-solver-dsl` module into the test modules, and
14+
incorporate it into its own test target.
15+
16+
- Splits out `cabal-install` unit tests from long-running tests.
17+
18+
- Adds proper subcomponent coverage masking so we can finally generate
19+
baseline coverage reports for `cabal-install`.
20+
21+
}

doc/cabal-project.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ feature was added.
625625
other.
626626

627627
It's not possible to set :cfg-field:`with-compiler` on a
628-
per-package basis.
628+
per-package basis.
629629

630630
The command line variant of this flag is
631631
``--with-compiler=ghc-7.8``; there is also a short version
@@ -703,7 +703,7 @@ feature was added.
703703
The command line variant of this flag is ``--compiler=ghc``.
704704

705705
It's not possible to set :cfg-field:`compiler` on a
706-
per-package basis.
706+
per-package basis.
707707

708708
.. cfg-field:: tests: boolean
709709
--enable-tests

0 commit comments

Comments
 (0)