Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Issue 2598743002: When importing w3c repos, convert CRLF line endings. (Closed)

Created:
4 years ago by qyearsley
Modified:
3 years, 11 months ago
Reviewers:
Rick Byers, jeffcarp
CC:
blink-reviews, blink-reviews-w3ctests_chromium.org, chromium-reviews, Dirk Pranke, tfarina, jsbell, foolip, kojii, m_gsnedders
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

When importing w3c repos, convert CRLF line endings. Background: The Chromium presubmit checks for Windows-style line endings in some text files. For pan-project checks, //third_party/WebKit is excluded, but for some other checks including the line endings check and permissions check, it is not excluded. (See https://cs.chromium.org/chromium/src/PRESUBMIT.py?l=2047) In principle, I think we don't care a lot if automatically imported files that we don't have control over don't don't meet the Chromium presubmit, so it would be acceptable to ignore presubmits. Earlier, in https://chromium-review.googlesource.com/c/419148/, I made it so that when uploading changes with presubmit warnings the warnings are ignored, but the warnings aren't ignored on commit because the chromium_presubmit try job runs and fails on warnings. Another option would be to change //PRESUBMIT.py to add the imported wpt directory to the blacklist for particular checks. The rationale for making this change here is that: 1. We're already doing some transformations to pass presubmit. 2. I didn't see any other checks that are likely to be an issue. 3. Transforming CRLF -> LF line ending is a pretty simple transformation. BUG=671683

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -2 lines) Patch
M third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py View 1 chunk +19 lines, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py View 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
qyearsley
Hi, this is a proposed change to get csswg-test imports going again. Note, there's an ...
4 years ago (2016-12-21 19:13:51 UTC) #2
jeffcarp
On 2016/12/21 at 19:13:51, qyearsley wrote: > Hi, this is a proposed change to get ...
4 years ago (2016-12-21 23:12:02 UTC) #7
qyearsley
On 2016/12/21 at 23:12:02, jeffcarp wrote: > On 2016/12/21 at 19:13:51, qyearsley wrote: > > ...
4 years ago (2016-12-21 23:18:28 UTC) #8
Rick Byers
On 2016/12/21 23:18:28, qyearsley wrote: > On 2016/12/21 at 23:12:02, jeffcarp wrote: > > On ...
4 years ago (2016-12-21 23:25:39 UTC) #10
qyearsley
On 2016/12/21 at 23:25:39, rbyers wrote: > On 2016/12/21 23:18:28, qyearsley wrote: > > On ...
4 years ago (2016-12-21 23:35:21 UTC) #11
Rick Byers
On 2016/12/21 23:35:21, qyearsley wrote: > On 2016/12/21 at 23:25:39, rbyers wrote: > > On ...
4 years ago (2016-12-21 23:43:54 UTC) #12
m_gsnedders
On Wed, Dec 21, 2016 at 11:35 PM, <qyearsley@chromium.org> wrote: > On 2016/12/21 at 23:25:39, ...
4 years ago (2016-12-21 23:53:35 UTC) #13
m_gsnedders
On Wed, Dec 21, 2016 at 11:35 PM, <qyearsley@chromium.org> wrote: > On 2016/12/21 at 23:25:39, ...
4 years ago (2016-12-21 23:53:35 UTC) #14
qyearsley
On 2016/12/21 at 23:53:35, me wrote: > On Wed, Dec 21, 2016 at 11:35 PM, ...
4 years ago (2016-12-22 00:16:15 UTC) #15
m_gsnedders
On Thu, Dec 22, 2016 at 12:16 AM, <qyearsley@chromium.org> wrote: > On 2016/12/21 at 23:53:35, ...
4 years ago (2016-12-22 00:23:15 UTC) #16
m_gsnedders
On Thu, Dec 22, 2016 at 12:16 AM, <qyearsley@chromium.org> wrote: > On 2016/12/21 at 23:53:35, ...
4 years ago (2016-12-22 00:23:15 UTC) #17
qyearsley
3 years, 11 months ago (2016-12-28 19:30:37 UTC) #18
On 2016/12/22 at 00:23:15, me wrote:
> On Thu, Dec 22, 2016 at 12:16 AM,  <qyearsley@chromium.org> wrote:
> > On 2016/12/21 at 23:53:35, me wrote:
> >> On Wed, Dec 21, 2016 at 11:35 PM, <qyearsley@chromium.org&gt; wrote:
> >> > On 2016/12/21 at 23:25:39, rbyers wrote:
> >> >> If it is a problem then perhaps we can get the upstream repo's
> >> >> configured
> >> >> to
> >> > disallow CRLF endings at commit time. Usually I think that's from a
> >> > misconfigured git client on Windows. +gsnedders who's probably the
> >> > authority
> >> > to
> >> > ask here.
> >> >
> >> > That solution sounds better to me :-)
> >>
> >> Yo.
> >>
> >> So the status quo for a long time has been that new files in wpt (and
> >> more recently csswg-test) aren't allowed to use CRLF. This is
> >> maintained by the /lint tool, taking into account /lint.whitelist.
> >> There may be new things added if there's large test-dumps where it
> >> isn't practical to convert them, though that seems quite unlikely.
> >>
> >> *However*, CRLF is only one of the things that the lint tool checks
> >> for, and ideally we won't be introducing any failed lints. One
> >> potential option is to just import the lint tool and related files and
> >> require that to always pass on Chromium check-in.
> >>
> >> /g
> >
> > Excellent, this is good news. There's already a check for CRLF endings
> > in Chromium, and if we can expect there to generally be no CRLF endings
> > in web-platform-tests (and csswg-test) in the future, then I don't
> > think this CL is necessary.
> >
> > Related: Now trying to update https://github.com/w3c/csswg-test/pull/1157
> >
> > https://codereview.chromium.org/2598743002/
> 
> I'm not sure how realistic that expectation is, and I didn't mean to
> create it! There's certainly some resistance to trying to fix too much
> of things like that given it creates quite a lot of noise and churn
> for relatively little gain. That might be worth bringing up on
> public-test-infra@w3.org if you feel strongly!
> 
> /g
> 
> -- 
> You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to chromium-reviews+unsubscribe@chromium.org.
> 

I'm now thinking of abandoning this CL because it shouldn't be necessary
assuming that the wpt lint script checks for CRLF endings.
If this is an issue in the future, we may want to change the test importer to
skip tests that have CRLF endings and emit a warning or message suggesting to
fix the file upstream.

Powered by Google App Engine
This is Rietveld 408576698