about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@tvl.su>2023-10-29T10·24+0300
committerclbot <clbot@tvl.fyi>2023-10-30T16·33+0000
commit67fed3d76deae9eb62f0313812c56e93e595cb3a (patch)
tree6bb8398da01ce4829778f7f392025e27182be6c3 /tools
parentc37c9cc77037dc511ea7683ea8e80795e3b9188f (diff)
chore(tools/depotfmt): use Go version from buildGo r/6915
This is required because Go 1.18 is actually being deleted. I've
applied the formatting breakage that it introduces (such as breaking
comment formatting), because I can't be bothered to try and work
around broken Go stuff.

Change-Id: Ica7cee0d01228845d6a766079fef36df99a3da96
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9832
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tools')
-rw-r--r--tools/depotfmt.nix3
-rw-r--r--tools/nixery/layers/layers.go17
2 files changed, 10 insertions, 10 deletions
diff --git a/tools/depotfmt.nix b/tools/depotfmt.nix
index 4530469d1cfe..f493a42e5956 100644
--- a/tools/depotfmt.nix
+++ b/tools/depotfmt.nix
@@ -9,10 +9,9 @@ let
     echo "$@" | xargs -n1 ${pkgs.terraform}/bin/terraform fmt
   '';
 
-  # TODO: Upgrade to Go 1.19 and reformat tree
   config = pkgs.writeText "depot-treefmt-config" ''
     [formatter.go]
-    command = "${pkgs.go_1_18}/bin/gofmt"
+    command = "${depot.nix.buildGo.go}/bin/gofmt"
     options = [ "-w" ]
     includes = ["*.go"]
 
diff --git a/tools/nixery/layers/layers.go b/tools/nixery/layers/layers.go
index 131a0cdbed77..7251c61a84bc 100644
--- a/tools/nixery/layers/layers.go
+++ b/tools/nixery/layers/layers.go
@@ -11,10 +11,10 @@
 //
 // # Inputs
 //
-// * a graph of Nix runtime dependencies, generated via exportReferenceGraph
-// * popularity values of each package in the Nix package set (in the form of a
-//   direct reference count)
-// * a maximum number of layers to allocate for the image (the "layer budget")
+//   - a graph of Nix runtime dependencies, generated via exportReferenceGraph
+//   - popularity values of each package in the Nix package set (in the form of a
+//     direct reference count)
+//   - a maximum number of layers to allocate for the image (the "layer budget")
 //
 // # Algorithm
 //
@@ -30,14 +30,15 @@
 // │     │
 // │     v
 // └───> D ───> F
-//       │
-//       └────> G
+//
+//	│
+//	└────> G
 //
 // Each node (i.e. package) is then visited to determine how important
 // it is to separate this node into its own layer, specifically:
 //
-// 1. Is the node within a certain threshold percentile of absolute
-//    popularity within all of nixpkgs? (e.g. `glibc`, `openssl`)
+//  1. Is the node within a certain threshold percentile of absolute
+//     popularity within all of nixpkgs? (e.g. `glibc`, `openssl`)
 //
 // 2. Is the node's runtime closure above a threshold size? (e.g. 100MB)
 //