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

Use EISOP CF sources #118

Merged
merged 35 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0897b15
Update to gradle 8.0
wmdietl Feb 15, 2023
d577777
Merge branch 'main' of github.com:jspecify/nullness-checker-for-check…
wmdietl Mar 1, 2023
0ef889c
Update to gradle 8.0.1
wmdietl Mar 1, 2023
20aac34
Adapt to CF changes
wmdietl Mar 1, 2023
b8bf12d
DetailedMessage parsing seems to require full messages
wmdietl Mar 21, 2023
47820ad
Expand a few more error keys
wmdietl Mar 21, 2023
8baeb43
Merge branch 'main' of github.com:jspecify/jspecify-reference-checker…
wmdietl May 14, 2023
668e364
Adapt more error keys
wmdietl May 30, 2023
650470a
Update to gradle 8.1.1
wmdietl May 30, 2023
782ee08
Use more standard EISOP mechanisms
wmdietl May 30, 2023
a611b52
Merge branch 'main' of github.com:jspecify/jspecify-reference-checker…
wmdietl May 30, 2023
7547ec5
Make TypeUseLocation array fields static
wmdietl May 31, 2023
0982d00
Remove hacks that seem to have no impact on jspecifySamplesTest
wmdietl Jun 14, 2023
c02e2a9
Merge branch 'main' of github.com:jspecify/jspecify-reference-checker…
wmdietl Dec 6, 2023
9c608ea
Use EISOP CF sources
wmdietl Dec 6, 2023
a564409
Adapt to API changes, disable some features
wmdietl Dec 6, 2023
c07df12
Try alternative comparison
wmdietl Dec 6, 2023
939a0af
Ignore forking_org to actually use eisop/checker-framework
wmdietl Dec 6, 2023
f690acc
Respect forking_org if it is not "jspecify"
wmdietl Dec 6, 2023
165f412
Rewrite condition
wmdietl Dec 6, 2023
a385efa
Use whole URL
wmdietl Dec 6, 2023
ff94fe6
Ignore conformance test errors to also see sample results
wmdietl Dec 7, 2023
4dbed1d
Experiment with yaml syntax
wmdietl Dec 7, 2023
6648806
Try `if: always()`
wmdietl Dec 7, 2023
ac78d1c
Try `if: always()` for all following steps
wmdietl Dec 7, 2023
02160b6
Apply suggestions from code review
wmdietl Dec 14, 2023
80311ae
Rely on SHALLOW variable
wmdietl Dec 14, 2023
8d43524
Merge branch 'main-eisop' of github.com:jspecify/jspecify-reference-c…
wmdietl Dec 14, 2023
49cfc8a
Merge branch 'main-eisop' of github.com:jspecify/jspecify-reference-c…
wmdietl Dec 14, 2023
045ffe6
Fix duplication from merge
wmdietl Dec 14, 2023
384a077
Undo changes to gradle-wrapper.jar
wmdietl Dec 14, 2023
3594656
Another attempt to reset gradle-wrapper.jar
wmdietl Dec 14, 2023
593dd1a
Update expected conformance test results
wmdietl Dec 19, 2023
8f13645
Merge branch 'main-eisop' of github.com:jspecify/jspecify-reference-c…
wmdietl Jan 4, 2024
6b5bf11
Update EISOP version
wmdietl Jan 4, 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
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
arguments: conformanceTest conformanceTestOnSamples
- name: Check out jspecify/samples-google-prototype
run: git -C ../jspecify checkout samples-google-prototype
if: always()
- name: Run Samples Tests
uses: gradle/gradle-build-action@v2
with:
arguments: jspecifySamplesTest
if: always()
netdpb marked this conversation as resolved.
Show resolved Hide resolved
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
12 changes: 8 additions & 4 deletions initialize-project
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Set SHALLOW=1 to clone sibling projects at depth 1.
#
# This script automatically tries to download your fork of
# jspecify/checker-framework, jspecify/jspecify, or jspecify/jdk, if they exist.
# eisop/checker-framework, jspecify/jspecify, or jspecify/jdk, if they exist.
# It uses the URL of the origin remote (the default remote created when cloning
# a repo) to determine that.
#
Expand Down Expand Up @@ -55,12 +55,16 @@ git_clone() {

local forking_org
forking_org="$(forking_org)"
if [[ -n "${forking_org}" ]]; then
if [[ -n "${forking_org}" ]] && [[ "${forking_org}" != "https://github.com/jspecify" ]]; then
if run "${git[@]}" "${forking_org}/${repo}.git" "../${repo}"; then
return
fi
fi
run "${git[@]}" "https://github.com/jspecify/${repo}.git" "../${repo}"
if [[ "${repo}" == "checker-framework" ]]; then
run "${git[@]}" "https://github.com/eisop/checker-framework.git" "../checker-framework"
else
run "${git[@]}" "https://github.com/jspecify/${repo}.git" "../${repo}"
fi
wmdietl marked this conversation as resolved.
Show resolved Hide resolved
}

# Fetch all branches even when $SHALLOW is set so we can check out
Expand All @@ -69,4 +73,4 @@ git_clone jspecify --no-single-branch

git_clone jdk --depth 1 --single-branch

git_clone checker-framework
git_clone checker-framework --depth 1 --single-branch
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have a SHALLOW environment variable that users can set to enable this. That might be better than hard-coding (which, admittedly, we do for the JDK, but it's truly huge). I don't remember exactly how much thought we gave to all this, though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The point of $SHALLOW is to allow CIs like GitHub actions to avoid cloning any commits they don't care about. If you're just running tests for CI you don't need to check any past commits out.

I think if someone has their own fork of eisop we wouldn't want them to clone only one branch. I would suggest continuing to rely on $SHALLOW (defined externally) for checker-framework.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not really related to this PR, but:

Use --filter=blob:none instead of --depth 1

I wonder if that's worth investigating someday.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had a quick look at this post:
https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/

It seems to generally prefer the blob-less mode. For CI, where one only has a single build, continuing to use --depth 1 seems okay. But as this script is for developer set-up, using blob-less might be better.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's postpone that to a different PR. It's not related to switching to EISOP.

12 changes: 6 additions & 6 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ includeBuild("../checker-framework") {
dependencyResolutionManagement {
versionCatalogs {
libs {
version("checkerFramework", "3.21.5-SNAPSHOT")
version("checkerFramework", "3.41.1-eisop1-SNAPSHOT")

library("checkerFramework-checker", "org.checkerframework", "checker").versionRef("checkerFramework")
library("checkerFramework-checker-qual", "org.checkerframework", "checker-qual").versionRef("checkerFramework")
library("checkerFramework-framework", "org.checkerframework", "framework").versionRef("checkerFramework")
library("checkerFramework-framework-test", "org.checkerframework", "framework-test").versionRef("checkerFramework")
library("checkerFramework-javacutil", "org.checkerframework", "javacutil").versionRef("checkerFramework")
library("checkerFramework-checker", "io.github.eisop", "checker").versionRef("checkerFramework")
library("checkerFramework-checker-qual", "io.github.eisop", "checker-qual").versionRef("checkerFramework")
library("checkerFramework-framework", "io.github.eisop", "framework").versionRef("checkerFramework")
library("checkerFramework-framework-test", "io.github.eisop", "framework-test").versionRef("checkerFramework")
library("checkerFramework-javacutil", "io.github.eisop", "javacutil").versionRef("checkerFramework")
library("errorProne-core", "com.google.errorprone:error_prone_core:2.18.0")
library("errorProne-javac", "com.google.errorprone:javac:9+181-r4173-1")
library("guava", "com.google.guava:guava:31.1-jre")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

package com.google.jspecify.nullness;

import java.util.Set;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.type.TypeMirror;
import org.checkerframework.common.basetype.BaseTypeChecker;
import org.checkerframework.framework.flow.CFAbstractAnalysis;
import org.checkerframework.framework.flow.CFValue;
import org.checkerframework.javacutil.AnnotationMirrorSet;

final class NullSpecAnalysis extends CFAbstractAnalysis<CFValue, NullSpecStore, NullSpecTransfer> {
NullSpecAnalysis(BaseTypeChecker checker, NullSpecAnnotatedTypeFactory factory) {
Expand All @@ -37,7 +36,7 @@ public NullSpecStore createCopiedStore(NullSpecStore other) {
}

@Override
public CFValue createAbstractValue(Set<AnnotationMirror> annotations, TypeMirror underlyingType) {
public CFValue createAbstractValue(AnnotationMirrorSet annotations, TypeMirror underlyingType) {
return defaultCreateAbstractValue(this, annotations, underlyingType);
}
}
Loading
Loading