Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adderror-prone.picnic.tech featuringRedundantStringConversion#2664

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Pankraz76 wants to merge1 commit intodiffplug:main
base:main
Choose a base branch
Loading
fromPankraz76:pr-error-prone-SanityCheck

Conversation

Pankraz76
Copy link
Contributor

@Pankraz76Pankraz76 commentedOct 6, 2025
edited
Loading

@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch from6d13e79 toda00d3aCompareOctober 6, 2025 14:09
@Pankraz76Pankraz76 marked this pull request as ready for reviewOctober 6, 2025 14:11
@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch fromda00d3a to75726d1CompareOctober 6, 2025 18:29
@Pankraz76Pankraz76 changed the titleAdderror-prone.picnic.techAdderror-prone.picnic.tech featuringStaticImportOct 6, 2025
@Pankraz76Pankraz76 marked this pull request as draftOctober 6, 2025 18:58
@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch from75726d1 to7433670CompareOctober 7, 2025 09:47
@Pankraz76Pankraz76 marked this pull request as ready for reviewOctober 7, 2025 09:58
@Pankraz76
Copy link
ContributorAuthor

java.lang.RuntimeException: java.net.SocketTimeoutException: Connect timed out

@Pankraz76
Copy link
ContributorAuthor

This seems like a good addition to Rewrite, as in some aspects it is superior and has its unique benefits—like every tool has. Of course, they cover the same topic, likeMissingOverrideAnnotation, so I'm wondering why we see this changed again. Maybe it's some bug or config issue; it seems to have a great potential when the right tools make the equation round up. It's faster than Rewrite, even though the configuration is not straightforward opt-in like Rewrite. We will work this out and learn on the job while extending the tool.

It's behaving just like Rewrite—failing the build and suggesting changes. The opt-in is quite unique and will not be communicated like in Rewrite, but the changes should be small, like the changesets.

Do you like to see this going on?@nedtwigg Thanks.

Copy link

@rickierickie left a comment

Choose a reason for hiding this comment

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

I could be missing some context or another issue / PR in this repository, so please let me know if I miss something.

Not sure about the preference of the maintainers, but we might benefit from a slightly different approach. Now we are enabling a lot of checks in one PR. That makes the PR slightly harder to review. We could benefit from an approach outlined in this comment in JUnit repository.

If we use that approach, reviewing a PR is a lot easier, as all changes relate toone check. In this case there are quite a few that make changes, which makes it harder.

WDYT about that approach?

@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch froma7f79d2 to0e2141aCompareOctober 9, 2025 13:51
@Pankraz76Pankraz76 changed the titleAdderror-prone.picnic.tech featuringStaticImportAdderror-prone.picnic.tech featuringConstantNamingOct 9, 2025
// 'StaticImport',
)
errorproneArgs.add('-XepOpt:Refaster:NamePattern=^(?!.*Rules\\$).*')
if (!getenv().containsKey('CI')&& getenv('IN_PLACE')?.toBoolean()) {
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

activatingIN_PLACE allowing removal ofallErrorsAsWarnings resulting in local passing, on CI, without patching of course, positive failing build.

How to automate prone without having this glitch?@rickie Patching only cares for the XepPatchChecks like the documentation tells. XepPatchLocation Only works in paid, despite having it seen in gradle not being the case its a very random plugin behaviour sometimes.

Choose a reason for hiding this comment

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

Only works in paid, despite having it seen in gradle not being the case its a very random plugin behaviour sometimes.

I don't fully understand this comment, can you elaborate?

I agree the usage of theXepPatchChecks and location is a bit finicky and requires some effort to get right. You work on a lot of PRs which is cool to see. But right now I don't have time to dive into all of them and find the exact cause. Will try to also look tomorrow, but can't make promises right now.

I once created a demo project (it's in Maven though) but perhaps you can look into that, and based on that try to configure it for one of the projects you're working on:https://github.com/rickie/error-prone-demo.

@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch from0e2141a to5d58113CompareOctober 9, 2025 14:23

tasks.withType(JavaCompile).configureEach {
options.errorprone {
allErrorsAsWarnings=true// ModuleHelper.java:37: warning: Unsafe is internal proprietary API and may be removed in a future release
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

somehow this does not suppress/avoid:

FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':lib:compileJava'.> Compilation failed; see the compiler output below.  /Users/vincent.potucek/IdeaProjects/spotless/lib/src/main/java/com/diffplug/spotless/java/ModuleHelper.java:37: warning: Unsafe is internal proprietary API and may be removed in a future release  import sun.misc.Unsafe;                 ^  4 errors  100 warningsBUILD FAILED in 10s

Choose a reason for hiding this comment

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

allErrorsAsWarnings this flag is anError Prone flag (docs). It doesn't mean that all the errors from the build are being lowered in severity, it's about the checks from Error Prone that are configured with severityERROR are lowered toWARNING.

In this case there is something else - unrelated to this flag - that is causing the error about thesun.misc.Unsafe. I'm not sure from the top of my head what this error is or why we get it here, but make sure to not misinterpret this flag.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

junit mentions something similar but the fix does not help. Can not handle this issue.

@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch 2 times, most recently fromc8be894 to1aa9feeCompareOctober 9, 2025 17:20
@Pankraz76Pankraz76 changed the titleAdderror-prone.picnic.tech featuringConstantNamingAdderror-prone.picnic.techOct 9, 2025
@Pankraz76Pankraz76 requested a review fromrickieOctober 9, 2025 17:20
@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch from1aa9fee to6a7470cCompareOctober 9, 2025 17:24
@Pankraz76Pankraz76force-pushed thepr-error-prone-SanityCheck branch from6a7470c toc365719CompareOctober 11, 2025 18:42
@Pankraz76Pankraz76 changed the titleAdderror-prone.picnic.techAdderror-prone.picnic.tech featuringRedundantStringConversionOct 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rickierickieAwaiting requested review from rickie

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Pankraz76@rickie

[8]ページ先頭

©2009-2025 Movatter.jp