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

Invalid build instructions #129

Open
evanw555 opened this issue Apr 3, 2019 · 0 comments
Open

Invalid build instructions #129

evanw555 opened this issue Apr 3, 2019 · 0 comments
Assignees
Labels
build Build failures and problems documentation Documentation errors or suggestions (https://rest.li/)

Comments

@evanw555
Copy link
Contributor

evanw555 commented Apr 3, 2019

We received an email about the following error:

When I try to build the rest.li repo from source (via the command gradle clean build), I get the below error. Do you have some thoughts on what might be the issue?

> Task :buildSrc:compileGroovy FAILED
startup failed:
/home/jinm/rest.li/gradle-plugins/src/main/groovy/com/linkedin/pegasus/gradle/PegasusPlugin.groovy: 1718: The variable [property] is declared final but is reassigned
. At [1718:9]  @ line 1718, column 9.
           property = IDL_COMPAT_REQUIREMENT
           ^

/home/jinm/rest.li/gradle-plugins/src/main/groovy/com/linkedin/pegasus/gradle/tasks/CheckSnapshotTask.groovy: 111: The variable [apiFilename] may be uninitialized
. At [111:9]  @ line 111, column 9.
           apiFilename = it.name.substring(0, it.name.length() - PegasusPlugin.SNAPSHOT_FILE_SUFFIX.length()) + PegasusPlugin.IDL_FILE_SUFFIX
           ^

/home/jinm/rest.li/gradle-plugins/src/main/groovy/com/linkedin/pegasus/gradle/tasks/GenerateAvroSchemaTask.groovy: 80: The variable [avroTranslateOptionalDefault] is declared final but is reassigned
. At [80:7]  @ line 80, column 7.
         avroTranslateOptionalDefault = project.property('generator.avro.optional.default')
         ^

3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildSrc:compileGroovy'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s

The requirements as I understand from here:
https://github.com/linkedin/rest.li/wiki
are
Java 1.8+
Gradle 1.8+ or SBT 0.13.0+

I have the latest stable version of Gradle, and suitable versions of Java:
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
And
Gradle 5.2.1

Build time: 2019-02-08 19:00:10 UTC
Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_201 (Oracle Corporation 25.201-b09)
OS: Linux 4.18.0-1013-azure amd64

With the following resolution:

Thanks for the pointer. I pulled the changes, and also I realized that the command to build should actually be “./gradlew sourcesJar” rather than “gradle clean build” as it says here: https://github.com/linkedin/rest.li/wiki/Building-Rest.li-from-Source . With these changes, I was able to successfully build the code.

Task:

Verify that this is a problem, update the documentation.

@evanw555 evanw555 self-assigned this Apr 3, 2019
@evanw555 evanw555 added the documentation Documentation errors or suggestions (https://rest.li/) label Apr 3, 2019
@evanw555 evanw555 added the build Build failures and problems label Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build failures and problems documentation Documentation errors or suggestions (https://rest.li/)
Projects
None yet
Development

No branches or pull requests

1 participant