Commit Graph

47 Commits

Author SHA1 Message Date
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
Kyle Gretchev
b36bda24fa use clap::crate_version!()
- `crate_version()!` will pull version from Cargo.toml
2019-08-24 12:38:18 -04:00
est31
6babefbb00 Remove some unused feature gates 2019-08-24 09:23:39 +02:00
est31
8bdc715e3e Remove async_await feature gates 2019-08-24 09:09:26 +02:00
Jonathan Turner
27dbc1cb9a Add syntect (and borrow bat's theme file) 2019-07-20 13:12:04 +12:00
Jonathan Turner
d5704808d4 First working plugin 2019-06-27 16:56:48 +12:00
Jonathan Turner
c969c2c362 Clean up old parser code 2019-06-25 16:33:12 +12:00
Yehuda Katz
4036bf1ffd &str -> Text 2019-06-22 16:46:16 -04:00
Yehuda Katz
a8574abbf2 Improve errors 2019-06-02 22:11:21 -07:00
Jonathan Turner
2a20192519 Fix up some warnings and move integration tests to correct dir 2019-06-03 15:48:58 +12:00
Jonathan Turner
040c3a5e9c Add first integration test 2019-06-02 15:37:09 +12:00
Jonathan Turner
be5fd58cca
Merge pull request #59 from jonathandturner/gitbranch
Show the current git branch in the prompt
2019-06-02 11:39:58 +12:00
Yehuda Katz
f7590d924e Remove stray commented out lines 2019-06-01 14:15:21 -07:00
Jonathan Turner
d6cd0df232 Add git branch to prompt 2019-06-02 09:11:28 +12:00
Yehuda Katz
5d4097073b Add --loglevel and --develop
--loglevel sets the log level for all of nu
--develop takes a list of modules and turns on trace mode for them
2019-06-01 10:00:42 -07:00
Yehuda Katz
d5255f6dbf
Evaluator MVP (#39)
Evaluator, MVP
2019-05-27 23:45:18 -07:00
Yehuda Katz
b74daa2e60 A real parser (lalrpop) 2019-05-26 00:17:35 -07:00
Yehuda Katz
f9fb353c5c Streams are wired up pairwise 2019-05-24 00:29:16 -07:00
Yehuda Katz
bf332ea50c Improved streams 2019-05-23 21:34:43 -07:00
Yehuda Katz
625a356361 Data flows across commands via streams now 2019-05-23 00:23:06 -07:00
Yehuda Katz
31dd579d6f Small restructuring 2019-05-22 21:30:43 -07:00
Yehuda Katz
261d7a793f Restructure and make commands uniform 2019-05-22 00:12:03 -07:00
Jonathan Turner
75b7842618 Fix quoted string handling 2019-05-18 07:42:55 -07:00
Jonathan Turner
2e2831de95 Rename bat -> view 2019-05-18 07:15:22 -07:00
Yehuda Katz
c30fc32b0c Bat 2019-05-17 18:24:13 -07:00
Yehuda Katz
2feef6bd25 Added a first pass at sort-by 2019-05-17 08:55:50 -07:00
Yehuda Katz
9d8bb48d3f Fix Linux 2019-05-17 08:30:10 -07:00
Yehuda Katz
3ca0e2bf0c
Merge pull request #3 from jonathandturner/fix_ansi
Make sure to enable ANSI for Win10
2019-05-16 23:38:44 -07:00
Yehuda Katz
11677735f1 Fix Linux/Windows build on nightly 2019-05-16 23:37:35 -07:00
Jonathan Turner
c1398145f3 Add windows cfg check 2019-05-16 21:37:18 -07:00
Jonathan Turner
3c2ac7df54 Make sure to enable ANSI for Win10 2019-05-16 18:07:11 -07:00
Yehuda Katz
98ab5e63fc Refactor the repl loop 2019-05-16 14:43:36 -07:00
Jonathan Turner
b342069fd5 Workaround color prompt by making our own helper 2019-05-16 06:06:46 -07:00
Jonathan Turner
cbb86b0cab Add support for skip and where 2019-05-15 19:42:44 -07:00
Yehuda Katz
6b82e3a8a8 Simplify commands 2019-05-15 17:21:46 -07:00
Yehuda Katz
af1963d148 Remove dead code 2019-05-15 15:58:44 -07:00
Yehuda Katz
a5a34b88a8 More cleanup 2019-05-15 15:23:36 -07:00
Yehuda Katz
91f7d5384f Strip away a bit of cruft and add reject 2019-05-15 14:44:06 -07:00
Yehuda Katz
8f327477e7 Internals cleanup and | select ...fields 2019-05-15 13:14:51 -05:00
Yehuda Katz
3040638881 Basic pipelining is working! 2019-05-15 11:12:38 -05:00
Yehuda Katz
975ff7c2fb Very very basic piping working 2019-05-13 17:00:25 -04:00
Yehuda Katz
ceb0487eba A bunch of rework
I'm gonna use a VecDeque now instead of trying to get async streams
working to make progress, but the intent is that we should be able to
use async streams in and out to interleave the work better.
2019-05-13 13:30:51 -04:00
Yehuda Katz
e6da37f5be Continue prepping for object streams 2019-05-11 15:59:57 -07:00
Yehuda Katz
aa3fe0b0db Prep for streaming objects 2019-05-11 01:08:21 -07:00
Yehuda Katz
51e921b085 A bit more infra 2019-05-11 00:00:33 -07:00
Yehuda Katz
e44d657424 Simple parsing 2019-05-10 21:45:57 -07:00
Yehuda Katz
8f3b273337 objectshell initial commit 2019-05-10 09:59:12 -07:00