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

Document how to fix "compiled for target 1.7" error #40

Open
manuel-mauky opened this issue Sep 30, 2016 · 1 comment
Open

Document how to fix "compiled for target 1.7" error #40

manuel-mauky opened this issue Sep 30, 2016 · 1 comment

Comments

@manuel-mauky
Copy link

When running a small build script like this:

plugins {
    id "org.frege-lang" version "0.8"
}

apply plugin: "java"

dependencies {
    compile "org.frege-lang:frege:3.22.367-g2737683"
    compile "org.frege-lang:fregefx:0.3.1"
}

I get compile errors like this:

E <PATH>/examples/fregefx/src/main/frege/example/fregefx/HelloFrege.fr:7: cannot import fregefx.JavaFxUtils
    compiled for target  1.7 (without lambda support)
    when the current target  1.8 has lambda support
    Try to use compiler option -target 1.7
example.fregefx.HelloFrege: build failed because of compilation errors.

While the error somehow points out what's wrong, I had a hard time finding out how to solve this issue. It seems that there are other users too that have the same error, see Frege/frege#275.

To fix this I've changed my build file like this:

plugins {
    id "org.frege-lang" version "0.8"
}

apply plugin: "java"

compileFrege {
    target = 1.7
}
compileTestFrege {
    target = 1.7
}

dependencies {
    compile "org.frege-lang:frege:3.22.367-g2737683"
    compile "org.frege-lang:fregefx:0.3.1"
}

To lower the hurdle for new users it would be super if this would be documented in the README file.

@Dierk
Copy link
Member

Dierk commented Oct 1, 2016

True.

It is a bit of a temporary issue as long as we have the Java 7/8 split but we can certainly improve here.

Cheers
Dierk

sent from:mobile

Am 30.09.2016 um 15:20 schrieb Manuel Mauky [email protected]:

When running a small build script like this:

plugins {
id "org.frege-lang" version "0.8"
}

apply plugin: "java"

dependencies {
compile "org.frege-lang:frege:3.22.367-g2737683"
compile "org.frege-lang:fregefx:0.3.1"
}
I get compile errors like this:

E /examples/fregefx/src/main/frege/example/fregefx/HelloFrege.fr:7: cannot import fregefx.JavaFxUtils
compiled for target 1.7 (without lambda support)
when the current target 1.8 has lambda support
Try to use compiler option -target 1.7
example.fregefx.HelloFrege: build failed because of compilation errors.
While the error somehow points out what's wrong, I had a hard time finding out how to solve this issue. It seems that there are other users too that have the same error, see Frege/frege#275.

To fix this I've changed my build file like this:

plugins {
id "org.frege-lang" version "0.8"
}

apply plugin: "java"

compileFrege {
target = 1.7
}
compileTestFrege {
target = 1.7
}

dependencies {
compile "org.frege-lang:frege:3.22.367-g2737683"
compile "org.frege-lang:fregefx:0.3.1"
}
To lower the hurdle for new users it would be super if this would be documented in the README file.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants