Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

bower: 1.1.10 requires minimum angular 1.7.2 #11348

Closed
marshfire opened this issue Jun 29, 2018 · 13 comments
Closed

bower: 1.1.10 requires minimum angular 1.7.2 #11348

marshfire opened this issue Jun 29, 2018 · 13 comments
Assignees
Labels
P1: urgent Urgent issues that should be addressed in the next minor or patch release. resolution: fixed type: build
Milestone

Comments

@marshfire
Copy link

marshfire commented Jun 29, 2018

Bug, enhancement request, or proposal:

Bug

CodePen and steps to reproduce the issue:

CodePen Demo which demonstrates the issue:

no reproducer (build issue in existing projects that use bower with a dependency of angular-material ~1.1.*)

Detailed Reproduction Steps:

  1. readme states that angular >1.4 is required
  2. package.json requires ^1.7.2

What is the expected behavior?

at least continue working with angular 1.6

What is the current behavior?

build conflicts in all our projects

What is the use-case or motivation for changing an existing behavior?

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS: 1.4, 1.5, 1.6
  • AngularJS Material: 1.1.10
  • OS: all
  • Browsers: all

Is there anything else we should know? Stack Traces, Screenshots, etc.

introduced by this: f6534d6

@marshfire marshfire changed the title 1.1.10 requires minimum angular 1.7.2 1.1.10 requires minimum angular 1.7.2 but should work with 1.4 and higher Jun 29, 2018
@clemator
Copy link

clemator commented Jun 29, 2018

I have the exact same issue

Edit: I had to downgrade angular-material to 1.1.9 in my bower.json

@fsmeier
Copy link
Contributor

fsmeier commented Jun 29, 2018

@marshfire @clemator are you loading angularJS just over dependencies automatically or have you specified this? - I just look again via https://docs.npmjs.com/files/package.json#dependencies and this syntax just says that it supports up until angularJS 1.7.2 ... maybe it would make even sense to limit it to a min-version as well, but after research I think the repository here is correct but your package.json maybe wrong.

@marshfire
Copy link
Author

@IMM0rtalis we usually allow 3rd party dependencies to patch their versions (thus we say "angular-material": "~1.1.5") 1.1.5 has the minimum feature set we needs and we want to be able to get patches but not minor version updates (e.g. no automatic 1.2)

for angular we say "angular": "~1.6.x" (allows everything >= 1.6.0 and < 1.7.0)

in material 1.1.10 angular is required as "^1.7.2" which meens it is compatible with 1.7.2 and everything not major breaking above, but not with versions below (so it allows to be resolved to >= 1.7.2 and < 2.0.0)

This is now an unresolvable conflict and needs touching of every component/ module relying on it. Since material and angular is used by nearly everything we do this would mean touching 50+ projects and releasing new versions.

@fsmeier
Copy link
Contributor

fsmeier commented Jun 29, 2018

Oh ok, you are right, sorry. I just read again about the carret: https://docs.npmjs.com/misc/semver#caret-ranges-123-025-004

@Splaktar

fsmeier pushed a commit to fsmeier/material that referenced this issue Jun 29, 2018
@fsmeier
Copy link
Contributor

fsmeier commented Jun 29, 2018

@marshfire Can you check if my PR would be the correct dependency description?

@Splaktar Splaktar self-assigned this Jun 29, 2018
@Splaktar
Copy link
Contributor

Responding to the OP, you mention that your project uses Bower and then you refer to the package.json that Bower doesn't use (it's for NPM). Can you please provide the exact error message?

@Splaktar
Copy link
Contributor

For 1.1.10, we did bump the minimum Bower dependencies to AngularJS ^1.7.2 from ^1.6.0: https://github.com/angular/bower-material/blob/master/bower.json.

Please note as indicated here support for Bower is deprecated.

For NPM, we support a wider range of versions, 1.4 - 1.7.0 || ^1.7.2, because their dependency syntax is well documented. I was not able to find such documentation for Bower.

The root cause of this is that AngularJS 1.7.1 is not compatible with AngularJS Material. So we needed to come up with dependency versions that we knew would work.

I will look into whether Bower can support something like 1.4 - 1.7.0 || ^1.7.2.

@Splaktar
Copy link
Contributor

It looks like version ranges are in fact supported by Bower (from their install docs). It's not clear if they support the || operator though.

@Splaktar
Copy link
Contributor

FYI: You can always choose to stay with a specific version (or range) with Bower as it has the interactive conflict resolution in the CLI.

After some manual testing, it looks like Bower can support the 1.4 - 1.7.0 || ^1.7.2 syntax. I'll update bower.json to use that.

@Splaktar
Copy link
Contributor

Splaktar commented Jun 29, 2018

OK, this has been pushed up to bower-material. You can install from master to get this updated set of dependencies using these steps.

If you want a more stable dependency, you can use the version after the next PR gets merged which will look something like 1.1.10-master-3ef9a02. You can find the hash to use in the list of commits for bower-material. But you'll need to use one of them after this last commit ("update(bower): use the same dependency range as NPM").

The other option as mentioned above is to just use Bower's conflict resolution to tell it to use the AngularJS 1.6.x version that you need.

The updated dependencies for Bower will be part of 1.1.11 as well.

@Splaktar Splaktar added this to the 1.1.11 milestone Jun 29, 2018
@Splaktar Splaktar added type: build resolution: fixed P1: urgent Urgent issues that should be addressed in the next minor or patch release. labels Jun 29, 2018
@Splaktar Splaktar changed the title 1.1.10 requires minimum angular 1.7.2 but should work with 1.4 and higher bower: 1.1.10 requires minimum angular 1.7.2 Jun 29, 2018
@Splaktar
Copy link
Contributor

Oh one more note, if you are actually on AngularJS 1.4.x, please upgrade to at least 1.6.x ASAP. Currently we only provide a minimum level of support for AngularJS 1.4.x while fully supporting 1.5, 1.6, and recommending ^1.7.2.

For the upcoming AngularJS Material 1.2.0 release, we plan to drop support for AngularJS 1.4 and 1.5. We'll continue to support 1.6 while focusing our support on the AngularJS LTS which should match ^1.7.2.

@Splaktar
Copy link
Contributor

Splaktar commented Jun 29, 2018

1.1.10-master-3660a32 is now available with the fix to bower.json. Note that it also includes some pretty significant changes to CSS described in #11340. This includes reducing the .css by 135 KB and the .min.css by 38 KB.

@marshfire
Copy link
Author

@Splaktar Thanks for the fix. We're using angular 1.6, not 1.4 (1.4 was mentioned in the readme of bower-material). The switch to 1.7 is already planned, but still takes a while.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1: urgent Urgent issues that should be addressed in the next minor or patch release. resolution: fixed type: build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants