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

vscode.Uri.joinPath is not a function #8752

Closed
RomanNikitenko opened this issue Nov 13, 2020 · 8 comments
Closed

vscode.Uri.joinPath is not a function #8752

RomanNikitenko opened this issue Nov 13, 2020 · 8 comments
Assignees
Labels
bug bugs found in the application plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility

Comments

@RomanNikitenko
Copy link
Contributor

Bug Description:

I got the error in the browser console at using for Theia project VS Code test extension with the following code:

vscode.Uri.joinPath(folder.uri, defaultFile);

The same extension works well for VS Code.

Steps to Reproduce:

  1. Clone https:/RomanNikitenko/vscode-test-extension.git
  2. Build the extension using yarn and copy it to theia/plugins folder.
  3. Start Theia and open Theia project as a workspace folder - it's required to have some files for testing.
  4. F1 => run Test 'vscode.Uri.joinPath'

The command for testing should just display a notification with info about path to package.json file.
Please see the source code here

It works well for VS Code. But it doesn't work for Theia - you can see an exception in the browser console.

joinPath_error

The same command in VS Code:
joinPath_vscode

Additional Information

  • Operating System: Fedora-31
  • Theia Version: 476c8df
@RomanNikitenko RomanNikitenko added the vscode issues related to VSCode compatibility label Nov 13, 2020
@PEZ
Copy link

PEZ commented Dec 21, 2020

I'm also running into this. Effectively stops my extension from working. Is it supposed to work?

@danarad05
Copy link
Contributor

@RomanNikitenko @vince-fugnitto @amiramw

Seems like for the support of joinPath (and the other uri Utils functions added in latest vscode version) - we need to upgrade @theia/monaco-editor-core to vscode [email protected] version. #8691 also exists in that matter.

Current version is 0.20.x:
image

VS Code standalone/0.21.x contains joinPath function:
https:/microsoft/vscode/blob/standalone/0.21.x/src/vs/base/common/uri.ts

VS Code standalone/0.20.x does not contain joinPath function:
https:/microsoft/vscode/blob/standalone/0.20.x/src/vs/base/common/uri.ts

@kittaakos
Copy link
Contributor

Closed via #9199.

@vince-fugnitto
Copy link
Member

Closed via #9199.

@kittaakos it was reverted #9222 😄

@ghost
Copy link

ghost commented Apr 8, 2021

The golang.Go extension is not working due to this error. Any workarounds, so far? Thanks!

@vince-fugnitto
Copy link
Member

The golang.Go extension is not working due to this error. Any workarounds, so far? Thanks!

@danielfireman-ifal the only workaround I would suggest until the monaco upgrade would be to use an older version of golang.go which does not use the newer vscode.Uri.joinPath function.

@ghost
Copy link

ghost commented Apr 8, 2021

In case someone ran into the same problem, adding the following snippet to your gitpod.yml does the trick:

vscode:
  extensions:
    - [email protected]

does the trick. Thanks a lot @vince-fugnitto !

@tsmaeder
Copy link
Contributor

I have a fix for this one. Please stand by....

nicosommi added a commit to nicosommi/foam that referenced this issue Apr 30, 2021
In order to work with current version of Theia IDE
[Read mode here](eclipse-theia/theia#8752)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

6 participants