Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Sep 24, 2024
1 parent 2898d9a commit 445073f
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .aspect/bazelrc/bazel7.bazelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Speed up all builds by not checking if external repository files have been modified.
# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java#L244
build --noexperimental_check_external_repository_files
fetch --noexperimental_check_external_repository_files
query --noexperimental_check_external_repository_files


# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
# Save time on Sandbox creation and deletion when many of the same kind of action run during the
Expand Down
2 changes: 0 additions & 2 deletions .bazeliskrc

This file was deleted.

6 changes: 3 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import %workspace%/.aspect/bazelrc/performance.bazelrc

### YOUR PROJECT SPECIFIC OPTIONS GO HERE ###
common --enable_platform_specific_config
common --workspace_status_command "${PWD}/tools/workspace_status.sh"

common:release -c opt --stamp

Expand All @@ -19,8 +18,9 @@ common --noenable_bzlmod
common --noincompatible_disallow_empty_glob

# Don't try and auto detect the cc toolchain, as we use our own gcc toolchains.
common --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# common:windows --noincompatible_enable_cc_toolchain_resolution --compiler=mingw-gcc
common:linux --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
common:windows --platforms @zig_sdk//platform:windows_amd64 --extra_toolchains @zig_sdk//toolchain:windows_amd64
common:windows --sandbox_add_mount_pair=C:\Temp
common --incompatible_enable_proto_toolchain_resolution

# Tell Bazel to pass the right flags for llvm-ar, not libtool, only needed on linux.
Expand Down
16 changes: 16 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@ workspace(name = "build_aspect_cli")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")


HERMETIC_CC_TOOLCHAIN_VERSION = "v3.1.1"

http_archive(
name = "hermetic_cc_toolchain",
sha256 = "907745bf91555f77e8234c0b953371e6cac5ba715d1cf12ff641496dd1bce9d1",
urls = [
"https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
"https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

zig_toolchains()

http_archive(
name = "toolchains_llvm",
sha256 = "c304fc9286c6fa2acb6dcea8961dc0d526a076f8cb64da4763c36aebcf5cff56",
Expand Down
2 changes: 1 addition & 1 deletion pkg/aspect/configure/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ go_library(
"@bazel_gazelle//rule:go_default_library",
"@bazel_gazelle//walk:go_default_library",
"@com_github_bazelbuild_buildtools//build:go_default_library",
"@com_github_bazelbuild_rules_python_gazelle//python",
# "@com_github_bazelbuild_rules_python_gazelle//python",
"@com_github_pmezard_go_difflib//difflib",
"@com_github_spf13_cobra//:cobra",
"@com_github_spf13_viper//:viper",
Expand Down
10 changes: 5 additions & 5 deletions pkg/aspect/configure/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/bazelbuild/bazel-gazelle/language"
golang "github.com/bazelbuild/bazel-gazelle/language/go"
"github.com/bazelbuild/bazel-gazelle/language/proto"
python "github.com/bazelbuild/rules_python/gazelle/python"
// python "github.com/bazelbuild/rules_python/gazelle/python"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -93,10 +93,10 @@ func (c *Configure) addDefaultLanguages() {
c.AddLanguage("bzl", bzl.NewLanguage)
}

viper.SetDefault("configure.languages.python", false)
if viper.GetBool("configure.languages.python") {
c.AddLanguage("python", python.NewLanguage)
}
// viper.SetDefault("configure.languages.python", false)
// if viper.GetBool("configure.languages.python") {
// c.AddLanguage("python", python.NewLanguage)
// }
}

func (runner *Configure) Run(_ context.Context, cmd *cobra.Command, args []string) error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scanner.c",
],
cgo = True,
+ cdeps = ["//:headers"],
+ # cdeps = ["//:headers"],
importpath = "github.com/smacker/go-tree-sitter/python",
visibility = ["//visibility:public"],
deps = ["//:go-tree-sitter"],

0 comments on commit 445073f

Please sign in to comment.