Skip to content

Update metaconfig, publish cli for Scala 3#563

Open
keynmol wants to merge 5 commits into
scalameta:mainfrom
keynmol:metaconfig-3
Open

Update metaconfig, publish cli for Scala 3#563
keynmol wants to merge 5 commits into
scalameta:mainfrom
keynmol:metaconfig-3

Conversation

@keynmol

@keynmol keynmol commented Sep 27, 2021

Copy link
Copy Markdown
Collaborator
  • Normalise location of dependency versions
  • Update metaconfig to 0.9.15 for all but Scala 2.11
  • Re-enable CLI cross-publishing for Scala 3

@keynmol keynmol changed the title Updat metaconfig, publish cli for Scala 3 Update metaconfig, publish cli for Scala 3 Sep 27, 2021

@olafurpg olafurpg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment thread build.sbt
val ms = "2.1.1"
}

def pprint(scalaV: String) =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI these can also be defined as val pprint = Def.setting { if (scalaVersion.value) ... } and then used as pprint.value

@keynmol

keynmol commented Oct 5, 2021

Copy link
Copy Markdown
Collaborator Author

@tgodzik I remember you mentioned something about scala 3 and pprint in mdoc..

I had to modify a few tests to make them work - not actually sure why, but can you confirm that what you were referring to was TPrint, not printing of values?

@tgodzik

tgodzik commented Oct 5, 2021

Copy link
Copy Markdown
Contributor

We don't use pprint for Scala 3, that's because we didn't want to wait for the new versions to be released (it's not a problem now) and also Martin was using worksheets for Moocs, which he preferred to have normal toString for.

We could switch to pprint now, but it would probably be good to have a modifier for toString

@keynmol

keynmol commented Oct 5, 2021

Copy link
Copy Markdown
Collaborator Author

I think a modifier like no-pprint will be very welcome, by, say, FP folks.

That said, I can restore the old behaviour on Scala 3 - I'm just not sure how pprint was excluded before. I think Scala 2 and Scala 3 share the ReplVariablePrinter?

@tgodzik

tgodzik commented Oct 5, 2021

Copy link
Copy Markdown
Contributor

It was a separate implementation classes called Printing in: https://github.com/scalameta/mdoc/blob/main/runtime/src/main/scala-3/mdoc/internal/document/Printing.scala

If I understand correctly what you are asking about 🤔

@olafurpg

Copy link
Copy Markdown
Member

I think a modifier like no-pprint will be very welcome, by, say, FP folks.

@keynmol there is a mdoc:to-string modifier that disables pprint https://scalameta.org/mdoc/docs/modifiers.html#to-string

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.

3 participants