You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a proc-macro, which loads a file from a given location to generate code.
I call it this way:
#[generate_api("tests/good_source_file/mod.rs")]
impl Lifecycle for LifecycleImpl {
Using try build the given file can't be found, because "cwd" and "CARGO_TARGET_DIR" are redirected to $DIR/target/tests/trybuild.
Is there anyway I can change that?
I don't want to hardcode a full path - the macro assumes the file's location is relative to the project's root directory.
Needless to say, outside of trybuild::TestCases::new().pass("tests/ui_tests.rs"); the file loading works.
The text was updated successfully, but these errors were encountered:
Seconding this, I need a resource adjacent to my test. I ended up using ../../../../<path/from/workspace> to access this, but this is probably not stable and is a bit gross.
I have a proc-macro, which loads a file from a given location to generate code.
I call it this way:
Using try build the given file can't be found, because "cwd" and "CARGO_TARGET_DIR" are redirected to
$DIR/target/tests/trybuild
.Is there anyway I can change that?
I don't want to hardcode a full path - the macro assumes the file's location is relative to the project's root directory.
Needless to say, outside of
trybuild::TestCases::new().pass("tests/ui_tests.rs");
the file loading works.The text was updated successfully, but these errors were encountered: