lazbuild has a default action,
The archive can both pack and unpack, so it needs to be given a command. lazbuild, as the name implies, builds, so it is logical that this is its default command, and the rest must be specified explicitly.
Yes, we agree, lazbuild has a default action.
IMHO, the more important to distinguish anything that
replaces this default.
Most parameters are
"modifiers", they affect "how to build" or "what to build". They don't replace the "build" itself.
Only one command should be allowed at a time. I don't see any benefit to using multiple values in scripts, how can the script separate them? Moreover, as you noticed, this leads to even more questions and possible hidden errors.
In general, yes. But it wont hurt to think about it for the interface, in case something comes up, that changes that.
Like printing the settings used for a build into a file for later usage.
Then you may want to do all of it, build, and get-this and get-that, .....
I don't encourage it, but I don't know what will be in 2, 5 or 10.37 years.
Let me remind you that several such parameters already exist. Will they remain as an exception to maintain backward compatibility? Or will they also need to be specified in "--action"?
Yes, we already have a mess. And yes, most of it will likely have to be kept for compatibility.
Does that mean we have to make it even messier? Or should we at some point try to get some concept into this?
If we need to add parameters, we will add something like: --set-build-mode, --check-lpi, --update-lpi and so on. This fits easily into the already existing --create-makefile and --add-package-link. In addition, all these words are verbs that denote actions.
Users can only learn about the parameters from the help, and there will be a clear list of "actions" and parameters for each of them. In helping, this division will be appropriate.
It seems to me that you underestimate users too much)) All Lazarus users are programmers. They'll figure it out easily.
Yes, we could... And today already something like "--create-makefile" does it
- create a makefile that it will then use to do the build? (because, the default - unless explicitly disabled - should be to build)
- just create the makefile
Yes, the answer is in the doc/help. But self-explaining params would be nice.
To be honest, I don't fancy the extra long --action=
But I even less fancy the "mixing it all together".
So if there is another idea, which solves both....