Repository: lucy-clownfish Updated Branches: refs/heads/0.6 c39c5df6a -> 3849665e7
Kludge file location from Caller(). The behavior of Caller() is not guaranteed, and sometimes contains artifacts of optimization. Work around its unpredictability by adding another case. Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8456e7c9 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8456e7c9 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8456e7c9 Branch: refs/heads/0.6 Commit: 8456e7c972a1f8ff71805c13654e403979225cd0 Parents: c39c5df Author: Marvin Humphrey <mar...@rectangular.com> Authored: Wed Feb 14 18:57:18 2018 -0800 Committer: Marvin Humphrey <mar...@rectangular.com> Committed: Wed Feb 14 19:00:47 2018 -0800 ---------------------------------------------------------------------- compiler/go/build.go | 3 +++ runtime/go/build.go | 3 +++ 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8456e7c9/compiler/go/build.go ---------------------------------------------------------------------- diff --git a/compiler/go/build.go b/compiler/go/build.go index 80612f5..14ee90a 100644 --- a/compiler/go/build.go +++ b/compiler/go/build.go @@ -41,6 +41,9 @@ var cfIncludeDir string func init() { _, buildGO, _, _ = runtime.Caller(1) + if buildGO == "<autogenerated>" { + _, buildGO, _, _ = runtime.Caller(0) + } buildDir = path.Dir(buildGO) configGO = path.Join(buildDir, "cfc", "config.go") http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8456e7c9/runtime/go/build.go ---------------------------------------------------------------------- diff --git a/runtime/go/build.go b/runtime/go/build.go index 6990749..0df28ae 100644 --- a/runtime/go/build.go +++ b/runtime/go/build.go @@ -44,6 +44,9 @@ var installedLibPath string func init() { _, buildGO, _, _ = runtime.Caller(1) + if buildGO == "<autogenerated>" { + _, buildGO, _, _ = runtime.Caller(0) + } buildDir = path.Dir(buildGO) configGO = path.Join(buildDir, "clownfish", "config.go") cfbindGO = path.Join(buildDir, "clownfish", "cfbind.go")