-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Open + Clone in VS Code not properly cloning #73101
Comments
We tried this in Ubuntu today and it didn't work either. |
Let me summarize:
Did I get that correctly? |
Yes, that’s correct. |
Any update here? This flow seems completely broken, and we've been waiting for over a month @joaomoreno |
No update. Feel free to investigate and submit a PR for this. |
It doesn't work on Mac for me either... Code has to be open for clone to work. |
I am looking into this. |
@joaomoreno the problem is the class ExtensionUrlHandler registers itself as url handler upon instantiation, and it's instantiated too late. The solution is probably to instantiate it earlier, but finding the appropriate place to do this is too difficult for me. |
So who can we contact who can help out? We'd like to use this flow more, not less, and as it stands it's still broken. |
@joaomoreno, just to clearify: When we receive the request to open the url, the extension (Git) hasn't registered a handler yet. The class I linked to is supposed to buffer url requests until the extension is active. Problem is it's not registered itself yet. It's only registered upon instantiation. The instantiation happens when the class is injected (mainThreadUrls) There is probably a way to to cause early instantiation, but how and where to do it is beyond me without some guidance. |
It doesn't have to. Every |
@joaomoreno for the code you linked to to run the class has to first register itself with the urlService, which it does in the constructor (here). When the request arrives the constructor hasn't run yet. |
@joaomoreno unlikely, I do not see anything changing. Previously you would do:
and now it is:
It is now actually even called earlier than before. |
@bpasero I'm pretty sure this is what broke it. As a fix, I was forced to change |
Argh... reverted... this needs to be a service. 🤦♂️ |
@bpasero I don't think this is true at all. My singleton ctor is running well after the lifecycle I could not find a better fix than adding a |
To repro, just run:
It should show a native confirmation dialog. It currently doesn't. |
@joaomoreno as discussed, the difference from before is that services are no longer created on startup unless they are needed. A combination of this service and an early workbench contribution could work. |
Steps to Reproduce:
I have a webpage that's essentially a repository of relevant git repos, and we're adding an "open in VS Code flow". I'm linking using:
"vscode://vscode.git/clone?url=[url]"
On windows, if VS Code isn't already open, clicking this button will open VS Code, but will not successfully clone the repo. If VS Code is open, then clicking this button works properly. This works properly on a Mac.
The text was updated successfully, but these errors were encountered: