@@ -85,102 +85,33 @@ lib.new.foo = +18
85
85
thingy = lib.old.foo + 10
86
86
```
87
87
88
- ``` ucm :added-by-ucm
89
- Loading changes detected in scratch.u.
90
-
91
- + lib.new.foo : Int
92
- + lib.old.foo : Nat
93
- + thingy : Nat
94
-
95
- Run `update` to apply these changes to your codebase.
96
- ```
97
-
98
88
``` ucm
99
- proj/main> add
100
-
101
- Okay, I'm searching the branch for code that needs to be
102
- updated...
103
-
104
- Done.
89
+ proj/main> update
105
90
```
106
91
107
92
``` ucm :error
108
93
proj/main> upgrade old new
109
-
110
- I couldn't automatically upgrade old to new. However, I've
111
- added the definitions that need attention to the top of
112
- scratch.u.
113
-
114
- When you're done, you can run
115
-
116
- upgrade.commit
117
-
118
- to merge your changes back into main and delete the temporary
119
- branch. Or, if you decide to cancel the upgrade instead, you
120
- can run
121
-
122
- delete.branch /upgrade-old-to-new
123
-
124
- to delete the temporary branch and switch back to main.
125
- ```
126
-
127
- ``` unison :added-by-ucm scratch.u
128
- -- The definitions below no longer typecheck after upgrading.
129
- -- Please fix the errors, then run `update`.
130
-
131
- thingy : Nat
132
- thingy =
133
- use Nat +
134
- foo + 10
135
-
136
94
```
137
95
138
- Resolve the error and commit the upgrade.
96
+ Resolve the error and run ` update ` to finish the upgrade.
139
97
140
98
``` unison
141
99
thingy = foo + +10
142
100
```
143
101
144
- ``` ucm :added-by-ucm
145
- Loading changes detected in scratch.u.
146
-
147
- ~ thingy : Int
148
-
149
- ~ (modified)
150
-
151
- Run `update` to apply these changes to your codebase.
152
- ```
153
-
154
102
``` ucm
155
103
proj/upgrade-old-to-new> update
156
-
157
- Okay, I'm searching the branch for code that needs to be
158
- updated...
159
-
160
- Done.
161
-
162
- proj/upgrade-old-to-new> upgrade.commit
163
-
164
- I fast-forward merged proj/upgrade-old-to-new into proj/main.
165
-
166
104
proj/main> view thingy
167
-
168
- thingy : Int
169
- thingy =
170
- use Int +
171
- foo + +10
172
-
173
105
proj/main> ls lib
174
-
175
- 1. builtin. (664 terms, 103 types)
176
- 2. new. (1 term)
177
-
178
106
proj/main> branches
107
+ ```
179
108
180
- Branch Remote branch
181
- 1. main
109
+ ``` ucm :hide
110
+ proj/main> project.delete proj
182
111
```
183
112
113
+ # Upgrade sad path (showing delete on upgrade branch)
114
+
184
115
``` ucm :hide
185
116
proj/main> builtins.merge lib.builtin
186
117
```
@@ -191,103 +122,19 @@ lib.new.foo = +18
191
122
thingy = lib.old.foo + 10
192
123
```
193
124
194
- ``` ucm :added-by-ucm
195
- Loading changes detected in scratch.u.
196
-
197
- + lib.old.foo : Nat
198
- ~ thingy : Nat
199
-
200
- (and 1 unchanged term)
201
-
202
- + (added), ~ (modified)
203
-
204
- Run `update` to apply these changes to your codebase.
205
- ```
206
-
207
125
``` ucm
208
- proj/main> add
209
-
210
- Okay, I'm searching the branch for code that needs to be
211
- updated...
212
-
213
- Done.
126
+ proj/main> update
214
127
```
215
128
216
129
``` ucm :error
217
130
proj/main> upgrade old new
218
-
219
- I couldn't automatically upgrade old to new. However, I've
220
- added the definitions that need attention to the top of
221
- scratch.u.
222
-
223
- When you're done, you can run
224
-
225
- upgrade.commit
226
-
227
- to merge your changes back into main and delete the temporary
228
- branch. Or, if you decide to cancel the upgrade instead, you
229
- can run
230
-
231
- delete.branch /upgrade-old-to-new
232
-
233
- to delete the temporary branch and switch back to main.
234
- ```
235
-
236
- ``` unison :added-by-ucm scratch.u
237
- -- The definitions below no longer typecheck after upgrading.
238
- -- Please fix the errors, then run `update`.
239
-
240
- thingy : Nat
241
- thingy =
242
- use Nat +
243
- foo + 10
244
-
245
- ```
246
-
247
- Resolve the error and commit the upgrade.
248
-
249
- ``` unison
250
- thingy = foo + +10
251
- ```
252
-
253
- ``` ucm :added-by-ucm
254
- Loading changes detected in scratch.u.
255
-
256
- ~ thingy : Int
257
-
258
- ~ (modified)
259
-
260
- Run `update` to apply these changes to your codebase.
261
131
```
262
132
263
133
``` ucm
264
134
proj/upgrade-old-to-new> update
265
-
266
- Okay, I'm searching the branch for code that needs to be
267
- updated...
268
-
269
- Done.
270
-
271
- proj/upgrade-old-to-new> upgrade.commit
272
-
273
- I fast-forward merged proj/upgrade-old-to-new into proj/main.
274
-
275
- proj/main> view thingy
276
-
277
- thingy : Int
278
- thingy =
279
- use Int +
280
- foo + +10
281
-
282
135
proj/main> ls lib
283
-
284
- 1. builtin. (664 terms, 103 types)
285
- 2. new. (1 term)
286
-
136
+ proj/main> ls .
287
137
proj/main> branches
288
-
289
- Branch Remote branch
290
- 1. main
291
138
```
292
139
293
140
``` ucm :hide
0 commit comments