fix(cli)!: deprecate --build flag for generate command
This commit is contained in:
parent
13d4db8bb4
commit
361287fb56
2 changed files with 4 additions and 14 deletions
|
|
@ -114,13 +114,13 @@ struct Generate {
|
|||
/// Only generate `grammar.json` and `node-types.json`
|
||||
#[arg(long)]
|
||||
pub no_parser: bool,
|
||||
/// Compile all defined languages in the current dir
|
||||
/// Deprecated: use the `build` command
|
||||
#[arg(long, short = 'b')]
|
||||
pub build: bool,
|
||||
/// Compile a parser in debug mode
|
||||
/// Deprecated: use the `build` command
|
||||
#[arg(long, short = '0')]
|
||||
pub debug_build: bool,
|
||||
/// The path to the directory containing the parser library
|
||||
/// Deprecated: use the `build` command
|
||||
#[arg(long, value_name = "PATH")]
|
||||
pub libdir: Option<PathBuf>,
|
||||
/// The path to output the generated source files
|
||||
|
|
@ -905,6 +905,7 @@ impl Generate {
|
|||
}
|
||||
}
|
||||
if self.build {
|
||||
warn!("--build is deprecated, use the `build` command");
|
||||
if let Some(path) = self.libdir {
|
||||
loader = loader::Loader::with_parser_lib_path(path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,17 +34,6 @@ The ABI to use for parser generation. The default is ABI 15, with ABI 14 being a
|
|||
|
||||
Only generate `grammar.json` and `node-types.json`
|
||||
|
||||
### `-0/--debug-build`
|
||||
|
||||
Compile the parser with debug flags enabled. This is useful when debugging issues that require a debugger like `gdb` or `lldb`.
|
||||
|
||||
### `--libdir <PATH>`
|
||||
|
||||
The directory to place the compiled parser(s) in.
|
||||
On Unix systems, the default path is `$XDG_CACHE_HOME/tree-sitter` if `$XDG_CACHE_HOME` is set,
|
||||
otherwise `$HOME/.config/tree-sitter` is used. On Windows, the default path is `%LOCALAPPDATA%\tree-sitter` if available,
|
||||
otherwise `$HOME\AppData\Local\tree-sitter` is used.
|
||||
|
||||
### `-o/--output`
|
||||
|
||||
The directory to place the generated parser in. The default is `src/` in the current directory.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue