Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize JSON dump format #1633

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2313,8 +2313,7 @@ $ just --dump > formatted-justfile
```

The `--dump` command can be used with `--dump-format json` to print a JSON
representation of a `justfile`. The JSON format is currently unstable, so the
`--unstable` flag is required.
representation of a `justfile`.

### Fallback to parent `justfile`s

Expand Down
1 change: 0 additions & 1 deletion src/subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ impl Subcommand {
fn dump(config: &Config, ast: Ast, justfile: Justfile) -> Result<(), Error<'static>> {
match config.dump_format {
DumpFormat::Json => {
config.require_unstable("The JSON dump format is currently unstable.")?;
serde_json::to_writer(io::stdout(), &justfile)
.map_err(|serde_json_error| Error::DumpJson { serde_json_error })?;
println!();
Expand Down
10 changes: 0 additions & 10 deletions tests/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,16 +705,6 @@ fn quiet() {
);
}

#[test]
fn requires_unstable() {
Test::new()
.justfile("foo:")
.args(["--dump", "--dump-format", "json"])
.stderr("error: The JSON dump format is currently unstable. Invoke `just` with the `--unstable` flag to enable unstable features.\n")
.status(EXIT_FAILURE)
.run();
}

#[test]
fn settings() {
test(
Expand Down