Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cyclic dependencies in bower config #958

Closed
kavika13 opened this issue Nov 23, 2014 · 4 comments
Closed

Cyclic dependencies in bower config #958

kavika13 opened this issue Nov 23, 2014 · 4 comments
Labels

Comments

@kavika13
Copy link

I'm new to bower and to Polymer, so apologies if this is wrong/boneheaded :)

  • Polymer/polymer depends on Polymer/core-component-page
  • Polymer/core-component-page depends on Polymer/polymer

Does this seem like a cyclic dependency, and should it be fixed?

I found this problem when trying to use http://brunch.io. I got a stack overflow (brunch/node_modules/read-components/index.js:0 RangeError: Maximum call stack size exceeded) after including Polymer.

I fixed it by breaking the dependency using the overrides feature to set core-component-page's dependencies to remove Polymer/polymer. Here's what my overrides ended up looking like after addressing all the problems I found:

"overrides": {
  "polymer": {
    "main": "polymer.html",
    "dependencies": {}
  },
  "core-component-page": { "main": "core-component-page.html" }
}
@ebidel
Copy link
Contributor

ebidel commented Nov 23, 2014

Bower fixed this a while back:bower/bower#1104. I want to say it was around 1.3. Make sure you're using the latest version of Bower.

@kavika13
Copy link
Author

I want to be clear that it isn't bower that is the problem - bower is working fine for me, as it "does the right thing" for cycles. It is fine for bower to do this, since all it is doing is downloading the packages, it isn't trying to concatenate them, etc.

Using web compiler tools that are bower enabled is the problem, when they have a build-order dependency enumerator that is vulnerable to cycles. The enumerator/compiler in http://brunch.io breaks on cyclic dependencies, for example.

There are a lot of other things the brunch.io compiler is vulnerable to, as well, such as missing "main" lists, but that's possibly a separate bug :)

See the rationale presented for the "overrides" feature - bower/bower#585 - more or less, they bowed out on enforcing strictly clean packages since some of their package maintainers were not likely to support bower unless it supported extremely lazy (unusable for build tools) package maintenance. Also see - bower/spec#27

@kavika13
Copy link
Author

Also note, I found this just now - https://www.polymer-project.org/articles/concatenating-web-components.html

It looks like if I want full build support from brunch.io I may have some extensions to write and bugs to work around :) I still think some fixes to improve the thoroughness/absolute correctness of polymer's bower manifests would help though.

@tjsavage tjsavage added the 0.5 label May 21, 2015
@tjsavage
Copy link
Contributor

Closing this issue due to age and the release of version 1 of Polymer - please feel free to re-open if this is incorrect.

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

No branches or pull requests

3 participants