-
Notifications
You must be signed in to change notification settings - Fork 843
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
Disable / Delay "Warning: modules not listed in *.cabal for '*' component (add to other-modules):" Warning #1705
Comments
You make a reasonable point! After typing up the list of pros / cons, I think we should keep the current behavior: Points in favor of removing the warnings from build (in favor of sdist / upload):
Points against removing the warnings from build:
We could add a configuration field to suppress this, but I'm inclined to avoid adding extra knobs for stuff like this. What do others think? Is it worth it? I guess I'm not seeing a flag for filtering this output as all that useful, since it's easy to ignore it. Maybe write a utility that pipes the output of stack through something that filters out these lines, if they bug you? You might like hpack, which allows either |
I think our warning support in general could be improved. Right now these warning messages are ad-hoc without any framework around them. It'd be nice is every warning message could be disabled (analogous to GHC's |
Agreed! Another reason to have a system like this is so that they can be moved to the end of the output. Currently it's easy for them to get lost in the midst of output. We've also sometimes needed to restructure code to plumb warning / error info to the end of output. It'd be nicer to store away warnings / errors at the location that generates them. |
It'd make a lot of sense to have a proper system for reporting warnings to the user, it's easy to overlook the missing module warnings as they're jammed in the middle of output. Since It seems that we have a whole spectrum - some folks want to make these into errors #1323 |
From what I can tell, the
other-modules
field in a cabal file only matters when packaging for a Hackage upload. Cold this warning instead be emitted during the upload check or could we have a flag to disable this warning? It seems pointless to manually maintain a module list or see this warning on every single build for projects that won't end up on Hackage.The text was updated successfully, but these errors were encountered: