scalaVersionto 2.13.13 on the docs project as well
Hi everyone, i was wondering if anyone is using mdoc with scala3 ... im running into this issue where im trying to use scala3 syntax in mdoc but for some reason it's failing on this:
error: /Users/tomas.herman/workspace/datadog4s/site/docs/userguide.md:180:41: `_` is no longer supported for a wildcard import; use `*` instead This construct can be rewritten automatically under -rewrite -source future-migration. import com.avast.datadog4s.extension.jvm.*
Basically it's complaining about
_ not being supported and forcing me to use
*, which is fine ... but i'm already using
Any ideas why that is?
@tomasherman: the scala 3 support is supper new and you might be the first person to actually test it :) is this issue minimizable or at least somewhere I can take a look at a reproduction?
I'm asking because the code generator for Scala 3 is new and different, so it may as well have problems
tutNameFilter := """.*\.(md|json|css|html)""".r
mdoc / include := """.*\.(md|json|css|html)""".r
sbt docs/mdoc, I get below error
/Users/rajkumar.natarajan/Documents/Coding/OS/reftree/build.sbt:121: error: not found: value include
mdoc / include := """.*.(md|json|css|html)""".r,
sbt.compiler.EvalException: Type error in expression
scalain my snippets, I get syntax highlighting and autocomplete, but when I use
scala mdoc...I get all the cool features of mdoc, but lose the basic Scala features in the IDE
I've defined a
PostModifier, which is working great.
Goal: Combine this with the Predefined Modifiers, to write snippets like
If I do
format:crash, then crash is ignored, because it's just an unused parameter to my custom
If I do
crash:format, then I get
Invalid mode 'crash:format'
Is there some way of saying "I want both of these behaviors, but independently, rather than trying to parse them as some combined operation" ?
Does MDoc not support Scala 3 end markers?
'''scala mdoc (Backticks in my actual code) def displayTemperature( behavior: String ): String = val temperature = try getTemperature(behavior) catch case (ex: RuntimeException) => null "Temperature: " + temperature end displayTemperature '''
When I execute
mdoc in my project now, I get this-
Not found: end end displayTemperature ^^^
If I remove the end markers, the rest of the Scala 3 syntax (eg optional braces) works fine
Hey all, another question about potential features-
Would in-line/single backtick fences that are verified by mdoc be possible?
The amount of refactoring I am able to confidently do on my larger code fences is awesome, but now of course I'm getting greedy and want that power in-line too :)
I wouldn't actually want the full capabilities from fenced blocks (
crash, etc), but primarily basic existence checks.
More concretely, if I have this in my document:
```scala mdoc def badlyNamedFunction() = ??? ``` Blah blah, call `scala mdoc badlyNamedFunction`, then blah blah
Then later I renamed
perfectlyNamedFunction, it would be fantastic if mdoc would break and alert me that I was referring to a non-existent function.
v2.2.23? I'd love to take advantage of scalameta/mdoc#551 :slight_smile:
I'm getting a weird error message the latest mdoc release.
This code was working on
```scala mdoc import zio.ZIO import zio.Runtime.default.unsafeRun def getTemperatureZ(behavior: String): ZIO[ Any, GpsException | NetworkException, String ] = if (behavior == "GPS Error") ZIO.fail(new GpsException()) else if (behavior == "Network Error") // TODO Use a non-exceptional error ZIO.fail(new NetworkException()) else ZIO.succeed("30 degrees") unsafeRun(getTemperatureZ("Succeed")) ``` ... other prose and fences ... ```scala mdoc:crash unsafeRun( getTemperatureZ("GPS Error") ) ```
but now gives this error:
12_Hello_Failures.md:160 (mdoc generated code) Line is indented too far to the left, or a `}` is missing $doc.endStatement();
mdoc:crashfence, regardless of what I put in between the 2 fences