summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-05-05 13:48:19 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-19 23:33:02 -0400
commit38faeea1a94072ffd9f459d9fe570f06bc1da84a (patch)
tree00df888e529aa208e40589fe3f73790906324b8b /testsuite/tests/safeHaskell
parentc8564c639a9889d4d19c68f4b96c092f670b092c (diff)
downloadhaskell-38faeea1a94072ffd9f459d9fe570f06bc1da84a.tar.gz
Remove transitive information about modules and packages from interface files
This commit modifies interface files so that *only* direct information about modules and packages is stored in the interface file. * Only direct module and direct package dependencies are stored in the interface files. * Trusted packages are now stored separately as they need to be checked transitively. * hs-boot files below the compiled module in the home module are stored so that eps_is_boot can be calculated in one-shot mode without loading all interface files in the home package. * The transitive closure of signatures is stored separately This is important for two reasons * Less recompilation is needed, as motivated by #16885, a lot of redundant compilation was triggered when adding new imports deep in the module tree as all the parent interface files had to be redundantly updated. * Checking an interface file is cheaper because you don't have to perform a transitive traversal to check the dependencies are up-to-date. In the code, places where we would have used the transitive closure, we instead compute the necessary transitive closure. The closure is not computed very often, was already happening in checkDependencies, and was already happening in getLinkDeps. Fixes #16885 ------------------------- Metric Decrease: MultiLayerModules T13701 T13719 -------------------------
Diffstat (limited to 'testsuite/tests/safeHaskell')
-rw-r--r--testsuite/tests/safeHaskell/check/pkg01/Makefile16
-rw-r--r--testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout15
2 files changed, 15 insertions, 16 deletions
diff --git a/testsuite/tests/safeHaskell/check/pkg01/Makefile b/testsuite/tests/safeHaskell/check/pkg01/Makefile
index 283a7df530..4997a728a8 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/Makefile
+++ b/testsuite/tests/safeHaskell/check/pkg01/Makefile
@@ -40,28 +40,28 @@ safePkg01:
$(safePkg01_GHC_PKG) field safePkg01-1.0 trusted
echo
echo 'M_SafePkg'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg2'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg2.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg2.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg3'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg3.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg3.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg4'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg4.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg4.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg5'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg5.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg5.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg6'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg6.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg6.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg7'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg7.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg7.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg8'
- '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg8.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(SHOW_IFACE) pdb.safePkg01/dist/build/M_SafePkg8.$(HI_SUF) | grep -E '^trusted package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'Testing setting trust'
$(safePkg01_GHC_PKG) trust safePkg01-1.0
diff --git a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
index f2d60007a1..fea0257b7d 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
+++ b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
@@ -4,42 +4,41 @@ pdb.safePkg01/local.db
trusted: False
M_SafePkg
-package dependencies: base-4.13.0.0* ghc-bignum-1.0 ghc-prim-0.7.0
+trusted package dependencies: base-4.16.0.0
trusted: safe
require own pkg trusted: False
M_SafePkg2
-package dependencies: base-4.13.0.0 ghc-bignum-1.0 ghc-prim-0.7.0
trusted: trustworthy
require own pkg trusted: False
M_SafePkg3
-package dependencies: base-4.13.0.0* ghc-bignum-1.0 ghc-prim-0.7.0
+trusted package dependencies: base-4.16.0.0
trusted: safe
require own pkg trusted: True
M_SafePkg4
-package dependencies: base-4.13.0.0* ghc-bignum-1.0 ghc-prim-0.7.0
+trusted package dependencies: base-4.16.0.0
trusted: safe
require own pkg trusted: True
M_SafePkg5
-package dependencies: base-4.13.0.0* ghc-bignum-1.0 ghc-prim-0.7.0
+trusted package dependencies: base-4.16.0.0
trusted: safe-inferred
require own pkg trusted: True
M_SafePkg6
-package dependencies: array-0.5.4.0 base-4.13.0.0* bytestring-0.10.9.0* deepseq-1.4.4.0 ghc-bignum-1.0 ghc-prim-0.7.0
+trusted package dependencies: base-4.16.0.0 bytestring-0.11.1.0
trusted: trustworthy
require own pkg trusted: False
M_SafePkg7
-package dependencies: array-0.5.4.0 base-4.13.0.0* bytestring-0.10.9.0* deepseq-1.4.4.0 ghc-bignum-1.0 ghc-prim-0.7.0
+trusted package dependencies: base-4.16.0.0 bytestring-0.11.1.0
trusted: safe
require own pkg trusted: False
M_SafePkg8
-package dependencies: array-0.5.4.0 base-4.13.0.0 bytestring-0.10.9.0* deepseq-1.4.4.0 ghc-bignum-1.0 ghc-prim-0.7.0
+trusted package dependencies: base-4.16.0.0 bytestring-0.11.1.0
trusted: trustworthy
require own pkg trusted: False