Skip to content

Instantly share code, notes, and snippets.

View alexeagle's full-sized avatar
🌿
Making a better Bazel

Alex Eagle alexeagle

🌿
Making a better Bazel
View GitHub Profile
commit 7adef170ba0ec1b379b3fd5e2e55dfd865bd2bda
Author: Alex Eagle <eagle@post.harvard.edu>
Date: Wed May 19 18:11:31 2021 -0700
experiment: reject WriteResource requests over 10MB
diff --git a/server/grpc_bytestream.go b/server/grpc_bytestream.go
index a2e4826..9820f02 100644
--- a/server/grpc_bytestream.go
+++ b/server/grpc_bytestream.go
diff --git a/node_modules/@angular/compiler-cli/src/ngtsc/util/src/typescript.js b/node_modules/@angular/compiler-cli/src/ngtsc/util/src/typescript.js
index ce7da78..c7feb37 100755
--- a/node_modules/@angular/compiler-cli/src/ngtsc/util/src/typescript.js
+++ b/node_modules/@angular/compiler-cli/src/ngtsc/util/src/typescript.js
@@ -112,7 +112,7 @@
// See:
// https://github.com/Microsoft/TypeScript/blob/3f7357d37f66c842d70d835bc925ec2a873ecfec/src/compiler/sys.ts#L650
// Also compiler options might be set via an API which doesn't normalize paths
- return rootDirs.map(function (rootDir) { return file_system_1.absoluteFrom(rootDir); });
+ return rootDirs.map(function (rootDir) { return file_system_1.getFileSystem().resolve(host.getCurrentDirectory(), rootDir); });
https://docs.google.com/presentation/d/1cEmYR3sPcaarsfb9yIuJ7jHBT5yb1oPArTzrNEbrt_U/edit#slide=id.ga8b035da8d_0_12
"""
Read a poetry lock file and convert to a bazel dependency graph,
then write BUILD.bazel files for each installed dependency.
"""
import textwrap
import os
import re
import sys
readonly STATS_URL="http://pushgateway.domain:9091/metrics/job/livegrep_query_stats"
get_query () {
query=$1
# max_matches: -1 means no limit on number of matches
# NB: the query will have spaces in it, and appear as multiple argv to lg command,
# however it joins the argv residual on space again
matches=$(/livegrep/bin/lg -server http://0.0.0.0:8000 'max_matches:-1' $query | wc -l)
# Produce output that we can pipe to the pushgateway
# see https://github.com/prometheus/pushgateway/blob/master/README.md#command-line
--- angular/.github/CODEOWNERS.scrubbed
+++ angular/.github/codeowners.gen
@@ -1 +0,0 @@
-* @IgorMinar @angular/framework-global-approvers
@@ -3,284 +1,0 @@
-/packages/platform-browser/animations/** @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
-/aio/content/guide/animations.md @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
-/aio/content/examples/animations/** @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
-/aio/content/images/guide/animations/** @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
-/aio/content/guide/complex-animation-sequences.md @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle")
load("@npm_bazel_terser//:index.bzl", "terser_minified")
load("@npm//@babel/cli:index.bzl", "babel")
# TODO(alexeagle): promote web_package rule to the public API
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
def differential_loading(name, entry_point, srcs):
"Common workflow to serve native ESModules to modern browsers"
rollup_bundle(
execroot/angular/external/npm/node_modules/@types/hammerjs/index.d.ts
execroot/angular/external/npm/node_modules/zone.js/dist/zone.js.d.ts
execroot/angular/external/npm/node_modules/tslib/tslib.d.ts
execroot/angular/external/npm/node_modules/typescript/lib/protocol.d.ts
execroot/angular/external/npm/node_modules/typescript/lib/tsserverlibrary.d.ts
execroot/angular/external/npm/node_modules/typescript/lib/typescript.d.ts
execroot/angular/external/npm/node_modules/typescript/lib/typescriptServices.d.ts
execroot/angular/packages/goog.d.ts
execroot/angular/packages/system.d.ts
execroot/angular/packages/types.d.ts
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define("angular_bazel_example/src/app.component.ngfactory", ["require", "exports", "@angular/core", "@angular/material/toolbar/typings/index.ngfactory", "@angular/common", "@angular/router", "angular_bazel_example/src/app.component"], factory);
}
})(function (require, exports) {
"use strict";

TypeScript rules for Bazel

WARNING: this is beta-quality software. Breaking changes are likely. Not recommended for production use without expert support.

The TypeScript rules integrate the TypeScript compiler with Bazel.

Looking for Karma rules ts_web_test and karma_web_test? These are now documented in the README at http://npmjs.com/package/@bazel/karma