Skip to content

More information in the generated modules Paths_<pkgname> and PackageInfo_<pkgname> #9250

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
wants to merge 5 commits into from

Conversation

L-TChen
Copy link

@L-TChen L-TChen commented Sep 12, 2023

This PR put more definitions in the automatically generated modules, i.e.

  • Paths_<pkgname> includes additionally the path to doc and file names of license files
  • PackageInfo_<pkgname> includes many more fields of a package description including bug-reports.
  • PackageInfo_<pkgname> is now generated by Zinza.

Template Α: This PR modifies cabal behaviour

Include the following checklist in your PR:

Bonus points for added automated tests!

@mpickering
Copy link
Collaborator

Is there a ticket which tracks/motivates this change?

@L-TChen
Copy link
Author

L-TChen commented Sep 19, 2023

Is there a ticket which tracks/motivates this change?

It is mostly motivated by #3909 still. As the OP says

By the way: It would be useful to export name and synopsis too, since they often appear in --version or --help.

It appears natural to have the package description avaiable and let authors decide what information should be printed.

For example, it is especially useful to have the field description available, since the description of a package is usually printed if a CLI program expecting some input does not receive any. If this information is scattered here and there, it is likely to have inconsisent descriptions in the package description and in the codebase.

@L-TChen
Copy link
Author

L-TChen commented Sep 19, 2023

The Zinza part is only refactoring: the PackageInfor_<pkgname> is implemented differently from Paths_<pkgname> and it is rather confusing.

@andreabedini
Copy link
Collaborator

Please consider cabal-version while working on this. See #9331

@L-TChen L-TChen closed this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants