Skip to content
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

Updates for typetools/checker-framework 3.39.0 release #1

Merged
merged 71 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4af78a7
Buildfile tweaks
mernst Dec 9, 2022
0bd454c
Use shorthand notation for dependencies
mernst Dec 13, 2022
52d6bba
Prefer '' to "" in Gradle files
mernst Dec 19, 2022
63de415
Always remove reference to non-existent file dejavu.css
mernst Dec 21, 2022
134e60a
Bump error_prone_core from 2.16 to 2.17.0
dependabot[bot] Dec 31, 2022
10e434c
Bump com.diffplug.spotless from 6.12.0 to 6.12.1
dependabot[bot] Jan 2, 2023
a48fffc
Use Checker Framework 3.29.0
mernst Jan 5, 2023
f988247
Bump error_prone_core from 2.17.0 to 2.18.0
dependabot[bot] Jan 9, 2023
7b4701b
Bump junit-jupiter-api from 5.9.1 to 5.9.2
dependabot[bot] Jan 10, 2023
f1faa69
Bump com.diffplug.spotless from 6.12.1 to 6.13.0
dependabot[bot] Jan 16, 2023
adfd05f
Bump org.checkerframework from 0.6.21 to 0.6.21.1
dependabot[bot] Jan 25, 2023
4c451ac
Bump org.checkerframework from 0.6.21.1 to 0.6.22
dependabot[bot] Jan 27, 2023
396088e
Use Spotless plugin 6.14.0
mernst Jan 27, 2023
b8b2766
Check formatting
mernst Jan 27, 2023
7348d8d
Bump org.checkerframework from 0.6.22 to 0.6.23
dependabot[bot] Feb 3, 2023
5633a24
Bump org.checkerframework from 0.6.23 to 0.6.24
dependabot[bot] Feb 21, 2023
6cfec12
Use Gradle 8
mernst Feb 27, 2023
7d31a5a
Bump com.github.johnrengelman.shadow from 7.1.2 to 8.1.0
dependabot[bot] Feb 27, 2023
d7401d5
Use newer GitHub actions
mernst Mar 1, 2023
5439b80
Don't build under JDK 8
mernst Mar 2, 2023
4dece1f
Bump org.checkerframework from 0.6.24 to 0.6.25
dependabot[bot] Mar 3, 2023
0a82547
Bump com.diffplug.spotless from 6.16.0 to 6.17.0
dependabot[bot] Mar 13, 2023
0c9a9d4
Bump com.github.johnrengelman.shadow from 8.1.0 to 8.1.1
dependabot[bot] Mar 21, 2023
e4d502c
Bump org.checkerframework from 0.6.25 to 0.6.26
dependabot[bot] Apr 3, 2023
a28066a
Bump com.diffplug.spotless from 6.17.0 to 6.18.0
dependabot[bot] Apr 6, 2023
b2550cd
Warn about redundant annotations
mernst Apr 6, 2023
a0deeb5
Configure Renovate
renovate[bot] Apr 14, 2023
7d8d47e
Adjust Renovate schedule
mernst Apr 14, 2023
de36579
Update dependency gradle to v8.1 (#195)
renovate[bot] Apr 14, 2023
c288f74
Disable dependency dashboard
mernst Apr 16, 2023
1890bf1
sourceCompatibility for Java 20
mernst Apr 18, 2023
9d75088
Update dependency gradle to v8.1.1 (#197)
renovate[bot] Apr 22, 2023
df3d2bc
Update plugin net.ltgt.errorprone to v3.1.0 (#198)
renovate[bot] Apr 22, 2023
8e4e08e
Update dependency org.junit.jupiter:junit-jupiter-api to v5.9.3 (#199)
renovate[bot] Apr 26, 2023
3cb838f
Update plugin org.checkerframework to v0.6.27 (#200)
renovate[bot] May 3, 2023
ed3f642
Update dependency com.google.errorprone:error_prone_core to v2.19.1 (…
renovate[bot] May 11, 2023
09b42c7
Use Spotless version 6.19.0
mernst May 24, 2023
f9474ed
Update dependency xom:xom to v1.3.9 (#204)
renovate[bot] Jun 7, 2023
17d5a5b
Update plugin org.checkerframework to v0.6.28 (#205)
renovate[bot] Jun 7, 2023
4a364a9
Update dependency com.google.guava:guava to v32 (#206)
renovate[bot] Jun 8, 2023
373a494
Update dependency com.google.guava:guava to v32.0.1-jre (#207)
renovate[bot] Jun 9, 2023
b1f7528
Update dependency com.google.errorprone:error_prone_core to v2.20.0 (…
renovate[bot] Jun 17, 2023
8546c1b
Update dependency com.google.guava:guava to v32.1.0-jre (#209)
renovate[bot] Jun 30, 2023
d9fc1d9
Update dependency com.google.guava:guava to v32.1.1-jre (#210)
renovate[bot] Jul 1, 2023
d58a94c
Update dependency gradle to v8.2 (#211)
renovate[bot] Jul 1, 2023
ef9480e
Update plugin org.checkerframework to v0.6.29 (#212)
renovate[bot] Jul 6, 2023
4ed752a
Update dependency gradle to v8.2.1 (#213)
renovate[bot] Jul 11, 2023
1acd9d9
Update plugin com.diffplug.spotless to v6.20.0 (#214)
renovate[bot] Jul 18, 2023
7b17669
Update dependency org.junit.jupiter:junit-jupiter-api to v5.10.0 (#215)
renovate[bot] Jul 23, 2023
c5ff30b
Update dependency com.google.guava:guava to v32.1.2-jre (#216)
renovate[bot] Aug 1, 2023
77718e0
Update plugin org.checkerframework to v0.6.30 (#217)
renovate[bot] Aug 2, 2023
f63c148
Update dependency com.google.errorprone:error_prone_core to v2.21.0 (…
renovate[bot] Aug 2, 2023
f22a3fa
Update dependency com.google.errorprone:error_prone_core to v2.21.1 (…
renovate[bot] Aug 5, 2023
5668678
Update dependency gradle to v8.3 (#220)
renovate[bot] Aug 17, 2023
34ad60c
Update plugin org.checkerframework to v0.6.31 (#221)
renovate[bot] Aug 25, 2023
14402f3
Update plugin org.checkerframework to v0.6.32 (#222)
renovate[bot] Aug 29, 2023
7afbcc9
Update plugin com.diffplug.spotless to v6.21.0 (#223)
renovate[bot] Aug 29, 2023
359a1dc
Update plugin org.checkerframework to v0.6.33 (#224)
renovate[bot] Sep 2, 2023
08d60a0
Update actions/checkout action to v4 (#225)
renovate[bot] Sep 5, 2023
4923d3a
Don't support Java 8
mernst Sep 8, 2023
8a35cd9
Don't support Java 8
mernst Sep 11, 2023
7b13751
Compile under Java 21
mernst Sep 11, 2023
c077efb
Update dependency com.google.errorprone:error_prone_core to v2.22.0 (…
renovate[bot] Oct 1, 2023
54c89a5
Update plugin com.diffplug.spotless to v6.22.0 (#229)
renovate[bot] Oct 1, 2023
c179b92
Update plugin org.checkerframework to v0.6.34 (#230)
renovate[bot] Oct 3, 2023
f92b2d8
Update dependency com.google.guava:guava to v32.1.3-jre (#231)
renovate[bot] Oct 11, 2023
b0cacf6
Update dependency com.google.errorprone:error_prone_core to v2.23.0 (…
renovate[bot] Oct 19, 2023
7a2d302
Merge branch 'master' of https://github.com/plume-lib/html-pretty-pri…
wmdietl Oct 20, 2023
98c0e4a
Upgrade to gradle 8.4
wmdietl Oct 20, 2023
351d47c
Update EISOP version
wmdietl Oct 20, 2023
425b17b
Test on JDK 21
wmdietl Oct 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/dependabot.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":automergeAll",
":automergeRequireAllStatusChecks",
"schedule:nonOfficeHours",
":disableDependencyDashboard"
],
"timezone": "America/Los_Angeles"
}
9 changes: 6 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ jobs:

strategy:
matrix:
java: [ '8', '11', '17', '19' ]
java: [ '11', '17', '21' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: ./gradlew build javadoc
run: ./gradlew build
- name: ./gradlew requireJavadoc
run: ./gradlew requireJavadoc
- name: ./gradlew spotlessCheck
run: ./gradlew spotlessCheck
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cache:
- $HOME/.m2/

jdk:
- oraclejdk8
- oraclejdk17

# Add "verGJF" task when google-java-format handles type annotations better;
# see https://github.com/google/google-java-format/issues/5
Expand Down
92 changes: 53 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,81 @@ plugins {
id 'java'
id 'application'

// To create a fat jar build/libs/html-pretty-print-all.jar, run: ./gradlew shadowJar
id 'com.github.johnrengelman.shadow' version '7.1.2'
// To create a fat jar build/libs/...-all.jar, run: ./gradlew shadowJar
id 'com.github.johnrengelman.shadow' version '8.1.1'

// Code formatting; defines targets "spotlessApply" and "spotlessCheck"
id "com.diffplug.spotless" version "6.12.0"
// Requires JDK 11 or higher; the plugin crashes under JDK 8.
id 'com.diffplug.spotless' version '6.22.0'

// Error Prone linter
id("net.ltgt.errorprone") version "3.0.1"
id('net.ltgt.errorprone') version '3.1.0'

// Checker Framework pluggable type-checking
id 'org.checkerframework' version '0.6.20'
id 'org.checkerframework' version '0.6.34'
}

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
// This dependency is found on compile classpath of this component and consumers.
implementation 'com.google.guava:guava:31.1-jre'
implementation 'com.google.guava:guava:32.1.3-jre'
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
implementation 'xom:xom:1.3.9'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'

// https://mvnrepository.com/artifact/org.ccil.cowan.tagsoup/tagsoup
implementation group: 'org.ccil.cowan.tagsoup', name: 'tagsoup', version: '1.2.1'

// https://mvnrepository.com/artifact/xom/xom
implementation group: 'xom', name: 'xom', version: '1.3.8'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

application {
mainClass = 'org.plumelib.htmlprettyprint.HtmlPrettyPrint'
}

sourceCompatibility = 11
targetCompatibility = 11

test {
useJUnitPlatform {
includeEngines 'junit-jupiter'
excludeEngines 'junit-vintage'
}
useJUnitPlatform {
includeEngines 'junit-jupiter'
excludeEngines 'junit-vintage'
}
}

spotless {
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'
target '*.md', '.gitignore'

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
java {
targetExclude("**/WeakIdentityHashMap.java")
targetExclude('**/WeakIdentityHashMap.java')
googleJavaFormat()
formatAnnotations()
}
groovyGradle {
target '**/*.gradle'
greclipse() // which formatter Spotless should use to format .gradle files.
indentWithSpaces(2)
trimTrailingWhitespace()
// endWithNewline() // Don't want to end empty files with a newline
}
}

/// Error Prone linter

dependencies {
errorprone("com.google.errorprone:error_prone_core:2.16")
errorprone('com.google.errorprone:error_prone_core:2.23.0')
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:all" << "-Werror"
// "-processing" avoids javac warning "No processor claimed any of these annotations".
options.compilerArgs << '-Xlint:all,-processing' << '-Werror'
options.errorprone {
enabled = JavaVersion.current() != JavaVersion.VERSION_1_8
disable("ReferenceEquality") // Use Interning Checker instead.
disable('ReferenceEquality') // Use Interning Checker instead.
}
}

Expand All @@ -79,9 +85,9 @@ tasks.withType(JavaCompile).configureEach {
apply plugin: 'org.checkerframework'

dependencies {
compileOnly 'io.github.eisop:checker-qual:3.28.0-eisop1'
testCompileOnly 'io.github.eisop:checker-qual:3.28.0-eisop1'
checkerFramework 'io.github.eisop:checker:3.28.0-eisop1'
compileOnly 'io.github.eisop:checker-qual:3.34.0-eisop1'
testCompileOnly 'io.github.eisop:checker-qual:3.34.0-eisop1'
checkerFramework 'io.github.eisop:checker:3.34.0-eisop1'
}

checkerFramework {
Expand All @@ -103,18 +109,19 @@ checkerFramework {
'-Werror',
'-AcheckPurityAnnotations',
'-ArequirePrefixInWarningSuppressions',
'-AwarnRedundantAnnotations',
'-AwarnUnneededSuppressions',
'-AnoJreVersionCheck',
]
}

// To use a locally-built Checker Framework, run gradle with "-PcfLocal".
if (project.hasProperty("cfLocal")) {
def cfHome = String.valueOf(System.getenv("CHECKERFRAMEWORK"))
if (project.hasProperty('cfLocal')) {
def cfHome = String.valueOf(System.getenv('CHECKERFRAMEWORK'))
dependencies {
compileOnly files(cfHome + "/checker/dist/checker-qual.jar")
testCompileOnly files(cfHome + "/checker/dist/checker-qual.jar")
checkerFramework files(cfHome + "/checker/dist/checker.jar")
compileOnly files(cfHome + '/checker/dist/checker-qual.jar')
testCompileOnly files(cfHome + '/checker/dist/checker-qual.jar')
checkerFramework files(cfHome + '/checker/dist/checker.jar')
}
}

Expand All @@ -124,27 +131,34 @@ if (project.hasProperty("cfLocal")) {
javadoc {
options.addStringOption('Xwerror', '-Xdoclint:all')
options.addStringOption('private', '-quiet')
options.addStringOption('source', '11')
doLast {
ant.replaceregexp(match:"@import url\\('resources/fonts/dejavu.css'\\);\\s*", replace:'',
flags:'g', byline:true) {
fileset(dir: destinationDir)
}
}
}
check.dependsOn javadoc

configurations {
requireJavadoc
}
dependencies {
requireJavadoc "org.plumelib:require-javadoc:1.0.6"
requireJavadoc 'org.plumelib:require-javadoc:1.0.6'
}
task requireJavadoc(type: JavaExec) {
description = 'Ensures that Javadoc documentation exists.'
mainClass = "org.plumelib.javadoc.RequireJavadoc"
mainClass = 'org.plumelib.javadoc.RequireJavadoc'
classpath = configurations.requireJavadoc
args "src/main/java"
args 'src/main/java'
}
check.dependsOn requireJavadoc

/// Emacs support

/* Make Emacs TAGS table */
task tags(type: Exec) {
description "Run etags to create an Emacs TAGS table"
commandLine "bash", "-c", "find src/ -name '*.java' | sort | xargs etags"
description 'Run etags to create an Emacs TAGS table'
commandLine 'bash', '-c', "find src/ -name '*.java' | sort | xargs etags"
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
6 changes: 6 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
buildscript {
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
throw new Error("Use Java 11 or later.")
}
}

// Project name is read-only in build scripts, and defaults to directory name.
rootProject.name = 'html-pretty-print'