njpipeorgan / wolfram-language-notebook

Notebook support for Wolfram Language in VS Code
Apache License 2.0
159 stars 11 forks source link

LinksCreate[CreateUUID[]] does not work under macOS #18

Closed p-pavel closed 2 years ago

p-pavel commented 2 years ago

Thank you for the great extension! It looks very promising.

Starting kernel fails with message

The kernel has stopped due to the following error: Failed to create main and preemptive links; $kernel=$Failed

The probable reason for this is that link cannot be created with LinkCreate[CreateUUID[]] under macOS. When I try this in Mathematica notebook I get image

although this works under Linux.

(see init.wl lines 96/97)

Changing these lines to

$kernel=LinkCreate[];
$preemptive=LinkCreate[];

(and recompressing init-compressed.txt) fixes the issue for me (kernel takes care that names are unique)

BoGGoG commented 2 years ago

I have the same problem. All the same versions except VS Code 1.64.1

Edit: Your fix worked for me, but it took me quite long to figure out how to get init-compressed.txt. In case anyone else is wondering: You put the whole init.wl as a string into the Mathematica function Compress[].