Skip to content

Commit 5b5139e

Browse files
committed
Migrate to 2.98.0.2
The page still sent people coming from palantir-java-format to 2.98.0.1. The version they migrate to now comes from ojf_version, in the table and in both diffs, while the sentences about 2.98.0.1 as a past build stay as they are. The claim that switching changes no formatting was checked again for this version: palantir-java-format 2.98.0 and open-java-format 2.98.0.2, both as native binaries from Maven Central, format 341 source files, about 24,000 lines from the formatter's test inputs and sources, byte for byte the same.
1 parent 7489d60 commit 5b5139e

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

‎docs/migrate.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
## From palantir-java-format
44

5-
open-java-format 2.98.0.1 is the code of palantir-java-format 2.98.0 under new names, built in the
6-
open. The output is the same, so switching produces no formatting diff and needs no reformatting
7-
commit. Checked on 132 source files, about 27,000 lines: both formatters give byte-identical output.
5+
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.
89

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

1112
| | palantir-java-format | open-java-format |
1213
| --- | --- | --- |
13-
| Version | `2.98.0` | `2.98.0.1` |
14+
| Version | `2.98.0` | `{{ ojf_version }}` |
1415
| Maven group | `com.palantir.javaformat` | `dev.openjavaformat` |
1516
| Formatter | `palantir-java-format` | `open-java-format` |
1617
| SPI | `palantir-java-format-spi` | `open-java-format-spi` |
@@ -21,15 +22,15 @@ The Java packages are unchanged as well. Only the names in your build and your s
2122
| IntelliJ plugin | `palantir-java-format` | `open-java-format` |
2223
| Java packages | `com.palantir.javaformat.*` | the same, for the whole 2.x line |
2324

24-
The fourth number of the version counts builds of an upstream version: 2.98.0.1 is the first build
25-
of 2.98.0.
25+
The fourth number of the version counts builds of an upstream version: 2.98.0.1 was the first build
26+
of 2.98.0, and 2.98.0.2 is the second.
2627

2728
### Gradle
2829

2930
``` diff title="build.gradle"
3031
plugins {
3132
- id 'com.palantir.java-format' version '2.98.0'
32-
+ id 'dev.openjavaformat.java-format' version '2.98.0.1'
33+
+ id 'dev.openjavaformat.java-format' version '{{ ojf_version }}'
3334
}
3435
```
3536

@@ -58,7 +59,7 @@ Change the coordinates. The imports stay as they are, because the packages did n
5859

5960
``` diff title="build.gradle"
6061
-implementation 'com.palantir.javaformat:palantir-java-format:2.98.0'
61-
+implementation 'dev.openjavaformat:open-java-format:2.98.0.1'
62+
+implementation 'dev.openjavaformat:open-java-format:{{ ojf_version }}'
6263
```
6364

6465
In a `pom.xml` it is the same change of `groupId`, `artifactId` and `version`.

0 commit comments

Comments
 (0)