-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hsc2hs invocation picks up too many flags from pkgdb #2971
Comments
Signed-off-by: Edward Z. Yang <[email protected]>
When #3022 is merged this should only take a local change to fix. |
Actually, there is a bit more refactoring to do. The problem is the PackageIndex we store in
(where |
I accidentally fixed this on my way for another 2.0 blocker, so a patch is on the way. |
Previously, we unconditionally blasted in all packages, even if our component didn't actually depend on them. This fixes haskell#2971. Also, added a test T2971a which is the opposite problem; previously we didn't bring in include-dirs from internal libraries. That was fixed by the previous commit. Signed-off-by: Edward Z. Yang <[email protected]>
Previously, we unconditionally blasted in all packages, even if our component didn't actually depend on them. This fixes haskell#2971. Also, added a test T2971a which is the opposite problem; previously we didn't bring in include-dirs from internal libraries. That was fixed by the previous commit. Signed-off-by: Edward Z. Yang <[email protected]>
Previously, we unconditionally blasted in all packages, even if our component didn't actually depend on them. This fixes haskell#2971. Also, added a test T2971a which is the opposite problem; previously we didn't bring in include-dirs from internal libraries. That was fixed by the previous commit. Signed-off-by: Edward Z. Yang <[email protected]>
In 1.24, installedPkgs contained only references to the external package database, not any internal libraries. In particular, when we built a dynamically linked executable, installedPkgs did NOT have a reference to the internal library; instead, depLibraryPaths has a special case (hasInternalDeps) to add the final libdir to the RPATH. In HEAD, after 0d15ede, we started adding internal libraries (with the INPLACE registrations) to installedPkgs to fix haskell#2971. But depLibraryPaths was not updated, which means that the inplace registrations got picked up and added to the RPATH, resulting in bad temporary directories showing up in RPATHs. In this commit, we just filter out internal entries from installedPkgs and compute the library dirs for them from scratch (this code already existed, so no loss!) Fixes haskell#4025. Signed-off-by: Edward Z. Yang <[email protected]>
In 1.24, installedPkgs contained only references to the external package database, not any internal libraries. In particular, when we built a dynamically linked executable, installedPkgs did NOT have a reference to the internal library; instead, depLibraryPaths has a special case (hasInternalDeps) to add the final libdir to the RPATH. In HEAD, after 0d15ede, we started adding internal libraries (with the INPLACE registrations) to installedPkgs to fix haskell#2971. But depLibraryPaths was not updated, which means that the inplace registrations got picked up and added to the RPATH, resulting in bad temporary directories showing up in RPATHs. In this commit, we just filter out internal entries from installedPkgs and compute the library dirs for them from scratch (this code already existed, so no loss!) Fixes haskell#4025. Signed-off-by: Edward Z. Yang <[email protected]>
In 1.24, installedPkgs contained only references to the external package database, not any internal libraries. In particular, when we built a dynamically linked executable, installedPkgs did NOT have a reference to the internal library; instead, depLibraryPaths has a special case (hasInternalDeps) to add the final libdir to the RPATH. In HEAD, after 0d15ede, we started adding internal libraries (with the INPLACE registrations) to installedPkgs to fix haskell#2971. But depLibraryPaths was not updated, which means that the inplace registrations got picked up and added to the RPATH, resulting in bad temporary directories showing up in RPATHs. In this commit, we just filter out internal entries from installedPkgs and compute the library dirs for them from scratch (this code already existed, so no loss!) Fixes haskell#4025. Signed-off-by: Edward Z. Yang <[email protected]>
Cabal computes the transitive dependency of packages, and uses
include-paths
and other fields to determine what to pass tohsc2hs
. But it grabs too many packages: it does the entire set of all packages that ANY component in the package might need, rather than the component that is being built. Test case attached. I'll push a comment to the code that needs to be fixed too.test.zip
To run the test, first build p and q, and note that it fails. Now touch
/tmp/asdf.h
, and observe that it now succeeds. p adds/tmp
to import path, butq
's buildable executable does not refer to p and should not see it.The text was updated successfully, but these errors were encountered: