reddit / emacs

Projectile: Invalid version syntax: ‘not’ (must start with a number)

Idk323gvt · 2022-08-31 04:19
I am using Doom emacs (on windows) and whenever I try to switch projects using projectile I get the following error: Invalid version syntax: ‘not’ (must start with a number) Full log from when I try to switch (to a project) right as I launch emacs: Doom loaded 232 packages across 44 modules in 2.404s [yas] Check your `yas-snippet-dirs': c:/Users/singh/.doom.d/snippets/ is not a directory [yas] Prepared just-in-time loading of snippets with some errors. Check *Messages*. Switched to ’ZyBooks’ Projectile is initializing cache for d:/Code/Cpp/ZyBooks/ ... version-to-list: Invalid version syntax: ‘not’ (must start with a number) How can I fix this? Let me know if there is anything else I need to provide.
flexibeast · 2022-08-31 12:53
Since no-one else has yet responded .... Grepping the source of projectile-20220828.1421, the only call to `version-to-list` is on line 2921 of `projectile.el`, which is the last line of: (defun projectile--cmake-version () "Compute CMake version." (let* ((string (shell-command-to-string "cmake --version")) (match (string-match "^cmake version \\(.*\\)$" string))) (when match (version-to-list (match-string 1 string))))) The error "Invalid version syntax: ‘not’ (must start with a number)" suggests that `(match-string 1 string)`, which returns the text captured in the previous call to `string-match`, is returning a string starting with the text "not" for some reason. Perhaps `cmake` was not found? What does running `cmake --version` from the command line return for you?
Idk323gvt · 2022-08-31 16:13
It returns: cmake version 3.24.1 CMake suite maintained and supported by Kitware (kitware.com/cmake).
Idk323gvt · 2022-08-31 16:16
I don't know if this is relevant, but it also has something to do with cmake when I run vterm it outputs: CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "C:/Users/singh/.emacs.d/.local/straight/build-28.1/vterm/build/CMakeFiles/CMakeOutput.log". /usr/bin/sh: line 1: make: command not found /c/Users/singh/.emacs.d/.local/straight/build-28.1/vterm Maybe this'll help? Thanks for the response btw. :)
flexibeast · 2022-09-01 05:34
Okay, and what output do you get if you do M-: (shell-command-to-string "cmake --version") ? (Not sure if the stuff in your other comment is relevant, so i'll set that aside for now.)
Idk323gvt · 2022-09-02 20:03
I tried using M-x, is that where I’m supposed to type this? Because it says match required. (Sorry for the late response.
Idk323gvt · 2022-09-02 20:15
Ok I figured it out, for some reason Emax was only using apps in my scoop directory and since Fd wasn’t in my scoop directories project I was unable to switch directories.