def normalize()

in extractor/src/main/scala/org/jetbrains/sbt/extractors/ProjectExtractor.scala [243:277]


    def normalize(files: Seq[File]): Seq[File] =
      files
        .filter(_.exists)
        // Sort files by absolute path (String) for better tests reproducibility
        //
        // NOTE 1: we do not use `files.sorted` because files ordering is OS-dependent
        // on Windows it's case-insensitive and on Unix it's case-sensitive
        // In Scala 3 some jar names are upper-case, so we need to sort by Strings (it's the same on all OS)
        //
        // NOTE 2: we cache absolute path in a tuple , in order `fs.resolve` is not called multiple times during the sorting
        .map(f => (f, f.getAbsolutePath))
        .sortBy(_._2: String)
        .map(_._1)

    val libraryJars  = normalize(extractLibraryJars(instance))
    val compilerJars = normalize((extractCompilerJars(instance).toSet -- libraryJars).toSeq)
    val extraJars    = normalize((instance.allJars.toSet -- libraryJars -- compilerJars).toSeq)

    ScalaData(
      scalaOrganization,
      instance.version,
      libraryJars,
      compilerJars,
      extraJars,
      scalaCompilerBridgeBinaryJar,
      scalacOptions
    )
  }

  /** @see docs of [[extractScala]] */
  private def extractLibraryJars(instance: ScalaInstance): Seq[File] =
    invokeMethodIfExists[Array[File]](instance, "libraryJars").map(_.toSeq).getOrElse(Seq(instance.libraryJar))

  /** @see docs of [[extractScala]] */
  private def extractCompilerJars(instance: ScalaInstance): Seq[File] = {