microsoft / microsoft/p4vfs

P4VFS and Windows System for Linux Compatibility

Open
#31 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
308
Forks
20
Avg merge
14h 56m
Merged PRs (30d)
1

Description

I have used P4VFS on Windows to sync to the latest version of my project (p4vfs sync ...#head). However, I'm using VSCode running under WSL2/Ubuntu-20.04 to edit files. When I try to access the files using VSCode or Ubuntu command line, then I only see zeros in the file:

If I use a native Windows program to read the file, then I can see the actual contents of the file in WSL...

$ od -tx1 SourceCode.cc
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0213720 00 00 00 00 00 00 00 00 00 00 00
0213733

$ /mnt/c/windows/system32/cmd.exe <<< "type sourceCode.cc" &> /dev/null
$ od -tx1 SourceCode.cc
0000000  2f  2f  20  24  49  64  3a  20  ...
...
0213720  53  74  61  74  65  3b  0a  7d  0a 
0213733

Is it possible to make this run seamlessly under WSL? (i.e. without the need to use a windows native program to trigger P4VFS)?

Note: (I had previously opened this up under Discussion, but think it is more suited to an issue)

Contributor guide

No contributing guide indexed for this repository

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

Start by reproducing the issue with p4vfs sync ...#head under WSL2/Ubuntu-20.04, then compare od -tx1 SourceCode.cc before and after triggering access with /mnt/c/windows/system32/cmd.exe. Done means WSL command-line and VSCode reads show the actual file contents without requiring a native Windows program.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ubuntu, vscode
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.