Repository navigation
Conversation
2410fe3 to
91b4749
Compare
|
As discussed on Discord, let's land this change and the actual compatibility behavior together and leave this as a draft for now. |
91b4749 to
cfce964
Compare
|
I've based #7620 on this and some work on my fork to see how one would use this for such a breaking change. It seems especially tough to do this for syntax related changes, because most of the lower level API in typst-syntax has no pre-existing context objects to attach this information to. It would also have to be tied to For anything between parsing and export a comemo-cached function using a However, for syntax changes like string interpolation this is a little tougher, the main breaking point seems to be |
|
I think the current plan is to introduce the compatibility behavior in |
|
I'm fine with landing this on its own, I'll mark it as ready and you guys can decide what you prefer. If you make the parsing more lenient in some other way let me know and/or close this one so I can rebase the rest of the work on that. |
cfce964 to
d401841
Compare
|
I think I arrived at a design that works quite well, but I'll need some more time to test it properly since I didn't write the string interpolation MVP with the ability to toggle it on and off in mind. As of now, I went with a new method on Putting it on |
c309602 to
65f3679
Compare
|
Discussed this with @saecki. While there are some benefits to having 0.15 series compilers already recognize this syntax, I don't think it's too important as there are good alternatives (e.g. linting people to prefer |
|
Great, means I'm in no hurry! |
89f1d07 to
73b29f8
Compare
45aa1c4 to
fb2db90
Compare
51abf22 to
20bb614
Compare
20bb614 to
83ac6f2
Compare
83ac6f2 to
59da928
Compare
The preferred compiler version set within a `typst.toml` manifest file applies to every file in the root this manifest is contained in. This preferred version can then be used to opt into limited backwards compatiblity guarantees. For example, a future version of typst may introduce custom types, which require dedicated syntax like a `type` keyword. To avoid making every old version of a package break instantly and forcing the whole ecosystem to migrate effectively at once, the compatibilty feature could retain the old parsing behavior in packages. This allows projects and packages to target new typst version without requiring updates to their dependencies immedately.
59da928 to
7b1b742
Compare
While this has currently no effect, it allows packages to already set a preferred compiler version before any breaking changes are introduced. This is integral for initial adoption of the compatibility feature, as introducing it with the breaking change would constitute a chicken and egg problem.
Consider a package targeting Typst 0.14, if Typst introduced a breaking change and the new manifest format in 0.15, then the package could not set the preferred compiler version to 0.14 without breaking itself for 0.14 also.
This would make it effectively a 0.15.0 targeting package without being able to use the new feature.