chore(tools/depotfmt): use Go version from buildGo
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
This commit is contained in:
parent
c37c9cc770
commit
67fed3d76d
3 changed files with 13 additions and 10 deletions
|
@ -118,4 +118,7 @@ in
|
||||||
program = makeOverridable program;
|
program = makeOverridable program;
|
||||||
package = makeOverridable package;
|
package = makeOverridable package;
|
||||||
external = makeOverridable external;
|
external = makeOverridable external;
|
||||||
|
|
||||||
|
# re-expose the Go version used
|
||||||
|
inherit go;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,9 @@ let
|
||||||
echo "$@" | xargs -n1 ${pkgs.terraform}/bin/terraform fmt
|
echo "$@" | xargs -n1 ${pkgs.terraform}/bin/terraform fmt
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: Upgrade to Go 1.19 and reformat tree
|
|
||||||
config = pkgs.writeText "depot-treefmt-config" ''
|
config = pkgs.writeText "depot-treefmt-config" ''
|
||||||
[formatter.go]
|
[formatter.go]
|
||||||
command = "${pkgs.go_1_18}/bin/gofmt"
|
command = "${depot.nix.buildGo.go}/bin/gofmt"
|
||||||
options = [ "-w" ]
|
options = [ "-w" ]
|
||||||
includes = ["*.go"]
|
includes = ["*.go"]
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
//
|
//
|
||||||
// # Inputs
|
// # Inputs
|
||||||
//
|
//
|
||||||
// * a graph of Nix runtime dependencies, generated via exportReferenceGraph
|
// - a graph of Nix runtime dependencies, generated via exportReferenceGraph
|
||||||
// * popularity values of each package in the Nix package set (in the form of a
|
// - popularity values of each package in the Nix package set (in the form of a
|
||||||
// direct reference count)
|
// direct reference count)
|
||||||
// * a maximum number of layers to allocate for the image (the "layer budget")
|
// - a maximum number of layers to allocate for the image (the "layer budget")
|
||||||
//
|
//
|
||||||
// # Algorithm
|
// # Algorithm
|
||||||
//
|
//
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
// │ │
|
// │ │
|
||||||
// │ v
|
// │ v
|
||||||
// └───> D ───> F
|
// └───> D ───> F
|
||||||
|
//
|
||||||
// │
|
// │
|
||||||
// └────> G
|
// └────> G
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue