Commit b572aba
Say where the gem list comes from when
Ask a coding agent to set up RBS and Steep in a project and it usually
writes a Steepfile that lists every dependency with `library`, one gem per
line. `rbs collection` exists so that nobody has to maintain that list: it
reads `Gemfile.lock`, and `rbs` and Steep load the installed RBS files on
their own. Agents rarely find it, and the tools we ship are part of why.
`rbs collection init` printed one line, `created: rbs_collection.yaml`. It
named neither the next command nor the fact that would stop someone from
enumerating gems. The generated `rbs_collection.yaml` had the same gap: its
comments explained `sources`, `path` and `gems[].ignore` -- the knobs --
but never said the gem list is read from `Gemfile.lock`. The file is read
right after it is written, so it is a good place to say so.
- `init` now prints what the command does, that gems in `Gemfile.lock` need
no listing anywhere, and the next steps: `.gitignore` and
`rbs collection install`. `rbs_collection.lock.yaml` is what pins the RBS
revisions -- the source is `revision: main` -- so the output says to keep
it in version control.
- The generated config opens with the same two facts.
- Its commented-out `gems:` example showed only `ignore: true`. The other
half -- adding an entry for a library that `Gemfile.lock` doesn't carry --
was documented only in `docs/collection.md`. `socket` is the example: it
is a non-gem standard library (`NONGEM_STDLIBS`), unlike `pathname`, whose
types moved to `core/pathname.rbs` in 8066053, and unlike `csv`, which is
in `ALUMNI_STDLIBS` and warns when installed.
- `docs/collection.md` gets a quickstart, so readers who see only the first
screen get the two commands. Its `cat rbs_collection.yaml` had drifted
from the generated file (no `type: git`, no local source comment) and now
matches it byte for byte. The `.gitignore` paragraph right below the
`init` output is gone, since that output now says it.
Ref: #3093
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXtMkmp27LieHgSjNyEWZ8rbs collection init runs1 parent 584b4cf commit b572aba
3 files changed
Lines changed: 73 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
5 | 16 | | |
6 | 17 | | |
7 | 18 | | |
| |||
17 | 28 | | |
18 | 29 | | |
19 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
20 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
21 | 42 | | |
22 | 43 | | |
23 | | - | |
| 44 | + | |
| 45 | + | |
24 | 46 | | |
25 | 47 | | |
26 | 48 | | |
27 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
28 | 54 | | |
29 | 55 | | |
30 | 56 | | |
31 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
32 | 61 | | |
33 | 62 | | |
34 | 63 | | |
35 | 64 | | |
36 | 65 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 66 | | |
44 | 67 | | |
45 | 68 | | |
46 | | - | |
47 | 69 | | |
48 | 70 | | |
49 | 71 | | |
| |||
86 | 108 | | |
87 | 109 | | |
88 | 110 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
92 | 114 | | |
93 | 115 | | |
94 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
1107 | 1110 | | |
1108 | 1111 | | |
1109 | 1112 | | |
| |||
1120 | 1123 | | |
1121 | 1124 | | |
1122 | 1125 | | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1123 | 1129 | | |
1124 | 1130 | | |
1125 | 1131 | | |
1126 | 1132 | | |
1127 | | - | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1128 | 1143 | | |
1129 | 1144 | | |
1130 | 1145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1085 | 1109 | | |
1086 | 1110 | | |
1087 | 1111 | | |
| |||
0 commit comments