Skip to content

Commit dd57252

Browse files
committed
Install open-java-format 2.98.0.3, and say where its output differs
The pages now install 2.98.0.3, and the GitHub Actions page gives the action's new default. 2.98.0.3 is no longer byte-identical to palantir-java-format 2.98.0. It no longer splits a long string after an escaped backslash followed by n, and it formats imports with comments between them instead of rejecting them. Migrate says so, with the check behind it: on the JDK 21 sources, 2.98.0.3 reformats 5 of the files that 2.98.0.2 leaves unchanged when run again, all because of the string fix.
1 parent 1e5c56a commit dd57252

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎docs/get-started/github-actions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ the files that are not formatted and fails the job if there are any.
2929
3030
| Input | Default | Meaning |
3131
| --- | --- | --- |
32-
| `version` | `2.98.0.2` | The formatter version to download |
32+
| `version` | `2.98.0.3` | The formatter version to download |
3333
| `mode` | `changed` | `changed` checks the files of the pull request or push, `all` checks every `.java` file |
3434

3535
A workflow that still pins 2.98.0.1 stays on `@v1`: that version needs the `--ojf` flag, which `@v2`

‎docs/migrate.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
## From palantir-java-format
44

55
open-java-format {{ ojf_version }} formats with the code of palantir-java-format 2.98.0, under new names
6-
and built in the open. The output is the same, so switching produces no formatting diff and needs no
7-
reformatting commit. Checked on 341 source files, about 24,000 lines: palantir-java-format 2.98.0 and
8-
open-java-format 2.98.0.2 give byte-identical output.
6+
and built in the open. The output is the same except for two fixes. A long string is no longer split
7+
after an escaped backslash followed by `n`, as if that were a line break. Imports with comments
8+
between them are formatted rather than rejected. Anywhere else, switching produces no formatting diff
9+
and needs no reformatting commit.
10+
11+
Checked on 341 source files, about 24,000 lines: palantir-java-format 2.98.0 and open-java-format
12+
2.98.0.2 give byte-identical output. On the JDK 21 sources, 2.98.0.3 reformats 5 of the files that
13+
2.98.0.2 leaves unchanged when run again, all because of the first fix.
914

1015
The Java packages are unchanged as well. Only the names in your build and your scripts change.
1116

‎zensical.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ toggle.name = "Switch to system preference"
105105
# plugin puts it in before the Markdown is rendered, so it lands in code blocks too. The key is not
106106
# extra.version: the theme reads that one as the switch for a version selector.
107107
[project.extra]
108-
ojf_version = "2.98.0.2"
108+
ojf_version = "2.98.0.3"
109109

110110
# Renders every page as a Jinja template, for {{ ojf_version }}. A misspelt variable or a stray {{
111111
# fails the build instead of leaving a gap or the raw text on the site.

0 commit comments

Comments
 (0)