Skip to content

Commit

Permalink
Merge pull request #1299 from disneystreaming/dfrancoeur/lsp-config-url
Browse files Browse the repository at this point in the history
Avoid duplicate repos/deps/imports in the smithy-build.json
  • Loading branch information
Baccata authored Nov 16, 2023
2 parents 9775358 + 471f89e commit 8893d93
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ private[codegen] object GenerateSmithyBuild {
.flatten
.filter(_.configurations.exists(_.contains(Smithy4s.name)))
.flatMap(Smithy4sCodegenPlugin.moduleIdEncode(_, scalaBin))
.distinct
}

private def extractRepos(
Expand All @@ -103,6 +104,7 @@ private[codegen] object GenerateSmithyBuild {
.toList
.flatten
.collect(prepareResolvers)
.distinct

private def extractImports(
pr: ProjectRef,
Expand All @@ -114,6 +116,7 @@ private[codegen] object GenerateSmithyBuild {
.toList
.flatten
.collect(prepareInputDirs(rootDir))
.distinct

private val prepareResolvers: PartialFunction[Resolver, String] = {
case mr: MavenRepository if !mr.root.contains("repo1.maven.org") => mr.root
Expand Down

0 comments on commit 8893d93

Please sign in to comment.