typelead/gradle-eta

Application scaffold :run fails with 'Error: Could not find or load main class eta.main'

carymrobbins opened this issue · 3 comments

We get the following error when attempting to run a scaffolded project (via IntelliJ) with the gradle :run task.

Error: Could not find or load main class eta.main

This sounds like dependencies are not getting properly added.

./settings.gradle

rootProject.name = 'hahaha'

./build.gradle

plugins {
    id 'com.typelead.eta' version '0.7.2'
    id 'application'
}

group 'haha'
version '1.0-SNAPSHOT'

eta {
  version = '0.8.0b2'
  etlasVersion = '1.4.0.0'
}

dependencies {
    compile eta('base:4.8.2.0')
}

./src/main/eta/Main.hs

module Main where

main = putStrLn "hello from intellij + gradle + eta!"

I was able to reproduce this - it looks like the class path is being sent to java is not the new versioned classpath scheme we've setup.

The issue was completely different actually:

version '1.0-SNAPSHOT'

This will get translated to underlying Etlas package version 1.0-SNAPSHOT which ends up behaving weird inside of Etlas somewhere, causing the expected output file path to be invalid. I think the best naming scheme is to just parse the longest numeric + dot sequence and make that the default.

If you make it version: '1.0', it should work.

Released v0.7.3 to fix exactly this.