Skip to content
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

--experimental_repository_cache should allow a relative path #3516

Closed
kchodorow opened this issue Aug 7, 2017 · 20 comments
Closed

--experimental_repository_cache should allow a relative path #3516

kchodorow opened this issue Aug 7, 2017 · 20 comments
Labels
P1 I'll work on this now. (Assignee required) type: feature request

Comments

@kchodorow
Copy link
Contributor

Or at least not print a stack trace:

java.lang.IllegalArgumentException: my_cache (not an absolute path)
	at com.google.devtools.build.lib.vfs.FileSystem.getPath(FileSystem.java:146)
	at com.google.devtools.build.lib.bazel.BazelRepositoryModule.handleOptions(BazelRepositoryModule.java:189)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:511)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:314)
	at com.google.devtools.build.lib.runtime.CommandExecutor.exec(CommandExecutor.java:53)
	at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:849)
	at com.google.devtools.build.lib.server.GrpcServerImpl.access$2100(GrpcServerImpl.java:104)
	at com.google.devtools.build.lib.server.GrpcServerImpl$4$1.run(GrpcServerImpl.java:915)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
java.lang.IllegalArgumentException: my_cache (not an absolute path)
	at com.google.devtools.build.lib.vfs.FileSystem.getPath(FileSystem.java:146)
	at com.google.devtools.build.lib.bazel.BazelRepositoryModule.handleOptions(BazelRepositoryModule.java:189)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:511)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:314)
	at com.google.devtools.build.lib.runtime.CommandExecutor.exec(CommandExecutor.java:53)
	at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:849)
	at com.google.devtools.build.lib.server.GrpcServerImpl.access$2100(GrpcServerImpl.java:104)
	at com.google.devtools.build.lib.server.GrpcServerImpl$4$1.run(GrpcServerImpl.java:915)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
@kchodorow
Copy link
Contributor Author

@davido
Copy link
Contributor

davido commented Aug 8, 2017

We have a feature request to allow user specific directory: ~/.gerritcodereview/download-cache.

@ittaiz
Copy link
Member

ittaiz commented Aug 8, 2017 via email

@davido
Copy link
Contributor

davido commented Aug 8, 2017

#2054

@hlopko hlopko added category: extensibility > external repositories P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request labels Aug 9, 2017
@nevion
Copy link

nevion commented Oct 14, 2017

+1

@ensonic
Copy link
Contributor

ensonic commented Nov 2, 2017

It only it would resolve env-vars like $HOME or $PWD as a workaround.

@dslomov dslomov added P1 I'll work on this now. (Assignee required) and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Jan 10, 2018
@dslomov
Copy link
Contributor

dslomov commented Jan 10, 2018

crash is P1, feature request seems to be not that hard to implement either

@ittaiz
Copy link
Member

ittaiz commented Jan 10, 2018

@dslomov any chance this will allow ~ or $HOME?
@davido did something like this in a different CL he got in a few months ago but I think it's only relevant for his other experimental flag (I think related to local remote cache)

@davido
Copy link
Contributor

davido commented Jan 10, 2018

@ittaiz
Copy link
Member

ittaiz commented Jan 11, 2018 via email

@davido
Copy link
Contributor

davido commented Jan 11, 2018

Because reviewers pointed out, that support for HOME-directory aware paths should be generally integrated in Bazel infrastructure and not hard coded in this specific parameter.

@ittaiz
Copy link
Member

ittaiz commented Jan 11, 2018 via email

@davido
Copy link
Contributor

davido commented Jan 11, 2018

Unfortunately, I cannot work on that atm.

bazel-io pushed a commit that referenced this issue Feb 9, 2018
...and interpret them relative to the workspace directory.

Improves on #3516. In fact, fixes the original request of
supporting relative paths.

Change-Id: Ibbb6fd43179d589ad477427e47e26c773c7a04de
PiperOrigin-RevId: 185121629
@aehlig
Copy link
Contributor

aehlig commented Feb 12, 2018 via email

@ittaiz
Copy link
Member

ittaiz commented Feb 12, 2018 via email

@davido
Copy link
Contributor

davido commented Feb 12, 2018

@aehlig Yeah, there is also #3042, where a similar feature request, to provide relative class path for --experimental_local_disk_cache_path option is tracked, see my last comment.

@aehlig
Copy link
Contributor

aehlig commented Feb 12, 2018

Unfortunately bazelrc files aren’t hierarchical so one has to use one or the other

Indeed, this is yet another independent issue. Filed #4629 to keep track of it.

@aehlig
Copy link
Contributor

aehlig commented Feb 12, 2018

The actual issue is solved, and all other feature requests that came up in the discussion are tracked in separate issues. Closing.

@aehlig aehlig closed this as completed Feb 12, 2018
@ensonic
Copy link
Contributor

ensonic commented Feb 13, 2018

Which change fixes it? According to the comments in #3042 is is not fixed.

@davido
Copy link
Contributor

davido commented Feb 13, 2018

@ensonic It's not fixed yet, and this feature request is tracked in #2054. Once fixed, it should work for --experimental_repository_cache, --experimental_local_disk_cache_path and others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) type: feature request
Projects
None yet
Development

No branches or pull requests

8 participants