[Git][ghc/ghc][wip/hackage-bindist] 7 commits: Testsuite: more precise test options

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu Oct 27 11:33:46 UTC 2022



Matthew Pickering pushed to branch wip/hackage-bindist at Glasgow Haskell Compiler / GHC


Commits:
9ab31f42 by Sylvain Henry at 2022-10-26T09:32:20+02:00
Testsuite: more precise test options

Necessary for newer cross-compiling backends (JS, Wasm) that don't
support TH yet.

- - - - -
f60a1a62 by Vladislav Zavialov at 2022-10-26T12:17:14-04:00
Use TcRnVDQInTermType in noNestedForallsContextsErr (#20115)

When faced with VDQ in the type of a term, GHC generates the following
error message:

	Illegal visible, dependent quantification in the type of a term
	(GHC does not yet support this)

Prior to this patch, there were two ways this message could have been
generated and represented:

	1. with the dedicated constructor TcRnVDQInTermType
	    (see check_type in GHC.Tc.Validity)
	2. with the transitional constructor TcRnUnknownMessage
	    (see noNestedForallsContextsErr in GHC.Rename.Utils)

Not only this led to duplication of code generating the final SDoc,
it also made it tricky to track the origin of the error message.

This patch fixes the problem by using TcRnVDQInTermType exclusively.

- - - - -
ecf150ac by Matthew Pickering at 2022-10-27T12:26:01+01:00
Add test for #22162

- - - - -
539b5cc5 by Matthew Pickering at 2022-10-27T12:33:15+01:00
ci: Add job to test interface file determinism guarantees

In this job we can run on every commit we add a test which builds the
Cabal library twice and checks that the ABI hash and interface hash is
stable across the two builds.

* We run the test 20 times to try to weed out any race conditions due to
  `-j`
* We run the builds in different temporary directories to try to weed
  out anything related to build directory affecting ABI or interface
  file hash.

Fixes #22180

- - - - -
eefe67ff by Matthew Pickering at 2022-10-27T12:33:15+01:00
ci: Add job for testing interface stability across builds

The idea is that both the bindists should product libraries with the
same ABI and interface hash.
So the job checks with ghc-pkg to make sure the computed ABI
is the same.

In future this job can be extended to check for the other facets of
interface determinism.

Fixes #22180

- - - - -
7d08f651 by Matthew Pickering at 2022-10-27T12:33:15+01:00
backpack: Be more careful when adding together ImportAvails

There was some code in the signature merging logic which added together
the ImportAvails of the signature and the signature which was merged
into it. This had the side-effect of making the merged signature depend
on the signature (via a normal module dependency). The intention was to
propagate orphan instances through the merge but this also messed up
recompilation logic because we shouldn't be attempting to load B.hi when
mergeing it.

The fix is to just combine the part of ImportAvails that we intended to
(transitive info, orphan instances and type family instances) rather
than the whole thing.

- - - - -
bd523e6d by Matthew Pickering at 2022-10-27T12:33:15+01:00
Fix mk_mod_usage_info if the interface file is not already loaded

In #22217 it was observed that the order modules are compiled in affects
the contents of an interface file. This was because a module dependended
on another module indirectly, via a re-export but the interface file for
this module was never loaded because the symbol was never used in the
file.

If we decide that we depend on a module then we jolly well ought to
record this fact in the interface file! Otherwise it could lead to very
subtle recompilation bugs if the dependency is not tracked and the
module is updated.

Therefore the best thing to do is just to make sure the file is loaded
by calling the `loadSysInterface` function.  This first checks the
caches (like we did before) but then actually goes to find the interface
on disk if it wasn't loaded.

Fixes #22217

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Validity.hs
- testsuite/driver/testlib.py
- testsuite/tests/annotations/should_fail/all.T
- testsuite/tests/annotations/should_run/all.T
- testsuite/tests/backpack/should_fail/T19244a.stderr
- testsuite/tests/backpack/should_run/all.T
- testsuite/tests/codeGen/should_compile/T17904.hs
- testsuite/tests/codeGen/should_run/T20137/all.T
- testsuite/tests/codeGen/should_run/T20735/all.T
- testsuite/tests/codeGen/should_run/all.T
- testsuite/tests/corelint/all.T
- testsuite/tests/dependent/should_compile/all.T
- testsuite/tests/dependent/should_fail/T16326_Fail6.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail8.stderr
- testsuite/tests/dependent/should_fail/T18271.stderr
- testsuite/tests/deriving/should_compile/all.T
- + testsuite/tests/determinism/determ023/A.hs
- + testsuite/tests/determinism/determ023/Makefile
- + testsuite/tests/determinism/determ023/all.T


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1880a2f97bf09c7b82e14d6b1480e77e5e286263...bd523e6da2ace750c3ad275a3bce254b96962b45

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1880a2f97bf09c7b82e14d6b1480e77e5e286263...bd523e6da2ace750c3ad275a3bce254b96962b45
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221027/6627b0a9/attachment.html>


More information about the ghc-commits mailing list