Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Consider updating html5lib version dependency #1281

Open
taisph opened this issue Jul 30, 2014 · 13 comments
Open

Consider updating html5lib version dependency #1281

taisph opened this issue Jul 30, 2014 · 13 comments

Comments

@taisph
Copy link
Contributor

taisph commented Jul 30, 2014

Testing suggests html5lib pubspec dependency can be expanded to <0.12.0, which would be helpful for people trying to use angular with polymer, core_elements etc.

I've bumped the version dependency locally and run the scripts/run-test.sh script as well as basic usage tests in my own Angular-based project. No code was harmed during this experiment.

pubspec.yaml

name: angular
version: 0.13.0
authors:
- Misko Hevery <[email protected]>
- Pavel Jbanov <[email protected]>
- James deBoer <[email protected]>
- Chirayu Krishnappa <[email protected]>
- Matias Niemela <[email protected]>
- Paul Rohde <[email protected]>
- Victor Berchet <[email protected]>
description: Angular for dart.
homepage: https://angulardart.org
environment:
  sdk: '>=1.4.0'
dependencies:
  args: '>=0.10.0 <0.11.0'
  analyzer: '>=0.15.0 <0.19.0'
  barback: '>=0.13.0 <0.17.0'
  browser: '>=0.10.0 <0.11.0'
  code_transformers: '>=0.1.4+2 <0.2.0'
  collection: '>=0.9.1 <1.0.0'
  di: '>=2.0.1 <3.0.0'
  html5lib: '>=0.10.0 <0.12.0'
  intl: '>=0.8.7 <0.12.0'
  perf_api: '>=0.0.8 <0.1.0'
  route_hierarchical: '>=0.4.21 <0.5.0'
  web_components: '>=0.3.3 <0.4.0'
dev_dependencies:
  benchmark_harness: '>=1.0.0 <2.0.0'
  guinness: '>=0.1.9 <0.2.0'
  mock: '>=0.10.0 <0.12.0'
  protractor: '0.0.5'
  unittest: '>=0.10.1 <0.12.0'

pub deps

angular 0.13.0
|-- analyzer 0.18.0
|   |-- args...
|   |-- logging...
|   |-- path...
|   '-- typed_mock 0.0.4
|-- args 0.10.0+2
|   '-- collection...
|-- barback 0.14.0+3
|   |-- collection...
|   |-- path...
|   |-- source_maps...
|   '-- stack_trace 0.9.3+2
|       '-- path...
|-- benchmark_harness 1.0.4
|   '-- browser...
|-- browser 0.10.0+2
|-- code_transformers 0.1.6
|   |-- analyzer...
|   |-- barback...
|   |-- path...
|   '-- source_maps...
|-- collection 0.9.4
|-- di 2.0.1
|   |-- analyzer...
|   |-- barback...
|   |-- code_transformers...
|   '-- path 1.2.2
|-- guinness 0.1.13
|   |-- collection...
|   '-- unittest...
|-- html5lib 0.11.0+2
|   |-- csslib 0.11.0
|   |   |-- args...
|   |   |-- logging...
|   |   |-- path...
|   |   '-- source_span 1.0.0
|   |       '-- path...
|   |-- source_maps 0.9.3
|   |   '-- path...
|   '-- utf 0.9.0+1
|-- intl 0.8.10+4
|   |-- analyzer...
|   |-- path...
|   '-- meta 0.8.8
|-- mock 0.11.0+2
|   '-- matcher 0.11.0
|-- perf_api 0.0.8
|-- protractor 0.0.5
|   '-- js 0.2.2
|       '-- browser...
|-- route_hierarchical 0.4.21
|   |-- browser...
|   '-- logging 0.9.2
|-- unittest 0.11.0+3
|   |-- matcher...
|   '-- stack_trace...
'-- web_components 0.3.5+1
@vicb
Copy link
Contributor

vicb commented Jul 30, 2014

Do you have any info of potential backward incompatibilities in 0.11 ?

@taisph
Copy link
Contributor Author

taisph commented Jul 30, 2014

I haven't been able to find any information about breaking changes or similar. Apparently the Dart Team didn't consider updating the changelog with changes between 0.10.0 and 0.11.0 important. I also haven't located an updated repository with the 0.11.0+ source.

A diff between the two shows approximately half of the changes are removal of previously deprecated methods.

As such I can only refer to the results of the Angular test suite, the Dart Editor analysis and my own app.

@sethladd
Copy link
Contributor

Maybe @jmesserly has some ideas on the diff between 0.10 and 0.11 ?

@sethladd
Copy link
Contributor

Also, maybe @vsavkin can take a look at this for us? It's blocking Angular + Polymer apps.

@vicb
Copy link
Contributor

vicb commented Aug 19, 2014

We only do basic things with html5lib: parsing a doc, matching nodes based on attributes. The smoke test done by @taisph should be enough to prove it works.

Are there any other deps that would need to be upgraded to play well with polymer ?

@jmesserly
Copy link

Maybe @jmesserly has some ideas on the diff between 0.10 and 0.11 ?

I believe it was https://codereview.chromium.org//268623002
querySelector/querySelectorAll have fairly complete implementations now (previously, they only handled tag names e.g. querySelector('div'))

@jmesserly
Copy link

oh, and some of the DOM APIs were fixed to align better with dart:html and http://dom.spec.whatwg.org

@taisph
Copy link
Contributor Author

taisph commented Aug 22, 2014

Polymer dropped html5lib (or a dependant dep did) somewhere between 0.12.0+1 and +5 but needs code_transformers >=0.2.0 <0.3.0.

@taisph
Copy link
Contributor Author

taisph commented Aug 22, 2014

@jmesserly Ok. It complained about it pre 0.12.0+1 but not on 0.12.0+5 and up. Maybe I missed something.

@taisph
Copy link
Contributor Author

taisph commented Aug 22, 2014

I don't know if it is helpful at all but I did some more smoke testing: I widened code_transformers, html5lib and web_components on current angular.dart master branch (commit dba6727) and ran pub upgrade with dart-sdk 1.6.0-dev.9.6; changes currently necessary for using latest polymer, core_elements and paper_elements with angular. I then ran scripts/run-test.sh:

4 tests, 11 assertions, 0 failures, 0 skipped
Chrome 37.0.2062 (Linux): Executed 1581 of 1581 (2 FAILED) (10.769 secs / 9.757 secs)
Chrome 36.0.1985 (Linux): Executed 1581 of 1581 (2 FAILED) (4 mins 10.92 secs / 4 mins 4.261 secs)
Firefox 31.0.0 (Ubuntu): Executed 1581 of 1581 (2 FAILED) (9 mins 2.955 secs / 8 mins 35.728 secs)
TOTAL: 6 FAILED, 4737 SUCCESS

Failing tests:

Chrome 37.0.2062 (Linux) with ElementProbe enabled dte.compiler components should select on element FAILED
        Test failed: Caught Expected: 'INNER()'
          Actual: 'INNER(SHADOW-CONTENT)'
           Which: is different.
        Expected: INNER()
          Actual: INNER(SHADOW-CON ...
                        ^
         Differ at offset 6

pubspec changes:

diff --git a/pubspec.yaml b/pubspec.yaml
index db2a3c5..2dc7945 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -17,10 +17,10 @@ dependencies:
   analyzer: '>=0.15.0 <0.19.0'
   barback: '>=0.13.0 <0.17.0'
   browser: '>=0.10.0 <0.11.0'
-  code_transformers: '>=0.1.4+2 <0.2.0'
+  code_transformers: '>=0.1.4+2 <0.3.0'
   collection: '>=0.9.1 <1.0.0'
   di: '>=2.0.1 <3.0.0'
-  html5lib: '>=0.10.0 <0.11.0'
+  html5lib: '>=0.10.0 <0.13.0'
   intl: '>=0.8.7 <0.12.0'
   perf_api: '>=0.0.8 <0.1.0'
   route_hierarchical: '>=0.4.22 <0.5.0'
@@ -30,4 +30,4 @@ dev_dependencies:
   mock: '>=0.10.0 <0.12.0'
   protractor: '0.0.5'
   unittest: '>=0.10.1 <0.12.0'
-  web_components: '>=0.3.3 <0.4.0'
+  web_components: '>=0.3.3 <0.6.0'

pub deps after upgrade:

angular 0.13.0
|-- analyzer 0.18.0
|   |-- args...
|   |-- logging...
|   |-- path...
|   '-- typed_mock 0.0.4
|-- args 0.10.0+2
|   '-- collection...
|-- barback 0.15.0
|   |-- collection...
|   |-- path...
|   |-- source_span...
|   |-- pool 1.0.1
|   |   '-- stack_trace...
|   '-- stack_trace 1.0.2
|       '-- path...
|-- benchmark_harness 1.0.4
|   '-- browser...
|-- browser 0.10.0+2
|-- code_transformers 0.2.1
|   |-- analyzer...
|   |-- barback...
|   |-- path...
|   |-- source_span...
|   '-- source_maps 0.10.0
|       |-- path...
|       '-- source_span...
|-- collection 0.9.4
|-- di 2.0.2
|   |-- analyzer...
|   |-- barback...
|   |-- code_transformers...
|   '-- path 1.3.0
|-- guinness 0.1.14
|   |-- collection...
|   '-- unittest...
|-- html5lib 0.12.0
|   |-- csslib 0.11.0+2
|   |   |-- args...
|   |   |-- logging...
|   |   |-- path...
|   |   '-- source_span...
|   |-- source_span 1.0.0
|   |   '-- path...
|   '-- utf 0.9.0+1
|-- intl 0.11.5
|   |-- analyzer...
|   '-- path...
|-- mock 0.11.0+2
|   '-- matcher 0.11.1
|-- perf_api 0.0.9
|-- protractor 0.0.5
|   '-- js 0.2.2
|       '-- browser...
|-- route_hierarchical 0.4.22
|   |-- browser...
|   '-- logging 0.9.2
|-- unittest 0.11.0+5
|   |-- matcher...
|   '-- stack_trace...
'-- web_components 0.5.0+1

(Updated: Added missing web_components change and Firefox didn't fail during the first couple of runs but did on the last run.)

@vicb
Copy link
Contributor

vicb commented Aug 23, 2014

@taisph I believe the failures might be related to guiness 0.1.14, see #1370

@vsavkin
Copy link
Contributor

vsavkin commented Aug 24, 2014

@taisph The failing test is incorrect. It was passing before because of a bug in Guinness, which was fixed in Guinness 0.1.14. The test was fixed in a branch that should be merged into master soon. For now, you can use Guinness 0.1.13.

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

Successfully merging a pull request may close this issue.

5 participants