Skip to content

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

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

Merged
merged 12 commits into from
Oct 4, 2021

Conversation

Vidushi-Gupta
Copy link

  • 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!

@karthiknadig karthiknadig added the skip tests Updates to tests unnecessary label Oct 1, 2021
@@ -9,6 +9,7 @@ import { IActiveResourceService, ITerminalManager } from '../common/application/
import { ITerminalActivator } from '../common/terminal/types';
import { IDisposable, IDisposableRegistry } from '../common/types';
import { ITerminalAutoActivation } from './types';
import { URI } from 'vscode-uri';
Copy link
Member

@karthiknadig karthiknadig Oct 1, 2021

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
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

await this.activator.activateEnvironmentInTerminal(terminal, {
resource: this.activeResourceService.getActiveResource(),
resource: resource,
Copy link
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
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
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
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
Member

@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
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 karthiknadig changed the base branch from main to OSD October 4, 2021 19:18
@karthiknadig karthiknadig merged commit b4f19ae into microsoft:OSD Oct 4, 2021
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]>
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]>
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