-
Notifications
You must be signed in to change notification settings - Fork 70
More strict installer #80
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
Conversation
Substitute in F# 3.1 for later versions
…n, this makes it run in fake
Fix ancient build
Added an installation verification step to the startup sequence.
|
Do you know what the idea behind the argument check is? I'm wondering if the else branch is still compatible with these changes if args.Length = 0 then
InstallAndStart(true, true)
else
// Verify kernel installation status
InstallAndStart(false, false)
// Clear the temporary folder
try
if Directory.Exists(Config.TempDir) then Directory.Delete(Config.TempDir, true)
with exc -> Console.Out.Write(exc.ToString())
// adds the default display printers
Printers.addDefaultDisplayPrinters()
// get connection information
let fileName = args.[0]
let json = File.ReadAllText(fileName)
let connectionInformation = JsonConvert.DeserializeObject<ConnectionInformation>(json)
// start the kernel
Kernel <- Some (IfSharpKernel(connectionInformation))
Kernel.Value.StartAsync()
// block forever
Thread.Sleep(Timeout.Infinite) |
|
Ensuring a consistent state with the installer looks like a good change! |
|
The argument check is used to figure out whether I'm being run directly, or by Jupyter. When a kernel is started by Jupyter, it has an argument (the location where to find connection information). Before my change, in this condition it would never validate the installation. It's working correctly for me on either branch, though more testing is welcome. |
|
Makes sense and I see how your safer installation will work better there too. I'd tested it but was curious. I'll merge this now. |
Tightened the installer so that it checks for every static file, and also checks a "version" file, including when the kernel is started from the notebook. Changes to kernel.js to support starting with no config file, equivalent to Colin's (got rid of some replication of paths).