microsoft / microsoft/vscode-cpptools

Native test needed for unhandled symlink scenario

Open
#11,707 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

internal Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Opening this issue to track an internal work item, to add a test for the scenario of opening the same file via multiple symlinks, on Linux and Mac.

The underlying issue is that we resolve symlinks when canonicalizing paths on Linux and Mac (a result of calling realpath), so wind up considering those paths to refer to the same file, while VS Code does not resolve them to the same file. This causes some issues with various features that need to match file paths back to VS Code URI's.

We have/had a test (invalid_open_file_instance_winonly) which exercised the same error handling, but that test was based on varying URI casing and not symlinks. It's no longer a valid scenario as VS Code has since ensured their URI casings on Windows are consistent/canonical.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the existing invalid_open_file_instance_winonly test and its surrounding native tests. Use that test as the starting point for covering the same error handling with one file opened through multiple symlinks on Linux and macOS; done means the scenario is exercised on both platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.