Talking with @nrinaudo, who practices OCaml recreationally.
Desired Behavior
Currently, dune init is a bit frustrating in the way it initializes a project (in the reference libraries for testing). For example:
# dune init proj myproject
# cd myproject
# tree -I '_opam|_build' .
.
├── bin
│ ├── dune
│ └── main.ml
├── dune-project
├── lib
│ └── dune
├── myproject.opam
└── test
├── dune
└── test_myproject.ml
# cat test/dune
(test
(name test_myproject))
The library myproject is not referenced in the test.
From my perspective, we assume that a person who initiates a project would probably want to attach the library to the tests by default:
(test
- (name test_myproject))
+ (name test_myproject)
+ (libraries myproject))
Allowing a newcomer to avoid having to thoroughly research “how dune works” in order to start a project in a relaxed manner.
Same behaviour for with --kind=lib.