bower.json bundles angular and has it as a depedency
This commit https://github.com/driftyco/ionic/commit/bfd9f083b35542a09e655a64b33d5cd130a2ba2a altered bower.json so there is only one .js file. This means that angular is now loaded into the project twice making it complain and breaking dependency resolution.
It doesn't alter anything else, just needs reverted.
Sounds like we should just remove angular as a dependency for our bower package, since we bundle a specific version in anyways?
That doesn't work as other angular modules you want to bring in will have angular as a dependency and force you to bring in another version anyway.
The dependency is already set at "angular": "1.4.3" rather than "angular": "~1.4.3" or "angular": ">=1.4", meaning you are being forceful (perhaps overly so) about which version you want used.
I don't see how the first commit would break it, since it would still be bringing in a non-versioned instance of Angular, right?
+1, had to revert to ionic 1.1 because of this
A few points for and against.
For: It's preferred to load all of Ionic as one file. Each Ionic version is tightly coupled with specific versions of Angular, and mixing versions is discouraged and unsupported. This forces that, and makes things more efficient at the same time. It may be necessary in the future to ship Ionic with a patched version of the Angular core (unlikely, but possible).
Against: Other libs and addons might require Angular too. This means Angular gets loaded twice.
I suggest we revert bfd9f083b35542a09e655a64b33d5cd130a2ba2a and maintain strict dependency settings. Any reason this is a bad idea?
A side note: We're moving away from bower in general towards NPM. Bower's still supported in v1, but v2 is all NPM.
It's preferred to load all of Ionic as one file. Each Ionic version is tightly coupled with specific versions of Angular, and mixing versions is discouraged and unsupported. This forces that, and makes things more efficient at the same time.
In that case the bundled file acts like something provided by CDN not as a bower component. As it stands currently https://github.com/driftyco/ionic/commit/bfd9f083b35542a09e655a64b33d5cd130a2ba2a will break other implementation (mine included). Because you specify a specific version, if you try and use another bower will warn you that ionic is on another and forces the developer to override. In that case your job is done and any mistakes are their own.
I'm interested in the move towards npm as I really dislike how over simplistic bower is yet npm seems intrinsically slow. npm behaves very differently in that dependencies are installed against themselves rather than with bower where they are installed into one directory and resolved into the agreed version. Not sure how that can be managed with this current situation.
Sounds like just reverting the commit is a solution for the short term. In the long term we are moving away from bower so I see no need to innovate on it
@john-banks regarding npm vs bower deps. npm@^3.0 makes the dep tree as flat as possible, and nests only in case of conflicts.
I reverted commit bfd9f083b35542a09e655a64b33d5cd130a2ba2a. Seeing as this commit was 25 days ago, I see no reason to innovate on our bower strategy that was working fine (not great, just fine). In the future we are killing off bower so let's keep it like this for now and get it right (no bundling angular) when we move fully to npm.