160 Commits

Author SHA1 Message Date
e169efa030 Execution of rules is now stopped at the first build error. 2023-12-10 18:02:29 +00:00
a879ab1c2a PrettyDisplay now hides "irrelevant" errors when printing AppError::Multiple.
Currently the only irrelevant error is empty `AppError::BuildTarget`s.
2023-12-10 18:01:33 +00:00
792699b364 Removed AppError::Shared.
Now that we can show all the errors at once, it is no longer necessary for all errors to have all the sources.
2023-12-10 16:12:37 +00:00
f91bef0ee5 Fixed some outdated comments.
We no longer fail early anywhere, so those comments were no longer true.
The todo on canceling dependencies is better suited to be on the builder.
2023-12-10 14:51:56 +00:00
5043f9d843 Rules no longer store dependencies file as a separate variant and instead uses a flag.
Renamed (internal) usages of `dep_file` to `deps_file`.

Dependencies file need the same treatment as normal files, with just an extra treatment after they're built, so a flag is sufficient.
2023-12-10 14:49:48 +00:00
5c6d919ec4 Removed unnecessary dependency on std::os::unix::ffi::OsStringExt.
This requires arguments to be utf-8, since the only cross-platform (safe) way to get a `OsStr` is from a `str`.
However, we only require this from commands that are used as output, so it should be fine.
2023-12-10 14:31:07 +00:00
fe5bdb0106 Sorted all dependencies by name. 2023-12-10 04:17:30 +00:00
6f7dfd5301 Updated all dependencies. 2023-12-10 04:12:41 +00:00
53709be359 Added some allows for missing copy implementations.
These seem to be intermittent, so we might need to lower them to `allow` in the future.
2023-12-10 04:06:07 +00:00
bac6ab4e21 Added the ability to have an error with multiple inner errors. 2023-12-09 21:06:46 +00:00
2cc54cb55b Replaced thiserror with custom impl.
Added `ExitResult` for returning from `main`.

This allows us to format errors more properly without having to go through `anyhow::Error`.
2023-12-09 18:32:53 +00:00
1cf832759a Switched decl_error to a macro_rules macro.
This is due to some issues related to field privacy. Intermittently we'd get an error that `AppError::{Shared, Other}` weren't visible to the `thiserror::Error` derive macro, so this fixes that for now.
2023-12-09 17:44:31 +00:00
c0760b7ffd Removed BuildResult::built_here.
It always had the same value as `built`.
2023-12-09 17:10:43 +00:00
b08e2c4fbc Simplified a future mapping. 2023-12-09 17:05:01 +00:00
3f67a98e16 All build errors are now displayed again on exit.
This is useful when you're building with multiple jobs and an error gets buried in the middle of other jobs' output.
2023-12-09 17:02:48 +00:00
143816e0e6 decl_error now requires the Shared and Other variant types.
This is due to an intermittent compiler error that says that those fields aren't visible to `derive(thiserror::Error)`.
2023-12-09 16:49:04 +00:00
a2d9591b07 Removed impossible error. 2023-12-09 16:47:43 +00:00
c5e788ec30 Program stdout no longer needs to be utf-8 when passing it to other programs. 2023-12-09 16:46:14 +00:00
4e030395fc AppError is now generated with a macro. 2023-12-09 16:38:05 +00:00
22d89a84dc Reorganized some lints. 2023-12-09 11:42:08 +00:00
6515926473 Re-enabled clippy.significant_drop_in_scrutinee lint.
This required rewriting some code to not trigger the lint, but it ended up more readable, so it was a good thing.
2023-12-09 11:39:34 +00:00
428415c9f4 Re-enabled clippy.arithmetic_side_effects lint. 2023-12-09 11:27:38 +00:00
19aa81cd00 Removed build::file_modified_time.
It was already possible to get the build time using `Metadata::modified`, despite it being fallible.
2023-12-09 11:26:24 +00:00
bef4135311 Re-enabled clippy.default_numeric_fallback lint. 2023-12-09 11:18:22 +00:00
76b6c23bf7 Removed expected lint that was allowed. 2023-12-09 11:16:21 +00:00
69b7d3e109 Re-enabled some warning lints. 2023-12-09 11:15:51 +00:00
35989fe394 Removed some more allowed lints. 2023-12-09 11:12:35 +00:00
0014341015 Cleaned up some lints. 2023-12-09 11:09:45 +00:00
e509859c6f Fixed return value being 0 despite build error occurring. 2023-12-08 22:26:06 +00:00
2e53661bbd Added warning on using --watch when a log file is present nearby any watched files. 2023-12-04 21:10:16 +00:00
475eb3c39d Allowed new lint. 2023-12-04 21:07:16 +00:00
4ef11adb18 Watcher now watches the file parent in a non-recursive way.
Being recursive was already unnecessary to allow the behavior we needed.
2023-12-04 21:07:10 +00:00
6a591c4fe3 Updated to rustc 1.75.0-nightly (fee5518cd 2023-11-05). 2023-12-04 20:54:23 +00:00
da8522b291 Removed unused imports. 2023-12-04 20:54:10 +00:00
3350096af3 Fixed wrong help message for log-file command. 2023-12-04 20:53:59 +00:00
7e32620e16
Merge branch 'dev' 0.1.2 2023-10-05 23:41:23 +01:00
ba359c0152 Updated zbuild to 0.1.2. 2023-10-05 23:37:54 +01:00
83a1738d41 Added documentation for now command-within-command syntax. 2023-10-05 23:37:46 +01:00
101f78d93e Improved logging implementation. 2023-09-13 08:56:59 +01:00
d30c43c208 Upgraded all dependencies. 2023-09-13 08:29:13 +01:00
c268f5599c Watcher::new now takes a Duration for the debouncer timeout. 2023-09-13 08:26:30 +01:00
0b9a8078b6 Updated to rustc 1.74.0-nightly (2f5df8a94 2023-08-31). 2023-09-07 03:43:23 +01:00
ed61b04f93 Fixed arguments being shuffled around. 2023-08-23 15:41:59 +01:00
4662d73997 Added ability to strip a command argument if it fails. 2023-08-23 15:28:54 +01:00
6f5329628a Reworked rule execution to allow recursive commands. 2023-08-23 14:39:35 +01:00
63ce369251 Fixed unhandled case where executable semaphore failed to acquire. 2023-08-23 13:41:29 +01:00
94ecd810ec Updated to rustc 1.73.0-nightly (399b06823 2023-07-20). 2023-08-23 13:30:37 +01:00
1ae8448b11 Expander now carries the manifest lifetime, so it may cache certain results 2023-07-13 12:53:25 +01:00
471ebdecdd Fixed several clippy lints. 2023-07-13 12:51:12 +01:00
559a287117 Fixed compiler crash due to expect lint. 2023-07-13 12:42:10 +01:00