Closed ErinvanderVeen closed 5 months ago
Presumably this supersedes #643
Presumably this supersedes #643
Absolutely, but I want to keep it until we are sure we can merge this.
0e9fba9 resolves #665? Nice :+1:
0e9fba9 resolves #665? Nice 👍
Sure looks like it ;)
An attempt to implement #643 without having to deprecate the playground.
The main idea here is to vendor the git crates that we absolutely depend on for the Topiary, and eventually publishing them under the
topiary-*
crate.Since this PR is very large, I want to reason about all the changes I have made:
Clippy CI phase not running on MacOS
Unfortunately there seems to be something in our Nix config/Cargo.toml that makes
cargo clippy
attempt to try and build the playground on MacOS. This, in combination with a undetermined bug with building the playground on MacOS, led me to disable it for now.Building the playground on MacOS manually
nix build .#topiary-playground
works fine.Removing the .vscode directory
I don't think .vscode has a place in an otherwise editor agnostic repository.
Removing the patch versions of some of our packages
Generally, Cargo will favour newer versions over older versions anyway. Assuming the packages abide to SemVer (even below 1.0) it should therefore generally not be a problem to not specify the patch level. In some cases this might ensure that we don't build duplicate versions of packages
removing the
SupportedLanguages
enumThis was done to make separating the
topiary-config
crate easier. With eyes on the future, this will also make it easier for us to maker it easier for external contributors to add language support to Topiary.new DevShell
I got annoyed I could not build the Topiary Playground locally with
cargo
, so I exposed a second devShell namedwasm
to build wasm targets. Ideally, we would find a way to combine these.Error changes
With
topiary-config
becoming its own crate, it needed its own errors. With this, I changed some of our Errors to be more in line with what is common in the Rust ecosystem, with eyes on thethiserror
crate in the future.Moving the samples and using the cli to test them
Since the core
topiary
crate no longer depends on all thetree-sitter
grammars, this crate could no longer be responsible for the testing. All the configuration was already done in thetopiary-cli
crate, so I moved the sample testing there.Vendoring the
tree-sitter-*
cratesWe are moving to a moment where we publish
topiary-core
on crates.io. With this move we need to publish updated version ofweb-tree-sitter-sys
andtree-sitter-facade
. We could ask for ownership of the crates, but generally, I like prefixing them withtopiary-
.This prevents people from assuming they are useful for anything else.
We might in the future ask for ownership and maintain them, but we don't have the manpower for that right now.
npm update
The puppeteer package that we use uses a package called
browsers
to install specific versions of chrome. Unfortunately, Google made the specific version of chrome that we used unavailable. This was long fixed upstream, so a simplenpm update
resolved the issue.