Skip to content

Commit

Permalink
#1228 multi root master (#2)
Browse files Browse the repository at this point in the history
* Add support for multi roots for formatting and linting (#1281)

* update to use latest api

* config changes for multiroot workspace

* linting support with multi roots

* multi root support for formatters

* determine workspace root path

* revert change

* support multiple configs per workspace folder

* modify formatters to use resource specific settings

* modified to settings are resolved using document uri

* 1228 multi root master (#1)

* fix #1280 handle env in shebang (#1290)

* handle shebangs that resolve paths from env

* oops

* make test more specific

* handle promise

* fix #1282 use PYTHONIOENCODING variable (#1291)

* fix #1270 debugger contribution changes (#1288)

* add onDebug activation

* use debug config provider for non workspace debugging

* forgot to save file before commiting a merge

* ability to opt out of telemetry using vscode settings (#1297)

* Fix #1284 debugging parameterized tests (#1299)

* fix #1298 remove vscode.startDebug command (#1300)

* fix #1298 remove vscode.startDebug command

* fix code review comments

* added period as per code review comments

* #1288 installer config and tests (#1302)

* update to use latest api

* config changes for multiroot workspace

* linting support with multi roots

* multi root support for formatters

* determine workspace root path

* revert change

* support multiple configs per workspace folder

* modify formatters to use resource specific settings

* modified installer to pass resource for workspace resolution

* null test in installer

* canges to config settings to support multiroot workspace

* changes to code refactoring to support workspace symbols

* oops

* modified to settings are resolved using document uri

* unit tests for multi root support

* fix unittests for multiroot

* exclude files

* add new line

* config changes for multiroot workspace

* new lines and enabled multi root linter tests

* fix sys variables

* added unit test to resolve ${workspaceRoot} in settings.json

* fixed code review comments

* fixed code review comments

* fix #1276 Pre-commit hooks to ensure code complies with standards (#1277)

* sanitize code

* gulp file to check code hygiene

* fix preLaunchTask in launch.json

* added missing packages

* enabled pre-commit using husky

* enabled a few checks for precommit hook

* fix tslint warnings when running tslint via gulp

* exclude webpack building, else tries to pull in tests as well

* improved checks for commits (strict)

* added new lines

* 1228 multi root workspace symbols (#1307)

* update to use latest api

* config changes for multiroot workspace

* linting support with multi roots

* multi root support for formatters

* determine workspace root path

* revert change

* support multiple configs per workspace folder

* modify formatters to use resource specific settings

* modified installer to pass resource for workspace resolution

* null test in installer

* canges to config settings to support multiroot workspace

* changes to code refactoring to support workspace symbols

* oops

* modified to settings are resolved using document uri

* unit tests for multi root support

* fix unittests for multiroot

* exclude files

* add new line

* config changes for multiroot workspace

* new lines and enabled multi root linter tests

* fix sys variables

* added unit test to resolve ${workspaceRoot} in settings.json

* #1228 workspace symbols with multiroot support

* fix test

* added some data for workspace symbol tests

* data for unit tests

* fixed to add support for multit roots with unit tests

* account for mutiroot files in sub directory

* disable all but multiroot tests

* fixed tests

* include files for tests

* Fixed travis tests for multi root workspace symbols (#1306)

* added logging

* more logging

* yay

* fixed

* more fixes

* fix tests

* removed logging

* enable all tests

* uncommented

* Added brackets around print statements (for p3)

* Fixed travis unit tests (#1308)

* update to use latest api

* config changes for multiroot workspace

* linting support with multi roots

* multi root support for formatters

* determine workspace root path

* revert change

* support multiple configs per workspace folder

* modify formatters to use resource specific settings

* modified installer to pass resource for workspace resolution

* null test in installer

* canges to config settings to support multiroot workspace

* changes to code refactoring to support workspace symbols

* oops

* modified to settings are resolved using document uri

* unit tests for multi root support

* fix unittests for multiroot

* exclude files

* add new line

* config changes for multiroot workspace

* new lines and enabled multi root linter tests

* fix sys variables

* added unit test to resolve ${workspaceRoot} in settings.json

* #1228 workspace symbols with multiroot support

* fix test

* added some data for workspace symbol tests

* data for unit tests

* fixed to add support for multit roots with unit tests

* account for mutiroot files in sub directory

* disable all but multiroot tests

* fixed tests

* fix tests

* test where failing

* properly determine root workspace

* fix pytest unit test

* delete files

* add awaiter

* use a path that works on multiple os

* fixes

* uncomment

* invert

* debug statements

* use default workspace

* reverted unwanted changes

* oops

* test unittests only

* more logging

* partial fixes to unit tests

* run all tests

* changes not to set paths for shebang tests

* remove comments

* update settings only if necessary

* fix test

* include files for tests

* Fixed travis tests for multi root workspace symbols (#1306)

* added logging

* more logging

* yay

* fixed

* more fixes

* fix tests

* removed logging

* enable all tests

* uncommented

* Added brackets around print statements (for p3)

* use resource when getting settings

* fix #1315 unit tests need to wait for extension to activate (#1316)

* fix #1314 allow for simultaneous language features (#1317)

* #1228 support multi roots in language service (#1309)

* update to use latest api

* config changes for multiroot workspace

* linting support with multi roots

* multi root support for formatters

* determine workspace root path

* revert change

* support multiple configs per workspace folder

* modify formatters to use resource specific settings

* modified installer to pass resource for workspace resolution

* null test in installer

* canges to config settings to support multiroot workspace

* changes to code refactoring to support workspace symbols

* oops

* modified to settings are resolved using document uri

* unit tests for multi root support

* fix unittests for multiroot

* exclude files

* add new line

* config changes for multiroot workspace

* new lines and enabled multi root linter tests

* fix sys variables

* added unit test to resolve ${workspaceRoot} in settings.json

* #1228 workspace symbols with multiroot support

* fix test

* added some data for workspace symbol tests

* data for unit tests

* fixed to add support for multit roots with unit tests

* account for mutiroot files in sub directory

* disable all but multiroot tests

* fixed tests

* fix tests

* test where failing

* properly determine root workspace

* fix pytest unit test

* delete files

* add awaiter

* use a path that works on multiple os

* fixes

* uncomment

* invert

* debug statements

* use default workspace

* reverted unwanted changes

* oops

* test unittests only

* more logging

* partial fixes to unit tests

* run all tests

* changes not to set paths for shebang tests

* remove comments

* update settings only if necessary

* fix test

* include files for tests

* Fixed travis tests for multi root workspace symbols (#1306)

* added logging

* more logging

* yay

* fixed

* more fixes

* fix tests

* removed logging

* enable all tests

* uncommented

* Added brackets around print statements (for p3)

* use resource when getting settings

* support multiroot in language services

* add additional tests for #1314 (#1318)

* #1228 run all tests under multiroot (#1322)

* modifications to fix tests to run under multi root setup

* log errors

* fix return type

* fix linter messages

* fix linter errors

* changes to ensure code is formatted correctly

* fixed comments

* delete unwanted file

* hide unwanted folders

* fixes to linters to run on multiroot setup

* udpate settings sequentially

* log the output

* show errors in deleting dir

* removed prospector test, to be completed in #1319

* fixes to tests and sorting provider

* fixed test for interpreter display

* undo commenting of code

* add new line

* fix code review issues

* ensure else is properly formatted

* fix code review comments

* fix #1304 preserve empty lines (#1329)

* #1228 multiroot interpreter display (#1339)

* modifications to fix tests to run under multi root setup

* log errors

* fix return type

* fix linter messages

* fix linter errors

* changes to ensure code is formatted correctly

* fixed comments

* delete unwanted file

* hide unwanted folders

* fixes to linters to run on multiroot setup

* udpate settings sequentially

* log the output

* show errors in deleting dir

* removed prospector test, to be completed in #1319

* fixes to tests and sorting provider

* fixed test for interpreter display

* undo commenting of code

* add new line

* support multi root in interpreter display

* fix linter

* changed package version

* disabled multiroot test

* backwards compatible change

* fix nose tests

* revert change

* enable test but disable it

* multi root support in utils.ts

* fixed #1328

* retries for flaky unit tests

* retry beforeEach

* common retry decorator

* enable telemetry for extension loads

* disable jupyter tests in multiroot tests

* clean up python Path before and after testsclean up python Path before and after tests

* rename test env variable

* dispose cfg settings

* dispose cfg settings

* update comment

* clean up

* rearrange to ensurfe launching ext is first debug option

* bug fix for display name

* resolved code review comment

* Fixed typp

* 1228 multiroot interpreter ui changes (#1345)

* fixes to unit tests and forgotten multiroot

* globally retry all tests 3 times

* refactor changing interpreters

* added tests

* fixed linter

* removed redundant files

* removed unwanted grep

* remove blank line

* fix 948 remove hardcoding of port number (#1353)

* fix #1041 when debugging a test do not cancel it when re-discovering tests (#1354)

* fix 1041 when debugging a test do not cancel it when re-discovering tests

* create enum for creation of cancellation token

* dispose correct cancellationToken

* bug fix - in unit tests

* bug fix - in unit tests

* #1228 multiroot unit test runner (#1357)

* fixes to unit tests and forgotten multiroot

* globally retry all tests 3 times

* refactor changing interpreters

* added tests

* fixed linter

* removed redundant files

* temp changes

* more changes

* lots of refactoring

* adding support for multiroot workspaces

* removed grep

* copy changes for #948 and #1353 into multroot

* replicate solution for #1041 and #1354

* #1041 create enum for creation of cancellation token

* multiroot support for unit tests

* remove empty line (linter warning)

* delete pyc before making changes to py file

* delete pyc file in teardown

* merged multiroot master

* pass uri of workspace when displaing prompt for configuration

* pass uri to commands

* fixed typos based on code review

* prefix path with forward slash, as is done in the extension  unit tests
  • Loading branch information
DonJayamanne authored Nov 1, 2017
1 parent 45a456b commit 2bc6b2e
Show file tree
Hide file tree
Showing 226 changed files with 8,264 additions and 4,016 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ root = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

# The indent size used in the `package.json` file cannot be changed
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
out
node_modules
*.pyc
.vscode/.ropeproject/**
src/test/.vscode/**
**/.vscode/.ropeproject/**
**/testFiles/**/.cache/**
*.noseids
.vscode-test
__pycache__
npm-debug.log
**/.mypy_cache/**
1 change: 0 additions & 1 deletion .jshintignore

This file was deleted.

10 changes: 0 additions & 10 deletions .jshintrc

This file was deleted.

1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ before_install: |
pyenv install $PYTHON
pyenv global $PYTHON
fi
export TRAVIS_PYTHON_PATH=`which python`
install:
- pip install --upgrade -r requirements.txt
- npm install
Expand Down
69 changes: 29 additions & 40 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [{
"name": "CompletionServer.ppy",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "python",
"program": "${workspaceRoot}/pythonFiles/completionServer.py",
"cwd": "${workspaceRoot}",
"env": {},
"args": [
"123"
],
"envFile": "${workspaceRoot}/.env",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
Expand All @@ -30,7 +12,9 @@
],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out",
"outFiles": [
"${workspaceRoot}/out/**/*.js"
],
"preLaunchTask": "compile"
},
{
Expand All @@ -43,7 +27,9 @@
"--server=4711"
],
"sourceMaps": true,
"outDir": "${workspaceRoot}/out/client",
"outFiles": [
"${workspaceRoot}/out/client/**/*.js"
],
"cwd": "${workspaceRoot}"
},
{
Expand All @@ -58,33 +44,36 @@
],
"stopOnEntry": false,
"sourceMaps": true,
"xxoutDir": "${workspaceRoot}/out/test",
"outFiles": [
"${workspaceRoot}/out/**/*.js"
],
"preLaunchTask": "compile"
},
{
"name": "Python",
"type": "python",
"name": "Launch Multiroot Tests",
"type": "extensionHost",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "python",
"program": "${file}",
"console": "integratedTerminal",
"args": [],
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceRoot}/src/testMultiRootWkspc/multi.code-workspace",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test"
],
"cwd": "${workspaceRoot}"
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/out/**/*.js"
],
"preLaunchTask": "compile"
}
],
"compounds": [{
"name": "Extension + Debugger",
"configurations": [
"Launch Extension", "Launch Extension as debugServer"
]
}]
"compounds": [
{
"name": "Extension + Debugger",
"configurations": [
"Launch Extension",
"Launch Extension as debugServer"
]
}
]
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"out": true, // set this to true to hide the "out" folder with the compiled JS files
"**/*.pyc": true,
"**/__pycache__": true,
"node_modules": true
"node_modules": true,
".vscode-test": true,
"**/.mypy_cache/**": true,
"**/.ropeproject/**": true
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
Expand Down
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@
"fileLocation": "relative"
}
]
},
{
"label": "lint-staged",
"type": "npm",
"script": "lint-staged",
"problemMatcher": [
"$tsc",
{
"base": "$tslint5",
"fileLocation": "relative"
}
]
}
]
}
17 changes: 9 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function reportFailures(failures) {
const line = position.lineAndCharacter ? position.lineAndCharacter.line : position.line;
const character = position.lineAndCharacter ? position.lineAndCharacter.character : position.character;

// Output in format similar to tslint for the linter to pickup
// Output in format similar to tslint for the linter to pickup.
console.error(`ERROR: (${failure.ruleName}) ${relative(__dirname, name)}[${line + 1}, ${character + 1}]: ${failure.failure}`);
});
}
Expand All @@ -103,9 +103,9 @@ const hygiene = exports.hygiene = (some, options) => {
.split(/\r\n|\r|\n/)
.forEach((line, i) => {
if (/^\s*$/.test(line)) {
// empty or whitespace lines are OK
// Empty or whitespace lines are OK.
} else if (/^(\s\s\s\s)+.*/.test(line)) {
// good indent
// Good indent.
} else if (/^[\t]+.*/.test(line)) {
console.error(file.relative + '(' + (i + 1) + ',1): Bad whitespace indentation');
errorCount++;
Expand All @@ -118,9 +118,10 @@ const hygiene = exports.hygiene = (some, options) => {
const formatting = es.map(function (file, cb) {
tsfmt.processString(file.path, file.contents.toString('utf8'), {
verify: true,
tsfmt: true,
editorconfig: true
// verbose: true
tsconfig: true,
tslint: true,
editorconfig: true,
tsfmt: true
}).then(result => {
if (result.error) {
console.error(result.message);
Expand Down Expand Up @@ -176,7 +177,7 @@ const hygiene = exports.hygiene = (some, options) => {
console.error(error.message);
},
finish: function () {
// forget the summary
// forget the summary.
}
};
}
Expand Down Expand Up @@ -213,7 +214,7 @@ const hygiene = exports.hygiene = (some, options) => {

gulp.task('hygiene', () => hygiene());

// this allows us to run hygiene as a git pre-commit hook
// this allows us to run hygiene as a git pre-commit hook.
if (require.main === module) {
const cp = require('child_process');

Expand Down
Loading

0 comments on commit 2bc6b2e

Please sign in to comment.