-
Notifications
You must be signed in to change notification settings - Fork 3.1k
compiler options exporter for docs.scala-lang #6845
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
compiler options exporter for docs.scala-lang #6845
Conversation
this looks like it should be rebased against the current head of 2.12.x...? |
(I aborted the Jenkins jobs this spawned, so that's why all the red X's.) |
The other |
c389328
to
4931561
Compare
@SethTisue |
val yaml = mapper | ||
.writer(new DefaultPrettyPrinter()) | ||
.writeValueAsString(source) | ||
println(yaml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should write a YAML file instead of printing to console.
build.sbt
Outdated
@@ -422,6 +422,22 @@ lazy val reflect = configureAsSubproject(project) | |||
) | |||
.dependsOn(library) | |||
|
|||
lazy val exporter = configureAsSubproject(project) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more descriptive name and/or comment explaining what this project does might be nice
@exoego this seems mergeable as-is, but I agree with Martijn's comment "A more descriptive name and/or comment explaining what this project does might be nice". If you're still around, could you add that? |
75649ac
to
41479e0
Compare
@SethTisue I would make separate PR so the compiler options export can export YAML to file, not stdout. |
Thanks @exoego! |
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.5", | ||
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.5", | ||
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.9.5", | ||
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is dependency causes problems because its artifacts cannot be found when using a STARR compiler with a new Scala binary version. Concretely, when merging this PR forward to 2.13.x, we get
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.fasterxml.jackson.module#jackson-module-scala_2.13.0-M4;2.9.5: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@exoego in the pull request that merges the exporter to 2.13.x (#7100), I removed the registerModule(DefaultScalaModule)
call for now (https://github.com/scala/scala/pull/7100/files#diff-6655e9fa859ccf70bb76b50938fa0974R150). So the exporter probably doesn't work correctly in 2.13.x. Do you have time to implement the exporter without any scala dependencies?
Extract compiler options and generate YAML for https://docs.scala-lang.org/overviews/compiler-options/index.html
This was part of scala/docs.scala-lang#1063