PMunch / nimlsp

Language Server Protocol implementation for Nim
MIT License
419 stars 51 forks source link

[Resolution]: Installation issues on macOS: Error: invalid indentation in ast_pattern_matching.nim #169

Open levinotik opened 1 year ago

levinotik commented 1 year ago
OS: macOS 13.5.1
Nim Compiler Version 2.0.0 [MacOSX: amd64]
nimble v0.14.2 compiled at 2023-10-01 01:41:20

I had previously installed Nim via Homebrew package manager. In order to avoid any issues this might cause, I did a brew uninstall nim and reinstalled nim via the preferred choosenim.

When I tried running nimble install nimlsp, I ran into the following issue:

   Downloading https://github.com/PMunch/nimlsp using git
   Verifying dependencies for nimlsp@0.4.4
      Info:  Dependency on jsonschema@>= 0.2.1 already satisfied
   Verifying dependencies for jsonschema@0.2.1
      Info:  Dependency on ast_pattern_matching@any version already satisfied
   Verifying dependencies for ast_pattern_matching@1.0.0
      Info:  Dependency on asynctools@>= 0.1.1 already satisfied
   Verifying dependencies for asynctools@0.1.1
   Installing nimlsp@0.4.4
      Building nimlsp/nimlsp_debug using c backend
   /Users/me/.nimble/pkgs2/ast_pattern_matching-1.0.0-b5b08c554b072eed227f98a437f7333584cf957e/ast_pattern_matching.nim(575, 28) Error: invalid indentation
      Prompt: Build failed for 'nimlsp@0.4.4', would you like to try installing 'nimlsp@#head' (latest unstable)? [y/N]
      Answer: n
         Tip: 12 messages have been suppressed, use --verbose to show them.
   nimble.nim(729)          install

      Error:  Aborting installation due to build failure.

I tried uninstalling ast_pattern_matching with nimble uninstall ast_pattern_matching but there was no package to delete: Error: Failed uninstall - no packages to delete.

As suggested by @PMunch, I went ahead and deleted nimble packages: rm -rf ~/.nimble/pkgs2/ ~/.nimble/pkgs to get rid of any remnants of the original brew installation of nim. After deleting the packages, nimble install nimlsp installed successfully.

levinotik commented 1 year ago

@PMunch shall I close since resolution is included?

PMunch commented 1 year ago

I haven't quite decided yet if this should be added to the README. So let's keep it open for now