diff --git a/.bazelignore b/.bazelignore index ac7a2d15a7aa4..ec61c2f3e7e75 100644 --- a/.bazelignore +++ b/.bazelignore @@ -8,7 +8,10 @@ .idea .teamcity .yarn-local-mirror -/bazel +bazel-bin +bazel-kibana +bazel-out +bazel-testlogs build node_modules target diff --git a/.bazelrc.common b/.bazelrc.common index fb8e8e86b9ef5..448fafd6946b3 100644 --- a/.bazelrc.common +++ b/.bazelrc.common @@ -18,17 +18,16 @@ build --disk_cache=~/.bazel-cache/disk-cache build --repository_cache=~/.bazel-cache/repository-cache # Bazel will create symlinks from the workspace directory to output artifacts. -# Build results will be placed in a directory called "bazel/bin" +# Build results will be placed in a directory called "bazel-bin" # This will still create a bazel-out symlink in # the project directory, which must be excluded from the # editor's search path. -build --symlink_prefix=bazel/ # To disable the symlinks altogether (including bazel-out) we can use # build --symlink_prefix=/ # however this makes it harder to find outputs. # Prevents the creation of bazel-out dir -build --experimental_no_product_name_out_symlink +# build --experimental_no_product_name_out_symlink # Make direct file system calls to create symlink trees build --experimental_inprocess_symlink_creation diff --git a/.eslintignore b/.eslintignore index 4559711bb9dd3..bbd8e3f88a378 100644 --- a/.eslintignore +++ b/.eslintignore @@ -48,4 +48,4 @@ snapshots.js /packages/kbn-monaco/src/painless/antlr # Bazel -/bazel +/bazel-* diff --git a/.gitignore b/.gitignore index fbe28b8f1e77c..70ed1bfb24f86 100644 --- a/.gitignore +++ b/.gitignore @@ -75,5 +75,5 @@ report.asciidoc .yarn-local-mirror # Bazel -/bazel -/.bazelrc.user +bazel-* +.bazelrc.user diff --git a/.stylelintignore b/.stylelintignore index a48b3adfa3632..72d9d5104a0e9 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,3 +1,4 @@ x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss build target +bazel-* diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index bcb0b6da2a2f8..919608c45157d 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -22981,7 +22981,7 @@ class Project { ensureValidProjectDependency(project) { const relativePathToProject = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, project.path)); - const relativePathToProjectIfBazelPkg = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, `bazel/bin/packages/${path__WEBPACK_IMPORTED_MODULE_1___default.a.basename(project.path)}`)); + const relativePathToProjectIfBazelPkg = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, `bazel-bin/packages/${path__WEBPACK_IMPORTED_MODULE_1___default.a.basename(project.path)}`)); const versionInPackageJson = this.allDependencies[project.name]; const expectedVersionInPackageJson = `link:${relativePathToProject}`; const expectedVersionInPackageJsonIfBazelPkg = `link:${relativePathToProjectIfBazelPkg}`; // TODO: after introduce bazel to build all the packages and completely remove the support for kbn packages @@ -23143,7 +23143,7 @@ const createProductionPackageJson = pkgJson => _objectSpread(_objectSpread({}, p dependencies: transformDependencies(pkgJson.dependencies) }); const isLinkDependency = depVersion => depVersion.startsWith('link:'); -const isBazelPackageDependency = depVersion => depVersion.startsWith('link:bazel/bin/'); +const isBazelPackageDependency = depVersion => depVersion.startsWith('link:bazel-bin/'); /** * Replaces `link:` dependencies with `file:` dependencies. When installing * dependencies, these `file:` dependencies will be copied into `node_modules` @@ -23153,7 +23153,7 @@ const isBazelPackageDependency = depVersion => depVersion.startsWith('link:bazel * will then _copy_ the `file:` dependencies into `node_modules` instead of * symlinking like we do in development. * - * Additionally it also taken care of replacing `link:bazel/bin/` with + * Additionally it also taken care of replacing `link:bazel-bin/` with * `file:` so we can also support the copy of the Bazel packages dist already into * build/packages to be copied into the node_modules */ @@ -23170,7 +23170,7 @@ function transformDependencies(dependencies = {}) { } if (isBazelPackageDependency(depVersion)) { - newDeps[name] = depVersion.replace('link:bazel/bin/', 'file:'); + newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:'); continue; } diff --git a/packages/kbn-pm/src/utils/package_json.ts b/packages/kbn-pm/src/utils/package_json.ts index b405b544ab800..a50d8994b5720 100644 --- a/packages/kbn-pm/src/utils/package_json.ts +++ b/packages/kbn-pm/src/utils/package_json.ts @@ -35,7 +35,7 @@ export const createProductionPackageJson = (pkgJson: IPackageJson) => ({ export const isLinkDependency = (depVersion: string) => depVersion.startsWith('link:'); export const isBazelPackageDependency = (depVersion: string) => - depVersion.startsWith('link:bazel/bin/'); + depVersion.startsWith('link:bazel-bin/'); /** * Replaces `link:` dependencies with `file:` dependencies. When installing @@ -46,7 +46,7 @@ export const isBazelPackageDependency = (depVersion: string) => * will then _copy_ the `file:` dependencies into `node_modules` instead of * symlinking like we do in development. * - * Additionally it also taken care of replacing `link:bazel/bin/` with + * Additionally it also taken care of replacing `link:bazel-bin/` with * `file:` so we can also support the copy of the Bazel packages dist already into * build/packages to be copied into the node_modules */ @@ -61,7 +61,7 @@ export function transformDependencies(dependencies: IPackageDependencies = {}) { } if (isBazelPackageDependency(depVersion)) { - newDeps[name] = depVersion.replace('link:bazel/bin/', 'file:'); + newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:'); continue; } diff --git a/packages/kbn-pm/src/utils/project.ts b/packages/kbn-pm/src/utils/project.ts index 797a9a36df78f..068065c01f649 100644 --- a/packages/kbn-pm/src/utils/project.ts +++ b/packages/kbn-pm/src/utils/project.ts @@ -92,7 +92,7 @@ export class Project { public ensureValidProjectDependency(project: Project) { const relativePathToProject = normalizePath(Path.relative(this.path, project.path)); const relativePathToProjectIfBazelPkg = normalizePath( - Path.relative(this.path, `bazel/bin/packages/${Path.basename(project.path)}`) + Path.relative(this.path, `bazel-bin/packages/${Path.basename(project.path)}`) ); const versionInPackageJson = this.allDependencies[project.name];