typst-test icon indicating copy to clipboard operation
typst-test copied to clipboard

Allow more than one typst version

Open tingerrr opened this issue 1 year ago • 1 comments

There are three approaches to this problem:

  1. Provide a fixed set of typst versions which are supported per typst-test version.
    • lots of duplicated code to make rustc happy
    • will likely make typst-test watch almost impossible to implement
  2. Provide a set of dynamic libraries that can be loaded, which expose a stable ABI of some kind.
    • This locks typst test into a position where this ABI needs to be stable for multiple versions of typst itself, possibly requiring lots of work to keep up with typst unstable nature
    • dynamic linking is very hard to do correctly in rust at this moment
    • a well-thought-out API could load many versions of typst from various versions of typst test, making bug fixes independent of typst versions
  3. provide on canonical version and a fallback that simply calls a system installation as before
    • some features can simply not be provided (like watch)
    • requires either parsing the command's output or throwing it at the user without any extra formatting
    • any version of typst can possibly be supported

I am unsure which would be the best option to support more than one version at a time, perhaps a user just has to install more than one version of typst-test the same way they'd install more than one version of typst itself to test older versions.

tingerrr avatar Jul 19 '24 20:07 tingerrr