-
Notifications
You must be signed in to change notification settings - Fork 711
Duplicate component name in build path. #10965
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
Comments
This of course is some |
After some further reflection this will be a lot more involved to get right, simply because With a
we have two invocations:
and
now there is no guarantee you ran
will also work. The On the other hand when building components with cabal-install, we'll run Over all |
While experimenting with this further, I noticed something interesting
vs.
we don't even pick up the Arguably Configure with Setup.hs is broken already today for components. |
Futher we find that if we try to
, if we produce a buildinfo file. This stems from
with
Thusly, I think we can safely assume that Therefore and as #4548 also somewhat alluded to, the only sensible thing to do seems to be to restrict Therefore, I'll proceed to just null build-type Configure on component in NOTE: this does not address the duplication in the path though. |
Can you summarise what the problem of this ticket is? I don't see immediately why having the component name in the build path twice is a problem, is it an aesthetic issue? I was also reminded of this issue with buildinfo, #10238, but I am not sure that is relevant either. It seems the problem might actually something to do with sublibraries and |
I'd prefer to not have the component name duplicated in the build path if possible. It's not only pure aesthetics. In the ideal world you'd never want to read these paths, but in reality I do have to read them often, and having junk in the paths make my life harder because of the added length and, therefore, cognitive load. |
It's not just aesthetic, it's also about path-lengths. Not all operating systems permit infinitely long paths. The other is, that yes, under component builds, the configure script is run in a folder that's not the root of the package being built. |
Uh oh!
There was an error while loading. Please reload this page.
Ref.: #4548 When building sublibraries with cabal today, you end up with build paths like:
note the duplicate
$lib
in there.Tracking this down, leads us to two commits by @ezyang almost a decade ago.
on Mar 30, 2016 8e3c2d7
introduced the
componentBuildDir
which added the$comp
as a suffix to the$buildDir
.(this is
lib:Cabal
).on Aug 21, 2016 d9bf678
Changed the
to also include a
c/$comp
suffix. This was later modified by @hvr to have distinct single letter names for different components. E.g.l
for library.(this is
cabal-install
).Thus we now have
$comp
redundantly twice in the path. Also the buildPath we pass torunConfigureScript
(inConfigureScript.hs
), viaConfigFlags:CommonSetupFlags:setupDistPref
is$pkg/l/$comp/build
.It seems to me we've basically changed the component build path twice; while we only need to change it once to make it unique per component. As such I'm proposing to conceptually revert the
componentBuildDir
change from 8e3c2d7. And leave$pkg/l/$comp/build
to be the build directory. This will also transparently makebuild-type: Configure
work for components. We already run theconfigure
script in the$pkg/l/$comp
folder per component.The text was updated successfully, but these errors were encountered: