Skip to content
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

Allow unqualified component syntax #3790

Open
mgsloan opened this issue Jan 18, 2018 · 2 comments
Open

Allow unqualified component syntax #3790

mgsloan opened this issue Jan 18, 2018 · 2 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Jan 18, 2018

Currently, package components need to be qualified by PKG:test:TEST_NAME / etc. However, when I was poking around the Cabal code I noticed that having components with different types but the same name is no longer supported. Since it will be unambiguous, we should allow PKG:TEST_NAME. One question is if you write PKG:test, to refer to a component called test should that be allowed? I think so.

I actually think it should have been this way even if Cabal did not enforce this constraint. If it is aliased, just build both.

Similarly, I would like to support :component-name syntax. This would build all the components in the local packages matching that name. We could even consider glob patterns, but that is getting a little wild maybe.

@mitchellwrosen
Copy link
Contributor

However, when I was poking around the Cabal code I noticed that having components with different types but the same name is no longer supported.

Do you remember where in the code you saw this? It doesn't sound right to me (and the docs at http://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-new-build indicate otherwise, though I know they're always going out of date).

@mgsloan
Copy link
Contributor Author

mgsloan commented Feb 25, 2018

@mitchellwrosen Here https://github.com/haskell/cabal/blob/fix-travis-stack-build/Cabal/Distribution/PackageDescription/Check.hs#L200 . Not 100% sure, since it's part of cabal check. It does use the word "must", but maybe it is not actually required..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants