Skip to content

Commit f5c223b

Browse files
authored
Merge pull request #425 from ckipp01/scalacWorksheets
Store compilers with dependencies *and* scalacOptions.
2 parents ee3cdcc + 41b7b9e commit f5c223b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

mdoc/src/main/scala/mdoc/internal/cli/Context.scala

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ case class Context(
1616
settings: Settings,
1717
reporter: Reporter,
1818
compiler: MarkdownCompiler,
19-
compilers: mutable.Map[Set[Dependency], MarkdownCompiler] = mutable.Map.empty
19+
compilers: mutable.Map[(Set[Dependency], List[String]), MarkdownCompiler] = mutable.Map.empty
2020
) {
21-
def compiler(instrumented: Instrumented) =
21+
def compiler(instrumented: Instrumented) = {
22+
val scalacOptions = instrumented.scalacOptionImports.map(_.value)
2223
compilers.getOrElseUpdate(
23-
instrumented.dependencies,
24+
(instrumented.dependencies, scalacOptions),
2425
Dependencies.newCompiler(settings, instrumented)
2526
)
27+
}
2628
}
2729

2830
object Context {

0 commit comments

Comments
 (0)