Commit dd654bc
authored
Coerce booleans and integers to other types
Since UCI doesn't really have types anywhere, we have to be very careful
about how we parse things. If an option has a value of `"1"`, this could
be a boolean, integer, or string; depending on the config it's a part
of. Frankly, this is an incredibly bad representation. And it feels like
the sort of thing where a language is not designed, but extended over
years without taking a step back and removing these awkward cases.
We add support for coercing the different types that we can at least
identify as possibly being something else. We almost surely are missing
some cases here. But, we'll deal with that when they arise. For now, we
at least can coerce some booleans and integers to other types.
Hopefully, this catches most of the cases.
Branch: joneshf/coerce-booleans-and-integers-to-other-types
Pull-Request: #1161 parent f671e60 commit dd654bc
2 files changed
+106
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
205 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
206 | 216 | | |
207 | 217 | | |
208 | 218 | | |
209 | 219 | | |
210 | 220 | | |
211 | 221 | | |
212 | 222 | | |
213 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
214 | 233 | | |
215 | 234 | | |
216 | 235 | | |
| |||
239 | 258 | | |
240 | 259 | | |
241 | 260 | | |
| 261 | + | |
242 | 262 | | |
243 | 263 | | |
244 | 264 | | |
| |||
253 | 273 | | |
254 | 274 | | |
255 | 275 | | |
| 276 | + | |
256 | 277 | | |
257 | 278 | | |
258 | 279 | | |
259 | 280 | | |
| 281 | + | |
260 | 282 | | |
261 | 283 | | |
262 | 284 | | |
| |||
289 | 311 | | |
290 | 312 | | |
291 | 313 | | |
292 | | - | |
| 314 | + | |
293 | 315 | | |
294 | 316 | | |
295 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
280 | 360 | | |
0 commit comments