jspecify / jspecify-reference-checker

The reference implementation for the JSpecify nullness specification (and later, its other specifications as well)
https://jspecify.org
Apache License 2.0
26 stars 7 forks source link

Can't build main-eisop #211

Open netdpb opened 3 weeks ago

netdpb commented 3 weeks ago

I'm getting a failure to build the main-eisop branch on a brand-new clone.

$ ls -a
total 8
4 ./  4 ../
$ git clone git@github.com:jspecify/jspecify-reference-checker.git
Cloning into 'jspecify-reference-checker'...
remote: Enumerating objects: 4032, done.
remote: Counting objects: 100% (660/660), done.
remote: Compressing objects: 100% (249/249), done.
remote: Total 4032 (delta 375), reused 520 (delta 291), pack-reused 3372 (from 1)
Receiving objects: 100% (4032/4032), 996.26 KiB | 29.30 MiB/s, done.
Resolving deltas: 100% (1426/1426), done.
$ cd jspecify-reference-checker/
$ git checkout main-eisop 
branch 'main-eisop' set up to track 'origin/main-eisop'.
Switched to a new branch 'main-eisop'
$ ./gradlew build
git clone --depth 1 --single-branch https://github.com/jspecify/jdk.git ../jdk 
Cloning into '../jdk'...
Updating files: 100% (69213/69213)
Updating files: 100% (69213/69213), done.

> Task :compileJava FAILED
/usr/local/google/home/dpb/dev/jspecify-eisop/jspecify-reference-checker/src/main/java/com/google/jspecify/nullness/NullSpecAnnotatedTypeFactory.java:110: error: cannot find symbol
import org.checkerframework.framework.util.NoContractsFromMethod;
                                          ^
  symbol:   class NoContractsFromMethod
  location: package org.checkerframework.framework.util
/usr/local/google/home/dpb/dev/jspecify-eisop/jspecify-reference-checker/src/main/java/com/google/jspecify/nullness/NullSpecAnnotatedTypeFactory.java:1038: error: cannot find symbol
    return new NoContractsFromMethod();
               ^
  symbol:   class NoContractsFromMethod
  location: class NullSpecAnnotatedTypeFactory
/usr/local/google/home/dpb/dev/jspecify-eisop/jspecify-reference-checker/src/main/java/com/google/jspecify/nullness/NullSpecChecker.java:72: error: method does not override or implement a method from a supertype
  @Override
  ^
3 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 32s
1 actionable task: 1 executed
wmdietl commented 3 weeks ago

You need to clone eisop/checker-framework and include that build, see https://github.com/jspecify/jspecify-reference-checker/blob/27d2334f1c94a223a70c0c98d11058dadce38d94/.github/workflows/build.yml#L35

I'll make an EISOP release next week, then the reference checker will work with that release.

cpovirk commented 3 weeks ago

I think I had mentioned my steps in https://github.com/jspecify/jspecify/pull/583#pullrequestreview-2228687118 elsewhere, so that's at least something that might still unblock your attempt until the normal instructions are fixed by a release or whatever turns out to be necessary.