[llvm][TableGen][Jupyter] Note an easily encountered error
authorDavid Spickett <david.spickett@linaro.org>
Tue, 4 Jul 2023 09:16:44 +0000 (10:16 +0100)
committerDavid Spickett <david.spickett@linaro.org>
Wed, 5 Jul 2023 07:59:58 +0000 (08:59 +0100)
When using VSCode it'll default to the Python kernel the first
time you open the notebook. Mention this in the readme, as the fix
is simple but only if you know what to look for.

llvm/utils/TableGen/jupyter/README.md

index f290926..927a3d3 100644 (file)
@@ -21,7 +21,9 @@ If you have installed Jupyter into a virtual environment, adjust `python3` to
 be the interpreter for that environment. This will ensure that tools run the
 kernel in the correct context.
 
+```shell
     python3 -m tablegen_kernel.install
+```
 
 Then run one of:
 
@@ -39,6 +41,17 @@ Then run one of:
 `llvm-tblgen` is expected to be either in the `PATH` or you can set
 the environment variable `LLVM_TBLGEN_EXECUTABLE` to point to it directly.
 
+If you see an error like this:
+```shell
+  Cell In[8], line 2
+    // This is some tablegen
+    ^
+SyntaxError: invalid syntax
+```
+
+You are probably running the notebook using the iPython kernel. Make sure you
+ have selected the tablegen kernel.
+
 To run the kernel's doctests do:
 
 ```shell