You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggestions from project indexing only made if the active file is saved #14051
Ah! @kevinushey I can see the files getting index (I used RSTUDIO_LOG_LEVEL=1). And your examples work splendidly for me. The issue is occurring for me only if the current file isn't saved. So for a new file (Untitled1 etc.), the only suggestions are from GitHub. As soon as the file is saved, locally-sourced suggestions are made, as well.
changed the title [-]Project indexing isn't working—suggestions from local files are only made if open[/-][+]Suggestions from project indexing only made if the active file is saved[/+]on Jan 10, 2024
Thanks for the reprex Kevin! @ronblum - I think this issue can be closed unless we think the "active file must be saved" is a regression/bug. If the active file just has to be saved 1x to start the indexing/suggestions then I think we're good.
It's not a regression—it was like this in the preview (2023.09). I think that it's a bug, or at least a nice to have, but it has a an easy workaround—save the file—so I don't think this is a high priority.
Activity
ronblum commentedon Jan 8, 2024
Try this in other comparable tools.
kevinushey commentedon Jan 10, 2024
It seems to work for me:
For posterity, I created a new project with these files:
script-1.R
script-2.R
In project options, I also made sure to enable Copilot + indexing:
Then, I closed all open documents, restarted RStudio, and then opened script-1.R.
To further verify, if I close all open documents, and then write:
to the project
.Renvironfile, then when I restart the R session, I see:and you can see in the logs that the files are indeed being indexed by Copilot.
ronblum commentedon Jan 10, 2024
Ah! @kevinushey I can see the files getting index (I used
RSTUDIO_LOG_LEVEL=1). And your examples work splendidly for me. The issue is occurring for me only if the current file isn't saved. So for a new file (Untitled1 etc.), the only suggestions are from GitHub. As soon as the file is saved, locally-sourced suggestions are made, as well.[-]Project indexing isn't working—suggestions from local files are only made if open[/-][+]Suggestions from project indexing only made if the active file is saved[/+]jthomasmock commentedon Jan 11, 2024
Thanks for the reprex Kevin! @ronblum - I think this issue can be closed unless we think the "active file must be saved" is a regression/bug. If the active file just has to be saved 1x to start the indexing/suggestions then I think we're good.
ronblum commentedon Jan 11, 2024
It's not a regression—it was like this in the preview (2023.09). I think that it's a bug, or at least a nice to have, but it has a an easy workaround—save the file—so I don't think this is a high priority.