Skip to content

Wait for index to be updated before workspace-wide operations like rename, call hierarchy and type hierarchy #1264

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

Open
ahoppen opened this issue May 9, 2024 · 1 comment

Comments

@ahoppen
Copy link
Member

ahoppen commented May 9, 2024

It might make sense to wait for an up-to-date workspace wide index for global operations like rename, call hierarchy, or type hierarchy. The tricky part is how we communicate to the user if the task is taking longer than expected and how we make sure that the editor doesn’t cancel eg. rename because of a timeout.

rdar://127474967

@ahoppen
Copy link
Member Author

ahoppen commented Jun 4, 2024

This is actually really important because of the following scenario:

  • A module has a function foo() that gets used in downstream modules
  • Now the declaration of foo is modified to foo(x: Int = 1).
  • The USR of foo has changed but we don’t have any references in the index to the new USR because the other modules haven’t been re-indexed yet.

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

1 participant