-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-17968 Migrate checkstyle module illegalimport to maven enforcer banned-illegal-imports #3584
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
Conversation
…r banned-illegal-imports
Could you please take a look @amahussein @tasanuma? |
<bannedImports> | ||
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap</bannedImport> | ||
</bannedImports> | ||
</restrictImports> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to keep "sun" packages? it is in the checkstyle illegal-imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we take this separately because sun packages are already in use? Classes already in use are:
sun.misc.Unsafe
sun.misc.Signal
sun.misc.SignalHandler
sun.net.spi.nameservice.NameService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see!
I think that if the jira is to migrate "guava packages" then we may keep checkstyle.illegal-import
entry for sun packages
?
Otherwise, if the purpose to remove checkstyle illegal-imports all together, then we can exclude those classes. there is also a flag failBuild
if we don't want the build to fail with some patterns.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see! I think that if the jira is to migrate "guava packages" then we may keep
checkstyle.illegal-import
entry forsun packages
?
Sounds good, let me put back sun packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks @amahussein
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will wait for the yetus report then merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @virajjasani for the changes.
+1
Since it added |
Could you match the format of the text in the reason tags with other reason tags? |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Done, thanks @tasanuma |
@amahussein @tasanuma JFYI, the builds take almost 24 hr time (some builds timed out as well) since the change is done in hadoop-main pom. |
@virajjasani Thanks for updating it. +1, pending CI. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Thanks for your contribution, @virajjasani. Thanks for your review, @amahussein. |
…r banned-illegal-imports (apache#3584) Reviewed-by: Ahmed Hussein <ahussein@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
Description of PR
As discussed on PR #3503, we should migrate existing imports provided in IllegalImport tag in checkstyle.xml to maven-enforcer-plugin's banned-illegal-imports enforcer rule so that build never succeeds in the presence of any of the illegal imports.
For code changes: