Skip to content
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

ci: improve v9 type-checking speed by ~80% with imperative ghost dependencies type generation #30577

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
62f20a2
feat(scripts-executors): add utility to run generate-api for react-co…
Hotell May 25, 2023
10013c7
perf: use type-check task to improve type-checking speeds up to 60%
Hotell May 25, 2023
647460e
generate changefiles
Hotell May 25, 2023
bd2e132
feat(tools): update migrate-converged-pkg generator to set just type-…
Hotell May 25, 2023
2d9e57e
ci: add generate-api task dependency to lage
Hotell May 25, 2023
8a498f0
feat(scripts-executors): use build instead of generate-api so lage ca…
Hotell May 25, 2023
48d805d
fix(react-dialog): remove circular dependency from /testing
Hotell May 25, 2023
3e3121e
feat(scripts-executors): handle special cases where v9 pkg story impo…
Hotell May 26, 2023
3581433
feat(scripts-executors): use nx-graph to resolve packages that need t…
Hotell May 26, 2023
041e50a
refactor(scripts-executors): polish type-check ci hack implementation
Hotell May 29, 2023
3c16c43
ci: move hack to new pipeline definition after rebase
Hotell Feb 19, 2024
a5cdb6a
generate change files after rebase
Hotell Feb 19, 2024
781bd76
chore: update types and imports after nx 17 migration within type che…
Hotell Feb 19, 2024
8a05e09
feat(executors): implement per package on demand ghost dependency typ…
Hotell Feb 20, 2024
093cad1
feat(workspace-plugin): add generate-circular-dependencies-types task…
Hotell Feb 20, 2024
f9bac67
fixup! feat(executors): implement per package on demand ghost depende…
Hotell Feb 20, 2024
a30d577
chore: add generate-circular-dependencies-types npm task to all v9 pa…
Hotell Feb 20, 2024
af59d24
fixup! chore: add generate-circular-dependencies-types npm task to al…
Hotell Feb 20, 2024
d27f60a
ci: disable running ghost deps generation hack as initial pipeline step
Hotell Feb 20, 2024
aaedd8f
fixup! fixup! chore: add generate-circular-dependencies-types npm tas…
Hotell Feb 20, 2024
532ceb7
fixup! fixup! fixup! chore: add generate-circular-dependencies-types …
Hotell Feb 20, 2024
c8b4c5a
Change files
Hotell Feb 20, 2024
9d24404
fixup! fixup! fixup! fixup! chore: add generate-circular-dependencies…
Hotell Feb 20, 2024
6c98601
feat: change task dependency definition to run build and circulars ta…
Hotell Feb 20, 2024
8849bc9
fixup! fixup! fixup! fixup! fixup! chore: add generate-circular-depen…
Hotell Feb 20, 2024
6ff2398
test(scripts-monorepo): change getDependendies spec to ts as there is…
Hotell Feb 21, 2024
3f3d469
executors: build manually storybook addons
Hotell Feb 21, 2024
15768fe
ci: scope test to only react-text
Hotell Feb 21, 2024
ac2267e
fixup! executors: build manually storybook addons
Hotell Feb 21, 2024
b770130
feat(tasks): always turn off path aliases for better speed for genera…
Hotell Feb 21, 2024
0de3456
fixup! feat(tasks): always turn off path aliases for better speed for…
Hotell Feb 21, 2024
105f1cb
chore: re-generate api.md after transpilation changes agains dts inst…
Hotell Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 45 additions & 30 deletions .devops/templates/build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,58 @@ steps:
filePath: yarn-ci.sh
displayName: yarn (install packages)

- script: |
yarn nx run @fluentui/workspace-plugin:check-graph
yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify
yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify

displayName: Workspace lint

- script: |
# @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, thus it needs to be build in advance
yarn workspace @fluentui/api-docs build
# @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance
yarn workspace @fluentui/digest build
yarn tsc -p ./tsconfig.json
displayName: Type-check just.config.ts files
# - script: |
# yarn nx run @fluentui/workspace-plugin:check-graph
# yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify
# yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify

# displayName: Workspace lint

# - script: |
# # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, thus it needs to be build in advance
# yarn workspace @fluentui/api-docs build
# # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance
# yarn workspace @fluentui/digest build
# yarn tsc -p ./tsconfig.json
# displayName: Type-check just.config.ts files

# - script: |
# yarn check:installed-dependencies-versions
# displayName: 'check packages: installed dependencies versions'

# - script: |
# if [[ -n "$(targetBranch)" ]]; then
# yarn format --since $(targetBranch) --check
# else
# yarn format --all --check
# fi
# displayName: check formatting

- script: |
yarn check:installed-dependencies-versions
displayName: 'check packages: installed dependencies versions'
## Danger.js checks for Fluent UI N*
# - script: |
# DANGER_DISABLE_TRANSPILATION="true" yarn danger ci
# displayName: danger
# condition: eq(variables.isPR, true)
# env:
# DANGER_GITHUB_API_TOKEN: $(DANGER_GITHUB_API_TOKEN)

# - script: |
# node ./scripts/executors/type-check-ci-hack.js --base $(targetBranch)
# yarn lage build --to react-storybook-addon-export-to-sandbox --verbose
# displayName: type-check perf preparation

- script: |
if [[ -n "$(targetBranch)" ]]; then
yarn format --since $(targetBranch) --check
else
yarn format --all --check
fi
displayName: check formatting
yarn lage type-check --to react-text --verbose
cat packages/react-components/react-text/tsconfig.json
displayName: type-check via just

## Danger.js checks for Fluent UI N*
- script: |
DANGER_DISABLE_TRANSPILATION="true" yarn danger ci
displayName: danger
condition: eq(variables.isPR, true)
env:
DANGER_GITHUB_API_TOKEN: $(DANGER_GITHUB_API_TOKEN)
cat packages/react-components/react-text/tsconfig.json
yarn workspace @fluentui/react-text tsc -b
displayName: type-check via tsc -b

- script: |
yarn buildci $(sinceArg)
displayName: build, test, lint, test-ssr
displayName: build, test, lint, test-ssr, type-check

- template: cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/babel-preset-global-context",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/global-context",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/keyboard-keys",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/priority-overflow",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-accordion",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-alert",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-aria",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-avatar",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-badge",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-breadcrumb",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-button",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-calendar-compat",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-card",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-checkbox",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-combobox",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-components",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: add generate-api task to react-conformance in order to be able to run generate-api task for v9",
"packageName": "@fluentui/react-conformance",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-conformance-griffel",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-context-selector",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-data-grid-react-window",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-datepicker-compat",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-dialog",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-divider",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-drawer",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-field",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-image",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-infobutton",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-infolabel",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-input",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-jsx-runtime",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-label",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-link",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-menu",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-message-bar",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-migration-v0-v9",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-migration-v8-v9",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-motion-preview",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "perf: use type-check task to improve type-checking speeds up to 60%",
"packageName": "@fluentui/react-motions-preview",
"email": "[email protected]",
"dependentChangeType": "none"
}
Loading
Loading