Filter plugin dylib locations
authorChristiaan Baaij <christiaan.baaij@gmail.com>
Sat, 11 Aug 2018 16:56:34 +0000 (18:56 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sat, 11 Aug 2018 16:56:35 +0000 (18:56 +0200)
commitb324c5624432f2c3d5b0a689fdff75a1ccc563f5
treef52046861c946ac2cf97a1cab92545de085833f9
parentb44e747ffc45f5c0d075225f457f748313d683f1
Filter plugin dylib locations

Summary:
Previously we just created a cartesian product of the library
paths of the plugin package and the libraries of the package.
Of course, some of these combinations result in a filepath of
a file doesn't exists, leading to #15475.

Instead of making `haskFile` return Nothing in case a file
doesn't exist (which would hide errors), we look at all the
possible dylib locations and ensure that at least one of those
locations is an existing file. If the list turns out to be
empty however, we panic.

Reviewers: mpickering, bgamari

Reviewed By: mpickering

Subscribers: monoidal, rwbarton, carter

GHC Trac Issues: #15475

Differential Revision: https://phabricator.haskell.org/D5048
compiler/deSugar/DsUsage.hs
testsuite/tests/plugins/Makefile
testsuite/tests/plugins/all.T
testsuite/tests/plugins/plugin-recomp-change-prof.stderr [new file with mode: 0644]
testsuite/tests/plugins/plugin-recomp/Makefile