|
17 | 17 | you know what to do). |
18 | 18 | --> |
19 | 19 |
|
| 20 | +## Release 2.6.1 (2021-09-07) |
| 21 | + |
| 22 | +- The bundled extractors are updated to match the versions currently |
| 23 | + used on LGTM.com. These are newer than the last release (1.27) of |
| 24 | + LGTM Enterprise. If you plan to upload databases to an LGTM |
| 25 | + Enterprise 1.27 instance, you need to create them with release |
| 26 | + 2.4.6. |
| 27 | + |
| 28 | +### Potentially breaking changes |
| 29 | + |
| 30 | +- The `codeql resolve qlref` command will now throw an error when the |
| 31 | + target is ambiguous. |
| 32 | + |
| 33 | + The qlref resolution rules are now as follows: |
| 34 | + |
| 35 | + 1. If the target of a qlref is in the same qlpack, then that target is |
| 36 | + always returned. |
| 37 | + |
| 38 | + 2. If multiple targets of the qlref are found in dependent packs, this |
| 39 | + is an error. |
| 40 | + |
| 41 | + Previously, the command would have arbitrarily chosen one of the targets |
| 42 | + and ignored any ambiguities. |
| 43 | + |
| 44 | +- The `qlpack` directive in query suites has its semantics changed. |
| 45 | + Previously, this directive would return all queries in the qlpack. Now, |
| 46 | + the directive returns only those queries matched by the `defaultSuite` |
| 47 | + directive in the query pack. Here is an example: |
| 48 | + |
| 49 | + Consider a `qlpack.yml` like the following: |
| 50 | + |
| 51 | + ```yml |
| 52 | + name: codeql/my-qlpack |
| 53 | + version: 0.0.1 |
| 54 | + defaultSuite: |
| 55 | + queries: standard |
| 56 | + ``` |
| 57 | +
|
| 58 | + And the directory structure is the following: |
| 59 | +
|
| 60 | + ```text |
| 61 | + qlpack.yml |
| 62 | + standard/ |
| 63 | + a.ql |
| 64 | + experimental/ |
| 65 | + b.ql |
| 66 | + ``` |
| 67 | + |
| 68 | + A query suite `suite.qls` like this: |
| 69 | + |
| 70 | + ```yml |
| 71 | + - qlpack: codeql/my-qlpack |
| 72 | + ``` |
| 73 | +
|
| 74 | + Previously, would return all the queries in all subdirectories (i.e, |
| 75 | + `standard/a.ql` and `experimental/b.ql`). Now, it only returns |
| 76 | + `standard/a.ql`, since that is the only query matched by its default |
| 77 | + suite. |
| 78 | + |
| 79 | + If you want to have the same behavior as before, you must update your |
| 80 | + query suites to use the `queries` directive with a `from` attribute, |
| 81 | + like this: |
| 82 | + |
| 83 | + ```yml |
| 84 | + - queries: . |
| 85 | + from: codeql/my-qlpack |
| 86 | + ``` |
| 87 | + |
| 88 | +### New features |
| 89 | + |
| 90 | +- Commands that evaluate CodeQL queries now support an additional option |
| 91 | + `--evaluator-log=path/to/log.json` that will result in the evaluator |
| 92 | + producing a structured log (in JSON format) of events that occurred |
| 93 | + during evaluation in order to aid debugging of query performance. The |
| 94 | + format of these logs will be subject to change with no notice as we |
| 95 | + make modifications to the evaluator. |
| 96 | + |
| 97 | + There is also a new CLI command `codeql generate log-summary` that will |
| 98 | + produce a summary of the predicates that were evaluated from these event |
| 99 | + logs. We will aim to keep this summary format more stable, although it |
| 100 | + is also subject to change. Unless you have a good reason to use the |
| 101 | + event logs directly, it is strongly recommended you use this command to |
| 102 | + produce summary logs and use these instead. |
| 103 | + |
| 104 | + For further information on these new logs and additional options to |
| 105 | + configure their format and verbosity, please refer to the CLI |
| 106 | + documentation. |
| 107 | + |
| 108 | +### New language features |
| 109 | + |
| 110 | +- QL classes can now be non-extending subtypes via the `instanceof` |
| 111 | + keyword, allowing for a form of private subtyping that is not visible |
| 112 | + externally. Methods of the supertype are accessible from within a |
| 113 | + non-extending subtype class through extended semantics of the `super` |
| 114 | + keyword. |
| 115 | + |
| 116 | + ``` |
| 117 | + class Foo instanceof int { |
| 118 | + Foo() { this in [1 .. 10] } |
| 119 | + string toString() { result = "foo" + super.toString() } |
| 120 | + } |
| 121 | + ``` |
| 122 | + |
20 | 123 | ## Release 2.6.0 (2021-08-24) |
21 | 124 |
|
22 | 125 | - The bundled extractors are updated to match the versions currently |
|
0 commit comments