nushell/src
Yehuda Katz 439889dcef Feature flagging infrastructure
This commit adds the ability to work on features behind a feature flag
that won't be included in normal builds of nu.

These features are not exposed as Cargo features, as they reflect
incomplete features that are not yet stable.

To create a feature, add it to `features.toml`:

```toml
[hintsv1]

description = "Adding hints based on error states in the highlighter"
enabled = false
```

Each feature in `features.toml` becomes a feature flag accessible to `cfg`:

```rs
println!("hintsv1 is enabled");
```

By default, features are enabled based on the value of the `enabled` field.

You can also enable a feature from the command line via the
`NUSHELL_ENABLE_FLAGS` environment variable:

```sh
$ NUSHELL_ENABLE_FLAGS=hintsv1 cargo run
```

You can enable all flags via `NUSHELL_ENABLE_ALL_FLAGS`.

This commit also updates the CI setup to run the build with all flags off and
with all flags on. It also extracts the linting test into its own
parallelizable test, which means it doesn't need to run together with every
other test anymore.

When working on a feature, you should also add tests behind the same flag. A
commit is mergable if all tests pass with and without the flag, allowing
incomplete commits to land on master as long as the incomplete code builds and
passes tests.
2019-10-11 17:19:44 -07:00
..
commands Overhaul the coloring system 2019-10-10 19:30:04 -07:00
data Overhaul the coloring system 2019-10-10 19:30:04 -07:00
env Replace crate visibility identifier with pub(crate) 2019-08-29 13:09:09 +02:00
evaluate Overhaul the expansion system 2019-10-10 08:27:51 -07:00
format Replace vtable with pivot command 2019-09-17 19:07:11 +12:00
parser Overhaul the coloring system 2019-10-10 19:30:04 -07:00
plugins Overhaul the coloring system 2019-10-10 19:30:04 -07:00
shell Overhaul the coloring system 2019-10-10 19:30:04 -07:00
cli.rs Overhaul the coloring system 2019-10-10 19:30:04 -07:00
commands.rs Overhaul the expansion system 2019-10-10 08:27:51 -07:00
context.rs Overhaul the coloring system 2019-10-10 19:30:04 -07:00
data.rs Move internal terminology to tables/rows 2019-09-06 04:23:42 +12:00
env.rs Replace crate visibility identifier with pub(crate) 2019-08-29 13:09:09 +02:00
errors.rs Overhaul the coloring system 2019-10-10 19:30:04 -07:00
format.rs Replace vtable with pivot command 2019-09-17 19:07:11 +12:00
fuzzysearch.rs Fix build without crossterm 2019-09-24 23:33:30 +02:00
git.rs Fix formatting with cargo fmt 2019-08-26 20:19:05 +02:00
lib.rs Overhaul the expansion system 2019-10-10 08:27:51 -07:00
main.rs Feature flagging infrastructure 2019-10-11 17:19:44 -07:00
parser.rs Overhaul the coloring system 2019-10-10 19:30:04 -07:00
plugin.rs Overhaul the coloring system 2019-10-10 19:30:04 -07:00
prelude.rs Overhaul the coloring system 2019-10-10 19:30:04 -07:00
shell.rs run rustfmt 2019-09-11 10:36:50 -04:00
stream.rs Replace crate visibility identifier with pub(crate) 2019-08-29 13:09:09 +02:00
traits.rs Revert "Revert "Migrate most uses of the Span concept to Tag"" 2019-09-14 11:30:24 -05:00
utils.rs Add urlencode/urldecode 2019-09-19 16:25:29 +12:00