You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "YongGoose (via GitHub)" <gi...@apache.org> on 2025/06/04 02:14:58 UTC

[PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

YongGoose opened a new pull request, #7408:
URL: https://github.com/apache/incubator-seata/pull/7408

   <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
       
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
   -->
   <!-- Please make sure you have read and understood the contributing guidelines -->
   
   - [x] I have registered the PR [changes](../changes).
   
   ### Ⅰ. Describe what this PR did
   
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
   
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   
   
   ### Ⅳ. Describe how to verify it
   
   
   ### Ⅴ. Special notes for reviews
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2970362282

   > Our workflow requires running the code formatter with Java 8. However, the current version of the Spotless plugin doesn't support the palantirJavaFormat configuration when using Java 8.
   > 
   > We should also reconsider using `Checkstyle`. If we go that route, it might take some time since we'll need to adjust the `Spotless` configuration accordingly.
   
   We can disable code style checks on JDK 8 and instead perform code style checks on JDK 17, or have a dedicated pipeline specifically for code style checks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose closed pull request #7408: optimize: Apply Spotless to the entire codebase.
URL: https://github.com/apache/incubator-seata/pull/7408


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2938097422

   @funky-eyes 
   
   I’m wondering if there are more areas where this type of work is needed.
   - https://github.com/apache/incubator-seata/pull/7312


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2944350146

   > > Can you tell me which one is currently the most popular?
   > 
   > Google seems to be the most popular.
   > 
   > However, since Palantir addresses some of the shortcomings of the Google formatter, I personally prefer Palantir.
   
   Perhaps we should send an email to introduce the differences between the two options, and then conduct a vote with a 3-day deadline to decide on the final choice.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "jsbxyyx (via GitHub)" <gi...@apache.org>.
jsbxyyx commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2965956888

   add importOrder
   ```
   <importOrder>
       <order>,javax|java,\#</order>
   </importOrder>
   ```
   
   this is idea default import style


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2938121058

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/7408?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 58.82%. Comparing base [(`9965051`)](https://app.codecov.io/gh/apache/incubator-seata/commit/9965051476cb96ba6797c05ea44bd40fbc5168f9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`9949d0b`)](https://app.codecov.io/gh/apache/incubator-seata/commit/9949d0b20b4be8c30399a1f828dc62720db05261?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##                2.x    #7408      +/-   ##
   ============================================
   + Coverage     58.81%   58.82%   +0.01%     
     Complexity      531      531              
   ============================================
     Files          1280     1280              
     Lines         46066    46066              
     Branches       5557     5557              
   ============================================
   + Hits          27092    27100       +8     
   + Misses        16402    16391      -11     
   - Partials       2572     2575       +3     
   ```
   
   [see 8 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/7408/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/7408/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/7408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2940156210

   You can see how the AOSP style is applied in this PR
   - https://github.com/YongGoose/incubator-seata/pull/6
   
   You can see how the Palantier style is applied in this PR
   - https://github.com/YongGoose/incubator-seata/pull/7
   
   Currently, both styles are failing `Checkstyle` validation.
   One alternative would be to remove the `Checkstyle` dependency and use `Spotless / Check` for style validation instead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2961694282

   The voting should have already ended. We should continue with the work related to this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2938125341

   It seems that this style does not pass the checkstyle validation.
   https://github.com/YongGoose/incubator-seata/actions/runs/15432089326/job/43431648106?pr=6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2943027883

   I agree with removing the current Checkstyle and then using Spotless/Check instead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2943049932

   > Can you tell me which one is currently the most popular?
   
   Google seems to be the most popular.
   
   However, since Palantir addresses some of the shortcomings of the Google formatter, I personally prefer Palantir.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2944797460

   > Perhaps we should send an email to introduce the differences between the two options, and then conduct a vote with a 3-day deadline to decide on the final choice.
   
   I’ll send the email by tomorrow and notice on Dingtalk!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2961829512

   > The voting should have already ended. We should continue with the work related to this PR.
   
   I’ll likely be able to work on it later tonight.
   Once I’ve completed the work, I’ll request a review!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2975411750

   > > Our workflow requires running the code formatter with Java 8. However, the current version of the Spotless plugin doesn't support the palantirJavaFormat configuration when using Java 8.
   > > We should also reconsider using `Checkstyle`. If we go that route, it might take some time since we'll need to adjust the `Spotless` configuration accordingly.
   > 
   > We can disable code style checks on JDK 8 and instead perform code style checks on JDK 17, or have a dedicated pipeline specifically for code style checks.
   
   Splitting it sounds like a good idea.
   
   Since there are many file conflicts at the moment, I’ll close this PR and open a new one.
   I’ve been quite busy lately, so I’ll likely be able to work on it around the end of this week. 🥲


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2963299475

   Our workflow requires running the code formatter with Java 8. However, the current version of the Spotless plugin doesn't support the palantirJavaFormat configuration when using Java 8.
   
   We should also reconsider using `Checkstyle`. 
   If we go that route, it might take some time since we'll need to adjust the `Spotless` configuration accordingly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2942993593

   > You can see how the AOSP style is applied in this PR
   > 
   > * [Google java format (AOSP style)  YongGoose/incubator-seata#6](https://github.com/YongGoose/incubator-seata/pull/6)
   > 
   > You can see how the Palantier style is applied in this PR
   > 
   > * [palantier format YongGoose/incubator-seata#7](https://github.com/YongGoose/incubator-seata/pull/7)
   > 
   > Currently, both styles are failing `Checkstyle` validation. One alternative would be to remove the `Checkstyle` dependency and use `Spotless / Check` for style validation instead.
   > 
   > I’d appreciate it if you could let me know which of the two styles you think is better. Also, if there are any options that should be added, please don’t hesitate to let me know.
   
   Can you tell me which one is currently the most popular?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2938093272

   @funky-eyes 
   
   Since it’s difficult to change the formatting options after applying Spotless to the entire codebase, I created this PR to initiate a discussion.
   
   ![image](https://github.com/user-attachments/assets/ebe3ef01-5bfd-4401-912a-c5d6c01ff547)
   
   As shown in the image above, I personally prefer the AOSP style, so I’ve updated the style accordingly.
   What do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2938103355

   You can see how the AOSP style is applied in this PR
   - https://github.com/YongGoose/incubator-seata/pull/6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Apply Spotless to the entire codebase. [incubator-seata]

Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7408:
URL: https://github.com/apache/incubator-seata/pull/7408#issuecomment-2938152435

   You can see how the Palantier style is applied in this PR
   - https://github.com/YongGoose/incubator-seata/pull/7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org