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

[bootstrap] No longer build TS refs automatically #91234

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"kbn:watch": "node scripts/kibana --dev --logging.json=false",
"build:types": "rm -rf ./target/types && tsc --p tsconfig.types.json",
"docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept",
"kbn:bootstrap": "node scripts/build_ts_refs",
"spec_to_console": "node scripts/spec_to_console",
"backport-skip-ci": "backport --prDescription \"[skip-ci]\"",
"storybook": "node scripts/storybook",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8984,6 +8984,7 @@ const BootstrapCommand = {
_utils_log__WEBPACK_IMPORTED_MODULE_2__["log"].success(`[${project.name}] bootstrap complete`);
}
});
_utils_log__WEBPACK_IMPORTED_MODULE_2__["log"].info('For IDE TypeScript support run `node scripts/build_ts_refs`');
}

};
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-pm/src/commands/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,7 @@ export const BootstrapCommand: ICommand = {
log.success(`[${project.name}] bootstrap complete`);
}
});

log.info('For IDE TypeScript support run `node scripts/build_ts_refs`');
},
};
10 changes: 7 additions & 3 deletions src/dev/typescript/build_ts_refs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ export async function buildAllTsRefs(log: ToolingLog) {
for (const path of REF_CONFIG_PATHS) {
const relative = Path.relative(REPO_ROOT, path);
log.debug(`Building TypeScript projects refs for ${relative}...`);
await execa(require.resolve('typescript/bin/tsc'), ['-b', relative, '--pretty'], {
cwd: REPO_ROOT,
});
await execa(
'node',
['--preserve-symlinks', require.resolve('typescript/bin/tsc'), '-b', relative, '--pretty'],
tylersmalley marked this conversation as resolved.
Show resolved Hide resolved
{
cwd: REPO_ROOT,
}
);
}
}
6 changes: 6 additions & 0 deletions test/scripts/checks/build_ts_refs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Build Typescript Refs" \
node --preserve-symlinks scripts/build_ts_refs
2 changes: 1 addition & 1 deletion test/scripts/checks/type_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Check Types" \
node scripts/type_check
node --preserve-symlinks scripts/type_check
1 change: 1 addition & 0 deletions test/scripts/jenkins_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if [[ -z "$CODE_COVERAGE" ]] ; then
./test/scripts/checks/ts_projects.sh
./test/scripts/checks/jest_configs.sh
./test/scripts/checks/doc_api_changes.sh
./test/scripts/checks/build_ts_refs.sh
./test/scripts/checks/type_check.sh
./test/scripts/checks/bundle_limits.sh
./test/scripts/checks/i18n.sh
Expand Down
1 change: 1 addition & 0 deletions vars/tasks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def check() {
kibanaPipeline.scriptTask('Check TypeScript Projects', 'test/scripts/checks/ts_projects.sh'),
kibanaPipeline.scriptTask('Check Jest Configs', 'test/scripts/checks/jest_configs.sh'),
kibanaPipeline.scriptTask('Check Doc API Changes', 'test/scripts/checks/doc_api_changes.sh'),
kibanaPipeline.scriptTask('Build Typescript Refs', 'test/scripts/checks/build_ts_refs.sh'),
kibanaPipeline.scriptTask('Check Types', 'test/scripts/checks/type_check.sh'),
kibanaPipeline.scriptTask('Check Bundle Limits', 'test/scripts/checks/bundle_limits.sh'),
kibanaPipeline.scriptTask('Check i18n', 'test/scripts/checks/i18n.sh'),
Expand Down