forked from spinframework/spin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
factors: Fix derive macro in rust-analyzer
Rust analyzer doesn't like `include!`s that reach outside of a crate's own OUT_DIR: rust-lang/rust-analyzer#17040 Fix this by requiring any crate that wants expanded output (in tests) to have a build script that sets a magic env var. Signed-off-by: Lann Martin <[email protected]>
- Loading branch information
Showing
6 changed files
with
32 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main() { | ||
println!("cargo::rerun-if-changed=build.rs"); | ||
// Enable spin-factors-derive to emit expanded macro output. | ||
let out_dir = std::env::var("OUT_DIR").unwrap(); | ||
println!("cargo:rustc-env=SPIN_FACTORS_DERIVE_EXPAND_DIR={out_dir}"); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters