Repository navigation
Make :ide work on Windows nodes (v1.64.2) - #143
Merged
Merged
Conversation
The remote workspace ran POSIX commands (ls -Ap, cat, touch, mkdir -p,
test, base64 -d) in the node's session shell; on a PowerShell or cmd node
the file tree stayed empty and creating a file failed ("touch not
recognized").
On such nodes file operations now run through PowerShell with .NET file
APIs (literal paths), base64 for listings and contents (code-page safe),
chunked writes under the 32K command line, no double quotes, exit 1 with
the message on failure. Git Bash nodes keep the POSIX commands.
Windows remote paths use `/` (matching git's form); :ide takes Windows
absolute paths and shares as absolute, and keeps a drive root's slash
and a share's leading //.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
- Use Windows path rules for a Windows node's paths (tree, git, terminal, agent) whatever the client platform; keep share and drive roots intact. - Stream writes over stdin into a temporary file, then copy over the target: no truncation on failure, no size limit, one process. - Send PowerShell error messages as UTF-8 bytes. - Treat a failed exists/isDirectory probe as an error, not "missing". - Don't take a `//` path as a share on a POSIX node. - ClientRuntime.execute/executeStreaming take an optional stdin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ws saves - Git Bash: take `C:\proj` arguments and git's `C:/…` root in `/c/…` form. - Quote the gutter's git pathspec for the node's shell (cmd, PowerShell). - Windows save fills the file in place (OpenOrCreate + SetLength) instead of File.Copy over it, so Hidden files save and keep their attributes. - Run POSIX file operations under sh whatever the login shell (fish). - Decide Windows rules from the cwd/argument, not the shell family (pwsh on Linux); resolve or refuse drive-relative `C:x` paths. - Share posixQuote; derive IdeApp's root and path rules from the tree; memoize git status keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a Windows node,
:idedidn't list the directory and couldn't create files ("touch not recognized").Cause
RemoteWorkspaceran POSIX commands (ls -Ap,cat,touch,mkdir -p,test,printf | base64 -d) in the node's session shell family. On a PowerShell orcmdnode,lsisGet-ChildItem(no-Ap) andtouchdoesn't exist.Fix
cmdnode run through PowerShell (shellFamily: powershell), which every Windows has:[,]and*in names are safe)Test-Path -LiteralPathtry/catchthat exits 1 with the message on stderr/(C:/Users/u), which matches git's form so the gutter lines up.resolveRemoteIdeRoottakesD:\projand\\server\shareas absolute. A drive root keeps its slash (C:/), and a share keeps its leading//. The test caught POSIX normalization collapsing//.Tests
test/integration/ide_remote_workspace_test.dart(taggedwindows): the real workspace against a real node over a real Hub. On Windows it goes through PowerShell, elsewhere through POSIX. It covers:execin the rootIt passes locally through POSIX; CI's Windows job runs the PowerShell path.
test/unit/ide/ide_windows_test.dart: root resolution (relative, absolute, shares, drive roots, POSIX unchanged), plus script quoting, no double quotes, failure handling and chunking.Release
pubspec.yaml,lib/src/version.dart), with a CHANGELOG entry.🤖 Generated with Claude Code