Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support ~, ./ and named workspace folders in cwd #4687

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

Merged
andyleejordan merged 8 commits into main from andyleejordan/untildify
Aug 9, 2023

Conversation

Copy link
Member

@andyleejordan andyleejordan commented Aug 5, 2023
edited
Loading

This makes them way less annoying. I'm ok taking a dependency on untildify as it's a very simple package, and the Python extension for VS Code also uses it. However, it must remain at v4.0.0, as the latest version, v5.0.0, is pure ESM and therefore cannot be loaded by VS Code.

https://github.com/sindresorhus/untildify/releases/tag/v5.0.0

Now also handles paths relative to a single workspace folder, or understands the name of a workspace folder in multi-root workspaces. Resolves #4557.

Copy link
Member Author

andyleejordan commented Aug 5, 2023
edited
Loading

I definitely thought we had an issue (possibly closed) for this...it's come up at least, a number of times. @JustinGrote any idea where that went?

Base automatically changed from andyleejordan/better-finding to main August 8, 2023 13:30
@andyleejordan andyleejordan force-pushed the andyleejordan/untildify branch 2 times, most recently from c5a309c to 3bb69d7 Compare August 8, 2023 22:11
@andyleejordan andyleejordan requested a review from a team as a code owner August 8, 2023 22:11
This makes them way less annoying. I'm ok taking a dependency on
untildify as it's a very simple package, and the Python extension for VS
Code also uses it. However, it must remain at v4.0.0, as the latest
version, v5.0.0, is pure ESM and therefore cannot be loaded by VS Code.
https://github.com/sindresorhus/untildify/releases/tag/v5.0.0 
So we can remove weirdly placed `validateCwdSetting` calls and instead
use it exactly when required.
This cleans up how we remember which workspace the user chose, and sets
us up to save that information not in the `cwd` setting. Refactors and
fixes `validateCwdSetting` to treat the empty string as undefined for
`cwd`.
Copy link
Collaborator

I definitely thought we had an issue (possibly closed) for this...it's come up at least, a number of times. @JustinGrote any idea where that went?

Maybe you are thinking of #3827 which was closed?

@ghost ghost added the Issue-Bug A bug to squash. label Aug 9, 2023
Copy link
Member Author

Hm, that wasn't it @JustinGrote. Maybe it was just on Discord. Anyway, this resolves #4557 now since it no longer writes the cwd to the workspace settings. For multi-root workspaces, instead a name can be set (like 'vscode-powershell' for this repo) and then that workspace folder will be used. For a single-root workspace, a relative path will be resolved to its root.

JustinGrote reacted with thumbs up emoji

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

JustinGrote and andyleejordan reacted with hooray emoji
@andyleejordan andyleejordan added this pull request to the merge queue Aug 9, 2023
Copy link
Collaborator

I'll run this one through the paces once the VSIX is built, I have a couple multi root workspaces I can test against.

andyleejordan reacted with hooray emoji

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 9, 2023
Copy link
Member Author

@JustinGrote awesome! Please do, I'll have a pre-release out soon. Main thing with multi-root workspaces is that this is only supporting putting the name of the workspace as the cwd. No relative paths to it or anything, just a choice. But it's not an absolute path any more!

@andyleejordan andyleejordan changed the title (削除) Use untildify for ~ in cwd and additionalPowerShellExes (削除ここまで) (追記) Support ~, ./ and named workspace folders in cwd (追記ここまで) Aug 9, 2023
@andyleejordan andyleejordan added this pull request to the merge queue Aug 9, 2023
Copy link
Collaborator

LGTM with multi workspace that I have, just a comment on the UX on the original issue.

@andyleejordan andyleejordan removed this pull request from the merge queue due to a manual request Aug 9, 2023
So it's not just automatic, but can be done easily (and is an
appropriate value to sync with workspace settings).
And Mocha's debugger hook-up timeout to 30 seconds. Now unit tests can
be debugged easily, and the timeout is still appropriate enough for CI.
@andyleejordan andyleejordan added this pull request to the merge queue Aug 9, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 9, 2023
@andyleejordan andyleejordan added this pull request to the merge queue Aug 9, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 9, 2023
@andyleejordan andyleejordan deleted the andyleejordan/untildify branch August 9, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@JustinGrote JustinGrote JustinGrote left review comments

@SeeminglyScience SeeminglyScience SeeminglyScience approved these changes

Labels
Area-Configuration Issue-Bug A bug to squash. Issue-Enhancement A feature request (enhancement).
Projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Allow means to avoid adding an absolute Cwd path to the workspace settings

AltStyle によって変換されたページ (->オリジナル) /