Skip to content
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

Add support for configuring default startup *.sln in settings.json #2053

Merged
merged 33 commits into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6d2f205
ADD: ability to specifiy in settings.json the default *.sln file when…
janaka Dec 30, 2017
fad50e8
Fix logic
janaka Jan 3, 2018
6aafccf
Change pre-release version number
janaka Jan 3, 2018
db973e8
Refactor: change config key to be more generalised.
janaka Jan 3, 2018
fab697a
Fix: integertion tests: some issues with the multi sln test project
janaka Feb 18, 2018
e0edf51
Fix: up launch config and gitignore
janaka Feb 18, 2018
baa827b
Add: gitignores to test projects
janaka Feb 18, 2018
2a5056a
tweak gitignore
janaka Feb 18, 2018
5c7d70a
Merge: latest origin master
janaka Feb 18, 2018
290ff42
Fix: gitignore
janaka Feb 18, 2018
6de3809
package-lock.json changes
janaka Feb 18, 2018
8a69508
remove none existant project from test sln
janaka Feb 18, 2018
de1a8d2
Refactor: replace deprecated ${workspaceRoot} with ${workspaceFolder}
janaka Feb 18, 2018
86b1b72
Refactor: `defaultLaunchTarget` to `defaultLaunchSolution`
janaka Feb 18, 2018
7d2b1ab
Merge upstream master
janaka Apr 7, 2018
1aa5259
Fix: based on comments in PR #2053
janaka Apr 7, 2018
fe33a07
Merge in latest upstream/master
May 15, 2018
a7b289b
Update following merging master
May 15, 2018
6d484c3
Update: options related tests to cover `defaultLaunchSolution` property
May 15, 2018
8db7c15
Merge branch 'master' into config-default-sln
akshita31 May 21, 2018
c2eea4a
Merge: latest upstream/master
janaka Jun 13, 2018
6a4060f
UPDATE: launch.json
janaka Jun 14, 2018
64c4ca2
Add to another default values test
janaka Jun 14, 2018
906d76b
Cleanup/simplify
Jun 14, 2018
dfe1974
remove accidental addition
Jun 14, 2018
f4bce55
Merge pull request #1 from rchande/forJanaka
janaka Jun 14, 2018
d5cd8fc
Merge branch 'master' into config-default-sln
Jun 22, 2018
f801b8e
Merge: latest upstream master
Jul 2, 2018
c80dd09
Fix: missing lib ref in test projet sln files
Jul 4, 2018
1e0e8fa
Fix: test project missing lib ref in csproj file
Jul 4, 2018
72ccaad
Merge branch 'master' into config-default-sln
Jul 5, 2018
dcfa0c6
Merge branch 'master' into config-default-sln
akshita31 Jul 5, 2018
e34bf5a
Update: CHANGELOG with PR details
janaka Jul 5, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ install.*

*.vsix

obj/
bin/
test/**/.vscode
test/**/singleCsproj/.vscode
.logs/

\.DS_Store
33 changes: 16 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,59 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}"
"${workspaceFolder}/test/integrationTests/testAssets/singleCsproj",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/out/src/**/*.js"
"${workspaceFolder}/out/src/**/*.js"
]
},
{
"name": "Launch Unit Tests",
"name": "Launch Extension with singleCsproj",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/unitTests"
"${workspaceFolder}/test/integrationTests/testAssets/singleCsproj",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/out/test/**/*.js"
"${workspaceFolder}/out/test/**/*.js"
Copy link

Choose a reason for hiding this comment

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

{workspaceFolder} [](start = 18, length = 17)

Can you explain this? It looks like VSCode deprecated workspaceroot for workspacefolder?

Copy link
Member

Choose a reason for hiding this comment

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

That's right. workspaceRoot was deprecated when multi-root workspaces were added to VS Code.

]
},
{
"name": "Launch singleCsproj Workspace Tests",
"name": "Launch Extension with slnWithCsproj",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceRoot}/test/integrationTests/testAssets/singleCsproj",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/integrationTests"
"${workspaceFolder}/test/integrationTests/testAssets/slnWithCsproj",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/out/test/**/*.js"
"${workspaceFolder}/out/test/**/*.js"
]
},
{
"name": "Launch slnWithCsproj Workspace Tests",
"name": "Launch Unit Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceRoot}/test/integrationTests/testAssets/slnWithCsproj",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/integrationTests"
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/unitTests"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/out/test/**/*.js"
"${workspaceFolder}/out/test/**/*.js"
]
}
]
}
}
15 changes: 11 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"taskName": "build",
"command": "npm",
"isShellCommand": true,
"args": ["run", "compile"],
"args": [
"run",
"compile"
],
"showOutput": "always",
"isBuildCommand": true
},
Expand All @@ -14,19 +17,23 @@
"command": "echo",
"showOutput": "always",
"isShellCommand": true,
"args": ["Run tests in VS Code by launching the debugger with the 'Launch Tests' configuration."],
"args": [
"Run tests in VS Code by launching the debugger with the 'Launch Tests' configuration."
],
Copy link

Choose a reason for hiding this comment

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

While we're making whitespace-only changes, can we tab->space ?

"isTestCommand": true
},
{
"taskName": "tslint",
"command": "gulp",
"isShellCommand": true,
"args": ["tslint"],
"args": [
"tslint"
],
"problemMatcher": {
"owner": "tslint",
"fileLocation": [
"relative",
"${workspaceRoot}"
"${workspaceFolder}"
],
"severity": "warning",
"pattern": {
Expand Down
51 changes: 35 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 33 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,11 @@
"default": 250,
"description": "The maximum number of projects to be shown in the 'Select Project' dropdown (maximum 250)."
},
"omnisharp.defaultLaunchSolution": {
"type": "string",
"default": null,
"description": "The name of the default solution used at start up if the repo has multiple. e.g.'MyAwesomeSolution.sln'. Default value is `null` which will cause the first in alphabetical order to be chosen"
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This should have a period at the end.

Copy link

Choose a reason for hiding this comment

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

"multiple solutions"

},
"omnisharp.useEditorFormattingSettings": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -1255,9 +1260,9 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "^\"\\${workspaceRoot}/bin/Debug/${1:<target-framework>}/${2:<project-name.dll>}\"",
"program": "^\"\\${workspaceFolder}/bin/Debug/${1:<target-framework>}/${2:<project-name.dll>}\"",
"args": [],
"cwd": "^\"\\${workspaceRoot}\"",
"cwd": "^\"\\${workspaceFolder}\"",
"stopAtEntry": false,
"console": "internalConsole"
}
Expand All @@ -1280,9 +1285,9 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "^\"\\${workspaceRoot}/bin/Debug/${1:<target-framework>}/${2:<project-name.dll>}\"",
"program": "^\"\\${workspaceFolder}/bin/Debug/${1:<target-framework>}/${2:<project-name.dll>}\"",
"args": [],
"cwd": "^\"\\${workspaceRoot}\"",
"cwd": "^\"\\${workspaceFolder}\"",
"stopAtEntry": false,
"launchBrowser": {
"enabled": true,
Expand All @@ -1302,7 +1307,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "^\"\\${workspaceRoot}/Views\""
"/Views": "^\"\\${workspaceFolder}/Views\""
}
}
},
Expand All @@ -1314,13 +1319,13 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "^\"\\${workspaceRoot}/bin/Debug/${1:<target-framework>}/${2:<project-name.dll>}\"",
Copy link
Contributor

Choose a reason for hiding this comment

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

All of this part of launch.json is generated from src/tools/OptionsSchema.json. Can you fix it there too? Otherwise this will be lost the next time we run the generator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like this is fixed now in the latest master.

"program": "^\"\\${workspaceFolder}/bin/Debug/${1:<target-framework>}/${2:<project-name.dll>}\"",
"args": [],
"cwd": "^\"\\${workspaceRoot}\"",
"cwd": "^\"\\${workspaceFolder}\"",
"stopAtEntry": false,
"console": "internalConsole",
"pipeTransport": {
"pipeCwd": "^\"\\${workspaceRoot}\"",
"pipeCwd": "^\"\\${workspaceFolder}\"",
"pipeProgram": "^\"${3:enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'}\"",
"pipeArgs": [],
"debuggerPath": "^\"${4:enter the path for the debugger on the target machine, for example ~/vsdbg/vsdbg}\""
Expand All @@ -1336,14 +1341,23 @@
"request": "attach",
"processId": "^\"\\${command:pickRemoteProcess}\"",
"pipeTransport": {
"pipeCwd": "^\"\\${workspaceRoot}\"",
"pipeCwd": "^\"\\${workspaceFolder}\"",
"pipeProgram": "^\"${1:enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'}\"",
"pipeArgs": [],
"debuggerPath": "^\"${2:enter the path for the debugger on the target machine, for example ~/vsdbg/vsdbg}\""
}
}
}
]
],
"windows": {
"program": "./.debugger/vsdbg-ui.exe"
},
"osx": {
"program": "./.debugger/vsdbg-ui"
},
"linux": {
"program": "./.debugger/vsdbg-ui"
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure that you don't want these changes in your PR. Is that correct @gregg-miskelly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure how/why those got in there tbh.

Copy link
Member

Choose a reason for hiding this comment

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

It can happen when debugging the extension.

},
{
"type": "clr",
Expand Down Expand Up @@ -2121,6 +2135,15 @@
}
}
}
},
"windows": {
"program": "./.debugger/vsdbg-ui.exe"
},
"osx": {
"program": "./.debugger/vsdbg-ui"
},
"linux": {
"program": "./.debugger/vsdbg-ui"
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure that you don't want these changes in your PR. Is that correct @gregg-miskelly?

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct

Copy link
Member

Choose a reason for hiding this comment

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

@janaka: You need to revert this bit.

}
}
]
Expand Down
4 changes: 2 additions & 2 deletions src/omnisharp/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function activate(context: vscode.ExtensionContext, reporter: TelemetryRe
disposables.push(server.onServerStart(() => {
let measures: { [key: string]: number } = {};

utils.requestWorkspaceInformation(server)
utils.requestWorkspaceInformation(server)
.then(workspaceInfo => {
if (workspaceInfo.DotNet && workspaceInfo.DotNet.Projects.length > 0) {
measures['projectjson.projectcount'] = workspaceInfo.DotNet.Projects.length;
Expand Down Expand Up @@ -162,6 +162,6 @@ export function activate(context: vscode.ExtensionContext, reporter: TelemetryRe
disposables.push(vscode.debug.registerDebugConfigurationProvider('coreclr', new CSharpConfigurationProvider(server)));

context.subscriptions.push(...disposables);

return new Promise<string>(resolve => server.onServerStart(e => resolve(e)));
}
Loading