1272 Commits

Author SHA1 Message Date
Laurenz
3c6a284387 Fix race condition
Because the package directory was created immediately empty (before extraction), other Typst instances would already start using it and complain about missing `typst.toml`. The package directory must not exist until the rename takes place.

To simplify that, this commit moves the location of the temporary dir into the package subfolder so that it's a move to a direct sibling location.
2025-03-11 14:09:15 +01:00
Laurenz
401c591a84 Create Tempdir struct that cleans up on Drop
This way, we auto-clean-up in all code paths, and possibly even on panic. Makes it a bit simpler conceptually.
2025-03-11 14:08:10 +01:00
Laurenz
2464ff3e93 Style nits 2025-03-11 11:51:20 +01:00
Laurenz
82ffc61d59 Switch to fastrand to reduce dependency count
See 35c204d7c2/CHANGELOG.md (L151-L152)
2025-03-11 11:30:23 +01:00
Laurenz
a2928ed301 Make dependency on randomness optional 2025-03-11 11:29:26 +01:00
Andrew Voynov
91def23743
Rename generated name for extracted_package_dir 2025-03-06 04:55:47 +03:00
Andrew Voynov
cd2b2a0262
Place the extraction dir into the package base dir
Now the "downloads" constant isn't required.
2025-03-05 19:54:18 +03:00
Andrew Voynov
5dd70d8d2d
Fix incorrect directory being removed 2025-03-05 16:59:40 +03:00
Andrew Voynov
77632cd4bd
Swapped PID randomness for ThreadRng from rand crate 2025-03-05 01:26:12 +03:00
Andrew Voynov
0bb8093e15
docs: write an elaborate explanation 2025-03-02 13:51:15 +03:00
Andrew Voynov
2aaf8a8a9c
Fix parallel package installation
Also removes the possibility of a broken package cache state.
2025-03-02 00:30:16 +03:00
Ian Wrzesinski
cfb3b1a270
Improve clarity of ast.rs for newcomers to the codebase (#5784)
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
Co-authored-by: T0mstone <39707032+T0mstone@users.noreply.github.com>
2025-02-26 20:10:36 +00:00
Emmanuel Lesueur
52f1f53973
Fix curve with multiple non-closed components. (#5963) 2025-02-26 18:07:29 +00:00
Malo
d6b0d68ffa
Add more methods to direction (#5893) 2025-02-25 14:19:17 +00:00
Laurenz
8f039dd614
Only autocomplete methods which take self (#5824) 2025-02-25 14:10:01 +00:00
Malo
2eef9e84e1
Improve hints for show rule recursion depth (#5856) 2025-02-25 14:09:52 +00:00
evie
d11ad80dee
Add #str.normalize(form) (#5631)
Co-authored-by: +merlan #flirora <uruwi@protonmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2025-02-25 14:01:01 +00:00
Laurenz
f31c971624
Deduplicate watcher update call (#5955) 2025-02-25 12:47:41 +00:00
aodenis
acd3a5b7a5
Fix high CPU usage due to inotify watch triggering itself (#5905)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2025-02-25 12:41:54 +00:00
Laurenz
225e845021
Fix introspection of HTML root sibling metadata (#5953) 2025-02-25 11:31:15 +00:00
Sharzy
36d83c8c09
HTML export: fix elem counting on classify_output (#5910)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2025-02-24 16:35:13 +00:00
Malo
3744c99b07
Override the default math class of some characters (#5949) 2025-02-24 16:15:17 +00:00
Max
81efc82d3c
Fix math accent base height calculation (#5941) 2025-02-24 16:05:36 +00:00
Laurenz
69c3f95705
Bump MSRV to 1.83 and Rust in CI to 1.85 (#5946) 2025-02-24 12:28:01 +00:00
Laurenz
ebe2543264
Fix comparison of Func and NativeFuncData (#5943) 2025-02-24 11:17:31 +00:00
Malo
56f4fa2b4d
Documentation improvements (#5888) 2025-02-23 11:31:28 +00:00
Max
55bc5f4c94
Make math shorthands noncontinuable (#5925) 2025-02-23 11:28:24 +00:00
PgBiel
240f238eee
Fix HTML export of table with gutter (#5920) 2025-02-23 11:26:14 +00:00
Matthew Toohey
3de3813ca0
--make-deps fixes (#5873) 2025-02-18 18:04:40 +00:00
ᡥᠠᡳᡤᡳᠶᠠ ᡥᠠᠯᠠ·ᠨᡝᡴᠣ 猫
74e4f78687
HTML export: Use <code> for inline RawElem (#5884) 2025-02-18 10:16:19 +00:00
Laurenz
25c86accbb
More robust SVG auto-detection (#5878) 2025-02-17 10:56:00 +00:00
Laurenz
5fc679f3e7
Remove Linux Libertine warning (#5876) 2025-02-16 13:18:39 +00:00
Ana Gelez
19a12f379f
Lazy parsing of the package index (#5851) 2025-02-12 15:50:48 +00:00
+merlan #flirora
02cd43e27f
Gradient::repeat: Fix floating-point error in stop calculation (#5837) 2025-02-12 12:38:40 +00:00
+merlan #flirora
83ad407d3c
Update documentation for float.{to-bits, from-bits} (#5836) 2025-02-12 12:35:03 +00:00
Laurenz
a0cd89b478
Fix autocomplete and jumps in math (#5849) 2025-02-11 10:30:30 +00:00
Laurenz
89e71acecd
Respect par constructor arguments (#5842) 2025-02-10 14:37:19 +00:00
TwoF1nger
ee47cb8469
Add smart quotes for Bulgarian (#5807) 2025-02-10 10:42:16 +00:00
Malo
25e27169e1
Add warning for pdf.embed elem used with HTML (#5829) 2025-02-10 10:39:32 +00:00
PgBiel
3fba256405
Don't crash on image with zero DPI (#5835) 2025-02-10 10:39:04 +00:00
Laurenz
e4f8e57c53
Fix unnecessary import rename warning (#5828) 2025-02-06 21:10:43 +00:00
Malo
ca702c7f82
Documentation fixes and improvements (#5816) 2025-02-06 10:18:10 +00:00
Laurenz
d897ab5e7d
Autocomplete content methods (#5822) 2025-02-06 09:34:28 +00:00
Laurenz
029ae4a5ea
Export target docs (#5812)
Co-authored-by: Martin Haug <3874949+reknih@users.noreply.github.com>
2025-02-05 13:24:10 +00:00
Eric Biedert
85b0318158
Fix small copy-paste oversight (#5811) 2025-02-05 12:40:54 +00:00
Laurenz
0ea668077d
Bump codex to 0.1.0 (#5805) 2025-02-04 10:08:43 +00:00
Ryan Chua
b25cf22018
Fix typo in page documentation (#5804) 2025-02-04 09:40:10 +00:00
Laurenz
50ccd7d60f
Scope deprecations (#5798) 2025-02-04 09:38:31 +00:00
Laurenz
eee903b0f8
Refactor Scope (#5797) 2025-02-03 16:04:54 +00:00
Laurenz
12dbb012b1
Revert adding flatten-text to image (#5789) 2025-02-02 19:25:58 +00:00