Skip to content

Conversation

@philderbeast
Copy link
Collaborator

@philderbeast philderbeast commented Jan 5, 2026

Fixes #11389, add documentation to the autogen-modules field and edit the existing explanation and warning.


  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@philderbeast
Copy link
Collaborator Author

Thanks for the grammar checks @geekosaur.

Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should note that the original version of that warning isn't any better, so possibly some research is needed to clarify it.

module files are not found if autogenerated files are not listed in
:pkg-field:`autogen-modules` fields.

:pkg-field:`executable:main-is` modules are not supported on
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm finding this warning a little difficult to follow. Does it intend to say that autogen-modules can't be used with a custom main-is, or that the module in main-is can't be an autogenerated module, or maybe something else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved that warning from:

https://github.com/haskell/cabal/blame/9ea037b084125ecdd024aad02565b34b9db8316f/doc/cabal-package-description-file.rst#L3039-L3040

I've checked and it looks like there is not a cabal-testsuite test for the main-is warning (whichever way it goes).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I saw the original (see the comment above it, I forgot the actual review summary goes above the review comments). Maybe leave as is for now and open an issue specifically about that warning, since it would be good to say exactly what the problem is instead of something vague and possibly misleading. I've fixed a few such in GHC NOTEs but would need to study the code to see what's up here..

philderbeast and others added 5 commits January 6, 2026 15:44
Co-authored-by: brandon s allbery kf8nh <[email protected]>
Co-authored-by: brandon s allbery kf8nh <[email protected]>
Co-authored-by: brandon s allbery kf8nh <[email protected]>
Co-authored-by: brandon s allbery kf8nh <[email protected]>
@philderbeast philderbeast force-pushed the doc/todo-autogenerated-modules branch from aa3ebee to 349154c Compare January 6, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the autogen-modules field

2 participants