From 2447914517e88d05fc7f29c809cd60a0f0329f32 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Fri, 25 Aug 2023 12:01:37 -0400 Subject: [PATCH] updating bazel stuff --- MODULE.bazel | 2 +- cmd/echo/BUILD.bazel | 13 +++++++++++-- ecs/BUILD.bazel | 9 +++++++++ logger/BUILD.bazel | 9 +++++++++ telnet/BUILD.bazel | 16 ++++++++++++++++ 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 ecs/BUILD.bazel create mode 100644 logger/BUILD.bazel diff --git a/MODULE.bazel b/MODULE.bazel index 682985b..132dea4 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -10,7 +10,7 @@ bazel_dep(name = "rules_pkg", version = "0.9.1") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//:go.mod") -use_repo(go_deps, "com_github_therealfakemoot_go_telnet") +use_repo(go_deps, "com_github_engoengine_engo", "com_github_threedotslabs_watermill") oci = use_extension("@rules_oci//oci:extensions.bzl", "oci") oci.pull( diff --git a/cmd/echo/BUILD.bazel b/cmd/echo/BUILD.bazel index 44d8a6c..27db034 100644 --- a/cmd/echo/BUILD.bazel +++ b/cmd/echo/BUILD.bazel @@ -2,9 +2,18 @@ load("@rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "echo_lib", - srcs = ["server.go"], + srcs = ["main.go"], importpath = "code.ndumas.com/ndumas/gomud/cmd/echo", visibility = ["//visibility:private"], + deps = [ + "//logger", + "//telnet", + "@com_github_threedotslabs_watermill//:watermill", + "@com_github_threedotslabs_watermill//message", + "@com_github_threedotslabs_watermill//message/router/middleware", + "@com_github_threedotslabs_watermill//message/router/plugin", + "@com_github_threedotslabs_watermill//pubsub/gochannel", + ], ) go_binary( @@ -32,6 +41,6 @@ oci_image( oci_push( name = "registry", image = ":image", - repository = "code.ndumas.com/ndumas/gomud", remote_tags = ["latest"], + repository = "code.ndumas.com/ndumas/gomud", ) diff --git a/ecs/BUILD.bazel b/ecs/BUILD.bazel new file mode 100644 index 0000000..387030c --- /dev/null +++ b/ecs/BUILD.bazel @@ -0,0 +1,9 @@ +load("@rules_go//go:def.bzl", "go_library") + +go_library( + name = "ecs", + srcs = ["world.go"], + importpath = "code.ndumas.com/ndumas/gomud/ecs", + visibility = ["//visibility:public"], + deps = ["@com_github_engoengine_engo//:engo"], +) diff --git a/logger/BUILD.bazel b/logger/BUILD.bazel new file mode 100644 index 0000000..080028d --- /dev/null +++ b/logger/BUILD.bazel @@ -0,0 +1,9 @@ +load("@rules_go//go:def.bzl", "go_library") + +go_library( + name = "logger", + srcs = ["wrappedslogger.go"], + importpath = "code.ndumas.com/ndumas/gomud/logger", + visibility = ["//visibility:public"], + deps = ["@com_github_threedotslabs_watermill//:watermill"], +) diff --git a/telnet/BUILD.bazel b/telnet/BUILD.bazel index d24d04a..59e257e 100644 --- a/telnet/BUILD.bazel +++ b/telnet/BUILD.bazel @@ -6,3 +6,19 @@ go_library( importpath = "code.ndumas.com/ndumas/gomud/protocol", visibility = ["//visibility:public"], ) + +go_library( + name = "telnet", + srcs = [ + "options.go", + "parser.go", + "server.go", + ], + importpath = "code.ndumas.com/ndumas/gomud/telnet", + visibility = ["//visibility:public"], + deps = [ + "@com_github_threedotslabs_watermill//:watermill", + "@com_github_threedotslabs_watermill//message", + "@com_github_threedotslabs_watermill//message/router/middleware", + ], +)