-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ignore bower for now #896
ignore bower for now #896
Conversation
Why such move? As bower maintainer I consider endorsing Yarn as an alternative CLI, but if Yarn drops support for it, it's out of question.. How about fixing these bugs instead of removing support? |
@sheerun I agree they should be fixed. I couldn't figure out how to do it and I think the project maintainers aren't sure yet either, they weren't aware it was breaking until yesterday. This is a tourniquet to stop the bleeding so it doesn't destroy bower installs. But if someone can put a PR together to actually fix it that would be better. The idea here is "do no harm", right now someone types in "yarn" and their bower_components file gets emptied, at least every time I have done it. Since there is no documentation for bower support that I could find, I figured it might be better to roll back on that until it gets fixed. Maybe there are some configurations where it isn't happening, it seems to work at least partially for some people. I would +1 a PR that can get it working right! |
It might be a challenge to re-introduce Bower support if Yarn drops it. I think it's better to release a patch that fixes most annoying issues (like deleting I see the potential of this project, as it solves most of the issues Bower currently has (file locking, reliable installs, much better codebase). I'd be glad to work on improving Bower support, so maybe eventually Yarn could become Bower's "next major version". I'll talk with @kittens about it.. |
I was going to keep this open until there was some viable alternative, but I do agree with @sheerun about the importance of including bower support, especially if he is supporting it. So I'm going to close this, I guess a maintainer could reopen it if they really wanted to. |
Yeah, let's push forward one issue at a time. It probably makes sense to let the dust settle. We expected a ton of issues to be opened at launch, we just need to work through them. The problems will get smaller and smaller very quickly. |
so, if i understood correctly, bower projects just need keep a fair distance from yarn until it gets updated to ignore bower setups? |
Can I even instruct Yarn to skip messing with bower stuff via some command line or configuration option in the meantime? With dozens of grave open issues concerning bower support, I think it would've been a good bet to disable bower stuff by default until those issues are sorted. Now it's pretty hard to figure out how/if yarn can be used safely together with bower, or to install the npm dependencies for a project that also uses bower in any way, for that matter. |
After some inspection of the source code and such, it looks like it's definitely the best to keep my distance for now - no way to get yarn to leave bower alone. |
I think Yarn should eventually fix Bower support, but at this point it's broken and should be disabled by default until there is a fix. Having nothing is better than having a broken support which deletes my files. |
The easiest work around, if you don't have any .bowerrc files except for the one in the root of your project, appears to be to run |
Or maybe anytime packages are installed? |
Yarn does not yet jive with bower, when it does this build step will be removed: yarnpkg/yarn#896
Yarn does not yet jive with bower, when it does this build step will be removed: yarnpkg/yarn#896
Yarn does not yet jive with bower, when it does this build step will be removed: yarnpkg/yarn#896
How about allowing the two to coexist ? As a temporary solution, Why not make 'yarn' move existing 'bower_components' ( if there is one ) e.g: 'bower_components' > 'bower_components_temp_cf45f2fa62cc73f38220' and revert it back once yarn's install flow is done. Thoughts ? |
Bower support was removed in #1441 |
Summary
This PR is a possible short term patch if yarn needs to buy time to fix bower support. It's just a suggestion, and should be considered carefully before merging, if it gets merged at all. I won't be offended if it gets closed :)
This PR removes bower from the default list of registries. If the concept of this PR is acceptable, I might need some help updating tests. For now I just commented out the ones that seemed to rely on the bower code that is commented out.
Instead of deleting files I commented them out, as this is a short-term solution.
Why?
There are quite a few problems associated with bower at the moment:
package.json
andbower.json
will only installnpm
dependencies whenyarn
is invoked #898bower_components
folder, some of the dependencies of those dependencies are put inside thenode_modules
folderTest plan
bower install
yarn
bower_components
file would be emptied afteryarn
was run, with this PRbower_components
should be untouched