pub upgrade downgrades my main-packages

流过昼夜 提交于 2019-12-23 17:49:10

问题


Here is my dependency-list:

dependencies:
  browser: any

  polymer: any
  polymer_elements: any

  angular: any

  lawndart: any
  validate: any
  http_utils: any

And here is what I get if I say "pub upgrade"

Resolving dependencies... (42.5s)
  analyzer 0.12.2 (4 newer versions available)
  angular 0.9.10
  args 0.9.0 (3 newer versions available)
  barback 0.11.1 (2 newer versions available)
  bignum 0.0.5
  browser 0.9.1 (3 newer versions available)
  cipher 0.6.0 (1 newer version available)
  code_transformers 0.0.1-dev.2 (4 newer versions available)
  collection 0.9.1
  crypto 0.9.0
  csslib 0.9.2
  custom_element 0.10.1
  di 0.0.34
  event_bus 0.2.3 (1 newer version available)
  fixnum 0.9.0
  html5lib 0.9.2 (1 newer version available)
  html_import 0.9.0
  http_utils 1.2.10
  intl 0.8.10+4 (9 newer versions available)
  json 0.10.0
  lawndart 0.6.5
  logging 0.9.1+1
  logging_handlers 0.8.0
  matcher 0.10.0
  meta 0.8.8
  mock 0.10.0+1
  mutation_observer 0.9.0
  observe 0.10.0-pre.0 (3 newer unstable versions available)
  path 1.1.0
  perf_api 0.0.8
  polymer 0.8.10+4 (15 newer versions available)
  polymer_elements 0.0.2 (16 newer versions available)
  polymer_expressions 0.9.1 (2 newer unstable versions available)
  route_hierarchical 0.4.17
  shadow_dom 0.9.2
  smoke 0.1.0-pre.2
  source_maps 0.9.0
  stack_trace 0.9.3+1
  template_binding 0.9.1 (2 newer unstable versions available)
  unittest 0.10.1+2
  unmodifiable_collection 0.9.2+1
  utf 0.9.0
  uuid 0.3.0
  validate 1.2.4
  yaml 0.9.0

polymer - 15 newer version!!!!

if I say "pub upgrade browser"

  analyzer 0.12.2 (4 newer versions available)
+ analyzer_experimental 0.8.6
< angular 0.0.7 (was 0.9.10) (15 newer versions available)
  args 0.9.0
  barback 0.11.1
  bignum 0.0.5
> browser 0.10.0+2 (was 0.9.1)
  cipher 0.6.0
  code_transformers 0.0.1-dev.2
  collection 0.9.1
  crypto 0.9.0
  csslib 0.9.2
  custom_element 0.10.1
  di 0.0.34
  event_bus 0.2.3
  fixnum 0.9.0
  html5lib 0.9.2
  html_import 0.9.0
  http_utils 1.2.10
  intl 0.8.10+4
+ js 0.2.2
  json 0.10.0
  lawndart 0.6.5
  logging 0.9.1+1
  logging_handlers 0.8.0
  matcher 0.10.0
  meta 0.8.8
  mock 0.10.0+1
  mutation_observer 0.9.0
  observe 0.10.0-pre.0
  path 1.1.0
  perf_api 0.0.8
  polymer 0.8.10+4
  polymer_elements 0.0.2
< polymer_expressions 0.8.10+4 (was 0.9.1) (2 newer versions available)
  route_hierarchical 0.4.17
  shadow_dom 0.9.2
  smoke 0.1.0-pre.2
  source_maps 0.9.0
  stack_trace 0.9.3+1
  template_binding 0.9.1
  unittest 0.10.1+2
  unmodifiable_collection 0.9.2+1
  utf 0.9.0
  uuid 0.3.0
  validate 1.2.4
  yaml 0.9.0
Changed 5 dependencies!

It downgrades angular!!!!!

< angular 0.0.7 (was 0.9.10) (15 newer versions available)

If I change my dependencies for browser:

dependencies:
  browser: ">=0.10.0+2 <0.11.0"

Results in:

> analyzer 0.13.5 (was 0.12.2)
  analyzer_experimental 0.8.6
  angular 0.0.7 (15 newer versions available)
> args 0.10.0+2 (was 0.9.0)
> barback 0.12.0 (was 0.11.1) (1 newer version available)
  bignum 0.0.5
  browser 0.10.0+2
  cipher 0.6.0 (1 newer version available)
> code_transformers 0.1.1+1 (was 0.0.1-dev.2)
  collection 0.9.1
  crypto 0.9.0
< di 0.0.24 (was 0.0.34) (10 newer versions available)
> event_bus 0.2.4 (was 0.2.3)
  fixnum 0.9.0
> html5lib 0.10.0 (was 0.9.2)
  http_utils 1.2.10
> intl 0.9.8 (was 0.8.10+4)
  js 0.2.2
  json 0.10.0
  lawndart 0.6.5
  logging 0.9.1+1
  logging_handlers 0.8.0
  matcher 0.10.0
  meta 0.8.8
  mock 0.10.0+1
> observe 0.10.0-pre.3 (was 0.10.0-pre.0)
  path 1.1.0
  perf_api 0.0.8
> polymer 0.10.0-pre.8 (was 0.8.10+4)
> polymer_elements 0.1.2+1 (was 0.0.2) (6 newer unstable versions available)
> polymer_expressions 0.10.0-pre.1 (was 0.8.10+4)
+ polymer_ui_elements 0.1.2 (6 newer unstable versions available)
  route_hierarchical 0.4.17
  smoke 0.1.0-pre.2
  source_maps 0.9.0
  stack_trace 0.9.3+1
> template_binding 0.10.0-pre.1 (was 0.9.1)
  unittest 0.10.1+2
  utf 0.9.0
  uuid 0.3.0
  validate 1.2.4
+ web_components 0.3.3
  yaml 0.9.0  

I'm using Dart 1.3.0!!! so - this is the latest version for today. I don't know what pub upgrade is doing here but it does not manage dependencies...

Any hints?

[Update]
As a workaround I change my dependencies to

dependencies:
  polymer_elements:
    git: https://github.com/ErikGrimes/polymer_elements

  polymer_ui_elements:
    git: https://github.com/ErikGrimes/polymer_ui_elements

  angular: any
  #  git: https://github.com/angular/angular.dart
  #    Incompatible version constraints on html5lib:
  #    - angular depends on version >=0.9.2 <0.10.0
  #    - polymer depends on version >=0.10.0 <0.11.0

  lawndart: any
  validate: any
  http_utils: any

Directly linking to GitHub solves almost everything. Except Angular!!!!

Resolving dependencies... (50.0s)
< angular 0.0.7 (was 0.9.10) (15 newer versions available)
> barback 0.12.0 (was 0.11.1) (1 newer version available)
  cipher 0.6.0 (1 newer version available)
< di 0.0.24 (was 0.0.34) (10 newer versions available)

Very frustrating, it took me almost 3h to get the latest polymer version and angular is still 15 versions behind.


回答1:


Here is a discussion about a similar experience https://groups.google.com/forum/#!searchin/angular-dart/0.0.7/angular-dart/PnvkUudHulg/ZtM3Y8xH_ugJ

I guess you should add version constraints on every dependency where weird (too old) versions are fetched until pub upgrade complaints that it is not able to resolve the dependencies. This could help to find the culprit.

The pub deps command was added in Dart 1.4 to show which package dependes on which other packages.



来源:https://stackoverflow.com/questions/22982907/pub-upgrade-downgrades-my-main-packages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!