You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
When trying to update the zio documentation and using the latest zio-macros, there is an issue that is caused because mdoc wraps code snippets in objects or classes, with the imports inside the class. The error is:
error: ...docs/howto/mock_services.md:188:2: exception during macro expansion:
scala.reflect.macros.TypecheckException: not found: type ZIO
at scala.reflect.macros.contexts.Typers.$anonfun$typecheck$3(Typers.scala:44)
at scala.reflect.macros.contexts.Typers.$anonfun$typecheck$2(Typers.scala:38)
at scala.reflect.macros.contexts.Typers.doTypecheck$1(Typers.scala:37)
at scala.reflect.macros.contexts.Typers.typecheck(Typers.scala:51)
at scala.reflect.macros.contexts.Typers.typecheck$(Typers.scala:32)
| => dat scala.reflect.macros.contexts.Context.typecheck(Context.scala:18)
at scala.reflect.macros.contexts.Context.typecheck(Context.scala:18)
at zio.macros.core.ModulePattern$ZIOExtractor.unapply(ModulePattern.scala:31)
at zio.macros.core.ModulePattern$$anonfun$extractCapabilities$1.applyOrElse(ModulePattern.scala:152)
at zio.macros.core.ModulePattern$$anonfun$extractCapabilities$1.applyOrElse(ModulePattern.scala:151)
at scala.collection.immutable.List.collect(List.scala:308)
at zio.macros.core.ModulePattern.extractCapabilities(ModulePattern.scala:151)
at zio.macros.core.ModulePattern.extractCapabilities$(ModulePattern.scala:149)
at zio.macros.accessible.Macro.extractCapabilities(Macro.scala:23)
at zio.macros.accessible.Macro.apply(Macro.scala:49)
* Fix the mocking and use of macros
* Fix incorrect SBT statement
* Update assertions
* Add the test module dependency to the docs to that API breakages are
picked up when the changes are made to the test module
Note that the macro usage in the documentation can't be compiled because
of current limitations of macros, in which they can't be nested. See zio/zio-macros#62
* Fix the mocking and use of macros
* Fix incorrect SBT statement
* Update assertions
* Add the test module dependency to the docs to that API breakages are
picked up when the changes are made to the test module
Note that the macro usage in the documentation can't be compiled because
of current limitations of macros, in which they can't be nested. See zio/zio-macros#62
* Fix the mocking and use of macros
* Fix incorrect SBT statement
* Update assertions
* Add the test module dependency to the docs to that API breakages are
picked up when the changes are made to the test module
Note that the macro usage in the documentation can't be compiled because
of current limitations of macros, in which they can't be nested. See zio/zio-macros#62
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When trying to update the zio documentation and using the latest zio-macros, there is an issue that is caused because mdoc wraps code snippets in objects or classes, with the imports inside the class. The error is:
Here is a simple snippet to recreate:
The following fails:
Moving the import outside the object succeeds:
The text was updated successfully, but these errors were encountered: