blois@google.com
b9c11164ca
Updating code_transformer's ResolverTransform to allow filtering on Dart entry points in apply.
...
This is to allow Angular's transformers to continue to filter the assets considered entry points based on whether they contain a main() rather than just the asset ID.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//235483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34985 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-11 17:44:21 +00:00
nweiz@google.com
da4d59c05e
Only pass an AssetId to isPrimary and declareOutputs.
...
BUG=16442
R=blois@google.com , efortuna@google.com , rnystrom@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org//223553008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34853 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 23:46:23 +00:00
sigmund@google.com
088dfc5fbc
Use warning instead of error in a couple places. In polymer we are hitting
...
scenarios where the resolution was incorrect, but we were still able to generate
valid code. We should not stop the whole build process on these cases.
(see for example https://code.google.com/p/dart/issues/detail?id=17914 ).
R=blois@google.com
Review URL: https://codereview.chromium.org//221673005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34656 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 17:57:37 +00:00
scheglov@google.com
6da7a82a20
Fix for translation of \!= to \!identical(), but use == and \!= for Enum.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//221483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34636 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 03:09:22 +00:00
blois@google.com
8c3fe62c85
Code transformers fixes for latest analyzer update
...
This fixes some incompatibilities with the newest analyzer around how deleted files are handled. The resolver was removing the source completely, but the analyzer expects the source to remain as long as it is being referenced by a URI.
This also fixes an issue where resolver were not being released when an exception was thrown from within the applyResolvers call.
** NOTE ** see the commented line which needs to be removed with the updated analyzer.
BUG=
R=brianwilkerson@google.com , scheglov@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org//217163005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34512 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 18:36:39 +00:00
kevmoo@google.com
876cfa32a9
pkg/code_transformers: removed unused imports, require latest unittest
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org//216233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34505 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 16:31:05 +00:00
sigmund@google.com
a8b174a5a2
Include exports in resolver.libraries
...
R=blois@google.com
Review URL: https://codereview.chromium.org//208623008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34275 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 22:21:26 +00:00
blois@google.com
2c034bfe3f
Updating code_transformers to not fail on syntax errors
...
Recent changes started using the Analyzer's parseCompilationUnit method which throws exceptions on syntax errors, but this is undesirable in many cases. Adding an option to disable this behavior and using that in code_transformers.
BUG=
R=scheglov@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org//204033003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34070 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 22:09:17 +00:00
blois@google.com
d57c0b055b
Adding some asset-related utilities to code_transformers
...
Including dart entry point checks and URI->asset resolution.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//196943024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34055 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 19:54:51 +00:00
sigmund@google.com
169394ce8b
Allow multiple-entry libraries in code_transformers
...
R=blois@google.com
Review URL: https://codereview.chromium.org//200543006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33772 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 20:30:12 +00:00
sigmund@google.com
dcd5a3348c
Fixes code_transformers after the latest analyzer changes
...
BUG=http://dartbug.com/17502
R=blois@google.com
Review URL: https://codereview.chromium.org//199413020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33768 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 20:05:15 +00:00
blois@google.com
86f6fac791
Refactoring resolvers to make them able to be run in parallel.
...
With pub build and pub serve the same transformer can be run on the same asset in parallel. We want to maintain the cache between the runs, so making the resolver pipeline these requests.
In addition, refactoring to dramatically change the role of ResolverTransformer- previously it was a transformer that automatically kept the AST up to date, but this does not work well when in a pipeline of transformers that are generating or modifying code. What was ResolverTransformer is Resolvers- a cache of resolvers for which individual transformers now need to request the resolver from.
ResolverTransformer is now a mixin which can be used to automatically release a Resolver when it's done being used.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//181383015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33163 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 16:58:18 +00:00
blois@google.com
fceda92eaf
Extending logic to find Dart's SDK directory for resolver tests
...
Previous logic was failing when executing from VM tests where the dart-sdk folder is not built in the output directory.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//174663006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32922 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 20:09:35 +00:00
blois@google.com
993a917ff4
Revert "Revert "Adding package:code_transformers for unifying common transformers code""
...
This is a re-submission of adding code_transformers with a fix for resolving the sdk directory.
The resolution was failing when executing tests with the --use-sdk flag.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//172633006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32908 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 17:27:22 +00:00
blois@google.com
fa4ee4753a
Revert "Adding package:code_transformers for unifying common transformers code"
...
This reverts commit 32859. It's failing to find the Dart SDK under a number of cases.
TBR
BUG=
Review URL: https://codereview.chromium.org//174053004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32866 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 19:21:15 +00:00
blois@google.com
730b3c6137
Adding package:code_transformers for unifying common transformers code
...
There's quite a bit of code which would be great to share between Polymer and Angular, adding this as the starting point for some of that code.
This CL is primarily a transformer that resolves the AST which can be used by other transformers when modifying code.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//140203007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32859 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 18:37:00 +00:00