-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Some progress towards fixing mdocs #70
Conversation
Hmm. I was able to fix the docs completely by rolling back to mdoc 2.3.0 (as well as SJS to 1.7.0 as required by mdoc 2.3.0). So it seems like this is a regression actually, sorry @keynmol. |
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.
Thanks for investigating. 😄
The annotation changes you've made are all ones I've made before - so nice its to know I wasn't barking up the wrong tree completely. 😅
I guess I'll keep this open and leave the current docs as they are while we see if the regressions really is a regression and if it can be fixed.
Thanks again!
) | ||
.dependsOn(tyrian.js) | ||
// .dependsOn(tyrianIndigoBridge.js) |
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.
I'd really like to switch this for "io.indigoengine" %%% "tyrian" % tyrianDocsVersion
ideally, the current in dev version is the one I want the docs checked against. Feels like that should work but it threw up new problems for me.
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.
Ah but I guess that won't work because they're all published against a later version of Scala.js.
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.
Yeah, I wouldn't take any of the changes in this PR too seriously :) mainly, it's to demonstrate that things should work and hopefully help track down that mdoc regression in the latest release.
@@ -38,7 +38,7 @@ Commands can be produced as part of a result of calling the `init` or `updateMod | |||
|
|||
Here is an example in which, on receiving a message `Msg.LogThis`, we are not going to change the model, but we want to write to the browser's JavaScript console: | |||
|
|||
```scala mdoc:silent | |||
```scala mdoc:js:shared |
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.
Copying from Discord for posterity:
That file only has :shared
and :compile-only
modifiers - which means that there's no entry points to actually run the JavaScript code - which means it's probably being eliminated by the linker - which means it produced no JavaScript files, which in turn crashes the modifier.
Just changing one of the blocks from mdoc:js:compile-only
to mdoc:js
actually fixes the generation with Mdoc 2.3.1 and Scala.js 1.9.0.
I changed this one: https://github.com/PurpleKingdomGames/tyrian/pull/70/files#diff-c35eaeeeac3890e0c4181f6aebc4d5048b37049123f63dd434b48191d75dfad9R58
Thanks chaps! I believe I have now fixed this on the main branch. The comments you left were exactly what I needed. 🙏 |
So, this helps things but it's still broken.
If you remove the
cmd.md
page then the docs build fine. In fact, including only the following block is sufficient to break it.The stack trace points us to here, which was recently modified. Possible mdoc bug?
https://github.com/scalameta/mdoc/blob/9014e2d72db7e6c8def870bfbd4f53999582b024/mdoc-js/src/main/scala/mdoc/modifiers/JsModifier.scala#L163