LoopPerfect / buckaroo

The decentralized package manager for C++ and friends 🏝️
https://buckaroo.pm
MIT License
935 stars 33 forks source link

require OpenJDK version 1.8.0_60 or later to build #68

Closed alichnewsky closed 7 years ago

alichnewsky commented 7 years ago

Attempting to install from homebrew gets java compilation errors. Only the first one is reported. More of the same kind of issues (type inference for generics in lambdas?) when building from source (HEAD at 6f9a3cd). I am using javac 1.8.0_45 on macOS Sierra.

I should have a pull request soon hopefully.

 brew install --HEAD loopperfect/lp/buckaroo
==> Tapping loopperfect/lp
Cloning into '/usr/local/Homebrew/Library/Taps/loopperfect/homebrew-lp'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (6/6), done.
Tapped 1 formula (32 files, 24.8KB)
==> Installing buckaroo from loopperfect/lp
==> Installing dependencies for loopperfect/lp/buckaroo: ant
==> Installing loopperfect/lp/buckaroo dependency: ant
==> Downloading https://homebrew.bintray.com/bottles/ant-1.10.1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ant-1.10.1.sierra.bottle.tar.gz
==> Using the sandbox
🍺  /usr/local/Cellar/ant/1.10.1: 1,628 files, 36.8MB
==> Installing loopperfect/lp/buckaroo --HEAD
==> Cloning https://github.com/LoopPerfect/buckaroo.git
Cloning into '/Users/alichnewsky/Library/Caches/Homebrew/buckaroo--git'...
remote: Counting objects: 174, done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 174 (delta 58), reused 70 (delta 20), pack-reused 0
Receiving objects: 100% (174/174), 66.92 KiB | 0 bytes/s, done.
Resolving deltas: 100% (58/58), done.
==> Checking out branch master
==> buck build :buckaroo-cli
Last 15 lines from /Users/alichnewsky/Library/Logs/Homebrew/buckaroo/01.buck:
    equality constraints(s): com.loopperfect.buckaroo.Either<java.io.IOException,com.loopperfect.buckaroo.Organization>,capture#2 of ? extends com.loopperfect.buckaroo.Either<java.io.IOException,? extends java.lang.Object>
/private/tmp/buckaroo-20170610-29443-affxyz/src/main/java/com/loopperfect/buckaroo/routines/Routines.java:203: error: incompatible types: inferred type does not conform to equality constraint(s)
            .flatMap(x -> x.join(
                    ^
    inferred: com.loopperfect.buckaroo.Either<java.io.IOException,com.loopperfect.buckaroo.CookBook>
    equality constraints(s): com.loopperfect.buckaroo.Either<java.io.IOException,com.loopperfect.buckaroo.CookBook>,capture#3 of ? extends com.loopperfect.buckaroo.Either<java.io.IOException,? extends java.lang.Object>
/private/tmp/buckaroo-20170610-29443-affxyz/src/main/java/com/loopperfect/buckaroo/Either.java:-1: note: Some input files use unchecked or unsafe operations.

/private/tmp/buckaroo-20170610-29443-affxyz/src/main/java/com/loopperfect/buckaroo/Either.java:-1: note: Recompile with -Xlint:unchecked for details.

Errors: 7. Warnings: 0.

BUILD FAILED: //:buckaroo failed with exit code 1:
njlr commented 7 years ago

It appears that this is a bug with Java itself that has been fixed in a later version.

Rather than add a work-around to the Buckaroo code-base, perhaps it would be better that users update. @nikhedonia?

alichnewsky commented 7 years ago

I can confirm that updating the java compiler to version 1.8.0_60 does indeed fix it. I would agree, there's no need to work around it in your code.

I can't see an elegant way to convey to the user that they need to upgrade OpenJDK as part of the build itself. (or in the CI files for that matter)

Shall I rename this issue "require OpenJDK version 1.8.0_60 or later to build" and let you label it as "won't fix" and close it?

njlr commented 7 years ago

Yes, that seems reasonable.

If more users encounter the issue we can consider providing a prebuilt jar.

On 11 Jun 2017, at 18:55, Anthony Lichnewsky notifications@github.com<mailto:notifications@github.com> wrote:

I can confirm that updating the java compiler to version 1.8.0_60 does indeed fix it. I would agree, there's no need to work around it in your code.

I can't see an elegant way to convey to the user that they need to upgrade OpenJDK as part of the build itself. (or in the CI files for that matter)

Shall I rename this issue "require OpenJDK version 1.8.0_60 or later to build" and let you label it as "won't fix" and close it?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/LoopPerfect/buckaroo/issues/68#issuecomment-307645548, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABgSO1ADD5CuE4ciW5TQE0iQf56QF49Aks5sDCoKgaJpZM4N2TSN.

njlr commented 7 years ago

Closing this as won't fix since it is an issue with JDK. We suggest updating to a fixed version of the JDK.


If you have come across this issue and you cannot update for whatever reason, leave a comment here and we can figure out a process for supplying a .jar.