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

Revert changes to Cargo files when rebuilding rust SDK #113

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Jul 9, 2024

As complement-crypto needs an earlier version of uniffi, it needs to tweak the deps at build time. Revert them afterwards.

As complement-crypto needs an earlier version of uniffi, it
needs to tweak the deps at build time. Revert them afterwards.
@kegsay kegsay requested a review from richvdh July 9, 2024 07:47
Comment on lines 48 to 50
sed -i.bak 's/uniffi =.*/uniffi = "0\.25\.3"/' Cargo.toml
sed -i.bak 's^uniffi_bindgen =.*^uniffi_bindgen = { git = "https:\/\/github.com\/mozilla\/uniffi-rs", rev = "0a03b713306d6ce3de033157fc2ce92a238c2e24" }^' Cargo.toml
sed -i.bak 's#matrix-sdk-crypto = {#matrix-sdk-crypto = {features = ["_disable-minimum-rotation-period-ms"],#' Cargo.toml
Copy link
Member

Choose a reason for hiding this comment

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

given -i.bak gives you a backup, maybe you could save the separate cp operation. You would have to combine the sed commands into one, but that should be fine?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm using -i.bak in particular for portability reasons. FreeBSD/Mac demands -i has a suffix, but GNU does not. It's not standardised at all, so I'm reluctant to rely on it for providing backups.

Copy link
Member

Choose a reason for hiding this comment

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

Surely the fact that you're successfully using it means that it must be accepted? Are you really concerned that there might be implementations of sed that accept a suffix to -i but ignore it?

Not that this really matters, it just feels odd to duplicate the backup

@kegsay kegsay merged commit 3aabfa8 into main Jul 9, 2024
4 checks passed
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.

2 participants