-
Notifications
You must be signed in to change notification settings - Fork 498
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
🧹Cleanup unused code #2686
🧹Cleanup unused code #2686
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,6 @@ export class SessionManager implements Middleware { | |
private sessionSettings: Settings.ISettings = undefined; | ||
private sessionDetails: utils.IEditorServicesSessionDetails; | ||
private bundledModulesPath: string; | ||
private telemetryReporter: TelemetryReporter; | ||
|
||
// Initialized by the start() method, since this requires settings | ||
private powershellExeFinder: PowerShellExeFinder; | ||
|
@@ -66,18 +65,16 @@ export class SessionManager implements Middleware { | |
vscode.env.sessionId === "someValue.sessionId"; | ||
|
||
constructor( | ||
private requiredEditorServicesVersion: string, | ||
private log: Logger, | ||
private documentSelector: DocumentSelector, | ||
private hostName: string, | ||
private version: string, | ||
private reporter: TelemetryReporter) { | ||
hostName: string, | ||
version: string, | ||
private telemetryReporter: TelemetryReporter) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you want to do this for hostname and version above it too? I actually started the opposite change in debugAdapter.ts (by using underscore like we do in C#....) but I'm on the fence about it. I feel conflicted about the inline private declaration in the constructors... It's less boilerplate, but not as discoverable IMO. I'm fine making it consistent with what is used in the file now, but (eventually...) I may refactor one way or the other. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason why I removed the private inline field on
JavaScript doesn't have a notion of private/public, therefore the private modifier in TypeScript is just some syntactic sugar to give a compilation error if the stated intent is not followed, hence why people probably only have either a public or private field and therefore don't need a prefix it seems. The reason why I didn't remove the private inline field for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to eventually get consistent on whether we use ctror inline private (or public/protected) declarations. I lean towards using them since they do reduce boilerplate code and less code means less opportunity for bugs to creep in. |
||
|
||
this.platformDetails = getPlatformDetails(); | ||
|
||
this.HostName = hostName; | ||
this.HostVersion = version; | ||
this.telemetryReporter = reporter; | ||
|
||
const osBitness = this.platformDetails.isOS64Bit ? "64-bit" : "32-bit"; | ||
const procBitness = this.platformDetails.isProcess64Bit ? "64-bit" : "32-bit"; | ||
|
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.
This isn't used anywhere, right?
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 it was used by Typescript, then the build would've been red. It was indirectly used by the PowerShell release function that I removed in this PR as well. I believe this is an old artefact from the days when the preview was using PSES v2 but the RTM version was still on PSES v1. I cc'd @rjmholt to confirm this though
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 think you're right @bergmeister