- changed version to development version
- changed status to open
- removed comment
Forbid configuration names ending in -reconfig
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.
Keyword:
Comments (12)
-
-
- removed comment
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.
-
- removed comment
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...
-
reporter - removed comment
Simfactory generates names containing dashes by default, e.g. "sim-debug" or "sim-profile".
-
- removed comment
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?
-
reporter - removed comment
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).
-
repo owner - removed comment
I'd rather take the minimally invasive solution and only forbid the configuration names that have Cactus commands in their name.
-
- changed status to open
- assigned issue to
- removed comment
Taking this off review until there is a new patch.
-
- removed comment
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.
-
- changed status to open
- removed comment
-
reporter - changed status to open
- removed comment
Please apply.
-
- changed status to resolved
- removed comment
merged.
- Log in to 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.