Skip to content

cabal: 'parseField' called on a non-field. Consider this a bug. #1008

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

Closed
igfoo opened this issue Aug 16, 2012 · 2 comments
Closed

cabal: 'parseField' called on a non-field. Consider this a bug. #1008

igfoo opened this issue Aug 16, 2012 · 2 comments

Comments

@igfoo
Copy link
Contributor

igfoo commented Aug 16, 2012

Given this q.cabal:

name:         p
version:      1
category:     None
synopsis:     Test
license:      BSD3

build-type: Simple
cabal-version: >=1.8

flag f
  default True
  manual: True

executable e
  main-is: Main.hs

running "cabal configure" says

cabal: 'parseField' called on a non-field. Consider this a bug.

This is caused by the missing colon after "default".

I can reproduce this both with a cabal that identifies itself as

cabal-install version 0.14.0
using version 1.14.0 of the Cabal library 

and with one taken from the 1.16 branch today.

@rrnewton
Copy link
Member

Note, I just ran into this same bug when I accidentally inserted a bit of white space before the "Test-Suite" keyword. Very confusing!

I am using a fairly recent cabal HEAD (1.17).

@ttuegel ttuegel added this to the Cabal-1.24 milestone Apr 23, 2015
@phadej phadej mentioned this issue Oct 12, 2015
4 tasks
@23Skidoo 23Skidoo modified the milestones: Cabal 1.24, Cabal 1.26 Feb 21, 2016
@ezyang ezyang modified the milestone: Cabal 2.0 Sep 6, 2016
@gbaz
Copy link
Collaborator

gbaz commented Sep 5, 2021

now:

Errors encountered when parsing cabal file ./q.cabal:

q.cabal:11:3: error:
invalid subsection "default"

   10 | flag f
   11 |   default True
      |   ^

@gbaz gbaz closed this as completed Sep 5, 2021
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

6 participants