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

need to find and/or warn about unregistered custom elements #87

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

need to find and/or warn about unregistered custom elements #87

DartBot opened this issue Jun 5, 2015 · 20 comments

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

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


Polymer Linter can save us time if it can warn us that we forgot @­CustomTag.

I'm not saying I've ever forgotten the tag. Nor am I not not saying it, either.

Thanks!

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by joh...@johnmccutchan.com


I just wasted an hour because I forgot a @­CustomTag. Please extend the linter to nag me :)

@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


Technically skipping CustomTag isn't an error. Manual registration is supported too.

Maybe what we want is a way to find unregistered custom elements


Added this to the Later milestone.
Removed Library-PolymerLinter label.
Changed the title to: "need to find and/or warn about unregistered custom elements".

@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


Not an error, but the linter doesn't report errors. :) It reports hints and warnings.

There's a lot of little things we need to get right: name of element in <polymer-element>, name of tag in HTML, name in @­CustomTag, the presence of @­CustomTag. Mess up any of those and your element doesn't show up.

The more the linter can warn us, the less time we spend tracking down the chain of names.

I'm afraid of the Milestone-Later. Maybe not M8 but it's the toolability that makes Dart a clear win. The more we can make Polymer + Dart more toolable, the more users we get.

@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


Not an error, but the linter doesn't report errors. :) It reports hints and warnings.

Sorry, I meant "isn't an error" in the conventional sense: "it isn't an incorrect thing to do". According to Dart's philosophy, we shouldn't "warn" if you're doing things correctly (especially in this case: there isn't a way to suppress the warning).

There's a lot of little things we need to get right: name of element in <polymer-element>, name of tag in HTML, name in @­CustomTag, the presence of @­CustomTag. Mess up any of those and your element doesn't show up.

Sure. You can't fix all of those via static analysis though. We have to hope that examples, documentation, and debugging tools will be enough.

I'm afraid of the Milestone-Later. Maybe not M8 but it's the toolability that makes Dart a clear win.

Later just means "Later release beyond M8", according to the description.

@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


Ah, so maybe we can be more specific: If we omit the @­CustomTag, the page does not render the custom tag and there's no warning or error in the console. So, we could say we need better debugging tools for that situation.

@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


So, we could say we need better debugging tools for that situation.

yup :)

@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


Issue dart-lang/sdk#14253 has been merged into this issue.

@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


Issue dart-lang/sdk#14252 has been merged into this issue.

@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 Later milestone.
Added this to the M9 milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Removed this from the M9 milestone.
Added this to the 1.1 milestone.

@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.1 milestone.
Added this to the 1.2 milestone.

@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-PolymerLinter 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


-Linter for now ... as I'm not convinced we can tackle this with static tools. we definitely can with runtime tools ... one of the Polymer JS guys, I think Eric Bidelman made a simple JS thingy (bookmarklet?) to highlight custom elements. Presumably the same kind of thing could find unregistered ones specifically.

sadly we haven't had bandwidth to work on tooling stuff, as much as I would like to :(. I really sympathize, it's really frustrating when "things didn't render and I don't know why"...


Removed this from the 1.2 milestone.
Added this to the Later milestone.
Removed Library-PolymerLinter 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 Pkg-Polymer, Area-Pkg labels.

@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-Low 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 Polymer-P-2 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 Later milestone.

@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-2 label.
Added Polymer-Milestone-Later 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-Later label.
Added PolymerMilestone-Later label.

@jakemac53
Copy link
Contributor

Unfortunately this is harder now since <dom-module> can be used for more than just custom elements, marking as not planned for now at least.

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

No branches or pull requests

2 participants