Coder Social home page Coder Social logo

Add support to Remotes about codetour HOT 17 CLOSED

microsoft avatar microsoft commented on July 30, 2024
Add support to Remotes

from codetour.

Comments (17)

lostintangent avatar lostintangent commented on July 30, 2024

OK awesome, thanks!

from codetour.

abulka avatar abulka commented on July 30, 2024

Confirmed also in WSL - you can record steps when editing a remote SSH project in WSL (Windows Subsystem for Linux) v1 under Windows 10 but the steps won't playback.
The extensions installs itself OK on the remote, and allows you to 'record' but nothing plays back when you hit the play button on the tour, or when you double click on any individual step of the tour.
Hopefully the merge fixes this in WSL too?

from codetour.

lostintangent avatar lostintangent commented on July 30, 2024

@alefragnani Can you confirm that CodeTour is still working for you when doing container-based development? Though in your case, you didnā€™t install the extension in the container right?

@abulka Seems like we might need a new bug to track this issue. To confirm: did you install CodeTour in the WSL context or locally?

from codetour.

abulka avatar abulka commented on July 30, 2024

I installed CodeTour in the WSL context only, and encountered the playback problem.

I then switched to another, local project, installed CodeTour locally, and it worked for that local project.

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

@lostintangent ,

It's not fully working šŸ˜¢ . @abulka reported that it's not being able to playback, but in my case, I wasn't able to record (playback worked perfectly). And you are right, I didn't install in the container, I used the local installation.

Then, I tested with the other releases, and noted that it stopped working with release 0.0.8. I used the Install Another Version.. command in VS Code.

I wasn't able to check the sources/debug the extension yet, to identify exactly where is the issue (probably tomorrow I could take a look). The 0.0.8 changelog says:

  • Added the ability to associate a tour with a specific Git tag and/or commit, in order to enable it to be resilient to code changes
  • Updated the tour recorder so that tours are automatically saved upon creation, and on each step/change_

Hope this helps

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

@lostintangent ,

I could find the reason behind my scenario while trying to record tour. Itā€™s cause by the new ā€œGit tag/commit associationā€ feature.

Iā€™m not sure why, but when connected to remotes, itā€™s not being able to initialize the Git API (even being a Git repo). The code below returns null:

https://github.com/vsls-contrib/codetour/blob/d7cd6ad2822ebf9fe0cebf8c4ad55e4895c32754/src/git.ts#L32

No git api is available and when it calls promptForTourRef(), it fails silently, instead of simply returning undefined and continue the steps:

https://github.com/vsls-contrib/codetour/blob/d7cd6ad2822ebf9fe0cebf8c4ad55e4895c32754/src/commands.ts#L508

Simply adding a check for valid api instance worked, but this is not a valid solution, because the remote folder, in my case, is a Git repo:

Hope this helps

from codetour.

lostintangent avatar lostintangent commented on July 30, 2024

@alefragnani In your case, is CodeTour installed on the UI or workspace side? I'm wondering if the problem is that CodeTour is running on the UI side, whereas your code (and the git data) is running on the workspace side.

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

@lostintangent Itā€™s installed on the UI.

Iā€™m not sure the problem is related to where the extension is installed, but on how it detects vscode.git being installed. BTW, the vscode.git extension itself is correctly installed (on UI) and enabled.

from codetour.

lostintangent avatar lostintangent commented on July 30, 2024

Could you try installing CodeTour in the remote workspace? I'm curious if it would work in that context.

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

Sure I can!

When installed in the remote workspace (using devcontainer.json file) it worked.

Iā€™m using Insiders release, btw.

from codetour.

lostintangent avatar lostintangent commented on July 30, 2024

Yeah I'm not sure if vscode.extensions.getExtension works when the requesting extension is on the UI side, and the requested extension is on the remote/workspace side. CodeTour works fine locally, and it seems to work when installed in the remote workspace. But it seems like it has challenges when installed as a UI extension, and you're editing a remote workspace.

I'll check to see what the recommendation is for this.

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

Hm, do you mean the built-in extensions, like vscode.git, are automatically installed on the remote? Maybe thatā€™s why, when you look at extensionā€™s viewlet, all built-in extensions are tagged as Extension is enabled on ā€˜container-nameā€™, instead of This extension is enabled globally

from codetour.

lostintangent avatar lostintangent commented on July 30, 2024

I believe so yeah. That's why you can install CodeTour in the remote context, and it finds vscode.git, without you having had to install it.

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

It makes sense, but if thatā€™s the case, the remote development support (extensionKind tag in package.json) is not working as expected.

It is defined as [ā€œworkspaceā€, ā€œuiā€] and workspace means the extension runs on the remote machine. At least this is what I understand reading the docs.

from codetour.

lostintangent avatar lostintangent commented on July 30, 2024

That setting specifies that the extension can run in either the UI or workspace side. And the ordering indicates which one "wins" if the extension is installed in both.

That said, based on what we're discussing, it actually seems like CodeTour might need to just set this to ["workspace"], since it expects to be able to leverage Git metadata from the workspace.

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

I think you are right.

Below in the same docs page you have a better explanation, which says [ā€œworkspaceā€, ā€œuiā€] just prefers workspace but does not have any hard requirements.

Now, the extension requires Git, so a hard requirement was found šŸ˜.

from codetour.

alefragnani avatar alefragnani commented on July 30, 2024

I see one small issue about taking that direction. The extension now must be installed on every remote, no matter which kind of workspace you have (Git or not).

Some could argue that the extension itself doesn't have a hard requirement on Git, but to the Git API provided by VS Code. At least, in this case, it's exactly how it is happening. You just require another extension. You don't require a Git lib/package.

from codetour.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.