Open jiribenes opened 4 months ago
If someone tackles this issue, it would be also nice to tackle https://github.com/effekt-lang/effekt/issues/540 as a drive-by :)
What about validating the options instead of using sub commands? https://github.com/scallop/scallop/wiki/Arguments-validation#mutually-exclusive
I am afraid that while server, repl, build, compile are all mutually exclusive, they all share (more or less) the same options and by using sub commands, these options would not be directly visible to the outside without a nice way to query them. https://github.com/scallop/scallop/wiki/Arguments-validation#mutually-exclusive
After we do this:
We have accumulated a lot of CLI flags, but many of them are just exclusive commands. https://github.com/effekt-lang/effekt/blob/7de9eff01bf7ab87059a564dea4e7a103b7145e7/effekt/jvm/src/main/scala/effekt/EffektConfig.scala#L8-L165
Instead, we might want to move to subcommands, so something like:
This would also allow us to then add other commands like
effekt fmt
for formatting,effekt watch
for rebuilding files upon file change, andeffekt doc
for documentation generation in the future.