Skip to content

Commit bd3bb0c

Browse files
Add historical tags and changelog
Fix #92
1 parent 47c8109 commit bd3bb0c

1 file changed

Lines changed: 383 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 383 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,383 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented here. The format is loosely
4+
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
5+
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [2.0.0] - 2025-08-30
8+
9+
- Bump Rust edition to 2024; minimum supported Rust version raised accordingly.
10+
- Replace `lazy_static!` with `std::sync::LazyLock` (standard-library only).
11+
- Use new `proc_macro` span APIs to get the next token with no gap.
12+
- New `build-print` feature: enable `build.rs` logging.
13+
- Add non-global ways to set debug and pipefail modes (thread-local overrides).
14+
- Fix thread unsafety caused by internal `set_var()` use; work around
15+
`set_pipefail()` thread-safety bug.
16+
- Replace `wait_with_pipe()` with `wait_with_borrowed_pipe()`; fix hang when
17+
called with built-ins.
18+
- Fix handling of `ignore` in `wait()` and `wait_with_all()`.
19+
- Inherit tracing spans when the program uses `tracing`.
20+
- Make stderr logging handle CR-separated progress output.
21+
- Support command environment variable values that contain `=`.
22+
- Include license text in the packaged macros crate.
23+
- Large refactor and new `test_ignore_and_pipefail()` test suite covering most
24+
entry points.
25+
26+
## [1.9.6] - 2025-06-14
27+
28+
- Support more formats for interpolation strings.
29+
- Support `${variable:?}` in interpolation strings.
30+
- Examples: port from `structopt` to `clap`/derive.
31+
32+
## [1.9.5] - 2024-10-01
33+
34+
- Fix `pipefail` issue for the `run_fun!()` macro.
35+
- Report full commands in errors to give more context.
36+
- Switch from `proc-macro-error` to `proc-macro-error2`.
37+
- Consolidate pipe-related test cases.
38+
39+
## [1.9.4] - 2024-05-12
40+
41+
- Skip empty arguments.
42+
43+
## [1.9.3] - 2023-11-29
44+
45+
- Remove `MainResult` and `MainError`.
46+
47+
## [1.9.2] - 2023-11-29
48+
49+
- Update `FunChildren` APIs.
50+
51+
## [1.9.1] - 2023-11-24
52+
53+
- Append command location information into errors.
54+
- Update custom-command API signature.
55+
- Hide `CmdIn` / `CmdOut` implementation details.
56+
- Fix unit testing of macros.
57+
58+
## [1.9.0] - 2023-11-23
59+
60+
- Refactor custom-command registration.
61+
62+
## [1.8.1] - 2023-11-19
63+
64+
- New API to catch all output and return code.
65+
- Documentation updates.
66+
67+
## [1.8.0] - 2023-11-02
68+
69+
- Add `cmd_lib::main` attribute macro to log `main()` errors by default.
70+
- Support empty commands and empty commands in pipelines.
71+
72+
## [1.6.1] - 2023-10-29
73+
74+
- Support `-n` option for the builtin `echo` command.
75+
76+
## [1.6.0] - 2023-10-24
77+
78+
- Refactor logging mechanism for better readability.
79+
- Cleaner printing of `ignore`, `cd`, and redirect operations.
80+
81+
## [1.5.0] - 2023-10-20
82+
83+
- Better error reporting when running commands.
84+
85+
## [1.4.0] - 2023-10-18
86+
87+
- Use `env_logger` as the default logger.
88+
- Allow nested `cd` commands inside group commands.
89+
- Support iterators that produce `OsStr`.
90+
- Use arrays (instead of vectors) for command arguments.
91+
- Add API to get PIDs of pipeline processes; support killing a pipeline.
92+
- Improved error reporting when spawning processes fails.
93+
- Import `main_error` crate for nicer top-level error reporting.
94+
95+
## [1.3.0] - 2021-10-16
96+
97+
- Allow `ignore` to be used for builtin commands; allow ignoring spawn errors.
98+
- New flag to control command error reporting; broader error-reporting
99+
refactor.
100+
- Move stderr polling into a separate structure.
101+
- Low-level API cleanup.
102+
103+
## [1.2.4] - 2021-09-27
104+
105+
- Allow `ignore` to ignore all errors inside pipelines.
106+
107+
## [1.2.3] - 2021-09-27
108+
109+
- Fix issue #36; cleanup around log waiting.
110+
111+
## [1.2.2] - 2021-09-20
112+
113+
- Fix `ignore` behavior for builtin commands.
114+
- Always report thread-join errors.
115+
- Warn-level messages only emitted when debug flag is enabled.
116+
117+
## [1.2.1] - 2021-09-19
118+
119+
- Fix builtin-command redirection bug.
120+
121+
## [1.2.0] - 2021-09-19
122+
123+
- Launch a separate thread to print stderr log (fix #35).
124+
- Read stdout/stderr buffers before and after `wait`.
125+
- Fix pipe-full issue for builtin commands.
126+
- Check thread-join return values.
127+
128+
## [1.1.0] - 2021-06-12
129+
130+
- Add builtin `ignore` command.
131+
- `run_cmd!()` and `spawn!()` no longer capture output.
132+
- Remove support for the `||` command operator.
133+
- Update `wait_with_pipe()` API.
134+
- Fix pipe race condition in tests.
135+
136+
## [1.0.13] - 2021-05-05
137+
138+
- Allow `Path` / `OsString` variables to be used directly in commands.
139+
- Convert variables to `OsString` via `into_os_string()`; replace
140+
`IntoOsString` trait with `AsOsStr`.
141+
- Print `OsString` values without `unwrap()`.
142+
- Fix `dd_test` display regression.
143+
144+
## [1.0.12] - 2021-04-27
145+
146+
- Support stream API with `wait_with_pipe()`.
147+
- Process cleanup: simplify wait structure; move `CmdChildren` to `child.rs`.
148+
- Rename `wait_cmd` / `wait_fun` functions; remove `Child` postfix from APIs.
149+
- Print messages so that `cargo test` is happy.
150+
151+
## [1.0.11] - 2021-04-23
152+
153+
- Update `cmd_die!()` macro to return the `!` (never) type.
154+
- Use iterators for parser; embed iterator into `Lexer` struct.
155+
- Return size 0 for `/dev/null` reads.
156+
- Fix stderr logging (#23).
157+
- Large internal cleanup of lexer, parser, child, and process modules.
158+
159+
## [1.0.10] - 2021-04-05
160+
161+
- Optimize handling of `/dev/null`.
162+
- Reject the same redirection being set multiple times.
163+
- Spawn a separate thread for builtin/custom pipe-out threads, and check its
164+
status.
165+
166+
## [1.0.9] - 2021-04-03
167+
168+
- Fix stderr piping bug.
169+
- Fix macOS testing error.
170+
171+
## [1.0.8] - 2021-03-31
172+
173+
- Continued work on the `log` crate dependency.
174+
175+
## [1.0.7] - 2021-03-31
176+
177+
- Add `log` crate dependency for `cmd_lib_macros`.
178+
179+
## [1.0.6] - 2021-03-31
180+
181+
- Support `|&` operation; tighter checks around `&` formats.
182+
- Optimize for `/dev/null`; fix redirection-all-to-a-file.
183+
- Simplify debug strings.
184+
185+
## [1.0.5] - 2021-03-30
186+
187+
- Log builtin/custom command's stderr content.
188+
- Fix builtin command stderr redirection.
189+
- Report `cd` command errors.
190+
191+
## [1.0.4] - 2021-03-29
192+
193+
- Ensure command-running errors are logged across all code paths.
194+
- Suppress errors when `or_cmd` can run.
195+
- Log errors for `wait_raw_result()`.
196+
197+
## [1.0.3] - 2021-03-29
198+
199+
- Add `cmd_echo!` support and print all log levels by default.
200+
- Default logging level set to debug.
201+
- Capture all stderr messages into logs.
202+
203+
## [1.0.2] - 2021-03-29
204+
205+
- Add log levels for `warn!()` and `error!()`.
206+
- Log error messages when running commands fails.
207+
208+
## [1.0.1] - 2021-03-28
209+
210+
- Add logging support.
211+
- Fix empty command with variable settings.
212+
- Only take child's stdin for previous builtin/custom commands.
213+
- Lexer cleanup.
214+
215+
## [1.0.0] - 2021-03-28
216+
217+
- First stable release.
218+
- Update builtin/custom command registration API.
219+
- Remove `vars()` API from `CmdEnv`.
220+
221+
## [0.15.1] - 2021-03-27
222+
223+
- Refactor `process` module; tidier `std_cmd` matching.
224+
225+
## [0.15.0] - 2021-03-27
226+
227+
- Move command vector into the lower-level `Cmd` struct; carry more
228+
information on `Cmd` itself.
229+
- Update `CmdStdio` APIs.
230+
- Fix `wait_raw_result()` wait bug.
231+
- Simplify `current_dir` setting and debug-string printing.
232+
233+
## [0.14.6] - 2021-03-26
234+
235+
- Don't panic when opening files fails; always wait for children even on
236+
failure.
237+
- Parser cleanup.
238+
239+
## [0.14.5] - 2021-03-26
240+
241+
- Support null command.
242+
- Refactor `RedirectFd` struct and redirection parsing.
243+
- Apply Rust 1.51 clippy suggestions.
244+
- Update crate keywords.
245+
246+
## [0.14.4] - 2021-03-24
247+
248+
- Support pipe in / stdin for builtin and custom commands.
249+
- Lexer cleanup.
250+
251+
## [0.14.3] - 2021-03-24
252+
253+
- Release global `CMD_MAP` lock during execution.
254+
- Fix redirection-format check; lexer refactor.
255+
256+
## [0.14.2] - 2021-03-24
257+
258+
- Update `ProcHandle` enum.
259+
- Fix string-literal parsing.
260+
261+
## [0.14.1] - 2021-03-23
262+
263+
- Cleanup of builtin-command implementation.
264+
265+
## [0.14.0] - 2021-03-23
266+
267+
- Replace `die!()` macro with `cmd_die!()`.
268+
- Update builtin-command API interface.
269+
- Support basic stdout/stderr redirection for builtin commands.
270+
- Update docs on registering custom commands.
271+
272+
## [0.12.6] - 2021-03-23
273+
274+
- Add `cmd_info!()` macro.
275+
- Allow more valid tokens after pipe; check more invalid redirection formats.
276+
- Fix raw fd redirection issues.
277+
- Fix redirection bug for `run_fun!`.
278+
- Lexer refactor.
279+
280+
## [0.12.5] - 2021-03-21
281+
282+
- Fix redirect bug; fail more invalid redirections.
283+
284+
## [0.12.4] - 2021-03-21
285+
286+
- Show envs and redirects when running in debug mode.
287+
288+
## [0.12.3] - 2021-03-21
289+
290+
- Clean up `current_dir` setting.
291+
- Move children out of `Cmds` struct.
292+
293+
## [0.12.2] - 2021-03-21
294+
295+
- Simplify argument parsing in examples (`clap` / `structopt`).
296+
- Re-revert "Removed lazy_static package dependency".
297+
- Fix `current_dir` setting issues.
298+
299+
## [0.12.1] - 2021-03-19
300+
301+
- Better error messages for macro compilation; use `proc_macro_error` crate.
302+
- Add support for escaped characters.
303+
- Parse variables in a single pass; cleaner peekable iterator.
304+
- CI: introduce `rust.yml` workflow.
305+
306+
## [0.12.0] - 2021-03-09
307+
308+
- Add `spawn_with_output!()` macro.
309+
- Refactor to allow builtin commands in pipes.
310+
- Rename `proc_var*` to `tls_*`.
311+
- Add `set_pipefail()` API; replace `try_wait()` with `wait()`.
312+
- Drop `tempfile` dependency.
313+
- Many examples/test fixes (tetris, pipes, pipefail on macOS).
314+
315+
## [0.12.0-rc1] - 2021-03-08
316+
317+
- Release candidate for 0.12.0.
318+
319+
## [0.11.6] - 2021-03-03
320+
321+
- Update logging macro/functions.
322+
323+
## [0.11.5] - 2021-03-03
324+
325+
- Make `pipefail` the default.
326+
- Add `die!` macro and `info()` builtin.
327+
- More logging-related builtin commands; more examples.
328+
- Drop `lazy_static` package dependency.
329+
330+
## [0.11.4] - 2021-03-02
331+
332+
- Add `spawn` macro with compile-time check.
333+
334+
## [0.11.3] - 2021-03-02
335+
336+
- Hide builtin functions from public API.
337+
338+
## [0.11.2] - 2021-03-02
339+
340+
- Rename `use_cmd` to `use_custom_cmd`.
341+
- Support builtin commands.
342+
343+
## [0.11.1] - 2021-03-01
344+
345+
- Macro library cleanup; doc typo fix.
346+
347+
## [0.11.0] - 2021-03-01
348+
349+
- Move parser from runtime into compile time (proc-macro parsing).
350+
- Refactor `process` implementation.
351+
352+
## [0.10.5] - 2021-03-01
353+
354+
- Fix cargo-readme code-highlighting issue.
355+
- Fix doctest failure.
356+
357+
## [0.10.4] - 2021-03-01
358+
359+
- Documentation updates; tokenstream cleanup.
360+
361+
## [0.10.3] - 2021-02-28
362+
363+
- New compile-time pipeline implementation: pipes, string literals,
364+
semicolons, variable passing, `Or` command, vector variables, environment
365+
variable passing, stdin/stdout/stderr/fd redirection.
366+
- Introduce new lexer with `SepToken` and `MarkerToken`.
367+
- Unify `run_cmd` and `run_fun` macros.
368+
369+
## [0.10.2] - 2021-02-24
370+
371+
- Add variable-substitution rules.
372+
- Add `config_cmd` / `export_cmd` / `use_cmd` APIs; `set_debug` API.
373+
- Hide internal APIs.
374+
375+
## [0.10.1] - 2021-02-21
376+
377+
- Better error reporting for proc-macros.
378+
- Skip invalid variable names.
379+
- Clean up `Cargo.toml` for `proc-macro2`.
380+
381+
## [0.10.0] - 2021-02-21
382+
383+
- First release published to crates.io.

0 commit comments

Comments
 (0)