- Differentiate between `arg`s, which are flags and options, and `cmd`s,
which are mutually exclusive subcommands
- Replace string literals, like "EVALUATE", with constants, like
`cmd::EVALUATE`, since they're slightly less error prone.
- Remove `Config::evaluate`, and handle it like other subcommands
- Refactor the lexer tests to be more readable, abandoning the
previous string-based summary DSL in favor of a more obvious
sequence of `TokenKinds` with optional lexemes. The new tests
also test that token lexemes are correct.
- Move duplicated `unindent` function into a shared crate,
`test-utilities`. This new versionless dev-dependency will
prevent publishing to crates.io, at least until rust-lang/cargo/pull/7333
makes it into stable. If we publish a new version before then,
test-utilities will need to be published to crates.io, so we can depend
on it by version.
Checks that we build and pass tests with the minimal dependency versions
declared declared in Cargo.toml, as part of the `publish-check` recipe
run before publishing a new version of Just.
Since error code 1 is commonly used to indicate failure, change those
integration tests which test that a specific error code is returned to
use something other than 1.
run::run() is pretty unwieldy. As a first step in improving it, this
commit pulls most of the argument parsing into the `config` module.
It also renames `Configuration` to `Config`, just to be easier to type.
Adds an `unindent()` function that strips common leading indentation
from strings, and apply it to integration test case strings, so that they
can be written in a more readable style.
This commit changes the integration tests to run with bash
as the shell, instead of bash, dash, and the system's sh.
Running the integration tests with multiple shells has never
revealed a bug in Just, and they make the tests take longer,
so let's get rid of them.
Previously, warnings upon encountering a deprecated use `=` in
assignments, exports, and aliases would print a message without any
indication of where the offending `=` was. This diff adds a proper
`Warning` enum, and uses it to report context, as is done with
compilation and runtime errors.
Eventually, there will probably be a `crate` visibility specifier that
does the same thing as `pub(crate)`. This commit replaces `pub` with
`pub(crate)`, so when `crate` is available we can easily switch to it.
Just uses github.com/japaric/trust to for continuous integration and
release building. trust uses github.com/rust-embedded/cross, which no
longer supports FreeBSD. (See github.com/rust-embedded/cross/issues/274
for details.)
Sadly, it's probably too much work to dive in and fix the FreeBSD image
for cross, so this commit disables the FreeBSD builds and releases on
Travis. I don't think we've ever seen a build failure on BSD only, so
losing the test coverage isn't a big deal.
It is unfortunate that we'll lose FreeBSD release builds though. I don't
think Just is in the FreeBSd ports tree, so it would be nice if someone
wanted to package it and get it in there.
Given the following justfile:
alias b := build
build:
echo 'Building!'
Just will show the alias along with the recipe:
$ just --show b
alias b := build
build:
echo 'Building!'
The generated man page doesn't look great by default, so this also adds the
help4help2man feature, which makes Just print a help message that produces
a better man page.
Just's dependency on brev was the cause of a
fairly deep branch of the transitive dependency
tree. To decrease build time and make the life of
packagers easier, this diff moves the functionality
that Just was using in Brev into Just itself, and
removes the dependency on Brev.
Fortunately, the only functionality that Just was
using was the output function and OutputError
enum, so this was easily done.
In order to make the life of downstream packagers easier, we should take care that dependency version requirements in Cargo.toml are as minimal as possible, so that packagers have as much flexibility as possible in packaging Just and its dependencies.
This diff reduces dependency version requirements in Cargo.toml to the minimum possible, i.e. the minimum possible semver compatible version that builds and passes tests.
We continue to require patch versions of ctrlc and log, because I couldn't get just to build with minimal versions after removing their patch requirements.
The old version often failed due to rebase conflicts if the feature branch to delete had multiple commits and was squash-merged into master.
This version just checks that the up-to-date master branch matches the feature branch and uses -D to delete the feature branch. This guarantees that we don't lose any work, and avoids bad rebases from squash merges to master.