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

use_version()-like function to sync package version between R and rust crate #304

Open
JosiahParry opened this issue Aug 6, 2023 · 4 comments

Comments

@JosiahParry
Copy link
Contributor

The default package version for an R package using usethis is 0.0.0.9000 and the default package version for the rust source library is 0.1.0. Maintaining versioning between the source and the R package can be easy to forget. It would be great if there was an rextendr function that could modify the Rust crate version along with the R package version. It could use tomleditR and usethis.

@eitsupi
Copy link
Contributor

eitsupi commented Aug 7, 2023

Related to #228

@JosiahParry
Copy link
Contributor Author

Thanks! Re:

"I think rextendr should not modify other than then extedr-wrappers.R. Cargo.toml is supposed to be edited by the package author, so trying to modify it might cause unexpected results."

When I use use_version() from {usethis} I am knowingly invoking the function and doing it manually. As long as this isn't part of some automated process such as document(), I don't think it would be invasive.

@eitsupi
Copy link
Contributor

eitsupi commented Aug 7, 2023

Probably better to leave the updating of Cargo.toml to something like cargo-release than to implement this in R.
https://github.com/crate-ci/cargo-release

@JosiahParry
Copy link
Contributor Author

Perhaps, if we do not want to conflict with usethis, the function could be something like sync_crate_version() which could take the version in the DESCRIPTION file and use it in the Cargo.toml.

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 a pull request may close this issue.

2 participants