Skip to content

Sections "Field Syntax Reference" and "Package Description" are out of sync and inconsistent #9186

Open
@BinderDavid

Description

@BinderDavid

What is wrong with the docs?
There are two toplevel sections in the cabal users guide which document the cabal file format. Section 6 (Package description) and section 10 (Field Syntax Reference). Unfortunately, they contradict each other.

For example:

  • Field "default-language": Section 6 says that Haskell98 Haskell2010 and GHC2021 are allowed, and that the field was available since version 1.12. Section 10 says that Haskell98 and Haskell2010 are allowed, and that the field was available since version 1.10.
  • There are a lot of other fields where the two sections disagree on when the field was introduced.
  • In section 10 the license field is undocumented, so it is missing the crucial information that only SPDX identifiers are accepted in newer versions of the cabal file format.
  • The documentation of the cabal-version field in section 10 mentions a >=1.0 default, but version ranges are no longer allowed for newer versions of cabal, and there is no information that this is a special field which should occur only in the very first line.

In general, I have the impression that the documentation in section 6 is much more accurate and current than the documentation in section 10. I think the intention was for section 10 to contain a semi-formal BNF grammar for cabal files, but if this information is incomplete and out-of-sync, then the value of documenting every field twice is a bit dubious.

So what should be done here? If given some guidance on what would be the best approach here I would volunteer some time and could for example try to merge the information of both sections: Go through all the information in sec. 10 and add any information that is missing in sec. 6 to the documentation of the respective fields. But if there are better suggestions on what to do here I would also be thankful :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions