Repository navigation
Conversation
Why:
bsc's flags set global compiler state as they were parsed, so the only
way to describe a compile was a list of strings. Compile_request is that
description as a record: of_argv reads the flags into it, to_argv
writes them back, and apply sets the request's state from it. bsc's
command line and a file's @@config flags go through it now; the build
system can build the record directly in a next step (#9303).
Each flag has a kind: Build_system, Public, Debug or Command. The
record holds what the flags gave, so @@config is applied on top of the
command line as before. A round-trip test reads every flag back from
to_argv.
Diagnostic added (invalid flag values):
Example:
bsc -color red -enable-experimental Unknown A.res
Before (diagnostic):
(the values were ignored)
After (diagnostic):
Unsupported color setting: red
Other differences, all on bsc's command line: commands such as -format
and -e run after every flag is read, not at their position; the namespace
of -bs-ns is opened before the -open modules, as the build system passes
it anyway; an invalid @@config flag applies none of the file's flags.
Part of #9303
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gHAzsdStoCEpBgx2tS
Signed-off-by: Christoph Knittel <ck@cca.io>
Changelog🏠 Internal
Semantic Diff1 commit · Full page Read bsc's flags into a typed compile request6e04d8a · cknitt + Claude · Nov 14, 2026, 10:11 UTC
Diagnostic added (invalid flag values) bsc -color red -enable-experimental Unknown A.res
-(the values were ignored)
+Unsupported color setting: redOther differences, all on bsc's command line: commands such as -format and -e run after every flag is read, not at their position; the namespace of -bs-ns is opened before the -open modules, as the build system passes it anyway; an invalid Part of #9303 |
|
| Benchmark | Base | Head | Change |
|---|---|---|---|
packages/@rescript/runtime/Primitive_float_extern.res |
93,329 | 96,582 | +3.49% |
packages/@rescript/runtime/Stdlib_Blob.res |
93,493 | 96,746 | +3.48% |
packages/@rescript/runtime/Primitive_list.resi |
91,618 | 94,788 | +3.46% |
packages/@rescript/runtime/Stdlib_File.res |
95,287 | 98,540 | +3.41% |
packages/@rescript/runtime/Primitive_promise.res |
96,696 | 99,949 | +3.36% |
packages/@rescript/runtime/Stdlib_Iterable.res |
98,555 | 101,842 | +3.34% |
packages/@rescript/runtime/Primitive_int_extern.res |
97,546 | 100,799 | +3.33% |
packages/@rescript/runtime/Stdlib_AsyncIterable.res |
98,626 | 101,913 | +3.33% |
packages/@rescript/runtime/Primitive_string_extern.res |
97,864 | 101,117 | +3.32% |
packages/@rescript/runtime/Obj.res |
98,786 | 102,039 | +3.29% |
226 more changes
| Benchmark | Base | Head | Change |
|---|---|---|---|
packages/@rescript/runtime/Stdlib_Iterable.resi |
97,865 | 101,035 | +3.24% |
packages/@rescript/runtime/Stdlib_AsyncIterable.resi |
98,012 | 101,182 | +3.23% |
packages/@rescript/runtime/Primitive_dict.res |
102,332 | 105,585 | +3.18% |
packages/@rescript/runtime/Primitive_exceptions.resi |
100,023 | 103,193 | +3.17% |
packages/@rescript/runtime/RescriptTools.res |
104,127 | 107,380 | +3.12% |
packages/@rescript/runtime/Primitive_hash.resi |
102,460 | 105,630 | +3.09% |
packages/@rescript/runtime/Primitive_module.resi |
102,889 | 106,059 | +3.08% |
packages/@rescript/runtime/Stdlib_ArrayBuffer.res |
107,067 | 110,354 | +3.07% |
packages/@rescript/runtime/Stdlib_TaggedTemplate.resi |
105,844 | 109,014 | +2.99% |
packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res |
111,761 | 115,014 | +2.91% |
packages/@rescript/runtime/Stdlib_ArrayBuffer.resi |
110,787 | 113,957 | +2.86% |
packages/@rescript/runtime/Stdlib_TaggedTemplate.res |
115,020 | 118,307 | +2.86% |
packages/@rescript/runtime/Primitive_array_extern.res |
113,864 | 117,117 | +2.86% |
packages/@rescript/runtime/Primitive_object_extern.res |
114,249 | 117,502 | +2.85% |
packages/@rescript/runtime/Stdlib_Lazy.resi |
112,112 | 115,282 | +2.83% |
packages/@rescript/runtime/Stdlib_Intl_Segments.res |
116,128 | 119,381 | +2.80% |
packages/@rescript/runtime/Stdlib_Bool.resi |
116,439 | 119,609 | +2.72% |
packages/@rescript/runtime/Dom_storage2.res |
119,500 | 122,753 | +2.72% |
packages/@rescript/runtime/Primitive_object.resi |
116,785 | 119,955 | +2.71% |
packages/@rescript/runtime/Jsx.res |
121,263 | 124,516 | +2.68% |
packages/@rescript/runtime/Stdlib_WeakSet.res |
122,602 | 125,855 | +2.65% |
packages/@rescript/runtime/Primitive_option.resi |
121,949 | 125,119 | +2.60% |
packages/@rescript/runtime/Stdlib_JsExn.resi |
122,411 | 125,581 | +2.59% |
packages/@rescript/runtime/Stdlib_WeakMap.res |
134,943 | 138,196 | +2.41% |
packages/@rescript/runtime/Stdlib_Type.resi |
135,558 | 138,728 | +2.34% |
packages/@rescript/runtime/Stdlib_Global.res |
141,333 | 144,620 | +2.33% |
packages/@rescript/runtime/Stdlib_Symbol.res |
144,093 | 147,380 | +2.28% |
packages/@rescript/runtime/Stdlib_Temporal_Now.res |
142,914 | 146,167 | +2.28% |
packages/@rescript/runtime/Stdlib_Bool.res |
146,054 | 149,341 | +2.25% |
packages/@rescript/runtime/Primitive_bool.res |
147,350 | 150,603 | +2.21% |
packages/@rescript/runtime/Primitive_float.res |
147,391 | 150,644 | +2.21% |
packages/@rescript/runtime/Stdlib_Ordering.res |
152,140 | 155,393 | +2.14% |
packages/@rescript/runtime/Stdlib_IterableIterator.resi |
149,136 | 152,306 | +2.13% |
packages/@rescript/runtime/Stdlib_Intl_Segmenter.res |
153,928 | 157,181 | +2.11% |
packages/@rescript/runtime/Stdlib_Intl_Common.res |
153,945 | 157,198 | +2.11% |
packages/@rescript/runtime/Stdlib_Global.resi |
155,748 | 158,918 | +2.04% |
packages/@rescript/runtime/Stdlib_Intl_NumberFormat_Grouping.res |
159,846 | 163,099 | +2.04% |
packages/@rescript/runtime/Primitive_string.res |
160,147 | 163,400 | +2.03% |
packages/@rescript/runtime/Stdlib_RegExp.res |
162,824 | 166,111 | +2.02% |
packages/@rescript/runtime/Stdlib_Iterator.resi |
159,015 | 162,185 | +1.99% |
packages/@rescript/runtime/Stdlib_AsyncIterableIterator.resi |
159,538 | 162,708 | +1.99% |
packages/@rescript/runtime/Stdlib_Symbol.resi |
159,856 | 163,026 | +1.98% |
packages/@rescript/runtime/Stdlib_Generator.resi |
160,185 | 163,355 | +1.98% |
packages/@rescript/runtime/Stdlib_Pair.res |
165,640 | 168,893 | +1.96% |
packages/@rescript/runtime/Dom_storage.res |
166,901 | 170,154 | +1.95% |
packages/@rescript/runtime/Stdlib_Intl_ListFormat.res |
169,182 | 172,435 | +1.92% |
packages/@rescript/runtime/Stdlib_AsyncGenerator.resi |
165,537 | 168,707 | +1.91% |
packages/@rescript/runtime/Stdlib_JsExn.res |
173,265 | 176,552 | +1.90% |
packages/@rescript/runtime/Primitive_int.res |
172,514 | 175,767 | +1.89% |
packages/@rescript/runtime/Stdlib_Intl.res |
173,941 | 177,194 | +1.87% |
packages/@rescript/belt/src/Belt_Int.resi |
149,374 | 152,156 | +1.86% |
packages/@rescript/belt/src/Belt_Float.resi |
150,850 | 153,632 | +1.84% |
packages/@rescript/runtime/Stdlib_IterableIterator.res |
178,852 | 182,139 | +1.84% |
packages/@rescript/runtime/Primitive_bigint.res |
177,966 | 181,219 | +1.83% |
packages/@rescript/runtime/Stdlib_Intl_Collator.res |
178,061 | 181,314 | +1.83% |
packages/@rescript/runtime/Stdlib_Intl_RelativeTimeFormat.res |
179,823 | 183,076 | +1.81% |
packages/@rescript/runtime/Stdlib_AsyncIterator.resi |
177,553 | 180,723 | +1.79% |
packages/@rescript/belt/src/Belt_Float.res |
164,761 | 167,660 | +1.76% |
packages/@rescript/belt/src/Belt_Int.res |
165,430 | 168,329 | +1.75% |
packages/@rescript/runtime/Stdlib_JsError.resi |
185,017 | 188,187 | +1.71% |
packages/@rescript/runtime/Stdlib_BigInt.resi |
186,319 | 189,489 | +1.70% |
packages/@rescript/belt/src/Belt_internalBucketsType.resi |
164,500 | 167,282 | +1.69% |
packages/@rescript/runtime/Stdlib_RegExp.resi |
188,008 | 191,178 | +1.69% |
packages/@rescript/runtime/Primitive_array.res |
193,451 | 196,704 | +1.68% |
packages/@rescript/runtime/Stdlib_Intl_Locale.res |
197,104 | 200,357 | +1.65% |
packages/@rescript/belt/src/Belt_MutableStack.resi |
168,943 | 171,725 | +1.65% |
packages/@rescript/belt/src/Belt_SortArrayString.resi |
169,264 | 172,046 | +1.64% |
packages/@rescript/belt/src/Belt_SortArrayInt.resi |
169,382 | 172,164 | +1.64% |
packages/@rescript/runtime/Stdlib_Generator.res |
200,658 | 203,945 | +1.64% |
packages/@rescript/runtime/Stdlib_Type.res |
201,446 | 204,733 | +1.63% |
packages/@rescript/runtime/Stdlib_Float.resi |
194,410 | 197,580 | +1.63% |
packages/@rescript/runtime/Primitive_exceptions.res |
201,869 | 205,156 | +1.63% |
packages/@rescript/runtime/Stdlib_Intl_PluralRules.res |
201,187 | 204,440 | +1.62% |
packages/@rescript/runtime/Primitive_list.res |
205,182 | 208,469 | +1.60% |
packages/@rescript/runtime/Stdlib_Map.res |
205,392 | 208,679 | +1.60% |
packages/@rescript/runtime/Stdlib_BigInt.res |
206,835 | 210,122 | +1.59% |
packages/@rescript/belt/src/Belt_HashSetString.resi |
175,186 | 177,968 | +1.59% |
packages/@rescript/runtime/Stdlib_Nullable.resi |
199,645 | 202,815 | +1.59% |
packages/@rescript/belt/src/Belt_HashSetInt.resi |
175,299 | 178,081 | +1.59% |
packages/@rescript/belt/src/Belt_Range.resi |
176,345 | 179,127 | +1.58% |
packages/@rescript/runtime/Stdlib_Set.res |
210,623 | 213,910 | +1.56% |
packages/@rescript/runtime/Stdlib_AsyncGenerator.res |
211,504 | 214,791 | +1.55% |
packages/@rescript/runtime/Stdlib_Null.resi |
204,329 | 207,499 | +1.55% |
packages/@rescript/runtime/Stdlib_Int.resi |
205,684 | 208,854 | +1.54% |
packages/@rescript/belt/src/Belt.res |
188,177 | 191,042 | +1.52% |
packages/@rescript/runtime/Stdlib_Float.res |
218,563 | 221,850 | +1.50% |
packages/@rescript/runtime/Stdlib_Lazy.res |
222,162 | 225,449 | +1.48% |
packages/@rescript/runtime/Stdlib_Map.resi |
217,646 | 220,816 | +1.46% |
packages/@rescript/runtime/Stdlib_Temporal.res |
223,954 | 227,207 | +1.45% |
packages/@rescript/runtime/Stdlib_AsyncIterableIterator.res |
228,980 | 232,267 | +1.44% |
packages/@rescript/belt/src/Belt_internalSetBuckets.resi |
194,058 | 196,840 | +1.43% |
packages/@rescript/runtime/Stdlib_JsError.res |
230,039 | 233,326 | +1.43% |
packages/@rescript/runtime/Stdlib_DataView.res |
230,065 | 233,352 | +1.43% |
packages/@rescript/runtime/Stdlib_Iterator.res |
235,191 | 238,478 | +1.40% |
packages/@rescript/runtime/Stdlib_Set.resi |
229,602 | 232,772 | +1.38% |
packages/@rescript/runtime/Pervasives.res |
238,946 | 242,199 | +1.36% |
packages/@rescript/runtime/Primitive_js_extern.res |
239,405 | 242,658 | +1.36% |
packages/@rescript/runtime/Stdlib_IteratorObject.resi |
235,063 | 238,233 | +1.35% |
packages/@rescript/belt/src/Belt_MutableQueue.resi |
206,951 | 209,733 | +1.34% |
packages/@rescript/runtime/Stdlib_Option.resi |
236,082 | 239,252 | +1.34% |
packages/@rescript/runtime/Stdlib_JSON.resi |
236,632 | 239,802 | +1.34% |
packages/@rescript/runtime/Stdlib_Object.res |
244,958 | 248,211 | +1.33% |
packages/@rescript/runtime/Stdlib_Dict.resi |
241,025 | 244,195 | +1.32% |
packages/@rescript/runtime/Stdlib_IteratorObject.res |
250,980 | 254,267 | +1.31% |
packages/@rescript/belt/src/Belt_HashMapString.resi |
213,323 | 216,105 | +1.30% |
packages/@rescript/belt/src/Belt_HashMapInt.resi |
213,438 | 216,220 | +1.30% |
packages/@rescript/belt/src/Belt_HashSet.resi |
222,411 | 225,193 | +1.25% |
packages/@rescript/belt/src/Belt_internalBuckets.resi |
222,871 | 225,653 | +1.25% |
packages/@rescript/runtime/Stdlib_Temporal_PlainMonthDay.res |
268,042 | 271,295 | +1.21% |
packages/@rescript/runtime/Stdlib_DataView.resi |
269,452 | 272,622 | +1.18% |
packages/@rescript/runtime/RescriptTools_Docgen.resi |
273,198 | 276,368 | +1.16% |
packages/@rescript/belt/src/Belt_Result.resi |
239,817 | 242,599 | +1.16% |
packages/@rescript/runtime/RescriptTools_Docgen.res |
283,381 | 286,668 | +1.16% |
packages/@rescript/belt/src/Belt_Option.resi |
242,987 | 245,769 | +1.14% |
packages/@rescript/runtime/Stdlib_AsyncIterator.res |
295,783 | 299,070 | +1.11% |
packages/@rescript/runtime/Stdlib_JSON.res |
297,562 | 300,849 | +1.10% |
packages/@rescript/runtime/Primitive_option.res |
299,113 | 302,400 | +1.10% |
packages/@rescript/belt/src/Belt_SortArray.resi |
253,602 | 256,384 | +1.10% |
build/Namespace/clean |
188,725,016 | 186,659,595 | -1.09% |
packages/@rescript/belt/src/Belt_SetString.resi |
259,460 | 262,242 | +1.07% |
packages/@rescript/belt/src/Belt_SetInt.resi |
259,587 | 262,369 | +1.07% |
packages/@rescript/runtime/Stdlib_Result.resi |
295,970 | 299,140 | +1.07% |
packages/@rescript/belt/src/Belt_Id.resi |
259,765 | 262,547 | +1.07% |
packages/@rescript/runtime/Stdlib_Temporal_Instant.res |
307,218 | 310,471 | +1.06% |
packages/@rescript/belt/src/Belt_MutableSetString.resi |
264,520 | 267,302 | +1.05% |
packages/@rescript/belt/src/Belt_MutableSetInt.resi |
264,637 | 267,419 | +1.05% |
packages/@rescript/runtime/Stdlib_Dict.res |
319,618 | 322,905 | +1.03% |
packages/@rescript/runtime/Stdlib_Temporal_PlainTime.res |
319,810 | 323,063 | +1.02% |
packages/@rescript/runtime/Stdlib_Math.res |
326,844 | 330,131 | +1.01% |
packages/@rescript/belt/src/Belt_Id.res |
289,988 | 292,887 | +1.00% |
packages/@rescript/belt/src/Belt_Range.res |
290,830 | 293,729 | +1.00% |
packages/@rescript/belt/src/Belt_internalBucketsType.res |
292,515 | 295,414 | +0.99% |
packages/@rescript/runtime/Stdlib_Nullable.res |
331,850 | 335,137 | +0.99% |
packages/@rescript/runtime/Stdlib_Null.res |
334,315 | 337,602 | +0.98% |
packages/@rescript/runtime/Primitive_module.res |
340,357 | 343,644 | +0.97% |
packages/@rescript/runtime/Stdlib_Math.resi |
330,668 | 333,838 | +0.96% |
packages/@rescript/runtime/Stdlib_Int8Array.res |
343,007 | 346,260 | +0.95% |
packages/@rescript/runtime/Stdlib_Uint8Array.res |
343,022 | 346,275 | +0.95% |
packages/@rescript/runtime/Stdlib_Float32Array.res |
343,125 | 346,378 | +0.95% |
packages/@rescript/runtime/Stdlib_Float64Array.res |
343,125 | 346,378 | +0.95% |
packages/@rescript/runtime/Stdlib_Int16Array.res |
343,154 | 346,407 | +0.95% |
packages/@rescript/runtime/Stdlib_Int32Array.res |
343,156 | 346,409 | +0.95% |
packages/@rescript/runtime/Stdlib_Uint16Array.res |
343,161 | 346,414 | +0.95% |
packages/@rescript/runtime/Stdlib_Uint32Array.res |
343,161 | 346,414 | +0.95% |
packages/@rescript/runtime/Stdlib_BigInt64Array.res |
343,187 | 346,440 | +0.95% |
packages/@rescript/runtime/Stdlib_BigUint64Array.res |
343,261 | 346,514 | +0.95% |
packages/@rescript/runtime/Stdlib_Uint8ClampedArray.res |
343,537 | 346,790 | +0.95% |
packages/@rescript/belt/src/Belt_HashMap.resi |
296,518 | 299,300 | +0.94% |
packages/@rescript/runtime/Stdlib_Promise.res |
351,730 | 355,017 | +0.93% |
packages/@rescript/runtime/Stdlib_Console.res |
369,774 | 373,061 | +0.89% |
packages/@rescript/runtime/Stdlib_Temporal_Common.res |
365,984 | 369,237 | +0.89% |
packages/@rescript/runtime/Stdlib_Promise.resi |
357,183 | 360,353 | +0.89% |
packages/@rescript/belt/src/Belt_MutableMapString.resi |
314,517 | 317,299 | +0.88% |
packages/@rescript/belt/src/Belt_MutableMapInt.resi |
314,635 | 317,417 | +0.88% |
packages/@rescript/runtime/Stdlib_Temporal_Duration.res |
372,680 | 375,933 | +0.87% |
packages/@rescript/runtime/Stdlib_Temporal_PlainYearMonth.res |
381,518 | 384,771 | +0.85% |
packages/@rescript/runtime/Stdlib_Intl_DateTimeFormat.res |
388,733 | 391,986 | +0.84% |
packages/@rescript/runtime/Stdlib_Temporal_PlainDate.res |
402,875 | 406,128 | +0.81% |
packages/@rescript/runtime/Stdlib_Intl_NumberFormat.res |
403,726 | 406,979 | +0.81% |
packages/@rescript/belt/src/Belt_internalAVLset.resi |
354,498 | 357,280 | +0.78% |
packages/@rescript/runtime/Stdlib_List.resi |
409,316 | 412,486 | +0.77% |
packages/@rescript/runtime/Stdlib_Console.resi |
414,802 | 417,972 | +0.76% |
packages/@rescript/runtime/Stdlib_Temporal_PlainDateTime.res |
436,952 | 440,205 | +0.74% |
packages/@rescript/belt/src/Belt_MutableStack.res |
390,358 | 393,257 | +0.74% |
packages/@rescript/belt/src/Belt_Option.res |
391,673 | 394,572 | +0.74% |
packages/@rescript/runtime/Stdlib_Int.res |
457,244 | 460,531 | +0.72% |
packages/@rescript/belt/src/Belt_MapString.resi |
390,789 | 393,571 | +0.71% |
packages/@rescript/belt/src/Belt_MapInt.resi |
390,832 | 393,614 | +0.71% |
packages/@rescript/belt/src/Belt_MutableMap.resi |
394,963 | 397,745 | +0.70% |
packages/@rescript/belt/src/Belt_Result.res |
411,989 | 414,888 | +0.70% |
packages/@rescript/belt/src/Belt_MutableSet.resi |
397,070 | 399,852 | +0.70% |
packages/@rescript/belt/src/Belt_SetDict.resi |
402,438 | 405,220 | +0.69% |
packages/@rescript/runtime/Stdlib_String.res |
504,429 | 507,716 | +0.65% |
packages/@rescript/belt/src/Belt_Set.resi |
436,960 | 439,742 | +0.64% |
packages/@rescript/runtime/Stdlib_String.resi |
500,056 | 503,226 | +0.63% |
packages/@rescript/belt/src/Belt_internalAVLtree.resi |
452,025 | 454,807 | +0.62% |
packages/@rescript/runtime/Stdlib_Date.res |
551,393 | 554,680 | +0.60% |
packages/@rescript/runtime/Stdlib_Temporal_ZonedDateTime.res |
572,213 | 575,466 | +0.57% |
packages/@rescript/belt/src/Belt_MapDict.resi |
513,036 | 515,818 | +0.54% |
packages/@rescript/runtime/Stdlib_Date.resi |
618,515 | 621,685 | +0.51% |
packages/@rescript/belt/src/Belt_Map.resi |
578,955 | 581,737 | +0.48% |
packages/@rescript/runtime/Stdlib_Array.resi |
731,799 | 734,969 | +0.43% |
packages/@rescript/runtime/Stdlib_Option.res |
762,298 | 765,583 | +0.43% |
packages/@rescript/belt/src/Belt_Array.resi |
649,780 | 652,562 | +0.43% |
packages/@rescript/runtime/Stdlib_TypedArray.res |
782,668 | 785,921 | +0.42% |
packages/@rescript/belt/src/Belt_internalSetBuckets.res |
705,944 | 708,852 | +0.41% |
packages/@rescript/belt/src/Belt_internalSetInt.res |
740,601 | 743,466 | +0.39% |
packages/@rescript/belt/src/Belt_internalSetString.res |
741,792 | 744,657 | +0.39% |
packages/@rescript/belt/src/Belt_List.resi |
758,037 | 760,819 | +0.37% |
packages/@rescript/belt/src/Belt_MutableQueue.res |
799,705 | 802,604 | +0.36% |
packages/@rescript/runtime/Primitive_hash.res |
976,384 | 979,669 | +0.34% |
packages/@rescript/belt/src/Belt_HashSetInt.res |
862,510 | 865,411 | +0.34% |
packages/@rescript/belt/src/Belt_HashSetString.res |
862,829 | 865,728 | +0.34% |
packages/@rescript/belt/src/Belt_Set.res |
869,516 | 872,415 | +0.33% |
packages/@rescript/runtime/Stdlib.res |
982,387 | 985,640 | +0.33% |
packages/@rescript/runtime/Dom.res |
1,068,580 | 1,071,837 | +0.30% |
packages/@rescript/belt/src/Belt_internalBuckets.res |
977,537 | 980,434 | +0.30% |
packages/@rescript/runtime/JsxEvent.res |
1,088,126 | 1,091,325 | +0.29% |
packages/@rescript/belt/src/Belt_Map.res |
993,336 | 996,237 | +0.29% |
packages/@rescript/belt/src/Belt_HashSet.res |
991,667 | 994,559 | +0.29% |
packages/@rescript/runtime/Primitive_object.res |
1,171,634 | 1,174,917 | +0.28% |
packages/@rescript/belt/src/Belt_HashMapInt.res |
1,076,526 | 1,079,423 | +0.27% |
packages/@rescript/belt/src/Belt_HashMapString.res |
1,077,238 | 1,080,135 | +0.27% |
packages/@rescript/runtime/Stdlib_Result.res |
1,279,829 | 1,283,116 | +0.26% |
packages/@rescript/runtime/Stdlib_Array.res |
1,293,092 | 1,296,379 | +0.25% |
packages/@rescript/belt/src/Belt_MutableMapInt.res |
1,170,097 | 1,172,996 | +0.25% |
packages/@rescript/belt/src/Belt_MutableMapString.res |
1,170,378 | 1,173,273 | +0.25% |
packages/@rescript/belt/src/Belt_MapInt.res |
1,196,915 | 1,199,814 | +0.24% |
packages/@rescript/belt/src/Belt_MapString.res |
1,197,451 | 1,200,350 | +0.24% |
packages/@rescript/belt/src/Belt_HashMap.res |
1,217,499 | 1,220,276 | +0.23% |
packages/@rescript/belt/src/Belt_SetInt.res |
1,308,967 | 1,311,870 | +0.22% |
packages/@rescript/belt/src/Belt_SetString.res |
1,309,696 | 1,312,599 | +0.22% |
packages/@rescript/belt/src/Belt_MutableMap.res |
1,320,213 | 1,323,108 | +0.22% |
packages/@rescript/belt/src/Belt_SortArrayInt.res |
1,361,176 | 1,364,075 | +0.21% |
packages/@rescript/belt/src/Belt_SortArrayString.res |
1,362,972 | 1,365,865 | +0.21% |
packages/@rescript/belt/src/Belt_SortArray.res |
1,468,211 | 1,471,112 | +0.20% |
packages/@rescript/belt/src/Belt_SetDict.res |
1,468,191 | 1,471,090 | +0.20% |
packages/@rescript/belt/src/Belt_MapDict.res |
1,654,983 | 1,657,882 | +0.18% |
packages/@rescript/belt/src/Belt_MutableSetInt.res |
1,691,616 | 1,694,515 | +0.17% |
packages/@rescript/belt/src/Belt_MutableSetString.res |
1,692,859 | 1,695,758 | +0.17% |
packages/@rescript/runtime/JsxDOMStyle.res |
1,935,139 | 1,938,392 | +0.17% |
packages/@rescript/belt/src/Belt_MutableSet.res |
1,934,212 | 1,937,113 | +0.15% |
packages/@rescript/belt/src/Belt_Array.res |
2,186,895 | 2,189,780 | +0.13% |
parse/RedBlackTreeNoComments.res |
355,004 | 355,442 | +0.12% |
packages/@rescript/runtime/JsxDOM.res |
2,663,329 | 2,666,582 | +0.12% |
parse/RedBlackTree.res |
362,718 | 363,156 | +0.12% |
Instructions
In total: 9,209,427,884 → 9,210,012,562 (+0.01%).
None of the 33 benchmarks changed by 0.1% or more.
Output size
In total: 25,843,406 → 25,843,418 (±0.00%).
None of the 13 benchmarks changed by 0.1% or more.
Pull request 6e04d8a compared with base 84940e7 in this run.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## validate-compiler-flags #9306 +/- ##
===========================================================
+ Coverage 82.06% 82.10% +0.04%
===========================================================
Files 455 457 +2
Lines 65411 65797 +386
===========================================================
+ Hits 53679 54023 +344
- Misses 11732 11774 +42
🚀 New features to boost your workflow:
|
Step 2 of #9303. Stacked on #9304.
bsc's flags set global compiler state as they're parsed, so the only way to describe a compile was a list of strings. This PR adds that description as a record,
Compile_request.t:of_argvreads flags into the record. A field holds what the flags gave, and repeatable flags (-open,-w,-I, …) keep their order. Values are checked while reading: jsx version, source-map mode, color, genType module and resolution, experimental feature names, package outputs, warning specs.to_argvwrites the record back as flags.applysets the request's compiler state from the record, on top of what is there. This is how@@configflags still apply on top of the command line.Build_system,Public,DebugorCommand.of_argvreads all of them; callers that accept only some kinds check them withkind_of. The build system will decide which public flags it warns about, since it knows its ownrescript.jsonfields.bsc's command line and
@@confignow go through the record. The flag table moved from the driver toCompile_request.bsc -helpprints the same text as before.The next PR has the build system build the record directly for in-process compiles.
Behaviour differences
All of these are on bsc's command line or in
@@config; the build system's builds are unaffected (the full test suites pass):-color red,-bs-gentype-module amd,-enable-experimental Unknown. Before, some were silently ignored.-format,-e,-reprint-source,-v) run after all flags are read, not at their position.-bs-nsis opened before the-openmodules, whatever the order on the command line. The build system already passes-bs-nsfirst.-bs-nsgiven twice: the last one is used. Before, both were opened.@@configflag applies none of the file's flags. Before, the flags up to the bad one were applied. A command in@@config, such as-v, now counts as invalid instead of running.Tests
tests/ounit_tests/ounit_compile_request_tests.ml:to_argv, one at a time and all at once;🤖 Generated with Claude Code
https://claude.ai/code/session_01Kbf3gHAzsdStoCEpBgx2tS