2019-09-14 16:29:11 -07:00
|
|
|
// stdlib
|
2019-04-11 15:23:14 -07:00
|
|
|
pub(crate) use std::{
|
|
|
|
borrow::Cow,
|
|
|
|
cmp,
|
|
|
|
collections::{BTreeMap, BTreeSet},
|
|
|
|
env,
|
2019-11-21 10:14:10 -08:00
|
|
|
fmt::{self, Debug, Display, Formatter},
|
2019-11-07 10:55:15 -08:00
|
|
|
fs,
|
|
|
|
io::{self, Write},
|
|
|
|
iter::{self, FromIterator},
|
2019-11-20 14:19:49 -08:00
|
|
|
ops::{Index, Range, RangeInclusive},
|
2019-04-11 15:23:14 -07:00
|
|
|
path::{Path, PathBuf},
|
2019-07-13 01:55:06 -07:00
|
|
|
process::{self, Command},
|
2019-11-21 06:23:32 -08:00
|
|
|
rc::Rc,
|
2019-10-31 17:39:25 -07:00
|
|
|
str::{self, Chars},
|
2019-04-11 15:23:14 -07:00
|
|
|
sync::{Mutex, MutexGuard},
|
|
|
|
usize, vec,
|
|
|
|
};
|
2018-03-17 09:17:41 -07:00
|
|
|
|
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
|
|
|
// modules used in tests
|
|
|
|
#[cfg(test)]
|
|
|
|
pub(crate) use crate::testing;
|
|
|
|
|
|
|
|
// structs and enums used in tests
|
|
|
|
#[cfg(test)]
|
|
|
|
pub(crate) use crate::{node::Node, tree::Tree};
|
|
|
|
|
2019-09-14 16:29:11 -07:00
|
|
|
// dependencies
|
2019-11-21 10:14:10 -08:00
|
|
|
pub(crate) use derivative::Derivative;
|
2019-04-11 15:23:14 -07:00
|
|
|
pub(crate) use edit_distance::edit_distance;
|
2019-10-09 00:18:53 -07:00
|
|
|
pub(crate) use libc::EXIT_FAILURE;
|
2019-04-11 15:23:14 -07:00
|
|
|
pub(crate) use log::warn;
|
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
|
|
|
pub(crate) use snafu::{ResultExt, Snafu};
|
2019-04-11 15:23:14 -07:00
|
|
|
pub(crate) use unicode_width::UnicodeWidthChar;
|
2018-03-17 09:17:41 -07:00
|
|
|
|
2019-09-14 16:29:11 -07:00
|
|
|
// modules
|
2019-11-19 03:51:44 -08:00
|
|
|
pub(crate) use crate::{config_error, keyword, setting};
|
2019-07-06 20:55:46 -07:00
|
|
|
|
2019-09-14 16:29:11 -07:00
|
|
|
// functions
|
2019-11-13 19:32:50 -08:00
|
|
|
pub(crate) use crate::{default::default, empty::empty, load_dotenv::load_dotenv, output::output};
|
2019-06-01 22:38:03 -07:00
|
|
|
|
2019-11-07 10:55:15 -08:00
|
|
|
// traits
|
2019-06-01 22:38:03 -07:00
|
|
|
pub(crate) use crate::{
|
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
|
|
|
command_ext::CommandExt, compilation_result_ext::CompilationResultExt, error::Error,
|
|
|
|
error_result_ext::ErrorResultExt, keyed::Keyed, ordinal::Ordinal,
|
|
|
|
platform_interface::PlatformInterface, range_ext::RangeExt,
|
2019-04-11 15:23:14 -07:00
|
|
|
};
|
|
|
|
|
2019-11-07 10:55:15 -08:00
|
|
|
// structs and enums
|
|
|
|
pub(crate) use crate::{
|
2019-11-21 07:39:32 -08:00
|
|
|
alias::Alias, analyzer::Analyzer, assignment::Assignment,
|
2019-12-07 03:09:21 -08:00
|
|
|
assignment_resolver::AssignmentResolver, binding::Binding, color::Color,
|
2019-11-07 10:55:15 -08:00
|
|
|
compilation_error::CompilationError, compilation_error_kind::CompilationErrorKind,
|
|
|
|
compiler::Compiler, config::Config, config_error::ConfigError, count::Count,
|
2019-12-07 03:09:21 -08:00
|
|
|
dependency::Dependency, enclosure::Enclosure, evaluator::Evaluator, expression::Expression,
|
|
|
|
fragment::Fragment, function::Function, function_context::FunctionContext,
|
|
|
|
interrupt_guard::InterruptGuard, interrupt_handler::InterruptHandler, item::Item,
|
|
|
|
justfile::Justfile, lexer::Lexer, line::Line, list::List, load_error::LoadError, module::Module,
|
|
|
|
name::Name, output_error::OutputError, parameter::Parameter, parser::Parser, platform::Platform,
|
|
|
|
position::Position, positional::Positional, recipe::Recipe, recipe_context::RecipeContext,
|
|
|
|
recipe_resolver::RecipeResolver, runtime_error::RuntimeError, scope::Scope, search::Search,
|
2019-11-10 23:17:47 -08:00
|
|
|
search_config::SearchConfig, search_error::SearchError, set::Set, setting::Setting,
|
|
|
|
settings::Settings, shebang::Shebang, show_whitespace::ShowWhitespace, state::State,
|
2019-11-21 10:14:10 -08:00
|
|
|
string_literal::StringLiteral, subcommand::Subcommand, table::Table, thunk::Thunk, token::Token,
|
2019-12-07 04:03:03 -08:00
|
|
|
token_kind::TokenKind, unresolved_dependency::UnresolvedDependency,
|
|
|
|
unresolved_recipe::UnresolvedRecipe, use_color::UseColor, variables::Variables,
|
|
|
|
verbosity::Verbosity, warning::Warning,
|
2019-11-07 10:55:15 -08:00
|
|
|
};
|
2019-04-19 02:40:25 -07:00
|
|
|
|
2019-11-07 10:55:15 -08:00
|
|
|
// type aliases
|
|
|
|
pub(crate) type CompilationResult<'a, T> = Result<T, CompilationError<'a>>;
|
2019-10-09 00:18:53 -07:00
|
|
|
pub(crate) type ConfigResult<T> = Result<T, ConfigError>;
|
2019-11-07 10:55:15 -08:00
|
|
|
pub(crate) type RunResult<'a, T> = Result<T, RuntimeError<'a>>;
|
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
|
|
|
pub(crate) type SearchResult<T> = Result<T, SearchError>;
|