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
userHome is not correctly used in remote environments #83213
Comments
Yeah I was looking at that too then got sidetracked by trying to decide whether RemotePathService should exist at all. @aeschli made a good point that maybe all path operations should happen in the remote. From #82739 (comment) it sounds like we are also thinking about workspaces that mix different types of remotes, which require even fancier handling. |
I added |
I acknowledge the issue, however it is a bit problemtic to change since it would make all the calls async since |
@isidorn one way out here would be to resolve the user home in the remote service and provide a sync getter which is possibly undefined. You could then use that as a hint in the label service if defined. The service could even have an event when the value is resolved for labels to resolve again (though not sure that would be really needed). |
Yes that makes sense. |
This is a duplicate, you just reopend this same issue I bleive. Thus closing |
While looking into how to support
IEnvironmentService.userHome
in web, I realized that most usages are wrong to begin with: if you are connected to a remote file system, the localuserHome
is typically not what you want. Rather,IRemoteAgentEnvironment.userHome
should be used.You can easily see this for example in quick open: type
~/.bash_profile
and it will not show you a file in remote even if this file exists in the user home on the remote.I see a bit of overlap with the recently introduced
IRemotePathService
where maybe this should be added too?Locations:
linkDetector
@isidornloadedScriptsView
@weinandopenFileHandler
@roblourensqueryBuilder
@roblourenslabelService
@isidornI think a good example of a proper use is this code from
terminalTaskSystem
:I think a more generalized solution would be something along the lines of:
The text was updated successfully, but these errors were encountered: