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

Decide how to set the publisher field for extensions #5268

Closed
jennybc opened this issue Nov 4, 2024 · 3 comments
Closed

Decide how to set the publisher field for extensions #5268

jennybc opened this issue Nov 4, 2024 · 3 comments
Assignees
Labels
area: core Issues related to Core category.

Comments

@jennybc
Copy link
Member

jennybc commented Nov 4, 2024

I'm talking about this, e.g.:

"publisher": "vscode",

A possibly incomplete list of technical implications:

  • An extension can register a URI handler, which is something I'm implementing for positron-r, starting with (Start to) handle cli hyperlinks in the terminal used for pkg dev tasks #5231. An extension can only handle URIs addressed to it, which means they must start like so:

    {product-name}://{publisher}.{extension.name}
    

    In (Start to) handle cli hyperlinks in the terminal used for pkg dev tasks #5231, I've made positron the publisher of positron-r. That's not written in stone, but I'm quite sure it should not be vscode. For "normal" (meaning: not built-in) extensions, this really is a publisher in the marketplace sense and, when such a URI is activated, it leads to activation and/or installation of said extension.

  • If we offer a way for folks to launch Positron without any non-built-in extensions, similar to --disable-extensions, you could imagine the publisher field possibly being relevant.

  • Unknown unknowns: what happens if we switch all of "our" (for some definition of "our", see below) extensions to have positron or posit as the publisher? Literally, what happens with our tests?

More questions:

  • What should the publisher be? positron? posit?
    • The Shiny-related extensions are published by Posit in both the VS Code Marketplace and in the OpenVSX Registry, so I suspect it would be confusing to use posit for extensions, like positron-r, that are built-in.
  • Which extensions should we change publisher for? The positron-* extensions seem like a clear yes, although positron-python is a special duck. Anything else?

Docs on publishing, which include a wee bit on the significance of the publisher field (though not much relevant to our case):

https://code.visualstudio.com/api/working-with-extensions/publishing-extension

@juliasilge juliasilge added the area: core Issues related to Core category. label Nov 6, 2024
@jennybc
Copy link
Member Author

jennybc commented Nov 6, 2024

Seem like another relevant doc: https://docs.npmjs.com/cli/v7/configuring-npm/package-json

@posit-dev posit-dev deleted a comment from jennybc Nov 12, 2024
@jmcphers
Copy link
Collaborator

Triage:

  • we can use posit for extensions we publish to the Marketplace and positron for extensions that are built-in (positron-r, positron-python, etc.)

@jmcphers jmcphers added this to the 2025.01.0 Pre-Release milestone Nov 12, 2024
@juliasilge juliasilge self-assigned this Dec 3, 2024
juliasilge added a commit that referenced this issue Dec 4, 2024
Addresses #5268

After experimenting with this, I believe we should _only_ update the
publisher on extensions that we ourselves truly did make, not ones that
we forked and made changes to. As an example, the Black formatter (which
we bundle) depends on the `ms-python.python` extension ID; if we change
our Python extension to be `positron.python` then we can no longer
bundle the Black formatter.

### QA Notes

Most importantly, there should be no errors as the app comes up about
extensions being activated, and both R and Python runtimes should start.

There are more implications for changing this publisher in the long term
as outlined in #5268, but to confirm we have successfully updated it,
you can look for some of the builtin extensions in the Extensions tab
and see that they say they have the "positron" publisher:

![Screenshot 2024-12-03 at 5 27
04 PM](https://github.com/user-attachments/assets/05d98dc5-de39-43c6-a0f4-987e659000cf)

---------

Signed-off-by: Julia Silge <[email protected]>
Co-authored-by: Jonathan <[email protected]>
@testlabauto
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2025.01.0-26
OS Version          : OSX

Test scenario(s)

No issues starting up R & Python.

Image

Link(s) to TestRail test cases run or created:

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: core Issues related to Core category.
Projects
None yet
Development

No branches or pull requests

4 participants