Skip to content

Update to 0.12.0: oroperator does not exist? #235

Answered by jenshalm
hmf asked this question in Q&A
Discussion options

You must be logged in to vote

I'll give you an example for one of the blocks, the rest is hopefully self-explanatory.

First switch your dependency from laika-core to laika-io. The fromDirectory/toDirectory functionality is no longer part of core which is now a pure, side-effect free kernel.

Then add the io implicits: import laika.io.implicits._.

And somewhere outside of the function you are showing:

implicit val cs: ContextShift[IO] = 
  IO.contextShift(ExecutionContext.global)
  
val blocker = Blocker.liftExecutionContext(
  ExecutionContext.fromExecutor(Executors.newCachedThreadPool())
)

These objects should not be recreated on each run.

Likewise I'd recommend to pull the parser creation out of the function, as it i…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jenshalm
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #102 on October 28, 2021 17:37.