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

Symbol.IsPrivateToFile when symbol is not in signature file #14274

Merged
merged 3 commits into from
Nov 10, 2022

Conversation

0101
Copy link
Contributor

@0101 0101 commented Nov 9, 2022

This updates Symbol.IsPrivateToFile for FSharpMemberOrFunctionOrValue to be true when it's defined in a file that has a backing signature file but the symbol itself is not in the signature file - therefore cannot be used outside its file.

This affects 2 things:

Renaming

This makes renaming such symbol fast because we don't have to look at all the other files in the solution to perform the rename. (At least in VS where we look at this value, other editors might do something different.)

Unused detection

If such symbol is unused it will be correctly marked as unused, where previously it wouldn't be. Because of this we might need to put this under a feature flag (?)


The PR also contains updates to SyntheticProject generation to make it more convenient to use.

@0101 0101 changed the title [WIP] Rename fixes Symbol.IsPrivateToFile when symbol is not in signature file Nov 9, 2022
@0101 0101 marked this pull request as ready for review November 9, 2022 15:06
@0101 0101 requested a review from a team as a code owner November 9, 2022 15:06
@0101 0101 requested a review from vzarytovskii November 9, 2022 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants