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

RE: fix: Build issues caused by importing swift-rs #225

Merged
merged 2 commits into from
Jan 5, 2025

Conversation

XMLHexagram
Copy link
Collaborator

@XMLHexagram XMLHexagram commented Jan 4, 2025

Previous #224

Summary by Sourcery

Update Swift dependency management to only build for macOS.

Build:

  • Update Cargo.toml to remove swift-rs dependency and add it as a dependency for macOS targets.
  • Update build.rs to conditionally link against swift-rs only when building for macOS.

Copy link

sourcery-ai bot commented Jan 4, 2025

Reviewer's Guide by Sourcery

This pull request resolves build issues stemming from the "swift-rs" dependency by restricting its inclusion to macOS targets. It modifies the Cargo.toml file to remove the dependency from the general and build dependencies and adds it specifically to the macOS target dependencies. The build.rs file is updated to conditionally link the Swift library when building for macOS.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Removed swift-rs dependency for all targets except macOS
  • Removed swift-rs from the general dependencies section.
  • Removed swift-rs from the build dependencies section.
  • Added swift-rs to the dependencies section for the macOS target.
  • Added swift-rs to the build dependencies section for the macOS target.
native/hub/Cargo.toml
Conditionally link Swift library on macOS
  • Added a conditional compilation block using #[cfg(target_os = "macos")] to ensure that the Swift library is only linked when building for macOS.
native/hub/build.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @XMLHexagram - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dosubot dosubot bot added the C - dependencies Pull requests that update a dependency file label Jan 4, 2025
@Losses Losses merged commit d20cf24 into Losses:master Jan 5, 2025
1 of 2 checks passed
@Losses Losses deleted the fix-build-swift-rs branch January 5, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants