mill icon indicating copy to clipboard operation
mill copied to clipboard

Add examples of mill + cask + scalasql

Open chaitanyawaikar opened this issue 8 months ago • 11 comments

Description

This PR solves the issue https://github.com/com-lihaoyi/mill/issues/4799. It includes creation of two new examples of the very popular TODO MVC app

  1. Cask + Scalasql as example 10-todo-webapp-cask-scalasql
  2. Http4s + Scalasql as example 11-todo-http4s-scalasql

Unit tests, integration tests and a short documentation have been added for each of these modules.

Commands to run the examples

# From the root directory

./mill "example.scalalib.web[11-todo-http4s-scalasql].local.server"

./mill "example.scalalib.web[10-todo-webapp-cask-scalasql].local.server"

chaitanyawaikar avatar Apr 12 '25 17:04 chaitanyawaikar

@chaitanyawaikar left some comments but otherwise looks reasonable

lihaoyi avatar Apr 16 '25 11:04 lihaoyi

Are these apps written from scratch or did you copy them from somewhere else? If they are copies, you should add a comment where they come from, which version you used and under which license they were shared.

lefou avatar Apr 26 '25 10:04 lefou

Are these apps written from scratch or did you copy them from somewhere else? If they are copies, you should add a comment where they come from, which version you used and under which license they were shared.

These apps are written from scratch. I checked the pattern of other examples written under /scalalib/web

chaitanyawaikar avatar Apr 26 '25 21:04 chaitanyawaikar

@chaitanyawaikar let me know when you want me to review this again, l'm not seeing the separate object integration test module and the leftover mill file is still there so I assume you're still working on it

lihaoyi avatar Apr 27 '25 04:04 lihaoyi

@chaitanyawaikar let me know when you want me to review this again, l'm not seeing the separate object integration test module and the leftover mill file is still there so I assume you're still working on it

@lihaoyi yes, I will try to complete this in 1-2 days. I am facing many issues running integration tests locally, hence started pushing code to remote CI server.

It may sound a bit trivial, but could you please let me know how to run the integration tests from within the examples ? I tried the following commands


# From inside the example ../mill/example/scalalib/web/10-todo-webapp-cask-scalasql
./mill __.test

# From the root project directory
./mill "example.scalalib.web.`10-todo-webapp-cask-scalasql`.test"

and none of them run only the integration tests only for that module.

However, running the complete test suite locally however crashes my system and this is slowing me down considerably. Any inputs here would be highly helpful to bring this to completion. Thank you 🙏

chaitanyawaikar avatar Apr 27 '25 06:04 chaitanyawaikar

@chaitanyawaikar the developer.md docs have the syntax

./mill "example.javalib.basic[1-simple].local.server"

lihaoyi avatar Apr 27 '25 07:04 lihaoyi

@chaitanyawaikar let me know when you want me to review this again, l'm not seeing the separate object integration test module and the leftover mill file is still there so I assume you're still working on it

The review comments have been addressed. Feel free to review them once again.

chaitanyawaikar avatar Apr 27 '25 17:04 chaitanyawaikar

Left some comments. build.mill files generally need a cleanup, please cross-reference them to the existing cask/http4s examples as well as the spring-boot and micronaut examples and follow the existing conventions.

Your example build.mill files appear to be missing Usage blocks. Again, please follow the existing examples and define them appropriately

Lastly, lets replace the existing Cask and Http4s examples with your new ones, rather than simply adding them on. The existing examples aren't really necessary once the new examples are in shape

lihaoyi avatar Apr 27 '25 22:04 lihaoyi

It's been too long since pull opened. are we moving forward with this or i can work on this to take it to finish line

i want to work on this issue as i am free from other self-work, so if there is no conflict, can i work on this

@lihaoyi @chaitanyawaikar

himanshumahajan138 avatar May 21 '25 17:05 himanshumahajan138

It's been too long since pull opened. are we moving forward with this or i can work on this to take it to finish line

i want to work on this issue as i am free from other self-work, so if there is no conflict, can i work on this

@lihaoyi @chaitanyawaikar

Feel free to take it to the finish line @himanshumahajan138

chaitanyawaikar avatar May 21 '25 19:05 chaitanyawaikar

@chaitanyawaikar Thanks for confirmation ✨

himanshumahajan138 avatar May 22 '25 05:05 himanshumahajan138

Closing out of inactivity

lihaoyi avatar Jul 04 '25 00:07 lihaoyi