Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Issue 11369216: Added support for skipping redundant dart2js compilations. (Closed)

Created:
8 years, 1 month ago by kustermann
Modified:
8 years ago
Reviewers:
ricow1, ahe, Bill Hesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Added support for skipping redundant dart2js compilations. Currently, the buildbots run tests on every commit. But often neither the tests nor the dart2js compiler did change (e.g. on status file updates). The added code will check if the dependencies (i.e. files listed in test.js.deps) or the dart2js snapshot did change. If not, the output of the previous dart2js compilation is up to date and the compilation step is skipped. The skipping of redundant dart2js compilations works only if the '--use-sdk' option was specified (because in this case the dart2js snapshot is used). Committed: https://code.google.com/p/dart/source/detail?r=15080 Committed: https://code.google.com/p/dart/source/detail?r=16158

Patch Set 1 #

Total comments: 69

Patch Set 2 : #

Total comments: 8

Patch Set 3 : #

Patch Set 4 : #

Total comments: 4

Patch Set 5 : fixed long lines #

Total comments: 14

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+470 lines, -61 lines) Patch
A + tests/standalone/io/skipping_dart2js_compilations_helper.dart View 1 2 3 4 5 1 chunk +4 lines, -7 lines 0 comments Download
A tests/standalone/io/skipping_dart2js_compilations_test.dart View 1 2 3 4 5 1 chunk +225 lines, -0 lines 0 comments Download
M tests/standalone/io/test_runner_exit_code_script.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tools/testing/dart/test_progress.dart View 1 2 3 5 chunks +14 lines, -0 lines 0 comments Download
M tools/testing/dart/test_runner.dart View 1 2 3 4 18 chunks +149 lines, -50 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 1 2 3 4 8 chunks +77 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
kustermann
Please review this carefully!
8 years, 1 month ago (2012-11-13 16:47:40 UTC) #1
ricow1
First round of comments As discussed offline you should use the standard notation for testing ...
8 years, 1 month ago (2012-11-14 08:53:28 UTC) #2
ngeoffray
Super excited to see that you are working on this! Did you forget to add ...
8 years, 1 month ago (2012-11-14 09:08:54 UTC) #3
Bill Hesse
https://codereview.chromium.org/11369216/diff/1/tools/testing/dart/test_progress.dart File tools/testing/dart/test_progress.dart (right): https://codereview.chromium.org/11369216/diff/1/tools/testing/dart/test_progress.dart#newcode44 tools/testing/dart/test_progress.dart:44: void skippedCompilation() { _skippedCompilations++; } Maybe compilationSkipped is a ...
8 years, 1 month ago (2012-11-14 09:37:34 UTC) #4
ricow1
https://codereview.chromium.org/11369216/diff/1/tools/testing/dart/test_progress.dart File tools/testing/dart/test_progress.dart (right): https://codereview.chromium.org/11369216/diff/1/tools/testing/dart/test_progress.dart#newcode104 tools/testing/dart/test_progress.dart:104: _printSkippedCompilationInfo(); On 2012/11/14 09:37:34, Bill Hesse wrote: > In ...
8 years, 1 month ago (2012-11-14 09:47:32 UTC) #5
ahe
I think this is a very good start. But I agree with Rico, it would ...
8 years, 1 month ago (2012-11-14 18:46:16 UTC) #6
kustermann
PTAL. I've addressed your comments and rebased since the code now uses CommandOutput.compilationSkipped". https://codereview.chromium.org/11369216/diff/1/tests/standalone/io/test_skipping_dart2js_compilation__helper.dart File ...
8 years, 1 month ago (2012-11-16 14:58:42 UTC) #7
ricow1
LGTM https://codereview.chromium.org/11369216/diff/10001/tests/standalone/io/skipping_dart2js_compilations_test.dart File tests/standalone/io/skipping_dart2js_compilations_test.dart (right): https://codereview.chromium.org/11369216/diff/10001/tests/standalone/io/skipping_dart2js_compilations_test.dart#newcode147 tests/standalone/io/skipping_dart2js_compilations_test.dart:147: var fs_noTestJs = new FsUtils(false, true, true, true); ...
8 years, 1 month ago (2012-11-19 08:19:17 UTC) #8
kustermann
Fixed some issues with native vs. non-native paths. https://codereview.chromium.org/11369216/diff/10001/tests/standalone/io/skipping_dart2js_compilations_test.dart File tests/standalone/io/skipping_dart2js_compilations_test.dart (right): https://codereview.chromium.org/11369216/diff/10001/tests/standalone/io/skipping_dart2js_compilations_test.dart#newcode147 tests/standalone/io/skipping_dart2js_compilations_test.dart:147: var ...
8 years, 1 month ago (2012-11-19 10:26:04 UTC) #9
kustermann
PTAL
8 years ago (2012-12-11 10:12:23 UTC) #10
Bill Hesse
https://codereview.chromium.org/11369216/diff/19001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://codereview.chromium.org/11369216/diff/19001/tools/testing/dart/test_runner.dart#newcode883 tools/testing/dart/test_runner.dart:883: options.environment = new Map<String, String>.from(Platform.environment); Is this line too ...
8 years ago (2012-12-11 10:51:04 UTC) #11
kustermann
https://codereview.chromium.org/11369216/diff/19001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://codereview.chromium.org/11369216/diff/19001/tools/testing/dart/test_runner.dart#newcode883 tools/testing/dart/test_runner.dart:883: options.environment = new Map<String, String>.from(Platform.environment); On 2012/12/11 10:51:04, Bill ...
8 years ago (2012-12-11 13:11:22 UTC) #12
ahe
LGTM https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipping_dart2js_compilations_helper.dart File tests/standalone/io/skipping_dart2js_compilations_helper.dart (right): https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipping_dart2js_compilations_helper.dart#newcode5 tests/standalone/io/skipping_dart2js_compilations_helper.dart:5: #import ('dart:io'); #import -> import. https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipping_dart2js_compilations_test.dart File tests/standalone/io/skipping_dart2js_compilations_test.dart ...
8 years ago (2012-12-11 14:34:45 UTC) #13
kustermann
8 years ago (2012-12-14 11:55:47 UTC) #14
https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
File tests/standalone/io/skipping_dart2js_compilations_helper.dart (right):

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
tests/standalone/io/skipping_dart2js_compilations_helper.dart:5: #import
('dart:io');
On 2012/12/11 14:34:45, ahe wrote:
> #import -> import.

Done.

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
File tests/standalone/io/skipping_dart2js_compilations_test.dart (right):

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
tests/standalone/io/skipping_dart2js_compilations_test.dart:4: 
On 2012/12/11 14:34:45, ahe wrote:
> Please add a comment explaining the purpose of this test.

Done.

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
tests/standalone/io/skipping_dart2js_compilations_test.dart:5:
#import("dart:io");
On 2012/12/11 14:34:45, ahe wrote:
> #import -> import.

Done.

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
tests/standalone/io/skipping_dart2js_compilations_test.dart:8:
#import("../../../tools/testing/dart/test_suite.dart");
On 2012/12/11 14:34:45, ahe wrote:
> It would be nice if these were imported with prefixes.

Done.

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
tests/standalone/io/skipping_dart2js_compilations_test.dart:13: class FsUtils {
On 2012/12/11 14:34:45, ahe wrote:
> What does this class do?

I renamed it now to FileUtils.

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
tests/standalone/io/skipping_dart2js_compilations_test.dart:24: tempDir = new
Directory('').createTempSync();
On 2012/12/11 14:34:45, ahe wrote:
> I'm allergic to doing work in constructors.  I think it is poor coding style. 
I
> go straight into anaphylactic shock when you start creating files in a
> constructor.

IMHO neither readability, nor code size would be improved by  making it an extra
method. And this way, we're sure that after the object had been created, all the
necessary files have been created as well.
 
But I agree with you in general: normally we don't want constructors to do a lot
of work.

https://codereview.chromium.org/11369216/diff/23003/tests/standalone/io/skipp...
tests/standalone/io/skipping_dart2js_compilations_test.dart:132: TestCase
MakeTestCase(String testName, TestCompletedHandler completedHandler) {
On 2012/12/11 14:34:45, ahe wrote:
> MakeTestCase -> makeTestCase.

Done.

Powered by Google App Engine
This is Rietveld 408576698