Skip to content
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

Support packaging cairo-plugins #1605

Merged
merged 52 commits into from
Oct 14, 2024
Merged

Conversation

DelevoXDG
Copy link
Contributor

@DelevoXDG DelevoXDG commented Sep 18, 2024

Changes

  • Allow packaging cairo-plugins
    • Run cargo package to normalize Cargo.toml and verify rust code for proc macros
    • Skip cargo package and verification for builtin plugins
  • Pass relevant configuration options from scarb package to cargo package
  • Update manifest normalization to include normalized [cairo-plugin] section
  • Fix shared_lib_path resolution to support packages mismatched scarb / cargo name and version

Related issues

Closes #1527

- Allow package with `[cairo-plugin]` target to be packaged
- Run `cargo package` to build + normalize `Cargo.toml`
- Add normalized and original `Cargo.toml` to the package archive
- Add `get_cargo_package_name` helper to read package name from `Cargo.toml`
  - TODO: consider sharing duplicated logic in `check_corelib_version`
@DelevoXDG DelevoXDG marked this pull request as ready for review September 25, 2024 15:36
Copy link
Contributor

@maciektr maciektr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!
Some comments attached.

scarb/src/compiler/plugin/proc_macro/compilation.rs Outdated Show resolved Hide resolved
scarb/src/compiler/plugin/proc_macro/compilation.rs Outdated Show resolved Hide resolved
scarb/src/compiler/plugin/proc_macro/compilation.rs Outdated Show resolved Hide resolved
scarb/src/ops/package.rs Outdated Show resolved Hide resolved
scarb/src/compiler/plugin/proc_macro/compilation.rs Outdated Show resolved Hide resolved
scarb/src/compiler/plugin/proc_macro/compilation.rs Outdated Show resolved Hide resolved
scarb/src/compiler/plugin/proc_macro/compilation.rs Outdated Show resolved Hide resolved
scarb/src/compiler/plugin/proc_macro/compilation.rs Outdated Show resolved Hide resolved
@maciektr maciektr added this pull request to the merge queue Oct 14, 2024
Merged via the queue into main with commit d01ccee Oct 14, 2024
22 checks passed
@maciektr maciektr deleted the zdobnikau/1527-package-cairo-plugins branch October 14, 2024 16:30
github-merge-queue bot pushed a commit that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support packaging cairo-plugins in Scarb
2 participants