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

Types inside the renamed file are seen as duplicate #1008

Closed
tugberkugurlu opened this issue Dec 1, 2016 · 6 comments
Closed

Types inside the renamed file are seen as duplicate #1008

tugberkugurlu opened this issue Dec 1, 2016 · 6 comments

Comments

@tugberkugurlu
Copy link

tugberkugurlu commented Dec 1, 2016

Environment data

dotnet --info output:

 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64

VS Code version:

Version 1.7.2 (1.7.2)
7ba55c5860b152d999dda59393ca3ebeb1b5c85f

C# Extension version:

1.5.3

Steps to reproduce

Load a project, rename a file which has a class in it.

Expected behavior

Should work as it has been before.

Actual behavior

It doesn't unload the type inside the deleted file and see the type inside new file as a duplicate:

image

@matthamil
Copy link

This is the same bug in #785 and #803

@tugberkugurlu
Copy link
Author

In addition to this one, there is also another bug which is related to file delete. If you delete a file, the members inside that file still seems valid (e.g. shows up on IntelliSense list, etc.). Should I open a separate issue for this?

@matthamil
Copy link

matthamil commented Jan 1, 2017

@tugberkugurlu I'm able to recreate that bug too. I think it's related. The Intellisense seems to not update its knowledge of the current project when any existing files are renamed or deleted; however, it works fine when you're adding new files that didn't previously exist. Hoping this gets fixed, it's been a reported issue since September (#785).

@filipw
Copy link
Contributor

filipw commented Jan 27, 2017

The problem is that at the moment, upon rename, the Workspace only raises a DocumentAdded event for the renamed doc, but never raises DocumentRemoved for the old one.

If you continue renaming 10 times, you end up with 10 copies of the same document in the workspace.

@DustinCampbell
Copy link
Member

Yeah, we need to fix that.

@DustinCampbell
Copy link
Member

OK. We're going to use #785 to track fixing this issue.

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

No branches or pull requests

4 participants