-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to have different .cache directories for different workspaces #407
Comments
@kelek I am not sure why the cache would cause a conflict. Nevertheless,
|
For 1, the issue is I don't think you can set a different environment variable that is tied to a workspace in IntelliJ. You can setup PATH variables, but it's shared across workspaces. You can set environment variables in run configs, but it doesn't apply to general pants builds/sync processes. I don't think you can set environment variables in pants.ini (only pants variables), so I'm not sure if anything can be done there to have different cache directories (i.e., different env vars) for different workspaces. For 2, it's not using coursier. |
I see. Could you elaborate a bit what kind of conflicts are you running into? |
It seems to produce a similar issue to which produces a similar stack, with the error
which I suspect is because the plugins are sharing the same ivy cache. (The same branch works fine in another workspace.) That said, I'm still not seeing what exact content in |
Ivy cache lives ~/.ivy2 by default I think. I don't remember on top of head
whether pants is able to tell ivy where to cache things. If so, you could
use similar techniques to configure it in pants.ini. if not, need to look
up ivy doc how its cache works.
…On Mon, Jul 1, 2019, 5:47 PM kelek ***@***.***> wrote:
It seems to produce a similar issue to
pantsbuild/pants#3339 <pantsbuild/pants#3339>
which produces a similar stack, with the error
Exception message: Ivy returned 1.
which I suspect is because the plugins are sharing the same ivy cache.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#407?email_source=notifications&email_token=AAERTBX3MUXF6HF2F37IGFDP5KQSZA5CNFSM4H352CJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY7XLOI#issuecomment-507475385>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAERTBWYKLRZOSYDEWG2BZLP5KQSZANCNFSM4H352CJA>
.
|
Thanks!
Only caveat was that I couldn't set it in pants.ini to
Using the absolute path seemed to make much more progress, but it still has issues that I'm looking into. Oddly enough, the error messages never show when the pants IntelliJ plugin fails (it only shows |
@kelek you could use
|
I tried that, but it had exactly the same result; the issue was resolving some internal repos. At the end of the error it mentions
but since it's running java, not pants, I'm not sure how explicitly to enable it yet.
I also noticed that despite pants.ini settings, it uses |
@kelek possibly you need to do a clean-all first, or a bump the cache key? seems like it's re-using a symlink under .pants.d/ that links back to ~/.ivy2 |
I purged the entire |
Currently if I have 2 IntelliJ workspaces that both use the Pants plugin, they both share the same ~/.cache directory, which can cause issues when syncing different workspaces to the same directory. Aside from hacking together a solution that runs IntelliJ as a different user, and piping that through to the same window session of another user (or using VNC), there doesn't seem a clean way of working around this when using multiple workspaces.
This request would simply move the .cache directory inside the workspace (if possible), rather than in the user's home directory.
The text was updated successfully, but these errors were encountered: