d27a895e67
refactor(lib): restructure locking mechanism to be atomic
...
Fixes a potential TOCTOU bug in the locking mechanism by restructuring
and using file moves which are atomic on both windows and unix.
FIXME: This commit introduces a bug where if there is are two concurrent
processes attempting to install a tool such that the tool has artifact
naming patterns that we understand (and hence do not need to download
every artifact for), the parent installation process (i.e., the one
which started first) yields indefinitely even after installing and
running the tool.
2025-02-05 13:57:22 +05:30
283db5df4a
fix(lib): write progress bar cleanup ANSI sequences to stderr
2025-02-05 13:31:52 +05:30
a6074b790f
chore(CHANGELOG): update entries
2025-02-05 12:33:41 +05:30
61c20b25a3
feat(lib): upgrade pathfs
and dirs
to v0.3.0
2025-02-05 12:30:00 +05:30
78577110cf
fix(lib): use expiration time units in seconds
...
`os.time()` returns a timestamp in seconds, not milliseconds, but the
expiration time was adding 60,000 assuming it was in milliseconds. This
has now been corrected to only add 60 in seconds.
2025-02-05 12:11:10 +05:30
e03f07470d
chore: update lockfiles
2025-01-29 20:08:27 +05:30
681f03ae2f
chore(CHANGELOG): update entries
2025-01-29 20:06:08 +05:30
c2a8abeda6
chore(bins): bump zap
to v0.6.17
2025-01-29 20:03:45 +05:30
50aea6d266
chore(bins): bump darklua
to v0.16.0
2025-01-29 20:03:45 +05:30
d0eb238281
chore(bins): update READMEs
2025-01-29 20:03:44 +05:30
037520c4c6
chore(bins): bump argon
to v2.0.22
2025-01-29 20:03:35 +05:30
8bf37abc6f
chore(CHANGELOG): fix typo in word 'written'
2025-01-23 13:27:25 +05:30
bee9bc8c92
chore(lib): prepare for v0.1.11
2025-01-23 13:16:25 +05:30
4478711269
chore(CHANGELOG): fix unterminated backtick on false
2025-01-22 12:35:45 +05:30
4c5601b5cd
chore(CHANGELOG): update entries
2025-01-22 12:31:29 +05:30
6342b5ca87
feat(lib): write progress bars to stderr
2025-01-22 12:25:16 +05:30
13cae3a375
feat(lib): make it possible to override interactivity state externally
...
Libraries that depend on toolchainlib can now set `_G.interactive`
manually and have that option be respected.
2025-01-22 12:16:20 +05:30
c85c895408
fix(lib): only attempt to clear current progress bar if interactive
2025-01-22 12:11:53 +05:30
f99a4f787d
chore(lib): prepare for v0.1.10
2025-01-22 12:00:11 +05:30
683d76af65
chore(lib): use non-deprecated include pattern
2025-01-22 11:57:37 +05:30
e90fc8b617
chore(pkg): use new index url
2025-01-22 11:55:28 +05:30
ae414680ca
chore(CHANGELOG): update entries
2025-01-21 22:56:07 +05:30
1ae6570d8a
refactor(lib): update installation lock related comments
2025-01-21 22:46:09 +05:30
aef778883e
feat(lib): use structured lock file with metadata
...
This allows for us to know whether a lock file is too old and hence
invalid, and perform a sanity check to ensure that the resource it is
meant to be protecting is the resource we are trying to access.
2025-01-21 22:39:07 +05:30
57605e87b8
refactor(lib): use declared tool dir and use assert
to handle nil
2025-01-21 22:19:56 +05:30
8cea7bef8a
fix(lib): fix directory checking condition for tool dir creation
2025-01-21 22:18:42 +05:30
3757ee3583
fix(lib): make installation lock be tool scoped
...
Instead of having a global installation lock be held in the tool storage
dir, it is now held on a per-tool basis within the tool's directory.
2025-01-21 22:15:56 +05:30
8c6cb1053b
chore(CHANGELOG): update entries
2025-01-21 16:35:20 +05:30
295023129f
fix(lib): hold on-disk lock for installation attempts
...
* Fixes an issue to do with multiple installation attempts trying
to access the same resources concurrently, causing installation
errors
* Made conditional progress bar a shared state among `__call` metamethod
shorthand and `installTool`, in order to prevent constructing it in
two different places
2025-01-21 16:29:09 +05:30
3a5ba527cf
chore(lib): prepare for v0.1.9
2025-01-16 08:52:35 +00:00
e6faf6c4d9
chore(CHANGELOG): update entries
2025-01-16 08:50:56 +00:00
14860284da
fix(lib): windows PE format detection offset being a u32
2025-01-16 08:48:48 +00:00
f4f05b8264
fix(lib): TypeError in extractEntry
function for zip
2025-01-16 08:48:03 +00:00
4da1e25967
chore(lib): prepare for v0.1.8
2025-01-16 07:48:34 +00:00
86f40d601b
chore(CHANGELOG): update entries
2025-01-16 07:44:56 +00:00
2d50daa2c6
chore(bins): bump blink
to v0.15.2
2025-01-16 07:42:09 +00:00
Luka
3e1876ad43
feat(lib): switch to luau-unzip
( #3 )
...
* chore(bins): bump `asphalt` to v0.8.4
* chore(bins): bump `selene` to v0.28.0
* feat(lib): use luau-unzip
* chore(CHANGELOG): add luau-unzip
* chore: switch back to CRLF
* fix(lib): extracting wrong binary
* refactor(lib): use extractEntry function
* refactor(lib): make checks explicit and add comments to zip decompressor
* chore(lib): remove unused exec util
* chore(CHANGELOG): remove trailing full-stop
---------
Co-authored-by: Erica Marigold <hi@devcomp.xyz>
2025-01-16 13:08:06 +05:30
e194995f29
chore(CHANGELOG): update support tool entries
2025-01-12 18:32:50 +00:00
a33fa76f8b
chore(bins): bump luau-lsp
to v1.38.1
2025-01-12 18:31:35 +00:00
7236d5e701
chore: update lockfile
2024-12-29 11:24:45 +00:00
3f9bcc2fff
chore(CHANGELOG): update entry for v0.1.7
2024-12-29 11:22:31 +00:00
09bf30d751
chore(CHANGELOG): fix pesde/luau-lsp version being wrong
2024-12-29 11:21:50 +00:00
29857272e0
chore(bins): bump luau-lsp
to v1.38.0
2024-12-29 11:20:08 +00:00
08a45703da
chore: update lockfiles
2024-12-28 09:22:53 +00:00
05193b9133
chore(CHANGELOG): update changelog entries
2024-12-28 14:51:55 +05:30
26280ed820
chore(lib): prepare for v0.1.7
2024-12-28 09:21:20 +00:00
edb0a3be2a
chore(bins): bump asphalt
to v0.8.3
2024-12-28 09:16:45 +00:00
472813b41b
style: apply stylua formatter
2024-12-25 16:11:05 +00:00
269c05cbb4
chore(CHANGELOG): update changelog
2024-12-25 16:00:25 +00:00
ed8d5594b9
fix(lib): unhandled error when no gh
CLI present
...
We did not correctly handle the case if the `gh` CLI was not present,
since `process.spawn` errors. We now wrap it in a `Result.try` and
handle that as required.
2024-12-25 15:56:39 +00:00