web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
9.63k stars 556 forks source link

[Tracking]: migrate development workflow to just #7516

Open hardfist opened 2 months ago

hardfist commented 2 months ago

What subject does this issue tracking?

[migrate development workflow to just]

background

we may need some rust workflow(like rust api bump、release) in the future, which cause we may have js workflow and rust workflow together. Currently we use ./x to manage js workflow but it seems not idea to use ./x to manage rust workflow. so we're considering migrate the whole development workflow to just + js-script + xtask.

Design

our daily workflow actually contain two parts

### Tasks
- [ ] migrate current task orchestra in ./x to just
- [ ] update cicd to just command
- [ ] update contribute develop guide to just command
- [ ] remove `./x` and `./x.mjs`
- [ ] implement rust workflow (rust api release, doc generate) in just & xtask
chenjiahan commented 2 months ago

Should we alias the commands in npm scripts to just commands?

hardfist commented 2 months ago

Should we alias the commands in npm scripts to just commands?

I think it's the reverse, just call npm script to do js task management our daily workflow is based on just so just is the entry of daily task, and npm scripts is simple implementation of some task

chenjiahan commented 2 months ago

Some contributors may be used to using npm scripts, so how can we guide them?

I think we can alias some basic commands to just. For example, alias pnpm run setup to just setup.

hardfist commented 2 months ago

Some contributors may be used to using npm scripts, so how can we guide them?

provide detailed guide like this ? https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#install-the-required-tools

I think we can alias some basic commands to just. For example, alias pnpm run setup to just setup.

we can add some basic alias like setup, but when we have lots of tasks like https://github.com/biomejs/biome/blob/main/justfile, duplicate alias for all tasks seem not ideal

shulaoda commented 2 months ago

We can learn from this xtask case https://github.com/swc-project/swc/tree/main/xtask