-
Notifications
You must be signed in to change notification settings - Fork 307
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
Fix launching extension in safari #10908
Conversation
build/ci/postInstall.js
Outdated
return; | ||
} | ||
const textToReplace = `: setImmediate;`; | ||
const textToReplaceWith = `: typeof setImmediate === 'function' ? setImmediate : setTimeout;`; |
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.
Will submit PR upstream, setImmediate
only runs in node. however we run our extensions in webworker, and jupyter code is written to run either in browser or node.
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.
will look into (tomorrow) using the setimmediate pollyfill npm package as an alternative to modifying such scripts.
build/ci/postInstall.js
Outdated
const contents = dedent` | ||
'use strict'; | ||
|
||
exports.python = { |
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.
Other reg exes are not required and that causes issues in loading extension.
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
const { launch } = require('./launchWebUtils'); |
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.
Added ability to launch extension in vscode web locally
@@ -66,7 +66,7 @@ export function extractRequireConfigFromWidgetEntry(baseUrl: Uri, widgetFolderNa | |||
// the config entry is js, and not json. | |||
// We cannot eval as thats dangerous, and we cannot use JSON.parse either as it not JSON. | |||
// Lets just extract what we need. | |||
configStr = stripComments(configStr); | |||
configStr = stripComments(configStr, { language: 'python' }); |
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.
Be explicit about the fact that we're only stripping js code comments
Codecov Report
@@ Coverage Diff @@
## main #10908 +/- ##
======================================
- Coverage 63% 63% -1%
======================================
Files 482 482
Lines 33831 33831
Branches 5515 5515
======================================
- Hits 21468 21445 -23
- Misses 10319 10345 +26
+ Partials 2044 2041 -3
|
build/ci/postInstall.js
Outdated
@@ -125,7 +126,77 @@ function fixJupyterLabRenderers() { | |||
} | |||
} | |||
|
|||
function fixJupyterLabFuture() { |
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.
Do we need like, a comment here? Or a link to the PR upstream?
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.
Could maybe use a comment in postInstall.js
@IanMatthewHuff @rchiodo please re-review, updated the solution |
f04ce12
to
d0b8256
Compare
Fixes #10621