-
Notifications
You must be signed in to change notification settings - Fork 94
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
refactor rune-cli to be more command oriented #223
Conversation
Added a few things:
|
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.
Assuming you're OK with my changes, feel free to merge.
|
||
let mut options = rune::Options::default(); | ||
const SPECIAL_FILES: &[&str] = &[ |
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.
This is the only part I'm a little bit skeptical over right now. All the entrypoints seem like potentially surprising, and they depend on where the command is executed rather than a well-defined project root.
I'm fine with keeping them for now though (maybe consider trimming) and superseding them with a more explicit mechanism in the future.
Thanks for the overhaul! It was a bit awkward to specify the paths before the subcommand, so I collapsed them into a |
This PR changes rune (rune-cli) to be based around commands and feel a bit more like
cargo
.In this PR there is now three commands for Rune:
check
: only compiles, emites all errors and warningstest
: runs all testsrun
: runs the main entrypointFurthermore, there is now auto-find for the entrypoint as well, looking for main.rn, lib.rn, as well as in the subfolders src and script. This was necessary as one would otherwise have to make "path" part of every subcommand, which makes everything more complicated while being less ergonomic and needing more typing. The old mode is still possible by passing paths before the command.
Sample output: