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

Update / remove usage of opts_current$set as it errors with knitr 1.44 and breaks using JuliaCall with plots #209

Open
cderv opened this issue Sep 28, 2023 · 1 comment

Comments

@cderv
Copy link

cderv commented Sep 28, 2023

Hi,

TL;DR

knitr 1.44 has a change that make JuliaCall throw an error and not work when there is plots. An update should be done so that JuliaCall does correctly call knitr internal feature.

Details

It seems you are using opts_current$set for one feature
https://github.com/Non-Contradiction/JuliaCall/blob/c05473bea78a0197c639f7e82ab1c6f2e943e1cc/R/RMarkdown.R#L56C1-L60

opts_current was always an object maint to be read-only - in knitr 1.44 it was enforce by throwing an error. This was announced in https://yihui.org/en/2023/09/knitr-1-44/

Since it seems it was in fact really used by some package author, there is a mechanism to unlock the environment and allow modification. This aims to be an escape hatch until package author can implement there feature without this opts_current$set
This is described in the blog post.

I'll try to do a PR with at least the escape hatch, but possibly it would be good later on to change the usage.

Related discussion

cderv added a commit to cderv/JuliaCall that referenced this issue Sep 28, 2023
The object is locked since 1.44 and it errors since then.

Fix JuliaInterop#209
@cderv
Copy link
Author

cderv commented Oct 11, 2023

Update on this: With next knitr 1.45, there should not be an error anymore with it as we whitelisted JuliaCall temporarily waiting for #210 to be dealt with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant