typst / packages

Packages for Typst.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support picking latest version automatically

emilyyyylime opened this issue · comments

These would work like git tags; it could be very ergonomic to allow importing of @preview/somepkg:latest, etc.
It might be fair to limit it to just latest as a valid tag — being a special case and probably even handled automatically by typst itself — but keeping the form of allowed tags open allows for other interesting use cases in the future; perhaps some that we cannot fully consider at present day.

yeah or just get a major version like

#import "preview/pkg:1.*"

That way you are not getting major API changes and still bug fixes

I can definitely see how that's desirable in certain situations as well, but there really are times when I just want the latest and greatest from a package (likely because I'm just goofing around); and don't want to think about what the latest version is.
I guess a way to make this consistent with your suggestion is @preview/pkg:*, which; while I'm not against, does seem a little more ambiguous than latest.
Also with yours; is there any guarantee that typst will pick the latest version it knows about? To me it looks more like 'pick any matching version; I don't care'

i mean if there is a new major version of a package you can expect API changes so latest could endup breaking your build, but i can see why someone would like to just get the latest

I think good editor support for autocompleting the latest version is better. If we support this, then people will just use it all the time and we'll get lots of breakage down the road.

That sounds sensible, good editor support is always nice

Okay, I'm going to close this then.