Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
7c63ac83
Unverified
Commit
7c63ac83
authored
Oct 11, 2021
by
Bernhard Schuster
Committed by
GitHub
Oct 11, 2021
Browse files
overseer: simplify debugging some more (#4053)
* overseer: simplify debugging some more * chore: undo gitignore change
parent
70ccebc4
Pipeline
#161596
passed with stages
in 42 minutes and 18 seconds
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
node/overseer/overseer-gen/proc-macro/build.rs
0 → 100644
View file @
7c63ac83
/// A dummy build script, so `OUT_DIR` is set.
fn
main
()
{}
node/overseer/overseer-gen/proc-macro/src/lib.rs
View file @
7c63ac83
...
...
@@ -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
)
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment