-
Notifications
You must be signed in to change notification settings - Fork 1.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
Refactor TensorBoard prompt and import tracking and add tests #15073
Conversation
Is it possible to use this instead? If not, you'll need to update the https://github.com/microsoft/vscode-python/blob/main/ThirdPartyNotices-Repository.txt. That file indicates code we've 'copied' to our source. |
@rchiodo Thanks for pointing that out, I think I looked at using xterm early on and wrote it off because xterm doesn't expose the parser in its public API (the source files I checked in are from the xterm package you linked), but now that I've gone the route of creating a CoreTerminal (because we need buffer management and parsing) it makes sense to just use xterm. The only catch is that xterm.js doesn't work with node.js out of the box: xtermjs/xterm.js#2749 The solution recommended in that thread is to set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to dispose more stuff & teardown
TLDR: Changing scope of this PR to cover adding some missing tests and refactoring tensorBoardPrompt.ts for consistency and SRP. Longer: Just demoed this to Graham, Jim and Brett + PMs. We decided not to prompt on seeing a tensorboard command being run in the terminal due to concerns about perf of the onDidWriteTerminalData API and the hackery required to get xterm to load in the extension host. Instead I'll implement a pared down version of this PR where we do best-effort detection of tensorboard (no parser or xterm, just a circular buffer, and we check the buffer contents on a whitespace character). If the perf impact of that isn't too bad (since we'd still be using onDidWriteTerminalData), I'll submit that as a separate review. The goal of that is to collect telemetry about how often users are launching tensorboard from the command line, in case all the other entrypoints prove inadequate for promoting usage. |
I've updated this PR (reducing scope because we're not likely to ship terminal command detection). Would appreciate re-review (@DonJayamanne I think you're still blocking on this one), thanks all! |
Has a news entry file (remember to thank yourself!).package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).