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

Error duplicating functions after deleting a file #3560

Open
massarakhsh opened this issue Oct 6, 2024 · 3 comments
Open

Error duplicating functions after deleting a file #3560

massarakhsh opened this issue Oct 6, 2024 · 3 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@massarakhsh
Copy link

Type: Bug

In a go project, the function description is transferred to another file, and the source file is deleted. After that, the "Duplicate function" error is fixed before exporting the branch

Extension version: 0.42.1
VS Code version: Code 1.94.0 (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z)
OS version: Linux x64 5.15.0-122-generic
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz (8 x 3774)
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: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 1, 1, 1
Memory (System) 7.60GB (3.57GB free)
Process Argv --crash-reporter-id b7cb3dd1-70e5-4f26-b141-2ee2914d2dee
Screen Reader no
VM 0%
DESKTOP_SESSION cinnamon
XDG_CURRENT_DESKTOP X-Cinnamon
XDG_SESSION_DESKTOP cinnamon
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
0ee40948:31013168
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
flightc:31134773
wkspc-onlycs-t:31132770
nativeloc1:31134641
wkspc-ranged-t:31151552
cf971741:31144450
defaultse:31146405
iacca1:31150322
notype1cf:31151524
5fd0e150:31146321

@gopherbot gopherbot added this to the Untriaged milestone Oct 6, 2024
@sandbankdisperser
Copy link

sandbankdisperser commented Oct 19, 2024

Can confirm this bug happens.

vscode-go sees files even if they are deleted, which leads to a lot of "function already declared" errors.

Restarting vscode doesn't help, clearing edit history doesn't help, restarting gopls doesn't help.

Edit: seems deleting the build cache and restarting vscode works maybe even only restarting vscode

@firelizzard18
Copy link
Contributor

I see errors like this fairly often when switching branches in git. It may happen more/exclusively when I use the CLI to switch but I'm not sure. I'm pretty sure this is a gopls bug, not a vscode-go bug.

@findleyr
Copy link
Contributor

I don't believe this specific instance is a gopls bug, as if it were restarting gopls would fix the problem. I think VS Code is holding files open.

@sandbankdisperser when you say "deleting the build cache", can you clarify exactly what you mean? I would expect that simply restarting VS Code would fix the problem.

@findleyr findleyr added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants