driver: Fix interaction of -Wunused-packages and reexported-modules
Spurious warnings were previously emitted if an import came from a reexport due to how -Wunused-packages were implemented. Removing the dependency would cause compilation to fail. The fix is to reimplement the warning a bit more directly, by searching for which package each import comes from using the normal module finding functions rather than consulting the EPS. This has the advantage that the check could be performed at any time after downsweep rather than also relying on a populated EPS. Fixes #19518 and #19777
Showing
- compiler/GHC/Driver/Make.hs 10 additions, 14 deletionscompiler/GHC/Driver/Make.hs
- compiler/GHC/Unit/Finder.hs 1 addition, 1 deletioncompiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/State.hs 25 additions, 3 deletionscompiler/GHC/Unit/State.hs
- testsuite/tests/cabal/t19518/Makefile 44 additions, 0 deletionstestsuite/tests/cabal/t19518/Makefile
- testsuite/tests/cabal/t19518/Setup.hs 2 additions, 0 deletionstestsuite/tests/cabal/t19518/Setup.hs
- testsuite/tests/cabal/t19518/all.T 9 additions, 0 deletionstestsuite/tests/cabal/t19518/all.T
- testsuite/tests/cabal/t19518/p/LICENSE 0 additions, 0 deletionstestsuite/tests/cabal/t19518/p/LICENSE
- testsuite/tests/cabal/t19518/p/P.hs 3 additions, 0 deletionstestsuite/tests/cabal/t19518/p/P.hs
- testsuite/tests/cabal/t19518/p/P2.hs 1 addition, 0 deletionstestsuite/tests/cabal/t19518/p/P2.hs
- testsuite/tests/cabal/t19518/p/Setup.hs 2 additions, 0 deletionstestsuite/tests/cabal/t19518/p/Setup.hs
- testsuite/tests/cabal/t19518/p/p.cabal 11 additions, 0 deletionstestsuite/tests/cabal/t19518/p/p.cabal
- testsuite/tests/cabal/t19518/q/LICENSE 0 additions, 0 deletionstestsuite/tests/cabal/t19518/q/LICENSE
- testsuite/tests/cabal/t19518/q/Q.hs 4 additions, 0 deletionstestsuite/tests/cabal/t19518/q/Q.hs
- testsuite/tests/cabal/t19518/q/Setup.hs 2 additions, 0 deletionstestsuite/tests/cabal/t19518/q/Setup.hs
- testsuite/tests/cabal/t19518/q/q.cabal 12 additions, 0 deletionstestsuite/tests/cabal/t19518/q/q.cabal
- testsuite/tests/cabal/t19518/r/LICENSE 0 additions, 0 deletionstestsuite/tests/cabal/t19518/r/LICENSE
- testsuite/tests/cabal/t19518/r/R.hs 3 additions, 0 deletionstestsuite/tests/cabal/t19518/r/R.hs
- testsuite/tests/cabal/t19518/r/Setup.hs 2 additions, 0 deletionstestsuite/tests/cabal/t19518/r/Setup.hs
- testsuite/tests/cabal/t19518/r/r.cabal 11 additions, 0 deletionstestsuite/tests/cabal/t19518/r/r.cabal
Loading
Please register or sign in to comment