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

Fixing Rename Refactorings #1

Merged

Conversation

dantleech
Copy link

@dantleech dantleech commented Apr 13, 2024

  • Rename WorkspaceRenameEdits => WorkspaceOperations
  • Removes dead variable
  • Use merge to accumulate changes to the operations
  • Only convert once
  • Use IteratorAggregate instead of extending ArrayIterator

and finally makes the unit of operation the LocatedTextDocumentEdits and not the LocatedTextDocumentEditsMap

- Rename WorkspaceRenameEdits => WorkspaceOperations
- Removes dead variable
- Use `merge` to accumulate changes to the operations
- Only convert once
- Use IteratorAggregate instead of extending ArrayIterator
...i.e. LocatedTextDocuemntEdits maps to the LSP TextDocumentEdits
@przepompownia
Copy link
Owner

Looks fine at first glance but I get incomplete response (without text edits), for example

{
  documentChanges = { {
      kind = "rename",
      newUri = "file:///tmp/phpactor-dirty/lib/Name/Phpactor2.php",
      oldUri = "file:///tmp/phpactor-dirty/lib/Phpactor.php"
    } }
}

and haven't check why yet.

Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
@dantleech
Copy link
Author

feel free to merge and change :)

Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
@przepompownia przepompownia merged commit 0077bb6 into przepompownia:fix-will-rename Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants