Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble with Version 0.9.5 #163

Closed
mrmoon01 opened this issue Jun 5, 2017 · 14 comments
Closed

trouble with Version 0.9.5 #163

mrmoon01 opened this issue Jun 5, 2017 · 14 comments
Labels
bug a bug in the product IMPORTANT

Comments

@mrmoon01
Copy link

mrmoon01 commented Jun 5, 2017

Today I updated to version 0.9.5. All of the commands are not working anymore. Also build and debug symbols at the bottom of vs code lost. My vs code version is 1.12.2

@vector-of-bool
Copy link
Contributor

THAT'S BAD. I'm seeing the same issue on my Linux box.

Could you open the VSCode developer tools and paste the traceback for "Error during CMake Tools initialization"

Also, what platform are you working on?

@vector-of-bool vector-of-bool added bug a bug in the product IMPORTANT labels Jun 5, 2017
@gruntbatch
Copy link

gruntbatch commented Jun 5, 2017

I also updated and am encountering similar errors. Upon launching VSCode, I am given a warning that VSCode was "Unable to determine CMake Generator to use." Here are the tracebacks for my errors:

Error setting up client: Error: No generator!
    at Function.<anonymous> (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\server-client.js:235:39)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\server-client.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Error during CMake Tools initialization! TypeError: Cannot read property 'getGlobalSettings' of undefined
    at ServerClientCMakeTools.<anonymous> (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\client.js:326:44)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\client.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:103:7)

I'm on Windows, using VSCode 1.12.2

Turns out, I need to pay more attention to the changelogs. @vector-of-bool thanks, and feel free to clean this up if you'd like.

@vector-of-bool
Copy link
Contributor

vector-of-bool commented Jun 5, 2017

@gruntbatch, something's awry with CMake Server in your case. As a temporary workaround, you can disable CMake Server (It was set enabled by default in the recent update). Set cmake.enableCMakeServer cmake.useCMakeServer to false in your settings.json.

@vector-of-bool
Copy link
Contributor

@gruntbatch, even then, you shouldn't see this error. Were you running in a build environment context? Within a VS dev command Window?

@gruntbatch
Copy link

gruntbatch commented Jun 6, 2017

@vector-of-bool No, I wasn't.
I couldn't see cmake.enableCMakerServer as a configurable setting, so I assume you were referring to the cmake.useCMakerServer.
With cmake.useCMakeServer disabled, I have no problems what so ever I can build projects without issue. With cmake.useCMakeServer enabled, and launching from the developer console, I get these messages:

Error setting up client: Error: Failed to activate protocol version: "CMAKE_GENERATOR" is set but incompatible with configured generator value.
    at CMakeServerClient._onMessage (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\server-client.js:125:33)
    at CMakeServerClient._onMoreData (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\server-client.js:103:18)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

Error during CMake Tools initialization! TypeError: Cannot read property 'getGlobalSettings' of undefined
    at ServerClientCMakeTools.<anonymous> (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\client.js:326:44)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\USER\.vscode\extensions\vector-of-bool.cmake-tools-0.9.5\out\src\client.js:4:58)

And I get messages about cmake commands not being found.

I haven't done any major configuring of CMake (3.8.2), besides putting it on the path, so it's likely that I ignored a critical step at some point.

@vector-of-bool
Copy link
Contributor

@gruntbatch, what generator were you using before this broke?

@vector-of-bool
Copy link
Contributor

Just pushed an 0.9.6. Hopefully it will solve this problem. Can I get a report back when you get to try it?

@mrmoon01
Copy link
Author

mrmoon01 commented Jun 6, 2017

Same problem with 9.6
I am working on Linux Mint (Ubuntu 5.4.0-6ubuntu1~16.04.4)
I am not sure if I understand you correct but this is what I get when open developer tool's console

[Update] After disabling cmake server it is working.

[Extension Host] Error from cmake-server process: CMake Error: cmake version 3.5.1
Usage: cmake -E <command> [arguments...]
Available commands: 
  chdir dir cmd [args...]   - run command in a given directory
  compare_files file1 file2 - check if file1 is same as file2
  copy <file>... destination  - copy files to destination (either file or directory)
  copy_directory <dir>... destination   - copy content of <dir>... directories to 'destination' directory
  copy_if_different <file>... destination  - copy files if it has changed
  echo [<string>...]        - displays arguments as text
  echo_append [<string>...] - displays arguments as text but no new line
  env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...
                            - run command in a modified environment
  environment               - display the current environment
  make_directory <dir>...   - create parent and <dir> directories
  md5sum <file>...          - compute md5sum of files
  remove [-f] <file>...     - remove the file(s), use -f to force it
  remove_directory dir      - remove a directory and its contents
  rename oldname newname    - rename a file or directory (on one volume)
  tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]
                            - create or extract a tar or zip archive
  sleep <number>...         - sleep for given number of seconds
  time command [args...]    - run command and return elapsed time
  touch file                - touch a file.
  touch_nocreate file       - touch a file but do not create it.
Available on UNIX only:
  create_symlink old new    - create a symbolic link new -> old

@magpier84
Copy link

magpier84 commented Jun 6, 2017

On macOS 0.9.5 version not working at all without any errors/output.
[Update] I have disabled CMake server and it is working now.

@gruntbatch
Copy link

gruntbatch commented Jun 6, 2017

@vector-of-bool Visual Studio 15 2017.
And 9.6 seems to work fine for me.

@Moerten
Copy link

Moerten commented Jun 6, 2017

Same problem with debian 8.8.0 (cmake tools 0.9.5 and 0.9.6) for several days. I also deleted the build folder but still have an "CMake: Unconfigured Project: Release: Ready". I always pressed "F7" for rebuild. Do I need to reconfigure cmake again having deleted the build folder now? Also tried several commands from "Befehlspalette": cmake: clean; cmake: configure; cmake: build and so on.

@vector-of-bool
Copy link
Contributor

@mrmoon01, in your case, with CMake 3.5, it should automatically fall back to the legacy backend, because CMake Server isn't available at that version.

For anyone else still experiencing this issue after the 0.9.6 update, could I get your CMake version and the output from the dev console?

@Moerten
Copy link

Moerten commented Jun 7, 2017

extensionHost.ts:285 [Extension Host] [cmake output]: cmake version 3.0.2
extensionHost.ts:285 [Extension Host] [cmake output]:
extensionHost.ts:285 [Extension Host] [cmake output]: CMake suite maintained and supported by Kitware (kitware.com/cmake).
extensionHost.ts:285 [Extension Host] cmake exited with return code 0
extensionHost.ts:285 [Extension Host] Loading CMake Tools from /Path/To/My/Application/.vscode/.cmaketools.json
extensionHost.ts:285 [Extension Host] Started new CMake Server instance with PID 2104
extensionHost.ts:285 [Extension Host] Error from cmake-server process: CMake Error: cmake version 3.0.2
Usage: cmake -E [command] [arguments ...]
Available commands:
chdir dir cmd [args]... - run command in a given directory
compare_files file1 file2 - check if file1 is same as file2
copy file destination - copy file to destination (either file or directory)
copy_directory source destination - copy directory 'source' content to directory 'destination'
copy_if_different in-file out-file - copy file if input has changed
echo [string]... - displays arguments as text
echo_append [string]... - displays arguments as text but no new line
environment - display the current environment
make_directory dir - create a directory
md5sum file1 [...] - compute md5sum of files
remove [-f] file1 file2 ... - remove the file(s), use -f to force it
remove_directory dir - remove a directory and its contents
rename oldname newname - rename a file or directory (on one volume)
tar [cxt][vfz][cvfj] file.tar [file/dir1 file/dir2 ...]
- create or extract a tar or zip archive
sleep ... - sleep for given number of seconds
time command [args] ... - run command and return elapsed time
touch file - touch a file.
touch_nocreate file - touch a file but do not create it.
Available on UNIX only:
create_symlink old new - create a symbolic link new -> old

d.logExtensionHostMessage @ extensionHost.ts:285
extensionHost.ts:285 [Extension Host] Error from cmake-server process:
d.logExtensionHostMessage @ extensionHost.ts:285
extensionHost.ts:285 [Extension Host] (node:2002) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
d.logExtensionHostMessage @ extensionHost.ts:285

ytimenkov pushed a commit to ytimenkov/vscode-cmake-tools that referenced this issue Jun 7, 2017
@vector-of-bool
Copy link
Contributor

All,

It's no longer required (and not recommended) to manually set cmake.useCMakeServer. Please set it back to true: version detection is fixed and you should no longer see errors. If you do see errors after changing it back, please open up a new ticket with the new-and-improved initialization error messages.

See my latest comment on #157 regarding the above issues.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product IMPORTANT
Projects
None yet
Development

No branches or pull requests

5 participants