summaryrefslogtreecommitdiffstats
path: root/Justfile
diff options
context:
space:
mode:
authorBenjamin Sago <ogham@bsago.me>2020-10-10 01:43:42 +0100
committerBenjamin Sago <ogham@bsago.me>2020-10-10 01:43:42 +0100
commit5ca3548bb1ebc61cc4733239a0f5dadfa4da8786 (patch)
treeb93231fd3f27e75640bcc49decc860aad53ca8e9 /Justfile
parentdf81a24dae58b85afc96587a8764aaa52aeb9464 (diff)
Inline the library into the binary
This commit removes the library portion of exa. Cargo now only builds a binary. The original intent was for exa to have its own internal library, and have the binary just call the library. This is usually done for code cleanliness reasons: it separates the code that implements the purpose of the program (the "plumbing") from the code that the user interacts with (the "porcelain"), ensuring a well-defined interface between the two. However, in exa, this split was in completely the wrong place. Logging was handled in the binary, but option parsing was handled in the library. The library could theoretically print to any Writer ("for testing", it said), but it's far easier to run integration tests by executing the binary than to change the code to handle unit tests, so this abstraction isn't gaining us anything. I've also had several people ask me if exa should be packaged for Linux distributions as a library, or just a binary. Clearly, this is confusing! In several of my other Rust projects, I've done this better, with the command-line option parsing and log printing done on the binary side. It also turns out that you don't need to have a [lib] section in the Cargo.toml, so that's gone too.
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Justfile b/Justfile
index 953e9df..d892165 100644
--- a/Justfile
+++ b/Justfile
@@ -25,7 +25,7 @@ build-features:
# runs unit tests with every combination of feature flags
test-features:
- cargo hack test --feature-powerset --lib -- --quiet
+ cargo hack test --feature-powerset -- --quiet
# prints versions of the necessary build tools