Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove crayon from dependencies #102

Closed
pawelru opened this issue Jan 25, 2023 · 4 comments
Closed

Remove crayon from dependencies #102

pawelru opened this issue Jan 25, 2023 · 4 comments
Labels

Comments

@pawelru
Copy link
Contributor

pawelru commented Jan 25, 2023

crayon package has been superseded in favour of cli. Please update the codebase accordingly.


It looks like we are using only one function from it in only one place. I would strongly suggest to consider removing this dependency at all.

@pawelru pawelru added the core label Jan 25, 2023
@nikolas-burkoff
Copy link
Contributor

nikolas-burkoff commented Feb 10, 2023

So the function is used in the chunks part of the package which will be removed when possible -> though I think we can use the internal function .ansi_strip to do the same thing https://github.com/insightsengineering/teal.code/blob/main/R/qenv-eval_code.R#L96 (that's how we do the same thing in qenv)

@donyunardi
Copy link
Contributor

Code in questions:

tags$pre(paste0(crayon::strip_style(x$message_info$msg), collapse = "\n")),
tags$label("Warnings:"),
tags$pre(paste0(crayon::strip_style(x$warning_info$msg), collapse = "\n")),
tags$label("Errors:"),
tags$pre(paste0(crayon::strip_style(x$error_info$msg), collapse = "\n"))

Acceptance Criteria

  • Remove crayon usage, update to cli functions
  • Remove crayon dependency

@donyunardi
Copy link
Contributor

crayon is only being used in chunk which is deprecated and will be removed in the next release.
We'll make sure to remove crayon on the next release.

@donyunardi
Copy link
Contributor

Decided to reopen this issue so we can handle it together with the roadmap on removing chunk codebase.

@gogonzo gogonzo closed this as completed Aug 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants