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

Error in cli_opts[["inline"]] : subscript out of bounds if inline is enabled and glue is not installed #1760

Open
idavydov opened this issue Nov 8, 2024 · 2 comments

Comments

@idavydov
Copy link

idavydov commented Nov 8, 2024

In cases when rlang is installed but glue is not installed the following code generates an error:

rlang::local_use_cli(inline = TRUE)
url = "https://google.com"
rlang::inform("{.url {url}}")
## Error in cli_opts[["inline"]] : subscript out of bounds
sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: aarch64-apple-darwin23.2.0 (64-bit)
Running under: macOS Sonoma 14.6.1

Matrix products: default
BLAS:   /opt/homebrew/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib
LAPACK: /opt/homebrew/Cellar/r/4.3.3/lib/R/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Zurich
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.3.3 tools_4.3.3    rlang_1.1.4    renv_1.0.0
@lionel-
Copy link
Member

lionel- commented Nov 14, 2024

Just a heads up that the way I might fix this issue is by removing support for inline entirely, and possibly for local_use_cli(). These were experimental features but we have converged towards using cli directly via cli::cli_abort() and friends.

@idavydov
Copy link
Author

Thanks for the heads up. This makes sense from my perspective. Otherwise there's a risk to have inconsistent behavior depending on installed libraries.

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

No branches or pull requests

2 participants