-
Notifications
You must be signed in to change notification settings - Fork 735
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
Bal build is showing compilation warnings for external modules #32985
Comments
@hasithaa Thoughts on this? I don't think it is correct to remove these warnings even though they are coming from a dependent module. |
IMO this is not a bug since it was a conscious decision to show any errors or warnings coming from the compiler for dependent modules. Possible improvement can be introduce a mode to the compiler for compiling dependencies where the compiler can skip checks which are not relevant to a module user. ie ( lint errors, documentation issues etc) |
Here, the developer can't take any action to fix the warning right?
+1 Another approach is to give flags to disable warnings like -Wundocumented-field similar to C++, but I am not sure whether it is the correct approach for Ballerina. |
Yes, this is not a bug. I am closing this issue. Please create a new issue with a proposal. |
Reopening this issue since this came up once again in a language design call when discussing #37463 and it was suggested that we shouldn't be showing these warnings/errors to the user. |
Considering recent issues/warnings, I now believe that we should suppress compile-time warnings generated by package dependencies. We decided to allow all such warnings a few years ago, but the situation has changed now. My proposal is to suppress such warnings by default and provide a compiler option to see them. |
Reopening this issue again, we need to suppress the errors from the dependent modules and show a common error instead. |
Description:
$title. For example, if we use an external module that does not have documented fields, we get
undocumented field
warnings when we compile the original project. Since the developer doesn't have any control over these warnings, it is better to remove these warnings from getting printed in the current project.Steps to reproduce:
Build a project with an external module that has compilation warnings.
Example code:
This will produce the following warnings
Affected Versions:
SL Beta3 RC4
The text was updated successfully, but these errors were encountered: