-
Notifications
You must be signed in to change notification settings - Fork 15
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
tool: Add Rust port 🦀 #148
Draft
jtojnar
wants to merge
15
commits into
main
Choose a base branch
from
rust
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The former will conflict with rnix 0.11.
This is just a naïve port – we should probably make use of the now provide typed AST nodes instead of using `AstNode::syntax()` to convert everything to back to `SyntaxNode`.
Make it consistent with `getLocation` from our `lib`.
This will be needed for Rust port, since the compiled binary can be in different locations. It will also allow us to move the files to a more conventional path.
This is naïve, mostly 1:1 port. The AST checks remain in separate crate.
Tests still use Python.
This will allow us to use it directly from the main crate.
This is slightly shorter and we are now doing more than just checking AST.
Next step in unifying the architecture.
jtojnar
force-pushed
the
rust
branch
3 times, most recently
from
June 2, 2024 20:49
2e1e886
to
21773d6
Compare
jtojnar
commented
Jun 2, 2024
let mut child = Command::new(program) | ||
.args(args) | ||
.stdin(Stdio::piped()) | ||
.stdout(Stdio::piped()) |
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.
We should probably do something with stderr too.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I initially wrote this in Python to avoid the need to compile anything. But since we have rust-checks now, compilation is unavoidable, so we might as well go all in on Rust.
This is just a naïve, mostly 1:1 port. More cleanups might happen later.
The main motivation is to be able to use cargo’s test framework, which is slightly better than what we have now. Hopefully, this will fix CI.