fsprojects/IfSharp

Kernel does not respond to empty input

Closed this issue · 4 comments

Description

Attempting integration with SoS notebook and implementing magics according to the SoS standard.

It appears that the IfSharp kernel, unlike other kernels, does not respond to an empty input, which is actually the content of the cell after removing the magic.

Although the SoS maintainer has created a workaround, this bug may manifest in other projects down the line.

Repro steps

It's not clear to me how to repro this without installing SoS and and the sos-fsharp extension.

Using the IfSharp kernel in a vanilla notebook does not repro the behavior.

Expected behavior

A cell with magics executes.

Actual behavior

A cell with magics hangs after execution. In this example, the directory before execution was /z/aolney/repos/sos-fsharp.

Screenshot from 2019-07-21 15-36-05

Known workarounds

The SoS maintainer has created a workaround

Related information

  • Operating system

Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

  • Branch

IfSharp.v3.0.1

  • .NET Runtime, CoreCLR or Mono Version

Mono JIT compiler version 6.0.0.313 (tarball Sun Jul 14 09:57:59 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(600)
Suspend: hybrid
GC: sgen (concurrent by default)

Just to clarify, the kernel works all right if users execute an empty cell in a notebook because the frontend will simply skip the cell. The problem happens when an execute_input shell message with an empty code ('code': '') is sent directly to the kernel, in which case the kernel does not respond with an execute_reply message. This does not conform to the Jupyter messaging protocol because an execute_reply message is always expected for execute_input.

Happy to take adjustments to this project so it can work with SoS. Historically it's only implemented what was needed rather than actually following the spec.

Is sos-fsharp published? The currently linked https://badge.fury.io/py/sos-fsharp doesn't seem to go anywhere.

sos-fsharp is still under development, with work happening in the v1 branch. Once it is completed, users can exchange variables between ifsharp and many other kernels that SoS supports using magics such as %get and %put.

Sounds good, once it's published and we could easily test a fix happy to have a go here