Skip to content

Fix monolithic inplace build tool PATH #5633

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

Merged
merged 1 commit into from
Oct 29, 2018

Conversation

fgaz
Copy link
Member

@fgaz fgaz commented Oct 21, 2018

Monolithic inplace packages have a directory for each exe, so we allow
multiple paths and return all the exe paths of the package.

Fixes #5104

/cc @hvr

@fgaz fgaz added this to the 2.4.0.1 milestone Oct 21, 2018
@fgaz fgaz force-pushed the in-place-build-tools branch from 497db22 to d5781dc Compare October 21, 2018 19:46
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "497db229ca68243e7c8e9c03831d529a99d38882",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "497db229ca68243e7c8e9c03831d529a99d38882",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "497db229ca68243e7c8e9c03831d529a99d38882",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "497db229ca68243e7c8e9c03831d529a99d38882",
"tag":"linux-7.6.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "497db229ca68243e7c8e9c03831d529a99d38882",
"tag":"linux-8.2.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"linux-7.6.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"linux-8.2.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"linux-8.4.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"linux-8.4.4-fdebug-expensive-assertions"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"osx-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"osx-7.10.3"
}
@hvr
Copy link
Member

hvr commented Oct 21, 2018

I can confirm this fixes the original repro-case from #5104; I'm currently dogfooding this PR locally

haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 21, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "d5781dc7b857a3d802821d6be958134f086dff60",
"tag":"osx-8.0.2"
}
@hvr
Copy link
Member

hvr commented Oct 23, 2018

@23Skidoo fwiw, I couldn't find any empirical problems yet; I'd suggest merging

Copy link
Member

@23Skidoo 23Skidoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo minor stylistic issues.

, Just path <- [planPackageExePath pkg] ]
exe_map1 = Map.union external_exe_map exe_map
, let paths = planPackageExePaths pkg ]
exe_map1 = Map.union external_exe_map (pure <$> exe_map)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather be a bit more explicit here and write this as M.map singleton exe_map (if there's no singleton :: a -> [a] in cabal-install, we can add it to Distribution.Compat.Prelude or a utils module. Or just use (\a -> [a]).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about singleton <$> exe_map or fmap singleton exe_map? It's clear that it's a map from the Map.union imo

binDirectoryFor
distDirLayout
elaboratedSharedConfig
elab $
elab <$>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use map instead of <$> here as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like map (binDirectoryFor ...) case ...? or inline map? The first is a bit hard to follow imo, and inline map is just <$> (it's clear that we are acting on a [] from the type sig)... maybe a comment instead?

Or what about a binding?

Suggested change
elab <$>
elab
<$> executables
where
executables =

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of `map` instead of <$>.

@23Skidoo
Copy link
Member

@fgaz Both suggestions sound fine, use your discretion.

Monolithic inplace packages have a directory for each exe, so we allow
multiple paths and return all the exe paths of the package.

Fixes haskell#5104
@fgaz fgaz force-pushed the in-place-build-tools branch from d5781dc to c81bc98 Compare October 29, 2018 10:10
@fgaz fgaz merged commit 82b4fec into haskell:master Oct 29, 2018
@fgaz
Copy link
Member Author

fgaz commented Oct 29, 2018

Cherry picked on 2.4

haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 29, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "c81bc98faecd922da640455f99c10008ff3fb191",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 29, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "c81bc98faecd922da640455f99c10008ff3fb191",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 29, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "c81bc98faecd922da640455f99c10008ff3fb191",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Oct 29, 2018
"url":"pull/5633",
"account":"haskell",
"repo":"cabal",
"commit": "c81bc98faecd922da640455f99c10008ff3fb191",
"tag":"linux-7.6.3"
}
@fgaz fgaz deleted the in-place-build-tools branch August 29, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants