jspecify/jspecify-reference-checker

build instructions for main-eisop

cpovirk opened this issue · 3 comments

We probably don't need anything officially published, but for those of us who are looking into the branch now, it would be good to have instructions somewhere.

Here's what I originally tried:

$ git clone git@github.com:jspecify/jspecify-reference-checker.git && cd jspecify-reference-checker && git checkout main-eisop && ./gradlew assemble
...
git clone git@github.com:jspecify/checker-framework.git ../checker-framework 
Cloning into '../checker-framework'...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':compileJava'.
> Could not resolve all task dependencies for configuration ':compileClasspath'.
   > Could not find io.github.eisop:checker:3.42.0-eisop2-SNAPSHOT.
     Searched in the following locations:
       - file:/usr/local/google/home/cpovirk/.m2/repository/io/github/eisop/checker/3.42.0-eisop2-SNAPSHOT/maven-metadata.xml
       - file:/usr/local/google/home/cpovirk/.m2/repository/io/github/eisop/checker/3.42.0-eisop2-SNAPSHOT/checker-3.42.0-eisop2-SNAPSHOT.pom
       - https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/eisop/checker/3.42.0-eisop2-SNAPSHOT/maven-metadata.xml
       - https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/eisop/checker/3.42.0-eisop2-SNAPSHOT/checker-3.42.0-eisop2-SNAPSHOT.pom
       - https://repo.maven.apache.org/maven2/io/github/eisop/checker/3.42.0-eisop2-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/io/github/eisop/checker/3.42.0-eisop2-SNAPSHOT/checker-3.42.0-eisop2-SNAPSHOT.pom
     Required by:
         project :
   > Could not find io.github.eisop:checker-qual:3.42.0-eisop2-SNAPSHOT.
...

I took a couple guesses and discovered that I should go into checker-framework and run git remote add eisop https://github.com/eisop/checker-framework && git fetch eisop master && git checkout eisop/master (or some similar command of my preference).

For my current testing purposes, I also switched to use the JSpecify JDK that uses the old package name:

  • After the above build, I went into jdk and ran git fetch origin orgjspecifypackage && git checkout FETCH_HEAD.
  • Then I ported jspecify/checker-framework@fd05cda to my checker-framework clone.
  • Then I ran a new build in checker-framework with ./gradlew buildAll -x cloneAnnotatedJdk -x javadoc -x allJavadoc -Prelease=true. (Some of those flags are probably unnecessary, but I'm used to running a similar command for improved speed and shading during our releases.)

That gave me something that I was able to start testing against part of Google's codebase. I see some crashes and errors, which I'll look into more tomorrow... :)

(I do note that @netdpb had reported a test problem with NullSpecTest$Minimal. I haven't tried to run the tests yet, so I don't know whether it occurs for me.)

Thanks for testing and the thorough notes! I'm sorry that it was this painful to build :-(

I do not understand why it is cloning jspecify/checker-framework for you.
This line should clone eisop/checker-framework and that's what's happening on CI.
Do you understand what's going on?

I'll open a PR to get jspecify/checker-framework@fd05cda into eisop. Update: I've opened eisop/checker-framework#707.

#154 is about the failure in NullSpecTest$Minimal and once that lands in main-eisop that should be fixed. That shouldn't impact your testing.

Thanks again!

@cpovirk Thanks again for raising all these issues.
I think all this has been addressed. Can we close this issue?

Yes, all appears well now. Thanks!