-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(scripts): remove @internal stripping and enable no deps build needed for api generation #25575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(scripts): remove @internal stripping and enable no deps build needed for api generation #25575
Conversation
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 131d20e15d6c59dce2dcbbd8794b5ee75701a670 (build) |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit afda290:
|
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1265 | 1269 | 5000 | |
| Button | mount | 931 | 917 | 5000 | |
| FluentProvider | mount | 1482 | 1490 | 5000 | |
| FluentProviderWithTheme | mount | 585 | 576 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 550 | 536 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 573 | 570 | 10 | |
| MakeStyles | mount | 1955 | 1997 | 50000 | |
| SpinButton | mount | 2337 | 2374 | 5000 |
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| ChatDuplicateMessagesPerf.default | 220 | 201 | 1.09:1 |
| ButtonMinimalPerf.default | 143 | 134 | 1.07:1 |
| ButtonSlotsPerf.default | 437 | 413 | 1.06:1 |
| ListCommonPerf.default | 530 | 502 | 1.06:1 |
| LoaderMinimalPerf.default | 270 | 257 | 1.05:1 |
| IconMinimalPerf.default | 583 | 554 | 1.05:1 |
| HeaderSlotsPerf.default | 688 | 660 | 1.04:1 |
| TableMinimalPerf.default | 365 | 352 | 1.04:1 |
| BoxMinimalPerf.default | 305 | 296 | 1.03:1 |
| GridMinimalPerf.default | 299 | 291 | 1.03:1 |
| ImageMinimalPerf.default | 346 | 335 | 1.03:1 |
| ListNestedPerf.default | 480 | 465 | 1.03:1 |
| PortalMinimalPerf.default | 145 | 141 | 1.03:1 |
| TreeMinimalPerf.default | 704 | 685 | 1.03:1 |
| CardMinimalPerf.default | 471 | 462 | 1.02:1 |
| CarouselMinimalPerf.default | 353 | 347 | 1.02:1 |
| ItemLayoutMinimalPerf.default | 981 | 965 | 1.02:1 |
| ListMinimalPerf.default | 460 | 449 | 1.02:1 |
| ListWith60ListItems.default | 489 | 480 | 1.02:1 |
| MenuButtonMinimalPerf.default | 1368 | 1343 | 1.02:1 |
| PopupMinimalPerf.default | 563 | 552 | 1.02:1 |
| ProviderMergeThemesPerf.default | 993 | 977 | 1.02:1 |
| SegmentMinimalPerf.default | 306 | 299 | 1.02:1 |
| SliderMinimalPerf.default | 1242 | 1220 | 1.02:1 |
| StatusMinimalPerf.default | 611 | 600 | 1.02:1 |
| AnimationMinimalPerf.default | 474 | 470 | 1.01:1 |
| AttachmentSlotsPerf.default | 868 | 856 | 1.01:1 |
| ButtonOverridesMissPerf.default | 1014 | 1007 | 1.01:1 |
| ChatMinimalPerf.default | 644 | 635 | 1.01:1 |
| DatepickerMinimalPerf.default | 4700 | 4667 | 1.01:1 |
| DropdownManyItemsPerf.default | 541 | 534 | 1.01:1 |
| EmbedMinimalPerf.default | 2647 | 2625 | 1.01:1 |
| InputMinimalPerf.default | 858 | 846 | 1.01:1 |
| LabelMinimalPerf.default | 340 | 335 | 1.01:1 |
| RadioGroupMinimalPerf.default | 389 | 387 | 1.01:1 |
| SplitButtonMinimalPerf.default | 3301 | 3253 | 1.01:1 |
| TableManyItemsPerf.default | 1580 | 1571 | 1.01:1 |
| ToolbarMinimalPerf.default | 783 | 779 | 1.01:1 |
| CheckboxMinimalPerf.default | 1533 | 1528 | 1:1 |
| DialogMinimalPerf.default | 688 | 687 | 1:1 |
| DropdownMinimalPerf.default | 2176 | 2173 | 1:1 |
| FlexMinimalPerf.default | 253 | 254 | 1:1 |
| FormMinimalPerf.default | 325 | 326 | 1:1 |
| HeaderMinimalPerf.default | 319 | 319 | 1:1 |
| MenuMinimalPerf.default | 728 | 727 | 1:1 |
| RefMinimalPerf.default | 186 | 186 | 1:1 |
| TextMinimalPerf.default | 302 | 301 | 1:1 |
| CustomToolbarPrototype.default | 2156 | 2148 | 1:1 |
| AttachmentMinimalPerf.default | 122 | 123 | 0.99:1 |
| AvatarMinimalPerf.default | 158 | 160 | 0.99:1 |
| ChatWithPopoverPerf.default | 290 | 294 | 0.99:1 |
| LayoutMinimalPerf.default | 314 | 318 | 0.99:1 |
| RosterPerf.default | 1706 | 1719 | 0.99:1 |
| ProviderMinimalPerf.default | 313 | 317 | 0.99:1 |
| SkeletonMinimalPerf.default | 298 | 301 | 0.99:1 |
| VideoMinimalPerf.default | 615 | 621 | 0.99:1 |
| ReactionMinimalPerf.default | 327 | 335 | 0.98:1 |
| TextAreaMinimalPerf.default | 410 | 417 | 0.98:1 |
| TooltipMinimalPerf.default | 1842 | 1909 | 0.96:1 |
| DividerMinimalPerf.default | 300 | 315 | 0.95:1 |
| TreeWith60ListItems.default | 122 | 129 | 0.95:1 |
| AccordionMinimalPerf.default | 120 | 127 | 0.94:1 |
| AlertMinimalPerf.default | 211 | 227 | 0.93:1 |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| GroupedList | mount | 1897 | 2120 | 2 | Possible regression |
| Stack | mount | 1298 | 827 | 5000 | Possible regression |
| TeachingBubble | mount | 89364 | 94115 | 5000 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 1198 | 1168 | 5000 | |
| Breadcrumb | mount | 2930 | 2666 | 1000 | |
| Checkbox | mount | 2488 | 2528 | 5000 | |
| CheckboxBase | mount | 2335 | 2307 | 5000 | |
| ChoiceGroup | mount | 4474 | 4306 | 5000 | |
| ComboBox | mount | 1236 | 1187 | 1000 | |
| CommandBar | mount | 9407 | 9694 | 1000 | |
| ContextualMenu | mount | 11694 | 11678 | 1000 | |
| DefaultButton | mount | 1335 | 1316 | 5000 | |
| DetailsRow | mount | 3438 | 5976 | 5000 | |
| DetailsRowFast | mount | 3591 | 3235 | 5000 | |
| DetailsRowNoStyles | mount | 3209 | 3368 | 5000 | |
| Dialog | mount | 3004 | 3095 | 1000 | |
| DocumentCardTitle | mount | 570 | 580 | 1000 | |
| Dropdown | mount | 3234 | 3222 | 5000 | |
| FocusTrapZone | mount | 1815 | 1903 | 5000 | |
| FocusZone | mount | 1843 | 1957 | 5000 | |
| GroupedList | mount | 1897 | 2120 | 2 | Possible regression |
| GroupedList | virtual-rerender | 1115 | 1149 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 1676 | 1648 | 2 | |
| GroupedListV2 | mount | 574 | 554 | 2 | |
| GroupedListV2 | virtual-rerender | 532 | 521 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 539 | 574 | 2 | |
| IconButton | mount | 1860 | 1913 | 5000 | |
| Label | mount | 716 | 726 | 5000 | |
| Layer | mount | 4092 | 4264 | 5000 | |
| Link | mount | 784 | 841 | 5000 | |
| MenuButton | mount | 1695 | 1596 | 5000 | |
| MessageBar | mount | 2372 | 2274 | 5000 | |
| Nav | mount | 3226 | 3128 | 1000 | |
| OverflowSet | mount | 1265 | 1312 | 5000 | |
| Panel | mount | 2545 | 2484 | 1000 | |
| Persona | mount | 1249 | 1230 | 1000 | |
| Pivot | mount | 1653 | 1605 | 1000 | |
| PrimaryButton | mount | 1499 | 1518 | 5000 | |
| Rating | mount | 7022 | 6971 | 5000 | |
| SearchBox | mount | 1509 | 1423 | 5000 | |
| Shimmer | mount | 2898 | 2821 | 5000 | |
| Slider | mount | 2105 | 2096 | 5000 | |
| SpinButton | mount | 4716 | 4703 | 5000 | |
| Spinner | mount | 790 | 819 | 5000 | |
| SplitButton | mount | 2928 | 2991 | 5000 | |
| Stack | mount | 1298 | 827 | 5000 | Possible regression |
| StackWithIntrinsicChildren | mount | 2437 | 2256 | 5000 | |
| StackWithTextChildren | mount | 4901 | 4860 | 5000 | |
| SwatchColorPicker | mount | 10420 | 10463 | 5000 | |
| TagPicker | mount | 2547 | 2419 | 5000 | |
| TeachingBubble | mount | 89364 | 94115 | 5000 | Possible regression |
| Text | mount | 790 | 793 | 5000 | |
| TextField | mount | 1471 | 1606 | 5000 | |
| ThemeProvider | mount | 1459 | 1532 | 5000 | |
| ThemeProvider | virtual-rerender | 1026 | 1077 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 2110 | 2113 | 5000 | |
| Toggle | mount | 1091 | 1097 | 5000 | |
| buttonNative | mount | 555 | 548 | 5000 |
| function updateApiExtractorForLocalBuilds(tree: Tree, options: NormalizedSchemaWithTsConfigs) { | ||
| function updateApiExtractor(tree: Tree, options: NormalizedSchemaWithTsConfigs) { | ||
| const apiExtractor = templates.apiExtractor(); | ||
| const scripts = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collocate to proper boundary so its possible to run only particular migrations if needed
| }, | ||
| "dtsRollup": { | ||
| "enabled": true, | ||
| // TODO: replace following line with these 2 commented ones after all v9 is migrated to new build and .d.ts API stripping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we wont strip @internal apis thus removing
| ) as TsConfig; | ||
|
|
||
| function createNormalizedTsPaths(options: { definitionsRootPath: string; rootTsConfig: TsConfig }) { | ||
| const paths = (options.rootTsConfig.compilerOptions.paths as unknown) as Record<string, string[]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just-scripts provides invalid types for CompilerOptions thus need of override
| main: { | ||
| $schema: 'https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json', | ||
| extends: '@fluentui/scripts/api-extractor/api-extractor.common.v-next.json', | ||
| // TODO: remove after all v9 is migrated to new build and .d.ts API stripping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we wont stript @internal marked APIs thus removing
f6cb87c to
0f13c20
Compare
|
|
||
| updateUnstablePackageJson(); | ||
| updateUnstableApiExtractorForLocalBuilds(); | ||
| updateUnstableApiExtractor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove Local from name as with this we have only 1 api-extractor config 🙌
b7f0540 to
f21a110
Compare
b57cdcd to
f21a110
Compare
af6ec45 to
edf3f55
Compare
3cdd4c7 to
def9c4b
Compare
…eded for api generation
07f933a to
afda290
Compare
…eded for api generation (microsoft#25575)
…eded for api generation (microsoft#25575)
Current Behavior
@internalare physically removed from rollup-edindex.d.tsapi.mdgeneration works differently on CI and Localjust-scripts buildbuild:localorlage build --toapi.mdgeneration needs all dependencies to have api generatedNew Behavior
index.d.tsas that adds hard to reason about issues in user landapi.mdgeneration works the same on CI and Localapi.mdgeneration doesn't need to to generate apis for dependenciesRelated Issue(s)
Replaces #23369
Closes #19360
Follow up
💡 Note that this PR was merged after the declared followup.
Why?
Turns out our pipelines ran into race conditions which ended up in unexpected
buildfollowed bytesttask execution failures caused by hybrid state of tsc processing and api-extractor 🚨. Last but not least, we need to act on those Test memory leaks which will cause us a lot of issues when migrating to node 16 (that will fail on unhandled rejection promises )