-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aot macro compilation - magic script #1789
Conversation
5f885c1
to
cd18cbd
Compare
cd18cbd
to
4a68d19
Compare
@@ -75,6 +75,7 @@ pub struct ManifestMetadata { | |||
pub license_file: Option<Utf8PathBuf>, | |||
pub readme: Option<Utf8PathBuf>, | |||
pub repository: Option<String>, | |||
pub include: Option<Vec<String>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this field should be a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought that adding this single field isn't that much of a big change to make it as a separate PR, but I see your point, should i convert this to stacked PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so
1f6c2e7
to
fb66fcf
Compare
896a6e3
to
81dcccc
Compare
copy_items_to_target_dir(includes, target_dir_path)?; | ||
} | ||
|
||
execute_script(script_definition, &[], ws, target_dir_path, None)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we executing the script in target/package
?
It seems to me it should be either executed in the root dir, or if we want avoid modifying any unnecessary files there, in target/package/<name>-<version>
?
b.name("foo") | ||
.version("1.0.0") | ||
.manifest_package_extra(formatdoc! {r#" | ||
include = ["Cargo.lock", "Cargo.toml", "src"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's supposed to work that way 🤔
These files are included in the tarball by default, shouldn't we use all the files that are included in the tarball by default when running a package script?
let script_code = indoc! { r#"cargo build --release && mkdir -p ../scarb/cairo-plugin && cp target/release/libfoo.so ../scarb/cairo-plugin"#}; | ||
|
||
#[cfg(windows)] | ||
let script_code = indoc! { r#"cargo build --release && mkdir -p ../scarb/cairo-plugin && cp target/release/libfoo.dll ../scarb/cairo-plugin"#}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the users are not supposed to use relatives paths like ../scarb/cairo-plugin
or ../scarb/cairo-plugin
, and binaries should not be copied somewhere outside of the cwd tree.
The binaries imo should either:
- Be required to be placed in
target/scarb/cairo-plugin/
- Be automatically located regardless of their path and then placed in the correct directory
Replacing with #1836 |
No description provided.