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

generated JavaScript for polymer elements dosn't call xxxChanged for published attributes #369

Closed
DartBot opened this issue Jun 5, 2015 · 18 comments

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="96" height="96"hspace="10"> Issue by zoechi
Originally opened as dart-lang/sdk#15080


What steps will reproduce the problem?
1.
We run into this problem
https://code.google.com/p/dart/issues/detail?id=15038
when porting

  • https://github.com/ErikGrimes/polymer_elements
  • https://github.com/ErikGrimes/polymer_ui_elements
    which have a demo page for each polymer element in the 'example' directory.
    So we changed the package layout as suggested:
    We created a new package and symlinked the demo pages from example
    to the new packages web directory
    removed the transformers settings in polymer_elements/polymer_ui_elements
    and added them to the pubspec.yaml of the new package.
    2.
    pub build works fine
    But in all JS demo pages the xxxChanged methods for published attributes never get called (except when called from other methods directly)
    Methods like enteredView or ready are called though.

3.
No warning or error is shown (build/execution)

What is the expected output? What do you see instead?
Should work in JS as in Dart

What version of the product are you using? On what operating system?
Dart VM version: 1.0.0.3_r30187 (Tue Nov 12 00:09:52 2013) on "linux_x64"

Please provide any additional information below.
Before we changed the package structure as described above some examples worked fine in JS (those that were not affected by the issue linked above)
I also tried copying the files to the new package instead of symlinking but the problem persisted.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Added Area-Polymer, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi


When I add
transformers:

  • polymer:
        entry_points:
    (without any actual entry_points defined) to pubspec.yaml of the component package
    the generated JS works even when the package isn't supposed to have a polymer transformer specified.

Dart VM version: 1.0.1.3_r30657 (Mon Nov 25 18:29:39 2013) on "linux_x64"

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Added Library-PolymerBuild label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi


I think this is related to 18489

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Added this to the 1.5 milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1081711?v=3" align="left" width="48" height="48"hspace="10"> Comment by jmesserly


Added Pkg-Polymer label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1081711?v=3" align="left" width="48" height="48"hspace="10"> Comment by jmesserly


Removed Pkg-Polymer label.
Added Pkg-PolymerBuild label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1081711?v=3" align="left" width="48" height="48"hspace="10"> Comment by jmesserly


Removed Library-PolymerBuild label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1081711?v=3" align="left" width="48" height="48"hspace="10"> Comment by jmesserly


Removed Area-Polymer label.
Added Area-Pkg label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl


Postponing to 1.6. Feel free to change this back (and give it a proper priority).


Removed this from the 1.5 milestone.
Added this to the 1.6 milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi


I still had this a while ago (when I added the comment at May 3) but this seems not to be an issue on all projects. Maybe this is only when the project has Polymer elements in lib and also uses elements imported from another package.

I didn't have this in other projects and this is the only notable distinction.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Thanks for the details!

I forgot to mention earlier, but I agree with you in #­4 that this will likely be fixed by issue dart-lang/sdk#9.


Marked this as being blocked by dart-archive/code_transformers#17.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Priority-Unassigned label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed this from the 1.6 milestone.
Added Polymer-P-1 label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-P-1 label.
Added Polymer-Milestone-Next label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Added PolymerMilestone-Next label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-Milestone-Next label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


merging with issue #422 to track things together.


Added Duplicate label.
Marked as being merged into #422.

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

No branches or pull requests

1 participant