Skip to content

Commit

Permalink
chore: update rules_jvm to latest (#3163)
Browse files Browse the repository at this point in the history
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 <[email protected]>
GitOrigin-RevId: dc6e3f9df4b286b3417a45c73b9dfa7a0500911a
  • Loading branch information
alexeagle and Jason Bedard committed Aug 14, 2023
1 parent eba831f commit 1703e4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion gazelle/kotlin/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 5 additions & 1 deletion gazelle/kotlin/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 1703e4f

Please sign in to comment.