about summary refs log tree commit diff
path: root/nix/buildTypedGo
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-01-29T17·14+0200
committertazjin <mail@tazj.in>2021-01-30T08·20+0000
commit8f57ca92bddf8c6a003ee91e737dffad288b8b90 (patch)
tree1dba8853797aa879308cc5c826904e2186e4a6ff /nix/buildTypedGo
parentc726c6c2647aab533281471e222aa64fe36e490b (diff)
chore(3p|nix): Remove typed Go r/2159
Nobody has actually done any experimentation with typed Go, so we're
getting rid of it for now - it's causing annoying IFD during build
graph generation.

Change-Id: Ibac3dea98ebed1b3ee08acda184d24c500cf695d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2458
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'nix/buildTypedGo')
-rw-r--r--nix/buildTypedGo/default.nix34
-rw-r--r--nix/buildTypedGo/example/default.nix8
-rw-r--r--nix/buildTypedGo/example/main.go215
3 files changed, 0 insertions, 57 deletions
diff --git a/nix/buildTypedGo/default.nix b/nix/buildTypedGo/default.nix
deleted file mode 100644
index f135b1ebb454..000000000000
--- a/nix/buildTypedGo/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-# SPDX-License-Identifier: Apache-2.0
-#
-# A crude wrapper around //nix/buildGo that supports the Go 2 alpha.
-#
-# The way the alpha is implemented is via a transpiler from typed to
-# untyped Go.
-{ depot, pkgs, ... }:
-
-let
-  inherit (builtins)
-    baseNameOf
-    stringLength
-    substring;
-
-  inherit (depot.nix.buildGo) gpackage program;
-
-  go2goext = file: substring 0 ((stringLength file) - 1) file;
-  go2go = file: pkgs.runCommandNoCC "${go2goext (baseNameOf file)}" {} ''
-    cp ${file} .
-    ${pkgs.go}/bin/go tool go2go translate *.go2
-    mv *.go $out
-  '';
-
-in rec {
-  program = { name, srcs, deps ? [], x_defs ? {} }: depot.nix.buildGo.program {
-    inherit name deps x_defs;
-    srcs = map go2go srcs;
-  };
-
-  package = { name, srcs, deps ? [], path ? name, sfiles ? [] }: depot.nix.buildGo.package {
-    inherit name deps path sfiles;
-    srcs = map go2go srcs;
-  };
-}
diff --git a/nix/buildTypedGo/example/default.nix b/nix/buildTypedGo/example/default.nix
deleted file mode 100644
index 5b6d4171f99c..000000000000
--- a/nix/buildTypedGo/example/default.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ depot, ... }:
-
-depot.nix.buildTypedGo.program {
-  name = "example";
-  srcs = [
-    ./main.go2
-  ];
-}
diff --git a/nix/buildTypedGo/example/main.go2 b/nix/buildTypedGo/example/main.go2
deleted file mode 100644
index 8986f57b94c7..000000000000
--- a/nix/buildTypedGo/example/main.go2
+++ /dev/null
@@ -1,15 +0,0 @@
-package main
-
-import (
-	"fmt"
-)
-
-func Print(type T)(s []T) {
-	for _, v := range s {
-		fmt.Print(v)
-	}
-}
-
-func main() {
-	Print([]string{"Hello, ", "TVL\n"})
-}