Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use YAML-based grammar for our models #28

Merged
merged 23 commits into from
Oct 18, 2023
Merged

Use YAML-based grammar for our models #28

merged 23 commits into from
Oct 18, 2023

Conversation

martin-fleck-at
Copy link
Collaborator

  • New language based on indentation
    -- Update grammar
    -- Rewrite serializer
    -- Update GLSP and editors

  • Ensure edges (relationships) are created between nodes (entities)
    -- Ensure node entity matches expected relationship entity

  • Improve stability of cross-updates
    -- Ensure 'save' does an implicit 'update' of the internal structure
    -- Ensure update only updates text editor when it was opened
    -- Only do full textual updates to avoid merging issues
    -- Let UI react to updates, not only on save
    -- Debounce model update for form editor

  • Minors
    -- Adapt grammar to better reflect semantic element (instead of 'for')
    -- Always serialize properties in same order


sync

ozcanxbreeze and others added 14 commits July 19, 2023 15:09
- Downgrade from 10.5.0 to 10.4.2 as it does not work for our YAML lang
-- Chevrotain/chevrotain@v10.4.2...v10.5.0
-- Main extension: Chevrotain/chevrotain#1917
- Ensure edges (relationships) are created between nodes (entities)
-- Ensure node entity matches expected relationship entity

- Improve stability of cross-updates
-- Ensure 'save' does an implicit 'update' of the internal structure
-- Ensure update only updates text editor when it was opened
-- Only do full textual updates to avoid merging issues
-- Let UI react to updates, not only on save
-- Debounce model update for form editor

- Minors
-- Adapt grammar to better reflect semantic element (instead of 'for')
-- Always serialize properties in same order
@martin-fleck-at
Copy link
Collaborator Author

@harmen-xb Thank you for the review, I pushed an update that should address your concerns.

@harmen-xb
Copy link
Contributor

harmen-xb commented Oct 6, 2023

@martin-fleck-at
After your last commit I started reviewing by running CrossModel on my machine.

When opening the yaml-example/entities/voorbeeld_taal_entity_customer.cm first in the text editor and afterwards in the form editor I get the following error in the console (it does have work ok, it's just strange I get this error I think):

2023-10-06T14:53:36.780Z root WARN Widget was activated, but did not accept focus after 2000ms: crossmodel-diagram:file:///c:/git/GitHub/crossmodel/ExampleDiagram.diagram.cm
2023-10-06T14:53:58.250Z root INFO [hosted-plugin: 15732] PLUGIN_HOST(15732): PluginManagerExtImpl/loadPlugin(C:\git\GitHub\crossmodel\applications\browser-app\plugins\crossmodel-lang\out\extension.js)
2023-10-06T14:53:58.300Z root ERROR [hosted-plugin: 15732] Could not identify plugin for 'Theia' require call from C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js
2023-10-06T14:54:05.323Z root WARN Widget was activated, but did not accept focus after 2000ms: form-editor-opener:file:///c%3A/git/GitHub/crossmodel/examples/yaml-example/entities/voorbeeld_taal_entity_customer.cm
2023-10-06T14:54:10.364Z root WARN Widget was activated, but did not accept focus after 2000ms: form-editor-opener:file:///c%3A/git/GitHub/crossmodel/examples/yaml-example/entities/voorbeeld_taal_entity_customer.cm
2023-10-06T14:54:23.437Z root ERROR [hosted-plugin: 15732] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-06T14:54:23.443Z root ERROR [hosted-plugin: 15732] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
2023-10-06T14:54:23.459Z root ERROR [hosted-plugin: 15732] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-06T14:54:23.460Z root ERROR [hosted-plugin: 15732] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
2023-10-06T14:54:23.461Z root ERROR [hosted-plugin: 15732] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-06T14:54:23.461Z root ERROR [hosted-plugin: 15732] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
2023-10-06T14:54:23.477Z root ERROR [hosted-plugin: 15732] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-06T14:54:23.478Z root ERROR [hosted-plugin: 15732] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
2023-10-06T14:54:23.479Z root ERROR [hosted-plugin: 15732] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-06T14:54:23.480Z root ERROR [hosted-plugin: 15732] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
2023-10-06T14:54:23.485Z root ERROR [hosted-plugin: 15732] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-06T14:54:23.488Z root ERROR [hosted-plugin: 15732] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)

@harmen-xb
Copy link
Contributor

harmen-xb commented Oct 6, 2023

@martin-fleck-at
I tested the live sync a bit and what I notice is when I start editing a field in the form editor parts of the text get whiped while typing. I think this is because the field is overwritten while typing.

From text perspective it works fine. I do notice the text editor is now auto-saved. Maybe this is causing the issue? Since the text editor will fire an updated event and indrectly update the form?

@harmen-xb
Copy link
Contributor

@martin-fleck-at
When having a diagram open, in previous versions, you can click on an entity which would open the property form for the entity. This doesn't seem to be working anymore.

@martin-fleck-at
Copy link
Collaborator Author

@harmen-xb I pushed another update which extends the protocol with more arguments and provides a open/close lifecycle for clients. Using a unique client id, clients should now be able to ignore updates that were sent by them. From my tests, this seems to work well now, could you please have another look?

- Use open/close as lifecycle methods for clients
- Let extension startup early to handle non-textual editors
@harmen-xb
Copy link
Contributor

harmen-xb commented Oct 16, 2023

@martin-fleck-at When I now do a yarn clean; yarn; yarn start:browser I get the following output (on Windows).

See the ERROR on the last line (this is before opening a browser on localhost:3000):

PS C:\git\GitHub\crossmodel> yarn start:browser
yarn run v1.22.19
$ yarn theia:browser start
$ yarn --cwd applications/browser-app start
$ yarn rebuild && theia start --plugins=local-dir:plugins
$ theia rebuild:browser --cacheRoot ../..
native node modules are already rebuilt for browser
Configuration directory URI: 'file:///c%3A/Users/HarmenWessels/.theia'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2023-10-16T18:19:15.882Z root INFO Backend Object.initialize: 22.6 ms [Finished 10.717 s after backend start]
2023-10-16T18:19:15.883Z root INFO Backend Object.configure: 22.1 ms [Finished 10.718 s after backend start]
2023-10-16T18:19:15.883Z root INFO Backend MessagingContribution.onStart: 6.4 ms [Finished 10.718 s after backend start]
2023-10-16T18:19:15.885Z root INFO Backend OSBackendApplicationContribution.configure: 0.9 ms [Finished 11.000 s after backend start]
2023-10-16T18:19:15.890Z root INFO Backend PluginLocalizationBackendContribution.configure: 0.6 ms [Finished 11.001 s after backend start]
2023-10-16T18:19:16.020Z root WARN Backend PluginLocalizationBackendContribution.initialize took longer than the expected maximum 50 milliseconds: 282.4 ms [Finished 11.001 s after backend start]
2023-10-16T18:19:16.022Z root INFO Backend PluginDeployerContribution.initialize: 0.6 ms [Finished 11.004 s after backend start]
2023-10-16T18:19:16.024Z root INFO Backend NodeFileUploadService.configure: 6.4 ms [Finished 11.008 s after backend start]
2023-10-16T18:19:16.025Z root INFO Backend WebviewBackendSecurityWarnings.initialize: 1.3 ms [Finished 11.010 s after backend start]
2023-10-16T18:19:16.025Z root WARN Backend FileDownloadEndpoint.configure took longer than the expected maximum 50 milliseconds: 130.2 ms [Finished 11.141 s after backend start]
2023-10-16T18:19:16.026Z root INFO Backend HostedPluginLocalizationService.initialize: 0.6 ms [Finished 11.141 s after backend start]
2023-10-16T18:19:16.027Z root INFO Backend PluginApiContribution.configure: 1.5 ms [Finished 11.143 s after backend start]
2023-10-16T18:19:16.027Z root INFO Backend ModelServiceImpl.initialize: 0.6 ms [Finished 11.144 s after backend start]
2023-10-16T18:19:16.027Z root INFO Backend HostedPluginReader.configure: 0.6 ms [Finished 11.145 s after backend start]
2023-10-16T18:19:16.028Z root INFO Backend HostedPluginReader.configure: 0.6 ms [Finished 11.146 s after backend start]
2023-10-16T18:19:16.043Z root INFO Theia app listening on http://localhost:3000.
2023-10-16T18:19:16.045Z root WARN The local plugin referenced by local-dir:/c%3A/Users/HarmenWessels/.theia/plugins does not exist.
2023-10-16T18:19:16.046Z root WARN The local plugin referenced by local-dir:/c%3A/Users/HarmenWessels/.theia/extensions does not exist.
2023-10-16T18:19:16.062Z root INFO Resolve plugins list: 38.2 ms [Finished 11.181 s after backend start]
2023-10-16T18:19:16.099Z root WARN Backend DefaultWorkspaceServer.onStart took longer than the expected maximum 50 milliseconds: 219.0 ms [Finished 11.218 s after backend start]
2023-10-16T18:19:16.100Z root INFO Backend TaskBackendApplicationContribution.onStart: 0.4 ms [Finished 11.219 s after backend start]
2023-10-16T18:19:16.101Z root INFO Finished starting backend application: 0.1 ms [Finished 11.219 s after backend start]
2023-10-16T18:19:16.157Z root INFO Deploy plugins list: 38.2 ms [Finished 11.277 s after backend start]
2023-10-16T18:19:16.621Z root ERROR Uncaught Exception:  No connection to ModelServer.

@harmen-xb
Copy link
Contributor

harmen-xb commented Oct 16, 2023

@martin-fleck-at After the above error, when I then open a browser at localhost:3000 I get the following console output (with a list of ERRORs) before opening any document in Theia yet:

2023-10-16T18:24:02.450Z root WARN A command editor.action.toggleStickyScroll is already registered.
2023-10-16T18:24:02.450Z root INFO Detected keyboard layout from browser API: US (PC)
2023-10-16T18:24:02.727Z root WARN Linked preference "workbench.colorCustomizations" not found. Source: "editor.bracketPairColorization.enabled"
2023-10-16T18:24:02.728Z root WARN Linked preference "window.titleBarStyle" not found. Source: "window.menuBarVisibility"
2023-10-16T18:24:02.767Z root WARN Frontend EditorNavigationContribution.onStart took longer than the expected maximum 100 milliseconds: 419.0 ms [Finished 2.268 s after frontend start]
2023-10-16T18:24:02.923Z root WARN Frontend TerminalFrontendContribution.onStart took longer than the expected maximum 100 milliseconds: 160.2 ms [Finished 2.431 s after frontend start]
2023-10-16T18:24:02.945Z root INFO [09cd7cf1-b473-49ed-9d30-6e6bde66abde] Waiting for backend deployment: 18.4 ms [Finished 2.452 s after frontend start]
2023-10-16T18:24:02.962Z root INFO [09cd7cf1-b473-49ed-9d30-6e6bde66abde] Sync of 4 plugins: 17.8 ms [Finished 2.470 s after frontend start]
2023-10-16T18:24:02.975Z root INFO Start frontend contributions: 818.6 ms [Finished 2.472 s after frontend start]
2023-10-16T18:24:02.975Z root INFO Changed application state from 'init' to 'started_contributions'.
2023-10-16T18:24:03.002Z root INFO Changed application state from 'started_contributions' to 'attached_shell'.
2023-10-16T18:24:03.003Z root INFO >>> Restoring the layout state...
2023-10-16T18:24:03.257Z root INFO <<< The layout has been successfully restored.
2023-10-16T18:24:03.282Z root INFO Initialize the workbench layout: 268.6 ms [Finished 2.765 s after frontend start]
2023-10-16T18:24:03.284Z root INFO Changed application state from 'attached_shell' to 'initialized_layout'.
2023-10-16T18:24:03.284Z root INFO [09cd7cf1-b473-49ed-9d30-6e6bde66abde] Loading plugin contributions
2023-10-16T18:24:03.284Z root INFO [09cd7cf1-b473-49ed-9d30-6e6bde66abde] Load contributions of 4 plugins: 23.5 ms [Finished 2.790 s after frontend start]
2023-10-16T18:24:03.626Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180) starting instance
2023-10-16T18:24:03.672Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): PluginManagerExtImpl/init()
2023-10-16T18:24:03.677Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): initializing(json-language-features@1.66.2 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:24:03.683Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): initializing(npm@1.66.2 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:24:03.685Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): initializing(crossmodel-lang@0.0.1 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:24:03.686Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): initializing(json@1.66.2 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:24:03.696Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): PluginManagerExtImpl/loadPlugin(C:\git\GitHub\crossmodel\applications\browser-app\plugins\vscode.json-language-features-1.66.2\extension\client\dist\node\jsonClientMain)
2023-10-16T18:24:03.782Z root INFO [09cd7cf1-b473-49ed-9d30-6e6bde66abde] Starting plugins.
2023-10-16T18:24:03.788Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): PluginManagerExtImpl/loadPlugin(C:\git\GitHub\crossmodel\applications\browser-app\plugins\crossmodel-lang\out\extension.js)
2023-10-16T18:24:03.804Z root ERROR [hosted-plugin: 28180] Could not identify plugin for 'Theia' require call from C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js
2023-10-16T18:24:03.855Z root INFO [hosted-plugin: 28180] PLUGIN_HOST(28180): PluginManagerExtImpl/loadPlugin(C:\git\GitHub\crossmodel\applications\browser-app\plugins\vscode.npm-1.66.2\extension\dist\npmMain)
2023-10-16T18:24:03.890Z root INFO [09cd7cf1-b473-49ed-9d30-6e6bde66abde] Start of 4 plugins: 604.6 ms [Finished 3.399 s after frontend start]
2023-10-16T18:24:04.127Z root INFO Frontend application start: 1861.4 ms [Finished 11.659 s after backend start]
2023-10-16T18:24:04.129Z root INFO Replace loading indicator with ready workbench UI (animation): 842.9 ms [Finished 3.635 s after frontend start]
2023-10-16T18:24:04.129Z root INFO Changed application state from 'initialized_layout' to 'ready'.
2023-10-16T18:24:07.805Z root ERROR [hosted-plugin: 28180] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-16T18:24:07.810Z root ERROR [hosted-plugin: 28180] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
2023-10-16T18:24:07.814Z root ERROR [hosted-plugin: 28180] Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
2023-10-16T18:24:07.826Z root ERROR [hosted-plugin: 28180] With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)
Promise rejection not handled in one second: Error: char number cannot be negative , reason: Error: char number cannot be negative
With stack trace: Error: char number cannot be negative
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:268:19)
    at new Position (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\plugin\types-impl.js:415:21)
    at new Range (C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext\lib\common\types.js:69:35)
    at asRange (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10243:24)
    at asDiagnostic (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10173:66)
    at convertBatch (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12626:25)
    at Object.map (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:12635:17)
    at Object.asDiagnostics (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:10163:22)
    at LanguageClient.workDiagnosticQueue (C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js:4414:19)

@harmen-xb
Copy link
Contributor

@martin-fleck-at After the above errors, when I then try to open a form editor in the "examples/yaml-example/entities/voorbeeld_taal_entity_customer.cm" file I get the following console output, with an ERROR at the end:

2023-10-16T18:27:40.194Z root WARN A command editor.action.toggleStickyScroll is already registered.
2023-10-16T18:27:40.194Z root INFO Detected keyboard layout from browser API: US (PC)
2023-10-16T18:27:40.561Z root WARN Linked preference "workbench.colorCustomizations" not found. Source: "editor.bracketPairColorization.enabled"
2023-10-16T18:27:40.562Z root WARN Linked preference "window.titleBarStyle" not found. Source: "window.menuBarVisibility"
2023-10-16T18:27:40.590Z root WARN Frontend EditorNavigationContribution.onStart took longer than the expected maximum 100 milliseconds: 405.1 ms [Finished 2.338 s after frontend start]
2023-10-16T18:27:40.746Z root WARN Frontend TerminalFrontendContribution.onStart took longer than the expected maximum 100 milliseconds: 161.3 ms [Finished 2.501 s after frontend start]
2023-10-16T18:27:40.770Z root INFO [a27feb6f-36ff-4c5e-9e16-41fcfc84b64f] Waiting for backend deployment: 21.1 ms [Finished 2.523 s after frontend start]
2023-10-16T18:27:40.790Z root INFO Start frontend contributions: 794.0 ms [Finished 2.533 s after frontend start]
2023-10-16T18:27:40.791Z root INFO Changed application state from 'init' to 'started_contributions'.
2023-10-16T18:27:40.797Z root INFO Changed application state from 'started_contributions' to 'attached_shell'.
2023-10-16T18:27:40.799Z root INFO >>> Restoring the layout state...
2023-10-16T18:27:40.807Z root INFO <<< Nothing to restore.
2023-10-16T18:27:40.846Z root INFO Initialize the workbench layout: 45.9 ms [Finished 2.597 s after frontend start]
2023-10-16T18:27:40.858Z root INFO Changed application state from 'attached_shell' to 'initialized_layout'.
2023-10-16T18:27:40.889Z root INFO [a27feb6f-36ff-4c5e-9e16-41fcfc84b64f] Sync of 4 plugins: 93.7 ms [Finished 2.617 s after frontend start]
2023-10-16T18:27:40.891Z root INFO [a27feb6f-36ff-4c5e-9e16-41fcfc84b64f] Loading plugin contributions
2023-10-16T18:27:40.891Z root INFO [a27feb6f-36ff-4c5e-9e16-41fcfc84b64f] Load contributions of 4 plugins: 26.6 ms [Finished 2.644 s after frontend start]
2023-10-16T18:27:41.454Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568) starting instance
2023-10-16T18:27:41.497Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): PluginManagerExtImpl/init()
2023-10-16T18:27:41.501Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): initializing(json-language-features@1.66.2 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:27:41.508Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): initializing(npm@1.66.2 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:27:41.509Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): initializing(crossmodel-lang@0.0.1 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:27:41.510Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): initializing(json@1.66.2 with C:\git\GitHub\crossmodel\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
2023-10-16T18:27:41.519Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): PluginManagerExtImpl/loadPlugin(C:\git\GitHub\crossmodel\applications\browser-app\plugins\vscode.json-language-features-1.66.2\extension\client\dist\node\jsonClientMain)
2023-10-16T18:27:41.604Z root INFO [a27feb6f-36ff-4c5e-9e16-41fcfc84b64f] Starting plugins.
2023-10-16T18:27:41.611Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): PluginManagerExtImpl/loadPlugin(C:\git\GitHub\crossmodel\applications\browser-app\plugins\crossmodel-lang\out\extension.js)
2023-10-16T18:27:41.628Z root ERROR [hosted-plugin: 28568] Could not identify plugin for 'Theia' require call from C:\git\GitHub\crossmodel\extensions\crossmodel-lang\out\extension.js
2023-10-16T18:27:41.686Z root INFO [a27feb6f-36ff-4c5e-9e16-41fcfc84b64f] Start of 4 plugins: 791.0 ms [Finished 3.442 s after frontend start]
2023-10-16T18:27:41.724Z root INFO Replace loading indicator with ready workbench UI (animation): 867.0 ms [Finished 3.479 s after frontend start]
2023-10-16T18:27:41.724Z root INFO Changed application state from 'initialized_layout' to 'ready'.
2023-10-16T18:27:41.725Z root INFO Frontend application start: 1624.2 ms [Finished 229.255 s after backend start]
2023-10-16T18:27:55.792Z root INFO [hosted-plugin: 28568] PLUGIN_HOST(28568): PluginManagerExtImpl/loadPlugin(C:\git\GitHub\crossmodel\applications\browser-app\plugins\vscode.npm-1.66.2\extension\dist\npmMain)
2023-10-16T18:28:01.069Z root ERROR Request open failed with error:  
2023-10-16T18:28:01.071Z root ERROR (node:11804) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
(Use `node --trace-warnings ...` to show where the warning was created)
2023-10-16T18:28:01.095Z root ERROR The above error occurred in the <App> component:

    at App (http://localhost:3000/packages_form-client_lib_browser_form-client-frontend-module_js.js:332:16)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
2023-10-16T18:28:03.056Z root WARN Widget was activated, but did not accept focus after 2000ms: form-editor-opener:file:///c%3A/git/GitHub/crossmodel/examples/yaml-example/entities/voorbeeld_taal_entity_customer.cm

@harmen-xb
Copy link
Contributor

harmen-xb commented Oct 18, 2023

@martin-fleck-at I played some more in the GitPod and Windows environment in web and electron version.

I did get the ModelServer port problem once or twice, but after a reboot it worked worked. I also don't think it's an issue which is introduced in this PR, so I will investigate it in a separate branch to understand and debug it.

For now I will approve the PR and let's continue.

@harmen-xb harmen-xb merged commit 1a3ce57 into main Oct 18, 2023
1 check passed
@harmen-xb harmen-xb deleted the feature/yaml-lang-2 branch October 18, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants