-
Notifications
You must be signed in to change notification settings - Fork 69
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
webpack #996
webpack #996
Conversation
return await extension.activateInternal(ctx, perfStats); | ||
} | ||
|
||
exports.activate = activate; |
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.
I don't see this being imported anywhere. Are these used by AzureTools?
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.
Yes. Added comment.
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.
I mean, used by vscode
// Export for use by vscode
exports.activate = activate;
exports.deactivate = deactivate;
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.
Ah, sounds good.
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.
Was having problems hitting a breakpoint - but will discuss offline.
I did some spot testing and couldn't seem to attach an account... but I couldn't debug so idk why :) I figure we could handle that in a separate PR so still approving.
*.vsix | ||
.vscode-test | ||
test-results.xml | ||
dist |
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.
nit: all but these last two are already in the gitignore
@@ -12,3 +12,17 @@ tslint.json | |||
.github/** | |||
test-results.xml | |||
.azure-pipelines/** | |||
node_modules/** | |||
out/** |
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.
Yeah a lot of these are duplicates. Here's the alphabetized, de-duped list for the entire file:
.azure-pipelines/**
.github/**
.gitignore
.travis.yml
.vscode-test/**
.vscode/**
*.tgz
**/*.map
build
dist/test/**
grammar
gulp*
node_modules/**
out/**
package-lock.json
src/**
stats.json
test-results.xml
test/**
testOutput/**
tsconfig.json
tslint.json
webpack.config*
(I tried out this extension to help: https://marketplace.visualstudio.com/items?itemName=Tyriar.sort-lines)
extension.ts
Outdated
export { getAllCommandsFromText, getCommandFromTextAtLocation } from './src/mongo/MongoScrapbook'; | ||
export { rejectOnTimeout, valueOnTimeout } from './src/utils/timeout'; | ||
|
||
// These use instanceof and therefore we need to make sure we're using the same version of the bson module in the tests as in the bundle, |
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.
Does this only apply to test code? If not, it makes me kinda nervous. What exactly is the problem with instanceof? I guess I'd rather find a fix for instanceof than single out every single use of it we run in to.
Is this at all related to the thing you did here? microsoft/vscode-docker#745 Either way don't forget to do that here :)
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.
Yes, tests only (updated comment). The issue is that the test code is completely separate from the extension bundle, so if we do a blind import from the tests, you get two different instances of the module and hence two difference classes with different identity. That's also why we're importing everything from extension.ts instead of importing individual files directly from the tests like we used to, because you'd end up with two different instances of the code (and hence extensionVariables isn't a singleton, etc.).
extension.js is separate from the test code and uses an internal webpack version of import, so it doesn't know about anything imported by code outside of it (something I wish we could change - I tried).
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.
Is this at all related to the thing you did here? microsoft/vscode-docker#745 Either way don't forget to do that here :)
No. The other fix will be in the shared version.
@@ -126,9 +126,9 @@ | |||
} |
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.
Can you run another update on this file? I still see some changes when I run npm install
on my machine. (typescript changed from 2.9.2 to 3.2.2)
src/extensionVariables.ts
Outdated
@@ -17,6 +18,7 @@ export namespace ext { | |||
export let context: ExtensionContext; | |||
export let outputChannel: OutputChannel; | |||
export let reporter: ITelemetryReporter; | |||
export let resourcesPath = path.join(__dirname, 'resources'); |
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.
You have resourcesPath
in both constants and extensionVariables. Do we need both? Seems kinda confusing.
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.
Removed from extvars
NOTES: