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

Record/keep extension source for later reuse (quarto update extension ...) #11468

Open
mcanouil opened this issue Nov 18, 2024 · 1 comment
Open
Labels
enhancement New feature or request extensions relates to Quarto extensions mechanism
Milestone

Comments

@mcanouil
Copy link
Collaborator

Currently, when installation an extension from GitHub, if the extension name does not match the repository name, it's not possible to use quarto update extension ....

The majority of extensions uses quarto-<extension name> as a repository name instead of <extension name>.
For example:

  1. Install extensions:

    quarto add mcanouil/quarto-iconify
    quarto add quarto-ext/typst-templates/poster
  2. Check the installed extensions

    quarto list extensions
    Id                         Version    Contributes        
    quarto-ext/poster          1.0.0      formats            
    mcanouil/iconify           2.1.0      shortcodes         
  3. Update the extensions

    quarto update extension quarto-ext/poster
    Extension not found in local or remote sources

This means that it's not possible to update the extension quarto-ext/poster because the repository name (directory) is typst-templates/poster and not poster.
Same goes for the extension mcanouil/iconify.

This could be solved by recording/keeping the repository name (source) somewhere.
It could be in _extension.yml under source key.

Keeping the source would allow better extension management and easier updates, e.g., quarto update extension all.

@mcanouil mcanouil added enhancement New feature or request extensions relates to Quarto extensions mechanism labels Nov 18, 2024
@cderv
Copy link
Collaborator

cderv commented Nov 18, 2024

Just a note for clarity that quarto update extension does work, but you need to know the github repo name

> quarto update extension quarto-ext/quarto-poster

and we don't record it for now and we do store the extension in org-name/ext-name, ext-name being the registered name from the metadata of the extension. This name is also the one to use inside the document to load a filter for example. filter: [quarto-ext/poster]

So we need to

  • Find where to store the source information, and maybe other information.
    We could adopt an approach similar to R package that does modify the DESCRIPTION in the installed package folder. We could write some fields in the _extension.yml with install datetime, type of extension (local zip, remote, ...) and source of the remote if so.

  • Show this information in quarto list extension indeed

  • Adapt quarto update to use the source when installed extension is used (quarto update quarto-ext/poster) and probably allow to update from source directly quarto update extension quarto-ext/typst-template/poster

Thanks a lot for the report @mcanouil !

@cderv cderv added this to the v1.7 milestone Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extensions relates to Quarto extensions mechanism
Projects
None yet
Development

No branches or pull requests

2 participants