Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly Dotty workflow of 2023-07-05 failed #18143

Closed
github-actions bot opened this issue Jul 5, 2023 · 6 comments · Fixed by #18184
Closed

Nightly Dotty workflow of 2023-07-05 failed #18143

github-actions bot opened this issue Jul 5, 2023 · 6 comments · Fixed by #18184

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

See https://github.com/lampepfl/dotty/actions/runs/5460101159

@dwijnand
Copy link
Member

dwijnand commented Jul 5, 2023

 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)

@smarter
Copy link
Member

smarter commented Jul 6, 2023

Same type of error as #18114 and #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 .

@mbovel
Copy link
Member

mbovel commented Jul 12, 2023

@mbovel
Copy link
Member

mbovel commented Jul 12, 2023

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 bcdad27. cc @szymon-rd.

@mbovel
Copy link
Member

mbovel commented Jul 12, 2023

Just saw #18184 that should fix this.

@som-snytt
Copy link
Contributor

I haven't looked at this issue, but as a heads up, scala/scala#10392 caused some incorrect code to fail, where IndexedSeq is involved. Not sure what standard library is in use.

nicolasstucki added a commit that referenced this issue Jul 13, 2023
This should fix the error causing recent fails of Nightly Dotty
workflow.
However, I don't know why it fails so randomly. We might want to
investigate and fix this properly.

Fixes #18143
@Kordyjan Kordyjan added this to the 3.4.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants