{"action":"reopened","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2416","labels_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2416/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2416/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2416/events","html_url":"https://github.com/ceylon/ceylon-compiler/issues/2416","id":114941996,"number":2416,"title":"File is not in the current source path","user":{"login":"lukehutch","id":811305,"avatar_url":"https://avatars.githubusercontent.com/u/811305?v=3","gravatar_id":"","url":"https://api.github.com/users/lukehutch","html_url":"https://github.com/lukehutch","followers_url":"https://api.github.com/users/lukehutch/followers","following_url":"https://api.github.com/users/lukehutch/following{/other_user}","gists_url":"https://api.github.com/users/lukehutch/gists{/gist_id}","starred_url":"https://api.github.com/users/lukehutch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukehutch/subscriptions","organizations_url":"https://api.github.com/users/lukehutch/orgs","repos_url":"https://api.github.com/users/lukehutch/repos","events_url":"https://api.github.com/users/lukehutch/events{/privacy}","received_events_url":"https://api.github.com/users/lukehutch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/labels/BUG","name":"BUG","color":"e10c02"},{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/labels/high%20priority","name":"high priority","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/milestones/10","html_url":"https://github.com/ceylon/ceylon-compiler/milestones/1.3","labels_url":"https://api.github.com/repos/ceylon/ceylon-compiler/milestones/10/labels","id":429513,"number":10,"title":"1.3","description":"","creator":{"login":"tombentley","id":879487,"avatar_url":"https://avatars.githubusercontent.com/u/879487?v=3","gravatar_id":"","url":"https://api.github.com/users/tombentley","html_url":"https://github.com/tombentley","followers_url":"https://api.github.com/users/tombentley/followers","following_url":"https://api.github.com/users/tombentley/following{/other_user}","gists_url":"https://api.github.com/users/tombentley/gists{/gist_id}","starred_url":"https://api.github.com/users/tombentley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombentley/subscriptions","organizations_url":"https://api.github.com/users/tombentley/orgs","repos_url":"https://api.github.com/users/tombentley/repos","events_url":"https://api.github.com/users/tombentley/events{/privacy}","received_events_url":"https://api.github.com/users/tombentley/received_events","type":"User","site_admin":false},"open_issues":206,"closed_issues":12,"state":"open","created_at":"2013-09-17T08:27:05Z","updated_at":"2015-11-07T01:25:17Z","due_on":null,"closed_at":null},"comments":29,"created_at":"2015-11-04T00:29:01Z","updated_at":"2015-11-07T01:25:17Z","closed_at":null,"body":"I am trying to get Ceylon working in Google's internal Blaze/Forge build system. I specify the \"--src=\" commandline parameter to point the Ceylon compiler at the source root, but get the following on launch:\r\n\r\n```\r\nAn exception has occurred in the compiler (ceylonc 1.2.0 (A Series Of Unlikely Explanations)).\r\njava.lang.RuntimeException: java/com/google/thirdparty/ceylon/helloworld/run.ceylon is not in the current source path\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.getSrcDir(LanguageCompiler.java:732)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.ceylonParse(LanguageCompiler.java:415)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.parse(LanguageCompiler.java:366)\r\n\tat com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:910)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.parseFiles(LanguageCompiler.java:511)\r\n\tat com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.compile(LanguageCompiler.java:264)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:650)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:566)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:556)\r\n\tat com.redhat.ceylon.compiler.CeylonCompileTool.run(CeylonCompileTool.java:538)\r\n\tat com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:491)\r\n\tat com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:380)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:483)\r\n\tat com.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:114)\r\n\tat com.redhat.ceylon.launcher.Launcher.run(Launcher.java:41)\r\n\tat com.redhat.ceylon.launcher.Launcher.run(Launcher.java:34)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:483)\r\n\tat com.redhat.ceylon.launcher.Bootstrap.run(Bootstrap.java:55)\r\n\tat com.redhat.ceylon.launcher.Bootstrap.main(Bootstrap.java:32)\r\nceylon compile: Fatal error: The compiler exited abnormally (4) due to a bug in\r\nthe compiler.\r\nPlease report it:\r\n[...]\r\n```\r\n\r\nThe code in the stacktrace shows:\r\n\r\nLanguageCompiler:724-734:\r\n```\r\n    // FIXME: this function is terrible, possibly refactor it with getPackage?\r\n    private File getSrcDir(File sourceFile) throws IOException {\r\n        Iterable<? extends File> prefixes = ((JavacFileManager)fileManager).getLocation(StandardLocation.SOURCE_PATH);\r\n        File srcDirFile = FileUtil.selectPath(prefixes, sourceFile.getPath());\r\n        if (srcDirFile != null) {\r\n            return srcDirFile;\r\n        } else {\r\n            // This error should have been caught by the tool chain\r\n            throw new RuntimeException(sourceFile.getPath() + \" is not in the current source path\");\r\n        }\r\n    }\r\n```\r\n\r\nLanguageCompiler:413-415:\r\n```\r\n            // FIXME: temporary solution\r\n            VirtualFile file = vfs.getFromFile(sourceFile);\r\n            VirtualFile srcDir = vfs.getFromFile(getSrcDir(sourceFile));\r\n```\r\n\r\nI don't know what is triggering the issue (I can build the code on the commandline fine, but when I try building in the Blaze/Forge sandbox, I get this error). However, it seems to indicate some sort of compiler inconsistency, and the code looks like it is going to be rewritten at some point. Any ideas as to what might be triggering this, and/or how to fix it?"}}