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

Add --build-depends flag, associated support to new-repl #5454

Merged
merged 9 commits into from Jul 29, 2018

Conversation

Projects
3 participants
@typedrat
Collaborator

typedrat commented Jul 24, 2018

Closes #5425. Adds --package flag, allows new-repl use outside of project folders.

Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.

@typedrat typedrat self-assigned this Jul 24, 2018

@23Skidoo

Looks OK in general, but I have some comments.

Show outdated Hide outdated cabal-install/Distribution/Client/CmdRepl.hs
@@ -236,7 +236,7 @@ data PackageSpecifier pkg =
-- | A fully specified source package.
--
| SpecificSourcePackage pkg
deriving (Eq, Show, Generic)
deriving (Eq, Show, Functor, Generic)

This comment has been minimized.

@23Skidoo

23Skidoo Jul 24, 2018

Member

I'd rather prefer if we used an explicit lambda with case analysis or a mapSpecificSourcePackage helper here. Code like fmap fmap is not super readable.

@23Skidoo

23Skidoo Jul 24, 2018

Member

I'd rather prefer if we used an explicit lambda with case analysis or a mapSpecificSourcePackage helper here. Code like fmap fmap is not super readable.

Show outdated Hide outdated cabal-install/Distribution/Client/CmdRepl.hs
Show outdated Hide outdated cabal-install/Distribution/Client/CmdRepl.hs
Show outdated Hide outdated cabal-install/Distribution/Client/CmdRepl.hs
Show outdated Hide outdated cabal-install/Distribution/Client/CmdRepl.hs
Show outdated Hide outdated cabal-install/Distribution/Client/CmdRepl.hs
@hvr

This comment has been minimized.

Show comment
Hide comment
@hvr

hvr Jul 26, 2018

Member

I briefly discussed the naming choice --package with @typedrat, and I'm convinced that it's a misnomer; the better naming would be something akin to --build-depends, as a) we care only about the library components, and b) we want consistency w/ with pre-existing terms, in this case from the .cabal file; c) when we extend the syntax of build-depends to specify public multi-libs packages, we'd increase the level of misnaming even more, as some multi-lib (I have at least one in mind which will be) that will be designed in a way to deliberate clash with each other, and so you must be able to select the scope at the component level. d) reusing the build-depends syntax is more convenient as you can specify the version constraints syntax directly w/o being forced to resort to --constraints (this is e.g. what cabal-env.sh does)

Member

hvr commented Jul 26, 2018

I briefly discussed the naming choice --package with @typedrat, and I'm convinced that it's a misnomer; the better naming would be something akin to --build-depends, as a) we care only about the library components, and b) we want consistency w/ with pre-existing terms, in this case from the .cabal file; c) when we extend the syntax of build-depends to specify public multi-libs packages, we'd increase the level of misnaming even more, as some multi-lib (I have at least one in mind which will be) that will be designed in a way to deliberate clash with each other, and so you must be able to select the scope at the component level. d) reusing the build-depends syntax is more convenient as you can specify the version constraints syntax directly w/o being forced to resort to --constraints (this is e.g. what cabal-env.sh does)

@typedrat typedrat moved this from In Progress to Needs Review in Have new-build become build (GSOC2018) Jul 27, 2018

@typedrat typedrat moved this from Needs Review to In Progress in Have new-build become build (GSOC2018) Jul 27, 2018

@typedrat typedrat changed the title from [WIP] Add --package flag, associated support to new-repl to Add --package flag, associated support to new-repl Jul 27, 2018

@typedrat typedrat moved this from In Progress to Needs Review in Have new-build become build (GSOC2018) Jul 27, 2018

@typedrat

This comment has been minimized.

Show comment
Hide comment
@typedrat

typedrat Jul 28, 2018

Collaborator

For some reason, outside of packages, this is failing with an error about being unable to find base.

Collaborator

typedrat commented Jul 28, 2018

For some reason, outside of packages, this is failing with an error about being unable to find base.

@typedrat typedrat moved this from Needs Review to Done in Have new-build become build (GSOC2018) Jul 29, 2018

@typedrat typedrat changed the title from Add --package flag, associated support to new-repl to Add --build-depends flag, associated support to new-repl Jul 29, 2018

@typedrat typedrat merged commit 36bfab3 into haskell:master Jul 29, 2018

1 check was pending

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment