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

Code actions break after adding new parameter #652

Open
wolfadex opened this issue Oct 20, 2021 · 2 comments
Open

Code actions break after adding new parameter #652

wolfadex opened this issue Oct 20, 2021 · 2 comments

Comments

@wolfadex
Copy link

After using the Add new parameter to '____' action once, code actions disappear.

Expected Behavior

After using Add new parameter to '____' once, you should be able to use it again.

Current Behavior

After using Add new parameter to '____' once, no more code actions are possible without restarting the language server.

Possible Solution

Uncertain

Steps to Reproduce (for bugs)

  1. Write 3 functions that depend on each other
  2. Add a new argument in the grand-child function so that you can use the Add new parameter to '____' action
  3. Add a new argument in the child function so that you can use the Add new parameter to '____' action
  4. Use the Add new parameter to '____' action in the grand-child function
  5. Attempt to use the Add new parameter to '____' action in the child function, no actions should be available

Context

I was trying to add an argument that gets passed down through 5 functions

Your Environment

  • elm-languange-client-vscode 2.3.0
  • VSCode: 1.61.2
  • Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643
  • Date: 2021-10-19T15:49:28.381Z (23 hrs ago)
  • Electron: 13.5.1
  • Chrome: 91.0.4472.164
  • Node.js: 14.16.0
  • V8: 9.1.269.39-electron.0
  • OS: Darwin x64 20.6.0

Relevant logs from after the Add new parameter to '____' action is run

[Info  - 10:29:30 AM] Changed text document, going to parse it. file:///Users/wolfgang/Development/Experiments/custom_lang/fungi-lang/src/Fungi.elm
[Info  - 10:29:30 AM] A code action was requested
[Info  - 10:29:30 AM] Folding ranges were requested
[Info  - 10:29:30 AM] Returned 12 folding ranges
[Info  - 10:29:30 AM] Document Symbols were requested
[Info  - 10:29:30 AM] A code action was requested
[Warn  - 10:29:31 AM] {"shortMessage":"Command failed with exit code 1: elm make src/Path.elm src/Cli.elm src/Fungi.elm --report json --output /dev/null","command":"elm make src/Path.elm src/Cli.elm src/Fungi.elm --report json --output /dev/null","escapedCommand":"elm make \"src/Path.elm\" \"src/Cli.elm\" \"src/Fungi.elm\" --report json --output \"/dev/null\"","exitCode":1,"stdout":"","stderr":"{\"type\":\"compile-errors\",\"errors\":[{\"path\":\"/Users/wolfgang/Development/Experiments/custom_lang/fungi-lang/src/Fungi.elm\",\"name\":\"Fungi\",\"problems\":[{\"title\":\"NAMING ERROR\",\"region\":{\"start\":{\"line\":27,\"column\":40},\"end\":{\"line\":27,\"column\":49}},\"message\":[\"I cannot find a `entryPath` variable:\\n\\n27|     Parser.loop [] (parseImportsHelper entryPath)\\n                                           \",{\"bold\":false,\"underline\":false,\"color\":\"RED\",\"string\":\"^^^^^^^^^\"},\"\\nThese names seem close though:\\n\\n    \",{\"bold\":false,\"underline\":false,\"color\":\"yellow\",\"string\":\"parsePath\"},\"\\n    \",{\"bold\":false,\"underline\":false,\"color\":\"yellow\",\"string\":\"negate\"},\"\\n    \",{\"bold\":false,\"underline\":false,\"color\":\"yellow\",\"string\":\"truncate\"},\"\\n    \",{\"bold\":false,\"underline\":false,\"color\":\"yellow\",\"string\":\"Cmd.batch\"},\"\\n\\n\",{\"bold\":false,\"underline\":true,\"color\":null,\"string\":\"Hint\"},\": Read <https://elm-lang.org/0.19.1/imports> to see how `import`\\ndeclarations work in Elm.\"]}]}]}","failed":true,"timedOut":false,"isCanceled":false,"killed":false}
@razzeee razzeee transferred this issue from elm-tooling/elm-language-client-vscode Oct 20, 2021
@razzeee
Copy link
Member

razzeee commented Oct 20, 2021

Hrm, can you build a test case, I seem to not hit it :/

@razzeee
Copy link
Member

razzeee commented Dec 28, 2021

@wolfadex friendly ping

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

2 participants