tooling/toolchainlib
Erica Marigold 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
..
src refactor(lib): restructure locking mechanism to be atomic 2025-02-05 13:57:22 +05:30
LICENSE docs: symlink toolchainlib LICENSE 2024-12-08 18:21:06 +01:00
pesde.lock feat(lib): upgrade pathfs and dirs to v0.3.0 2025-02-05 12:30:00 +05:30
pesde.toml feat(lib): upgrade pathfs and dirs to v0.3.0 2025-02-05 12:30:00 +05:30
README.md chore(toolchainlib): remove token param from README 2024-12-10 22:12:47 +05:30

pesde/toolchainlib

Discord Pesde Lune

A Luau library implementing toolchain management for Luau packages. This package is a dependency of all of pesde's tooling packages.

Caution

Although it is possible to use this package directly, it is not recommended as it has not been thoroughly tested for any tooling other than those pesde officially repackages.

Hwat? How?

pesde/toolchainlib uses a logic inspired by Rokit to discover compatible artifacts on GitHub releases, downloads them locally, and executes them. Rokit's discovery logic is dynamic, works for a majority of tools. The only requirement is that the tool has to have a GitHub release. See this comment for more details on the discovery logic.

When consumed from within a binary pesde package, pesde creates global linker scripts within ~/.pesde/bin which can be invoked when the package is installed in the workspace. These scripts can be called from the command line like regular commands, enabling you to run your favorite tooling, while having them be managed entirely by pesde.

License

This project is licensed under the MIT license.