annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

"requires" option is not honoured from the rake task

Open pnomolos opened this issue 5 years ago • 5 comments

Any files specified in the "requires" option are only required if the annotate command is run directly.

In reading through the code, it's due to load_requires only being called in Annotate.eager_load, which is only called via the annotate binstub, as far as I can tell. It's also only used in a subset of cases - where Annotate.include_models? evaluates to true.

Version

  • annotate version - 3.0.3
  • rails version - 4.2.11.1
  • ruby version - 2.3.7p456

pnomolos avatar Jan 22 '20 07:01 pnomolos

@pnomolos can you provide more information? How are you using it?

drwl avatar Feb 01 '20 04:02 drwl

@drwl Hi! Sorry for the delay. I've been trying to use it both via the CLI as well as the integration that runs right after db:migrate. The CLI works to be able to run my custom code, but the db:migrate integration doesn't - all other things the same.

pnomolos avatar Feb 07 '20 23:02 pnomolos

@drwl Are you still looking for more information for this?

pnomolos avatar Mar 03 '20 21:03 pnomolos

@drwl Following up on this. Thank you :)

pnomolos avatar Apr 23 '20 20:04 pnomolos

@pnomolos sorry for the delay. Maintaining this gem wasn't a high priority for me after COVID started to take effect, however I'm back now. I'll try and loop back on this soon. My priority right now is getting PRs merged in.

drwl avatar May 07 '20 16:05 drwl