-
Notifications
You must be signed in to change notification settings - Fork 440
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
rust-project.json
points to non-existing file
#2991
Comments
I seem to make some progress if remove all disk cache options from |
What does your BUILD file look like? I'm having a lot of issues with crates that contains srcs that are a mix between generated and non-generated, some of which are (in my case) fixed by #3040, but unsure whether that's the right fix. |
@martingms I cannot share the build file, it is part of a private repository. We have several build files. The build file that should generate the I have noticed that if I disable the local disk cache temporarily in configuration settings and then build the generated source file by calling Bazel build directly, suddenly the file is generated in the right place, as specified by rust-project.json. Afterwards I can enable the disk cache again and the generated file stays. I have tried reproducing this and I have had some success. But it takes a lot of time. Whenever I notice I have a generated
It is quite painful and should work out of the box without disabling the cache. @martingms how do you think your patch would fix that? |
Right, that sounds probably unrelated to my issue then -- I have a Generated code and |
When I run
in my Bazel/Rust project, the generated
rust-project.json
contains an entry for an code-generated crate, but the path inroot_module
of the crate entry does not exist. Removing therust_project.json
and re-running it doesn't fix it. I have tried disabling the disk_cache, but the command above still generates the wrongroot_module
.This is an example output
The file
/home/wvhulle/.cache/bazel/_bazel_wvhulle/2f024897ff0f2736b273e0e86d0d74ec/execroot/_main/bazel-out/k8-fastbuild/bin/otiv3/middleware_types/middleware_messages.lib.rs
does not exist although the target can be build without problem.I have tried to disable the disk cache completely, removing the disk cache at
~/.cache/bazel
completely and also changing the location with--disk_cache=~/.cache/bazel_disk_cache
.It seems like the wrong path is generated pointing to a non-existing location in the cache. Sometimes it suddenly works, but often it is just broken and I don't understand why.
The text was updated successfully, but these errors were encountered: