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

URI "output:extension-output-hashicorp.terraform-%231" is not valid #744

Closed
2 tasks done
ToniCipriani opened this issue Aug 26, 2021 · 3 comments · Fixed by #771
Closed
2 tasks done

URI "output:extension-output-hashicorp.terraform-%231" is not valid #744

ToniCipriani opened this issue Aug 26, 2021 · 3 comments · Fixed by #771
Labels
bug Something isn't working

Comments

@ToniCipriani
Copy link

Versions

This bug is reproducible in:

  • the latest version of the extension (below)
  • the latest version of the language server (below)

Extension

Released on
2/12/2016, 03:31:09
Last updated
7/22/2021, 10:24:21
Identifier
hashicorp.terraform

Language Server

Output too large, see attached

terraform-ls-debug.out.tar.gz

VS Code

Version: 1.59.1
Commit: 3866c3553be8b268c8a7f8c0482c0c0177aa8bfa
Date: 2021-08-19T11:53:52.479Z (1 wk ago)
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Darwin x64 19.6.0

Operating System

OS X Catalina 10.15.7
Darwin (redacted) 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 22 19:49:55 PDT 2021; root:xnu-6153.141.35~1/RELEASE_X86_64 x86_64

Terraform Version

Terraform v0.15.3
on darwin_amd64

Steps To Reproduce

@radeksimko
Copy link
Member

Just found the root cause. It appears that VS Code consideres Output panes as active text editor areas too microsoft/vscode#58869

Which means that if you click/focus on the Output pane and then either the background command runs, or you execute any command yourself (formatting, init, ...) with that pane in focus then we receive URI for that pane, instead of the actual editor tab.

We just need to find a better (more reliable and accurate) way of obtaining the relevant/open file or directory URI...

@radeksimko
Copy link
Member

I think the best way forward would be looping over window.visibleTextEditors and looking for an editor which has viewColumn == Active https://code.visualstudio.com/api/references/vscode-api#ViewColumn and relatedly use vscode.window.onDidChangeVisibleTextEditors callback instead of onDidChangeActiveTextEditor.

I will work on a patch.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants