-
Notifications
You must be signed in to change notification settings - Fork 601
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
trouble with annotate after upgrading from 2.7.5 to 3.0.2 #663
Comments
+1 Same problem here using 3.0.2 |
@gingerlime thanks for reporting. I appreciate the time and detail in the issue. There were some changes to the way model annotations were done in v3.0.0, so it's possible it's due to that. Would it be possible for you to provide an example repository for me to debug with? |
Also would you mind posting your generated |
@drwl here's the rake task... It looks like models are set to false for some strange reason
|
looks like changing it to (also wondering, why is this |
Same here, switched to |
Looks like the |
@gingerlime @kapso @bartoszkopinski @nesrual do yall think a post install message would be helpful? Or any thoughts on ways to make it easier for folks to upgrade from v2 to v3? |
@drwl can you explain why annotating models isn't true by default? At least for me, I started using the gem when it was called I can understand that now the gem branches off to other types of annotations, and doesn't want to force users into any specific choices though. Perhaps the generator can detect if there are existing annotations and set defaults accordingly? or even default to annotate everything? (removing some types of unwanted annotations is still possible). Or adding an It just feels awkward especially upgrading that it doesn't annotate my models by default. Just my 2 cents :) |
Sorry for the delay, had been on vacation and had some downtime. Now that I'm back I'm catching up on everything. @gingerlime there's not really any reason. Just happens to be a regression (?) from work done in #647. I don't have strong feelings for either approach. I'm favoring an upgrade generator as it would make this less opinionated and seems to be a simple path forward. Happy to take any PRs though for other approaches. |
Ohh, I thought it was a bug but it was just a feature. I actually agree with gingerlime, it's really weird the gem's defaults are set to "do not annotate", when most people use the gem specifically to annotate their models and routes. Maybe continue with this same approach but set the default to 'true' instead of 'false'? |
Have been running into the same issue (silently as annotate updated itself to 3.0.2 after a I did a new |
@TedTran2019 @MicMicMon I cut 3.0.3 and pushed it to Rubygems. It includes #671 so any new |
Thanks @drwl. That's definitely better. I still wonder about the upgrade process though, because when I just upgrade the gem, then running annotate simply fails silently. It only works again after running |
@gingerlime yeah that makes sense. I'll add a note to the README for now. I'll tag you in the proposed changes if that's alright with you. |
Sure. 👍 Thank you @drwl ! |
Weird, my generated version of 'models' => 'true' So I suspect this version update broke the builds of many projects silently who expected their migrations to still be annotated. |
@KelseyDH yes you're right — this was a regression from previous work done. I'll have some time in next week or so during (American) holidays to add it. I was hoping someone would have been able to take it on in the mean time. |
I'm trying to upgrade from 2.7.5 to 3.0.2 but somehow it looks like annotate fails silently and doesn't work any more...
A couple of things:
bundle exec annotate
to make sure no model annotations are missing. This now fails. Perhaps annotate no longer outputs "Model files unchanged" when there are no changes? I'm not surerake db:migrate
, but it doesn't automatically add annotations (no errors, I did add the rake task usingrails g annotate:install
).bundle exec annotate
after the migration was run (I can seeschema.rb
updated), doesn't update the annotations... It just doesn't seem to do anything... No errors or exit code other than 0 either.Commands
Version
The text was updated successfully, but these errors were encountered: