Commit Graph

171 Commits

Author SHA1 Message Date
sigmund@google.com 6866869c4b Detect and warn about missing scripts (rather than fail during the build)
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//239433012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35160 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-18 01:42:59 +00:00
sigmund@google.com 9d2c693404 Fix bug in how we handle invoke expressions
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//240633004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35148 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-17 18:42:18 +00:00
sigmund@google.com c903017f1b Deal better with missing sources in code_transformers and polymer
R=blois@google.com

Review URL: https://codereview.chromium.org//233673003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34978 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-11 16:15:17 +00:00
kevmoo@google.com ed4053dd04 pkg/polymer[_expressions] unittest fixes
R=sigmund@google.com

Review URL: https://codereview.chromium.org//232373002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34908 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 00:22:48 +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
jmesserly@google.com 6820436de0 [polymer] fix imports in Dartium if no script is on the main page
R=sigmund@google.com

Review URL: https://codereview.chromium.org//227743009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34805 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 00:30:31 +00:00
sigmund@google.com 47e238b613 Replace bootstrap logic with 'boot.js', use 'component/dart' mime-type and add
warnings to prepare users for the future breaking change in Dartium.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org//225043004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34753 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 23:42:34 +00:00
sigmund@google.com 5cda9425d8 Correctly generate code when using transformers in polymer-expressions.
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//226393003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34743 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 20:27:36 +00:00
jmesserly@google.com a33562bd22 [web_components] update web_components and polymer.js
R=sigmund@google.com

re-land https://code.google.com/p/dart/source/detail?r=34633

Review URL: https://codereview.chromium.org//221813011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34676 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 23:47:50 +00:00
jmesserly@google.com 000e10a421 "Reverting 34633"
it's causing strange failures on Dartium (even though local runs with DRT all pass...)

Review URL: https://codereview.chromium.org//221653004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34635 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 02:34:54 +00:00
jmesserly@google.com 8a6c6d86db [web_components] update web_components and polymer.js
R=sigmund@google.com

Review URL: https://codereview.chromium.org//219963020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34633 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 01:36:38 +00:00
sigmund@google.com 50df8bdb74 Fix mirror_loader to detect whether the type is a generic class.
BUG=https://code.google.com/p/dart/issues/detail?id=17929
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//219433004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34610 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 19:07:43 +00:00
sigmund@google.com 596c3da6ad Enables codegen support in polymer
R=blois@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org//211393006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34531 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 22:11:28 +00:00
sigmund@google.com 0417d48a78 Changes in polymer-expressions to prepare for codegen in polymer:
- change scopes to have either variable or model, but not both
 - change lookup to aggressively read from the model, and not use hasGetter
 - trap all errors (not just eval errors), so that rendering is smooth.
 - change error reporting to fire an async error. Now there is no need for
   using logger/registering the logger.
 - fix test in polymer that apparently was swalling an error in
   dart2js-minified. This fix wont be needed once we have codegen.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org//207433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34283 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-22 00:58:05 +00:00
sigmund@google.com 1dda30d647 These are 3 changes in smoke in preparation of polymer's codegen. I happened to make them at once, but let me know if you prefer that I split them up a bit:
(a) add filter to query. This makes it easier to support *Changed  without having to generate metadata about lots of useless methods. We might remove *Changed in the future, but I still think this is a nice feature for smoke.

(b) changed recorder.dart to automatically include getters/setters for queries. It is the most common use case that you query a member because you want both the metadata and to read/write/invoke it.

(c) add a new smoke implementation to make it easier to debug inconsistencies between static vs mirrors implementations. (I used this while debugging stuffin polymer)

R=jmesserly@google.com

Review URL: https://codereview.chromium.org//204143002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34117 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-19 16:27:03 +00:00
jmesserly@google.com c6c9cfe150 [polymer] fix loader on IE
BUG= https://code.google.com/p/dart/issues/detail?id=17592
R=sigmund@google.com

Review URL: https://codereview.chromium.org//197283033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34077 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 23:08:40 +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
kevmoo@google.com 7c32d14282 Cleanup for pkg/observe and pkg/polymer
Remove unused imports, fixed usage of deprecated members

R=sigmund@google.com

Review URL: https://codereview.chromium.org//201483002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33770 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 20:23:51 +00:00
sigmund@google.com b543442cf9 Fix polymer tests and a couple bugs:
- Linter tests now check that the output is empty if there are errors
 - We allow absolute urls when inlining Dart imports
 - Fix some bugs in tests.

R=nweiz@google.com

Review URL: https://codereview.chromium.org//196723017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33679 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 00:43:56 +00:00
jmesserly@google.com 95b41dc840 [polymer] remove bogus warning about JS inline scripts
R=dgrove@google.com

Review URL: https://codereview.chromium.org//191423002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33460 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 21:46:29 +00:00
sigmund@google.com 79229b1d91 Refactoring two pieces of polymer:
- loader logic: to make it easy to remove the mirror's loading code
- script compactor: to make it flatter and easier to extend later.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org//189213003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33403 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 23:23:25 +00:00
jmesserly@google.com b218f342fd [polymer] interop with polymer-element and polymer.js
* let polymer.js register polymer-element
* let polymer.js bootstrap for polymer.dart
* hook polymer-element's register, if it's a Dart class go down the Dart code path

building polymer.concat.js (debug only) requires https://github.com/Polymer/polymer-dev/pull/9

R=sigmund@google.com

Review URL: https://codereview.chromium.org//182193002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33398 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:04:20 +00:00
scheglov@google.com 12558a8511 New analzyer snapshot.
Replace isInstanceOf() with a predicate.

Tweaks for other packages.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//186153005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33304 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 21:50:40 +00:00
jmesserly@google.com 99a74be0f8 "Reverting 33183"
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33184 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-01 04:13:31 +00:00
jmesserly@google.com bde74b4050 [polymer] import all elements
Imports polymer-elements and polymer-ui-elements into (for now) the polymer package. This will allow us to begin to reuse the JavaScript custom elements.

Notes:

In an ideal world we would have some way of importing these straight from Bower, probably via Pub. However we don't have support for that.

It would also be nice to have separate Pub packages, at least for polymer-elements and polymer-ui-elements (the lovely Dart ports @ http://pub.dartlang.org/packages/polymer_elements follow this pattern). However that too depends on some kind of Pub+Bower integration, as they use (at least) the convention of "components/" for dependencies instead of "packages/" or "assets/".

So for now, we'll import them into package:polymer.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//175443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33183 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-01 03:03:36 +00:00
jmesserly@google.com 7b750888b2 [polymer] skip linter in tests
Arguably we should only be linting things reachable from deployment in deploy mode, but that's a bigger change.

Combined with the previous CL for inline scripts (https://codereview.chromium.org/180933002/) this is enough to import polymer's many HTML elements without causing tests to timeout/fail/run out of memory due to unnecessary scanning ~300 HTML files.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//179163007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33146 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 03:04:37 +00:00
jmesserly@google.com fd8b2caf4b [polymer] combine script extractor and import inliner
The goal is to ensure we aren't processing HTML files that aren't reachable from the entry point(s).

R=sigmund@google.com

Review URL: https://codereview.chromium.org//180933002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33145 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 02:50:03 +00:00
jmesserly@google.com 8dc1cbbc3c [polymer] fix import inliner to only rewrite URL attributes once per node
R=sigmund@google.com

Review URL: https://codereview.chromium.org//178193007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33133 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 21:23:40 +00:00
sigmund@google.com a5332397fd Fixes in smoke, which in turn should fix todomvc.
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//180273004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33047 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 00:27:07 +00:00
jmesserly@google.com ff3aa2f569 [polymer] switch comment style
R=sigmund@google.com

Review URL: https://codereview.chromium.org//180373003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33046 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-25 23:43:45 +00:00
jmesserly@google.com b9fbc30785 [html5lib] api updates: localName
R=sigmund@google.com

Review URL: https://codereview.chromium.org//178303009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33004 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-25 04:07:47 +00:00
sigmund@google.com 6f42b1cf3b Adapting observe to use smoke (this is built on top of the previous change that
adds the smoke package)

R=jmesserly@google.com

Review URL: https://codereview.chromium.org//173473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32995 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 23:45:02 +00:00
sigmund@google.com 428f4fae9c Use smoke in polymer and polymer_expressions.
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//173003006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32991 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 23:05:05 +00:00
jmesserly@google.com f45d9c23d3 [polymer] preserve order of scripts in deployment
We were potentially leaving some scripts in head, but moving other things into body.
FWIW, I'm not sure it's a good idea to be moving anything from head to body, but that's what we got for now.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//172853004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32842 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 04:17:32 +00:00
jmesserly@google.com 7438131437 [polymer] remove workaround for MethodMirror.metadata
the bug appears to be fixed!

R=sigmund@google.com

Review URL: https://codereview.chromium.org//165373007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32841 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 03:47:22 +00:00
jmesserly@google.com 4918db8d0a [polymer] fix editor hints -- query/queryAll and unused imports
R=sigmund@google.com

Review URL: https://codereview.chromium.org//172923002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32825 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 21:41:08 +00:00
jmesserly@google.com 1a4a399ea5 fix imports link rel=stylesheet
fixes https://code.google.com/p/dart/issues/detail?id=16648

also:
* adds a few DOM APIs to html5lib that it was missing
* removes a broken test from html5lib
* fixes polymer's dependency on analyzer

R=sigmund@google.com

Review URL: https://codereview.chromium.org//162093002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32679 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-13 23:22:48 +00:00
blois@google.com 8d85a65d2c Removing polymer-specific code from barback runner
Hoping to make this into a generally-usable component.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org//157583007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32610 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-12 17:54:54 +00:00
jmesserly@google.com 07b76b48cc code refactoring in import_inliner
I'm adding link rel=stylesheet support and implemented these changes first
to make it easier to understand the invariants.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//159353005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32587 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-12 01:52:34 +00:00
lrn@google.com 8aa8015fed Don't have polymer thinking unmodifiable_collection is in pkg.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//131543012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32546 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 09:15:26 +00:00
jmesserly@google.com 7d71bc988d introduce web_components pkg to replace shadow_dom, html_import, custom_element. This new package is 100% compatible with the polyfills used by http://www.polymer-project.org/
Deletes:
  pkg/shadow_dom
  pkg/custom_element (except web_ui stuff)
  pkg/html_import

Adds:
  pkg/web_components, with README.md and build instructions

Changes:
  pkg/html5lib -- deprecate queryAll/query in favor of *Selector
  pkg/polymer -- test fixes & a few small changes to work with new polyfills, mostly in build
  tests/html/custom -- can't load the CE polyfill at runtime, must now be injected statically via an HTML page, similar to the style @blois used for some custom element tests.

R=blois@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//158083002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32533 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 01:15:05 +00:00
scheglov@google.com bd4d6033ba New analyzer snapshot.
1. Rename WorkManagerPriority -> SourcePriority.

2. Replace CharSequence with String.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//156763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32373 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 18:09:20 +00:00
jmesserly@google.com ae365d94aa big update to observe, template_binding, polymer
The biggest changes are in pkg:observe where we picked up a lot of optimizations to PathObserver/CompoundObserver.

template_binding gets one-time bindings, synchronous expansion, and lightweight "bindable" objects.

The tests are heavily refactored to use Future instead of the hacky observeTest/performMicrotaskCheckpoint pattern (I have been slowly changing the style for new tests, but observe-js made the change for all of them. yay!). Oh and the performMC stuff is gone from pkg:observe now.

There's also a new pkg:polymer feature for observation, which was ported so we are at a consistent baseline. (http://www.polymer-project.org/polymer.html#observeblock)

R=justinfagnani@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//132403010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32342 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 22:23:00 +00:00
sigmund@google.com f924fac14a Use a transformer to initialize custom elements and call initMethod. This is the
first step to removes the dependence on mirrors in the deployable application.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org//151893003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32270 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-04 01:08:50 +00:00
sigmund@google.com fdc6d43083 Improve how we handle packages/ HTML imports. This improves resolution of URLs containing
"package/" under the web/ directory. Resolution under 'lib' is the same, but it and gives better suggestions if the path looks wrong. This summarizes what changed:

- source file: lib/b.html

  import to "packages/c/d.html" was error, now is error + suggestion
  import to "../packages/c/d.html" was error, now is error + suggestion
  import to "../../packages/c/d.html" was resolved, now is resolved too

- source file: lib/a/b.html

  import to "packages/c/d.html" was error, now is error + suggestion
  import to "../packages/c/d.html" was error, now is error + suggestion
  import to "../../packages/c/d.html" was error, now is error + suggestion
  import to "../../../packages/c/d.html" was resolved, now is resolved too

- source file: web/b.html

  import to "packages/c/d.html" was and continues to be resolved
  import to "../packages/c/d.html" was error, now is resolved

- source file: web/a/b.html

  import to "packages/c/d.html" was error, now is resolved
  import to "../packages/c/d.html" was and continues to be resolved
  import to "../../packages/c/d.html" was and continues to be resolved

Note: polymer-build and development mode are slightly different: polymer-build
detects and issues an error for bad paths inside lib/. These are not detected by
our package-resolution in loader.dart, but as long as users are not creating
symlinks by hand, Dartium should detect if the paths are wrong.

When we switch to start using pub-serve by default, we should be able to go back
to the web-ui style of using "package:" urls directly in HTML.

R=jmesserly@google.com, kustermann@google.com

Review URL: https://codereview.chromium.org//148913003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32170 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 20:51:28 +00:00
jmesserly@google.com 8db140dd8e workaround for strange bug in Chrome 32
Reflecting on Object's .declarations sometimes fails.
In general we try to stop at Object in Polymer anyway, so for consistency I'm adding that workaround.

R=blois@google.com

Review URL: https://codereview.chromium.org//136043003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31938 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-17 23:22:26 +00:00
sigmund@google.com 62c00509f4 Minor changes in lib.src.build.runner, and fix version (now that we determined
that -dev+x is no good).

R=jmesserly@google.com

Review URL: https://codereview.chromium.org//131913005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31687 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 02:06:33 +00:00
kevmoo@google.com d31141e045 pkg/polymer: remove css_lib dependency
Subsumes https://codereview.chromium.org/63693002/

R=sigmund@google.com

Review URL: https://codereview.chromium.org//103783005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31346 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 19:47:33 +00:00
lrn@google.com e6e524063c Add missing files from previous commit.
Review URL: https://codereview.chromium.org//118783004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31268 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 12:57:38 +00:00
rmacnak@google.com 52cf356d6c Remove reflectedType hack from Polymer.
R=ahe@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org//108523003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31235 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 18:19:55 +00:00