Skip to content
This repository has been archived by the owner on Dec 6, 2017. It is now read-only.

Widen constraint on code_transformers #232

Open
zoechi opened this issue Mar 5, 2016 · 2 comments
Open

Widen constraint on code_transformers #232

zoechi opened this issue Mar 5, 2016 · 2 comments

Comments

@zoechi
Copy link

zoechi commented Mar 5, 2016

The current constraint <4.0 prevents me from publishing a version of https://pub.dartlang.org/packages/bwu_polymer_routing that is compatible with the latest Dart Polymer and reflectable package that fix some serious issues.
Current version of code_transformers is 0.4.1

@zoechi zoechi changed the title Widen constraint on cdoe_transformers Widen constraint on code_transformers Mar 5, 2016
@zoechi
Copy link
Author

zoechi commented Mar 5, 2016

I tried to change the dependency constraint

code_transformers: '>=0.3.1 <0.4.0'

Test utilities in the new code_transformers version were moved to the transformer_test package therefore I added dev_dependency

transformer_test: '^0.2.0'

and changed in test/transforer_test.dart

import 'package:code_transformers/tests.dart' as tests;

to

import 'package:transformer_test/utils.dart' as tests;

I run ./test_tf_gen.sh and ./run-tests.sh

runs 95 and 31 tests successfully but then fails with

00:03 +31: All tests passed!
Building example...
No pubspec.lock file found, please run "pub get" first.
--------
PASS: Example transformer should not import dart:mirror
./run-tests.sh: Zeile 27: node: Kommando nicht gefunden.
./run-tests.sh: Zeile 28: [: ==: Einstelliger (unärer) Operator erwartet.
FAIL: Example transformer should inject dependencies
Tests failed. Build /example with `pub build example/ --mode debug` to debug.

Seems node is missing. I try to avoid to install it on my machine therefore I run the steps manually:

docker run -ti -v /home/myuser/dart/di.dart/:/project node node /project/example/build/web/main.dart.js

output

Success

cp test_assets/d8.js out/main.js
cat out/main.dart.js >> out/main.js
docker run -ti -v /home/myuser/dart/di.dart/:/project node node /project/out/main.js

00:16 +92: All tests passed!

Temporarily change the 2nd-last line in `run-benchmarks.sh

 node out/$b.js

to

  docker run -ti -v /home/myuser/dart/di.dart/:/project node bash -c "cd project && node out/$b.js"

but this fails

JS Benchmarks:

Running: module_benchmark.dart
/project/out/module_benchmark.dart.js:2
(function(){var supportsDirectProtoAccess=function(){var z=function(){}
^

TypeError: this is not a function
at Object. (/project/out/module_benchmark.dart.js:2:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:140:18)
at node.js:1001:3

Giving up. I guess someone will run the tests and benchmarks again before merging.

zoechi pushed a commit to bwu-dart-contributing/di.dart that referenced this issue Mar 5, 2016
Widen constraint on code_transformers and use test utils from transformer_test package where they were migrated to from code_transformers.
@zoechi
Copy link
Author

zoechi commented May 14, 2016

ping

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant