gap-packages / JupyterKernel

Native Jupyter kernel for GAP
https://gap-packages.github.io/JupyterKernel/
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Print traceback when encountering errors #70

Closed ssiccha closed 6 years ago

ssiccha commented 6 years ago

Uses the new command line option --alwaystrace. This lets GAP also print tracebacks when the break loop is disabled by -T.

This still overwrites the library functions Where, WHERE, and ErrorInner. This can be avoided once there is a central GAP error stream where these functions send their output, see gap-system/gap#1815.

Fixes #38.

ssiccha commented 6 years ago

This needs gap-system/gap#2551 to be merged.

codecov[bot] commented 6 years ago

Codecov Report

Merging #70 into master will decrease coverage by 17.64%. The diff coverage is 2.66%.

@@            Coverage Diff             @@
##           master     #70       +/-   ##
==========================================
- Coverage   61.24%   43.6%   -17.65%     
==========================================
  Files           9       9               
  Lines         836     883       +47     
==========================================
- Hits          512     385      -127     
- Misses        324     498      +174
Impacted Files Coverage Δ
gap/JupyterError.gi 18.18% <2.66%> (-22.91%) :arrow_down:
gap/JupyterHelp.gi 0% <0%> (-43.28%) :arrow_down:
gap/JupyterStream.gi 15% <0%> (-30%) :arrow_down:
gap/JupyterRenderable.gi 70% <0%> (-20%) :arrow_down:
gap/JupyterInspection.gi 69.11% <0%> (-16.18%) :arrow_down:
gap/JupyterUtil.gi 25% <0%> (-3.75%) :arrow_down:
gap/JupyterKernel.gi 76.79% <0%> (-1.69%) :arrow_down:
ssiccha commented 6 years ago

I've also added a little hack to let the JupyterKernel stay compatible with GAP 4.9.x versions. This is also relatively ugly, but otherwise JupyterKernel would become unusable until GAP 4.10 is released.

ssiccha commented 6 years ago

Done. Unless gap-system/gap#2551is merged into master the travis checks fail due to some "unbound global variable" syntax warning though.

ssiccha commented 6 years ago

I completely forgot about this pull request. Sorry! I just forgot to retrigger the tests once my patch was merged into the gap master branch...

I removed the compatibility hack for 4.9 and made 4.10 a dependency in the PackageInfo.g file.