mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Make the --release
/--dev
more consistent and less surprising (#30091)
There were some issues with the way that the `--release` and `--dev` arguments were handled in mach commands. - Not all commands accepted them in the same way. For instance `./mach test-wpt` didn't really accept them at all. - If you did not pass either of them, mach would try to guess which build you meant. This guess was often quite surprising as it wasn't printed and it depended on the state of the your target directory, which is difficult to remember. - The `dev` profile is colloquially called a "debug" profile and some commands accepted `-d` or `--debug...` like arguments, but `--debug` with `./mach run` meant run in a debugger. It was easy to mix this up. This change: - Centralizes where build type argument processing happens. Now it the same shared decorator in CommandBase. - Uses a `BuildType` enum instead of passing around two different booleans. This reduces the error checking for situations where both are true. - Be much less clever about guessing what build to use. Now if you don't specify a build type, `--dev` is chosen. I think this behavior matches cargo. - Makes it so that `./mach test-wpt` accepts the exact same arguments and has the same behavior as other commands. In addition, the suite correct for `test-wpt` is removed. There are only two suites now and it's quite unlikely that people will confuse WPT tests for rust unit tests.
This commit is contained in:
parent
cc86854c4e
commit
1d79f5dad2
13 changed files with 242 additions and 344 deletions
2
.github/workflows/mac.yml
vendored
2
.github/workflows/mac.yml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
|||
run: |
|
||||
python3 ./mach build --release
|
||||
- name: Smoketest
|
||||
run: python3 ./mach smoketest
|
||||
run: python3 ./mach smoketest --release
|
||||
- name: Script tests
|
||||
run: ./mach test-scripts
|
||||
- name: Unit tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue