Skip to content

Stop sending output contents to the extension host #13736

Closed

Description

Since we are using an editor for the output, every thing that is added here is being sent over to the extension host process side. If you have an extension producing tons of output you basically put the extension host under DDOS attack both ways (extension sending to renderer, renderer sending back to extension host).

I do not see a use case for having the model of the output sent over to the extension host.

alexandrudima Johannes Rieken (@jrieken) can you see a reason why we would want this? Is there a way to prevent sending over data to the extension host?

I believe this is similar to the debug console that is using an editor too.

Isidor Nikolic (@isidorn) we should look into this for October.

Activity

  1. added
    important
    debt
    on Oct 14, 2016
  2. jrieken commented on Oct 14, 2016

    @jrieken
    Contributor

    I see the challenge but I know of extensions that make use of the output-document - like rendering links, adding decorations, etc. There are also request to enrich this, such that when creating an output channel we allow to define the language such that more language features can be enabled for this.

    In short, I am 👎 on just blocking but we should be somehow less aggressive. Tho unsure how...

  3. bpasero commented on Oct 14, 2016

    @bpasero
    ContributorAuthor

    I was not aware of extensions contributing to the output channel. If this is an area where we want to allow extensions then I agree we cannot just block it.

  4. bpasero commented on Oct 14, 2016

    @bpasero
    ContributorAuthor

    Johannes Rieken (@jrieken) I was aware of extensions that override/contribute colorization for output and my understanding is that if we stop sending output to the extension host we would still support colorization.

    If an extension wants to add more to output based on the content of output, then we need to continue sending output over but I am not sure if such an extension exists today or is planned.

  5. jrieken commented on Oct 14, 2016

    @jrieken
    Contributor

    Fair point - Artem Govorov (@ArtemGovorov) regarding #11005. Is this about colorisation or also about adding things like link detection, and other languages-features.

  6. ArtemGovorov commented on Oct 14, 2016

    @ArtemGovorov
    Contributor

    We are currently using colorisation via a language grammar and a document link provider for the output (vscode.languages.registerDocumentLinkProvider):

    vscode.languages.registerDocumentLinkProvider({language: 'wallaby-output'}, {
            provideDocumentLinks: doc => {
              ...
            }
    });

    Since the output is read-only, some of the language features are irrelevant, however some could be nice to have in the output channel, like hover provider and code lens, in order to be able to have nicely formatted rich output, not just a plain text.

  7. bpasero commented on Oct 14, 2016

    @bpasero
    ContributorAuthor

    Does this require access to the output content?

  8. ArtemGovorov commented on Oct 14, 2016

    @ArtemGovorov
    Contributor

    We do access the passed document content (not sure if that's what you're asking about though):

    vscode.languages.registerDocumentLinkProvider({language: 'wallaby-output'}, {
            provideDocumentLinks: doc => {
              const textLine = doc.lineAt(0);
              ...
            }
    });

    However, we only need to access it because of the current limitation - when using the text/x-code-output mime type, the languages and its grammar gets applied to all output channels, so we have to access the document content to make sure we are not providing the links for some other output channel.

  9. bpasero commented on Oct 17, 2016

    @bpasero
    ContributorAuthor

    Ok thanks.

  10. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debtimportant

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions