-
-
Notifications
You must be signed in to change notification settings - Fork 859
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 typst-kit crate #4540
Add typst-kit crate #4540
Conversation
778016f
to
21a4d46
Compare
6b70d18
to
a2600d7
Compare
For the reviewers: I suggest reviewing commit by commit for simplicity. Manifest validation is left out for now, this is only relevant for the package I think, but if it is relevant to other downstream tools we can add it in post. I have added a project crate which should at some point have things like the project locking mentioned in #4452, but I left the feature out as I'm not 100% sure how to implement it in a cross-platform manner. Currently, it only contains recursive project lookup by searching for the manifest file. Regarding package downloads, I initially wanted to abstract this a little more, but it proved difficult. I think this is the feature where it's least clear what should be configurable and what shouldn't, so this can be extended later when the API surface is clearer. It will likely change once we add support for custom registries and git packages, so it's ok that it's not yet fully defined, I think. |
7921cf1
to
5aa22c6
Compare
As I said earlier on discord, utpm will need manifest validation because it will publish directly a PR on typst/packages. We don't need a big validation system, just enough to block malformed |
I think the Typst Universe specific checks don't really belong in the compiler repository. Was that the idea or are you talking about some other kind of validation? |
I was thinking of this, yeah, but there are other forms like package names being identifiers which are directly tied to how package specs are parsed. But I guess we can leave it out. |
5aa22c6
to
27f592b
Compare
27f592b
to
5d74555
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some further minor comments. Other than that, it looks good to merge.
There are some unticked boxes in the PR description. Do you still want to tackle those here? Personally, I think we can merge what's there first and proceed with the rest separately.
For project locking, I was unable to come up with anything cross-platform and safe. I left some notes on #4658 regarding those issues. Regarding manifest validation, we decided to leave this out of |
Alright, then we can merge once you've pushed. |
One review comment is left open, do you prefer getters setters for effectively public fields? |
e9a15c2
to
b241652
Compare
b241652
to
9627100
Compare
9627100
to
690d7d4
Compare
Thank you! |
This PR adds the
typst-kit
crate, which contains various default implementations of things a Typst tool may need, such as:Resolves #4452.