mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
overseer: simplify debugging some more (#4053)
* overseer: simplify debugging some more * chore: undo gitignore change
This commit is contained in:
committed by
GitHub
parent
e017422166
commit
6ea55caa85
@@ -0,0 +1,2 @@
|
||||
/// A dummy build script, so `OUT_DIR` is set.
|
||||
fn main() {}
|
||||
@@ -98,12 +98,12 @@ pub(crate) fn impl_overseer_gen(
|
||||
additive.extend(impl_message_wrapper_enum(&info)?);
|
||||
additive.extend(impl_dispatch(&info));
|
||||
|
||||
#[cfg(feature = "expansion")]
|
||||
{
|
||||
if cfg!(feature = "expansion") {
|
||||
use std::io::Write;
|
||||
|
||||
let cwd = std::env::current_dir().unwrap();
|
||||
let path: std::path::PathBuf = cwd.join("overlord-expansion.rs");
|
||||
let out = env!("OUT_DIR");
|
||||
let out = std::path::PathBuf::from(out);
|
||||
let path = out.join("overlord-expansion.rs");
|
||||
let mut f = std::fs::OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
@@ -117,9 +117,15 @@ pub(crate) fn impl_overseer_gen(
|
||||
std::process::Command::new("rustfmt")
|
||||
.arg("--edition=2018")
|
||||
.arg(&path)
|
||||
.current_dir(cwd)
|
||||
.current_dir(out)
|
||||
.spawn()
|
||||
.expect("Running rustfmt works. qed");
|
||||
}
|
||||
|
||||
let path = path.display().to_string();
|
||||
Ok(quote! {
|
||||
include!( #path );
|
||||
})
|
||||
} else {
|
||||
Ok(additive)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user