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

Never lower an R version requirement in use_data() #2083

Merged
merged 4 commits into from
Nov 20, 2024
Merged

Conversation

jennybc
Copy link
Member

@jennybc jennybc commented Nov 20, 2024

Closes #2077

@olivroy
Copy link
Contributor

olivroy commented Nov 20, 2024

@jennybc, the condition should be added in use_standalone() as well. This is the first place I encountered this

also in use_test(). if you depend on testthat 3.2.1 and call use_testthat(3), you don't want to decrease your testthat dep to 3.0.0?

@jennybc
Copy link
Member Author

jennybc commented Nov 20, 2024

@olivroy Do you remember which standalone file caused the minimum R version to be downgraded for you?

Another option I was considering is a specialized use_package() helper for R itself, i.e. splitting that out so that use_package() can just focus on normal packages. I'll explore that solution as well.

@jennybc
Copy link
Member Author

jennybc commented Nov 20, 2024

use_test() only calls use_testthat_impl() if the package doesn't use testthat yet. So that doesn't seem like it would really contribute to this problem. I'm not saying you didn't experience it with some specific set of moves, but in the main use case, I don't see the connection there.

@olivroy
Copy link
Contributor

olivroy commented Nov 20, 2024

Ok! simple repro case..

If I have in DESCRIPTION,

Imports:
  rlang (>= 1.1.4)

With dev usethis,
I call usethis::use_standalone("r-lib/rlang", "types-check"), which requires rlang 1.1.0.

It will decrease the dependency of rlang silently.

Apparently this works only in R >= 4.2
@jennybc
Copy link
Member Author

jennybc commented Nov 20, 2024

I'm just going to worry about not downgrading the required version of R. I think use_standalone() is enough of an expert-use only function that said expert can also decide not to stage other dependency changes.

@jennybc jennybc merged commit 487688b into main Nov 20, 2024
14 checks passed
@jennybc jennybc deleted the use-r-version branch November 20, 2024 22:01
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