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

Depend on the patched oneshot version (#1736) #1886

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

bendk
Copy link
Contributor

@bendk bendk commented Dec 5, 2023

After trying a couple times to vendor our code into moz-central using a patch in Cargo.toml, I think this is a better solution. I'm hoping to merge this into the 0.25.x branch, release 0.25.3, and use that.

This will test our release strategy a bit. We should be able to upgrade moz-central to using 0.25.3 without changing Glean or app-services.

@bendk bendk requested a review from badboy December 5, 2023 23:40
@bendk bendk requested a review from a team as a code owner December 5, 2023 23:40
@bendk bendk changed the base branch from main to release-v0.25.x December 5, 2023 23:41
Copy link
Member

@badboy badboy left a comment

Choose a reason for hiding this comment

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

you cannot release uniffi_core to crates.io with a git dependency.
One way would be to publish a bendk-oneshot crate and depend on that.

This avoids pulling in the loom dependency.
@bendk
Copy link
Contributor Author

bendk commented Dec 6, 2023

you cannot release uniffi_core to crates.io with a git dependency.
One way would be to publish a bendk-oneshot crate and depend on that.

TIL. I named the crate oneshot-uniffi and updated Cargo.toml.

@bendk bendk requested a review from badboy December 6, 2023 14:55
@mhammond
Copy link
Member

mhammond commented Dec 6, 2023

What changes have we made to oneshot? Have we tried upstreaming them (eg, via a feature)? Someone will have to do a fair bit of sleuthing to even find the sources to the forked version, so this situation doesn't seem ideal longer term - I'm wondering what we are doing to prevent it being a long term thing?

@bendk
Copy link
Contributor Author

bendk commented Dec 6, 2023

Here's the change: bendk/oneshot@a95e9ed

The issue is that that the loom dependency is only used for the loom target, but that's still an issue for moz-central because the vendoring process brings in all dependencies for all possible target/feature combinations.

It's not a great situation, but I can't think of a better solution. Maybe the long-term solution is to wait for cargo vendor to add support for disabling certain targets (something like rust-lang/cargo#7058)

@bendk bendk merged commit 673e01f into mozilla:release-v0.25.x Dec 7, 2023
@bendk bendk deleted the patched-oneshot branch January 8, 2025 14:12
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.

3 participants