Skip to content
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

Suppress ghc-pkg warnings emitted when an empty packages is being registered #9997

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

depressed-pho
Copy link

@depressed-pho depressed-pho commented May 12, 2024

When a package contains a library that has no modules, ./Setup register tries to register the library with fields haddock-interfaces: and haddock-html: pointing at non-existent files or directories, and ghc-pkg register warns about them like this:

persistent-template-2.12.0.0: Warning: haddock-interfaces: /usr/pkg/share/doc/aarch64-netbsd-ghc-9.8.2/persistent-template-2.12.0.0/html/persistent-template.haddock doesn't exist or isn't a file
persistent-template-2.12.0.0: Warning: haddock-html: /usr/pkg/share/doc/aarch64-netbsd-ghc-9.8.2/persistent-template-2.12.0.0/html doesn't exist or isn't a directory

To suppress the warnings prevent these fields from being generated when there are no modules.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • Manual QA notes have been included.
  • Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

@depressed-pho depressed-pho changed the title Suppress ghc-pkg warnings on empty packages being installed Suppress ghc-pkg warnings emitted when an empty packages is being registered May 12, 2024
@depressed-pho depressed-pho force-pushed the suppress-warnings-on-empty-packages branch 2 times, most recently from 3617240 to 567916c Compare May 12, 2024 04:47
…istered

When a package contains a library that has no modules, "./Setup register"
tries to register the library with fields "haddock-interfaces:" and
"haddock-html:" pointing at non-existent files or directories, and "ghc-pkg
register" warns about them.

To suppress the warnings prevent these fields from being generated when
there are no modules.
@Mikolaj
Copy link
Member

Mikolaj commented May 15, 2024

Thanks for that. Please let us know if you need help with CI failures and please set "review" label when ready to discuss the implementation (or even the design, though an issue ticket might be better for that).

@Mikolaj
Copy link
Member

Mikolaj commented May 20, 2024

BTW, the current CI failure seems caused by the flaky macos jobs in github, so let me take the liberty of restarting the job.

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.

None yet

2 participants