| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #16228. The included test case is adapted from the reproduction in
the issue, and fails without this patch.
------
We compute an initial visilibity mapping for units based on what is
present in the package databases. To seed this, we compute a set of all
the package configs to add visibilities for.
However, this set was keyed off the unit's *package name*. This is
correct, since we compare packages across databases by version. However,
we would only ever consider a single, most-preferable unit from the
database in which it was found.
The effect of this was that only one of the libraries in a Cabal package
would be added to this initial set. This would cause attempts to use
modules from the omitted libraries to fail, claiming that the package
was hidden (even though `ghc-pkg` would correctly show it as visible).
A solution is to do the selection of the most preferable packages
separately, and then be sure to consider exposing all units in the
same package in the same package db. We can do this by picking a
most-preferable unit for each package name, and then considering
exposing all units that are equi-preferable with that unit.
------
Why wasn't this bug apparent to all people trying to use sub-libraries
in Cabal? The answer is that Cabal explicitly passes `-package` and
`-package-id` flags for all the packages it wants to use, rather than
relying on the state of the package database. So this bug only really
affects people who are trying to use package databases produced by Cabal
outside of Cabal itself.
One particular example of this is the way that the
Nixpkgs Haskell infrastructure provides wrapped GHCs: typically these
are equipped with a package database containing all the needed
package dependencies, and the user is not expected to pass
`-package` flags explicitly.
|
|
|
|
| |
It doesn't fail reliably.
|
|
|
|
| |
See #16386.
|
|
|
|
|
| |
This eliminates most uses of run_command in the testsuite in favor of the more
structured makefile_test.
|
|
|
|
| |
This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
|
| |
|
|
|
|
|
|
|
| |
This also requires adapting `ghc-pkg` to use the new Cabal parsing API
as the old ReadP-based one has finally been evicted for good.
Hadrian bit finished by: Ben Gamari <ben@smart-cactus.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We saw following errors:
```
$ cabal install --disable-library-vanilla --disable-shared --enable-library-profiling
hashable-1.2.7.0: cannot find any of
["libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ.a",
"libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ.p_a",
"libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ-ghc8.4.3.so",
"libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ-ghc8.4.3.dylib",
"HShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ-ghc8.4.3.dll"]
```
This is because ghc-pkg is looking for
`libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ.p_a` instead of
`libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ_p.a`.
Test Plan: ./validate
Reviewers: simonmar, bgamari
Reviewed By: simonmar
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5234
|
| |
|
|
|
|
|
|
| |
Several tests were failing in DEBUG mode, but fixing this
was easy: just pass $(TEST_HC_OPTS) in the relevant
Makefiles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When inferring the correct abi-depends, we now look at all the package
databases in the stack, up to and including the current one, because
these are the ones that the current package can legally depend on. While
doing so, we will issue warnings:
- In verbose mode, we warn about every package that declares
abi-depends:, whether we actually end up overriding them with the
inferred ones or not ("possibly broken abi-depends").
- Otherwise, we only warn about packages whose declared abi-depends
does not match what we inferred ("definitely broken abi-depends").
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14381
Differential Revision: https://phabricator.haskell.org/D4729
|
|
|
|
|
|
| |
This reverts commit 1cdc14f9c014f1a520638f7c0a01799ac6d104e6.
This is causing non-deterministic testsuite output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See `Note [Recompute abi-depends]` for more information.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Test Plan: `./validate`
Reviewers: bgamari, ezyang
Reviewed By: bgamari
Subscribers: tdammers, juhp, carter, alexbiehl, shlevy, cocreature,
rwbarton, thomie
GHC Trac Issues: #14381
Differential Revision: https://phabricator.haskell.org/D4159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This finally gets us to a green ./validate --slow on linux for a ghc
checkout from the beginning of this week, see
https://circleci.com/gh/ghc/ghc/4739
This is hopefully the final (or second to final) patch to
address #14890.
Test Plan: ./validate --slow
Reviewers: bgamari, hvr, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14890
Differential Revision: https://phabricator.haskell.org/D4712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A rather detailed summary can be found at:
https://gist.github.com/alpmestan/be82b47bb88b7dc9ff84105af9b1bb82
This doesn't fix all expectation mismatches yet, but we're down to about
20 mismatches with my previous patch and this one, as opposed to ~150
when I got started.
Test Plan: ./validate --slow
Reviewers: bgamari, erikd, simonmar
Reviewed By: simonmar
Subscribers: thomie, carter
GHC Trac Issues: #14890
Differential Revision: https://phabricator.haskell.org/D4636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Cabal-2.2 uses SPDX license identifiers, so I had to update
`cabal-version: 2.1` packages `license: BSD3` to `license: BSD-3-Clause`
- `ghc-cabal` used old ReadP parsec, now it uses `parsec` too
- InstalledPackageInfo pretty-printing have changed a little,
fields with default values aren't printed. This can be changed in
`Cabal` still, but I haven't found problems with omitting them.
Note: `BSD-3-Clause` is parsed as "name = BSD, version = 3" by old
parser (because 3-Clause looks like version 3 with tag Clause).
If you see *"BSD-3" is not a valid license*, then something is using
old parser still.
Fixes #9885.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update to Win32 2.6 which is the expected version release for 8.4
This involves moving Cabal forward which brings some backwards incompatible
changes that needs various fixups.
Bump a bunch of submodules
Test Plan: ./validate
Reviewers: austin, bgamari, angerman
Reviewed By: bgamari, angerman
Subscribers: angerman, thomie, rwbarton
Differential Revision: https://phabricator.haskell.org/D4133
|
|
|
|
|
|
|
| |
Somehow the previous version passed on master but fails on ghc-8.2.
Will look deeper later.
(cherry picked from commit a6774e1d70f18f5c05279453d62fb3bcc7f07d7e)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The other-modules field listed things that weren't in fact modules,
causing this test to fail. See Cabal #4567.
Test Plan: Validate
Reviewers: hvr, austin
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3665
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Cabal internal libraries are implemented using a trick, where the 'name'
field in ghc-pkg registration file is munged into a new form to keep
each internal library looking like a distinct package to ghc-pkg and
other tools; e.g. the internal library q from package p is named
z-p-z-q.
Later, Cabal library got refactored so that we made a closer distinction
between these "munged" package names and the true package name of a
package. Unfortunately, this is an example of a refactor for clarity in
the source code which ends up causing problems downstream, because the
point of "munging" the package name was to make it so that ghc-pkg and
similar tools transparently used MungedPackageName whereever they
previously used PackageName (in preparation for them learning proper
syntax for package name + component name). Failing to do this meant
that internal libraries from the same package (but with different
names) clobber each other.
This commit search-replaces most occurrences of PackageName in
ghc-pkg and turns them into MungedPackageName. Otherwise there
shouldn't be any functional differenes.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: rwbarton, thomie
GHC Trac Issues: #13703
Differential Revision: https://phabricator.haskell.org/D3590
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When I originally implemented ABI-based shadowing as per
ee4e1654c31b9c6f6ad9b19ece25f040bbbcbd72, I switched our strategy
from pasting together lists to creating a map of all units first,
and then selecting packages from this. However, what I did
not realize when doing this was that we actually depended
on the *ordering* of these lists later, when we selected
a preferred package to use.
The crux is if I have -package-db db1 -package-db db2 -package p-0.1,
and p-0.1 is provided by both db1 and db2, which one does the
-package flag select? Previously, this was undetermined; now
we always select the instance from the LATEST package database.
(If p-0.1 shows up multiple times in the same database, once again
the chosen package is undefined.)
The reason why cabal08 intermittently failed was that, in practice,
we were sorting on the UnitId, so when we bumped version numbers,
that often wibbled the UnitIds so that they compared oppositely.
I've extended the test so that we check that the relation is
antisymmetric.
Fixes #13313
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3369
|
|
|
|
|
|
| |
Bumps containers, time, and unix submodules.
This reverts commit c347a121b07d22fb91172337407986b6541e319d.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script I used is included as testsuite/driver/kill_extra_files.py,
though at this point it is for mostly historical interest.
Some of the tests in libraries/hpc relied on extra_files.py, so this
commit includes an update to that submodule.
One test in libraries/process also relies on extra_files.py, but we
cannot update that submodule so easily, so for now we special-case it
in the test driver.
|
|
|
|
|
| |
Some of the *.T files were in libraries/hpc, so this contains an
update to that submodule.
|
|
|
|
|
|
|
|
| |
They broke everything and the solution will be non-trivial.
This reverts commit 8ccbc2e5252abd4fa67d155d4fff489ee9929906.
This reverts commit c8d995db5d743358b0583fe97f8113bf9047641e.
This reverts commit 7153370288e6075c4f8c996ff02227e48805da06.
|
| |
|
|
|
|
| |
We are now tracking the 2.0 branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `clean_cmd` and `extra_clean` setup functions don't do anything.
Remove them from .T files.
Created using https://github.com/thomie/refactor-ghc-testsuite. This
diff is a test for the .T-file parser/processor/pretty-printer in that
repository.
find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \;
Tests containing inline comments or multiline strings are not modified.
Preparation for #12223.
Test Plan: Harbormaster
Reviewers: austin, hvr, simonmar, mpickering, bgamari
Reviewed By: mpickering
Subscribers: mpickering
Differential Revision: https://phabricator.haskell.org/D3000
GHC Trac Issues: #12223
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is a complete fix based off of
ed7af26606b3a605a4511065ca1a43b1c0f3b51d for handling
shadowing and out-of-order -package-db flags simultaneously.
The general strategy is we first put all databases together,
overriding packages as necessary. Once this is done, we successfully
prune out broken packages, including packages which depend on a package
whose ABI differs from the ABI we need.
Our check gracefully degrades in the absence of abi-depends, as
we only check deps which are recorded in abi-depends.
Contains time and Cabal submodule update.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: niteria, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2846
GHC Trac Issues: #12485
|
|
|
|
| |
Updates a number of submodules.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch reverts the change introduced with
587dcccfdfa7a319e27300a4f3885071060b1f8e and restores the previous
default output of GHC (i.e., show source path and object path for each
compiled module).
The -fhide-source-paths flag can be used to hide these paths and reduce
the line
noise.
Reviewers: gracjan, nomeata, austin, bgamari, simonmar, hvr
Reviewed By: hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2728
GHC Trac Issues: #12851
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: simonmar, mpickering, austin, bgamari
Reviewed By: bgamari
Subscribers: mpickering, nomeata, thomie
Differential Revision: https://phabricator.haskell.org/D2679
GHC Trac Issues: #12807
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we pruned out orphan modules from external packages but this
was wrong. Fixes #12733 (which has more discussion.)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, austin
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D2610
GHC Trac Issues: #12733
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch implements Backpack for GHC. It's a big patch but I've tried quite
hard to keep things, by-in-large, self-contained.
The user facing specification for Backpack can be found at:
https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst
A guide to the implementation can be found at:
https://github.com/ezyang/ghc-proposals/blob/backpack-impl/proposals/0000-backpack-impl.rst
Has a submodule update for Cabal, as well as a submodule update
for filepath to handle more strict checking of cabal-version.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, simonmar, bgamari, goldfire
Subscribers: thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D1482
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: it's just a testcase
Reviewers: ezyang, simonmar, bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2450
GHC Trac Issues: #12485
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem with ignore_output is that it hides errors for WAY=ghci.
GHCi always returns with exit code 0 (unless it is broken itself).
For example: ghci015 must have been failing with compile errors for
years, but we didn't notice because all output was ignored.
Therefore, replace all uses of ignore_output with either ignore_stderr
or ignore_stdout. In some cases I opted for adding the expected output.
Update submodule hpc and stm.
Reviewed by: simonmar
Differential Revision: https://phabricator.haskell.org/D2367
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need for this flag anymore, since each test runs in a
newly created directory. Removing it cleans up testlib.py a bit.
There is a small risk that this renders some tests useless. It's hard to
know. Those tests should have specified -fforce-recomp` explicitly
anyway, so I'm not going to worry about it. I've fixed the ones that
failed without -fforce-recomp.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D2346
|
|
|
|
|
|
|
| |
This makes sure the testsuite keeps working when testdir contains
backward slashes.
Differential Revision: https://phabricator.haskell.org/D2314
|
|
|
|
|
|
|
|
|
|
| |
Also move the `cleanup` setting from `default_testopts` to `config`. The
`cleanup` setting is the same for all tests, hence it belongs in
`config`.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D2148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: hvr, bgamari, austin
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1926
GHC Trac Issues: #11589
|
| |
|
| |
|
|
|
|
| |
This seems necessary after 9634e24 (#11569).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On the GHC 8.0 RCs, multiple users reported a very strange error
whereby GHC would complain that the symbols names recorded in interface
files did not match the expected name. The reason for this is
that they were using an old version of Cabal which chose symbol
names differently from the installed package ID ('id' field) which
the package was to be installed with; GHC 8.0 now mandates that
these coincides.
This change adds a test to ghc-pkg to make sure that 'id' and 'key'
(which is how Cabal previously reported what the symbol name
was supposed to be) match; if they don't match or key is missing,
we assume that the Cabal was too old.
Bikeshed points:
- Should we offer more information about how to upgrade
Cabal correctly (i.e. specify a version?)
- Should we allow for a missing 'key'? If we allow for
'key' to be missing, we lose the ability to detect
Cabal from GHC 7.8 or earlier being used. If we
require it to be specified, then it will not be possible
for Cabal to deprecate the (unused) field and remove it
without having BC for 8.0.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, bgamari, hvr
Reviewed By: hvr
Subscribers: bergmark, thomie
Differential Revision: https://phabricator.haskell.org/D1892
GHC Trac Issues: #11558
|
|
|
|
|
|
|
| |
This test is no longer legitimate as the feature it tests was removed
from Cabal via
https://git.haskell.org/packages/Cabal.git/commitdiff/5d20551e44e565bad6335fa213fc4ad592db7225
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The shadowing and default behavior (in the absence of
-hide-all-packages) prefers packages that come from "later" package
databases. So for example if tmp1.d and tmp2.d both expose p-1.0, then
ghc -package-db tmp1.d -package-db tmp2.d
brings the p-1.0 from tmp2.d into scope (and if they have the same IPID,
tmp2.d shadows tmp1.d). HOWEVER, -package flags do NOT respect this
behavior.
ghc -package-db tmp1.d -package-db tmp2.d -package p-1.0
this will force the p-1.0 from tmp1.d to be exposed! This is
confusing, so this patch makes the behavior of -package flags
consistent.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1709
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: austin, bgamari, thomie
Reviewed By: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D1669
GHC Trac Issues: #11256
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
(Apologies for the size of this patch, I couldn't make a smaller one
that was validate-clean and also made sense independently)
(Some of this code is derived from GHCJS.)
This commit adds support for running interpreted code (for GHCi and
TemplateHaskell) in a separate process. The functionality is
experimental, so for now it is off by default and enabled by the flag
-fexternal-interpreter.
Reaosns we want this:
* compiling Template Haskell code with -prof does not require
building the code without -prof first
* when GHC itself is profiled, it can interpret unprofiled code, and
the same applies to dynamic linking. We would no longer need to
force -dynamic-too with TemplateHaskell, and we can load ordinary
objects into a dynamically-linked GHCi (and vice versa).
* An unprofiled GHCi can load and run profiled code, which means it
can use the stack-trace functionality provided by profiling without
taking the performance hit on the compiler that profiling would
entail.
Amongst other things; see
https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
Notes on the implementation are in Note [Remote GHCi] in the new
module compiler/ghci/GHCi.hs. It probably needs more documenting,
feel free to suggest things I could elaborate on.
Things that are not currently implemented for -fexternal-interpreter:
* The GHCi debugger
* :set prog, :set args in GHCi
* `recover` in Template Haskell
* Redirecting stdin/stdout for the external process
These are all doable, I just wanted to get to a working validate-clean
patch first.
I also haven't done any benchmarking yet. I expect there to be slight hit
to link times for byte code and some penalty due to having to
serialize/deserialize TH syntax, but I don't expect it to be a serious
problem. There's also lots of low-hanging fruit in the byte code
generator/linker that we could exploit to speed things up.
Test Plan:
* validate
* I've run parts of the test suite with
EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
There are a few failures due to the things not currently implemented
(see above).
Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1562
|