Make a monomorphic and monofunctorial distage-example variants
An attempt to implement https://github.com/7mind/izumi/issues/1525
There are two issues with this P/R:
- This code is still polymorphic. It's polymorphic code abstracting from monofunctor it runs on.
- This P/R just replaces existing code while we want to have a separate example
I would suggest the following:
- Let's move our existing code into a directory like
distage-example-bifunctor-tf - Let's put your code into new directory,
distage-example-monofunctor-tf - We still need
distage-example-cats-monomorphicwhich will use the effect (whichever it is, let's assume cats-effect) directly.
There are two issues with this P/R:
- This code is still polymorphic. It's polymorphic code abstracting from monofunctor it runs on.
- This P/R just replaces existing code while we want to have a separate example
I would suggest the following:
- Let's move our existing code into a directory like
distage-example-bifunctor-tf- Let's put your code into new directory,
distage-example-monofunctor-tf- We still need
distage-example-cats-monomorphicwhich will use the effect (whichever it is, let's assume cats-effect) directly.
Yep, I see. About replacing code - I initially thought to do it as Kai suggested in the original issue. To make PR here and then put it another repository, but separate directories sound good as well. To clarify: they also have to be in separate sbt modules?
Yep, I think so.
Sorry for enormous lines of code changes. They are caused by moving and copying src/main/resources/META-INF.native-image/docker-java.
Also, I had problems with launching GraalVM build locally, so did not actually check that commands from CI work as expected.
Thank you very much! 🙏 There are a still a few small issues left before merging, though
Thanks for your time! Fixed most of the minor issues. Still not exactly sure about CI native image step. I divided it into three consequential steps but have few doubts whether it is a correct way to do it. Probably, it is better to launch them in parallel or just check bifunctor variant alone.
Probably, it is better to launch them in parallel or just check bifunctor variant alone.
@Ivoyaa Yeah, check native image step only for bifunctor.
@neko-kai @pshirshov hi! Fixed the CI step, can you, please, launch it again?
upd: oh, its automatic
@pshirshov @neko-kai hi! Can you review this PR again, please? 👀
@Ivoyaa Thank you! Sorry for the wait for merging 🙏