Closed github-actions[bot] closed 1 year ago
Caused by: java.util.NoSuchElementException: key not found: (com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer@458e2fd5,Replace given matches by a library method)
Error: at scala.collection.MapOps.default(Map.scala:274)
Error: at scala.collection.MapOps.default$(Map.scala:273)
Error: at scala.collection.AbstractMap.default(Map.scala:405)
Error: at scala.collection.mutable.HashMap.apply(HashMap.scala:425)
Error: at dotty.tools.scaladoc.tasty.comments.markdown.SectionRenderingExtension$SectionHandler$.render(SectionRenderingExtension.scala:36)
Error: at dotty.tools.scaladoc.tasty.comments.markdown.SectionRenderingExtension$SectionHandler$.render(SectionRenderingExtension.scala:32)
Error: at com.vladsch.flexmark.html.renderer.NodeRenderingHandler.render(NodeRenderingHandler.java:16)
Error: at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderNode(HtmlRenderer.java:779)
Error: at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderChildrenNode(HtmlRenderer.java:798)
Error: at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderChildren(HtmlRenderer.java:790)
Error: at com.vladsch.flexmark.html.renderer.CoreNodeRenderer.render(CoreNodeRenderer.java:113)
Error: at com.vladsch.flexmark.html.renderer.NodeRenderingHandler.render(NodeRenderingHandler.java:16)
Error: at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderNode(HtmlRenderer.java:761)
Error: at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.render(HtmlRenderer.java:683)
Error: at com.vladsch.flexmark.html.HtmlRenderer.render(HtmlRenderer.java:213)
Error: at com.vladsch.flexmark.html.HtmlRenderer.render(HtmlRenderer.java:197)
Error: at com.vladsch.flexmark.html.HtmlRenderer.render(HtmlRenderer.java:230)
Error: at dotty.tools.scaladoc.site.TemplateFile.resolveInner(templates.scala:128)
Error: at dotty.tools.scaladoc.site.LoadedTemplate.resolveToHtml(LoadedTemplate.scala:54)
Error: at dotty.tools.scaladoc.renderers.ResolvedTemplate.<init>(SiteRenderer.scala:18)
Error: at dotty.tools.scaladoc.renderers.ResolvedTemplate$.apply(SiteRenderer.scala:17)
Error: at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage(SiteRenderer.scala:25)
Error: at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$(SiteRenderer.scala:21)
Error: at dotty.tools.scaladoc.renderers.Renderer.templateToPage(Renderer.scala:20)
Error: at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$$anonfun$1(SiteRenderer.scala:26)
Error: at scala.collection.immutable.List.map(List.scala:250)
Error: at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage(SiteRenderer.scala:26)
Error: at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$(SiteRenderer.scala:21)
Error: at dotty.tools.scaladoc.renderers.Renderer.templateToPage(Renderer.scala:20)
Error: at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$$anonfun$1(SiteRenderer.scala:26)
Same type of error as https://github.com/lampepfl/dotty/issues/18114 and https://github.com/lampepfl/dotty/issues/18070. but failures happen in different projects each time so it doesn't seem to be because of something specific to the projects and rather to an issue in scaladoc or flexmark. It doesn't look like scaladoc changed recently and flexmark hasn't been upgraded either, so this is puzzling /cc @Kordyjan .
Happened here as well: https://github.com/lampepfl/dotty/actions/runs/5530397761/jobs/10089750052.
The problem seems to be at https://github.com/lampepfl/dotty/blob/2b391c82de1861d8ab0196e78dd2975539b8082a/scaladoc/src/dotty/tools/scaladoc/tasty/comments/markdown/SectionRenderingExtension.scala#L30-L36
An element is inserted using getOrElseUpdate
at line 34 and read directly after at line 36. Yet in some cases, the key is not found. Is this code called concurrently? If yes, could there be a race condition on the update of repeatedIds
and should we use a concurrent Map
instead?
Code originates from https://github.com/lampepfl/dotty/commit/bcdad273af51a287b0a09550478aa7ab987bfda0. cc @szymon-rd.
Just saw #18184 that should fix this.
I haven't looked at this issue, but as a heads up, https://github.com/scala/scala/pull/10392 caused some incorrect code to fail, where IndexedSeq
is involved. Not sure what standard library is in use.
See https://github.com/lampepfl/dotty/actions/runs/5460101159