Skip to content

library package with polymer elements needs a polymer transformer configuration #20673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue Aug 23, 2014 · 4 comments
Closed
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.

Comments

@DartBot
Copy link

DartBot commented Aug 23, 2014

This issue was originally filed by @zoechi


A library package containing polymer elements needs a polymer transformer configuration otherwise the transformer doesn't process these elements.

see also http://stackoverflow.com/questions/25449308

Creating library packages for polymer elements is a common use case.
I don't think that a transformer config is necessary in this case is documented anywhere.

Packages like core-elements/paper-elements don't help much as model because they have the transformer config for the example pages. It's not obvious that the skeleton is necessary even when no entry pages do exist.

transformers:

  • polymer:
        entry_points:

I think there should be a warning message when polymer elements are imported from a package where this is missing.

I knew it and added it but it still didn't work.
It took me a while to discover that I had to kill pub serve to make the change take effect.

When I change the pubspec.yaml of the project pub serve is currently serving it kills itself but it doesn't when the pubspec.yaml of a path dependency is changed.

@DartBot
Copy link
Author

DartBot commented Oct 27, 2014

This comment was originally written by @zoechi


I just chatted with an enthusiastic and experienced Dart developer who was about to start hating Polymer because the elements didn't work anymore when he moved them to another package.
Any plans to solve this or at least output a hint/warning about the missing transformer config?

@sigmundch
Copy link
Member

Thanks gzoechi for creating the bug!

We should definitely look into providing a better error message for this. The main issue is that we don't yet have global transformers (see issue #20267 and issue #15038), which we need in order to run all the transformations or none. Currently the issue is that in the example above we end up transforming the entry package (removing dirty-checking), but we don't transform the imported package (which continues to depend on dirty-checking).

Not all the polymer transformers are needed though - for example I believe it is sufficient to include just the observable transformer:

  transformers:
  - observable

@DartBot
Copy link
Author

DartBot commented Oct 27, 2014

This comment was originally written by @zoechi


Thanks for the update and the tip with the observable transformer.

@DartBot DartBot added Type-Defect area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Oct 27, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#431.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.
Projects
None yet
Development

No branches or pull requests

3 participants