-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Better names & types for OutputItems like 'application/x.notebook.error-traceback' #120063
Comments
My plan is to have factory functions for this. Some rough sketches are here: vscode/src/vs/vscode.proposed.d.ts Lines 1318 to 1320 in e15a185
|
Yeah, I believe that's 100% jupyter leaking through. I think better type would be a normal |
@jrieken Until this is solved, would you add comments somewhere specifying what values are expected for the special-cased mime types? vscode/src/vs/vscode.proposed.d.ts Lines 1310 to 1315 in e15a185
Maybe: // application/x.notebook.error-traceback: NotebookErrorTraceback
// application/x.notebook.stdout: string
// application/x.notebook.stdout: string
// application/x.notebook.stderr: string
// application/x.notebook.stream: ???
// text/json, application/json: any (will be stringified)
// ...
interface NotebookErrorTraceback {
ename: string;
evalue: string;
traceback: string;
} In general |
Yeah, I really like that idea and I think we should make this change. fyi @DonJayamanne @colombod the type |
yes. those two types for value passing to renderers would be good for starters. my comments on that and mime types here: #123884 (comment) |
closing - |
Verify that |
Today when we create an output item for
application/x.notebook.error-traceback
there is no type information for the data provided for these output items.As a new extension user I dont know what's supported for these mime types.
As I was involved in the design of some of the API I now the that this is expected for
application/x.notebook.error-traceback
:When working on a new extension, i need to go into the Jupyter extension for VS Code to see what' supported.
Similarly whats the structure of the data passed into the following output items?:
Would it be better to have separate output items, e.g.
NotebookCellErrorOutputItem
,NotebookCellStreamOutputItem
Finally, not sure why properties are named
ename/evalue/traceback
.These names seem too tighly coupled with the Jupyter protocol. I'm ok with this, however when creating a kernel for non-jupyter or other, these don't seem right and doesn't feel like a good set of names in for the error object nodejs world.
FYI - Please consider this feedback from someone new to Notebooks (missing types/information/docs), or someone working on non-Jupyter notebooks (ename, evalue, etc seem like alient terms).
@jrieken /cc
The text was updated successfully, but these errors were encountered: