Repository navigation
Do register monolithic packages if they contain a buildable pub-lib - #5604
Conversation
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "4cca74ec08213050e5ab03f07ef1a1248ba29007", "tag":"linux-7.6.3" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "4cca74ec08213050e5ab03f07ef1a1248ba29007", "tag":"osx-7.8.4" }
|
I was asked in private correspondence if the test
We must register and install dynamic libraries of the internal (non-public library), and this will not trigger the After thinking about the proposed change a bit, I think it's OK. I do think there's a more important, structural problem with the code we edited here. Basically, we shouldn't be making registration decisions based on selected build targets. A build target doesn't get fed into the Nix hash... so it shouldn't have an effect on how we install the package. I guess this is related to the strategy of pruning that local builds do.... but it seems very error prone. |
|
@ezyang ok, but
But is this situation currently possible? It was my understanding that internal libraries are not supported unless per-component builds can be enabled. In other words, we don't support internal libraries when using custom setups, do we? PS: Or are those disjunctive conditions you enumerated there? In that case, wouldn't case 2. be handled by the per-component codepath (i.e. via the |
|
You're right, I had forgotten about this. So yes, I guess if that case is impossible, the test their is redundant. But it's a sort of accidental redundancy which would go away if you ever made internal libraries work with non-per-component build (though we probably won't ever do that.) |
1 similar comment
|
You're right, I had forgotten about this. So yes, I guess if that case is impossible, the test their is redundant. But it's a sort of accidental redundancy which would go away if you ever made internal libraries work with non-per-component build (though we probably won't ever do that.) |
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "509b6d492beaf09a0a6a3abad4d74bc09cce2dff", "tag":"linux-7.6.3" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "509b6d492beaf09a0a6a3abad4d74bc09cce2dff", "tag":"osx-7.8.4" }
|
@ezyang btw, a test-case fails legitimately; specifically the And the problem is specifically because in this situation (i.e. for local packages) despite being in legacy non-component mode we can still build single components: Any suggestion/idea? |
|
Don't drop the condition I wrote? :) But yes, I think this is exactly the case (which I had forgotten about) which required the more subtle check I added. |
|
@ezyang if you look at the patch, I did not drop the condition! :-) |
As the case of `cpphs-1.20.8` has shown in haskell#5379, in cases when a monolithic package gets installed due to its executable components (i.e. `exe:cpphs`) into the store we *have* to register if there's a buildable public library (i.e. `lib:cpphs`) that was built and installed into the same store folder as otherwise this will cause build failures once a target actually depends on `lib:cpphs` This ought to fix haskell#5379
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"linux-7.10.3" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"linux-8.0.2" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"linux-7.6.3" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"linux-8.2.2" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"linux-8.4.4" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"linux-8.6.1" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"linux-8.4.4-fdebug-expensive-assertions" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"osx-7.8.4" }
"url":"pull/5604", "account":"haskell", "repo":"cabal", "commit": "957bbc7e88a11869fe95bb13778f7296faa95957", "tag":"osx-8.0.2" }
…5604) As the case of `cpphs-1.20.8` has shown in #5379, in cases when a monolithic package gets installed due to its executable components (i.e. `exe:cpphs`) into the store we *have* to register if there's a buildable public library (i.e. `lib:cpphs`) that was built and installed into the same store folder as otherwise this will cause build failures once a target actually depends on `lib:cpphs` This ought to fix #5379 (cherry picked from commit a4578fc)
|
merged to 2.4 via 517b49d I figured it out at last how to distinguish the inplace from the store-install case; the test-suite passes |
As the case of
cpphs-1.20.8has shown in #5379, in cases when amonolithic package gets installed due to its executable components
(i.e.
exe:cpphs) into the store we have to register if there's abuildable public library (i.e.
lib:cpphs) that was built and installedinto the same store folder as otherwise this will cause build failures
once a target actually depends on
lib:cpphsThis ought to fix #5379
(TODO: changelog entry when cherry-picking to 2.4)