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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Bazel Rulesets</title>
<meta name="description" content="Bazel rulesets vital statistics" />
<link rel="icon" type="image/png" href="/favicon.png" />
<!-- Webfont -->
### Aspect Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Aspect Build Systems Inc or its affiliates (“Aspect”).
This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner,
to Aspect in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].
You agree that the following terms apply to all of your past, present and future Contributions.
Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
diff --git a/WORKSPACE b/WORKSPACE
index 78a36aa..96cacc6 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -35,9 +35,9 @@ yarn_install(
# https://github.com/bazelbuild/rules_docker/releases
http_archive(
name = "io_bazel_rules_docker",
- sha256 = "59536e6ae64359b716ba9c46c39183403b01eabfbd57578e84398b4829ca499a",
- strip_prefix = "rules_docker-0.22.0",
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
# Trivial test fixture: a nodejs program that writes to a file
write_file(
name = "js",
out = "some.js",
content = ["require('fs').writeFileSync(process.argv[2], process.version + '\\n')"],
)
# Copyright 2016 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
commit 7adef170ba0ec1b379b3fd5e2e55dfd865bd2bda
Author: Alex Eagle <[email protected]>
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