-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Auto activation of environment in new terminals #2277
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
Conversation
e4979b0
to
2b8b8b3
Compare
84ca8a1
to
c9e459c
Compare
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 love that we are switching some of our test suites from system to unit tests! Let's do more of that when we can...
That being said, is there anything we can do, any event available we can hook into, to get rid of that sleep
?
I've approved anyways because I realize this is a 'pre-existing condition', but if there is a way to get proper notification of when things are ready I'd love to get that made into an issue...
|
||
// Give the command some time to complete. | ||
// Its been observed that sending commands too early will strip some text off in VS Terminal. | ||
const delay = (terminalShellType === TerminalShellType.powershell || TerminalShellType.powershellCore) ? 1000 : 500; |
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 would really love to see if we can get an event from the shell when it is 'ready' instead of this sleep stuff. Is there any issue related to this that VSCode knows about/can do anything about?
Do we know why this is the case at all?
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.
if we can get an event from the shell when it is 'ready' instead o
Not available.
Do we know why this is the case at all?
Powershell is slow. VS Code doesn't get any feedback when process in terminal has completed. Basically the stream is ready to write anytime.
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.
And we just use the VS Code api (which in turn doesn't provide any feedback on when stuff is ready or not, explained above).
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.
That being said, is there anything we can do, any event available we can hook into, to get rid of that sleep?
This has been an ongoing issue in VSC. Unfortunately nothing we can do at this stage.
suite(testSuiteName, () => { | ||
suite(testSuiteName, async function () { | ||
// tslint:disable-next-line:no-invalid-this | ||
this.timeout(5000); // Activation of terminals take some time (there's a delay in the code to account for VSC Terminal issues). |
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.
BOOOOOOO
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, I know you have to up the limit here a bit in order to cope, but still, boo.
Fixes #1387
"1.2.3"
, not"^1.2.3"
)package-lock.json
has been regenerated if dependencies have changed