Commit Graph

577 Commits

Author SHA1 Message Date
Casey Rodarmor
83f40aa805
Improve messages for alias error messages (#500) 2019-10-19 20:00:41 -07:00
Casey Rodarmor
49ab423592
Refactor lexer tests (#498)
- 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.
2019-10-17 20:04:54 -07:00
Casey Rodarmor
750ba6eb57
Remove unused use statements (#497) 2019-10-16 03:15:59 -07:00
SOFe
6acabb2562 Add repository attribute to Cargo.toml (#493) 2019-10-13 03:05:09 -07:00
Casey Rodarmor
3de31b3c02
Remove misc.rs (#491)
Put everything that was in `misc.rs` into their own files, with some opportunistic
refactoring, because why not.
2019-10-09 01:40:40 -07:00
Casey Rodarmor
ca4f2a44ed
Refactor run::run and Config (#490)
Improve color parsing, add `ConfigError`, put `invocation_directory` on Config object, return error code from `run::run` instead of exiting.
2019-10-09 00:18:53 -07:00
Casey Rodarmor
64ed94c8ac
Use more indented strings in integration tests (#489)
Changes by @aquarhead, but git merge clobbered original authorship.
2019-10-08 22:56:42 -07:00
Casey Rodarmor
5da0079ad9
Check minimal version compatibility before publishing (#487)
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.
2019-10-08 22:17:22 -07:00
Casey Rodarmor
bd75c5f51d
Avoid using error code 1 in integration tests (#486)
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.
2019-10-08 22:03:59 -07:00
Casey Rodarmor
ab11740104
Add explicit Subcommand enum (#484) 2019-10-07 04:04:39 -07:00
Casey Rodarmor
2938ab1561
Start pulling argument parsing out of run::run() (#483)
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.
2019-10-07 02:06:45 -07:00
Casey Rodarmor
fa6d5dd002
Don't install dash on Travis (#482)
The integration tests no longer run with dash, so skip installing it on Travis to
save time.
2019-10-07 00:46:57 -07:00
Casey Rodarmor
11c253a213
Add unindent() for nicer integration test strings (#481)
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.
2019-10-07 00:32:51 -07:00
Casey Rodarmor
633f0ccaa6
Allow integration test cases to omit common values (#480) 2019-10-06 00:32:16 -07:00
Casey Rodarmor
be3ec13d1c
Use bash as shell for all integration tests (#479)
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.
2019-10-05 23:08:22 -07:00
Casey Rodarmor
2818d4da1c
Fix summary feature conditional compilation (#475)
The correct syntax is `#[cfg(feature = "summary")]`.
2019-09-23 18:52:27 -07:00
Casey Rodarmor
1d063cce01
Hide summary functionality behind feature flag (#472)
Since summaries are only used by Janus, the Just ecosystem testing tool,
it makes sense to hide it behind a feature flag.
2019-09-21 19:19:56 -07:00
Casey Rodarmor
1230af138c
Add context to deprecation warnings (#473)
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.
2019-09-21 18:53:30 -07:00
Casey Rodarmor
1cb90f4e65
Use pub(crate) instead of pub (#471)
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.
2019-09-21 15:35:03 -07:00
Casey Rodarmor
1521982891
Disable FreeBSD builds (#474)
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.
2019-09-21 14:53:00 -07:00
Casey Rodarmor
1d3235780a
Make comments in common.rs lowercase (#470) 2019-09-15 01:29:11 +02:00
Casey Rodarmor
e8c25423b8 Display alias with --show NAME if one exists
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!'
2019-08-23 21:46:57 -07:00
Casey Rodarmor
04a2b6461e
Generate man page with help2man (#463)
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.
2019-07-18 21:58:06 -07:00
Casey Rodarmor
74e45e7c05
Remove dependency on brev (#462)
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.
2019-07-13 01:55:06 -07:00
Casey Rodarmor
57ac89a7ac
Minimize dependency version requirements (#461)
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.
2019-07-10 22:59:32 -07:00
Niklas Claesson
1958edfacb Bump clap dependency to 2.33.0 (#458) 2019-07-07 18:45:52 -07:00
Niklas Claesson
ff91e3d7c6 Use tempfile crate instead of tempdir (#455) 2019-07-06 20:55:46 -07:00
Casey Rodarmor
3e61ddf8e7
Document multi-line constructs (for/if/while) (#453) 2019-06-29 18:59:11 -07:00
Light Ning
a4556241de Update deprecated rust range patterns and clippy config (#450)
- Fix warning: `...` range patterns are deprecated
- Update deprecated cyclomatic-complexity-threshold to cognitive-complexity-threshold
2019-06-06 23:34:07 -07:00
Casey Rodarmor
23443e2472
Bump version: v0.4.3 -> v0.4.4 (#449) 2019-06-02 13:38:16 -07:00
Rostyslav Shevtsiv
7f06bc68d4 Ignore file name case while searching for justfile (#436) 2019-06-01 22:38:02 -07:00
Casey Rodarmor
24311b7c0b
Pass all arguments to just watch (#441) 2019-05-15 17:30:47 -04:00
Casey Rodarmor
d9986a393c
Improve done recipe (#444)
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.
2019-05-15 16:07:41 -04:00
Casey Rodarmor
9b08ce6fd8
Display alias target with --show (#443) 2019-05-15 15:43:47 -04:00
Casey Rodarmor
22e96447b4
Replace colored_diff with pretty_assertions (#440) 2019-05-15 14:38:36 -04:00
Casey Rodarmor
d46e6d86a6
Update justfile to use := instead of = (#432) 2019-05-07 20:15:22 -07:00
Casey Rodarmor
ea2afb627b
Bump version: v0.4.2 -> v0.4.3 (#431)
- Bump version from v0.4.2 to v0.4.3
- Update dependencies
- Make change log more readable
2019-05-07 19:37:40 -07:00
Casey Rodarmor
bde647279a
Add Void Linux install instructions to readme (#423) 2019-05-01 01:00:48 -07:00
Rory O’Kane
a740200a3f Mention Make’s “phony target” workaround in the comparison (#421) 2019-05-01 00:37:26 -07:00
Casey Rodarmor
fdb5c4f578
Typo: "command equivelant" -> "command equivalent" (#418) 2019-04-19 14:18:24 -07:00
Casey Rodarmor
fce4c232d3
Remove write_token_error_context (#417) 2019-04-19 04:07:29 -07:00
Casey Rodarmor
9c82a1e329
Move CompilationErrorKind into separate module (#416) 2019-04-19 02:40:25 -07:00
Casey Rodarmor
415c84ea39
Refactor and rename test macros (#415) 2019-04-19 02:17:43 -07:00
Casey Rodarmor
d065d1c54f
Lexer code deduplication and refactoring (#414) 2019-04-18 13:12:38 -07:00
Casey Rodarmor
0ad5574ecc
Deprecate = in assignments, aliases, and exports in favor of := (#413) 2019-04-18 11:48:02 -07:00
Casey Rodarmor
1c0dc284fe
Fix readme command line (#411) 2019-04-16 22:40:55 -07:00
Casey Rodarmor
eb3ae2d093
Replace some calls to brev crate (#410) 2019-04-16 22:06:28 -07:00
Casey Rodarmor
792b7a249c
Pass stdin handle to backtick process (#409) 2019-04-16 19:52:16 -07:00
Casey Rodarmor
aa81f458d0
Remove stray source files (#408) 2019-04-16 00:52:05 -07:00
Casey Rodarmor
85336f09b0
Bump version: v0.4.1 -> v0.4.2 (#407) 2019-04-15 23:39:18 -07:00