You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[--annotation-netrc], [--no-annotation-netrc] # Use .netrc to authenticate to private annotation sources
199
+
# Default: true
200
+
[--annotation-netrc-file=ANNOTATION_NETRC_FILE] # Path to .netrc file
201
+
[--annotation-auth=ANNOTATION_AUTH] # HTTP authorization header for private annotation sources
202
+
[--exclude-annotation=gem [gem ...]] # Excludes annotation for gem while generating RBI
195
203
-c, [--config=<config file path>] # Path to the Tapioca configuration file
196
204
# Default: sorbet/tapioca/config.yml
197
205
-V, [--verbose], [--no-verbose] # Verbose output for debugging purposes
@@ -321,67 +329,28 @@ Nothing to do, all RBIs are up-to-date.
321
329
322
330
This option can be used on CI to make sure the RBI files are always up-to-date and ensure accurate type checking. **Warning**: doing so will break your normal Dependabot workflow as every pull-request opened to bump a gem version will fail CI since the RBI will be out-of-date and will require you to manually run `bin/tapioca gems` to update them.
323
331
324
-
### Pulling RBI annotations from remote sources
325
-
326
-
Since Tapioca does not perform any type inference, the RBI files generated for the gems do not contain any type signatures. Instead, Tapioca relies on the community to provide high-quality, manually written RBI annotations for public gems.
327
-
328
-
To pull the annotations relevant to your project from the central repository, run the `annotations` command:
332
+
#### Pulling RBI annotations from remote sources
329
333
330
-
```shell
331
-
$ bin/tapioca annotations
332
-
333
-
Retrieving index from central repository... Done
334
-
Listing gems from Gemfile.lock... Done
335
-
Removing annotations for gems that have been removed... Nothing to do
336
-
Fetching gem annotations from central repository...
334
+
Since Tapioca does not perform any type inference, the RBI files generated for the gems do not contain any type signatures. Instead, Tapioca relies on the community to provide high-quality, manually written RBI annotations for public gems. These annotations are sourced and combined with the generated RBIs as a step during `tapioca gem`.
337
335
338
-
Fetched activesupport
339
-
created sorbet/rbi/annotations/activesupport.rbi
340
-
341
-
Done
342
-
```
336
+
By default, Tapioca will pull the annotations stored in the central repository located at https://github.com/Shopify/rbi-central. It is possible to use a custom repository by changing the value of the `--annotation-sources` option. For example if your repository is stored on Github:
343
337
344
-
<!-- START_HELP_COMMAND_ANNOTATIONS -->
345
338
```shell
346
-
$ tapioca help annotations
347
-
348
-
Usage:
349
-
tapioca annotations
350
-
351
-
Options:
352
-
[--sources=one two three] # URIs of the sources to pull gem RBI annotations from
[--netrc], [--no-netrc] # Use .netrc to authenticate to private sources
355
-
# Default: true
356
-
[--netrc-file=NETRC_FILE] # Path to .netrc file
357
-
[--auth=AUTH] # HTTP authorization header for private sources
358
-
--typed, -t, [--typed-overrides=gem:level [gem:level ...]] # Override for typed sigils for pulled annotations
359
-
-c, [--config=<config file path>] # Path to the Tapioca configuration file
360
-
# Default: sorbet/tapioca/config.yml
361
-
-V, [--verbose], [--no-verbose] # Verbose output for debugging purposes
362
-
363
-
Pull gem RBI annotations from remote sources
364
-
```
365
-
<!-- END_HELP_COMMAND_ANNOTATIONS -->
366
-
367
-
By default, Tapioca will pull the annotations stored in the central repository located at https://github.com/Shopify/rbi-central. It is possible to use a custom repository by changing the value of the `--sources` options. For example if your repository is stored on Github:
Private repositories can be used as sources by passing the option `--auth` with an authentication string. For Github, this string is `token $TOKEN` where `$TOKEN` is a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token):
where `$USERNAME` is your Github username and `$TOKEN` is a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), then, if you run Tapioca with the `--netrc` option (enabled by default), your annotation requests should be authenticated properly.
368
+
where `$USERNAME` is your Github username and `$TOKEN` is a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), then, if you run Tapioca with the `--annotation-netrc` option (enabled by default), your annotation requests should be authenticated properly.
400
369
401
-
The `--netrc-file` option can be specified to read from a file other than `~/.netrc`:
370
+
The `--annotation-netrc-file` option can be specified to read from a file other than `~/.netrc`:
Tapioca will first try to find the netrc file as specified by the `--netrc-file` option. If that option is not supplied, it will try the `TAPIOCA_NETRC_FILE` environment variable value. If that value is not supplied either, it will fallback to `~/.netrc`.
414
-
415
-
#### Changing the typed strictness of annotations files
416
-
417
-
Sometimes the annotations files pulled by Tapioca will create type errors in your project because of incompatibilities.
418
-
It is possible to ignore such files by switching their strictness level `--typed-overrides` option:
Tapioca will first try to find the netrc file as specified by the `--annotation-netrc-file` option. If that option is not supplied, it will try the `TAPIOCA_NETRC_FILE` environment variable value. If that value is not supplied either, it will fallback to `~/.netrc`.
0 commit comments