Closed bpasero closed 5 years ago
Not sure. I think that service is tricking you due to its generic name: URLService. If it was called ProductProtocolHandlerService, the distinction would be more obvious.
I like to think about it as a router for product.urlProtocol
URLs within the product... while the OpenerService can handle any URL, including product.urlProtocol
URLs in which case it should just forward to the former.
I pushed the original intent of this issue.
We have a
URLService
that registers an opener withIOpenerService
to handle schemas ofproduct.urlProtocol
.I recently added changes so that each
vscode.env.openExternal()
or the related usage of theopn
module from an extension also goes through the opener service.Today we always send those things to
shell.openExternal()
, however for the case of avscode://
URL I wonder if we need to do that? It seems like a unnecessary hop that will start a VSCode instance only to send the data over.Thus, my question: should the
URLService
also handle each incoming open call from extensions if theproduct.urlProtocol
is being used? Currently I explicitly opt-out of that by checking foroptions.openExternal
and thus keeping todays behaviour.