You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to set the source/base folder used by the Swatinem/rust-cache action.
Background:
I have a tauri project and all the rust code is in a folder named src-tauri
The Swatinem/rust-cache action is complaining that it cannot find a Cargo.toml file in the root folder of my repository. However, I actually have my rust source in a subfolder.
Error: The process 'C:\Users\runneradmin\.cargo\bin\cargo.exe' failed with exit code 101
at ExecState._setResult (D:\a\_actions\Swatinem\rust-cache\v2\dist\restore\index.js:9728:25)
at ExecState.CheckComplete (D:\a\_actions\Swatinem\rust-cache\v2\dist\restore\index.js:9711:18)
at ChildProcess.<anonymous> (D:\a\_actions\Swatinem\rust-cache\v2\dist\restore\index.js:9605:27)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
commandFailed: {
command: 'cargo metadata --all-features --format-version 1 --no-deps',
stderr: 'error: could not find `Cargo.toml` in `D:\\a\\my-repo\\my-repo` or any parent directory\n'
}
Is there a way to change the root folder that Swatinem/rust-cache uses?
I'm not sure if it will work, but I'm going to give this a try.
I don't get any errors, so far (just says "... Restoring cache ... No cache found."). It will take me a couple hours to get through my build and try new build to see if it finds a cache hit.
Even if this works, I might request that a new parameter/argument be added to the Swatinem/rust-cache called source_directory that defaults to "." which can be used for pointing to a subfolder. Sometimes, people use monorepos a lot and the probably don't want to have to do things like workspaces: "mono/repo/rust/sub/project/ -> mono/repo/rust/sub/project/target" to get this action to work. They'd probably prefer to simply put:
source_folder: "mono/repo/rust/sub/project/" and have any "workspaces" specified relative to that source_folder (or maybe call it "base_folder").
Thanks for listening...
The text was updated successfully, but these errors were encountered:
It would be nice to be able to set the source/base folder used by the
Swatinem/rust-cache
action.Background:
I have a tauri project and all the rust code is in a folder named
src-tauri
The
Swatinem/rust-cache
action is complaining that it cannot find aCargo.toml
file in the root folder of my repository. However, I actually have my rust source in a subfolder.Is there a way to change the root folder that
Swatinem/rust-cache
uses?I'm not sure if it will work, but I'm going to give this a try.
I don't get any errors, so far (just says "
... Restoring cache ... No cache found.
"). It will take me a couple hours to get through my build and try new build to see if it finds a cache hit.Even if this works, I might request that a new parameter/argument be added to the
Swatinem/rust-cache
calledsource_directory
that defaults to"."
which can be used for pointing to a subfolder. Sometimes, people use monorepos a lot and the probably don't want to have to do things likeworkspaces: "mono/repo/rust/sub/project/ -> mono/repo/rust/sub/project/target"
to get this action to work. They'd probably prefer to simply put:source_folder: "mono/repo/rust/sub/project/"
and have any "workspaces" specified relative to that source_folder (or maybe call it "base_folder").Thanks for listening...
The text was updated successfully, but these errors were encountered: