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 git-scripts in addition to plume-scripts #268

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ ext {
// afu = "${annotationTools}/annotation-file-utilities"

jtregHome = "${parentDir}/jtreg"
gitScriptsHome = "${project(':checker').projectDir}/bin-devel/.git-scripts"
plumeScriptsHome = "${project(':checker').projectDir}/bin-devel/.plume-scripts"
htmlToolsHome = "${project(':checker').projectDir}/bin-devel/.html-tools"
doLikeJavacHome = "${project(':checker').projectDir}/bin/.do-like-javac"
Expand Down Expand Up @@ -248,6 +249,7 @@ allprojects {
// If you add any formatters to this block that require dependencies, then you must also
// add them to spotlessPredeclare block.
def doNotFormat = [
'checker/bin-devel/.git-scripts/**',
'checker/bin-devel/.plume-scripts/**',
'checker/tests/ainfer-*/annotated/*',
'dataflow/manual/examples/',
Expand Down Expand Up @@ -804,6 +806,7 @@ def createCloneTask(taskName, url, directory, extraArgs = []) {
}


createCloneTask('getGitScripts', 'https://github.com/eisop-plume-lib/git-scripts.git', gitScriptsHome)
createCloneTask('getPlumeScripts', 'https://github.com/eisop-plume-lib/plume-scripts.git', plumeScriptsHome)
createCloneTask('getHtmlTools', 'https://github.com/plume-lib/html-tools.git', htmlToolsHome)
createCloneTask('getDoLikeJavac', 'https://github.com/opprop/do-like-javac.git', doLikeJavacHome)
Expand Down
4 changes: 2 additions & 2 deletions checker/bin-devel/checkout-historical.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ git checkout -B __merge_eval__
echo "plume-scripts"
PLUME_SCRIPTS="checker/bin-devel/.plume-scripts"
if [ ! -d "$PLUME_SCRIPTS" ] ; then
git clone -q https://github.com/plume-lib/plume-scripts.git "${PLUME_SCRIPTS}"
git clone -q https://github.com/eisop-plume-lib/plume-scripts.git "${PLUME_SCRIPTS}"
fi
COMMIT="$(cd "${PLUME_SCRIPTS}" && git rev-list -n 1 --first-parent --before="${commit_date}" master)"
if [ -n "${COMMIT}" ] ; then
Expand All @@ -102,7 +102,7 @@ echo "html-tools"
HTML_TOOLS="checker/bin-devel/.plume-scripts"
COMMIT="$(cd "${HTML_TOOLS}" && git rev-list -n 1 --first-parent --before="${commit_date}" master)"
if [ ! -d "$HTML_TOOLS" ] ; then
git clone -q https://github.com/plume-lib/html-tools.git "${HTML_TOOLS}"
git clone -q https://github.com/eisop-plume-lib/html-tools.git "${HTML_TOOLS}"
fi
if [ -n "${COMMIT}" ] ; then
# COMMIT is non-empty
Expand Down
16 changes: 8 additions & 8 deletions checker/bin-devel/clone-related.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ else
fi
echo "JAVA_HOME=${JAVA_HOME}"

# Using `(cd "$CHECKERFRAMEWORK" && ./gradlew getPlumeScripts -q)` leads to infinite regress.
PLUME_SCRIPTS="$CHECKERFRAMEWORK/checker/bin-devel/.plume-scripts"
if [ -d "$PLUME_SCRIPTS" ] ; then
(cd "$PLUME_SCRIPTS" && (git pull -q || true))
# Using `(cd "$CHECKERFRAMEWORK" && ./gradlew getGitScripts -q)` leads to infinite regress.
GIT_SCRIPTS="$CHECKERFRAMEWORK/checker/bin-devel/.git-scripts"
if [ -d "$GIT_SCRIPTS" ] ; then
(cd "$GIT_SCRIPTS" && (git pull -q || true))
else
(cd "$CHECKERFRAMEWORK/checker/bin-devel" && \
(git clone --filter=blob:none -q https://github.com/eisop-plume-lib/plume-scripts.git .plume-scripts || \
(sleep 1m && git clone --filter=blob:none -q https://github.com/eisop-plume-lib/plume-scripts.git .plume-scripts)))
(git clone --filter=blob:none -q https://github.com/eisop-plume-lib/git-scripts.git .git-scripts || \
(sleep 60 && git clone --filter=blob:none -q https://github.com/eisop-plume-lib/git-scripts.git .git-scripts)))
fi

# Clone the annotated JDK into ../jdk .
"$PLUME_SCRIPTS/git-clone-related" ${DEBUG_FLAG} opprop jdk
"$GIT_SCRIPTS/git-clone-related" ${DEBUG_FLAG} opprop jdk

# AFU="${AFU:-../annotation-tools/annotation-file-utilities}"
# # Don't use `AT=${AFU}/..` which causes a git failure.
# AT=$(dirname "${AFU}")

# ## Build annotation-tools (Annotation File Utilities)
# "$PLUME_SCRIPTS/git-clone-related" ${DEBUG_FLAG} eisop annotation-tools "${AT}"
# "$GIT_SCRIPTS/git-clone-related" ${DEBUG_FLAG} eisop annotation-tools "${AT}"
# if [ ! -d ../annotation-tools ] ; then
# ln -s "${AT}" ../annotation-tools
# fi
Expand Down
2 changes: 1 addition & 1 deletion checker/bin-devel/test-cf-inference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source "$SCRIPTDIR"/build.sh
## script rather than in ./test/downstream.sh, because it needs a different
## Docker image.

"$SCRIPTDIR/.plume-scripts/git-clone-related" opprop checker-framework-inference
"$SCRIPTDIR/.git-scripts/git-clone-related" opprop checker-framework-inference

export PATH=$AFU/scripts:$PATH
cd ../checker-framework-inference
Expand Down
2 changes: 1 addition & 1 deletion checker/bin-devel/test-daikon-part1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo "running \"./gradlew assembleForJavac\" for checker-framework"


# daikon-typecheck: 15 minutes
"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop-codespecs daikon
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop-codespecs daikon
cd ../daikon
git log | head -n 5
make compile
Expand Down
2 changes: 1 addition & 1 deletion checker/bin-devel/test-daikon-part2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo "running \"./gradlew assembleForJavac\" for checker-framework"
./gradlew assembleForJavac --console=plain -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.internal.http.connectionTimeout=60000

# daikon-typecheck: 15 minutes
"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop-codespecs daikon
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop-codespecs daikon
cd ../daikon
git log | head -n 5
make compile
Expand Down
2 changes: 1 addition & 1 deletion checker/bin-devel/test-daikon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo "running \"./gradlew assembleForJavac\" for checker-framework"
./gradlew assembleForJavac --console=plain -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.internal.http.connectionTimeout=60000

# daikon-typecheck: 15 minutes
"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop-codespecs daikon -q --single-branch --depth 50
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop-codespecs daikon -q --single-branch --depth 50
cd ../daikon
git log | head -n 5
make compile
Expand Down
2 changes: 1 addition & 1 deletion checker/bin-devel/test-downstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ source "$SCRIPTDIR"/clone-related.sh

## This is moved to misc, because otherwise it would be the only work done by this script.
# # Checker Framework demos
# "$SCRIPTDIR/.plume-scripts/git-clone-related" eisop checker-framework.demos
# "$SCRIPTDIR/.git-scripts/git-clone-related" eisop checker-framework.demos
# ./gradlew :checker:demosTests --console=plain --warning-mode=all
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava-formatter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh


"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

./typecheck.sh formatter
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava-index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh


"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

if [ "$TRAVIS" = "true" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava-interning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh


"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

./typecheck.sh interning
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava-lock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh


"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

./typecheck.sh lock
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava-nullness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh


"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

./typecheck.sh nullness
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava-regex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh


"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

./typecheck.sh regex
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava-signature.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh


"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

./typecheck.sh signature
2 changes: 1 addition & 1 deletion checker/bin-devel/test-guava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source "$SCRIPTDIR"/clone-related.sh
# TODO: Maybe I should move this into the CI job, and do it for all CI jobs.
cp "$SCRIPTDIR"/mvn-settings.xml ~/settings.xml

"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop guava
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop guava
cd ../guava

if [ "$TRAVIS" = "true" ] ; then
Expand Down
17 changes: 17 additions & 0 deletions checker/bin-devel/test-jspecify-conformance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e
set -o verbose
set -o xtrace
export SHELLOPTS
echo "SHELLOPTS=${SHELLOPTS}"

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# shellcheck disable=SC1090 # In newer shellcheck than 0.6.0, pass: "-P SCRIPTDIR" (literally)
export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh

GIT_SCRIPTS="$SCRIPTDIR/.git-scripts"
"$GIT_SCRIPTS/git-clone-related" eisop jspecify-conformance
cd ../jspecify-conformance
./gradlew test --console=plain -PcfLocal
4 changes: 2 additions & 2 deletions checker/bin-devel/test-misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ source "$SCRIPTDIR"/clone-related.sh
PLUME_SCRIPTS="$SCRIPTDIR/.plume-scripts"

## Checker Framework demos
"$PLUME_SCRIPTS/git-clone-related" eisop checker-framework.demos -q --single-branch --depth 50
"$GIT_SCRIPTS/git-clone-related" eisop checker-framework.demos
./gradlew :checker:demosTests --console=plain --warning-mode=all

status=0
Expand Down Expand Up @@ -62,6 +62,6 @@ git diff --exit-code docs/manual/contributors.tex || \
echo " * Update your git configuration by running: git config --global user.name \"YOURFULLNAME\"" &&
echo " * Add your name to your GitHub account profile at https://github.com/settings/profile" &&
echo " * Make a pull request to add your GitHub ID to" &&
echo " https://github.com/eisop-plume-lib/plume-scripts/blob/master/git-authors.sed" &&
echo " https://github.com/eisop-plume-lib/git-scripts/blob/master/git-authors.sed" &&
echo " and remake contributors.tex after that pull request is merged." &&
false)
2 changes: 1 addition & 1 deletion checker/bin-devel/test-plume-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ for PACKAGE in "${PACKAGES[@]}"; do
echo "PACKAGE=${PACKAGE}"
PACKAGEDIR="/tmp/${PACKAGE}"
rm -rf "${PACKAGEDIR}"
"$SCRIPTDIR/.plume-scripts/git-clone-related" eisop-plume-lib "${PACKAGE}" "${PACKAGEDIR}" -q --single-branch --depth 250
"$SCRIPTDIR/.git-scripts/git-clone-related" eisop-plume-lib "${PACKAGE}" "${PACKAGEDIR}"
# Uses "compileJava" target instead of "assemble" to avoid the javadoc error "Error fetching URL:
# https://docs.oracle.com/en/java/javase/17/docs/api/" due to network problems.
echo "About to call ./gradlew --console=plain -PcfLocal compileJava"
Expand Down
9 changes: 6 additions & 3 deletions docs/manual/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,17 @@ manual.html: manual.pdf CFLogo.png favicon-checkerframework.png ../api
# Add CSS styling for some links, since \ahrefloc doesn't permit styling
sed -i -e 's%\(<a href="#[^"]*"\)\(><span style="font-size:small">&\#X1F517;</span></a>\)%\1 style="color:inherit; text-decoration:none"\2%g' manual.html

../../checker/bin-devel/.git-scripts:
cd ../.. && ./gradlew --stacktrace getGitScripts

../../checker/bin-devel/.plume-scripts:
cd ../.. && ./gradlew --stacktrace getPlumeScripts

.PHONY: contributors.tex
contributors.tex:
# Update plume-scripts even if it is already cloned
cd ../.. && (./gradlew --stacktrace getPlumeScripts || (sleep 60 && ./gradlew --stacktrace getPlumeScripts))
../../checker/bin-devel/.plume-scripts/git-authors --latex --punctuation > contributors.tex
# Update git-scripts even if it is already cloned
cd ../.. && (./gradlew --stacktrace getGitScripts || (sleep 60 && ./gradlew --stacktrace getGitScripts))
../../checker/bin-devel/.git-scripts/git-authors --latex --punctuation > contributors.tex

../api:
cd ../.. && ./gradlew allJavadoc
Expand Down
Loading