This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
zinc attempts to create a directory in /root/.zinc #113
Comments
perhaps some environment variable is still pointing at |
I can't find any such setting; either pointing to /root or with the user
name root. Further, to try to work around this, I've chmodded /root/.zinc
to 777, and I still get the failure.
…On Tue, Oct 17, 2017 at 9:15 AM, Arnout Engelen ***@***.***> wrote:
perhaps some environment variable is still pointing at /root/?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARP0siUU-gISw9PcuzFbU1hpXZXXkT0ks5stNK6gaJpZM4P8WPz>
.
|
retronym
pushed a commit
to retronym/zinc-legacy
that referenced
this issue
Nov 1, 2017
`SafeLazy` has been traditionally implemented in `zincApiInfo` because it is part of the sbt API and is accessible to all the subprojects that depend on it. Before this commit, `SafeLazy` was a runtime dependency (using reflection) of the compiler bridge. In this regard, Zinc was assuming that the sbt API was accessible at runtime and therefore invoked it to use an implementation of lazy that would remove references to the thunks once they've been forced. This was done to free memory as soon as possible since those thunks usually depend on classes of compiler internals and would not be GC'ed otherwise. However, the compiler bridge is not supposed to depend on sbt APIs since its code is compiled by the Scala compiler that the user picks in SBT. Its only dependency is the compiler interface, which is implemented in Java and compiled beforehand with javac. This commit removes the runtime dependency of the compiler bridge to the sbt API and avoids the method invocations using reflection. This was done for the following reasons: * Simplicity. It is not obvious why `SafeLazy` is invoked reflectively. See sbt/zinc#113. * Performance. Even though the JVM should make this simple use of reflection fast, there's a very small overhead of using reflection in the compiler bridge because `lzy` is (most likely) hot. The fix consists of a Java implementation of `SafeLazy` that uses the non-thread-safe lazy val implementation described [here](http://docs.scala-lang.org/sips/pending/improved-lazy-val-initialization.html). It is complemented with a proxy written in Scala that will create an indirection layer for things like by-name and strict evaluation. This implementation of lazy val assumes that `SafeLazy` will never be called asynchronously. If this is the case, it's up to the Zinc maintainer to make sure that safe publishing is implemented at the call-site or to change the implementation to avoid races and uninitialized fields.
retronym
pushed a commit
to retronym/zinc-legacy
that referenced
this issue
Nov 1, 2017
Fix typesafehub#113 and apply several other fixes
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running as a user who is certainly not the root, I have spark builds failing with:
[error] Could not create directory /root/.zinc/0.3.9/compiler-interface-2.11.8-51.0
What could cause this?
The text was updated successfully, but these errors were encountered: