Skip to content

Creating new Integrated Terminal doesn't take selected workspace into account when activating environment - #17595

Merged
Karthik Nadig (karthiknadig) merged 12 commits into
microsoft:OSDfrom
Vidushi-Gupta:main
Oct 4, 2021
Merged

Karthik Nadig (karthiknadig) merged 12 commits into
microsoft:OSDfrom
Vidushi-Gupta:main

Conversation

@Vidushi-Gupta

Copy link
Copy Markdown
  • Worked on the issue #15522 for Open Source Day 2021.
  • Added a news entry 15522.md mentioning the issue and thanking for the contribution.

Please let me know if there are any changes that I would have to make to this. Looking forward to contributing to Open Source!

Comment thread src/client/terminals/activation.ts
Comment thread src/client/terminals/activation.ts Outdated
import { ITerminalActivator } from '../common/terminal/types';
import { IDisposable, IDisposableRegistry } from '../common/types';
import { ITerminalAutoActivation } from './types';
import { URI } from 'vscode-uri';

@karthiknadig Karthik Nadig (karthiknadig) Oct 1, 2021 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add Uri to line 7. We don't need this package.

import { Terminal, Uri } from 'vscode';

@Vidushi-Gupta

Copy link
Copy Markdown
Author

Thank you for helping me through this. One test fails, is there a way to use the --fix option in order to eliminate the failed check? Thanks and regards

Comment thread src/client/terminals/activation.ts Outdated

await this.activator.activateEnvironmentInTerminal(terminal, {
resource: this.activeResourceService.getActiveResource(),
resource: resource,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
resource: resource,
resource,

That is what it means by property short hand.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you install prettier extension, and set that as the formatter for TS. it should automatically do this for you.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll fix this in a couple of hours from now! Thank you

@Vidushi-Gupta

Copy link
Copy Markdown
Author

I've formatted the file using Prettier in VSCode and then committed here. Although the details mention to run prettier, is the Tab count making a difference? I use the default number of spaces (8) for tab count as of now.

@karthiknadig

Copy link
Copy Markdown
Member

Vidushi Gupta (@Vidushi-Gupta) use 4 as the number of spaces. If that doesn't work I can fix this on my end.

@Vidushi-Gupta

Copy link
Copy Markdown
Author

I changed the number of spaces and then formatted it on Prettier, but the test still fails. Is there anything else that I might be missing?

@karthiknadig
Karthik Nadig (karthiknadig) changed the base branch from main to OSD October 4, 2021 19:18
@karthiknadig
Karthik Nadig (karthiknadig) merged commit b4f19ae into microsoft:OSD Oct 4, 2021
Karthik Nadig (karthiknadig) added a commit to karthiknadig/vscode-python that referenced this pull request Oct 13, 2021
… account when activating environment (microsoft#17595)

* Worked on issue microsoft#15522

* worked on microsoft#15522 issue

* added microsoft#15522 issue fix and contributor name

* Impored Uri from VSCode

* imported Uri correctly

* imported Uri correctly

* used short hand property on line 61

* formatted document using prettier

* formatted code using prettier

* formatted code using prettier

* updated formatting of the document

used 4 tab spaces in prettier

* Fix formatting.

Co-authored-by: Karthik Nadig <[email protected]>
Karthik Nadig (karthiknadig) added a commit that referenced this pull request Oct 13, 2021
… account when activating environment (#17595)

* Worked on issue #15522

* worked on #15522 issue

* added #15522 issue fix and contributor name

* Impored Uri from VSCode

* imported Uri correctly

* imported Uri correctly

* used short hand property on line 61

* formatted document using prettier

* formatted code using prettier

* formatted code using prettier

* updated formatting of the document

used 4 tab spaces in prettier

* Fix formatting.

Co-authored-by: Karthik Nadig <[email protected]>
Wes McKinney (wesm) pushed a commit to posit-dev/positron that referenced this pull request Mar 28, 2024
… account when activating environment (microsoft/vscode-python#17595)

* Worked on issue microsoft/vscode-python#15522

* worked on microsoft/vscode-python#15522 issue

* added microsoft/vscode-python#15522 issue fix and contributor name

* Impored Uri from VSCode

* imported Uri correctly

* imported Uri correctly

* used short hand property on line 61

* formatted document using prettier

* formatted code using prettier

* formatted code using prettier

* updated formatting of the document

used 4 tab spaces in prettier

* Fix formatting.

Co-authored-by: Karthik Nadig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip tests Updates to tests unnecessary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants