ruby-api-stubs icon indicating copy to clipboard operation
ruby-api-stubs copied to clipboard

_top_level.rb - align with comments in Tools/sketchup.rb

Open MSP-Greg opened this issue 2 years ago • 4 comments

Used a very recent version of Tools/sketchup.rb

I noticed that add_separator_to_menu was deprecated...

MSP-Greg avatar Aug 12 '23 16:08 MSP-Greg

FYI: The stubs are generated from the C code comments using Thomas' custom YARD template (see it's repository.)

The reverse changes from Git PRs has been broken for years and does not seem to have any priority.

DanRathbun avatar Aug 14 '23 23:08 DanRathbun

@DanRathbun

FYI: The stubs are generated from the C code comments

The top-level methods I'm referring to are in a Ruby file, Tools/sketchup.rb

MSP-Greg avatar Aug 15 '23 01:08 MSP-Greg

Used a very recent version of Tools/sketchup.rb

Ah ... .okay. But very recent changes likely have not yet been pushed to the public stubs repositories. This usually will be done as part of a release cycle in which there are known API changes.

What I'm getting at is that it makes no sense to do PRs on this repository as it will all get overwritten anyway.

Also, I can see that the public API YARD docs have this method set to deprecated already. So there may be a mismatch between what is generated for the docs and what is generated for the stubs. We might consider this a bug in the stubs generation. Thomas would know best which. (Ie, if it is a bug, it may be an issue for the template repository.)

However, coders who generate their own docs, might need to make this change to their own repository.


I also do not see the point in moving the deprecated YARD tags to the top of each method comment block.

Is this done for example for ComponentDefinition#insertion_point in "ComponentDefinition.rb" ? NO The method docstring always appears to begin the YARD comment block for SketchUp documentation. The listing order of the @deprecated YARD tag can otherwise vary.

DanRathbun avatar Aug 15 '23 04:08 DanRathbun

Hm... it could be that there's a bug in the stub-generation. I'd have to investigate.

thomthom avatar Aug 15 '23 13:08 thomthom