-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
review quarkus cli command / flag structure #16033
Comments
By this light, we should also simplify create-extension to use an --extension flag
Create options:
.. more tomorrow (Will edit) ... |
Note, --jbang is an alternate build/layout like --gradle and --maven. But extension is arguably different "thing". |
It is.. but you could also think of it as a variant of what is being created.. you still end up with a project in the end. |
lets say we unified on |
What we should think of is a set options that |
Coming back to this after letting it percolate for a bit.... (also some simplifications after talking w/ Max)
Lots of room for improvement w/ list. Wondering about pinning/filtering based on platform version (even if platform version then still appears in the resulting list.. ). Starts to make the existence/selection of a platform meaningful w.r.t. where extensions come from...
I don't have an impulse to change add/remove, though part of me is thinking about tucking under a dependency command (dep add, dep remove, dep tree, .. ?!)
|
Nice. A thing to keep in mind is commands like |
it could certainly help make sure you add the right dependency in the right place (as you don't always need them in both places, ... ). But there are a few cases where I need the extension dependency in one or the other (but not both), so yes, extensions are trickier. We could either say add/remove isn't supported for extension projects, or figure out a middle ground (e.g. advice on what needs to be added where to add the dependency on the other extension) |
Just in case, if a runtime extension artifact depends on a runtime artifact of another extension, it should be mirrored in the deployment deps. And the other way around. |
Micrometer uses some extensions in the test scope (so only in deployment, not at runtime at all). Micrometer also uses other extensions optionally: so the optional dependency is in the runtime module, and maybe only the spi is in deployment (there are other checks in place to ensure paths aren't exercised if the other extension isn't there). |
What does create-cli actually do ? Just create quarkus project without default resteasy ? |
I kinda have mixed feelings that list works for both platform and extensions. not sure what implications are of the multiple platform notion. Wondering if list should be for extensions and a more generic query command to get info from the registry data ? |
create-cli creates a client project.. elevates the nature of using quarkus to create cli projects (where jbang wrapper would be included by default) |
I can see the mixed feelings re: platforms and extensions. In my head: platforms are a limiter on the extensions that are available (they are essentially an extension constraint). I see the following output for list (MAKING THIS UP):
Or:
There is a linkage between platform(s) and extensions. Reminding people which platform their project is using isn't a bad thing. |
so Not a big fan as jbang projects using quarkus is just as able to be non-cli as a standard quarkus app. like |
ok. If --jbang is shorthand for "create a jbang wrapper" .. then that should be the option (applicable wherever). I guess up for debate if create-cli constructs a project that is unique/different (which create-extension undeniably does) |
Above draft PR will let you play with options as I've messed with them so far.. and we can keep going more interactively.
create:
create-cli:
|
I personally find create extension challenging because it presents a lot of options for naming things without enough context about what the values are used for. If you use maven archetypes a lot, some of the things may feel more obvious, but for people that loathe them (like me), it's a bit mysterious. Here is an attempt with a LOT of help / context:
|
Trying to use shared option groups (e.g. the GAV groups for create and create-cli) is a little awkward when it comes to specify defaults because we use a different default "code-with-quarkus" vs. "cli-with-quarkus" .. I'm tempted to simplify and either use "code-with-quarkus" always. |
That makes sense, IMO, especially if it allows reusing some options and code. |
So I wonder whether it would make sense to turn such complicated commands ( |
picocli interactive options might also help... |
create-extension does have interactive prompting for options you don't specify.. See more conversation in the PR? @gsmet made some comments.. |
Does it? I can't see it anywhere but it could be that I just need more caffeine ;-) |
@ebullient there are 3 differents cases handled:
Is it that confusing? |
It is how it is determined and what attributes are (or are not) required that is magical/confusing. |
If too confusing, we could make the layout part of the options or different subcommands |
current cli outline looks like this:
they currently can be grouped in following categories:
project creation
create, create-jbang, create-extension
imo.
create-jbang
should be a--jbang
flag instead of its own command.platform/extension query/manipulation
list,add,remove/rm
platforms
kinda core to what we would like the cli to do but feels a bit weird we have list/add/remove/rm for extensions but then a separate platform command.
dev time commands
build, clean, dev
force: they abstract away wether you are doing maven or gradle (in future jbang could be included here)
weakness: you cant express clean build - they always end up as two commands ..
missing remote dev
missing commands/ideas:
update - would check if quarkus has a newer release and update the corresponding build artifact.
validate/lint - be able to see if using out-of-platform-bounds artifacts.
The text was updated successfully, but these errors were encountered: