extendr / rextendr

An R package that helps scaffolding extendr-enabled packages or compiling Rust code dynamically
https://extendr.github.io/rextendr/
Other
190 stars 28 forks source link

Add a new (experimental) function `write_license_note` #271

Closed eitsupi closed 1 year ago

eitsupi commented 1 year ago

Close #236

eitsupi commented 1 year ago

Now that the tests are working properly, I think you can merge this.

eitsupi commented 1 year ago

Ok, I think I can rewrite it in a way that does not rely on the cargo license and RcppTOML using the cargo metadata command, so I will do that tomorrow.

eitsupi commented 1 year ago

I have updated the function. It is no longer dependent on RcppTOML or cargo-license. All it needs is cargo.

There was a small difference in the snapshot due to not using cargo-license, but I don't think it is a major issue.

eitsupi commented 1 year ago

Sorry, I didn't exclude build dependencies. I will take a closer look.

eitsupi commented 1 year ago

Replacement by cargo metadata failed, it seems that cargo license is still necessary. However, by using cargo metadata, RcppTOML dependency could be removed.

Ilia-Kosenkov commented 1 year ago

Will there be any benefit to storing license info in a tibble and then mutating it rather than working over disconnected lists?

eitsupi commented 1 year ago

Thanks for the review. I updated.

Will there be any benefit to storing license info in a tibble and then mutating it rather than working over disconnected lists?

cargo-license can also output data as tsv instead of json, but I think additional packages like readr or data.table would be needed to read it on the R side. Here, I parse json and handle lists with the same structure as json, eliminating the need to depend on those packages.