Skip to content

File is not being analyzed (Unknown error) with Dart SDK version: 3.6.0 #227

@willvio

Description

@willvio

Describe the bug
LSP :: Error from the Language Server: File is not being analyzed (Unknown error) once opening a dart file. It seems that the issues mentioned in #169 and Dart-Code/Dart-Code#3929 were related to this but fixed afterwards. I updated my dart version to 3.6.0 but still nothing works.

To Reproduce
Launch emacs with emacs -q and evaluate the configuration code found in README

(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(package-initialize)

(setq package-selected-packages 
  '(dart-mode lsp-mode lsp-dart lsp-treemacs flycheck company
    ;; Optional packages
    lsp-ui company hover))

(when (cl-find-if-not #'package-installed-p package-selected-packages)
  (package-refresh-contents)
  (mapc #'package-install package-selected-packages))

(add-hook 'dart-mode-hook 'lsp)

(setq gc-cons-threshold (* 100 1024 1024)
      read-process-output-max (* 1024 1024))

Then opening dart files like lib/main.dart will cause the issue

Version

[LSP Dart] 1.24.3 at 2025.01.05 @ Emacs 29.4
[Dart SDK] Dart SDK version: 3.6.0 (stable) (Thu Dec 5 07:46:24 2024 -0800) on "macos_arm64"

[Flutter SDK] /opt/flutter/
[Flutter project] true
[Project entrypoint] /path/to/flutter/test_project/lib/main.dart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions