From 8e950605e09c8b93774628c5d76ed4043c29694a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 5 Nov 2019 11:16:01 +0100 Subject: [PATCH] Fix the build (#569) * Fix #570. Build broken on Cirrus by upgrade to Bazel v1.0 * The `single_file` attribute has been replaced by `allow_single_file`. Use **bazel_rules** v4 which fixed this. https://github.com/jflex-de/bazel_rules/pull/13 * add `--incompatible_depset_union=false` bazel_pandoc https://github.com/ProdriveTechnologies/bazel-pandoc/issues/6 needs to update for incompatible_depset_union https://github.com/bazelbuild/bazel/issues/5817 * Use ProdriveTechnologies/bazel-latex#26 because `run_lualatex.py` is not executable * In deps, use `https` rather than `http` * Fix build broken on Travis due to upgrade to Xenial * Use openjdk11 because whatever I ask for, that's what I get. * Upgrade maven-compiler-plugin to 3.8.0 to fix _class file has wrong version 55.0, should be 53.0_ * Fix maven-compiler-plugin config for ErrorProne * Fix config of maven-javadoc-plugin for newer JDK. https://bugs.openjdk.java.net/browse/JDK-8212233 * In aggregated sources, update to JDK8 because Xenial doesn't support JDK7 anymore. Add manual dep on **javax-annotations.jar** because because JDK8 doesn't provide it anymore. * Remove the task that builds the docs because `\tightlist` is not known. #571 --- .bazelrc | 6 +++ .gitignore | 1 + .travis.yml | 24 ++-------- WORKSPACE | 20 ++++++--- cup-maven-plugin/pom.xml | 12 ----- cup/pom.xml | 2 +- pom.xml | 51 +++++++++++----------- scripts/compile-aggregated-java-sources.sh | 1 + third_party/deps.bzl | 8 ++-- 9 files changed, 55 insertions(+), 70 deletions(-) diff --git a/.bazelrc b/.bazelrc index 3c1c6a110..86bbd656b 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,9 @@ +# This incompatible change was introduced in Bazel 0.26 +# https://github.com/bazelbuild/bazel/issues/5817 +# bazel_pandoc needs to update +# https://github.com/ProdriveTechnologies/bazel-pandoc/issues/6 +build --incompatible_depset_union=false + test --test_output=errors # http://errorprone.info/bugpatterns diff --git a/.gitignore b/.gitignore index 3edac033f..5defa9af9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ jflex/build *.ipr *.iws .idea +.ijwb # Eclipse project .project diff --git a/.travis.yml b/.travis.yml index 444dbd859..e23358a49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ git: language: java jdk: -- openjdk9 +- openjdk11 matrix: include: @@ -35,26 +35,9 @@ matrix: - scripts/test-regression.sh - name: "😎 Examples (mvn, ant, make)" script: scripts/test-examples.sh - - name: "👴 Examples (mvn, ant, make) — JDK7" + - name: "👴 Examples (mvn, ant, make) — JDK8" script: scripts/test-examples.sh - jdk: openjdk7 - - name: "📄 Documentation" - language: generic - install: true - addons: - apt: - packages: - # pandoc used for building the doc - - pandoc - - pandoc-citeproc - # texlive used for PDF output - - texlive - # texlive-latex-extra provides extra styles such as a4wide and upquote.sty - - texlive-latex-extra - # lmodern.sty - - lmodern - script: - - cd docs; make; cd .. + jdk: openjdk8 # Empty the previously built artifacts # They cannot be deleted in the before_cache phase, @@ -111,4 +94,3 @@ deploy: condition: - $PUBLISH_SOURCES script: scripts/deploy-aggregated-sources.sh - diff --git a/WORKSPACE b/WORKSPACE index b0d28c5b8..3d0a5fd56 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,7 +8,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") git_repository( name = "jflex_rules", remote = "https://github.com/jflex-de/bazel_rules.git", - tag = "v3", + tag = "v4", ) load("@jflex_rules//jflex:deps.bzl", "jflex_deps") @@ -28,12 +28,20 @@ load("@bazel_pandoc//:repositories.bzl", "pandoc_repositories") pandoc_repositories() # latex rule to build PDF from tex files - -http_archive( +# +#http_archive( +# name = "bazel_latex", +# sha256 = "b4dd9ae76c570b328be30cdc5ea7045a61ecd55e4e6e2e433fb3bb959be2a44b", +# strip_prefix = "bazel-latex-0.16", +# url = "https://github.com/ProdriveTechnologies/bazel-latex/archive/v0.16.tar.gz", +#) +# +# This is a proposed fix for `OSError: [Errno 13] Permission denied: run_lualatex.py` +# https://github.com/ProdriveTechnologies/bazel-latex/issues/23 +git_repository( name = "bazel_latex", - sha256 = "b4dd9ae76c570b328be30cdc5ea7045a61ecd55e4e6e2e433fb3bb959be2a44b", - strip_prefix = "bazel-latex-0.16", - url = "https://github.com/ProdriveTechnologies/bazel-latex/archive/v0.16.tar.gz", + commit = "1ba1fb087b8526cfe28c7c31471f412107ee6f09", + remote = "https://github.com/Selmaai/bazel-latex.git", ) load("@bazel_latex//:repositories.bzl", "latex_repositories") diff --git a/cup-maven-plugin/pom.xml b/cup-maven-plugin/pom.xml index 729943e09..af630c2d0 100644 --- a/cup-maven-plugin/pom.xml +++ b/cup-maven-plugin/pom.xml @@ -77,16 +77,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.7 - 1.7 - - - - diff --git a/cup/pom.xml b/cup/pom.xml index d2f66a6e1..1b79b062a 100644 --- a/cup/pom.xml +++ b/cup/pom.xml @@ -74,7 +74,7 @@ maven-compiler-plugin - 3.7.0 + 3.8.0 maven-deploy-plugin diff --git a/pom.xml b/pom.xml index 4782826ca..fe2f6a60d 100644 --- a/pom.xml +++ b/pom.xml @@ -205,7 +205,7 @@ maven-compiler-plugin - 3.7.0 + 3.8.0 maven-deploy-plugin @@ -253,7 +253,11 @@ maven-javadoc-plugin - 2.10.1 + 3.1.1 + + + 8 + maven-jar-plugin @@ -282,7 +286,7 @@ maven-site-plugin - 3.6 + 3.8.2 maven-source-plugin @@ -290,7 +294,7 @@ maven-surefire-plugin - 2.20.1 + 3.0.0-M3 @@ -300,8 +304,8 @@ maven-compiler-plugin - 1.7 - 1.7 + 8 + 8 @@ -444,35 +448,30 @@ error-prone - [1.8,) + [1.9,) + + DISABLED + maven-compiler-plugin - javac-with-errorprone - true + 8 + 8 - -Xep:FallThrough:WARN + -XDcompilePolicy=simple + -Xplugin:ErrorProne -Xep:FallThrough:WARN - 1.7 - 1.7 + + + com.google.errorprone + error_prone_core + 2.3.3 + + - - - org.codehaus.plexus - plexus-compiler-javac-errorprone - 2.8 - - - - com.google.errorprone - error_prone_core - 2.1.1 - - diff --git a/scripts/compile-aggregated-java-sources.sh b/scripts/compile-aggregated-java-sources.sh index 9004df924..f06511aaa 100755 --- a/scripts/compile-aggregated-java-sources.sh +++ b/scripts/compile-aggregated-java-sources.sh @@ -20,6 +20,7 @@ mvnget() { mvnget org/apache/ant/ant/1.7.0/ant-1.7.0.jar mvnget com/google/auto/value/auto-value-annotations/1.6.2/auto-value-annotations-1.6.2.jar +mvnget javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar CP=${CP##:} # Remove leading ':' javac -cp "$CP" $(find . -name '*.java') diff --git a/third_party/deps.bzl b/third_party/deps.bzl index 705cb2528..d6b95a53e 100644 --- a/third_party/deps.bzl +++ b/third_party/deps.bzl @@ -33,20 +33,20 @@ def third_party_deps(): native.maven_jar( name = "com_google_auto_value_auto_value", artifact = "com.google.auto.value:auto-value:jar:1.4.1", - repository = "http://jcenter.bintray.com/", + repository = "https://jcenter.bintray.com/", ) native.maven_jar( name = "com_google_guava_guava", artifact = "com.google.guava:guava:jar:26.0-jre", - repository = "http://jcenter.bintray.com/", + repository = "https://jcenter.bintray.com/", ) native.maven_jar( name = "com_google_truth_truth", artifact = "com.google.truth:truth:0.36", - repository = "http://jcenter.bintray.com/", + repository = "https://jcenter.bintray.com/", ) native.maven_jar( name = "junit_junit", artifact = "junit:junit:jar:4.12", - repository = "http://jcenter.bintray.com/", + repository = "https://jcenter.bintray.com/", )