Commit graph

30 commits

Author SHA1 Message Date
Zhaofeng Li
872949504b Migrate to Clap 4.0
It was kind of a bumpy experience. Gradual migration to the Derive API
is coming soon.
2022-10-09 15:26:37 -06:00
Zhaofeng Li
80426aa814 cli: Support passing --impure 2022-08-16 20:16:00 -06:00
Zhaofeng Li
271d9ae576 nix/assets: Make assets a flake
Groundwork to make flake evaluation pure. `pure-eval` works when
the git workspace is clean.
2022-08-16 20:16:00 -06:00
Zhaofeng Li
62a3d1e6f8 Run rustfmt 2022-07-29 22:13:09 -07:00
Zhaofeng Li
b8bdf5824c hive: Use absolute paths for non-flake hives
Fixes #107.
2022-07-04 14:05:50 -07:00
Zhaofeng Li
3e7341a98c utils.rs: Tolerate invalid UTF-8 in streams
This will substitute any invalid UTF-8 sequence with `\u{fffd}`. Such
substitutions are okay for human-readable log outputs.

Correctness: A side-effect of this is that it also affects the code
that captures filesystem paths from stdout, in which case any substitution
is unacceptable. Currently we only capture store paths from Nix, and Nix
restricts characters allowed in derivation names. Nevertheless we will
refactor this for correctness.

Fixes #75.
2022-04-25 00:03:57 -07:00
Zhaofeng Li
26b2203da9 Update deps 2022-03-07 22:02:04 -08:00
Zhaofeng Li
31fd1e49ac Move nix::{NixResult, NixError} to error::{ColmenaResult, ColmenaError} 2022-01-08 01:20:36 -08:00
Zhaofeng Li
16ed9d8c66 Move nix::NixCommand to util::CommandExt 2022-01-08 01:20:36 -08:00
Zhaofeng Li
da7907c874 General code cleanup 2022-01-05 14:01:05 -08:00
Zhaofeng Li
81e2982bbb Migrate to clap 0.3 2022-01-03 10:37:03 -08:00
Zhaofeng Li
eebded1786 Build each node individually
Now nodes that take a long time to build won't bottleneck the
deployment of other nodes in the same chunk.

Fixes #47.
2021-12-07 23:13:31 -08:00
Zhaofeng Li
0f8873027f utils: Don't panic in capture_stream 2021-12-05 01:14:12 -08:00
Zhaofeng Li
7b1feffb9e util: Log the configuration in use 2021-12-04 01:03:26 -08:00
Zhaofeng Li
a42e8c5bf0 Misc cleanup 2021-11-23 14:12:01 -08:00
Zhaofeng Li
0cb3f8e968 Redesign deployment process (again)
We now ship Events from different parts of the deployment process
via a channel to a job monitor.
2021-11-21 00:11:37 -08:00
Zhaofeng Li
5c84134af3 Refactor node names 2021-11-20 23:34:52 -08:00
Zhaofeng Li
58f2bf391f src/util.rs: No need to list 2021-10-28 14:09:35 -07:00
Zhaofeng Li
0e0a1e84f0 Make flake resolution (slightly) less terrible
Instead of using `path:` which always copies the entire directory,
we now try to resolve the Flake URI using `nix flake metadata` which
may give us a `git+file:`.
2021-10-25 23:38:10 -07:00
Zhaofeng Li
e50ba82bf2 Add basic Flakes support
Co-authored-by: Alex Zero <joseph@marsden.space>
2021-06-29 01:02:43 -07:00
Zhaofeng Li
16ccdbc700 Better handling of killed processes 2021-04-28 15:09:40 -07:00
Zhaofeng Li
62753ea138 progress: Let's just call them "tasks" instead of "processes"... 2021-02-10 17:20:49 -08:00
Zhaofeng Li
a2fa8f1da7 Clean up logging / progress display 2021-02-09 19:28:45 -08:00
Zhaofeng Li
8934726664 More fixes to key deployment and logging 2021-02-09 14:57:11 -08:00
Zhaofeng Li
506b894be6 Redesign deployment process
Now evaluation can be automatically split into chunks based on available
RAM. All three stages of the deployment process (evaluate, build,
apply) can happen concurrently.

Fixes #1.
2021-01-24 14:08:48 -08:00
Zhaofeng Li
2cb429ed8d Minor fixes to CLI help messages 2021-01-01 20:45:41 -08:00
Zhaofeng Li
60d6475897 Traverse up to find hive.nix by default, and other CLI ergonomics fixes 2020-12-29 12:02:50 -08:00
Zhaofeng Li
ed52e259aa Add support for --show-trace 2020-12-28 21:35:43 -08:00
Zhaofeng Li
d0ed138ef0 Refactoring and other stuff 2020-12-18 01:28:02 -08:00
Zhaofeng Li
e092ba5bb1 Initial commit 2020-12-15 20:23:02 -08:00