Skip to content

redactions of markdown quoted ` ... ` text too strong #17766

@dsyme

Description

@dsyme

These redactions are a bit rough given the things being redacted are ... quoted :) Is it really all so secret?

Replace with vscode.Uri.file path, which is the standard VSCode API for constructing a (redacted) URI from a filesystem path, and handles cross-platform path differences correctly. This is already the established pattern throughout SolutionExplorer.fs` (used at lines 514, 551, 553, 564, 1120, 1387).

The fix was identified by the issue reporter, who confirmed (redacted) vs (redacted) resolves the problem.

ionide/ionide-vscode-fsharp#2129

Body was as below, redactions file:// and file:///

{"body":"🤖 *This PR was created by Repo Assist, an automated AI assistant.*\n\n## Summary\n\nFixes #2117 — test action icons missing from the code gutter on Linux/Mac, with error logs like:\n\n```\nFailed to parse test location uri /home/...\nIf a URI does not contain an authority component, then the path cannot begin with two slash characters\n```\n\n## Root Cause\n\nIn `TestExplorer.fs`, the `toUri` function constructed file URIs using:\n\n```fsharp\nvscode.Uri.parse ($\"file:///{path}\", true)\n```\n\nOn Linux and Mac, file paths start with `/`, so this produces:\n\n```\n\"file:///\" + \"/home/user/test.fs\" = \"file:////home/user/test.fs\"\n```\n\nThat's four slashes — an invalid URI. On Windows (where paths look like `C:/Users/...`) this wasn't a problem.\n\n## Fix\n\nReplace with `vscode.Uri.file path`, which is the standard VSCode API for constructing a `file://` URI from a filesystem path, and handles cross-platform path differences correctly. This is already the established pattern throughout `SolutionExplorer.fs` (used at lines 514, 551, 553, 564, 1120, 1387).\n\nThe fix was identified by the issue reporter, who confirmed `file://` vs `file:///` resolves the problem.\n\n## Trade-offs\n\nNone — `vscode.Uri.file` is strictly more correct than the manual string interpolation approach.\n\n## Test Status\n\n⚠️ **Infrastructure limitation**: The build requires `yarn install` to fetch npm packages, which is unavailable in this environment due to network restrictions. The change is a one-line substitution of `vscode.Uri.parse ($\"file:///{path}\", true)` with `vscode.Uri.file path` — the same API that is already used throughout the codebase. The F# types are compatible and the fix matches the established pattern.","labels":["bug"],"temporary_id":"aw_pr2117","title":"Fix test location URI construction on Linux/Mac (#2117)","type":"create_pull_request","branch":"repo-assist/fix-issue-2117-test-uri-linux","patch_path":"/tmp/gh-aw/aw-repo-assist-fix-issue-2117-test-uri-linux.patch"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions