Skip to content
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

Explorer: root folder that is a symbolic link not decorated #46536

Closed
bpasero opened this issue Mar 26, 2018 · 11 comments
Closed

Explorer: root folder that is a symbolic link not decorated #46536

bpasero opened this issue Mar 26, 2018 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code workbench-multiroot Multi-root (multiple folders) issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Mar 26, 2018

Steps to Reproduce:

  1. ln -s source target to create a link on a folder
  2. add the link as single entry to a workspace config file
  3. open that workspace
  4. restart

=> I see no link decoration for the root folder

@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

Well it is not only the symbolic link decoration but also the title of the resource.
For root resources I see the title of the target, for all other resources I see the title of the source.

It seems we are resolving roots in some other way compared to other resources.

After some investigation it seems that the issue comes from the contextService.getWorkspace().folders which gives the uri of the target not of the source.
Thus my explorer model is never aware that the root was actually link, since I get the uri resolved already here

Also assigning to @bpasero and @sandy081 since you might now if this is expected from the context service

@isidorn isidorn added the workbench-multiroot Multi-root (multiple folders) issues label Mar 26, 2018
@bpasero
Copy link
Member Author

bpasero commented Mar 26, 2018

@isidorn @sandy081 I am quite sure that we are not realpath any of the root folders. We (should) only do that when you open a single folder, but maybe that changed?

@bpasero bpasero added this to the March 2018 milestone Mar 26, 2018
@bpasero bpasero added the info-needed Issue requires more information from poster label Mar 26, 2018
@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

@bpasero well that is what I am seeing, just put a breakpoint here on startup in a multi folder workspace

@bpasero
Copy link
Member Author

bpasero commented Mar 26, 2018

@isidorn but this issue is about multi-root workspace, sorry if I did not make this clear.

=>
image

@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

@bpasero that is what I meant. I was not clear sorry. So have a workspace, in that workspace have any number of folders I am getting the realpath from the contextService for each root

@bpasero
Copy link
Member Author

bpasero commented Mar 26, 2018

@isidorn ok let me check...

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Mar 26, 2018
@bpasero
Copy link
Member Author

bpasero commented Mar 26, 2018

As discussed, you need to add the link to the file manually, not going through a picker.

@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

@bpasero good catch. The issue was that I forgot to update the explorerItem merge method to respect isSymbolicLink

@bpasero
Copy link
Member Author

bpasero commented Mar 26, 2018

@isidorn there still seems to be a case where this does not work:

before

@bpasero bpasero reopened this Mar 26, 2018
@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

@bpasero the issue with that corner case is timing.
I first get the event that workspaceRoots changes, the decorations update, and only then is the fileStat actually merged and I have data that it is a symbolicLink.

A proper fix would be for the DecorationProvider to also listen on whenever a file gets resolved to update decorations. Feels like overkill.
A hack is to react on workspace folder change event with a timeout.

I do not like both solutions so to the backlog. Open for suggestions

@isidorn isidorn modified the milestones: March 2018, Backlog Mar 26, 2018
@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Sep 20, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 20, 2018

This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

@vscodebot vscodebot bot closed this as completed Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

3 participants