Skip to content

[WIP] Implement External Custom Setup - #4055

Closed
Ericson2314 wants to merge 2 commits into
haskell:masterfrom
Ericson2314:setup-component
Closed

Ericson2314 wants to merge 2 commits into
haskell:masterfrom
Ericson2314:setup-component

Conversation

@Ericson2314

@Ericson2314 Ericson2314 commented Oct 29, 2016 •

Copy link
Copy Markdown
Collaborator

Implementation of #4047

 - `custom-setup` can contain `setup-tool` or `setup-depends`
 - parses both ways
 - check to make sure both `setup-*` fields aren't give n
@mention-bot

Copy link
Copy Markdown

@Ericson2314, thanks for your PR! By analyzing the history of the files in this pull request, we identified @phadej, @ezyang and @dcoutts to be potential reviewers.

@Ericson2314 Ericson2314 changed the title [WIP] Implement External custom setup (#4047) [WIP] Implement External custom setup Oct 29, 2016
@Ericson2314 Ericson2314 changed the title [WIP] Implement External custom setup [WIP] Implement External Custom Setup Oct 29, 2016
Comment thread Cabal/Distribution/Package.hs Outdated

parse = do name <- parse
_ <- Parse.char ':'
exe <- Parse.munch1 isAlphaNum

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the executable name format is more flexible than AlphaNum. Safest is to parse as if it were a PackageName.

Comment thread Cabal/Distribution/Parsec/Class.hs Outdated
parsec = do
name <- lexemeParsec
_ <- P.char ':'
exe <- P.munch1 isAlphaNum

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't forget to update here too when you're done.

(x, "") -> x
(x, y) -> error "Ambiguous values for test field: '"
where combine field = field a `mappend` field b
combine' field = case ( unUnqualComponentName $ field a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd much prefer it if you could add a function like "isNullUnqualComponentName" to factor this type of test. It would be more efficient too since unUnqualComponentName requires serializing to String.

@ezyang

ezyang commented Jan 22, 2017

Copy link
Copy Markdown
Contributor

@Ericson2314 Should we close this PR for now?

@Ericson2314

Copy link
Copy Markdown
Collaborator Author

Sure. It will look completely different rebased, and the point won't be external custom setups anyways.

@Ericson2314
Ericson2314 deleted the setup-component branch January 25, 2017 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants