Skip to content

Commit

Permalink
Avoid generating duplicated imports (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-lfallasavendano committed Jan 8, 2024
1 parent 77afb1a commit 921b43c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Morphir/Snowpark/Backend.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Morphir.Snowpark.Backend exposing (mapDistribution, Options, mapFunctionD
import Dict
import List
import Set as Set
import List.Extra
import Json.Decode as Decode exposing (Decoder)
import Morphir.File.FileMap exposing (FileMap)
import Morphir.IR.AccessControlled exposing (Access(..), AccessControlled)
Expand Down Expand Up @@ -141,7 +142,7 @@ mapModuleDefinition currentPackagePath currentModulePath accessControlledModuleD
{ dirPath = scalaPackagePath
, fileName = (moduleName |> Name.toTitleCase) ++ ".scala"
, packageDecl = scalaPackagePath
, imports = generatedImports
, imports = generatedImports |> List.Extra.uniqueBy .packagePrefix
, typeDecls = [( Scala.Documented (Just (String.join "" [ "Generated based on ", currentModulePath |> Path.toString Name.toTitleCase "." ]))
(Scala.Annotated []
(Scala.Object
Expand Down

0 comments on commit 921b43c

Please sign in to comment.