-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
chore(NA): manage npm dependencies within bazel #92864
chore(NA): manage npm dependencies within bazel #92864
Conversation
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
…encies-with-bazel
I believe in the preinstall_check we will want to prevent using yarn install directly, right? diff --git a/preinstall_check.js b/preinstall_check.js
index d6d0cdf1ffb..41049b72151 100644
--- a/preinstall_check.js
+++ b/preinstall_check.js
@@ -33,9 +33,10 @@
return;
}
- if (argv.cooked.includes('install')) {
- console.log('\nWARNING: When installing dependencies, prefer `yarn kbn bootstrap`\n');
- }
+if (argv.cooked.includes('install')) {
+ console.error('\nWhen installing dependencies, use `yarn kbn bootstrap`\n');
+ process.exit(1);
+}
} catch (e) {
// if it fails we do nothing, as this is just intended to be a helpful message
} |
@jbudz, do you have a windows VM to test this on? |
I do - testing now. edit: Windows setup is working |
@tylersmalley regarding the preinstall check, I believe even if you use |
@mistic, then no need to prevent it if it doesn't create issues. |
Co-authored-by: Tyler Smalley <[email protected]>
…c/kibana into manage-npm-dependencies-with-bazel
@tylersmalley just tested it and I can confirm it doesnt cause issues |
…encies-with-bazel
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
* chore(NA): full WORKSPACE.bazel logic plus manage yarn dependencies with Bazel * chore(NA): update BUILD.bazel files comments on root and packages * chore(NA): add workspace file with useful data * chore(NA): install deps through bazel * chore(NA): update workspace file * chore(NA): update into last rules nodejs * chore(NA): ensure bazel always run yarn install * chore(NA): support offline mode * chore(NA): remove elastic-datemath * chore(NA): restore bazel 4.0.0 * chore(NA): update kbn pm dist * chore(NA): introduce force-install command * docs(NA): update docs with new yarn kbn bootstrap flags * chore(NA): use path.resolve on kbn bootstrap integrity check verification * chore(NA): update .yarnrc Co-authored-by: Tyler Smalley <[email protected]> * chore(NA): change cli argument typo * chore(NA): fix spacing on kbn pm cli Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Tyler Smalley <[email protected]>
* chore(NA): full WORKSPACE.bazel logic plus manage yarn dependencies with Bazel * chore(NA): update BUILD.bazel files comments on root and packages * chore(NA): add workspace file with useful data * chore(NA): install deps through bazel * chore(NA): update workspace file * chore(NA): update into last rules nodejs * chore(NA): ensure bazel always run yarn install * chore(NA): support offline mode * chore(NA): remove elastic-datemath * chore(NA): restore bazel 4.0.0 * chore(NA): update kbn pm dist * chore(NA): introduce force-install command * docs(NA): update docs with new yarn kbn bootstrap flags * chore(NA): use path.resolve on kbn bootstrap integrity check verification * chore(NA): update .yarnrc Co-authored-by: Tyler Smalley <[email protected]> * chore(NA): change cli argument typo * chore(NA): fix spacing on kbn pm cli Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Tyler Smalley <[email protected]> Co-authored-by: Tiago Costa <[email protected]> Co-authored-by: Tyler Smalley <[email protected]>
One step forward on #69706
That PR introduces a complete Bazel
WORKSPACE
and by declaring anyarn_install
repo rule within amanaged_directory
it makes Bazel the one responsible for calling theyarn install
where previously it was@kbn/pm
responsibility.The
yarn_install
rule is declaring adata
dependency onnode_modules/.yarn-integrity
so we can still have the yarn install running after anyarn kbn clean
otherwise bazel won't install the dependencies as for its state nothing changed within ayarn kbn clean
(package.json and yarn.lock file don't present any changes).By having Bazel managing our dependencies installation we will have the ability to declare fine grained dependencies within our Bazel rules as
BUILD
files will be generated in the external@npm
Bazel repository as part of the workspace installation.It will allow us to start introduce packages to being able to built within Bazel as soon as our RFC lands.