-
Notifications
You must be signed in to change notification settings - Fork 696
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
{foo,bar} /= {foo, bar}, parse of field 'packages' failed #6732
Comments
Related: I think that |
Glob doesn't support brace expansion, Deewiant/glob#32. |
I'm not sure whether |
The particular example that lead me to try this was one where I wanted to exclude one package that I build with ghcjs so I tried to list packages and the brace expansion seemed offer me that with less keystrokes. -- brace expansion syntax
packages: lang-haskell/{clip,cmd,comp,detour-via-sci,detour-via-uom,earth,flare-timing,fsdb,gap,igc,kml,latlng,lookup,mask,route,scribe,siggy-chardust,span,task,tasty-compare,time,track,units,zone}/ -- manually listing each
packages:
lang-haskell/clip
lang-haskell/cmd
lang-haskell/comp
lang-haskell/detour-via-sci
lang-haskell/detour-via-uom
lang-haskell/earth
lang-haskell/flare-timing
lang-haskell/fsdb
lang-haskell/gap
lang-haskell/igc
lang-haskell/kml
lang-haskell/latlng
lang-haskell/lookup
lang-haskell/mask
lang-haskell/route
lang-haskell/scribe
lang-haskell/siggy-chardust
lang-haskell/span
lang-haskell/task
lang-haskell/tasty-compare
lang-haskell/time
lang-haskell/track
lang-haskell/units
lang-haskell/zone |
That is subjective, but I find the latter clearer. The fact you cannot arbitrarily insert whitespace into glob patterns make them badly suited for longer stuff. |
What really would have helped me in this case would be a negative match so I can say build all packages but these, something like: -- with not
packages: **/*.cabal not(**/appview/*.cabal) -- with another field
packages: **/*.cabal
excluded-packages: **/appview/*.cabal |
Negative match is out of question. I think we should stick to something well defined, e.g. POSIX shell semantics, and if anything rather restrict supported features. BTW: I think we don't support Anyway, please don't conflate issues. This is clearly a bug report which we'll fix. Discussion of |
I did a bit of testing and the packages:
**/siggy-chardust.cabal
> cabal new-build all
When using configuration(s) from /.../cabal.project, the following errors occurred:
The package location glob '**/siggy-chardust.cabal' does not match any files or directories.
packages:
**/**/siggy-chardust.cabal
> cabal new-build all
Up to date
packages:
**/siggy-chardust/*.cabal
> cabal new-build all
Up to date
packages:
*/siggy-chardust/*.cabal
> cabal new-build all
Up to date
packages:
**/siggy-chardust/**.cabal
> cabal new-build all
Up to date
packages:
**/*.cabal
> cabal new-build all
When using configuration(s) from /.../cabal.project, the following errors occurred:
The package location glob '**/*.cabal' does not match any files or directories.
packages:
**/siggy-chardust.cabal
> cabal new-build all
When using configuration(s) from /.../cabal.project, the following errors occurred:
The package location glob '**/siggy-chardust.cabal' does not match any files or directories. |
The
|
Bash uses |
Please read the |
cabal/Cabal/doc/cabal-project.rst
Lines 52 to 59 in 3752c3e
The example given in the docs works. If instead I try
../{foo, bar}/
with a comma and space, this fails with:I get the same error with
../{foo bar}/
.Could we have a better error message here about why the parsing failed or a note in the docs about not using spaces within the curlies please? This is an easy trap to fall into as the section in the docs mentions "package location list (space or comma separated)".
cabal/Cabal/doc/cabal-project.rst
Lines 40 to 41 in 3752c3e
I scanned this repo for
cabal.project
files and could not find a test that exercises the{foo,bar}
syntax.The text was updated successfully, but these errors were encountered: