From 14111dcd1274dd0ae70f185609b2d7c2a98f7deb Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Thu, 27 Jul 2023 14:58:20 -0400 Subject: [PATCH] working bazel builds? --- BUILD | 2 +- MODULE.bazel | 3 +- MODULE.bazel.lock | 83 ++++++++++++++++++++++++++++------------------- 3 files changed, 53 insertions(+), 35 deletions(-) diff --git a/BUILD b/BUILD index 43b107c..4a990e5 100644 --- a/BUILD +++ b/BUILD @@ -8,7 +8,7 @@ go_library( srcs = ["main.go"], importpath = "bingbong", visibility = ["//visibility:private"], - deps = ["@org_uber_go_zap//:go_default_library"], + deps = ["@org_uber_go_zap//:zap"], ) go_binary( diff --git a/MODULE.bazel b/MODULE.bazel index b4dc01b..fd99c71 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,6 +1,6 @@ module( name = "obsidian-markdown", - repo_name = "code.ndumas.com_ndumas_obsidian-markdown" + repo_name = "code.ndumas.com_ndumas_obsidian-markdown", ) bazel_dep(name = "gazelle", version = "0.32.0") @@ -9,3 +9,4 @@ bazel_dep(name = "rules_oci", version = "1.2.0") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//:go.mod") +use_repo(go_deps, "org_uber_go_zap") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 9bb74e1..8760330 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,6 @@ { "lockFileVersion": 1, - "moduleFileHash": "584fb7092f82ede5c56c2e5afbc5553ce6d7e6aa4bbd47c41f4ef0e9bcc90aa1", + "moduleFileHash": "aae0cfd6cf273679a6e2c8bb8899d98efa33ac9bd25b07fbf1e29c0684d9bfa2", "flags": { "cmdRegistries": [ "https://bcr.bazel.build/" @@ -33,7 +33,9 @@ "line": 10, "column": 24 }, - "imports": {}, + "imports": { + "org_uber_go_zap": "org_uber_go_zap" + }, "devImports": [], "tags": [ { @@ -846,26 +848,6 @@ } } }, - "@rules_go~0.41.0//go:extensions.bzl%go_sdk": { - "bzlTransitiveDigest": "uRRiyTb4o55cIajpRoOrHqU9TIFenkML7Da2dL3oXQ8=", - "generatedRepoSpecs": { - "go_default_sdk": { - "bzlFile": "@@rules_go~0.41.0//go/private:sdk.bzl", - "ruleClassName": "go_download_sdk_rule", - "attributes": {"name":"--rules_go~0.41.0~go_sdk~go_default_sdk","goos":"--","goarch":"--","sdks":{},"urls":["--https://dl.google.com/go/{}"],"version":"--1.20.2"} - }, - "go_host_compatible_sdk_label": { - "bzlFile": "@@rules_go~0.41.0//go/private:extensions.bzl", - "ruleClassName": "host_compatible_toolchain", - "attributes": {"name":"--rules_go~0.41.0~go_sdk~go_host_compatible_sdk_label","toolchain":"--@go_default_sdk//:ROOT"} - }, - "go_toolchains": { - "bzlFile": "@@rules_go~0.41.0//go/private:sdk.bzl", - "ruleClassName": "go_multiple_toolchains", - "attributes": {"name":"--rules_go~0.41.0~go_sdk~go_toolchains","prefixes":["--_0000_go_default_sdk_"],"geese":["--"],"goarchs":["--"],"sdk_repos":["--go_default_sdk"],"sdk_types":["--remote"],"sdk_versions":["--1.20.2"]} - } - } - }, "@aspect_bazel_lib~1.30.2//lib:extensions.bzl%ext": { "bzlTransitiveDigest": "6FqiVdKnhKX6tZd+oN2Z0eS+59mFzFuCavFTs9zO9Sc=", "generatedRepoSpecs": { @@ -1466,6 +1448,36 @@ } } }, + "@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": { + "bzlTransitiveDigest": "OmamqKJsiE8WH/LST0ioVROxC7R/MdakCNW9DSPS5/U=", + "generatedRepoSpecs": { + "local_config_xcode": { + "bzlFile": "@@bazel_tools//tools/osx:xcode_configure.bzl", + "ruleClassName": "xcode_autoconf", + "attributes": {"name":"--bazel_tools~xcode_configure_extension~local_config_xcode","xcode_locator":"--@bazel_tools//tools/osx:xcode_locator.m","remote_xcode":"--"} + } + } + }, + "@rules_go~0.41.0//go:extensions.bzl%go_sdk": { + "bzlTransitiveDigest": "uRRiyTb4o55cIajpRoOrHqU9TIFenkML7Da2dL3oXQ8=", + "generatedRepoSpecs": { + "go_default_sdk": { + "bzlFile": "@@rules_go~0.41.0//go/private:sdk.bzl", + "ruleClassName": "go_download_sdk_rule", + "attributes": {"name":"--rules_go~0.41.0~go_sdk~go_default_sdk","goos":"--","goarch":"--","sdks":{},"urls":["--https://dl.google.com/go/{}"],"version":"--1.20.2"} + }, + "go_host_compatible_sdk_label": { + "bzlFile": "@@rules_go~0.41.0//go/private:extensions.bzl", + "ruleClassName": "host_compatible_toolchain", + "attributes": {"name":"--rules_go~0.41.0~go_sdk~go_host_compatible_sdk_label","toolchain":"--@go_default_sdk//:ROOT"} + }, + "go_toolchains": { + "bzlFile": "@@rules_go~0.41.0//go/private:sdk.bzl", + "ruleClassName": "go_multiple_toolchains", + "attributes": {"name":"--rules_go~0.41.0~go_sdk~go_toolchains","prefixes":["--_0000_go_default_sdk_"],"geese":["--"],"goarchs":["--"],"sdk_repos":["--go_default_sdk"],"sdk_types":["--remote"],"sdk_versions":["--1.20.2"]} + } + } + }, "@gazelle~0.32.0//:extensions.bzl%go_deps": { "bzlTransitiveDigest": "UCZzLWDb5gr+WIH945L7XHxSZHBc9vOWlXzqn5jzIqI=", "generatedRepoSpecs": { @@ -1529,6 +1541,16 @@ "ruleClassName": "go_repository", "attributes": {"name":"--gazelle~0.32.0~go_deps~com_github_golang_protobuf","importpath":"--github.com/golang/protobuf","sum":"--h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=","replace":"--","version":"--v1.5.2","build_directives":[],"build_file_generation":"--auto","patches":[],"patch_args":[]} }, + "org_uber_go_zap": { + "bzlFile": "@@gazelle~0.32.0//internal:go_repository.bzl", + "ruleClassName": "go_repository", + "attributes": {"name":"--gazelle~0.32.0~go_deps~org_uber_go_zap","importpath":"--go.uber.org/zap","sum":"--h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=","replace":"--","version":"--v1.24.0","build_directives":[],"build_file_generation":"--auto","patches":[],"patch_args":[]} + }, + "org_uber_go_multierr": { + "bzlFile": "@@gazelle~0.32.0//internal:go_repository.bzl", + "ruleClassName": "go_repository", + "attributes": {"name":"--gazelle~0.32.0~go_deps~org_uber_go_multierr","importpath":"--go.uber.org/multierr","sum":"--h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=","replace":"--","version":"--v1.6.0","build_directives":[],"build_file_generation":"--auto","patches":[],"patch_args":[]} + }, "org_golang_x_sync": { "bzlFile": "@@gazelle~0.32.0//internal:go_repository.bzl", "ruleClassName": "go_repository", @@ -1542,7 +1564,12 @@ "bazel_gazelle_go_repository_config": { "bzlFile": "@@gazelle~0.32.0//internal/bzlmod:go_deps.bzl", "ruleClassName": "_go_repository_config", - "attributes": {"name":"--gazelle~0.32.0~go_deps~bazel_gazelle_go_repository_config","importpaths":{"--com_github_bazelbuild_buildtools":"--github.com/bazelbuild/buildtools","--@rules_go~0.41.0":"--github.com/bazelbuild/rules_go","--com_github_bmatcuk_doublestar_v4":"--github.com/bmatcuk/doublestar/v4","--com_github_fsnotify_fsnotify":"--github.com/fsnotify/fsnotify","--com_github_google_go_cmp":"--github.com/google/go-cmp","--com_github_pmezard_go_difflib":"--github.com/pmezard/go-difflib","--org_golang_x_mod":"--golang.org/x/mod","--org_golang_x_sync":"--golang.org/x/sync","--org_golang_x_tools":"--golang.org/x/tools","--org_golang_x_sys":"--golang.org/x/sys","--com_github_gogo_protobuf":"--github.com/gogo/protobuf","--com_github_golang_mock":"--github.com/golang/mock","--com_github_golang_protobuf":"--github.com/golang/protobuf","--org_golang_google_protobuf":"--google.golang.org/protobuf","--org_golang_x_net":"--golang.org/x/net","--org_golang_x_text":"--golang.org/x/text","--org_golang_google_genproto":"--google.golang.org/genproto","--org_golang_google_grpc":"--google.golang.org/grpc","--@gazelle~0.32.0":"--github.com/bazelbuild/bazel-gazelle"},"module_names":{"--@gazelle~0.32.0":"--gazelle","--@rules_go~0.41.0":"--rules_go"},"build_naming_conventions":{}} + "attributes": {"name":"--gazelle~0.32.0~go_deps~bazel_gazelle_go_repository_config","importpaths":{"--org_uber_go_zap":"--go.uber.org/zap","--org_uber_go_atomic":"--go.uber.org/atomic","--org_uber_go_multierr":"--go.uber.org/multierr","--com_github_bazelbuild_buildtools":"--github.com/bazelbuild/buildtools","--@rules_go~0.41.0":"--github.com/bazelbuild/rules_go","--com_github_bmatcuk_doublestar_v4":"--github.com/bmatcuk/doublestar/v4","--com_github_fsnotify_fsnotify":"--github.com/fsnotify/fsnotify","--com_github_google_go_cmp":"--github.com/google/go-cmp","--com_github_pmezard_go_difflib":"--github.com/pmezard/go-difflib","--org_golang_x_mod":"--golang.org/x/mod","--org_golang_x_sync":"--golang.org/x/sync","--org_golang_x_tools":"--golang.org/x/tools","--org_golang_x_sys":"--golang.org/x/sys","--com_github_gogo_protobuf":"--github.com/gogo/protobuf","--com_github_golang_mock":"--github.com/golang/mock","--com_github_golang_protobuf":"--github.com/golang/protobuf","--org_golang_google_protobuf":"--google.golang.org/protobuf","--org_golang_x_net":"--golang.org/x/net","--org_golang_x_text":"--golang.org/x/text","--org_golang_google_genproto":"--google.golang.org/genproto","--org_golang_google_grpc":"--google.golang.org/grpc","--@gazelle~0.32.0":"--github.com/bazelbuild/bazel-gazelle"},"module_names":{"--@gazelle~0.32.0":"--gazelle","--@rules_go~0.41.0":"--rules_go"},"build_naming_conventions":{}} + }, + "org_uber_go_atomic": { + "bzlFile": "@@gazelle~0.32.0//internal:go_repository.bzl", + "ruleClassName": "go_repository", + "attributes": {"name":"--gazelle~0.32.0~go_deps~org_uber_go_atomic","importpath":"--go.uber.org/atomic","sum":"--h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=","replace":"--","version":"--v1.7.0","build_directives":[],"build_file_generation":"--auto","patches":[],"patch_args":[]} }, "org_golang_google_grpc": { "bzlFile": "@@gazelle~0.32.0//internal:go_repository.bzl", @@ -1576,16 +1603,6 @@ } } }, - "@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": { - "bzlTransitiveDigest": "OmamqKJsiE8WH/LST0ioVROxC7R/MdakCNW9DSPS5/U=", - "generatedRepoSpecs": { - "local_config_xcode": { - "bzlFile": "@@bazel_tools//tools/osx:xcode_configure.bzl", - "ruleClassName": "xcode_autoconf", - "attributes": {"name":"--bazel_tools~xcode_configure_extension~local_config_xcode","xcode_locator":"--@bazel_tools//tools/osx:xcode_locator.m","remote_xcode":"--"} - } - } - }, "@rules_go~0.41.0//go/private:extensions.bzl%non_module_dependencies": { "bzlTransitiveDigest": "IZ5HmeiFbInfa4Rj12Iu3tnGLI1LUGeBsXh4145hpkc=", "generatedRepoSpecs": {