Skip to content

Commit 730fd89

Browse files
Merge pull request #285 from github/new-releases
2 parents 3e852e4 + b00f74f commit 730fd89

File tree

11 files changed

+47
-14
lines changed

11 files changed

+47
-14
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ clap = { version = "4", optional = true }
3232
glob = "0.3"
3333
serde = { version = "1.0", features = ["derive"] }
3434
serde_json = "1.0"
35-
stack-graphs = { version = "0.10", path = "../../stack-graphs" }
36-
tree-sitter-stack-graphs = { version = "0.6", path = "../../tree-sitter-stack-graphs" }
35+
stack-graphs = { version = "0.11", path = "../../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"] }

lsp-positions/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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+
## v0.3.2 -- 2023-06-08
9+
10+
### Added
11+
12+
- Support `serde` for `Position`, `Span`, and `Offset`.
13+
814
## 0.3.1 - 2022-08-23
915

1016
#### Fixed

lsp-positions/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lsp-positions"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
description = "LSP-compatible character positions"
55
homepage = "https://github.com/github/stack-graphs/tree/main/lsp-positions"
66
repository = "https://github.com/github/stack-graphs/"

stack-graphs/CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,34 @@ 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.11.0 -- 2023-06-08
99

1010
### Added
1111

1212
- New `Defines` and `Refers` assertions test for the presence of definitions and references, respectively, without resolution.
1313
- A method `StackGraph::get_file` to look up an existing file.
1414
- A field named `fully_qualified_name` was added to `SourceInfo`.
15+
- A new `serde` module (requiring the `serde` feature) adds serialization and deserialization of stack graphs and partial paths.
16+
- Stack graphs can now record debug information for edges as it did for noeds. This is also displayed in the HTML visualization when hovering over an edge arrow.
17+
- A new `storage` module (requiring the `storage` feature) implements a simple SQLite database for storing stack graphs and partial paths.
18+
19+
### Fixed
20+
21+
- A bug in `PartialPath::concatenate` that prevented stitching partial paths that were joined at a pop or push node.
1522

1623
### Changed
1724

1825
- The `IncorrectDefinitions` error is renamed to `IncorrectlyDefined`, and `IncorrectDefinitions` is the error used for the `Defines` assertion.
1926
- The `PartialPaths::find_all_partial_paths_in_file` method has been replaced by `PartialPaths::find_minimal_partial_path_set_in_file`, which computes a smaller set. The `ForwardPartialPathStitcher::find_locally_maximal_partial_path_set` function can be used to compute the set previously returned by `find_all_partial_paths_in_file` from the minimal partial path set.
27+
- The cycle detection algorithm, which had the dual repsonisbility of detecting path cycles and culling duplicate paths, has been replaced by a new approach consisting of a new cycle detection algorithm and an optional duplicate path detection algorithm. This fixes issues with the old approach which was based on a heuristic and would sometimes keep too many paths, and sometimes throw away too many. The new algorithms are precise instead of using a heuristic and resolve unpredictable resolution behavior.
28+
- An empty scope stack postcondition is not required anymore for a path to be considered complete. (Symbol stack postconditions must still be empty in complete paths!)
29+
- The visualization code requires the `visualization` feature instead of the `json` feature, and implies the `serde` feature.
30+
- A new `CancelAfterDuration` cancellation flag implementation has been added to easily set timeout-based cancellation.
2031

2132
### Removed
2233

2334
- The method `StackGraph::get_file_unchecked` is removed. Use the new `StackGraph::get_file` instead.
35+
- All the functionality related to `Path` has been removed in favor of using `PartialPath`. In general, the `Path` behavior of can be achieved by using a `PartialPath` with finite preconditions (i.e., no symbol or scope stack variables), which can be created using `PartialPath::eliminate_precondition_stack_variables`.
2436

2537
## v0.10.2 -- 2023-01-10
2638

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 = "stack-graphs"
3-
version = "0.10.2"
3+
version = "0.11.0"
44
description = "Name binding for arbitrary programming languages"
55
homepage = "https://github.com/github/stack-graphs/tree/main/stack-graphs"
66
repository = "https://github.com/github/stack-graphs/"

stack-graphs/README.md

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

1010
``` toml
1111
[dependencies]
12-
stack-graphs = "0.10"
12+
stack-graphs = "0.11"
1313
```
1414

1515
Check out our [documentation](https://docs.rs/stack-graphs/) for more details on

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: 2 additions & 2 deletions
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/"
@@ -69,7 +69,7 @@ regex = "1"
6969
rust-ini = "0.18"
7070
serde_json = { version="1.0", optional=true }
7171
sha1 = { version="0.10", optional=true }
72-
stack-graphs = { version="0.10", path="../stack-graphs" }
72+
stack-graphs = { version="0.11", path="../stack-graphs" }
7373
thiserror = "1.0"
7474
time = { version = "0.3", optional = true }
7575
tokio = { version = "1.26", optional = true, features = ["io-std", "rt", "rt-multi-thread"] }

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

0 commit comments

Comments
 (0)