Skip to content

deps(scaladoc): update flexmark from 0.42.12 to 0.62.2 #16846

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

Closed
wants to merge 4 commits into from

Conversation

ckipp01
Copy link
Member

@ckipp01 ckipp01 commented Feb 7, 2023

This pr updates the flexmark dependencies used in Scaladoc from 0.42.12, which is from 2019, up to the latest release of 0.64.0 to 0.62.2. This is mainly done to tackle a bunch of CVEs that are attached to the old versions of
flexmark.

fixes #16223

tgodzik and others added 3 commits February 2, 2023 17:56
This would require just setting `bspEnabled := true`, but not for sjsJUnitTests which seem to cause inifinite loop of compilations.

I also need to work a bit on Bloop to also make it work.

This still needs scalameta/metals#4938
This pr updates the flexmark dependencies used in Scaladoc from 0.42.12,
which is from 2019, up to the latest release of 0.64.0. This is mainly
done to tackle a bunch of CVEs that are attatched to the old versions of
flexmark.
@ckipp01
Copy link
Member Author

ckipp01 commented Feb 7, 2023

Not that I was testing out #16816 and forgot that I was when I created this. If possible, let's get that merged in and then I'll rebase to get rid of that commit on here.

@ckipp01 ckipp01 marked this pull request as draft February 7, 2023 09:02
@ckipp01
Copy link
Member Author

ckipp01 commented Feb 7, 2023

Marked this back as a draft since I have tests failing and locally was only testing scaladoc. Please do comment on anything you see though.

@ckipp01 ckipp01 changed the title deps(scaladoc): update flexmark from 0.42.12 to 0.64.0 deps(scaladoc): update flexmark from 0.42.12 to 0.62.4 Feb 7, 2023
@ckipp01 ckipp01 changed the title deps(scaladoc): update flexmark from 0.42.12 to 0.62.4 deps(scaladoc): update flexmark from 0.42.12 to 0.62.2 Feb 7, 2023
@ckipp01 ckipp01 force-pushed the support-scaladoc branch 2 times, most recently from 21b0256 to ebafeba Compare February 7, 2023 11:50
0.64.0 requires Java 11, so we can't move that high
@ckipp01
Copy link
Member Author

ckipp01 commented Feb 7, 2023

I honestly have no idea what's going on here. scaladoc/test works with no issues. However, once you try to run the tests via cmdScaladocTests then I get:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.vladsch.flexmark.ext.tables.TablesExtension
        at dotty.tools.scaladoc.site.common$package$.defaultMarkdownOptions(common.scala:32)
        at dotty.tools.scaladoc.site.common$package$.yamlParser(common.scala:61)
        at dotty.tools.scaladoc.site.common$package$.loadTemplateFile(common.scala:73)
        at dotty.tools.scaladoc.site.StaticSiteLoader.$anonfun$4(StaticSiteLoader.scala:45)
        at scala.Option.fold(Option.scala:263)
        at dotty.tools.scaladoc.site.StaticSiteLoader.loadBasedOnYaml(StaticSiteLoader.scala:48)
        at dotty.tools.scaladoc.site.StaticSiteLoader.load$$anonfun$4(StaticSiteLoader.scala:23)
        at scala.Option.fold(Option.scala:263)
        at dotty.tools.scaladoc.site.StaticSiteLoader.load(StaticSiteLoader.scala:23)
        at dotty.tools.scaladoc.site.StaticSiteContext.staticSiteRoot$lzyINIT1(StaticSiteContext.scala:40)
        at dotty.tools.scaladoc.site.StaticSiteContext.staticSiteRoot(StaticSiteContext.scala:40)
        at dotty.tools.scaladoc.renderers.Renderer.<init>(Renderer.scala:36)
        at dotty.tools.scaladoc.renderers.HtmlRenderer.<init>(HtmlRenderer.scala:10)
        at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:237)
        at dotty.tools.scaladoc.Scaladoc$.run$$anonfun$1(Scaladoc.scala:68)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.Option.map(Option.scala:242)
        at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:72)
        at dotty.tools.scaladoc.Main.run(Main.scala:8)
        at dotty.tools.scaladoc.Main$.main(Main.scala:14)
        at dotty.tools.scaladoc.Main.main(Main.scala)

Which I don't fully understand because the classpath that the scaladoc script is putting together does indeed have /Users/ckipp/Documents/scala-workspace/dotty/dist/target/pack/lib/flexmark-ext-tables-0.62.2.jar in it for me locally, which has this class. I'm either doing something wrong, not understanding how the test works, or something. Anyone have any ideas?

@Dedelweiss
Copy link
Contributor

Hello, I have cloned the PR and I will see what is blocking this one. If anyone has any suggestions or has already started something, I'm open to suggestions.

@ckipp01
Copy link
Member Author

ckipp01 commented May 1, 2023

Superseded by #17347.

@ckipp01 ckipp01 closed this May 1, 2023
@ckipp01 ckipp01 deleted the support-scaladoc branch May 1, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update flexmark to a modern version and try to avoid CVEs.
3 participants