comonicon / Comonicon.jl

Your best CLI generator in JuliaLang
https://comonicon.org
MIT License
282 stars 25 forks source link

Base now exports `@main` #257

Open baggepinnen opened 11 months ago

baggepinnen commented 11 months ago

Recently, Base julia has started to export a @main macro, leading to conflicts with Comonicon.@main. It would be enough to edit all documentation of this package to qualify the use of @main with Comonicon.@main, and likely also a good idea to stop exporting @main so that the warning of conflict is silenced.

Roger-luo commented 11 months ago

yeah, unfortunately, that will be a lot of work that I don't currently have the bandwidth to work on. some help would be nice! First, we need to develop a new name for marking the entrypoint of a CLI. Instead of keeping the @main macro otherwise, it will be confusing. Then update all the docs and exports.

camilogarciabotero commented 10 months ago

Just a couple of ideas that came to my mind:

@app
@run
@execute
@command
@compose
@runner
@launch
@commonicon

The @app is used for instance in Typer.

Roger-luo commented 10 months ago

Thanks! I like the first two (@app and @run) wondering if other people have an opinion on this. This would surely be breaking, so we will need to release a 2.0 version to have this. The non-breaking part probably can start with not exporting @main and documenting this behavior and tag a minor version? (If this is acceptable).

Maybe I should release a patch version that caps the Julia version first so we make sure previous CLI apps don't get broken by default? Then we jump into a minor version document the @main macro, then collect a bit more breaking features to release 2.0? I'd like to change a few other things before doing the next major release, given that 1.0 of Comonicon wasn't around for very long...