New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 852069 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 738611
issue 862472



Sign in to add a comment

Update polymer-css-build dependency to a version that works with Polymer 2.

Project Member Reported by dpa...@chromium.org, Jun 12 2018

Issue description

polymer-css-build currently does not work with Polymer 2. The candidate updated version is at [1]. Need to follow up with the Polymer team, such that the candidate is published, and then included in Chromium by updating [2].

[1] https://github.com/Polymer/polymer-css-build/tree/polymer-v2
[2] https://cs.chromium.org/chromium/src/third_party/node/package.json
 

Comment 1 by dpa...@chromium.org, Jun 12 2018

Blocking: 738611
I tried the latest version 0.3.0-alpha.1, and unfortunately it is breaking us. Actually it is 0.2.2 that breaks us, not 0.3.0-alpha.1. Note that on tip of tree we are still using 0.1.2, see [1]. Specifically the way it is breaking is is that it converts href="..." attributes as follows

<a href="$i18n{aboutObsoleteSystemURL}" target="_blank">
Is converted to
<a href="about_page/$i18n%7BaboutObsoleteSystemURL%7D" target="_blank">

@azakus:
Instead we expect this line to be unmodified. Can you help identify what changed on PCB side that affected this behavior? Until this is fixed, I can't actually start using the 0.3.0-alpha.1 version.

[1] https://cs.chromium.org/chromium/src/third_party/node/package.json?l=9
Cc: rbpotter@chromium.org
Cc: dfreedm@chromium.org
So the error mentioned at #2 turns out is a known issue which we have fixed with a local patch to polymer-bundler see [1]. It occurred because I did run just "npm install" locally, instead of using the full fledged script at [2].

Sorry for the noise. Will keep testing the new version, and see if any other issues come up.

[1] https://cs.chromium.org/chromium/src/third_party/node/chromium_polymer_bundler.patch
[2] https://cs.chromium.org/chromium/src/third_party/node/update_npm_deps?l=22
The next issue I am facing is a sharp increase in our NPM dependencies size, as a result of the latest update to polymer-css-build. Specifically

Size of third_party/node_modules
Before: 36 MB
After: 41 MB

Looking at the dependencies, the problem seems to be that polymer-analyzer is included twice, because 2 different versions are required.

1) node_modules/polymer-analyzer which is at version 2.7 (required by polymer-bundler 3.1.1)
2) node_modules/polymer-css-build/node_modules/polymer-analyzer is at version 3.0.2 (required by polymer-css-build 0.3.0-alpha.1).

The problem could potentially be fixed polymer-bundler 4.x versions, which according to the changelog at [1] updates the dependency to polymer-analyzer 3.x, but 4.x are still marked as "pre" releases.

Any guidance appreciated. Ideally, we would not need to include multiple versions of any dependency, in order to keep the dependencies size as low as possible.

[1] https://github.com/Polymer/polymer-bundler/blob/master/CHANGELOG.md#400-pre1---2018-03-07
polymer-bundler has moved to a monorepo, along with most of the polymer tool efforts, and 4.x is marked stable: https://github.com/Polymer/tools/blob/master/packages/bundler/CHANGELOG.md

You should be able to upgrade and have analyzer deduplicated to 3.0.2
Summarizing some discussions that have happened off this list:

- Migrating to polymer-bundler 4.x seems causes the dependency size to grow even larger than what described at #6, so it does not solve the issue. Moreover, 4.x has some features that don't seem necessary at this point for WebUI, so there is little benefit of doing so.
- A never version of polymer-css-build has been uploaded that utilizes the same polymer-analyzer version with polymer-bundler 3.x. Got green tests at [1] with that version.

So the next step would be to publish this version as an non-alpha version, (curerntly is named 0.3.0-alpha.4). Also I did do a sanity check that Polymer 2 Chromium build works with the newest version, but did not run the full suite of tests yet.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1142900
Blocking: 862472
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed4d9ee6678aa34fa7fd0eb537e7e73799cd43b3

commit ed4d9ee6678aa34fa7fd0eb537e7e73799cd43b3
Author: dpapad <dpapad@chromium.org>
Date: Sat Jul 28 00:19:14 2018

WebUI: Update polymer-css-build to latest version.

polymer-css-build 0.1.2 -> 0.3.0-alpha.7
polymer-bundler 3.0.1 -> 3.1.1
crisper 2.0.2 -> 2.1.1

This is required for allowing Polymer 2 optimize_webui=true builds.

Bug:  852069 
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I69da071fcf6999c366f1d60070888afb7a662f4a
Reviewed-on: https://chromium-review.googlesource.com/1142900
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578872}
[modify] https://crrev.com/ed4d9ee6678aa34fa7fd0eb537e7e73799cd43b3/chrome/browser/resources/optimize_webui.py
[modify] https://crrev.com/ed4d9ee6678aa34fa7fd0eb537e7e73799cd43b3/third_party/node/node_modules.tar.gz.sha1
[modify] https://crrev.com/ed4d9ee6678aa34fa7fd0eb537e7e73799cd43b3/third_party/node/npm_exclude.txt
[modify] https://crrev.com/ed4d9ee6678aa34fa7fd0eb537e7e73799cd43b3/third_party/node/package.json

Status: Fixed (was: ExternalDependency)

Sign in to add a comment