Skip to content

Language server fails to start when a meta-model on the meta-model search path contains a reference to an unknown type #196

@larsk21

Description

@larsk21

Opening a NeoJoin query in VS Code with a meta-model on the meta-model search path, which contains a reference to an unknown type, leads to the following error:

Error - 4:12:37 PM] Server initialization failed.
  Message: Internal error.
  Code: -32603
[Error - 4:12:37 PM] NeoJoin Language Server client: couldn't create connection to server.
  Message: Internal error.
  Code: -32603

The error is caused by an assertion in the SourceModelInferrer:

at tools.vitruv.neojoin.jvmmodel.SourceModelInferrer.getReferenceType(SourceModelInferrer.java:187)

In my case, it was caused by a reference to an element of type EObject:

<eStructuralFeatures xsi:type="ecore:EReference" name="referencedComponents" upperBound="-1"
        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>

We could consider loading the Ecore meta-model by default. In any case, we should display a warning in the IDE and avoid crashing the server upon any problems during meta-model loading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendSomething with the frontendideIssues related to the IDE integration

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions