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

Add support for packages hosted in arbitrary repositories #4040

Open
BattleCh1cken opened this issue Apr 30, 2024 · 2 comments
Open

Add support for packages hosted in arbitrary repositories #4040

BattleCh1cken opened this issue Apr 30, 2024 · 2 comments
Labels
feature request New feature or request packages Anything related to Typst package management.

Comments

@BattleCh1cken
Copy link

Description

It would be amazing if Typst supported git packages in addition to local and preview packages. This would allow users to download unofficial packages easily without the hassle of needing to use install scripts or the like.

The syntax could look something like this:

#import "@git/battlech1cken/notebookinator:1.0.0"

This would then automatically download the package from that repository and make sure its in the correct directory, automatically excluding the files specified in the typst.toml file.

There are two major problems with this feature that I haven't really thought about yet.

  • git packages obviously can't be reviewed by Typst team, leading to possible security problems.
  • I'm not sure how the web app will handle these types of packages, because I know that network requests there should be kept to a minimum.

Use Case

Currently I maintain a library called The Notebookinator which is rather large. For this reason I doubt it will be accepted as an official package, and I've had to resort to having users install it as a local package. I've included a script which allows for automatic installation, similar to the CeTZ package.

This is less than ideal for my users who now have to go through several steps to download my library, whereas official packages are incredibly easy to acquire.

This problem only gets worse if I need to modify or use unreleased versions of other packages I depend on, users or fellow developers will need to download all of those packages locally as well.

@BattleCh1cken BattleCh1cken added the feature request New feature or request label Apr 30, 2024
@Enter-tainer
Copy link
Contributor

iirc it is not supported by design.(correct me if i'm wrong)

@istudyatuni
Copy link
Contributor

It's planned, see this message in discord's #forge channel

@laurmaedje laurmaedje added the packages Anything related to Typst package management. label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request packages Anything related to Typst package management.
Projects
None yet
Development

No branches or pull requests

4 participants