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

Old project name present in Project Outline after project was renamed #3836

Open
Zingam opened this issue Jun 16, 2024 · 3 comments
Open

Old project name present in Project Outline after project was renamed #3836

Zingam opened this issue Jun 16, 2024 · 3 comments
Labels
bug a bug in the product
Milestone

Comments

@Zingam
Copy link
Contributor

Zingam commented Jun 16, 2024

Type: Bug

I changed the name of my CMake project (including some additional changes). Sometime later I noticed that in the Project Outline both the new and the old project names were available.
After I restarted VSCode only the new name was present.
This seems to be a bug.

Extension version: 1.18.42
VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:01:24.262Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 7.65GB (0.71GB free)
Process Argv --crash-reporter-id c7a16f6b-33fc-42c2-aedd-68d1d1ff8687
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-24.04
OS Linux x64 5.15.153.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 0)
Memory (System) 3.72GB (2.76GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:31067544
chatpanelc:31048052
dsvsc021:30996838
bdiig495:31013172
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
pythonprt:31056678
dwnewjupyter:31046869
newcmakeconfigv2:31071590

@v-frankwang
Copy link
Collaborator

v-frankwang commented Jun 21, 2024

@Zingam @gcampbell-msft I reproduced this issue as described by the user, but after I reconfigured the project, the changes made could be displayed correctly in the project outline view, which I think should be the cache that needs to be regenerated after the changes have been made.
ENV:
ENV:
VS code version: 1.90.0
CMake Extension version: 1.18.42

Steps to reproduce:

  1. Create a folder named Test and open it with vscode.
  2. Add the CMakeLists.txt file and add the following code:
cmake_minimum_required(VERSION 3.8)
project(test)
add_executable(test main.cpp) 
  1. Add the main.cpp file and add the following code:
#include <iostream> 
      auto main() -> int { std::cout << "hello world" << std::endl; }
  1. Change the name of main.cpp to main1.cpp
  2. Open the project outline view

Actual Result:
repor

@v-frankwang v-frankwang added more info needed More info is needed from the community for us to properly triage and investigate. and removed triage labels Jun 21, 2024
@H-G-Hristov
Copy link

H-G-Hristov commented Jun 24, 2024

@v-frankwang
Please also try chaning: project(test) to something else project(test-renamed). You should get something like:

image

Please note the duplicated entries on the left. Delete Caches and Reconfigure doesn't fix it. After restarting the project:

image

@gcampbell-msft gcampbell-msft added this to the Backlog milestone Jun 25, 2024
@v-frankwang
Copy link
Collaborator

@H-G-Hristov @gcampbell-msft Based on the information provided by the user, I reproduced the issue and here are the steps to reproduce it:

repro steps:

  1. Create a folder called demos and open it with vscode.
  2. Add the CMakeLists.txt file and add the following code:
cmake_minimum_required(VERSION 3.8)
project(demo)
add_executable(demo main.cpp)
  1. Add the main.cpp file and add the following code:
#include <iostream> 
      auto main() -> int { std::cout << "hello world" << std::endl; }

4.Add the following code to the CMakeLists.txt file:

set(PROJECT_NAME "newdemo")
project(${PROJECT_NAME})
  1. Run command:"CMake:Delete Cache and Reconfigure"
  2. Click on the CMake button in the left navigation bar to observe the PROJECT OUTLINE window

Actual results:
image

videorecord:
3836

@v-frankwang v-frankwang added bug a bug in the product and removed more info needed More info is needed from the community for us to properly triage and investigate. labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product
Projects
Status: Triage Needed
Development

No branches or pull requests

4 participants