From 44e4e447fbb87aaefe19c45b724ae45802e5d149 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 14 Aug 2023 11:32:43 -0700 Subject: [PATCH] chore: update rules_jvm to latest (#3163) Picks up a visibility change so we can drop a patch That way we don't need to patch it in the aspect-cli repo too. --- ### Type of change - Chore (any other change that doesn't affect source or test files, such as configuration) ### Test plan - Covered by existing test cases --------- Co-authored-by: Jason Bedard GitOrigin-RevId: dc6e3f9df4b286b3417a45c73b9dfa7a0500911a --- gazelle/kotlin/configure.go | 1 - gazelle/kotlin/resolver.go | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gazelle/kotlin/configure.go b/gazelle/kotlin/configure.go index ca6879ddc..4c6ea5b77 100644 --- a/gazelle/kotlin/configure.go +++ b/gazelle/kotlin/configure.go @@ -77,7 +77,6 @@ func (kt *Configurer) Configure(c *config.Config, rel string, f *rule.File) { resolver, err := jvm_maven.NewResolver( cfg.MavenInstallFile(), - cfg.ExcludedArtifacts(), logger, ) if err != nil { diff --git a/gazelle/kotlin/resolver.go b/gazelle/kotlin/resolver.go index f484000b0..40f56360e 100644 --- a/gazelle/kotlin/resolver.go +++ b/gazelle/kotlin/resolver.go @@ -9,6 +9,7 @@ import ( common "aspect.build/cli/gazelle/common" . "aspect.build/cli/gazelle/common/log" + "aspect.build/cli/gazelle/kotlin/kotlinconfig" "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/repo" @@ -192,9 +193,12 @@ func (kt *Resolver) resolveImport( jvm_import := jvm_types.NewPackageName(impt.Imp) + cfgs := c.Exts[LanguageName].(kotlinconfig.Configs) + cfg, _ := cfgs[from.Pkg] + // Maven imports if mavenResolver := kt.lang.mavenResolver; mavenResolver != nil { - if l, err := (*mavenResolver).Resolve(jvm_import); err == nil { + if l, err := (*mavenResolver).Resolve(jvm_import, cfg.ExcludedArtifacts(), cfg.MavenRepositoryName()); err == nil { return Resolution_Label, &l, nil } }