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

WSL support for codespace code command #4625

Closed
wants to merge 4 commits into from

Conversation

mattKorwel
Copy link

@mattKorwel mattKorwel commented Oct 27, 2021

what

provides small documentation update to help wsl2 users get past a cli error. tangentially related to #3526

why

as a wsl2 user when i attempt to open a codespace in vscode, i get a path not found error. it wasn't obvious what the issue was... 'was xdg-open, not finding code? was it because i was running code insiders etc'. also it wasn't clear to me that xdg-open is not installed by default in wsl2.

its worth mentioning that code itself, as well as regular windows programs open fine in wsl2 with out xdg-open which is why its not needed or missed before this.

image

follow on

https://wslutiliti.es/wslu/man/wslview.html is installed in wsl2 by default and https://github.com/4U6U57/wsl-open is a popular install as well. long term i'd like to see this transparent to the end user. that said given the backlog in #3526 I think a doc update is a sufficiently low hanging fruit.

platform details

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

image

PS C:\Users\makorwel> wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)

@mattKorwel mattKorwel requested a review from a team as a code owner October 27, 2021 19:38
@mattKorwel mattKorwel requested review from vilmibm and removed request for a team October 27, 2021 19:38
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Oct 27, 2021
Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that there's a more robust solution but that this is helpful for now, thanks

The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Oct 28, 2021
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to contradict the previous approval, but I would suggest that there is a better way to go about this which wouldn't involve putting the responsibility on the user.

First of all, I do not think we should advertise WSL compatibility specifically. We advertise Windows support and we advertise Linux support; therefore WSL should be implied as a given.

Second, opening URLs and programs from gh should ideally use wslview under WSL instead of xdg-open. In the past, we've added WSL support for URLs in #1708 (although it now lives here). However, the gh cs code command does not use github.com/cli/browser package, but instead uses github.com/skratchdot/open-golang/open, which doesn't support wslview.

A proper fix would be to either submit wslview support upstream to skratchdot/open-golang or to switch opening the vscode:// URL over to the cli/browser package.

The GitHub CLI automation moved this from Needs to be merged 🎉 to Needs review 🤔 Nov 1, 2021
@mislav mislav changed the title Patch 1 WSL support for codespace code command Nov 1, 2021
@mattKorwel
Copy link
Author

mattKorwel commented Nov 5, 2021

i agree with you @mislav but i was just stopping by to be helpful. so i won't have bandwidth to go deeper. i suppose if you are saying your team wants to take this on as feature work that's great.

however, as it stands today we have a broken experience for users, with no guidance or a fix from this team. do as you wish but acknowledging something is broken and providing an intermediate work around seems to me to be a better experience than its just broken.

if you prefer to leave it broken and unacknowledged for users now go ahead and close this issue.

good luck, thanks.

@mislav
Copy link
Contributor

mislav commented Nov 9, 2021

so i won't have bandwidth to go deeper. i suppose if you are saying your team wants to take this on as feature work that's great.

No worries if you don't have time to solve this in a way that I suggested! We appreciate your bug report nevertheless and the suggestion to fix it. I've opened an issue to track this bug and will close this PR in the meantime.

@mislav mislav closed this Nov 9, 2021
auto-merge was automatically disabled November 9, 2021 19:50

Pull request was closed

The GitHub CLI automation moved this from Needs review 🤔 to Done 💤 Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

None yet

3 participants