#428: Forbid configuration names ending in -reconfig ----------------------+----------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Keywords: | ----------------------+----------------------------------------------------- I accidentally created a Cactus configuration with a name like "sim- reconfig". This confuses Cactus, because the command "make sim-reconfig" can then mean either to build the "sim-reconfig" configuration, or to reconfigure the "sim" configuration.
Cactus should catch and forbid these cases.
This is probably most cleanly handled by using a script instead of a Makefile to interpret the user commands.
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+---------------------------------------------------- Changes (by knarf):
* status: new => review * version: => development version
Comment:
The only possibility I could create such a configuration is using 'make sim-(re)?config-config'. The attached patch catches this. Please review. Also, please try to remember if this was the way you could create such a configuration, or if there is another way not covered by this patch.
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by hinder):
Since the cactus make system uses '-' as a separator, I propose that configuration names should not contain '-' at all. We can introduce a warning saying that such names are deprecated.
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by knarf):
I agree with Ian, and changed the patch. However, in contrast to Ians suggestion creating a configuration containing a dash is now not introducing a warning, but a fatal error. A warning that early in the configuration process will most likely go unnoticed anyway.
The patch changes the Makefile to produce an error as early as possible, but also checks the configuration name in the actual setup. The second test should not be triggered if everything was caught on the makefile level already, but you never know...
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by eschnett):
Simfactory generates names containing dashes by default, e.g. "sim-debug" or "sim-profile".
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by knarf):
Then we need to decide: forbid '-' entirely, or blacklist only '-' followed by any valid Cactus option (about 17, but frankly we should remove some of them anyway). I don't like either option very much.
Dashes are a popular delimited that, if possible, we should make available to the users. A blacklist might be the best option, even it it means to have some ugly long regex twice in the Makefile plus in the setup perl script - which is a nuisance to maintain. Opinions?
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by eschnett):
My suggestion: Live with the ugliness until we replace the "make *-command" with something that has a better syntax, e.g. "cactus command *". There exist several attempts at rewriting the top-level makefile in Python, and there's no reason not to do so (except time).
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by rhaas):
I'd rather take the minimally invasive solution and only forbid the configuration names that have Cactus commands in their name.
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: knarf Type: defect | Status: accepted Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+---------------------------------------------------- Changes (by knarf):
* owner: => knarf * status: review => accepted
Comment:
Taking this off review until there is a new patch.
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: knarf Type: defect | Status: accepted Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by knarf):
I created https://bitbucket.org/cactuscode/cactus/pull-request/5 /setup_configurationpl-disallow/diff to be done with this ticket. It checks for existing Cactus configuration options, and aborts if configuration names end with those.
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: knarf Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+---------------------------------------------------- Changes (by knarf):
* status: accepted => review
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: knarf Type: defect | Status: reviewed_ok Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------+---------------------------------------------------- Changes (by eschnett):
* status: review => reviewed_ok
Comment:
Please apply.
#428: Forbid configuration names ending in -reconfig -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: knarf Type: defect | Status: closed Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: -----------------------+---------------------------------------------------- Changes (by knarf):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
merged.
trac@lists.einsteintoolkit.org