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

compileFrege task doesn't execute Frege compiler #38

Open
russel opened this issue Sep 23, 2016 · 5 comments
Open

compileFrege task doesn't execute Frege compiler #38

russel opened this issue Sep 23, 2016 · 5 comments
Assignees

Comments

@russel
Copy link

russel commented Sep 23, 2016

On Debian Sid, using JDK8 from packages (or JDK9 download), with the build.gradle file:

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

apply plugin: 'application'

repositories {
  jcenter()
  mavenCentral()
}

dependencies {
  compile 'org.frege-lang:frege:3.24.+'
}

mainClassName = 'uk.org.russel.jaxlondon2016.HelloWorld'

defaultTasks 'run'

on the project that looks like:

.
├── build.gradle
├── gradle
│   └── wrapper
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
    └── main
        └── frege
            └── uk
                └── org
                    └── russel
                        └── jaxlondon2016
                            └── HelloWorld.fr

with the Frege file being:

{-|
Module : uk.org.russel.jaxlondon2016.HelloWorld
Description : The (in)famous 'Hello World' program in Haskell.
Copyright : © 2016  Russel Winder
License : GPLv3
Maintainer : [email protected]
Stability :  stable
Portability :  portable

This module contains an implementation of the 'Hello World' program first introduced to the world in
"The C Programming Language" by Brian Kernighan and Dennis Ritchie.

This is definitely Frege code and not Haskell code since we are using the Frege specific `println` function
(which is just `System.out.println` from the Java Platform) in preference to Haskell's `putStrLn`. `putStrLn`
would work equally well on Frege.
-}
module uk.org.russel.jaxlondon2016.HelloWorld where

-- | The Hello World program in Frege (Haskell)
main args = println "Hello World."

the result of an execution is:

|> ./gradlew build
:compileJava UP-TO-DATE
:compileFrege
Error: Could not find or load main class frege.compiler.Main
:compileFrege FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileFrege'.
> Process 'command '/home/users/russel/lib.Linux.x86_64/jdk-9_135/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.85 secs
@russel
Copy link
Author

russel commented Sep 25, 2016

A bit more data. I completely removed the entire Gradle cache (at the risk of downloading half the Internet again :-). I did a clean first and it downloaded lots of Frege bits and pieces including the frege jar the plugin uses. When I then asked for a build:

|> ./gradlew classes
:compileJava UP-TO-DATE
:compileFrege
Download https://jcenter.bintray.com/org/frege-lang/frege/3.24.100.1/frege-3.24.100.1.pom
Error: Could not find or load main class frege.compiler.Main
:compileFrege FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileFrege'.
> Process 'command '/home/users/russel/lib.Linux.x86_64/jdk-9_137/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4.206 secs

So although the POM for the Frege jar was downloaded, the actual jar was not. I am not sure this is manually hackable?

@russel
Copy link
Author

russel commented Sep 26, 2016

More data. Using:

dependencies {
  compile 'org.frege-lang:frege:3.23.+'
}

with JDK8 (but not JDK9 since that is never going to work) works fine. So I suspect that there is a problem with the Frege 3.24 artefact and it's POM. Everything also works if I manually download the Frege 3.24.100.1 artefact:

dependencies {
  compile files(System.properties['user.home']+ '/lib/JDK/frege.jar')
}

@Dierk
Copy link
Member

Dierk commented Sep 26, 2016

It could be that the version range "+" does not work nicely with the 100.1 scheme.

Dierk

sent from:mobile

Am 26.09.2016 um 19:44 schrieb Russel Winder [email protected]:

More data. Using:

dependencies {
compile 'org.frege-lang:frege:3.23.+'
}
with JDK8 (but not JDK9 since that is never going to work) works fine. So I suspect that there is a problem with the Frege 3.24 artefact and it's POM. Everything also works if I manually download the Frege 3.24.100.1 artefact:

dependencies {
compile files(System.properties['user.home']+ '/lib/JDK/frege.jar')
}

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

@breskeby breskeby self-assigned this Sep 26, 2016
@breskeby
Copy link
Contributor

breskeby commented Sep 26, 2016

The problem is that the packaging declaration in the pom has changed. In 3.23.422-ga05a487 the packaging is declared as bundle. In frege-3.24.100.1 the packaging in the pom is declared as pom. That means that gradle won't download any jar here. Checking the published repository it seems something went wrong as there is no jar published at https://jcenter.bintray.com/org/frege-lang/frege/3.24.100.1/

@russel
Copy link
Author

russel commented Sep 27, 2016

Seems like a 3.24.100.2 release should be able to fix everything.

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

3 participants