usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
408 stars 77 forks source link

VScode plugin not working well when the project has an incorrect or is missing a RASCAL.MF/.project file #1696

Closed leegbestand closed 2 years ago

leegbestand commented 2 years ago

LS,

Describe the bug

The VScode plugin does not work when the current project has no or an incorrect RASCAL.MF or .project file. Instead, it gives an internal error in the output console and a Request textDocument/documentSymbol error popup in the bottom right corner.

[Error - 10:31:17 PM] Request textDocument/documentSymbol failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:144)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    ... 3 more
Caused by: org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascal::lsp::Outline: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1)
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305)
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241)
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132)
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140)
    ... 4 more

To Reproduce

Steps to reproduce the behavior:

  1. Create a src/ directory in an empty directory
  2. Only create a rascal module file src/ directory
  3. Open VScode in the directory with the LSP plugin enabled and start typing.
  4. See the error dialogs pop-up in the right bottom corner.

Expected behavior I would expect it to work or a helpful error message indicating the requirement for the RASCAL.MF and .project file.

Stack traces

2022-10-28 22:31:11,847 main DEBUG null 2.10.0 initializing configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@8b96fde
2022-10-28 22:31:11,855 main DEBUG PluginManager 'Core' found 130 plugins
2022-10-28 22:31:11,857 main DEBUG PluginManager 'Level' found 0 plugins
2022-10-28 22:31:11,865 main DEBUG PluginManager 'Lookup' found 16 plugins
2022-10-28 22:31:11,868 main DEBUG Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
2022-10-28 22:31:11,883 main DEBUG PluginManager 'TypeConverter' found 26 plugins
2022-10-28 22:31:11,891 main DEBUG createAppenderRef(ref="Console", level="null", Filter=null)
2022-10-28 22:31:11,892 main DEBUG Building Plugin[name=root, class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
2022-10-28 22:31:11,899 main DEBUG LoggerConfig$RootLogger$Builder(additivity="null", level="DEBUG", levelAndRefs="null", includeLocation="null", ={Console}, ={}, Configuration(DefaultLogger), Filter=null)
2022-10-28 22:31:11,902 main DEBUG Building Plugin[name=loggers, class=org.apache.logging.log4j.core.config.LoggersPlugin].
2022-10-28 22:31:11,902 main DEBUG createLoggers(={root})
2022-10-28 22:31:11,903 main DEBUG Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
2022-10-28 22:31:11,904 main DEBUG PatternLayout$Builder(pattern="%d [%t] %p - %c %m%n", PatternSelector=null, Configuration(DefaultLogger), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
2022-10-28 22:31:11,904 main DEBUG PluginManager 'Converter' found 45 plugins
2022-10-28 22:31:11,910 main DEBUG Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.ConsoleAppender].
2022-10-28 22:31:11,915 main DEBUG ConsoleAppender$Builder(target="SYSTEM_ERR", follow="null", direct="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout(%d [%t] %p - %c %m%n), name="Console", Configuration(DefaultLogger), Filter=null, ={})
2022-10-28 22:31:11,918 main DEBUG Starting OutputStreamManager SYSTEM_ERR.false.false
2022-10-28 22:31:11,918 main DEBUG Building Plugin[name=appenders, class=org.apache.logging.log4j.core.config.AppendersPlugin].
2022-10-28 22:31:11,919 main DEBUG createAppenders(={Console})
2022-10-28 22:31:11,919 main DEBUG Configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@8b96fde initialized
2022-10-28 22:31:11,922 main DEBUG Starting configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@8b96fde
2022-10-28 22:31:11,923 main DEBUG Started configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@8b96fde OK.
2022-10-28 22:31:11,923 main DEBUG Shutting down OutputStreamManager SYSTEM_OUT.false.false-1
2022-10-28 22:31:11,923 main DEBUG OutputStream closed
2022-10-28 22:31:11,924 main DEBUG Shut down OutputStreamManager SYSTEM_OUT.false.false-1, all resources released: true
2022-10-28 22:31:11,924 main DEBUG Appender DefaultConsole-1 stopped with status true
2022-10-28 22:31:11,924 main DEBUG Stopped org.apache.logging.log4j.core.config.DefaultConfiguration@5ed828d OK
2022-10-28 22:31:11,988 main DEBUG Attempting to use org.apache.logging.log4j.jul.CoreLoggerAdapter
2022-10-28 22:31:11,990 main INFO Registered Log4j as the java.util.logging.LogManager.
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
2022-10-28 22:31:12,010 main DEBUG Registering MBean org.apache.logging.log4j2:type=55054057
2022-10-28 22:31:12,012 main DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=StatusLogger
2022-10-28 22:31:12,013 main DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=ContextSelector
2022-10-28 22:31:12,014 main DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=Loggers,name=
2022-10-28 22:31:12,014 main DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=Appenders,name=Console
2022-10-28 22:31:12,016 main DEBUG org.apache.logging.log4j.core.util.SystemClock does not support precise timestamps.
2022-10-28 22:31:12,016 main DEBUG Reconfiguration complete for context[name=55054057] at URI NULL_SOURCE (org.apache.logging.log4j.core.LoggerContext@70325e14) with optional ClassLoader: null
2022-10-28 22:31:12,016 main DEBUG Shutdown hook enabled. Registering a new one.
2022-10-28 22:31:12,017 main DEBUG LoggerContext[name=55054057, org.apache.logging.log4j.core.LoggerContext@70325e14] started OK.
2022-10-28 22:31:12,021 [main] INFO - org.rascalmpl.vscode.lsp.BaseLanguageServer Starting Rascal Language Server: 2.10.0 at ${maven.build.timestamp}
WARNING: could not load resolver due to User limit of inotify instances reached or too many open files
java.io.IOException: User limit of inotify instances reached or too many open files
    at java.base/sun.nio.fs.LinuxWatchService.<init>(LinuxWatchService.java:64)
    at java.base/sun.nio.fs.LinuxFileSystem.newWatchService(LinuxFileSystem.java:47)
    at org.rascalmpl.uri.file.FileURIResolver.<init>(FileURIResolver.java:67)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at java.base/java.lang.Class.newInstance(Class.java:584)
    at org.rascalmpl.uri.URIResolverRegistry.constructService(URIResolverRegistry.java:146)
    at org.rascalmpl.uri.URIResolverRegistry.loadServices(URIResolverRegistry.java:200)
    at org.rascalmpl.uri.URIResolverRegistry.lambda$loadServices$0(URIResolverRegistry.java:112)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
    at org.rascalmpl.uri.URIResolverRegistry.loadServices(URIResolverRegistry.java:112)
    at org.rascalmpl.uri.URIResolverRegistry.<init>(URIResolverRegistry.java:77)
    at org.rascalmpl.uri.URIResolverRegistry$InstanceHolder.<clinit>(URIResolverRegistry.java:73)
    at org.rascalmpl.uri.URIResolverRegistry.getInstance(URIResolverRegistry.java:255)
    at org.rascalmpl.vscode.lsp.IRascalFileSystemServices.<clinit>(IRascalFileSystemServices.java:56)
    at org.rascalmpl.vscode.lsp.BaseLanguageServer.startLanguageServer(BaseLanguageServer.java:148)
    at org.rascalmpl.vscode.lsp.rascal.RascalLanguageServer.main(RascalLanguageServer.java:39)
2022-10-28 22:31:12,196 [main] ERROR - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint A delegate object is null, jsonrpc methods of 'public default org.eclipse.lsp4j.services.NotebookDocumentService org.eclipse.lsp4j.services.LanguageServer.getNotebookDocumentService()' are ignored
2022-10-28 22:31:12,213 pool-2-thread-1 DEBUG PluginManager 'Lookup' found 16 plugins
2022-10-28 22:31:12,213 pool-2-thread-2 DEBUG PluginManager 'Lookup' found 16 plugins
2022-10-28 22:31:12,213 pool-2-thread-3 DEBUG PluginManager 'Lookup' found 16 plugins
2022-10-28 22:31:12,215 pool-2-thread-2 DEBUG PluginManager 'Converter' found 45 plugins
2022-10-28 22:31:12,215 pool-2-thread-3 DEBUG PluginManager 'Converter' found 45 plugins
2022-10-28 22:31:12,215 pool-2-thread-1 DEBUG PluginManager 'Converter' found 45 plugins
2022-10-28 22:31:12,216 pool-2-thread-1 DEBUG Starting OutputStreamManager SYSTEM_OUT.false.false-4
2022-10-28 22:31:12,216 pool-2-thread-1 DEBUG Starting LoggerContext[name=Default, org.apache.logging.log4j.core.LoggerContext@2a95c4d8]...
2022-10-28 22:31:12,216 pool-2-thread-3 DEBUG Starting LoggerContext[name=Default, org.apache.logging.log4j.core.LoggerContext@2a95c4d8]...
2022-10-28 22:31:12,216 pool-2-thread-2 DEBUG Starting LoggerContext[name=Default, org.apache.logging.log4j.core.LoggerContext@2a95c4d8]...
2022-10-28 22:31:12,217 pool-2-thread-3 DEBUG LoggerContext[name=Default, org.apache.logging.log4j.core.LoggerContext@2a95c4d8] started OK.
2022-10-28 22:31:12,217 pool-2-thread-1 DEBUG Reconfiguration started for context[name=Default] at URI null (org.apache.logging.log4j.core.LoggerContext@2a95c4d8) with optional ClassLoader: null
2022-10-28 22:31:12,217 pool-2-thread-2 DEBUG LoggerContext[name=Default, org.apache.logging.log4j.core.LoggerContext@2a95c4d8] started OK.
2022-10-28 22:31:12,217 pool-2-thread-1 DEBUG Using configurationFactory org.apache.logging.log4j.core.config.ConfigurationFactory$Factory@119cf424
2022-10-28 22:31:12,218 pool-2-thread-1 DEBUG PluginManager 'Lookup' found 16 plugins
2022-10-28 22:31:12,219 pool-2-thread-1 DEBUG null 2.10.0 initializing configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@52953b58
2022-10-28 22:31:12,220 pool-2-thread-1 DEBUG PluginManager 'Core' found 130 plugins
2022-10-28 22:31:12,221 pool-2-thread-1 DEBUG PluginManager 'Level' found 0 plugins
2022-10-28 22:31:12,221 pool-2-thread-1 DEBUG PluginManager 'Lookup' found 16 plugins
2022-10-28 22:31:12,222 pool-2-thread-1 DEBUG Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
2022-10-28 22:31:12,223 pool-2-thread-1 DEBUG createAppenderRef(ref="Console", level="null", Filter=null)
2022-10-28 22:31:12,224 pool-2-thread-1 DEBUG Building Plugin[name=root, class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
2022-10-28 22:31:12,225 pool-2-thread-1 DEBUG LoggerConfig$RootLogger$Builder(additivity="null", level="DEBUG", levelAndRefs="null", includeLocation="null", ={Console}, ={}, Configuration(DefaultLogger), Filter=null)
2022-10-28 22:31:12,225 pool-2-thread-1 DEBUG Building Plugin[name=loggers, class=org.apache.logging.log4j.core.config.LoggersPlugin].
2022-10-28 22:31:12,226 pool-2-thread-1 DEBUG createLoggers(={root})
2022-10-28 22:31:12,227 pool-2-thread-1 DEBUG Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
2022-10-28 22:31:12,228 pool-2-thread-1 DEBUG PatternLayout$Builder(pattern="%d [%t] %p - %c %m%n", PatternSelector=null, Configuration(DefaultLogger), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
2022-10-28 22:31:12,228 pool-2-thread-1 DEBUG PluginManager 'Converter' found 45 plugins
2022-10-28 22:31:12,230 pool-2-thread-1 DEBUG Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.ConsoleAppender].
2022-10-28 22:31:12,231 pool-2-thread-1 DEBUG ConsoleAppender$Builder(target="SYSTEM_ERR", follow="null", direct="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout(%d [%t] %p - %c %m%n), name="Console", Configuration(DefaultLogger), Filter=null, ={})
22:31:12.235 [pool-2-thread-3] INFO  Evaluator: Rascal compiler - Creating new progress bar: T2a29b044162d2ae66 Loading Rascal compiler []
22:31:12.235 [pool-2-thread-2] INFO  Evaluator: Rascal summary - Creating new progress bar: T585eb234152808ff61 Loading Rascal summary []
2022-10-28 22:31:12,235 pool-2-thread-1 DEBUG Building Plugin[name=appenders, class=org.apache.logging.log4j.core.config.AppendersPlugin].
2022-10-28 22:31:12,236 pool-2-thread-1 DEBUG createAppenders(={Console})
2022-10-28 22:31:12,236 pool-2-thread-1 DEBUG Configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@52953b58 initialized
2022-10-28 22:31:12,237 pool-2-thread-1 DEBUG Starting configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@52953b58
2022-10-28 22:31:12,237 pool-2-thread-1 DEBUG Started configuration org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration@52953b58 OK.
2022-10-28 22:31:12,237 pool-2-thread-1 DEBUG Appender DefaultConsole-2 stopped with status true
2022-10-28 22:31:12,237 pool-2-thread-1 DEBUG Stopped org.apache.logging.log4j.core.config.DefaultConfiguration@7dde49e OK
2022-10-28 22:31:12,239 pool-2-thread-1 DEBUG Registering MBean org.apache.logging.log4j2:type=55054057
2022-10-28 22:31:12,240 pool-2-thread-1 DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=StatusLogger
2022-10-28 22:31:12,240 pool-2-thread-1 DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=ContextSelector
2022-10-28 22:31:12,241 pool-2-thread-1 DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=Loggers,name=
2022-10-28 22:31:12,241 pool-2-thread-1 DEBUG Registering MBean org.apache.logging.log4j2:type=55054057,component=Appenders,name=Console
2022-10-28 22:31:12,242 pool-2-thread-1 DEBUG Reconfiguration complete for context[name=Default] at URI NULL_SOURCE (org.apache.logging.log4j.core.LoggerContext@2a95c4d8) with optional ClassLoader: null
2022-10-28 22:31:12,242 pool-2-thread-1 DEBUG Shutdown hook enabled. Registering a new one.
2022-10-28 22:31:12,243 pool-2-thread-1 DEBUG LoggerContext[name=Default, org.apache.logging.log4j.core.LoggerContext@2a95c4d8] started OK.
2022-10-28 22:31:12,243 [pool-2-thread-1] INFO - Evaluator: Rascal outline Creating new progress bar: T56466a2e142e94d31f Loading Rascal outline []
2022-10-28 22:31:12,264 [pool-3-thread-1] INFO - org.rascalmpl.vscode.lsp.BaseLanguageServer.ActualLanguageServer LSP connection started (connected to Visual Studio Code version 1.72.2)
2022-10-28 22:31:12,275 [pool-3-thread-1] DEBUG - org.rascalmpl.vscode.lsp.BaseLanguageServer.ActualLanguageServer LSP client capabilities: ClientCapabilities [
  workspace = WorkspaceClientCapabilities [
    applyEdit = true
    workspaceEdit = WorkspaceEditCapabilities [
      documentChanges = true
      resourceOperations = ArrayList (
        "create",
        "rename",
        "delete"
      )
      failureHandling = "textOnlyTransactional"
      normalizesLineEndings = true
      changeAnnotationSupport = WorkspaceEditChangeAnnotationSupportCapabilities [
        groupsOnLabel = true
      ]
    ]
    didChangeConfiguration = DidChangeConfigurationCapabilities [
      dynamicRegistration = true
    ]
    didChangeWatchedFiles = DidChangeWatchedFilesCapabilities [
      relativePatternSupport = true
      dynamicRegistration = true
    ]
    symbol = SymbolCapabilities [
      symbolKind = SymbolKindCapabilities [
        valueSet = ArrayList (
          File,
          Module,
          Namespace,
          Package,
          Class,
          Method,
          Property,
          Field,
          Constructor,
          Enum,
          Interface,
          Function,
          Variable,
          Constant,
          String,
          Number,
          Boolean,
          Array,
          Object,
          Key,
          Null,
          EnumMember,
          Struct,
          Event,
          Operator,
          TypeParameter
        )
      ]
      tagSupport = SymbolTagSupportCapabilities [
        valueSet = ArrayList (
          Deprecated
        )
      ]
      resolveSupport = WorkspaceSymbolResolveSupportCapabilities [
        properties = ArrayList (
          "location.range"
        )
      ]
      dynamicRegistration = true
    ]
    executeCommand = ExecuteCommandCapabilities [
      dynamicRegistration = true
    ]
    workspaceFolders = true
    configuration = true
    semanticTokens = SemanticTokensWorkspaceCapabilities [
      refreshSupport = true
    ]
    codeLens = CodeLensWorkspaceCapabilities [
      refreshSupport = true
    ]
    fileOperations = FileOperationsWorkspaceCapabilities [
      didCreate = true
      willCreate = true
      didRename = true
      willRename = true
      didDelete = true
      willDelete = true
      dynamicRegistration = true
    ]
    inlayHint = InlayHintWorkspaceCapabilities [
      refreshSupport = true
    ]
    inlineValue = InlineValueWorkspaceCapabilities [
      refreshSupport = true
    ]
    diagnostics = DiagnosticWorkspaceCapabilities [
      refreshSupport = true
    ]
  ]
  textDocument = TextDocumentClientCapabilities [
    synchronization = SynchronizationCapabilities [
      willSave = true
      willSaveWaitUntil = true
      didSave = true
      dynamicRegistration = true
    ]
    completion = CompletionCapabilities [
      completionItem = CompletionItemCapabilities [
        snippetSupport = true
        commitCharactersSupport = true
        documentationFormat = ArrayList (
          "markdown",
          "plaintext"
        )
        deprecatedSupport = true
        preselectSupport = true
        tagSupport = CompletionItemTagSupportCapabilities [
          valueSet = ArrayList (
            Deprecated
          )
        ]
        insertReplaceSupport = true
        resolveSupport = CompletionItemResolveSupportCapabilities [
          properties = ArrayList (
            "documentation",
            "detail",
            "additionalTextEdits"
          )
        ]
        insertTextModeSupport = CompletionItemInsertTextModeSupportCapabilities [
          valueSet = ArrayList (
            AsIs,
            AdjustIndentation
          )
        ]
        labelDetailsSupport = true
      ]
      completionItemKind = CompletionItemKindCapabilities [
        valueSet = ArrayList (
          Text,
          Method,
          Function,
          Constructor,
          Field,
          Variable,
          Class,
          Interface,
          Module,
          Property,
          Unit,
          Value,
          Enum,
          Keyword,
          Snippet,
          Color,
          File,
          Reference,
          Folder,
          EnumMember,
          Constant,
          Struct,
          Event,
          Operator,
          TypeParameter
        )
      ]
      contextSupport = true
      insertTextMode = AdjustIndentation
      completionList = CompletionListCapabilities [
        itemDefaults = ArrayList (
          "commitCharacters",
          "editRange",
          "insertTextFormat",
          "insertTextMode"
        )
      ]
      dynamicRegistration = true
    ]
    hover = HoverCapabilities [
      contentFormat = ArrayList (
        "markdown",
        "plaintext"
      )
      dynamicRegistration = true
    ]
    signatureHelp = SignatureHelpCapabilities [
      signatureInformation = SignatureInformationCapabilities [
        documentationFormat = ArrayList (
          "markdown",
          "plaintext"
        )
        parameterInformation = ParameterInformationCapabilities [
          labelOffsetSupport = true
        ]
        activeParameterSupport = true
      ]
      contextSupport = true
      dynamicRegistration = true
    ]
    references = ReferencesCapabilities [
      dynamicRegistration = true
    ]
    documentHighlight = DocumentHighlightCapabilities [
      dynamicRegistration = true
    ]
    documentSymbol = DocumentSymbolCapabilities [
      symbolKind = SymbolKindCapabilities [
        valueSet = ArrayList (
          File,
          Module,
          Namespace,
          Package,
          Class,
          Method,
          Property,
          Field,
          Constructor,
          Enum,
          Interface,
          Function,
          Variable,
          Constant,
          String,
          Number,
          Boolean,
          Array,
          Object,
          Key,
          Null,
          EnumMember,
          Struct,
          Event,
          Operator,
          TypeParameter
        )
      ]
      hierarchicalDocumentSymbolSupport = true
      tagSupport = SymbolTagSupportCapabilities [
        valueSet = ArrayList (
          Deprecated
        )
      ]
      labelSupport = true
      dynamicRegistration = true
    ]
    formatting = FormattingCapabilities [
      dynamicRegistration = true
    ]
    rangeFormatting = RangeFormattingCapabilities [
      dynamicRegistration = true
    ]
    onTypeFormatting = OnTypeFormattingCapabilities [
      dynamicRegistration = true
    ]
    declaration = DeclarationCapabilities [
      linkSupport = true
      dynamicRegistration = true
    ]
    definition = DefinitionCapabilities [
      linkSupport = true
      dynamicRegistration = true
    ]
    typeDefinition = TypeDefinitionCapabilities [
      linkSupport = true
      dynamicRegistration = true
    ]
    implementation = ImplementationCapabilities [
      linkSupport = true
      dynamicRegistration = true
    ]
    codeAction = CodeActionCapabilities [
      codeActionLiteralSupport = CodeActionLiteralSupportCapabilities [
        codeActionKind = CodeActionKindCapabilities [
          valueSet = ArrayList (
            "",
            "quickfix",
            "refactor",
            "refactor.extract",
            "refactor.inline",
            "refactor.rewrite",
            "source",
            "source.organizeImports"
          )
        ]
      ]
      isPreferredSupport = true
      disabledSupport = true
      dataSupport = true
      resolveSupport = CodeActionResolveSupportCapabilities [
        properties = ArrayList (
          "edit"
        )
      ]
      honorsChangeAnnotations = false
      dynamicRegistration = true
    ]
    codeLens = CodeLensCapabilities [
      dynamicRegistration = true
    ]
    documentLink = DocumentLinkCapabilities [
      tooltipSupport = true
      dynamicRegistration = true
    ]
    colorProvider = ColorProviderCapabilities [
      dynamicRegistration = true
    ]
    rename = RenameCapabilities [
      prepareSupport = true
      prepareSupportDefaultBehavior = Identifier
      honorsChangeAnnotations = true
      dynamicRegistration = true
    ]
    publishDiagnostics = PublishDiagnosticsCapabilities [
      relatedInformation = true
      tagSupport = Either [
        left = null
        right = DiagnosticsTagSupport [
        valueSet = ArrayList (
          Unnecessary,
          Deprecated
        )
      ]
      ]
      versionSupport = false
      codeDescriptionSupport = true
      dataSupport = true
    ]
    foldingRange = FoldingRangeCapabilities [
      rangeLimit = 5000
      lineFoldingOnly = true
      foldingRangeKind = FoldingRangeKindSupportCapabilities [
        valueSet = ArrayList (
          "comment",
          "imports",
          "region"
        )
      ]
      foldingRange = FoldingRangeSupportCapabilities [
        collapsedText = false
      ]
      dynamicRegistration = true
    ]
    typeHierarchy = TypeHierarchyCapabilities [
      dynamicRegistration = true
    ]
    callHierarchy = CallHierarchyCapabilities [
      dynamicRegistration = true
    ]
    selectionRange = SelectionRangeCapabilities [
      dynamicRegistration = true
    ]
    semanticTokens = SemanticTokensCapabilities [
      requests = SemanticTokensClientCapabilitiesRequests [
        range = Either [
          left = true
          right = null
        ]
        full = Either [
          left = null
          right = SemanticTokensClientCapabilitiesRequestsFull [
          delta = true
        ]
        ]
      ]
      tokenTypes = ArrayList (
        "namespace",
        "type",
        "class",
        "enum",
        "interface",
        "struct",
        "typeParameter",
        "parameter",
        "variable",
        "property",
        "enumMember",
        "event",
        "function",
        "method",
        "macro",
        "keyword",
        "modifier",
        "comment",
        "string",
        "number",
        "regexp",
        "operator",
        "decorator"
      )
      tokenModifiers = ArrayList (
        "declaration",
        "definition",
        "readonly",
        "static",
        "deprecated",
        "abstract",
        "async",
        "modification",
        "documentation",
        "defaultLibrary"
      )
      formats = ArrayList (
        "relative"
      )
      overlappingTokenSupport = false
      multilineTokenSupport = false
      serverCancelSupport = true
      augmentsSyntaxTokens = true
      dynamicRegistration = true
    ]
    moniker = null
    linkedEditingRange = LinkedEditingRangeCapabilities [
      dynamicRegistration = true
    ]
    inlayHint = InlayHintCapabilities [
      resolveSupport = InlayHintResolveSupportCapabilities [
        properties = ArrayList (
          "tooltip",
          "textEdits",
          "label.tooltip",
          "label.location",
          "label.command"
        )
      ]
      dynamicRegistration = true
    ]
    inlineValue = InlineValueCapabilities [
      dynamicRegistration = true
    ]
    diagnostic = DiagnosticCapabilities [
      relatedDocumentSupport = false
      dynamicRegistration = true
    ]
  ]
  notebookDocument = NotebookDocumentClientCapabilities [
    synchronization = NotebookDocumentSyncClientCapabilities [
      executionSummarySupport = true
      dynamicRegistration = true
    ]
  ]
  window = WindowClientCapabilities [
    workDoneProgress = true
    showMessage = WindowShowMessageRequestCapabilities [
      messageActionItem = WindowShowMessageRequestActionItemCapabilities [
        additionalPropertiesSupport = true
      ]
    ]
    showDocument = ShowDocumentCapabilities [
      support = true
    ]
  ]
  general = GeneralClientCapabilities [
    regularExpressions = RegularExpressionsCapabilities [
      engine = "ECMAScript"
      version = "ES2020"
    ]
    markdown = MarkdownCapabilities [
      parser = "marked"
      version = "1.1.0"
      allowedTags = null
    ]
    staleRequestSupport = StaleRequestCapabilities [
      cancel = true
      retryOnContentModified = ArrayList (
        "textDocument/semanticTokens/full",
        "textDocument/semanticTokens/range",
        "textDocument/semanticTokens/full/delta"
      )
    ]
    positionEncodings = ArrayList (
      "utf-16"
    )
  ]
  experimental = null
]
2022-10-28 22:31:12,282 [pool-3-thread-1] DEBUG - org.rascalmpl.vscode.lsp.BaseLanguageServer.ActualLanguageServer Initialized LSP connection with capabilities: InitializeResult [
  capabilities = ServerCapabilities [
    positionEncoding = null
    textDocumentSync = Either [
      left = Full
      right = null
    ]
    notebookDocumentSync = null
    hoverProvider = Either [
      left = true
      right = null
    ]
    completionProvider = null
    signatureHelpProvider = null
    definitionProvider = Either [
      left = true
      right = null
    ]
    typeDefinitionProvider = null
    implementationProvider = null
    referencesProvider = null
    documentHighlightProvider = null
    documentSymbolProvider = Either [
      left = true
      right = null
    ]
    workspaceSymbolProvider = null
    codeActionProvider = null
    codeLensProvider = CodeLensOptions [
      resolveProvider = false
      workDoneProgress = null
    ]
    documentFormattingProvider = null
    documentRangeFormattingProvider = null
    documentOnTypeFormattingProvider = null
    renameProvider = null
    documentLinkProvider = null
    colorProvider = null
    foldingRangeProvider = Either [
      left = true
      right = null
    ]
    declarationProvider = null
    executeCommandProvider = null
    workspace = WorkspaceServerCapabilities [
      workspaceFolders = WorkspaceFoldersOptions [
        supported = true
        changeNotifications = Either [
          left = null
          right = true
        ]
      ]
      fileOperations = null
    ]
    typeHierarchyProvider = null
    callHierarchyProvider = null
    selectionRangeProvider = null
    linkedEditingRangeProvider = null
    semanticTokensProvider = SemanticTokensWithRegistrationOptions [
      legend = SemanticTokensLegend [
        tokenTypes = ArrayList (
          "entity.name",
          "entity.other.inherited-class",
          "entity.name.section",
          "entity.name.tag",
          "entity.other.attribute-name",
          "variable",
          "variable.language",
          "variable.parameter",
          "variable.function",
          "constant",
          "constant.numeric",
          "constant.language",
          "constant.character.escape",
          "storage.type",
          "storage.modifier",
          "support",
          "keyword",
          "keyword.control",
          "keyword.operator",
          "keyword.declaration",
          "string",
          "comment",
          "invalid",
          "invalid.deprecated",
          "comment.block.documentation",
          "comment.block",
          "comment.single",
          "comment",
          "constant.character.escape",
          "constant.language",
          "constant.numeric.complex.imaginary",
          "constant.numeric.complex.real",
          "constant.numeric.complex",
          "constant.numeric.float.binary",
          "constant.numeric.float.decimal",
          "constant.numeric.float.hexadecimal",
          "constant.numeric.float.octal",
          "constant.numeric.float.other",
          "constant.numeric.float",
          "constant.numeric.integer.binary",
          "constant.numeric.integer.decimal",
          "constant.numeric.integer.hexadecimal",
          "constant.numeric.integer.octal",
          "constant.numeric.integer.other",
          "constant.numeric.integer",
          "constant.numeric",
          "constant.other.placeholder",
          "constant.other",
          "constant",
          "entity.name.class.forward-decl",
          "entity.name.class",
          "entity.name.constant",
          "entity.name.enum",
          "entity.name.function.constructor",
          "entity.name.function.destructor",
          "entity.name.function",
          "entity.name.impl",
          "entity.name.interface",
          "entity.name.label",
          "entity.name.namespace",
          "entity.name.section",
          "entity.name.struct",
          "entity.name.tag",
          "entity.name.trait",
          "entity.name.type",
          "entity.name.union",
          "entity.name",
          "entity.other.attribute-name",
          "entity.other.inherited-class",
          "entity",
          "invalid.deprecated",
          "invalid.illegal",
          "invalid",
          "keyword.control.conditional",
          "keyword.control.import",
          "keyword.control",
          "keyword.declaration.class",
          "keyword.declaration.enum",
          "keyword.declaration.function",
          "keyword.declaration.impl",
          "keyword.declaration.interface",
          "keyword.declaration.struct",
          "keyword.declaration.trait",
          "keyword.declaration.type",
          "keyword.declaration.union",
          "keyword.declaration",
          "keyword.operator.arithmetic",
          "keyword.operator.assignment",
          "keyword.operator.bitwise",
          "keyword.operator.logical",
          "keyword.operator.word",
          "keyword.operator",
          "keyword.other",
          "keyword",
          "markup.bold",
          "markup.deleted",
          "markup.heading",
          "markup.inserted",
          "markup.italic",
          "markup.list.numbered",
          "markup.list.unnumbered",
          "markup.other",
          "markup.quote",
          "markup.raw.block",
          "markup.raw.inline",
          "markup.underline.link",
          "markup.underline",
          "markup",
          "meta.annotation.identifier",
          "meta.annotation.parameters",
          "meta.annotation",
          "meta.block",
          "meta.braces",
          "meta.brackets",
          "meta.class",
          "meta.enum",
          "meta.function-call",
          "meta.function.parameters",
          "meta.function.return-type",
          "meta.function",
          "meta.group",
          "meta.impl",
          "meta.interface",
          "meta.interpolation",
          "meta.namespace",
          "meta.paragraph",
          "meta.parens",
          "meta.path",
          "meta.preprocessor",
          "meta.string",
          "meta.struct",
          "meta.tag",
          "meta.toc-list",
          "meta.trait",
          "meta.type",
          "meta.union",
          "meta",
          "punctuation.accessor",
          "punctuation.definition.annotation",
          "punctuation.definition.comment",
          "punctuation.definition.keyword",
          "punctuation.definition.string.begin",
          "punctuation.definition.string.end",
          "punctuation.definition.variable",
          "punctuation.section.block.begin",
          "punctuation.section.block.end",
          "punctuation.section.braces.begin",
          "punctuation.section.braces.end",
          "punctuation.section.brackets.begin",
          "punctuation.section.brackets.end",
          "punctuation.section.group.begin",
          "punctuation.section.group.end",
          "punctuation.section.interpolation.begin",
          "punctuation.section.interpolation.end",
          "punctuation.section.parens.begin",
          "punctuation.section.parens.end",
          "punctuation.separator.continuation",
          "punctuation.separator",
          "punctuation.terminator",
          "source",
          "storage.modifier",
          "storage.type.class",
          "storage.type.enum",
          "storage.type.function",
          "storage.type.impl",
          "storage.type.interface",
          "storage.type.struct",
          "storage.type.trait",
          "storage.type.union",
          "storage.type",
          "storage.type",
          "string.quoted.double",
          "string.quoted.other",
          "string.quoted.single",
          "string.quoted.triple",
          "string.regexp",
          "string.unquoted",
          "string",
          "support.class",
          "support.constant",
          "support.function",
          "support.module",
          "support.type",
          "text.html",
          "text.xml",
          "text",
          "variable.annotation",
          "variable.function",
          "variable.language",
          "variable.other.constant",
          "variable.other.member",
          "variable.other.readwrite",
          "variable.other",
          "variable.parameter"
        )
        tokenModifiers = EmptyList ()
      ]
      range = null
      full = Either [
        left = true
        right = null
      ]
      id = null
      workDoneProgress = null
      documentSelector = null
    ]
    monikerProvider = null
    inlayHintProvider = null
    inlineValueProvider = null
    diagnosticProvider = null
    experimental = null
  ]
  serverInfo = null
]
2022-10-28 22:31:12,309 [pool-3-thread-1] DEBUG - org.rascalmpl.vscode.lsp.rascal.RascalTextDocumentService Open file: TextDocumentItem [
  uri = "file:///tmp/rascal-lsp-error-example/main.rsc"
  languageId = "rascalmpl"
  version = 1
  text = "module main\n\n// Start typing.\n"
]
2022-10-28 22:31:12,315 [pool-3-thread-1] DEBUG - org.rascalmpl.vscode.lsp.uri.jsonrpc.impl.VSCodeVFSClient Connecting to VFS: 40991
2022-10-28 22:31:12,315 [pool-2-thread-1] WARN - Evaluator: Rascal outline |import:///| : Could not load lang::rascal::lsp::Outline due to: Could not import module lang::rascal::lsp::Outline: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html| at |import:///|
2022-10-28 22:31:12,315 [pool-2-thread-3] WARN - Evaluator: Rascal compiler |import:///| : Could not load lang::rascalcore::check::Checker due to: Could not import module lang::rascalcore::check::Checker: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html| at |import:///|
2022-10-28 22:31:12,315 [pool-2-thread-2] WARN - Evaluator: Rascal summary |import:///| : Could not load lang::rascalcore::check::Summary due to: Could not import module lang::rascalcore::check::Summary: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html| at |import:///|
2022-10-28 22:31:12,332 [pool-3-thread-1] INFO - Evaluator: Rascal summary Valid initialized progress bar: T585eb234152808ff61
2022-10-28 22:31:12,319 [pool-2-thread-3] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Catching
org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascalcore::check::Checker: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1) ~[?:?]
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305) ~[rascal.jar:?]
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241) ~[rascal.jar:?]
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132) ~[rascal.jar:?]
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140) ~[rascal-lsp.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
2022-10-28 22:31:12,319 [pool-2-thread-1] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Catching
org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascal::lsp::Outline: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1) ~[?:?]
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305) ~[rascal.jar:?]
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241) ~[rascal.jar:?]
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132) ~[rascal.jar:?]
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140) ~[rascal-lsp.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
2022-10-28 22:31:12,319 [pool-2-thread-2] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Catching
org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascalcore::check::Summary: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1) ~[?:?]
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305) ~[rascal.jar:?]
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241) ~[rascal.jar:?]
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132) ~[rascal.jar:?]
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140) ~[rascal-lsp.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
2022-10-28 22:31:12,336 [pool-2-thread-2] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Failure to import, RascalResolver: RascalSearchPath[ |lib://rascal-lsp| |lib://rascal-core| |lib://typepal| std ])
2022-10-28 22:31:12,336 [pool-2-thread-3] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Failure to import, RascalResolver: RascalSearchPath[ |lib://rascal-lsp| |lib://rascal-core| |lib://typepal| std ])
2022-10-28 22:31:12,337 [pool-2-thread-2] INFO - Evaluator: Rascal summary Finishing progress bar: T585eb234152808ff61 - Loading Rascal summary
2022-10-28 22:31:12,337 [pool-2-thread-3] INFO - Evaluator: Rascal compiler Finishing progress bar: T2a29b044162d2ae66 - Loading Rascal compiler
2022-10-28 22:31:12,337 [pool-2-thread-1] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Failure to import, RascalResolver: RascalSearchPath[ |lib://rascal-lsp| |lib://rascal-core| |lib://typepal| std ])
2022-10-28 22:31:12,338 [pool-2-thread-1] INFO - Evaluator: Rascal outline Finishing progress bar: T56466a2e142e94d31f - Loading Rascal outline
2022-10-28 22:31:12,340 [pool-3-thread-1] INFO - Evaluator: Rascal compiler Valid initialized progress bar: T2a29b044162d2ae66
2022-10-28 22:31:12,340 [pool-3-thread-1] INFO - Evaluator: Rascal compiler Finished progress bar: T2a29b044162d2ae66 - Loading Rascal compiler
2022-10-28 22:31:12,341 [pool-2-thread-2] INFO - Evaluator: Rascal summary Finished progress bar: T585eb234152808ff61 - Loading Rascal summary
2022-10-28 22:31:12,341 [pool-3-thread-1] INFO - Evaluator: Rascal outline Valid initialized progress bar: T56466a2e142e94d31f
2022-10-28 22:31:12,342 [pool-3-thread-1] INFO - Evaluator: Rascal outline Finished progress bar: T56466a2e142e94d31f - Loading Rascal outline
2022-10-28 22:31:12,343 [pool-3-thread-1] DEBUG - org.rascalmpl.vscode.lsp.rascal.RascalTextDocumentService Outline/documentSymbols: TextDocumentIdentifier [
  uri = "file:///tmp/rascal-lsp-error-example/main.rsc"
]
2022-10-28 22:31:12,361 [pool-3-thread-1] DEBUG - org.rascalmpl.vscode.lsp.rascal.RascalTextDocumentService Outline/documentSymbols: TextDocumentIdentifier [
  uri = "file:///tmp/rascal-lsp-error-example/main.rsc"
]
2022-10-28 22:31:12,658 [pool-2-thread-4] ERROR - org.eclipse.lsp4j.jsonrpc.RemoteEndpoint Internal error: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
Caused by: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:144) ~[rascal-lsp.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
    ... 3 more
Caused by: org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascal::lsp::Outline: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1) ~[?:?]
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305) ~[rascal.jar:?]
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241) ~[rascal.jar:?]
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132) ~[rascal.jar:?]
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140) ~[rascal-lsp.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
    ... 3 more
[Error - 10:31:12 PM] Request textDocument/documentSymbol failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:144)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    ... 3 more
Caused by: org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascal::lsp::Outline: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1)
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305)
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241)
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132)
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140)
    ... 4 more

2022-10-28 22:31:13,142 [pool-3-thread-1] DEBUG - org.rascalmpl.vscode.lsp.rascal.RascalTextDocumentService Outline/documentSymbols: TextDocumentIdentifier [
  uri = "file:///tmp/rascal-lsp-error-example/main.rsc"
]
2022-10-28 22:31:13,143 [pool-3-thread-1] ERROR - org.eclipse.lsp4j.jsonrpc.RemoteEndpoint Internal error: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
Caused by: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:144) ~[rascal-lsp.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
    ... 3 more
Caused by: org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascal::lsp::Outline: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1) ~[?:?]
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305) ~[rascal.jar:?]
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241) ~[rascal.jar:?]
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132) ~[rascal.jar:?]
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140) ~[rascal-lsp.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
    ... 3 more
[Error - 10:31:13 PM] Request textDocument/documentSymbol failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException: Failure to import required module lang::rascal::lsp::Outline
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:144)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    ... 3 more
Caused by: org.rascalmpl.interpreter.staticErrors.ModuleImport: Could not import module lang::rascal::lsp::Outline: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
    at .?(/:1)
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:305)
    at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:241)
    at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1132)
    at org.rascalmpl.vscode.lsp.util.EvaluatorUtil.lambda$makeFutureEvaluator$2(EvaluatorUtil.java:140)
    ... 4 more

