diff --git a/bazel/include/go.MODULE.bazel b/bazel/include/go.MODULE.bazel index b5f1777e..f8195552 100644 --- a/bazel/include/go.MODULE.bazel +++ b/bazel/include/go.MODULE.bazel @@ -25,42 +25,42 @@ single_version_override( bazel_dep(name = "aspect_gazelle", version = "0.0.0") archive_override( module_name = "aspect_gazelle", - integrity = "sha256-oF39QgqV6y8/ka0+jU652d0bXhmwZ/H3OpKAQLLe4J4=", - strip_prefix = "aspect-gazelle-d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c", - urls = ["https://github.com/aspect-build/aspect-gazelle/archive/d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c.tar.gz"], + integrity = "sha256-OKKap0bvMlNdIXJNTg/F9iw+5emwpdZERPp4fn+Rn1g=", + strip_prefix = "aspect-gazelle-c2ee3832d4255b81c59efcedc14cba94c1d6d520", + urls = ["https://github.com/aspect-build/aspect-gazelle/archive/c2ee3832d4255b81c59efcedc14cba94c1d6d520.tar.gz"], ) bazel_dep(name = "aspect_gazelle_js", version = "0.0.0") archive_override( module_name = "aspect_gazelle_js", - integrity = "sha256-oF39QgqV6y8/ka0+jU652d0bXhmwZ/H3OpKAQLLe4J4=", - strip_prefix = "aspect-gazelle-d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c/language/js", - urls = ["https://github.com/aspect-build/aspect-gazelle/archive/d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c.tar.gz"], + integrity = "sha256-OKKap0bvMlNdIXJNTg/F9iw+5emwpdZERPp4fn+Rn1g=", + strip_prefix = "aspect-gazelle-c2ee3832d4255b81c59efcedc14cba94c1d6d520/language/js", + urls = ["https://github.com/aspect-build/aspect-gazelle/archive/c2ee3832d4255b81c59efcedc14cba94c1d6d520.tar.gz"], ) bazel_dep(name = "aspect_gazelle_orion", version = "0.0.0") archive_override( module_name = "aspect_gazelle_orion", - integrity = "sha256-oF39QgqV6y8/ka0+jU652d0bXhmwZ/H3OpKAQLLe4J4=", - strip_prefix = "aspect-gazelle-d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c/language/orion", - urls = ["https://github.com/aspect-build/aspect-gazelle/archive/d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c.tar.gz"], + integrity = "sha256-OKKap0bvMlNdIXJNTg/F9iw+5emwpdZERPp4fn+Rn1g=", + strip_prefix = "aspect-gazelle-c2ee3832d4255b81c59efcedc14cba94c1d6d520/language/orion", + urls = ["https://github.com/aspect-build/aspect-gazelle/archive/c2ee3832d4255b81c59efcedc14cba94c1d6d520.tar.gz"], ) bazel_dep(name = "aspect_gazelle_runner", version = "0.0.0") archive_override( module_name = "aspect_gazelle_runner", - integrity = "sha256-oF39QgqV6y8/ka0+jU652d0bXhmwZ/H3OpKAQLLe4J4=", - strip_prefix = "aspect-gazelle-d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c/runner", - urls = ["https://github.com/aspect-build/aspect-gazelle/archive/d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c.tar.gz"], + integrity = "sha256-OKKap0bvMlNdIXJNTg/F9iw+5emwpdZERPp4fn+Rn1g=", + strip_prefix = "aspect-gazelle-c2ee3832d4255b81c59efcedc14cba94c1d6d520/runner", + urls = ["https://github.com/aspect-build/aspect-gazelle/archive/c2ee3832d4255b81c59efcedc14cba94c1d6d520.tar.gz"], ) # Not direclty used but must be declared+overriden until aspect_gazelle_runner points to one published to BCR. bazel_dep(name = "aspect_gazelle_kotlin", version = "0.0.0") archive_override( module_name = "aspect_gazelle_kotlin", - integrity = "sha256-oF39QgqV6y8/ka0+jU652d0bXhmwZ/H3OpKAQLLe4J4=", - strip_prefix = "aspect-gazelle-d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c/language/kotlin", - urls = ["https://github.com/aspect-build/aspect-gazelle/archive/d4f938fee7fe8fa749cb3c5c56e2eea72d849f4c.tar.gz"], + integrity = "sha256-OKKap0bvMlNdIXJNTg/F9iw+5emwpdZERPp4fn+Rn1g=", + strip_prefix = "aspect-gazelle-c2ee3832d4255b81c59efcedc14cba94c1d6d520/language/kotlin", + urls = ["https://github.com/aspect-build/aspect-gazelle/archive/c2ee3832d4255b81c59efcedc14cba94c1d6d520.tar.gz"], ) # Go modules diff --git a/cmd/aspect/configure/configure.go b/cmd/aspect/configure/configure.go index 0e9723e6..2d7c584b 100644 --- a/cmd/aspect/configure/configure.go +++ b/cmd/aspect/configure/configure.go @@ -294,7 +294,7 @@ func runConfigureWatch(ctx context.Context, v *runner.GazelleRunner, mode string return fmt.Errorf("no connection to incremental protocol") } - for cs, err := range w.Subscribe(ctx, "aspect-configure-watch") { + for cs, err := range w.Subscribe(ctx, watchman.DropState{DropWithinState: "aspect-configure-watch"}) { if err != nil { // Break the subscribe iteration if the context is done or if the watcher is closed. if errors.Is(err, context.Canceled) || errors.Is(err, net.ErrClosed) { diff --git a/go.mod b/go.mod index 9ff89164..102ba64e 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,9 @@ go 1.24.9 require ( github.com/alphadose/haxmap v1.4.1 - github.com/aspect-build/aspect-gazelle/common v0.0.0-20251124213210-d4f938fee7fe - github.com/aspect-build/aspect-gazelle/language/orion v0.0.0-20251124213210-d4f938fee7fe - github.com/aspect-build/aspect-gazelle/runner v0.0.0-20251124213210-d4f938fee7fe + github.com/aspect-build/aspect-gazelle/common v0.0.0-20251125002441-c2ee3832d425 + github.com/aspect-build/aspect-gazelle/language/orion v0.0.0-20251125002441-c2ee3832d425 + github.com/aspect-build/aspect-gazelle/runner v0.0.0-20251125002441-c2ee3832d425 github.com/bazelbuild/bazel-gazelle v0.47.0 github.com/bazelbuild/bazelisk v1.27.0 // NOTE: keep vendored code in sync github.com/bazelbuild/buildtools v0.0.0-20251112105957-8e68360eeafa @@ -59,8 +59,8 @@ require ( github.com/a8m/envsubst v1.4.3 // indirect github.com/alecthomas/chroma/v2 v2.20.0 // indirect github.com/alecthomas/participle/v2 v2.1.4 // indirect - github.com/aspect-build/aspect-gazelle/language/js v0.0.0-20251124213210-d4f938fee7fe // indirect - github.com/aspect-build/aspect-gazelle/language/kotlin v0.0.0-20251124213210-d4f938fee7fe // indirect + github.com/aspect-build/aspect-gazelle/language/js v0.0.0-20251125002441-c2ee3832d425 // indirect + github.com/aspect-build/aspect-gazelle/language/kotlin v0.0.0-20251125002441-c2ee3832d425 // indirect github.com/atotto/clipboard v0.1.4 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect diff --git a/go.sum b/go.sum index 3fd5dde0..4c68fc0b 100644 --- a/go.sum +++ b/go.sum @@ -27,16 +27,16 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFI github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aspect-build/aspect-gazelle/common v0.0.0-20251124213210-d4f938fee7fe h1:PcwzZ3D3tnLDzagVf+5TiujWOgBSMHQeFWnF0ddVcC0= -github.com/aspect-build/aspect-gazelle/common v0.0.0-20251124213210-d4f938fee7fe/go.mod h1:cjn7MMGrFYxWLmLGBTni0U3CFmLAT9/JNJ7jb5VsU64= -github.com/aspect-build/aspect-gazelle/language/js v0.0.0-20251124213210-d4f938fee7fe h1:QIF2bKyeh/mcm0P+E684iIKeUM12dWKCooyhG8DW03E= -github.com/aspect-build/aspect-gazelle/language/js v0.0.0-20251124213210-d4f938fee7fe/go.mod h1:HbD/wf7NTJ5abptrTB8ezXr1sChhCxbjuiOmINRqxEw= -github.com/aspect-build/aspect-gazelle/language/kotlin v0.0.0-20251124213210-d4f938fee7fe h1:HbEfJfMi5dfVakkgebrj1ghCjJQ8JVMO5E8/D4nOa3Q= -github.com/aspect-build/aspect-gazelle/language/kotlin v0.0.0-20251124213210-d4f938fee7fe/go.mod h1:CikD3ipH1whpptURl0YWHM3EK7LQDWHP4DZxkzUR2RQ= -github.com/aspect-build/aspect-gazelle/language/orion v0.0.0-20251124213210-d4f938fee7fe h1:SWR5vwHjtnNQkak1xGzUdfHGwEcbhnGnAdz9R/a/X3s= -github.com/aspect-build/aspect-gazelle/language/orion v0.0.0-20251124213210-d4f938fee7fe/go.mod h1:yHaVU1cFJwAXsAb305dPj5+cb10uhWGgM1loj9IdgHE= -github.com/aspect-build/aspect-gazelle/runner v0.0.0-20251124213210-d4f938fee7fe h1:PdGLevyDVltzrwSDy4QVl28iFAMy/CHYpGwVazRvlbU= -github.com/aspect-build/aspect-gazelle/runner v0.0.0-20251124213210-d4f938fee7fe/go.mod h1:FukGILxe2+rWcm+nZLa9kzOPfKsl6571jPB3FviSTgo= +github.com/aspect-build/aspect-gazelle/common v0.0.0-20251125002441-c2ee3832d425 h1:7t007ir9OcGi8bleNshsaz3Prpd1wSZB8quV2LfDvQA= +github.com/aspect-build/aspect-gazelle/common v0.0.0-20251125002441-c2ee3832d425/go.mod h1:cjn7MMGrFYxWLmLGBTni0U3CFmLAT9/JNJ7jb5VsU64= +github.com/aspect-build/aspect-gazelle/language/js v0.0.0-20251125002441-c2ee3832d425 h1:jR9KL/BUV0a1LCVdyRmiYpAAOiY553L71PlfSNYiobU= +github.com/aspect-build/aspect-gazelle/language/js v0.0.0-20251125002441-c2ee3832d425/go.mod h1:HbD/wf7NTJ5abptrTB8ezXr1sChhCxbjuiOmINRqxEw= +github.com/aspect-build/aspect-gazelle/language/kotlin v0.0.0-20251125002441-c2ee3832d425 h1:YT7oziVuDY6Bp4vEEBgWFCfMQIYOTXorQk+DBni2oLM= +github.com/aspect-build/aspect-gazelle/language/kotlin v0.0.0-20251125002441-c2ee3832d425/go.mod h1:CikD3ipH1whpptURl0YWHM3EK7LQDWHP4DZxkzUR2RQ= +github.com/aspect-build/aspect-gazelle/language/orion v0.0.0-20251125002441-c2ee3832d425 h1:AVi4BZ88oYSOiVyApNh/aEECpHn8u0DBl1Xqvw6ywAc= +github.com/aspect-build/aspect-gazelle/language/orion v0.0.0-20251125002441-c2ee3832d425/go.mod h1:yHaVU1cFJwAXsAb305dPj5+cb10uhWGgM1loj9IdgHE= +github.com/aspect-build/aspect-gazelle/runner v0.0.0-20251125002441-c2ee3832d425 h1:4Vc5XZM5nbAPuyKwnoc9k5xJIrUcxau8amk198yaqyE= +github.com/aspect-build/aspect-gazelle/runner v0.0.0-20251125002441-c2ee3832d425/go.mod h1:FukGILxe2+rWcm+nZLa9kzOPfKsl6571jPB3FviSTgo= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= diff --git a/pkg/aspect/build/build.go b/pkg/aspect/build/build.go index 47033574..d50fc939 100644 --- a/pkg/aspect/build/build.go +++ b/pkg/aspect/build/build.go @@ -153,7 +153,7 @@ func (runner *Build) buildWatch(ctx context.Context, bazelCmd []string, streams fmt.Printf("Initial Build Failed: %v", err) } - for _, err := range w.Subscribe(ctx, "aspect-build-watch") { + for _, err := range w.Subscribe(ctx, watchman.DeferState{DeferWithinState: "aspect-build-watch"}) { if err != nil { // Break the subscribe iteration if the context is done or if the watcher is closed. if errors.Is(err, context.Canceled) || errors.Is(err, net.ErrClosed) { diff --git a/pkg/aspect/run/run.go b/pkg/aspect/run/run.go index cc754f4c..98b5b793 100644 --- a/pkg/aspect/run/run.go +++ b/pkg/aspect/run/run.go @@ -400,7 +400,7 @@ func (runner *Run) runWatch(ctx context.Context, bazelCmd []string, bzlCommandSt } // Subscribe to further changes - for cs, err := range w.Subscribe(pcctx, "aspect-run-watch") { + for cs, err := range w.Subscribe(pcctx, watcher.DeferState{DeferWithinState: "aspect-run-watch"}) { if err != nil { // Break the subscribe iteration if the context is done or if the watcher is closed. if errors.Is(err, context.Canceled) || errors.Is(err, net.ErrClosed) { diff --git a/pkg/aspect/test/test.go b/pkg/aspect/test/test.go index cb7af795..d8d49c37 100644 --- a/pkg/aspect/test/test.go +++ b/pkg/aspect/test/test.go @@ -145,7 +145,7 @@ func (runner *Test) testWatch(ctx context.Context, bazelCmd []string, streams io fmt.Printf("Initial Build Failed: %v", err) } - for _, err := range w.Subscribe(ctx, "aspect-test-watch") { + for _, err := range w.Subscribe(ctx, watchman.DeferState{DeferWithinState: "aspect-test-watch"}) { if err != nil { // Break the subscribe iteration if the context is done or if the watcher is closed. if errors.Is(err, context.Canceled) || errors.Is(err, net.ErrClosed) {