Skip to content

Remove dependency on rlang::ns_registry_env()#328

Merged
lionel- merged 1 commit intor-lib:mainfrom
lionel-:api-registry
Mar 31, 2026
Merged

Remove dependency on rlang::ns_registry_env()#328
lionel- merged 1 commit intor-lib:mainfrom
lionel-:api-registry

Conversation

@lionel-
Copy link
Copy Markdown
Member

@lionel- lionel- commented Mar 31, 2026

Following r-lib/rlang#1890

This is only a stopgap workaround for now. At some point we should start a larger discussion about how to make pkgload compliant with the R API.

@lionel-
Copy link
Copy Markdown
Member Author

lionel- commented Mar 31, 2026

oh what if we only removed ns_env_registry() on R > 4.6?
This would largely limit the fallout, since users are supposed to reinstall their libraries when switching to a new version of R. I'll make that change in rlang, then here.

Copy link
Copy Markdown
Member

@DavisVaughan DavisVaughan left a comment

Choose a reason for hiding this comment

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

@lionel- I dont know what you mean by fallout?

Why not just use the .Internal calls unconditionally on all platforms? What's the difference?

@DavisVaughan
Copy link
Copy Markdown
Member

Oh you mean the fallout of removing it, i.e. r-lib/rlang#1890

@DavisVaughan
Copy link
Copy Markdown
Member

@lionel- maybe you should unconditionally remove it from pkgload here so we can eventually unconditionally remove it from rlang in the future. I don't think it makes a difference whether we use .Internal or rlang::ns_registry_env for new pkgload, so to me it makes sense to just use .Internal

@lionel-
Copy link
Copy Markdown
Member Author

lionel- commented Mar 31, 2026

@DavisVaughan Good point! I reverted

@lionel- lionel- merged commit bcbbffc into r-lib:main Mar 31, 2026
24 checks passed
@lionel- lionel- deleted the api-registry branch March 31, 2026 12:48
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