Desktop (please complete the following information):

** Additional context The minimal viable directory structure that seems to be working for me is the following:

.
├── META-INF
│   └── RASCAL.MF
└── src
    └── Something.rsc
DavyLandman commented 2 years ago

True, we should think about better feedback.

Workaround: It needs a pom.xml file. .project is not used.

In util::Reflective there is an a function that setups a project correctly: https://github.com/usethesource/rascal/blob/bec47a0fd41662c48d4851f80d92c32595094d9c/src/org/rascalmpl/library/util/Reflective.rsc#L315

leegbestand commented 2 years ago

Dear @DavyLandman ,

Thank you for the response. I tried to setup a new project using newRascalProject, but I still get the same behaviour. It seems that the RASCAL.MF file is missing the Manifest-Version entry. When I add this entry with a value, the error is gone. So, updating the RASCAL.MF to the following:

Manifest-Version: 0.0.1
Project-Name: se
Source: src/main/rascal
Require-Libraries: 

works for me. I am not sure if the version has any effect? I tried several version and it seemed to have no effect.

jurgenvinju commented 2 years ago

ok. so when there is a MANIFEST.MF present in the same folder with a Manifest-Version: then everything works fine, but if the RASCAL.MF is alone, then it needs a Manifest-Version. weirdness

jurgenvinju commented 2 years ago

I've added Manifest-Version to the template. Considering this fixed for now, because letting the code work on broken RASCAL.MF files would require a lot of code.