Skip to content

Commit b00f74f

Browse files
Bump tree-sitter-stack-graphs version to v0.7.0 and update changelog
1 parent 46d016b commit b00f74f

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
lines changed

languages/tree-sitter-stack-graphs-java/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ harness = false # need to provide own main function to handle running tests
3636
[dependencies]
3737
anyhow = "1.0"
3838
clap = { version = "4", features = ["derive"] }
39-
tree-sitter-stack-graphs = { version = "~0.6.0", path = "../../tree-sitter-stack-graphs", features=["cli"] }
39+
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs", features=["cli"] }
4040
tree-sitter-java = { version = "~0.20.0" }

languages/tree-sitter-stack-graphs-typescript/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ glob = "0.3"
3333
serde = { version = "1.0", features = ["derive"] }
3434
serde_json = "1.0"
3535
stack-graphs = { version = "0.11", path = "../../stack-graphs" }
36-
tree-sitter-stack-graphs = { version = "0.6", path = "../../tree-sitter-stack-graphs" }
36+
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs" }
3737
tree-sitter-typescript = "0.20.2"
3838
tsconfig = "0.1.0"
3939

4040
[dev-dependencies]
4141
anyhow = { version = "1.0" }
42-
tree-sitter-stack-graphs = { version = "0.6", path = "../../tree-sitter-stack-graphs", features = ["cli"] }
42+
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs", features = ["cli"] }

tree-sitter-stack-graphs/CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,25 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## Unreleased
8+
## v0.7.0 -- 2023-06-08
99

1010
### Library
1111

1212
#### Added
1313

1414
- A new `CancelAfterDuration` implementation of `CancellationFlag` that cancels the computation after a certain amount of time.
15+
- Tests can use new `defines` and `refers` assertions to check that a definition or reference with the give name exists at the assertion's source location.
1516

1617
#### Changed
1718

1819
- The `LanguageConfiguration::matches_file` method takes a `ContentProvider` instead of an `Option<&str>` value. This allows lazy file reading *after* the filename is checked, instead of the unconditional loading required before. To give content readers the opportunity to cache read values, a mutable reference is required. The return type has changed to `std::io::Result` to propagate possible errors from content providers. A `FileReader` implementation that caches the last read file is provided as well.
20+
- Tests run with the CI `Tester` timeout after 60 seconds by default. Set `Tester::max_test_time` to change this behavior.
21+
- A new `StackGraphLanguage::from_source` function can be used to construct a stack graph language from a given TSG source. The `StackGraphLanguage` type can also record the TSG file path, which is used when displaying errors.
22+
- The `LoadError` type has been renamed to `BuildError` to avoid confusion between it and the `loader::LoadError` type.
23+
- Cancellation flags support the `|` (or) operator to allow easy composition.
24+
- The `LanguageConfiguration::from_tsg_str` method has been renamed to `LanguageConfiguration::from_sources`, and additionally accepts path parameters which are used for error message display.
25+
- The `loader::LoadError` type now has a lifetime parameter and supports pretty error display.
26+
- The loaders return a `FileLanguageConfiguration` value instead of a `StackGraphLanguage`, which contains both the primary `StackGraphLanguage` as well as any file analyzers for other secondary languages.
1927

2028
#### Fixed
2129

@@ -25,8 +33,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2533

2634
#### Added
2735

28-
- A new `analyze` command that computes stack graphs and partial paths for all given source files and directories. The command does not produce any output at the moment. Analysis per file can be limited using the `--max-file-time` flag.
36+
- A new `analyze` command that computes stack graphs and partial paths for all given source files and directories and stores results in a database. The command does not produce any output at the moment. Analysis per file can be limited using the `--max-file-time` flag.
37+
- A new `query` command can be used to resolve references using the analysis database.
38+
- A new `status` command shows the status of files in the analysis database. The status includes whether the file was analyzed or not, and if the analysis was successful.
39+
- A new `clean` command can be used to clean the analysis database, either completely or for specific paths.
2940
- A new `match` command executes the query patterns from the TSG source and outputs the matches with captured nodes to the console. The `--stanza/-S` flag can be used to select specific stanzas to match by giving the line number where the stanza appears in the source. (Any line that is part of the stanza will work.)
41+
- A new `visualize` command generates HTML visualizations based on the analysis database. Note that visualizations do not scale well, so this should only be used on small and few files.
42+
- A new `lsp` command implements a basic LSP server that can be used in e.g. a VS Code plugin. Note that the implementation is not optimized and currently rather slow.
43+
- The `init` command was updated and supports a `--internal` flag to easily generate language projects that are meant to be part of the projects repository.
3044

3145
#### Changed
3246

@@ -36,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3650
- The output of the `test` and `analyze` commands has changed in debug builds to include the run time per file.
3751
- The `--hide-failure-errors` has been renamed to the more general `--hide-error-details`. The new flag is supported by the `test` and `analyze` commands.
3852
- The files in directory arguments are now processed in filename order.
53+
- The `test` command also skips directories with a `.skip` extension, not just files.
3954

4055
## v0.6.0 -- 2023-01-13
4156

tree-sitter-stack-graphs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tree-sitter-stack-graphs"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
description = "Create stack graphs using tree-sitter parsers"
55
homepage = "https://github.com/github/stack-graphs/tree/main/tree-sitter-stack-graphs"
66
repository = "https://github.com/github/stack-graphs/"

tree-sitter-stack-graphs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use this library, add the following to your `Cargo.toml`:
1515

1616
``` toml
1717
[dependencies]
18-
tree-sitter-stack-graphs = "0.6"
18+
tree-sitter-stack-graphs = "0.7"
1919
```
2020

2121
Check out our [documentation](https://docs.rs/tree-sitter-stack-graphs/*/) for

tree-sitter-stack-graphs/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tree-sitter-stack-graphs",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "Create stack graphs using tree-sitter parsers",
55
"homepage": "https://github.com/github/stack-graphs/tree/main/tree-sitter-stack-graphs",
66
"repository": {

0 commit comments

Comments
 (0)