-
Notifications
You must be signed in to change notification settings - Fork 138
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
Combine gem
and annotations
commands
#1613
Conversation
4e3a527
to
dc399b6
Compare
The |
dc399b6
to
fcf5396
Compare
file.root = RBI::Rewriters::Merge.merge_trees( | ||
file.root, | ||
annotation, | ||
keep: RBI::Rewriters::Merge::Keep::LEFT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if that should be a CLI option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having difficulty coming up with how we communicate this option. Would the possibilities be annotation or rbi as the base?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a ticket to capture this https://github.com/Shopify/ruby-dev-exp-issues/issues/1058
b595f83
to
b2accb8
Compare
This is being put on pause while I'm away on pat leave. The current state is that this is nearing completion and had some cursory tests against a large codebase. |
Usage: gem -h/--help gem -v/--version gem command [arguments...] [options...] Examples: gem install rake gem list --local gem build package.gemspec gem push package-0.0.1.gem gem help install Further help: gem help commands list all 'gem' commands gem help examples show some examples of usage gem help gem_dependencies gem dependencies file guide gem help platforms gem platforms guide gem help <COMMAND> show help on COMMAND (e.g. 'gem help install') gem server present a web page at http://localhost:8808/ with info about installed gems Further information: https://guides.rubygems.org command to use annotation logic as base
b2accb8
to
01f3b68
Compare
Closing as this is likely very stale. |
Motivation
Closes: #1516
In an effort to simplify the UX of Tapioca, we want to combine the
annotation
andgem
commands so that RBIs for gems are generated using source annotations as the base.Implementation
This implementation deprecates the old
annotation
command, raising an error if run. The logic for that command has been altered and moved inside theAbstractGem
command to be used by the sync and generate codepaths.A few issues have spawned off of this one around how to cache annotations between requests, but for the time being the core logic from
annotation
for fetching files locally/http has been kept intact. This extra work gates our ability to get thesha
for the annotation file, so for now we won't be updating with a version of annotations, just the location they were sourced from.Along with the command options from
annotation
,--exclude-annotation [gem, ...]
and--annotations
(and subsequently--no-annotations
) have been added to control when annotations are used as a base.Tests
Moved
annotation
tests intogem
, updating for file layout, etc. Added some new tests for extra command args like--exclude-annotation