-
Notifications
You must be signed in to change notification settings - Fork 398
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
Add a Justfile #5636
Add a Justfile #5636
Conversation
This lets us run common commands as `just <foo>` and reference them in the docs. `just` is a popular alternative to managing project-specific commands in Makefiles. The nice parts are: - Fewer syntax footguns - Command descriptions and groups Example: ``` ❯ just Available recipes: format # Format all code update-cli-reference # Update generated CLI help (cli/tests/[email protected]) [docs] build-docs # Build documentation into rendered-docs/ for offline use serve-docs # Preview documentation with live reloading ```
b023b12
to
d841e91
Compare
How about mise instead? In addition to functioning as a task runner, it should also solve certain problems of installing cross-language tooling (particularly formatters and doc website tooling). This was a problem in #3757 (cc @ilyagr). In this case it would also be able to provision |
Could be mise, I've never heard of it (other than here) but either works for me |
Big fan of At the very least, though, adding a |
I'm no particular fan of doing this, since it is similar in spirit to adding a editor-specific configuration folder or supporting a Buck2 (#1997) or Bazel build. I don't intend to block it if a majority likes it. |
Indeed, as Waleed said, there was a related conversation around #3757 (comment). The trouble with I would not change There were a few discussions on Discord about possible tools that could do a better job. I don't think we've discussed (The advantage of |
# Format all code | ||
format: | ||
cargo +nightly fmt | ||
|
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.
A clippy alias matching CI would also be helpful:
cargo +stable clippy --all-features --workspace --all-targets
I'm generally in favor of something like this and don't have an opinion about the specific tool we use. It would be nice to have simple ways to run cargo commands (fmt, clippy) using the same flags as the CI pipeline, assuming we can't accomplish that with |
Actually, I do have an opinion about what tool to use :D Even if |
Make doesn't exist on Windows, so it would hinder portability between OSes. Also I have a heavy personal dislike for it. |
I ended up trying mise a couple days ago and I’m sold. I will close this PR and create a new one for mise. A rather neat thing is that mise tasks can just be .sh scripts, which mise will autodetect. |
Does this work on Windows? Can mise install mingw or git for windows or something? We really need help with polishing jj on Windows, so I think it's important to make developing there as simple as possible and to not have Windows devs feel like they are an afterthought. |
Yes, I would really encourage minimizing the use of shell scripts. mingw and friends really make me as a windows user feel like a second class citizen. I don't have them on my computer even. Normally I would say that |
I assume it could be some kind of "sh or powershell" situation, where each script is present as a sh version and a powershell version and mise can choose between them. Ie. what I'd like is "if you choose, you can run things without needing to install just/mise/etc at all", which can hopefully be orthogonal to the shell choice |
This lets us run common commands as
just <foo>
and reference them in the docs.just
is a popular alternative to managing project-specific commands in Makefiles. The nice parts are:Example:
If there is agreement, I will also update the docs to reference
just
for builds-docs, serve-docs, and update-cli-reference.Checklist
If applicable:
CHANGELOG.md