Skip to content

Unknown subsections are silently ignored #712

Closed
bos opened this Issue May 24, 2012 · 1 comment

1 participant

@bos
Haskell member
bos commented May 24, 2012

(Imported from Trac #721, reported by @ezyang on 2010-07-28)

Sections not on the top-level (like those used in conditionals) appear to be ignored silently if they are not recognized.

Name:                cabal-elseif
Version: 0.1
License: BSD3
License-file: LICENSE
Category: Bug
Build-type: Simple
Cabal-version: >=1.2
Library
if os(linux) {
Ghc-options: -O2
} elseif os(windows) {
Ghc-options: -O
}
Expected behavior: Cabal warns that elseif is not a supported section name
Actual behavior: Cabal silently accepts this and ignores the elseif section.

@bos
Haskell member
bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-07-28)

Yep. Bug in the parser. It should complain about all unknown sections/subsections.

@fhartwig fhartwig added a commit to fhartwig/cabal that referenced this issue Feb 22, 2014
@fhartwig fhartwig Add a warning for sections that are not on the top level.
Fixes #712
07ff584
@23Skidoo 23Skidoo closed this in #1699 Mar 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.