-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-proc-macroArea: compiling proc-macrosArea: compiling proc-macrosC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.Status: Needs more info, such as a reproduction or more background for a feature request.
Description
Problem
Currently, crates-io will yield such error:
error: failed to verify package tarball
Caused by:
Source directory was modified by build.rs during cargo publish. Build scripts should not modify anything outside of OUT_DIR.
Added: /me/rmin/target/package/rmin-examples-0.0.1/aaa.rmin.Rust.Functions.R
But since I only have a proc-macro
and no build.rs
, the OUT_DIR
is not set. And since I need some of their output (generating R wrappers for further roxygen2 doc generation and further package loading), the output is necessary.
Is there some configuration that could make a OUT_DIR
visible for proc-macro
s?
Proposed Solution
Currently, for build.rs, it could write output to OUT_DIR
, but for proc-macro
-only crate, such option does not exists.
Another solution is that adding a [cache] section in Cargo.toml, tell Cargo what file could be written. With this configure, we may have the ability to debug proc-macros by tell them writting down all the code they generates.
Notes
No response
Metadata
Metadata
Assignees
Labels
A-proc-macroArea: compiling proc-macrosArea: compiling proc-macrosC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.Status: Needs more info, such as a reproduction or more background for a feature request.