-
Notifications
You must be signed in to change notification settings - Fork 89
✨ Add SPDX field to the license.db #200
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I think we can proceed to task 2
On a related note did you verify that OSI information here and on SPDX match? Probably it hasn't changed but there could be some differences. Not that I expect them but it might help identify some inaccuracies.
Co-authored-by: Lluís Revilla <185338939+llrs-roche@users.noreply.github.com>
I'm not sure how the check the OSI field. SPDX has only "isOsiApproved" which is either true or false. |
Yes, that's what I meant yes is what on this file is open. But that's not important. Let's see how we do task2 that is the difficult part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second step looks very minimal. I can't test this how it works at the moment (will try to do that later today).
One thing that needs to be done before the R core accept this is document the new argument & functionality on the corresponding .Rd file. But I can do it once I test this.
src/library/tools/R/license.R
Outdated
@@ -611,6 +614,8 @@ function(x) | |||
stringsAsFactors = FALSE) | |||
} | |||
|
|||
sapply(expansions, `[[`, "SPDX") |> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some R developers try to avoid sapply
because the simplify parameter can break further steps. Not sure if it is better to use lapply
and then unlist
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the SPDX field will always be a string, we could replace it with
sapply(expansions, `[[`, "SPDX") |> | |
vapply(expansions, FUN.VALUE = character(1), FUN = function(x) {x[["SPDX"]]}) |> |
I had some troubles checking this (building R from git repo didn't work well on my machine) and then I found Kurt had already patched R. r-svn/src/library/tools/R/license.R Lines 617 to 619 in a9fcda6
Congrats on the patch! |
@ThierryO said the same in Mons. I should look into that again. My risk avoidance strategy of ... sticking with svn worked on the 'travel' laptop as it does here (and has for umpteen years) on the 'home' desktop/server. |
I got it working now (on Ubuntu 24.04) with the script below
|
@ThierryO That looks right. I have done it before too, and of course CI does it all the time. Thanks for documenting! |
Thanks for the script @ThierryO I simply created a patch file and applied to the svn repo and continued there. |
This is task 1 of r-devel/r-dev-day#84 @llrs