Skip to content

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

Merged
merged 11 commits into from
Aug 8, 2018

Conversation

exoego
Copy link

@exoego exoego commented Jun 22, 2018

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

@scala-jenkins scala-jenkins added this to the 2.12.7 milestone Jun 22, 2018
@SethTisue
Copy link
Member

this looks like it should be rebased against the current head of 2.12.x...?

@SethTisue
Copy link
Member

(I aborted the Jenkins jobs this spawned, so that's why all the red X's.)

@som-snytt
Copy link
Contributor

The other --wrinkle is #6499

@exoego exoego force-pushed the 2.12.x-compiler-options-exporter branch from c389328 to 4931561 Compare June 25, 2018 22:06
@exoego
Copy link
Author

exoego commented Jun 25, 2018

@SethTisue
Rebased against latest 2.12.x.

val yaml = mapper
.writer(new DefaultPrettyPrinter())
.writeValueAsString(source)
println(yaml)
Copy link
Author

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)
Copy link
Contributor

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

@SethTisue
Copy link
Member

@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?

@SethTisue SethTisue self-assigned this Aug 7, 2018
@exoego exoego force-pushed the 2.12.x-compiler-options-exporter branch from 75649ac to 41479e0 Compare August 7, 2018 01:36
@exoego
Copy link
Author

exoego commented Aug 7, 2018

@SethTisue
Just updated the sub project name.
Sorry for inactivity.

I would make separate PR so the compiler options export can export YAML to file, not stdout.

@dwijnand dwijnand merged commit 69f32c0 into scala:2.12.x Aug 8, 2018
@dwijnand
Copy link
Member

dwijnand commented Aug 8, 2018

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"
Copy link
Member

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] 	::::::::::::::::::::::::::::::::::::::::::::::

Copy link
Member

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?

@exoego exoego deleted the 2.12.x-compiler-options-exporter branch October 3, 2018 12:54
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.

7 participants