{"action":"created","issue":{"url":"https://api.github.com/repos/xtext/xtext-gradle-plugin/issues/41","repository_url":"https://api.github.com/repos/xtext/xtext-gradle-plugin","labels_url":"https://api.github.com/repos/xtext/xtext-gradle-plugin/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/xtext/xtext-gradle-plugin/issues/41/comments","events_url":"https://api.github.com/repos/xtext/xtext-gradle-plugin/issues/41/events","html_url":"https://github.com/xtext/xtext-gradle-plugin/issues/41","id":132834737,"number":41,"title":"org.xtext.builder ignores changes in xtextLanguage JAR in mavenLocal() when running under Gradle daemon","user":{"login":"vorburger","id":298598,"avatar_url":"https://avatars.githubusercontent.com/u/298598?v=3","gravatar_id":"","url":"https://api.github.com/users/vorburger","html_url":"https://github.com/vorburger","followers_url":"https://api.github.com/users/vorburger/followers","following_url":"https://api.github.com/users/vorburger/following{/other_user}","gists_url":"https://api.github.com/users/vorburger/gists{/gist_id}","starred_url":"https://api.github.com/users/vorburger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vorburger/subscriptions","organizations_url":"https://api.github.com/users/vorburger/orgs","repos_url":"https://api.github.com/users/vorburger/repos","events_url":"https://api.github.com/users/vorburger/events{/privacy}","received_events_url":"https://api.github.com/users/vorburger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-10T22:28:40Z","updated_at":"2016-02-13T23:12:01Z","closed_at":"2016-02-13T23:07:12Z","body":"Hi @oehme - how is it going at Gradle? ;-) Thanks a lot for continuing to maintain xtext-gradle-plugin.\r\n\r\nUnless I'm stupid, I think there is a bug in org.xtext.builder causing it to ignore changes in xtextLanguage JARs in mavenLocal() when running under Gradle daemon - were you aware of this? I've no idea of course if this is something bad in the xtext Gradle plugin (like does it perhaps 'forget' to \"release\" some.. \"handle\" to the xtextLanguages dependencies), or an indication of a more fundamental problem in the implementation of the Gradle daemon cache.\r\n\r\nHere's how you should be able to reproduce this problem:\r\n\r\n    echo \"org.gradle.daemon=true\" >>~/.gradle/gradle.properties\r\n    git clone https://github.com/xtext/maven-xtext-example\r\n    cd maven-xtext-example/my.mavenized.herolanguage.releng\r\n    mvn install\r\n    cd ../example-project-gradle\r\n    ./gradlew test\r\n    cd ../my.mavenized.herolanguage\r\n    nano src/my/mavenized/jvmmodel/HeroLanguageJvmModelInferrer.xtend \r\n    mvn install\r\n    cd ../example-project-gradle\r\n    ./gradlew test\r\n    cat build/herolang/main/my/company/Superman.java\r\n\r\nSee what I'm trying to show - making some change to the HeroLanguageJvmModelInferrer.xtend which breaks it, say I changed `toMethod(\"hello\"` to `toMethod(\"helloXX\"`, but whatever - and the next generation should fail because there is a test for the method name, or even just look at the gen. code, but .. nope! It but doesn't - because example-project-gradle is still using the original `herolanguage` version from before the change, when running under the Gradle daemon!! Uh uh. :-( Now if you remove the `org.gradle.daemon=true` from the `~/.gradle/gradle.properties` and `./gradlew test` again, or use `./gradlew --stop` first, then it will magically fail (resp. gen. diff. new code..), because now (only) the change made to the DSL/Generator is taken into account.\r\n\r\nNote that launching it using `./gradlew --no-daemon test` does not seem to help, or not always. Using use `./gradlew --stop` sometimes. Removing remove the `org.gradle.daemon=true` from the `~/.gradle/gradle.properties` always does the trick and makes it forget however this is cached wherever. I understand these 3 options should all lead to the same, but I've observed they don't reliably - go figure.\r\n\r\nPS: I was originally using mvn 3.3.9 (probably not important), and Gradle 2.9 through the wrapper of the maven-xtext-example/example-project-gradle as seen in https://github.com/xtext/maven-xtext-example/blob/master/example-project-gradle/gradle/wrapper/gradle-wrapper.properties#L6, and org.xtext.builder\" version \"1.0.0-RC1\" as in https://github.com/xtext/maven-xtext-example/blob/master/example-project-gradle/build.gradle#L5. FTR: I'm proposing upgrading both to latest via https://github.com/xtext/maven-xtext-example/pull/37, and have retested the scenario outlined above with both, but that does not help... :-(\r\n\r\nPPS: Chapter \"6.3.7. What can go wrong with Daemon?\" on https://docs.gradle.org/current/userguide/gradle_daemon.html sounds interesting and relevant in this context - in particular \"... and third party plugins can destabilize the Daemon process through defects such as memory leaks or global state corruption.\""},"comment":{"url":"https://api.github.com/repos/xtext/xtext-gradle-plugin/issues/comments/183770283","html_url":"https://github.com/xtext/xtext-gradle-plugin/issues/41#issuecomment-183770283","issue_url":"https://api.github.com/repos/xtext/xtext-gradle-plugin/issues/41","id":183770283,"user":{"login":"oehme","id":1191797,"avatar_url":"https://avatars.githubusercontent.com/u/1191797?v=3","gravatar_id":"","url":"https://api.github.com/users/oehme","html_url":"https://github.com/oehme","followers_url":"https://api.github.com/users/oehme/followers","following_url":"https://api.github.com/users/oehme/following{/other_user}","gists_url":"https://api.github.com/users/oehme/gists{/gist_id}","starred_url":"https://api.github.com/users/oehme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oehme/subscriptions","organizations_url":"https://api.github.com/users/oehme/orgs","repos_url":"https://api.github.com/users/oehme/repos","events_url":"https://api.github.com/users/oehme/events{/privacy}","received_events_url":"https://api.github.com/users/oehme/received_events","type":"User","site_admin":false},"created_at":"2016-02-13T23:12:01Z","updated_at":"2016-02-13T23:12:01Z","body":"Thanks for pointing me at this, Michael. There is no deeper issue with the daemon. It's just me being too dumb to listen for changes in the content of the jars ;) The fix will be out as 1.0.3 shortly.\r\n\r\nIt's going great at Gradle, I'm having lots of fun and feel super productive. Being able to travel while I work is a great bonus. It feels like the right place for me :)"}}