Skip to content

Commit 706abf6

Browse files
committed
run-make-support: add changelog
1 parent f7a620b commit 706abf6

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Changelog
2+
3+
All notable changes to the `run_make_support` library should be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the support
6+
library should adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) even if it's
7+
not intended for public consumption (it's moreso to help internally, to help test writers track
8+
changes to the support library).
9+
10+
This support library will probably never reach 1.0. Please bump the minor version in `Cargo.toml` if
11+
you make any breaking changes or other significant changes, or bump the patch version for bug fixes.
12+
13+
## [0.1.0] - 2024-06-09
14+
15+
### Changed
16+
17+
- Use *drop bombs* to enforce that commands are executed; a command invocation will panic if it is
18+
constructed but never executed. Execution methods `Command::{run, run_fail}` will defuse the drop
19+
bomb.
20+
- Added `Command` helpers that forward to `std::process::Command` counterparts.
21+
22+
### Removed
23+
24+
- The `env_var` method which was incorrectly named and is `env_clear` underneath and is a footgun
25+
from `impl_common_helpers`. For example, removing `TMPDIR` on Unix and `TMP`/`TEMP` breaks
26+
`std::env::temp_dir` and wrecks anything using that, such as rustc's codgen.
27+
- Removed `Deref`/`DerefMut` for `run_make_support::Command` -> `std::process::Command` because it
28+
causes a method chain like `htmldocck().arg().run()` to fail, because `arg()` resolves to
29+
`std::process::Command` which also returns a `&mut std::process::Command`, causing the `run()` to
30+
be not found.
31+
32+
## [0.0.0] - 2024-06-09
33+
34+
Consider this version to contain all changes made to the support library before we started to track
35+
changes in this changelog.
36+
37+
### Added
38+
39+
- Custom command wrappers around `std::process::Command` (`run_make_support::Command`) and custom
40+
wrapper around `std::process::Output` (`CompletedProcess`) to make it more convenient to work with
41+
commands and their output, and help avoid forgetting to check for exit status.
42+
- `Command`: `set_stdin`, `run`, `run_fail`.
43+
- `CompletedProcess`: `std{err,out}_utf8`, `status`, `assert_std{err,out}_{equals, contains,
44+
not_contains}`, `assert_exit_code`.
45+
- `impl_common_helpers` macro to avoid repeating adding common convenience methods, including:
46+
- Environment manipulation methods: `env`, `env_remove`
47+
- Command argument providers: `arg`, `args`
48+
- Common invocation inspection (of the command invocation up until `inspect` is called):
49+
`inspect`
50+
- Execution methods: `run` (for commands expected to succeed execution, exit status `0`) and
51+
`run_fail` (for commands expected to fail execution, exit status non-zero).
52+
- Command wrappers around: `rustc`, `clang`, `cc`, `rustc`, `rustdoc`, `llvm-readobj`.
53+
- Thin helpers to construct `python` and `htmldocck` commands.
54+
- `run` and `run_fail` (like `Command::{run, run_fail}`) for running binaries, which sets suitable
55+
env vars (like `LD_LIB_PATH` or equivalent, `TARGET_RPATH_ENV`, `PATH` on Windows).
56+
- Pseudo command `diff` which has similar functionality as the cli util but not the same API.
57+
- Convenience panic-on-fail helpers `env_var`, `env_var_os`, `cwd` for their `std::env` conterparts.
58+
- Convenience panic-on-fail helpers for reading respective env vars: `target`, `source_root`.
59+
- Platform check helpers: `is_windows`, `is_msvc`, `cygpath_windows`, `uname`.
60+
- fs helpers: `copy_dir_all`.
61+
- `recursive_diff` helper.
62+
- Generic `assert_not_contains` helper.
63+
- Scoped run-with-teardown helper `run_in_tmpdir` which is designed to run commands in a temporary
64+
directory that is cleared when closure returns.
65+
- Helpers for constructing the name of binaries and libraries: `rust_lib_name`, `static_lib_name`,
66+
`bin_name`, `dynamic_lib_name`.
67+
- Re-export libraries: `gimli`, `object`, `regex`, `wasmparsmer`.

0 commit comments

Comments
 (0)