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

Error when attempting rename #14

Open
randycoulman opened this issue Dec 14, 2024 · 0 comments
Open

Error when attempting rename #14

randycoulman opened this issue Dec 14, 2024 · 0 comments

Comments

@randycoulman
Copy link

Thanks so much for this long-awaited tool! I'm going to open a few issues based on my early usage of RefactorEx, but please know that I'm extremely grateful for all of your work on this so far!

In this file from one of my open-source projects, I attempted to rename the args parameter to run on line 15.

When I hit the F2 key to start the rename, I received the error below in the RefactorEx output window in VSCode. I was still prompted for a new name, but when I entered the new name, only the two occurrences on line 15 were updated. The occurrence on line 16 was not renamed.

** (ArgumentError) errors were found at the given arguments:

  * 1st argument: not a list

    :erlang.length(nil)
    (refactorex 0.1.0) lib/refactorex/refactor/function.ex:36: Refactorex.Refactor.Function.find_definitions/1
    (refactorex 0.1.0) lib/refactorex/refactor/function/rename_function.ex:20: Refactorex.Refactor.Function.RenameFunction.can_refactor?/2
    (refactorex 0.1.0) lib/refactorex/refactor/function/rename_function.ex:2: Refactorex.Refactor.Function.RenameFunction.visit/4
    (sourceror 1.0.2) lib/sourceror/zipper.ex:452: Sourceror.Zipper.do_traverse_while/3
    (refactorex 0.1.0) lib/refactorex/refactor/function/rename_function.ex:2: Refactorex.Refactor.Function.RenameFunction.available?/2
    (refactorex 0.1.0) lib/refactorex/refactor.ex:112: anonymous fn/3 in Refactorex.Refactor.available_refactorings/3
    (elixir 1.17.2) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant