Mixed line endings in Polymer source :'(

78 views
Skip to first unread message

Michael Giuffrida

unread,
Feb 12, 2015, 5:01:21 PM2/12/15
to polym...@googlegroups.com
Several Polymer files on GitHub (and when installed through bower) mix CRLF with LF, and it's making the Chromium tree sad.



Michael

Elliott Sprehn

unread,
Feb 12, 2015, 5:02:50 PM2/12/15
to Michael Giuffrida, polymer-dev
I blame Scott and his windows habit. :P

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CACi5S_1RrSQEKzxGWhQPUzfqBSSFS6-SPkqjWDG9me9%2B05GhwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Freedman

unread,
Feb 12, 2015, 5:07:43 PM2/12/15
to Elliott Sprehn, Michael Giuffrida, polymer-dev
None of our tools ever cared about line endings. What breaks about mixed line endings breaks the Chromium tree? Anything beyond some linter step?

Michael Giuffrida

unread,
Feb 12, 2015, 5:37:46 PM2/12/15
to Daniel Freedman, Elliott Sprehn, polymer-dev
Rietveld and/or the CQ cannot apply changes when the unified diff contains CRs. See discussion on chromium-dev:

We'll be adding a script to the tree to remove those line endings after "bower install".

Rob Dodson

unread,
Feb 12, 2015, 11:37:12 PM2/12/15
to Michael Giuffrida, Daniel Freedman, Elliott Sprehn, polymer-dev

Daniel Freedman

unread,
Feb 13, 2015, 1:46:42 PM2/13/15
to Rob Dodson, Michael Giuffrida, Elliott Sprehn, polymer-dev
Yeah all for that. The only task would be to go through all the components and fix them up.

Michael Giuffrida

unread,
Feb 14, 2015, 12:11:47 AM2/14/15
to Daniel Freedman, Rob Dodson, Elliott Sprehn, polymer-dev
FYI, we've updated a script in the Chromium tree so we can handle mixed line endings in Polymer elements now (by stripping away the CRs when updating elements). But I'd still encourage consistency!

Martin Kleinschrodt

unread,
Feb 14, 2015, 7:42:32 AM2/14/15
to polym...@googlegroups.com, dfr...@google.com, robd...@google.com, esp...@gmail.com, mich...@google.com
Haha, nice to see that these things happen even at a top notch team like this! I suggest using a linter in combination with a pre-commit git hook to catch these kinds of things before they even creep into version control.

Matthew McNulty

unread,
Feb 14, 2015, 10:52:48 AM2/14/15
to Martin Kleinschrodt, polym...@googlegroups.com, dfr...@google.com, robd...@google.com, esp...@gmail.com, mich...@google.com
It actually *is* Scott and his windows habit - Elliott was correct. I've tried offering to buy him a Mac for his house but that didn't work. We may have to stage an intervention, or wait for him to hit rock bottom so he can see how much he's hurting his Chromium family before he's willing to seek the help of a proper operating system.

Rob Dodson

unread,
Feb 17, 2015, 1:49:32 PM2/17/15
to Matthew McNulty, Martin Kleinschrodt, polym...@googlegroups.com, dfr...@google.com, esp...@gmail.com, mich...@google.com
I think a .gitattributes file should fix this as well. https://help.github.com/articles/dealing-with-line-endings/#per-repository-settings
Most Yeoman generators create one by default.
Reply all
Reply to author
Forward
0 new messages