fork of https://github.com/tree-sitter/tree-sitter-graph
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

1# Changelog 2 3All notable changes to this project will be documented in this file. 4 5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8## v0.11.0 -- 2023-07-17 9 10### Library 11 12#### Added 13 14- Store a debug attribute for the matched syntax node, providing information about the syntactic category of the match that gave rise to the graph node. 15 16## v0.10.5 -- 2023-06-26 17 18#### Fixed 19 20- A panic that sometimes occurred in lazy execution mode. 21 22## v0.10.4 -- 2023-06-02 23 24### Library 25 26#### Added 27 28- Several errors include more context in the error message: Duplicate errors report both statements using source snippets. Edge statements report which argument (the source or the sink) triggered an evluation error. 29 30#### Fixed 31 32- Ensure that edge attribute statements are executed after edges are created, to prevent non-deterministic ordering bugs in lazy execution mode. 33 34## v0.10.3 -- 2023-06-01 35 36### DSL 37 38#### Added 39 40- Scoped variables can be inherited by child nodes by specifying `inherit .var_name` as part of the source. Using `@node.var_name` will either use the value set on the node itself, or otherwise the one set on the closest enclosing node. 41 42## v0.10.2 -- 2023-05-25 43 44### Library 45 46#### Added 47 48- Edge debug information now contains the TSG location of the `edge` statement if `ExecutionConfig::location_attr` is set. 49 50#### Changed 51 52- The TSG location in the debug information is formatted more explicitly as `line XX column YY` instead of `(XX, YY)`. 53 54## v0.10.1 -- 2023-05-15 55 56### Library 57 58#### Added 59 60- The `ast::File::try_visit_matches` method can be used to execute the stanza query matching without executing the stanza bodies. 61 62## v0.10.0 -- 2023-05-10 63 64### DSL 65 66#### Changed 67 68- Unused captures in patterns are now considered errors, unless they start with an underscore. 69 70### Library 71 72#### Fixed 73 74- Some execution errors were not always reported in lazy execution mode, depending on whether variables were used or not. This has been fixed to behave more consistently, so that errors are always reported regardless of variable use. 75 76### CLI 77 78#### Added 79 80- Errors from setting a scoped variable twice on the same node are now reported with source snippets for both statements involved. 81 82## v0.9.2 -- 2023-04-14 83 84### Library 85 86#### Added 87 88- The `parse_error::Excerpt` type, which is used to show source excerpts, is now public. 89 90## v0.9.1 -- 2023-04-03 91 92### CLI 93 94#### Added 95 96- Errors from parsing and checking the TSG file are now displayed with source excerpts. 97 98## v0.9.0 -- 2023-03-31 99 100### Library 101 102#### Changed 103 104- The method `ParseError::display(source: &str, verbose: bool)` has been replaced by two methods `ParseError::display(path: &path, source: &str)` and `ParseError::display_pretty(path: &Path, source: &str)`. 105 106### CLI 107 108#### Changed 109 110- Parse errors are now displayed with the same excerpt style as execution errors. 111 112## 0.8.0 -- 2023-03-29 113 114### Library 115 116#### Fixed 117 118- Fix error formatting panic with strict execution. 119 120#### Changed 121 122- The traits stored in `Functions` must now implement `Send` and `Sync` to ensure they can be shared more easily in concurrent situations. 123 124## 0.7.0 -- 2022-10-18 125 126### DSL 127 128#### Added 129 130- Global variables can be given default string values using `global NAME = "STRING"` syntax. 131- Function `eq` to compare two values for equality. 132- Function `format` to format strings. 133- Function `concat` to concatenate lists. 134- Function `join` to join a list of values using an optional separator. 135 136#### Removed 137 138- References to undefined variables now result in errors, instead of assuming its an undeclared global variable. 139 140### Library 141 142#### Fixed 143 144- Query errors now report the correct column for errors on the first row of a query. 145 146#### Added 147 148- The `Variables` type has additional methods `is_empty` and `iter`. 149 150#### Changed 151 152- References to `ExecutionConfig` passed to `File::execute*` are not required to be mutable anymore. 153 154## 0.6.1 -- 2022-09-06 155 156### Library 157 158#### Fixed 159 160- Cancellation errors during execution are now propagated all the way up, instead of being wrapped in other errors. 161 162#### Added 163 164- The `ExecutionError` type now supports formatting errors with excerpts from the program and TSG source by using the `.display_pretty` method. 165 166#### Changed 167 168- `Variables::nested` does now accept a non-mutable reference. 169 170### CLI 171 172#### Added 173 174- Execution errors now include excerpts from the program and TSG source when printed. 175 176## 0.6.0 -- 20220-08-23 177 178### Library 179 180#### Added 181 182- Cancellation of `ast::File` execution is now supported by passing an implementation of the `CancellationFlag` trait. 183 The `NoCancellation` type provides a noop implementation. 184 185#### Fixed 186 187- Fixed bug in `Identifier` so `ast::File` instances can be safely shared between threads. 188 189#### Changed 190 191- Functions are not passed as mutable anymore, so that they can safely used concurrently and reused between executions. 192- `ast::File::execute` requires an extra `CancellationFlag` parameter. Use `&NoCancellation` if no cancellation is required. 193 194### CLI 195 196#### Added 197 198- Global variables can be provided by passing `--global VAR=VAL` flags. Only string values are supported. 199 200## 0.5.1 -- 2022-05-11 201 202### DSL 203 204- Reference the new VS Code extension in the README. 205 206## 0.5.0 -- 2022-05-09 207 208### DSL 209 210#### Fixed 211 212- Report query errors with correct source locations. 213 214### Library 215 216#### Changed 217 218- In JSON output, all values are represented as objects with a `type` field 219 indicating the value type, and additional value fields that vary per type. 220 221### CLI 222 223#### Added 224 225- Flag `--output`/`-o` to set JSON output path. 226 227## 0.4.0 -- 2022-03-21 228 229### DSL 230 231#### Added 232 233- Global variable declarations. 234- Attribute shorthands. 235- List and set comprehensions. 236 237#### Deprecated 238 239- Use of undeclared global variables. 240 241### Library 242 243#### Added 244 245- Module `parse_error` for finding and displaying `tree-sitter` parse errors. 246- Option in `ExecutionConfig` to automatically add debug graph node attributes that describe the source location and variable name of the originating `node` statement in the DSL source. 247 248#### Changed 249 250- Calls to `execute` will fail with a runtime error if declared global variables are missing in the global environment. 251- Calls to `execute` will not fail early on parse trees with errors. Errors may occur during query execution if matched parts of the tree are missing. 252- The seperate arguments to `execute` are replaced by a single `ExecutionConfig` argument, which makes it easier to add optional arguments without breaking all use sites. 253 254#### Removed 255 256- The `execute_lazy` method has been removed. Lazy evalaution is enabled by setting the `lazy` flag in the `ExecutionConfig`. 257 258### CLI 259 260#### Added 261 262- Flag `--allow-parse-errors` that allows running against input files with parse errors. 263 264#### Changed 265 266- Improved formatting of parse error messages. 267 268## 0.3.0 - 2022-02-08 269 270### DSL 271 272#### Added 273 274- Loop statement to iterate over list values. 275- Conditional statement to check optional and boolean values. 276- Boolean functions `and`, `or`, and `not`. 277- Lazy evaluation strategy that does not rely on textual stanza order. 278 279#### Changed 280 281- Variables are now scoped in blocks, and will not escape or overwrite variables defined in enclosing blocks. 282- Fix nested function calls, which would lose their arguments. 283- Fix nested `scan` statements, which would lose outer captures after the inner statement. 284- Construct capture values based in query quantifiers, e.g., create a list for `@cap*` or an optional value for `@cap?`. 285- Rename `child-index` to the more accurate `named-child-index` 286 287#### Removed 288 289- The `scan` statement cannot be applied to values that are not local to the stanza, i.e., values that depend on scoped variables. 290 291### Library 292 293#### Added 294 295- Method `File::execute_lazy` to use lazy evaluation strategy. 296- Methods `File::execute_into` and `File::execute_lazy_into` to use an existing graph instance, instead of creating a new one. 297- Various `Value::into_*` and `Value::as_*` methods. 298 299#### Changed 300 301- The method `Graph::display_with` is renamed to `Graph::pretty_print`. 302 303#### Deprecated 304 305- The method `File::parse` is deprecated because it it not sound anymore, and should be replaced by the `File::from_str` method. 306- The method `Value::into_syntax_node` is deprecated, and should be replaced by explicit graph indexing. 307 308#### Removed 309 310- The `Context` object for string interning is removed, along with the `ctx` parameters of methods. 311 312### CLI 313 314#### Added 315 316- JSON output mode for the resulting graph, controlled by the `--json` flag. 317- A `--lazy` flag to use the lazy evaluation strategy. 318- A `--quiet` flag to suppress graph output.