Skip to content

Some newly created variables are not shown as autocompletion suggestions subsequent piped calls #14311

Closed

Description

@olivroy

System details

RStudio Edition : Desktop
RStudio Version : 2023.12.0+369 and 2024.04+470
OS Version      : Windows
R Version       : 4.3.2

Steps to reproduce the problem

library(dplyr)
mtcars |> 
  mutate(
    mpg2 = case_when(vs > 1 ~ "xx", vs == 0 ~ "yy"),
    mpg3 = mpg,
    mpg4 = vs**2,
    mpg5 = glue::glue("{mpg}"),
    mpg6 = ifelse(vs == 0, "yes", "no"),
    mpg7 = vs,
    mpg8 = disp
  ) |> 
  filter(
    # request autocompletion here
  )

Describe the problem in detail

Only some columns show. It seems like the ones created directly after those created via a function, are not shown, but only mpg2, mpg4, mpg5, and mpg8 are shown.
image

Describe the behavior you expected

I would expect all variables to be displayed.

I came across this issue while investigating #8444, and realized it was more general and has been around for a little bit.

Related to #12501, but not exactly the same.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on Feb 22, 2024
  2. changed the title [-]Some newly created variables are not shown in subsequent calls.[/-] [+]Some newly created variables are not shown as autocompletion suggestions subsequent calls.[/+] on Feb 22, 2024
  3. changed the title [-]Some newly created variables are not shown as autocompletion suggestions subsequent calls.[/-] [+]Some newly created variables are not shown as autocompletion suggestions subsequent piped calls[/+] on Feb 22, 2024
  4. ronblum commented on Feb 22, 2024

    @ronblum
    Contributor

    Thanks @olivroy! I can reproduce this in RStudio Desktop 2024.04.0-daily+475 and at least as far back as 2022.07.2+576.

  5. added
    autocompletion
    and removed
    new
    on Feb 22, 2024
  6. added this to the Chocolate Cosmos milestone on Feb 22, 2024
  7. kevinushey commented on Feb 22, 2024

    @kevinushey
    Collaborator

    @olivroy thanks for catching that! This should be fixed up in the next daily builds.

  8. ronblum commented on Feb 26, 2024

    @ronblum
    Contributor

    Verified fixed in RStudio Desktop 2024.04.0-daily+495 on MacOS 14.3.

    Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    autocompletionbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions