rstudio / rstudio/bslib

Incorrect bs_base_colors() error messages

Open
#409 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
569
Forks
72
Avg merge
1d 2h
Merged PRs (30d)
5

Description

I think these error messages should be swapped.

bslib:::bs_base_colors(bslib::bs_theme(), bg = "white")
Error in bslib:::bs_base_colors(bslib::bs_theme(), bg = "white") : 
  Cannot specify fg without bg.
bslib:::bs_base_colors(bslib::bs_theme(), fg = "white")
Error in bslib:::bs_base_colors(bslib::bs_theme(), fg = "white") : 
  Cannot specify bg without fg.
Session Info

- Session info --------------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 4.1.1 (2021-08-10)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_Netherlands.1252    
 ctype    English_Netherlands.1252    
 tz       Europe/Berlin               
 date     2021-12-15                  
  • Packages ------------------------------------------------------------------------------------------------------------------------------------------
    package * version date lib source
    bslib 0.3.1.9000 2021-12-15 [1] Github (rstudio/bslib@888fbe0)
    cachem 1.0.6 2021-08-19 [1] CRAN (R 4.1.2)
    callr 3.7.0 2021-04-20 [1] CRAN (R 4.1.0)
    cli 3.0.0 2021-06-30 [1] CRAN (R 4.1.0)
    crayon 1.4.1 2021-02-08 [1] CRAN (R 4.1.0)
    curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.0)
    desc 1.3.0 2021-03-05 [1] CRAN (R 4.1.0)
    devtools 2.4.2 2021-06-07 [1] CRAN (R 4.1.0)
    digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.2)
    ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.0)
    fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.0)
    fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.2)
    glue 1.4.2 2020-08-27 [1] CRAN (R 4.1.0)
    htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.2)
    jquerylib 0.1.4 2021-04-26 [1] CRAN (R 4.1.0)
    jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.1.0)
    lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.1.0)
    magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.0)
    memoise 2.0.1 2021-11-26 [1] CRAN (R 4.1.2)
    pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 4.1.0)
    pkgload 1.2.1 2021-04-06 [1] CRAN (R 4.1.0)
    prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.1.0)
    processx 3.5.2 2021-04-30 [1] CRAN (R 4.1.0)
    ps 1.6.0 2021-02-28 [1] CRAN (R 4.1.0)
    purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.0)
    R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.1)
    remotes 2.4.0 2021-06-02 [1] CRAN (R 4.1.0)
    rlang 0.4.12 2021-10-18 [1] CRAN (R 4.1.2)
    rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.1.0)
    rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.0)
    sass 0.4.0 2021-05-12 [1] CRAN (R 4.1.0)
    sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.1.0)
    testthat 3.0.4 2021-07-01 [1] CRAN (R 4.1.0)
    usethis 2.0.1 2021-02-10 [1] CRAN (R 4.1.0)
    withr 2.4.2 2021-04-18 [1] CRAN (R 4.1.0)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two bs_base_colors() calls shown in the issue, then locate the implementation of that entry point and inspect how the missing fg and bg arguments are reported. Done means the two error messages correctly identify the omitted argument and regression coverage verifies both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.