DescriptionSkip two pub tests on stable channel - tests are deleting repo src files!!!
These two tests will delete files in sdk/lib/_internal/pub_generated/lib/src in a fresh checkout of stable.
The reason for this is as follows:
We do a fresh clean checkout of the stable branch, files in sdk/lib/_internal/pub_generated has older timestamps than in sdk/lib/_internal/pub
We run the pub tests
Now, two of these will actually call pub from sdk/bin instead of from the build sdk (test/real_version_test and test/global/binstubs/binstub_runs_executable_test). The comment in real_version_test.dart is wrong, since it states that this will explicitly not happen. The reason is that in lib/src/io.dart (called from lib/src/sdk.dart) we decide if or not we are in the build sdk by looking if the ending of Platform.script is .snapthot, which for this test it is not.
When we call sdk/bin/pub, it will invoke the async compiler on all files in pub that is newer than the corresponding file in pub_generated. As stated above this is the case for all files since they are checked out later. On stable (and trunk if you do a fresh checkout) - there are unfortunately 5 files that the async compiler can't compile:
Async compile failed on /tmp/trunk_deps/dart/sdk/lib/_internal/pub/lib/src/entrypoint.dart:
Class 'ForEachStatement' has no instance getter 'iterator'.
NoSuchMethodError: method not found: 'iterator'
Receiver: Instance of 'ForEachStatement'
Arguments: []
Async compile failed on /tmp/trunk_deps/dart/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart:
Class 'ForEachStatement' has no instance getter 'iterator'.
NoSuchMethodError: method not found: 'iterator'
Receiver: Instance of 'ForEachStatement'
Arguments: []
Async compile failed on /tmp/trunk_deps/dart/sdk/lib/_internal/pub/lib/src/command/serve.dart:
Class 'ForEachStatement' has no instance getter 'iterator'.
NoSuchMethodError: method not found: 'iterator'
Receiver: Instance of 'ForEachStatement'
Arguments: []
Async compile failed on /tmp/trunk_deps/dart/sdk/lib/_internal/pub/lib/src/barback/transformer_loader.dart:
Class 'ForEachStatement' has no instance getter 'iterator'.
NoSuchMethodError: method not found: 'iterator'
Receiver: Instance of 'ForEachStatement'
Arguments: []
Async compile failed on /tmp/trunk_deps/dart/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart:
Class 'ForEachStatement' has no instance getter 'iterator'.
NoSuchMethodError: method not found: 'iterator'
Receiver: Instance of 'ForEachStatement'
Arguments: []
The compiler will delete the file instead, so the file is now no longer there (sdk/lib/_internal/pub/bin/async_compiler.dart:169). This basically means that the remaining tests now all fail. If you do a gclient sync now all the tests will pass, since the files will be restored and have never timestamps
All of the above can easily be reproduced by doing:
gclient config https://dart.googlecode.com/svn/trunk/deps/all.deps
gclient sync
cd dart
tools/build.py -mrelease create_sdk
tools/test.py --use-sdk -mrelease -cnone -rvm pub
I verified that these two tests are the only two tests running the sdk/bin/pub script by changing the script to simply exit instead of running the async compiler. Validated by running the tests multiple times to see that nothing was changed after skipping those two tests.
Patch Set 1 #Patch Set 2 : #Messages
Total messages: 3 (0 generated)
|