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

Update from upstream 2024-06-24 #42

Merged
merged 59 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
05bf24d
Update checkerFrameworkVersion to v3.40.0 (#255)
renovate[bot] Nov 2, 2023
ae02315
Update plugin org.checkerframework to v0.6.35 (#256)
renovate[bot] Nov 3, 2023
4f34f05
Use `--filter=blob:none` with `git clone`
mernst Nov 21, 2023
73d45d9
Update plugin com.diffplug.spotless to v6.23.0 (#258)
renovate[bot] Nov 27, 2023
357867c
Update plugin com.diffplug.spotless to v6.23.2 (#259)
renovate[bot] Nov 30, 2023
b5d3921
Update actions/setup-java action to v4 (#260)
renovate[bot] Nov 30, 2023
87d8b76
Update plugin com.diffplug.spotless to v6.23.3 (#261)
renovate[bot] Dec 4, 2023
01e6a9e
Update plugin org.checkerframework to v0.6.36 (#262)
renovate[bot] Dec 5, 2023
1a75753
Update checkerFrameworkVersion to v3.41.0 (#263)
renovate[bot] Dec 5, 2023
2ccb8a5
Use plume-util 1.9.0
mernst Dec 8, 2023
cab7bc2
Use gradle 8.5
mernst Dec 11, 2023
5025c45
Update checkerFrameworkVersion to v3.42.0 (#265)
renovate[bot] Dec 16, 2023
941399c
Update plugin org.checkerframework to v0.6.37 (#266)
renovate[bot] Dec 19, 2023
b2833d4
Update dependency com.google.errorprone:error_prone_core to v2.24.0 (…
renovate[bot] Dec 22, 2023
e3c4682
Update dependency com.google.errorprone:error_prone_core to v2.24.1 (…
renovate[bot] Jan 4, 2024
66ab87b
Use Commons Exec 1.4.0
mernst Jan 7, 2024
66047dc
Update plugin com.diffplug.spotless to v6.24.0 (#271)
renovate[bot] Jan 15, 2024
e3643fc
Update comment
mernst Jan 22, 2024
422a398
Update plugin com.diffplug.spotless to v6.25.0 (#272)
renovate[bot] Jan 23, 2024
10770db
Make checkout more efficient
mernst Jan 27, 2024
59f2158
Update dependency gradle to v8.6 (#273)
renovate[bot] Feb 3, 2024
956e9af
Ignore auto-generated IDE files
mernst Feb 6, 2024
0f54e98
Update dependency com.google.errorprone:error_prone_core to v2.25.0 (…
renovate[bot] Feb 17, 2024
a5337ba
Update dependency com.google.errorprone:error_prone_core to v2.26.0 (…
renovate[bot] Mar 12, 2024
e90b3e0
Update dependency com.google.errorprone:error_prone_core to v2.26.1 (…
renovate[bot] Mar 13, 2024
8f1e0e2
Update dependency gradle to v8.7 (#277)
renovate[bot] Mar 23, 2024
4ae5fb0
Run CI under JDK 21
mernst Mar 24, 2024
d699305
Update Gradle configuration
mernst Mar 26, 2024
6312883
Update dependency org.plumelib:require-javadoc to v1.0.7 (#279)
renovate[bot] Mar 27, 2024
fba999a
Downgrade from Gradle 8.7 to Gradle 8.6
mernst Mar 28, 2024
2b0111e
Update dependency org.plumelib:require-javadoc to v1.0.8 (#280)
renovate[bot] Mar 28, 2024
91dcb2b
Update dependency org.plumelib:require-javadoc to v1.0.9 (#282)
renovate[bot] Mar 29, 2024
9c8c304
Use plume-util version 1.9.1
mernst Apr 7, 2024
6e84994
Update dependency org.plumelib:plume-util to v1.9.2 (#283)
renovate[bot] Apr 8, 2024
a5094ef
Use plume-util version 1.9.3
mernst Apr 22, 2024
bd194b5
Use Gradle 8.7
mernst Apr 22, 2024
132b25a
Update dependency com.google.errorprone:error_prone_annotations to v2…
renovate[bot] Apr 27, 2024
b67b162
Update dependency com.google.errorprone:error_prone_core to v2.27.0 (…
renovate[bot] Apr 27, 2024
23dc57f
Update dependency com.google.errorprone:error_prone_annotations to v2…
renovate[bot] May 2, 2024
1a5c8f8
Update dependency com.google.errorprone:error_prone_core to v2.27.1 (…
renovate[bot] May 2, 2024
74e305c
Update dependency org.checkerframework:checker to v3.43.0 (#292)
renovate[bot] May 2, 2024
9d18c91
Update plugin org.checkerframework to v0.6.39 (#293)
renovate[bot] May 7, 2024
426ce8f
Add `--recursive` to `git clone`
mernst May 29, 2024
33fd2fc
Update dependency com.google.errorprone:error_prone_core to v2.28.0 (…
renovate[bot] Jun 1, 2024
5f76e46
Update dependency com.google.errorprone:error_prone_annotations to v2…
renovate[bot] Jun 1, 2024
f4e74e4
Update dependency gradle to v8.8
renovate[bot] Jun 1, 2024
63e5db5
Test under Java 22
mernst Jun 2, 2024
65bfe90
Update plugin net.ltgt.errorprone to v4 (#297)
renovate[bot] Jun 2, 2024
f29481c
Update checkerFrameworkVersion to v3.44.0 (#298)
renovate[bot] Jun 4, 2024
8978ab9
Don't use `--filter=blob:none`
mernst Jun 5, 2024
c5660e3
Update plugin org.checkerframework to v0.6.40 (#299)
renovate[bot] Jun 5, 2024
62beb20
Update plugin net.ltgt.errorprone to v4.0.1 (#300)
renovate[bot] Jun 22, 2024
62050b0
Merge branch 'master' of https://github.com/plume-lib/multi-version-c…
wmdietl Jun 25, 2024
2ef2aaf
Use git-scripts
wmdietl Jun 25, 2024
cd0f5f0
Use eisop clones
wmdietl Jun 25, 2024
6e44d95
Common setup for spotless, error prone, and eisop
wmdietl Jun 25, 2024
1640241
Use Java 8
wmdietl Jun 25, 2024
0f787ea
Do not use options.release
wmdietl Jun 25, 2024
a552c35
Attempt to stay Java 8 compatible
wmdietl Jun 25, 2024
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
6 changes: 5 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ jobs:

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

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
show-progress: false
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -27,4 +30,5 @@ jobs:
- name: ./gradlew requireJavadoc
run: ./gradlew requireJavadoc
- name: ./gradlew spotlessCheck
if: ${{ matrix.java != '8' }}
run: ./gradlew spotlessCheck
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ build

*.class

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
# *.jar # Used by gradle
*.jar # Need to commit gradle-wrapper.jar file
*.war
*.ear
# .jar file not to ignore
!gradle/wrapper/gradle-wrapper.jar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# IDE files
.idea
.vscode
4 changes: 2 additions & 2 deletions .setup-CF.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ export SHELLOPTS

export JAVA_HOME=${JAVA_HOME:-$(dirname $(dirname $(readlink -f $(which javac))))}

git -C /tmp clone --depth 1 -q https://github.com/plume-lib/plume-scripts.git
git -C /tmp clone --depth 1 -q https://github.com/eisop-plume-lib/git-scripts.git

export CHECKERFRAMEWORK="${CHECKERFRAMEWORK:-$(pwd -P)/../checker-framework}"

## Build Checker Framework
/tmp/plume-scripts/git-clone-related eisop checker-framework ${CHECKERFRAMEWORK}
/tmp/git-scripts/git-clone-related eisop checker-framework ${CHECKERFRAMEWORK}

(cd $CHECKERFRAMEWORK && ./gradlew assembleForJavac)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See the [documentation](http://plumelib.org/multi-version-control/api/org/plumel

```
cd SOME_DIRECTORY
git clone https://github.com/plume-lib/multi-version-control
git clone https://github.com/eisop-plume-lib/multi-version-control
cd multi-version-control
./gradlew assemble
```
Expand All @@ -23,4 +23,4 @@ alias mvc='java -ea -cp SOME_DIRECTORY/multi-version-control/build/libs/multi-ve

## Other scripts for managing multiple git clones and branches

See the scripts in [manage-git-branches](https://github.com/plume-lib/manage-git-branches).
See the scripts in [manage-git-branches](https://github.com/eisop-plume-lib/manage-git-branches).
161 changes: 95 additions & 66 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,97 +1,138 @@
buildscript {
dependencies {
if (JavaVersion.current() >= JavaVersion.VERSION_11) {
// Code formatting; defines targets "spotlessApply" and "spotlessCheck".
// https://github.com/diffplug/spotless/tags ; see tags starting "gradle/"
// Only works on JDK 11+.
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
}
}
}

plugins {
id 'java'
id 'application'

// 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"
// Requires JDK 11 or higher; the plugin crashes under JDK 8.
id 'com.diffplug.spotless' version '6.25.0'

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

// Checker Framework pluggable type-checking
id 'org.checkerframework' version '0.6.38'
id 'org.checkerframework' version '0.6.40'

// To show task list as a tree, run: ./gradlew <taskname> taskTree
id 'com.dorongold.task-tree' version '4.0.0'
}

repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

ext.errorproneVersion = '2.28.0'

ext {
isJava11orHigher = JavaVersion.current() >= JavaVersion.VERSION_11
isJava21orHigher = JavaVersion.current() >= JavaVersion.VERSION_21
}

dependencies {
implementation 'org.apache.commons:commons-exec:1.3'
implementation 'org.apache.commons:commons-exec:1.4.0'
implementation 'org.ini4j:ini4j:0.5.4'
implementation 'org.plumelib:options:2.0.3'
implementation 'org.plumelib:plume-util:1.9.0'
implementation 'org.plumelib:plume-util:1.9.3'
implementation 'org.tmatesoft.svnkit:svnkit:1.10.11'

compileOnly "com.google.errorprone:error_prone_annotations:${errorproneVersion}"
errorprone("com.google.errorprone:error_prone_core:${errorproneVersion}")
}

application {
mainClass = 'org.plumelib.multiversioncontrol.MultiVersionControl'
}

sourceCompatibility = 11
targetCompatibility = 11
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}


spotless {
format 'misc', {
// define the files to apply `misc` to
target '*.md', '.gitignore'
if (isJava11orHigher) {
apply plugin: 'com.diffplug.spotless'
spotless {
format 'misc', {
// define the files to apply `misc` to
target '*.md', '.gitignore'

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
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
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
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.26.1')
}
tasks.withType(JavaCompile).configureEach {
// "-processing" avoids javac warning "No processor claimed any of these annotations".
// "-options" is because starting in JDK 20, javac warns about using -source 8.
// "-Xlint:-options" is because of JDK 21 warning "source value 8 is obsolete..."
options.compilerArgs << '-Xlint:all,-processing,-options' << '-Werror'
if (isJava21orHigher) {
options.compilerArgs << '-Xlint:-this-escape,-options'
}
options.errorprone.enabled = isJava11orHigher
options.errorprone {
disable('ExtendsObject') // Incorrect when using the Checker Framework
disable('ReferenceEquality') // Use Interning Checker instead.
}
options.forkOptions.jvmArgs += '-Xmx2g'
options.release = 11
}

/// Checker Framework pluggable type-checking

apply plugin: 'org.checkerframework'

if (true) {
// Use the released version of the EISOP Checker Framework.
ext.checkerFrameworkVersion = '3.42.0-eisop3'
} else {
// To use a snapshot version of the EISOP Checker Framework.
// TODO: Change the above test to false to use a snapshot.
ext.checkerFrameworkVersion = '3.42.0-eisop4-SNAPSHOT'
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
}
}

dependencies {
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'
compileOnly "io.github.eisop:checker-qual:${checkerFrameworkVersion}"
testCompileOnly "io.github.eisop:checker-qual:${checkerFrameworkVersion}"
checkerFramework "io.github.eisop:checker:${checkerFrameworkVersion}"
}

// To use a locally-built Checker Framework, run gradle with "-PcfLocal".
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')
}
}

checkerFramework {
Expand All @@ -110,46 +151,26 @@ checkerFramework {
'org.checkerframework.common.initializedfields.InitializedFieldsChecker',
]
extraJavacArgs = [
'-Werror',
// '-Aversion',
// '-verbose',
// No "'-Werror'" because of JDK 21 warning "source value 8 is obsolete..."
// '-Werror',
'-AcheckPurityAnnotations',
'-ArequirePrefixInWarningSuppressions',
'-AwarnRedundantAnnotations',
'-AwarnUnneededSuppressions',
'-AnoJreVersionCheck',
'-Aversion',
]
}
// To use a snapshot version of the Checker Framework.
if (false) {
// TODO: change the above test to false when CF is released
ext.checkerFrameworkVersion = '3.42.0-eisop3'
dependencies {
compileOnly "io.github.eisop:checker-qual:${checkerFrameworkVersion}"
testCompileOnly "io.github.eisop:checker-qual:${checkerFrameworkVersion}"
checkerFramework "io.github.eisop:checker:${checkerFrameworkVersion}"
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
}
}
// To use a locally-built Checker Framework, run gradle with "-PcfLocal".
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')
}
}

/// Javadoc

// Turn Javadoc warnings into errors.
javadoc {
options.addStringOption('Xwerror', '-Xdoclint:all')
// No "'-Werror'" because of JDK 21 warning "source value 8 is obsolete..."
// options.addStringOption('Xwerror', '-Xdoclint:all')
options.addStringOption('Xdoclint:all', '-quiet')
options.addStringOption('private', '-quiet')
options.addStringOption('source', '11')
options.addStringOption('source', '8')
doLast {
ant.replaceregexp(match:"@import url\\('resources/fonts/dejavu.css'\\);\\s*", replace:'',
flags:'g', byline:true) {
Expand All @@ -164,12 +185,19 @@ task javadocWeb(type: Javadoc) {
source = sourceSets.main.allJava
destinationDir = file("/cse/web/research/plumelib/${project.name}/api")
classpath = project.sourceSets.main.compileClasspath
options.addStringOption('source', '11')
options.addStringOption('source', '8')
doLast {
ant.replaceregexp(match:"@import url\\('resources/fonts/dejavu.css'\\);\\s*", replace:'',
flags:'g', byline:true) {
fileset(dir: destinationDir)
}
// Set permissions
project.exec {
commandLine('chgrp', '-R', 'plse_www', "/cse/web/research/plumelib/${project.name}/api")
}
project.exec {
commandLine('chmod', '-R', 'g+w', "/cse/web/research/plumelib/${project.name}/api")
}
}
}

Expand All @@ -180,6 +208,7 @@ dependencies {
requireJavadoc 'org.plumelib:require-javadoc:1.0.9'
}
task requireJavadoc(type: JavaExec) {
group = 'Documentation'
description = 'Ensures that Javadoc documentation exists.'
mainClass = 'org.plumelib.javadoc.RequireJavadoc'
classpath = configurations.requireJavadoc
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
10 changes: 5 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
throw new Error("Use Java 11 or later.")
}
}
// 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 = 'multi-version-control'
Loading