Skip to content

ICU-23091 Add Java source formatting configs and automated checks #3516

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

echeran
Copy link
Contributor

@echeran echeran commented Jun 5, 2025

Add automated source formatting so that we don't have to worry about it again. In the future, the diffs that are visible in PRs will no longer have noise (extra diff lines) due to formatting unrelated to the code issues that are the focus of the PR.

Checklist

  • Required: Issue filed: ICU-23091
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

ALLOW_MANY_COMMITS=true

@jira-pull-request-webhook

This comment was marked as outdated.

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • .github/workflows/icu4j.yml is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@echeran echeran requested a review from mihnita June 5, 2025 17:50
@echeran echeran marked this pull request as ready for review June 5, 2025 17:51
@echeran
Copy link
Contributor Author

echeran commented Jun 5, 2025

For review purposes and consideration:

  • There are 2 commits in the PR: one has the key config changes and doc updates, and the other has the changes to the remaining codebase Java source files
  • Let's decouple the work of reviewing/approving from the action of actually merging the PR, and not assume that we do these things at the same time for this PR
  • When this gets merged, then any concurrent open PRs that touch Java files will need to update themselves with the latest on main to pick up the new source formatting. That will cause churn. We can choose the right time to merge. Of course, likewise, this PR will need to pick up the latest from main for any Java changes between now and when we actually merge

@markusicu
Copy link
Member

@yumaoka @richgillam FYI

@markusicu
Copy link
Member

  • thanks!
  • what about the 11 failing ("cancelled") checks?
  • config looks plausible
  • code reformatting changes... I know not to quibble with the formatter...
  • we will need to talk about when to merge this
  • we might want to push everyone (mea culpa etc.) to move on pending pull requests and reviews, so that there are fewer pending when this goes in

Copy link
Contributor

@mihnita mihnita left a comment

Choose a reason for hiding this comment

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

LGTM
Thank you.

@echeran
Copy link
Contributor Author

echeran commented Jun 5, 2025

  • what about the 11 failing ("cancelled") checks?

I retried them and all but one succeeded. The ones that passed after retrying were all from the ICU4C CI workflow, and given that this PR here is only about source code formatting for Java, it's safe to conclude that those ICU4C check failures during the first attempt are unrelated. The other check that failed is the "meta check" job called "Wait for Required Checks", and it fails because the single-commit check fails. For now, I am leaving the two commits in the PR to remain separate in order to make it easier to understand when reviewing.

@markusicu
Copy link
Member

The other check that failed is the "meta check" job called "Wait for Required Checks", and it fails because the single-commit check fails. For now, I am leaving the two commits in the PR to remain separate in order to make it easier to understand when reviewing.

We should add the magic incantation that allows us to rebase+merge the two commits.

@echeran
Copy link
Contributor Author

echeran commented Jun 5, 2025

We should add the magic incantation that allows us to rebase+merge the two commits.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants