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

Fix find all references for salsa #6632

Merged
merged 7 commits into from
Jan 28, 2016

Conversation

zhengbli
Copy link
Contributor

Issue:
currently "find all reference" would return no results if called on exported properties in JavaScript file. For example:
before

After the fix:
after

@DanielRosenwasser
Copy link
Member

Where are the tests for this change?

@mhegazy
Copy link
Contributor

mhegazy commented Jan 27, 2016

looks good. please add some tests.

@zhengbli
Copy link
Contributor Author

@DanielRosenwasser @mhegazy @RyanCavanaugh any further comments?

return getSymbolOfNode(entityName.parent);
case SpecialPropertyAssignmentKind.ThisProperty:
case SpecialPropertyAssignmentKind.ModuleExports:
return getSymbolOfNode(entityName.parent.parent);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume in most cases it won't be a "specialPropertyAssignmentKind" and you will just fall through here? Can you make this clear in the code by explicitly adding a default: with just a comment to this effect, or wrapping the switch in an if(specialPropertyAssignmentKind...)?

@billti
Copy link
Member

billti commented Jan 28, 2016

Added a couple of comments. Looks 👍 to me after that.

////var t = mod./**/[|area|](10);

goTo.marker();
verify.renameLocations(false, false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a leading comment for each false

@DanielRosenwasser
Copy link
Member

There are no tests for find all refs/rename locs at declaration sites - is this because it doesn't work right now? If it does work, can you add tests?

Either way, can you rename the tests and add a numbered suffix?i.e.renameJsExports.tsbecomesrenameJsExports01.ts`). I can see us adding more tests in the future that test renames on exports within a JS file.

zhengbli added a commit that referenced this pull request Jan 28, 2016
@zhengbli zhengbli merged commit 31bf103 into microsoft:master Jan 28, 2016
@zhengbli zhengbli deleted the fixFindAllRefForSalsa branch January 28, 2016 19:44
@billti billti mentioned this pull request Feb 4, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants