-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Rename of FactoryGirl to FactoryBot has broken my projects #1055
Comments
What is the motivation for the change? It's a huge inconvenience and... seems a bit sexist. |
The logic for the change is covered in #921 and related discussions linked from there.
The correctness or not of the change itself is not the point on this issue. This is purely about whether the knock on effect of the fact this was done via a patch version change, rather than as a major release. |
Definitely should have been a major version change (unless backwards-compatible aliases were included). But come on guys, this isn't rocket science.
It's pretty obvious that a lot of people complaining about this change are just on some anti-feminism crusade. |
Totally agree that fixing it is a 2min job. However, it's totally unexpected to run What is not rocket science for you and me may well feel like rocket science to a beginner who started programming more recently.
Agreed. |
Agreed completely. Or add aliases that issue a deprecation warning. |
Hey! Sorry for the trouble this is causing; we didn't expect it to be a breaking change. The intended behavior is that you see a deprecation warning when you run the test suite. We're investigating now. |
Thanks @Euraldius The issue is that defining factories or including in test suites uses the FactoryGirl constant so now that constant is missing, all the consuming code breaks. If you want anyone to pair with on it, feel free to email me :) |
Wanted to chime in and say I like the name change. I’ve also written a bunch on versioning and deprecations. In the future I think these might be of some use: |
@schneems thanks for the support, and those are a solid reminder. We'd tested this on a number of projects both internal and external to thoughtbot (e.g. client projects) and for each where we'd locked to We'd introduced https://github.com/thoughtbot/factory_bot/blob/master/lib/factory_girl.rb#L3 to effectively alias constants, but that doesn't seem to have been enough. In the meantime, we've yanked version 4.8.2 of both For those who've installed 4.8.2 of the gems, you can uninstall them with: gem uninstall factory_girl --version 4.8.2
gem uninstall factory_girl_rails --version 4.8.2 You may also want to lock your Gemfile to |
Note: you can use |
@joshuaclayton @Euraldius Thanks for the quick action. I've put a sample repo together for you that shows the problems I'm getting here. It has 3 commits - a boilerplate Rails app. the addition of factory_girl_rails 4.8.0 and then the change to master. ( These are different errors to the one I get in real projects, which is Thanks again for your hard work on this. Let me know if I can be of help in testing anything. |
Final note. If I remove |
@tcpj sensing sarcasm in your comment... Yes! Thank you @tastycode and 👏 ThoughtBot, especially @joshuaclayton and @Euraldius for leading the heroic efforts. 👍 |
@iHiD Thanks for your help here! I'll dig into your example repo, and see how it differs from some of the internal projects we've been running this on (without changing to factory_bot/lib/factory_girl.rb Line 3 in c716ce0
uninitialized constant issues you're able to produce.
|
It is dead simple. When the consuming code needs to be changed, it is major version change. See semver.org: "1. MAJOR version when you make incompatible API changes" Changing the namespace is an incompatible API change. |
We have yanked version 4.8.2 which broke code for people - we apologize for the issues. Version 4.9.0 is out with nothing but a deprecation warning. We will have a blog post explaining the whole change along with upgrade instructions in the near future. |
@mjankowski Thank you for dealing with this so promptly. I'm closing this. Could you lock it once I have please as I suspect the ongoing comments from people hit by this will not be particularly helpful... :) |
Blog post now up: https://robots.thoughtbot.com/factory_bot |
This is a duplicate of the same issue on factory_bot_rails but I thought it was worth duplicating so others can find it.
The text was updated successfully, but these errors were encountered: