Suppose I'm writting something under a workspace (see the structure above).
The Cargo.toml in the root contains a [workspace] unit, and thus all the inner Cargo.toml file is affected.
As for the rmin-examples/R-package-demo/rext/src/rust crate, It is affected and thus may failed to compile:
$ cargo build
error: current package believes it's in a workspace when it's not:
current: /me/rmin/rmin-examples/R-package-demo/rext/src/rust/Cargo.toml
workspace: /me/rmin/Cargo.toml
this may be fixable by adding `rmin-examples/R-package-demo/rext/src/rust` to the `workspace.members` array of the manifest located at: /me/rmin/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
As it suggests, adding an empty [workspace] solve this problem, this is the reason why I open this PR.
Thank you for your pull request! Unfortunately, I don't see a clear argument, as to why ever rust-crate in an R-package must be a workspace. For that reason, I'm closing this PR.
This ensures the output dir match the one defined in Makevars.
Suppose I'm writting something under a workspace (see the structure above).
The
Cargo.toml
in the root contains a[workspace]
unit, and thus all the innerCargo.toml
file is affected.As for the
rmin-examples/R-package-demo/rext/src/rust
crate, It is affected and thus may failed to compile:As it suggests, adding an empty
[workspace]
solve this problem, this is the reason why I open this PR.