From 0a62500c377ef895ae2c3d09f9389175f1c29820 Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Thu, 20 Jul 2023 14:23:23 +0000 Subject: [PATCH 1/6] Add changelog entries for 2.0 release --- CHANGELOG.md | 3 ++ packages/generator-langium/CHANGELOG.md | 6 +++ packages/langium-cli/CHANGELOG.md | 33 ++++++++++++++- packages/langium-vscode/CHANGELOG.md | 7 +++- packages/langium/CHANGELOG.md | 54 +++++++++++++++++++++++++ 5 files changed, 101 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eee2f1233..c88385871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ We maintain separate change logs for the individual packages: ## Closed Issues and PRs +* [v2.0.0](https://github.com/langium/langium/milestone/7?closed=1) +* [v1.2.0](https://github.com/langium/langium/milestone/8?closed=1) +* [v1.1.0](https://github.com/langium/langium/milestone/6?closed=1) * [v1.0.0](https://github.com/langium/langium/milestone/5?closed=1) * [v0.5.0](https://github.com/langium/langium/milestone/4?closed=1) * [v0.4.0](https://github.com/langium/langium/milestone/3?closed=1) diff --git a/packages/generator-langium/CHANGELOG.md b/packages/generator-langium/CHANGELOG.md index 5f91997fc..8afc83fd1 100644 --- a/packages/generator-langium/CHANGELOG.md +++ b/packages/generator-langium/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log of `generator-langium` +## v2.0.0 (Jul. 2023) + +* Added a bundle configuration using `esbuild` ([#1125](https://github.com/langium/langium/pull/1125)). +* Configured the project as an ESM project to adapt to the changes in Langium ([#1125](https://github.com/langium/langium/pull/1125)). +* Fixed a few syntax highlighting related issues ([#1064](https://github.com/langium/langium/pull/1064), [#1079](https://github.com/langium/langium/pull/1079)). + ## v1.2.0 (May. 2023) * Refactored the generator to enable multiple "environments". Devs will be asked whether they want a given environment in their project setup: diff --git a/packages/langium-cli/CHANGELOG.md b/packages/langium-cli/CHANGELOG.md index 39effedf4..c1f38cf94 100644 --- a/packages/langium-cli/CHANGELOG.md +++ b/packages/langium-cli/CHANGELOG.md @@ -1,6 +1,37 @@ # Change Log of `langium-cli` -## v1.2.1 (June. 2023) +## v2.0.0 (Jul. 2023) + +### Railroad Syntax Diagrams + +With the introduction of [`langium-railroad`](https://github.com/langium/langium/tree/main/packages/langium-railroad), the CLI is now capable of generating railroad syntax diagrams for your language ([#1075](https://github.com/langium/langium/pull/1075)). +To generate them to a file, use the following example config: + +```json +{ + ... + "languages": [{ + ... + "railroad": { + "out": "docs/syntax-diagram.html" + } + }], + ... +} +``` + +### Generated Terminal Definitions + +The generated `ast.ts` file will now also contain an object containing all regular expressions used by your grammar's terminal rules ([#1097](https://github.com/langium/langium/pull/1097)). +This allows to more easily reuse those regular expressions in your code. + +### General Improvements + +* The CLI can now resolve grammar imports transitively ([#1113](https://github.com/langium/langium/pull/1113)). +* A new `mode` configuration/argument can be used to improve bundle size of Langium projects ([#1077](https://github.com/langium/langium/pull/1077)). +* Fixed an error in the way the CLI creates directories ([#1105](https://github.com/langium/langium/pull/1105)). + +## v1.2.1 (Jun. 2023) * The generated code now performs split imports for runtime and compile time dependencies ([#1018](https://github.com/langium/langium/pull/1018)). * The new configuration field `importExtension` can be used to specify the file extension for generated imports ([#1072](https://github.com/langium/langium/pull/1072)). diff --git a/packages/langium-vscode/CHANGELOG.md b/packages/langium-vscode/CHANGELOG.md index f08c2c33a..632414711 100644 --- a/packages/langium-vscode/CHANGELOG.md +++ b/packages/langium-vscode/CHANGELOG.md @@ -1,8 +1,13 @@ # Change Log of `langium-vscode` +## v2.0.0 (Jul. 2023) + +* Improvements to validation regarding cyclic type usage ([#1130](https://github.com/langium/langium/pull/1130)). +* Includes a command to open a railroad syntax diagram for the currently selected langium grammar. Use the `Show Railroad Syntax Diagram` command or the corresponding button in the editor title bar to open the diagram ([#1075](https://github.com/langium/langium/pull/1075)). + ## v1.2.0 (May. 2023) -* Various improvements to the type generator/validator. ([#942](https://github.com/langium/langium/pull/942), [#946](https://github.com/langium/langium/pull/946), [#947](https://github.com/langium/langium/pull/947), [#950](https://github.com/langium/langium/pull/950), [#973](https://github.com/langium/langium/pull/973), [#1003](https://github.com/langium/langium/pull/1003)) +* Various improvements to the type generator/validator ([#942](https://github.com/langium/langium/pull/942), [#946](https://github.com/langium/langium/pull/946), [#947](https://github.com/langium/langium/pull/947), [#950](https://github.com/langium/langium/pull/950), [#973](https://github.com/langium/langium/pull/973), [#1003](https://github.com/langium/langium/pull/1003)). ## v1.1.0 (Feb. 2023) diff --git a/packages/langium/CHANGELOG.md b/packages/langium/CHANGELOG.md index ea49f9d57..cb3df3f5e 100644 --- a/packages/langium/CHANGELOG.md +++ b/packages/langium/CHANGELOG.md @@ -1,5 +1,59 @@ # Change Log of `langium` +## v2.0.0 (Jul. 2023) + +### EcmaScript Modules (ESM) + +Langium is now compiling to ESM instead of CommonJS (CJS). +CommonJS is the JavaScript convention introduced by Node.js and has historically been used in all Node.js based application. +With the introduction of ESM to modern versions of the Node.js runtime, more and more projects and libraries are making the move to ESM. Since a lot of our dependencies have moved on, we decided to do so as well. + +While ESM based projects in Node.js can continue to import CJS code, CJS projects cannot (easily) import ESM code. +This is a **very important change** for adopters, as it prevents using Langium as-is in CJS projects. +This leaves us with a problem, as all vscode extensions need to run as CJS code. +Luckily, JavaScript bundlers such as `esbuild` are capable of transforming ESM code into CJS code. +Using a bundler for vscode extensions and language servers is heavily recommended anyway, +so we hope that adopters don't have much trouble upgrading to Langium 2.0. + +Note that the newest version of the yeoman generator contains a ready-to-use bundler configuration. +We also have [a guide available on our website](https://langium.org/guides/code-bundling/) that goes into more detail on this topic. + +### Regular Expression Flags + +The Langium grammar language now supports regular expression flags as part of terminal definitions: + +1. `u` Enables unicode support for the specified terminal +2. `i` Makes the terminal case-insensitive +3. `s` Makes the wild character "`.`" match newlines as well. + +### Cache Support + +In order to build caches that are instantly invalidated on workspace or document changes, +Langium provides 2 new classes: + +1. The `WorkspaceCache` is a cache that gets cleared whenever a file in the workspace is changed, removed or created. +2. The `DocumentCache` is a cache that stores information for specific documents. Whenever that document is modified in any way, the cache for that document is invalidated. + +### General Improvements + +* The `DefaultCompletionProvider` has received a few improvements and should be even more accurate now ([#1106](https://github.com/langium/langium/pull/1106)). +* Various performance improvements related to scoping and linking ([#1091](https://github.com/langium/langium/pull/1091) and [#1121](https://github.com/langium/langium/pull/1121)). +* The new `CommentProvider` serves as a way to override how the comment of an AST node is computed ([#1095](https://github.com/langium/langium/pull/1095)). +* The LSP `workspace/symbol` request is now resolved by the `WorkspaceSymbolProvider` ([#1100](https://github.com/langium/langium/pull/1100)). +* The `DefaultDocumentBuilder` has been refactored to allow for more flexible and fine-grained validation behavior. ([#1094](https://github.com/langium/langium/pull/1094)). + +### Breaking Changes + +* Langium is now compiling to ESM. See [here](#ecmascript-modules-esm) for more information ([#1125](https://github.com/langium/langium/pull/1125)). +* The `IndexManager#getAffectedDocuments` has been changed to `isAffected`. Instead of returning a stream of all affected documents of a change, it now only returns whether a specified document is affected by the change of a set of documents ([#1094](https://github.com/langium/langium/pull/1094)). +* The `BuildOptions#validationChecks` property has been replaced with `validation?: boolean | ValidationOptions` ([#1094](https://github.com/langium/langium/pull/1094)). + +--- + +## v1.2.1 (Jun. 2023) + +Fixed a minor generator issue ([#1043](https://github.com/langium/langium/pull/1043)). + ## v1.2.0 (Apr. 2023) ### General Improvements From 070145dd15e4e5dd6d6f425567717ecf802062f8 Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Fri, 21 Jul 2023 12:13:51 +0000 Subject: [PATCH 2/6] Review comments --- packages/langium-cli/CHANGELOG.md | 8 ++++++++ packages/langium-vscode/CHANGELOG.md | 3 ++- packages/langium/CHANGELOG.md | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/langium-cli/CHANGELOG.md b/packages/langium-cli/CHANGELOG.md index c1f38cf94..ba80880db 100644 --- a/packages/langium-cli/CHANGELOG.md +++ b/packages/langium-cli/CHANGELOG.md @@ -20,6 +20,9 @@ To generate them to a file, use the following example config: } ``` +> **Note** +> The vscode extension for Langium contributes the `Show Railroad Syntax Diagram` command to show this HTML in a webview. + ### Generated Terminal Definitions The generated `ast.ts` file will now also contain an object containing all regular expressions used by your grammar's terminal rules ([#1097](https://github.com/langium/langium/pull/1097)). @@ -31,6 +34,11 @@ This allows to more easily reuse those regular expressions in your code. * A new `mode` configuration/argument can be used to improve bundle size of Langium projects ([#1077](https://github.com/langium/langium/pull/1077)). * Fixed an error in the way the CLI creates directories ([#1105](https://github.com/langium/langium/pull/1105)). +### Breaking Changes + +* The CLI now always uses the original `projectName` of the `langium-config.json` property for the generated type/object names. It no longer performs kebab-case transformation ([#1122](https://github.com/langium/langium/pull/1122)). +* We've decided to remove generated `$container` type declarations for types where it isn't clear what the container types can be ([#1055](https://github.com/langium/langium/pull/1055)). + ## v1.2.1 (Jun. 2023) * The generated code now performs split imports for runtime and compile time dependencies ([#1018](https://github.com/langium/langium/pull/1018)). diff --git a/packages/langium-vscode/CHANGELOG.md b/packages/langium-vscode/CHANGELOG.md index 632414711..a99373c5c 100644 --- a/packages/langium-vscode/CHANGELOG.md +++ b/packages/langium-vscode/CHANGELOG.md @@ -2,8 +2,9 @@ ## v2.0.0 (Jul. 2023) -* Improvements to validation regarding cyclic type usage ([#1130](https://github.com/langium/langium/pull/1130)). * Includes a command to open a railroad syntax diagram for the currently selected langium grammar. Use the `Show Railroad Syntax Diagram` command or the corresponding button in the editor title bar to open the diagram ([#1075](https://github.com/langium/langium/pull/1075)). +* Improvements to validation regarding cyclic type usage ([#1130](https://github.com/langium/langium/pull/1130)). +* The grammar language can now resolve grammar imports transitively ([#1113](https://github.com/langium/langium/pull/1113)). ## v1.2.0 (May. 2023) diff --git a/packages/langium/CHANGELOG.md b/packages/langium/CHANGELOG.md index cb3df3f5e..e5be5a46c 100644 --- a/packages/langium/CHANGELOG.md +++ b/packages/langium/CHANGELOG.md @@ -14,9 +14,10 @@ This leaves us with a problem, as all vscode extensions need to run as CJS code. Luckily, JavaScript bundlers such as `esbuild` are capable of transforming ESM code into CJS code. Using a bundler for vscode extensions and language servers is heavily recommended anyway, so we hope that adopters don't have much trouble upgrading to Langium 2.0. +You can find a small instruction manual on how to migrate TypeScript projects to ESM [here](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm). Note that the newest version of the yeoman generator contains a ready-to-use bundler configuration. -We also have [a guide available on our website](https://langium.org/guides/code-bundling/) that goes into more detail on this topic. +We also have [a guide available on our website](https://langium.org/guides/code-bundling/) that goes into more detail on this topic. If you have any questions on this topic, feel free to ask us on the [GitHub Discussions Board](https://github.com/langium/langium/discussions). ### Regular Expression Flags @@ -45,6 +46,12 @@ Langium provides 2 new classes: ### Breaking Changes * Langium is now compiling to ESM. See [here](#ecmascript-modules-esm) for more information ([#1125](https://github.com/langium/langium/pull/1125)). +* The `CodeLensProvider`, `DocumentLinkProvider` and `InlayHintProvider` services were moved from the shared LSP services container to the language specific services container. Additionally, their `resolve` methods have been removed ([#1107](https://github.com/langium/langium/pull/1107)). +* Deprecated a few properties available on CST nodes. They have been renamed and their old property names will be deleted in a future version ([#1131](https://github.com/langium/langium/pull/1131)): + * `CstNode#parent` -> `container` + * `CstNode#feature` -> `grammarSource` + * `CstNode#element` -> `astNode` + * `CompositeCstNode#children` -> `content` * The `IndexManager#getAffectedDocuments` has been changed to `isAffected`. Instead of returning a stream of all affected documents of a change, it now only returns whether a specified document is affected by the change of a set of documents ([#1094](https://github.com/langium/langium/pull/1094)). * The `BuildOptions#validationChecks` property has been replaced with `validation?: boolean | ValidationOptions` ([#1094](https://github.com/langium/langium/pull/1094)). From 2aaacb03e489a4aaa488a4ac0fdbbb10365fa92f Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Fri, 21 Jul 2023 12:15:18 +0000 Subject: [PATCH 3/6] Fix missing periods --- packages/langium/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/langium/CHANGELOG.md b/packages/langium/CHANGELOG.md index e5be5a46c..385f384d9 100644 --- a/packages/langium/CHANGELOG.md +++ b/packages/langium/CHANGELOG.md @@ -23,8 +23,8 @@ We also have [a guide available on our website](https://langium.org/guides/code- The Langium grammar language now supports regular expression flags as part of terminal definitions: -1. `u` Enables unicode support for the specified terminal -2. `i` Makes the terminal case-insensitive +1. `u` Enables unicode support for the specified terminal. +2. `i` Makes the terminal case-insensitive. 3. `s` Makes the wild character "`.`" match newlines as well. ### Cache Support From 1901b5bd3ee59dd9a01cb546d0832990dbc5bb10 Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Tue, 8 Aug 2023 16:43:12 +0000 Subject: [PATCH 4/6] Update changelog for 1.3.0 --- CHANGELOG.md | 3 ++- packages/generator-langium/CHANGELOG.md | 5 ++++- packages/langium-cli/CHANGELOG.md | 8 +++++++- packages/langium-railroad/CHANGELOG.md | 11 +++++++++++ packages/langium-vscode/CHANGELOG.md | 2 +- packages/langium/CHANGELOG.md | 9 +++++---- 6 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 packages/langium-railroad/CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c88385871..d4cdcb8cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ We maintain separate change logs for the individual packages: ## Closed Issues and PRs -* [v2.0.0](https://github.com/langium/langium/milestone/7?closed=1) +* [v2.0.0](https://github.com/langium/langium/milestone/10?closed=1) +* [v1.3.0](https://github.com/langium/langium/milestone/7?closed=1) * [v1.2.0](https://github.com/langium/langium/milestone/8?closed=1) * [v1.1.0](https://github.com/langium/langium/milestone/6?closed=1) * [v1.0.0](https://github.com/langium/langium/milestone/5?closed=1) diff --git a/packages/generator-langium/CHANGELOG.md b/packages/generator-langium/CHANGELOG.md index 8afc83fd1..49ce99d31 100644 --- a/packages/generator-langium/CHANGELOG.md +++ b/packages/generator-langium/CHANGELOG.md @@ -1,9 +1,12 @@ # Change Log of `generator-langium` -## v2.0.0 (Jul. 2023) +## v2.0.0 (Aug. 2023) * Added a bundle configuration using `esbuild` ([#1125](https://github.com/langium/langium/pull/1125)). * Configured the project as an ESM project to adapt to the changes in Langium ([#1125](https://github.com/langium/langium/pull/1125)). + +## v1.3.0 (Aug. 2023) + * Fixed a few syntax highlighting related issues ([#1064](https://github.com/langium/langium/pull/1064), [#1079](https://github.com/langium/langium/pull/1079)). ## v1.2.0 (May. 2023) diff --git a/packages/langium-cli/CHANGELOG.md b/packages/langium-cli/CHANGELOG.md index ba80880db..689fef6fb 100644 --- a/packages/langium-cli/CHANGELOG.md +++ b/packages/langium-cli/CHANGELOG.md @@ -1,6 +1,12 @@ # Change Log of `langium-cli` -## v2.0.0 (Jul. 2023) +## v2.0.0 (Aug. 2023) + +### EcmaScript Modules (ESM) + +This package is now compiling to ESM only, refer to [this changelog entry](https://github.com/langium/langium/blob/main/packages/langium/CHANGELOG.md#ecmascript-modules-esm) + +## v1.3.0 (Aug. 2023) ### Railroad Syntax Diagrams diff --git a/packages/langium-railroad/CHANGELOG.md b/packages/langium-railroad/CHANGELOG.md new file mode 100644 index 000000000..3cff167c6 --- /dev/null +++ b/packages/langium-railroad/CHANGELOG.md @@ -0,0 +1,11 @@ +# Change Log of `langium-railroad` + +## v2.0.0 (Aug. 2023) + +### EcmaScript Modules (ESM) + +This package is now compiling to ESM only, refer to [this changelog entry](https://github.com/langium/langium/blob/main/packages/langium/CHANGELOG.md#ecmascript-modules-esm) + +## v1.3.0 (Aug. 2023) + +Initial release of the `langium-railroad` package. This package is in charge of generating SVG syntax diagrams for grammars. diff --git a/packages/langium-vscode/CHANGELOG.md b/packages/langium-vscode/CHANGELOG.md index a99373c5c..33c4845da 100644 --- a/packages/langium-vscode/CHANGELOG.md +++ b/packages/langium-vscode/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log of `langium-vscode` -## v2.0.0 (Jul. 2023) +## v2.0.0 (Aug. 2023) * Includes a command to open a railroad syntax diagram for the currently selected langium grammar. Use the `Show Railroad Syntax Diagram` command or the corresponding button in the editor title bar to open the diagram ([#1075](https://github.com/langium/langium/pull/1075)). * Improvements to validation regarding cyclic type usage ([#1130](https://github.com/langium/langium/pull/1130)). diff --git a/packages/langium/CHANGELOG.md b/packages/langium/CHANGELOG.md index 385f384d9..dcfb67d0b 100644 --- a/packages/langium/CHANGELOG.md +++ b/packages/langium/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log of `langium` -## v2.0.0 (Jul. 2023) +## v2.0.0 (Aug. 2023) ### EcmaScript Modules (ESM) @@ -19,6 +19,8 @@ You can find a small instruction manual on how to migrate TypeScript projects to Note that the newest version of the yeoman generator contains a ready-to-use bundler configuration. We also have [a guide available on our website](https://langium.org/guides/code-bundling/) that goes into more detail on this topic. If you have any questions on this topic, feel free to ask us on the [GitHub Discussions Board](https://github.com/langium/langium/discussions). +## v1.3.0 (Aug. 2023) + ### Regular Expression Flags The Langium grammar language now supports regular expression flags as part of terminal definitions: @@ -37,15 +39,14 @@ Langium provides 2 new classes: ### General Improvements -* The `DefaultCompletionProvider` has received a few improvements and should be even more accurate now ([#1106](https://github.com/langium/langium/pull/1106)). -* Various performance improvements related to scoping and linking ([#1091](https://github.com/langium/langium/pull/1091) and [#1121](https://github.com/langium/langium/pull/1121)). +* The `DefaultCompletionProvider` has received some improvements and should be even more accurate now ([#1106](https://github.com/langium/langium/pull/1106), [#1138](https://github.com/langium/langium/pull/1138)). +* Various performance improvements related to scoping and linking ([#1091](https://github.com/langium/langium/pull/1091), [#1121](https://github.com/langium/langium/pull/1121)). * The new `CommentProvider` serves as a way to override how the comment of an AST node is computed ([#1095](https://github.com/langium/langium/pull/1095)). * The LSP `workspace/symbol` request is now resolved by the `WorkspaceSymbolProvider` ([#1100](https://github.com/langium/langium/pull/1100)). * The `DefaultDocumentBuilder` has been refactored to allow for more flexible and fine-grained validation behavior. ([#1094](https://github.com/langium/langium/pull/1094)). ### Breaking Changes -* Langium is now compiling to ESM. See [here](#ecmascript-modules-esm) for more information ([#1125](https://github.com/langium/langium/pull/1125)). * The `CodeLensProvider`, `DocumentLinkProvider` and `InlayHintProvider` services were moved from the shared LSP services container to the language specific services container. Additionally, their `resolve` methods have been removed ([#1107](https://github.com/langium/langium/pull/1107)). * Deprecated a few properties available on CST nodes. They have been renamed and their old property names will be deleted in a future version ([#1131](https://github.com/langium/langium/pull/1131)): * `CstNode#parent` -> `container` From f242224e076721eea308b25a8bacbb26c3ec4276 Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Wed, 16 Aug 2023 13:05:12 +0200 Subject: [PATCH 5/6] Add missing entries --- CHANGELOG.md | 2 +- packages/langium/CHANGELOG.md | 40 +++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4cdcb8cf..2b87c9c4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ We maintain separate change logs for the individual packages: ## Closed Issues and PRs -* [v2.0.0](https://github.com/langium/langium/milestone/10?closed=1) +* [v2.0.0](https://github.com/langium/langium/milestone/9?closed=1) * [v1.3.0](https://github.com/langium/langium/milestone/7?closed=1) * [v1.2.0](https://github.com/langium/langium/milestone/8?closed=1) * [v1.1.0](https://github.com/langium/langium/milestone/6?closed=1) diff --git a/packages/langium/CHANGELOG.md b/packages/langium/CHANGELOG.md index dcfb67d0b..67f280fff 100644 --- a/packages/langium/CHANGELOG.md +++ b/packages/langium/CHANGELOG.md @@ -17,13 +17,31 @@ so we hope that adopters don't have much trouble upgrading to Langium 2.0. You can find a small instruction manual on how to migrate TypeScript projects to ESM [here](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm). Note that the newest version of the yeoman generator contains a ready-to-use bundler configuration. +Adopters can use the generated project as a basis for upgrading to 2.0. We also have [a guide available on our website](https://langium.org/guides/code-bundling/) that goes into more detail on this topic. If you have any questions on this topic, feel free to ask us on the [GitHub Discussions Board](https://github.com/langium/langium/discussions). +### General Improvements + +* The `DefaultDocumentBuilder` has been refactored to allow for more flexible and fine-grained validation behavior. ([#1094](https://github.com/langium/langium/pull/1094)). + +### Breaking Changes + +* The `CodeLensProvider`, `DocumentLinkProvider` and `InlayHintProvider` services were moved from the shared LSP services container to the language specific services container. Additionally, their `resolve` methods have been removed ([#1107](https://github.com/langium/langium/pull/1107)). +* Deprecated a few properties available on CST nodes. They have been renamed and their old property names will be deleted in a future version ([#1131](https://github.com/langium/langium/pull/1131)): + * `CstNode#parent` -> `container` + * `CstNode#feature` -> `grammarSource` + * `CstNode#element` -> `astNode` + * `CompositeCstNode#children` -> `content` +* The `IndexManager#getAffectedDocuments` has been changed to `isAffected`. Instead of returning a stream of all affected documents of a change, it now only returns whether a specified document is affected by the change of a set of documents ([#1094](https://github.com/langium/langium/pull/1094)). +* The `BuildOptions#validationChecks` property has been replaced with `validation?: boolean | ValidationOptions` ([#1094](https://github.com/langium/langium/pull/1094)). + +--- + ## v1.3.0 (Aug. 2023) ### Regular Expression Flags -The Langium grammar language now supports regular expression flags as part of terminal definitions: +With [#1070](https://github.com/eclipse-langium/langium/pull/1070), the Langium grammar language now supports regular expression flags as part of terminal definitions: 1. `u` Enables unicode support for the specified terminal. 2. `i` Makes the terminal case-insensitive. @@ -32,7 +50,7 @@ The Langium grammar language now supports regular expression flags as part of te ### Cache Support In order to build caches that are instantly invalidated on workspace or document changes, -Langium provides 2 new classes: +Langium provides 2 new classes with [#1123](https://github.com/eclipse-langium/langium/pull/1123): 1. The `WorkspaceCache` is a cache that gets cleared whenever a file in the workspace is changed, removed or created. 2. The `DocumentCache` is a cache that stores information for specific documents. Whenever that document is modified in any way, the cache for that document is invalidated. @@ -43,18 +61,12 @@ Langium provides 2 new classes: * Various performance improvements related to scoping and linking ([#1091](https://github.com/langium/langium/pull/1091), [#1121](https://github.com/langium/langium/pull/1121)). * The new `CommentProvider` serves as a way to override how the comment of an AST node is computed ([#1095](https://github.com/langium/langium/pull/1095)). * The LSP `workspace/symbol` request is now resolved by the `WorkspaceSymbolProvider` ([#1100](https://github.com/langium/langium/pull/1100)). -* The `DefaultDocumentBuilder` has been refactored to allow for more flexible and fine-grained validation behavior. ([#1094](https://github.com/langium/langium/pull/1094)). - -### Breaking Changes - -* The `CodeLensProvider`, `DocumentLinkProvider` and `InlayHintProvider` services were moved from the shared LSP services container to the language specific services container. Additionally, their `resolve` methods have been removed ([#1107](https://github.com/langium/langium/pull/1107)). -* Deprecated a few properties available on CST nodes. They have been renamed and their old property names will be deleted in a future version ([#1131](https://github.com/langium/langium/pull/1131)): - * `CstNode#parent` -> `container` - * `CstNode#feature` -> `grammarSource` - * `CstNode#element` -> `astNode` - * `CompositeCstNode#children` -> `content` -* The `IndexManager#getAffectedDocuments` has been changed to `isAffected`. Instead of returning a stream of all affected documents of a change, it now only returns whether a specified document is affected by the change of a set of documents ([#1094](https://github.com/langium/langium/pull/1094)). -* The `BuildOptions#validationChecks` property has been replaced with `validation?: boolean | ValidationOptions` ([#1094](https://github.com/langium/langium/pull/1094)). +* Properties in guarded groups are now properly typed as optional ([#1116](https://github.com/eclipse-langium/langium/pull/1116)). +* Some generated regular expressions are now more accurate ([#1109](https://github.com/eclipse-langium/langium/pull/1109)). +* Generated language metadata is now being typed as `const` ([#1111](https://github.com/eclipse-langium/langium/pull/1111)). +* Fixed typing of the `root` property on CST nodes ([#1090](https://github.com/eclipse-langium/langium/pull/1090)). +* Parser error messages are now overridable in a service ([#1108](https://github.com/eclipse-langium/langium/pull/1108)). +* Prevent file name collisions during testing ([#1153](https://github.com/eclipse-langium/langium/pull/1153)). --- From a2a9117a4ebfa79552269ebfcad5c0bf9681cb5a Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Wed, 16 Aug 2023 16:07:06 +0200 Subject: [PATCH 6/6] Move CLI breaking changes to 2.0 --- packages/langium-cli/CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/langium-cli/CHANGELOG.md b/packages/langium-cli/CHANGELOG.md index 689fef6fb..f6b93a0fa 100644 --- a/packages/langium-cli/CHANGELOG.md +++ b/packages/langium-cli/CHANGELOG.md @@ -6,6 +6,11 @@ This package is now compiling to ESM only, refer to [this changelog entry](https://github.com/langium/langium/blob/main/packages/langium/CHANGELOG.md#ecmascript-modules-esm) +### Breaking Changes + +* The CLI now always uses the original `projectName` of the `langium-config.json` property for the generated type/object names. It no longer performs kebab-case transformation ([#1122](https://github.com/langium/langium/pull/1122)). +* We've decided to remove generated `$container` type declarations for types where it isn't clear what the container types can be ([#1055](https://github.com/langium/langium/pull/1055)). + ## v1.3.0 (Aug. 2023) ### Railroad Syntax Diagrams @@ -40,11 +45,6 @@ This allows to more easily reuse those regular expressions in your code. * A new `mode` configuration/argument can be used to improve bundle size of Langium projects ([#1077](https://github.com/langium/langium/pull/1077)). * Fixed an error in the way the CLI creates directories ([#1105](https://github.com/langium/langium/pull/1105)). -### Breaking Changes - -* The CLI now always uses the original `projectName` of the `langium-config.json` property for the generated type/object names. It no longer performs kebab-case transformation ([#1122](https://github.com/langium/langium/pull/1122)). -* We've decided to remove generated `$container` type declarations for types where it isn't clear what the container types can be ([#1055](https://github.com/langium/langium/pull/1055)). - ## v1.2.1 (Jun. 2023) * The generated code now performs split imports for runtime and compile time dependencies ([#1018](https://github.com/langium/langium/pull/1018)).