Skip to content
Snippets Groups Projects
Unverified Commit 83b27d92 authored by Oleg Grenrus's avatar Oleg Grenrus Committed by GitHub
Browse files

Merge pull request #6173 from haskell/ignore-invalid-fields

parser: Clearly state that invalid fields are ignored
parents 3f15b324 438db945
No related branches found
No related tags found
No related merge requests found
......@@ -266,7 +266,7 @@ instance FieldGrammar ParsecFieldGrammar where
for_ (Map.toList unknownFields) $ \(name, fields) ->
for_ fields $ \(MkNamelessField pos _) ->
parseWarning pos PWTUnknownField $
"The field " <> show name <> " is available only since the Cabal specification version " ++ showCabalSpecVersion vs ++ "."
"The field " <> show name <> " is available only since the Cabal specification version " ++ showCabalSpecVersion vs ++ ". This field will be ignored."
pure def
......
multiple-libs-2.cabal:17:3: The field "visibility" is available only since the Cabal specification version 3.0.
multiple-libs-2.cabal:17:3: The field "visibility" is available only since the Cabal specification version 3.0. This field will be ignored.
No 'category' field.
No 'maintainer' field.
No 'description' field.
......
multiple-libs-2.cabal:17:3: The field "visibility" is available only since the Cabal specification version 3.0.
multiple-libs-2.cabal:17:3: The field "visibility" is available only since the Cabal specification version 3.0. This field will be ignored.
cabal-version: 2.0
name: multiple-libs
version: 0
......
wl-pprint-indef.cabal:28:3: The field "mixins" is available only since the Cabal specification version 2.0.
wl-pprint-indef.cabal:27:3: The field "signatures" is available only since the Cabal specification version 2.0.
wl-pprint-indef.cabal:23:3: The field "mixins" is available only since the Cabal specification version 2.0.
wl-pprint-indef.cabal:28:3: The field "mixins" is available only since the Cabal specification version 2.0. This field will be ignored.
wl-pprint-indef.cabal:27:3: The field "signatures" is available only since the Cabal specification version 2.0. This field will be ignored.
wl-pprint-indef.cabal:23:3: The field "mixins" is available only since the Cabal specification version 2.0. This field will be ignored.
cabal-version: >=1.6
name: wl-pprint-indef
version: 1.2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment