From b9f00b4abbe1b37bc51ce18ae34e73b1a56a4b35 Mon Sep 17 00:00:00 2001 From: Kareem Zidane Date: Sat, 24 Sep 2016 12:57:06 +0200 Subject: [PATCH 1/8] logs gdbserver's stderr in debug mode only --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b9da4b2d..1851f4e0 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "c9.ide.find": "#e632ecf4be", "c9.ide.find.infiles": "#ad9ff74638", "c9.ide.find.replace": "#8468067976", - "c9.ide.run.debug": "#f10c7e7d19", + "c9.ide.run.debug": "#31bb4de19b", "c9.automate": "#47e2c429c9", "c9.ide.ace.emmet": "#6dc4585e02", "c9.ide.ace.gotoline": "#d33220b1e0", @@ -96,7 +96,7 @@ "c9.ide.immediate": "#0b0ee744f9", "c9.ide.installer": "#2921efaf6d", "c9.ide.language.python": "#9fba572b1a", - "c9.ide.language.go": "#6ce1c7a7ef", + "c9.ide.language.go": "#8cbcc327c8", "c9.ide.navigate": "#5d5707058c", "c9.ide.newresource": "#981a408a7b", "c9.ide.openfiles": "#2ae85a9e33", From b1fc65521d141cbc828f9e095f7cd50c32566c65 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Wed, 12 Oct 2016 14:50:00 -0400 Subject: [PATCH 2/8] Fix #3 This should alleviate the deprecation warning. More information: [Docs on `pip download`](https://pip.pypa.io/en/stable/reference/pip_download/). --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d1e2aa61..1e5d62b9 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "c9.ide.language.javascript.tern": "#0545a6385d", "c9.ide.language.javascript.infer": "#b9c2e4bdb8", "c9.ide.language.jsonalyzer": "#a0549e14ff", - "c9.ide.language.codeintel": "#0fe92d6f46", + "c9.ide.language.codeintel": "#17ed23ef58", "c9.ide.collab": "#39fc27d13f", "c9.ide.local": "#9169fec157", "c9.ide.find": "#e632ecf4be", @@ -95,7 +95,7 @@ "c9.ide.immediate": "#0b0ee744f9", "c9.ide.installer": "#2921efaf6d", "c9.ide.language.python": "#9fba572b1a", - "c9.ide.language.go": "#6ce1c7a7ef", + "c9.ide.language.go": "#f17738ff7b", "c9.ide.navigate": "#5d5707058c", "c9.ide.newresource": "#981a408a7b", "c9.ide.openfiles": "#2ae85a9e33", From 7daea73876442a996336d2f8ea26593c1016bba4 Mon Sep 17 00:00:00 2001 From: Kareem Zidane Date: Tue, 25 Oct 2016 17:51:49 +0000 Subject: [PATCH 3/8] detects more syntax modes from shebang --- package.json | 6 +++--- plugins/c9.ide.ace/ace.js | 13 +++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 70759531..b7c362b4 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "c9.ide.language.javascript.tern": "#0545a6385d", "c9.ide.language.javascript.infer": "#b9c2e4bdb8", "c9.ide.language.jsonalyzer": "#a0549e14ff", - "c9.ide.language.codeintel": "#0fe92d6f46", + "c9.ide.language.codeintel": "#957b840fff", "c9.ide.collab": "#a414999755", "c9.ide.local": "#9169fec157", "c9.ide.find": "#e632ecf4be", @@ -95,8 +95,8 @@ "c9.ide.imgeditor": "#612e75ef4f", "c9.ide.immediate": "#0b0ee744f9", "c9.ide.installer": "#2921efaf6d", - "c9.ide.language.python": "#9fba572b1a", - "c9.ide.language.go": "#6ce1c7a7ef", + "c9.ide.language.python": "#189b55135d", + "c9.ide.language.go": "#c58539fc05", "c9.ide.navigate": "#5d5707058c", "c9.ide.newresource": "#981a408a7b", "c9.ide.openfiles": "#2ae85a9e33", diff --git a/plugins/c9.ide.ace/ace.js b/plugins/c9.ide.ace/ace.js index da050694..8f0747fa 100644 --- a/plugins/c9.ide.ace/ace.js +++ b/plugins/c9.ide.ace/ace.js @@ -1461,11 +1461,16 @@ define(function(require, exports, module) { return; } else if (/^#!/.test(firstLine)) { - var match = firstLine.match(/\b(node|bash|sh)\b/); - switch (match && match[1]) { + var match = firstLine.match(/\b(bash|ksh|node|perl|sh)\b|\b(php|python|ruby)/); + switch (match && (match[1] || match[2])) { + case "bash": // fallthrough + case "ksh": + case "sh": syntax = "sh"; break; case "node": syntax = "javascript"; break; - case "sh": // fallthrough - case "bash": syntax = "sh"; break; + case "perl": syntax = "perl"; break; + case "php": syntax = "php"; break; + case "python": syntax = "python"; break; + case "ruby": syntax = "ruby"; break; default: syntax = ""; break; } } From ad42b049aacff80b3d554e93847021b81593453e Mon Sep 17 00:00:00 2001 From: Jamison Lofthouse Date: Wed, 26 Oct 2016 17:20:55 -0600 Subject: [PATCH 4/8] Cleanup coding standards Cleared up a confusing statement about braces, fixed styling, etc.. --- docs/CODING_STANDARDS.md | 24 ++++++++++++++++-------- package.json | 6 +++--- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/CODING_STANDARDS.md b/docs/CODING_STANDARDS.md index 8318a955..a3022a87 100644 --- a/docs/CODING_STANDARDS.md +++ b/docs/CODING_STANDARDS.md @@ -45,9 +45,8 @@ To avoid problems with non case sensitive file systems (Windows) only alphanumer Semicolons ---------- -There are [rebellious forces][isaac] that try to steal your semicolons from you. But make no mistake, our traditional culture is still [well and truly alive][hnsemicolons]. So follow the community, and use those semicolons! +There are rebellious forces that try to steal your semicolons from you. But make no mistake, our traditional culture is still [well and truly alive][hnsemicolons]. So follow the community, and use those semicolons! -[isaac]: community.html#isaac-schlueter [hnsemicolons]: http://news.ycombinator.com/item?id=1547647 Trailing whitespace @@ -130,7 +129,7 @@ If the block inside the curlys consists only of one statement the curlys may be return callback(err); ``` -However within one condition curlys must be used consistently. +However, curlys must be used consistently throughout the statement. *Right:* @@ -144,6 +143,15 @@ However within one condition curlys must be used consistently. } ``` +*Right:* + +```javascript + if (true) + console.log("Yes"); + else + console.log("Oh noo"); +``` + *Wrong:* ```javascript @@ -256,7 +264,7 @@ Constants Constants should be declared as regular variables or static class properties, using all uppercase letters. -Node.js / V8 actually supports mozilla's [const][const] extension, but unfortunately that cannot be applied to class members, nor is it part of any ECMA standard. +Node.js / V8 actually supports Mozilla's [const][const] extension, but unfortunately that cannot be applied to class members, nor is it part of any ECMA standard. *Right:* @@ -698,7 +706,7 @@ All classes and public API should be documented using [JSDuck annotations](https Commit messages --------------- -We try to adhere to https://github.com/blog/926-shiny-new-commit-styles and to a lesser extent http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html. +We try to adhere to https://github.com/blog/926-shiny-new-commit-styles and to a lesser extent http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html. Don't write `I fixed a bug` or `Fixed bug`, or even `Added a cool fix for bug`. Just write `Fix bug in wrop wraffles` or `Add feature flip floppers`, present tense. Branch Naming @@ -706,14 +714,14 @@ Branch Naming We follow the uni-repo approach so our source code is in one place. To work around some of the issues - for example looking at all PRs affecting a certain service - we prefix branches with the name of the service(s) the branch affects. -PR branch names, e.g. +PR branch names, e.g. “api-”, “ide-”, “multi-ide-vfs-sapi-” - + Checking for branch naming consistency is part of the review process and the teams responsibility. Use “all-” in case of doubt. E.g., https://github.com/c9/newclient/pull/12962/files affects redis schema code. - + Generally, releasing changes affecting several services is a smell so this can help you identify possible issues. You can now look for all PRs which made it in like so (api in this case): diff --git a/package.json b/package.json index 70759531..b7c362b4 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "c9.ide.language.javascript.tern": "#0545a6385d", "c9.ide.language.javascript.infer": "#b9c2e4bdb8", "c9.ide.language.jsonalyzer": "#a0549e14ff", - "c9.ide.language.codeintel": "#0fe92d6f46", + "c9.ide.language.codeintel": "#957b840fff", "c9.ide.collab": "#a414999755", "c9.ide.local": "#9169fec157", "c9.ide.find": "#e632ecf4be", @@ -95,8 +95,8 @@ "c9.ide.imgeditor": "#612e75ef4f", "c9.ide.immediate": "#0b0ee744f9", "c9.ide.installer": "#2921efaf6d", - "c9.ide.language.python": "#9fba572b1a", - "c9.ide.language.go": "#6ce1c7a7ef", + "c9.ide.language.python": "#189b55135d", + "c9.ide.language.go": "#c58539fc05", "c9.ide.navigate": "#5d5707058c", "c9.ide.newresource": "#981a408a7b", "c9.ide.openfiles": "#2ae85a9e33", From 56f8a0127d4f8dc5447e13dd203c59b473136637 Mon Sep 17 00:00:00 2001 From: Jamison Lofthouse Date: Wed, 26 Oct 2016 18:59:37 -0600 Subject: [PATCH 5/8] Fix 'assignments' spelling error --- docs/CODING_STANDARDS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CODING_STANDARDS.md b/docs/CODING_STANDARDS.md index a3022a87..c7e8a49a 100644 --- a/docs/CODING_STANDARDS.md +++ b/docs/CODING_STANDARDS.md @@ -663,7 +663,7 @@ NOTE: It is sometimes useful to write a case statement which falls through to th Vertical alignment ------------------ -Vertically aligning asignments can improve readability but also makes it harder to maintain the code. The style should be avoided. +Vertically aligning assignments can improve readability but also makes it harder to maintain the code. The style should be avoided. *Right*: From 6e4b3135d6e1da079f745a4986ba180c433ed850 Mon Sep 17 00:00:00 2001 From: Kareem Zidane Date: Sat, 19 Nov 2016 00:06:03 +0000 Subject: [PATCH 6/8] resolves compatibility issues in completer * s/getheader/get as the former doesn't exist in Python 3 (https://bugs.launchpad.net/python-keystoneclient/+bug/1267987) * encodes JSON response to ensure it supports buffer interface (http://stackoverflow.com/a/7647695) * iterates over list copy of d.items to avoid "size changed" error in python 3 (http://stackoverflow.com/a/11941855/1797347) --- package.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a8f6d855..1b81858d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "less": "^2.4.0", "mime": "~1.2.9", "mkdirp": "~0.3.5", - "msgpack-js": "~0.1.1", "msgpack-js-browser": "~0.1.4", "nak": "git://github.com/cloud9ide/nak.git#6deef931594", "netutil": "~0.0.2", @@ -70,7 +69,7 @@ "c9.ide.language.javascript.tern": "#0545a6385d", "c9.ide.language.javascript.infer": "#b9c2e4bdb8", "c9.ide.language.jsonalyzer": "#a0549e14ff", - "c9.ide.language.codeintel": "#4e0a272229", + "c9.ide.language.codeintel": "#bbca9b6797", "c9.ide.collab": "#e015881720", "c9.ide.local": "#9169fec157", "c9.ide.find": "#a2dfc3e306", @@ -95,9 +94,8 @@ "c9.ide.imgeditor": "#612e75ef4f", "c9.ide.immediate": "#b279c69c73", "c9.ide.installer": "#b2e4ba0a92", - "c9.ide.language.python": "#9fba572b1a", - "c9.ide.language.go": "#6ce1c7a7ef", - "c9.ide.mount": "#b018ee501f", + "c9.ide.language.python": "#cc98337aa6", + "c9.ide.language.go": "#7dc79b1337", "c9.ide.navigate": "#5d5707058c", "c9.ide.newresource": "#981a408a7b", "c9.ide.openfiles": "#2ae85a9e33", From b7af16c313c2fef393b7183938ee548f246e596b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alper=20=C3=96z=C4=B1=C5=9F=C4=B1k?= Date: Mon, 21 Nov 2016 08:57:45 +0200 Subject: [PATCH 7/8] Fix for undefined error log in console When css|less build fails it is logging as undefined in console. In that case err object does not have any stack property. Printing the error itself in that case will be sufficient. --- plugins/c9.error/error_handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.error/error_handler.js b/plugins/c9.error/error_handler.js index 4e3fe2af..323a89cb 100644 --- a/plugins/c9.error/error_handler.js +++ b/plugins/c9.error/error_handler.js @@ -115,7 +115,7 @@ function plugin(options, imports, register) { var accept = req.headers.accept || ''; if (statusCode == 500) { - console.error(err && err.stack); + console.error(err && (err.stack || err)); emitter.emit("internalServerError", { err: err, req: req From d348d0fda84918a117a2d035d00fe65e6588a58e Mon Sep 17 00:00:00 2001 From: Ozcan Ovunc Date: Sun, 27 Nov 2016 20:20:19 +0000 Subject: [PATCH 8/8] Fixed minor bugs --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c39ac10d..b2603be6 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "c9.ide.find": "#e632ecf4be", "c9.ide.find.infiles": "#ad9ff74638", "c9.ide.find.replace": "#8468067976", - "c9.ide.run.debug": "#8963fb45c4", + "c9.ide.run.debug": "#3786e7ed5b", "c9.automate": "#47e2c429c9", "c9.ide.ace.emmet": "#6dc4585e02", "c9.ide.ace.gotoline": "#d33220b1e0", @@ -96,7 +96,7 @@ "c9.ide.immediate": "#0b0ee744f9", "c9.ide.installer": "#2921efaf6d", "c9.ide.language.python": "#9fba572b1a", - "c9.ide.language.go": "#6ce1c7a7ef", + "c9.ide.language.go": "#41858e3cf3", "c9.ide.navigate": "#5d5707058c", "c9.ide.newresource": "#981a408a7b", "c9.ide.openfiles": "#2ae85a9e33",