Commit Graph

24 Commits

Author SHA1 Message Date
Matt Boulanger
dc7210bca3
Suggest aliases for unknown recipes (#624) 2020-04-26 14:19:21 -07:00
Casey Rodarmor
3ec7dea4a3
Use unstable rustfmt configuration options (#592) 2020-02-10 20:07:06 -08:00
Casey Rodarmor
ed991cb509
Add additional continuous integration checks (#574)
Add GitHub Actions checks:

- Clippy is placated
- Rustfmt doesn't produce any changes
- Shell completion scripts are current
2020-01-15 02:16:13 -08:00
Casey Rodarmor
2d3134a91c
Reform scope and binding (#556)
Clean up scope handling by introducing `Binding` and `Scope` objects.
2019-12-07 03:09:21 -08:00
Casey Rodarmor
598f1c3200
Refactor Compilation error to contain a Token (#535)
Use a `Token` to represent the error context, instead of a mess of
fields. Remove write_message_context in favor of `Token::write_context`.
2019-11-13 19:32:50 -08:00
Casey Rodarmor
aefdcea7d0
Gargantuan refactor (#522)
- Instead of changing the current directory with `env::set_current_dir`
  to be implicitly inherited by subprocesses, we now use
  `Command::current_dir` to set it explicitly. This feels much better,
  since we aren't dependent on the implicit state of the process's
  current directory.

- Subcommand execution is much improved.

- Added a ton of tests for config parsing, config execution, working
  dir, and search dir.

- Error messages are improved. Many more will be colored.

- The Config is now onwed, instead of borrowing from the arguments and
  the `clap::ArgMatches` object. This is a huge ergonomic improvement,
  especially in tests, and I don't think anyone will notice.

- `--edit` now uses `$VISUAL`, `$EDITOR`, or `vim`, in that order,
  matching git, which I think is what most people will expect.

- Added a cute `tmptree!{}` macro, for creating temporary directories
  populated with directories and files for tests.

- Admitted that grammer is LL(k) and I don't know what `k` is.
2019-11-09 21:43:20 -08:00
Casey Rodarmor
b2285ce0e0
Reform Parser (#509)
Just's first parser performed both parsing, i.e the transformation of a
token stream according to the language grammar, and a number of consistency
checks and analysis passes.

This made parsing and analysis quite complex, so this diff introduces a
new, much cleaner `Parser`, and moves existing analysis into a dedicated
`Analyzer`.
2019-11-07 10:55:15 -08: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
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
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
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
596ea34460
Replace regex-based lexer with character-at-a-time lexer (#406) 2019-04-15 22:40:02 -07:00
Casey Rodarmor
3a287b864a
Housekeeping (#394)
- Upgrade to rust 2018
- Update dependencies
- Use BTree{Map,Set} instead of Map and Set
2019-04-11 15:23:14 -07:00
Casey Rodarmor
3d67786aaf
Förmatterdämmerung (#346)
Format with rustfmt
2018-12-08 14:29:41 -08:00
Casey Rodarmor
849cdcb37f
Bump version: 0.3.12 -> 0.3.13 (#371) 2018-11-06 00:41:33 -08:00
ladysamantha
af97f3f1c1 Print recipe signature if missing arguments (#369) 2018-11-03 14:51:06 -07:00
Casey Rodarmor
4e6585d391
Slake Clippy's thirst for blood (#347) 2018-08-27 18:36:40 -07:00
Casey Rodarmor
70234f6193
Add dotenv integration (#306) 2018-03-05 13:21:35 -08:00
Casey Rodarmor
79c0994387
Add env_var(key) and env_var_or_default(key, default) functions (#280)
`env_var(key)` looks up the value of the environment variable with name `key`, aborting execution if it is not found.

`env_var_or_default(key, default)` looks up the value of the environment variable with name `key`, returning `default` if it is not found.
2017-12-02 23:59:07 +01:00
Casey Rodarmor
13a124d659
Refactor some other stuff (#252) 2017-11-17 17:28:06 -08:00
Casey Rodarmor
2b6b715528
Refactor Everything (#250) 2017-11-16 23:30:08 -08:00