Subject: Fixing module configuration conflicts

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 12 Aug 2000 19:13:11 +0300

This subject was disscused a year+ ago, but no real solution to this
problem was implemented since then:

  http://www.hpc.uh.edu/fvwm/archive/9903/msg00230.html

In two words the problem is that if you have a module MyAlias2, all its
configuration will be passed to MyAlias module as well, which may result
in fatal errors for some modules.

If the syntax enables conflicts they will come (remember FormFvwmTalkHelp;
we at fvwm-themes have many such cases), Of course it is possible to solve
every individual conflict, but, instead, the conflicting syntax should be
resolved, i.e. introduced an alternative one.

I have a small patch, solving this problem. So both syntaxes are valid:

  *FvwmMyPagerLabel 0 Desk
  *FvwmMyPager:Label 0 Desk

Everything is fully backward compatible, but if you use the second (new)
variant, it is guaranteed that the configuration will only be passed
to FvwmMyPager and not, for example, to FvwmMyPage module.
The current implementation converts the new syntax to the old one (while
keeping the exact matching), because many modules rely on the old syntax,
but in the future, I hope, we could make a conflicting syntax obsolete.

Why I used colon? Originally Steve and Dan suggested colon, and I don't
care, as long as there is no conflict. Asterisk can't be used because of
DestroyModuleConfig, period can't be used because of the current FvwmForm.

The sooner a non conflicting syntax is introduced the better. We already
have in fvwm-themes about 50 module aliases for at least 6 FvwmModule's.
As a side note, we use a FvwmModule-SubName naming scheme for them,
which is just fine with a non conflicting syntax.

I want to apply this or similar patch before 2.4. Please comment.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Sat, 12 Aug 2000 14:09:47 -0400

> in fatal errors for some modules.
...
> I want to apply this or similar patch before 2.4. Please comment.

I don't understand.  All modules should be able to use the period.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 12 Aug 2000 22:09:08 +0300

> I don't understand.  All modules should be able to use the period.

Using a delimiter in module names is not a good idea, this is a hack,
which makes file names ugly and does not disallow conflicts in general.
Say you have MyAlias2. with a period at the end, still MyAlias module will
get its configuration. You can't force a delimeter in module alias names,
the solution is to make a delimiter a part of the syntax (your idea).

I really don't care if FvwmForm aliases remain the same as now, we only
need to be able to use a non conflicting syntax, so, say, configuration of
FvwmEvent-Sound will never be passed to a FvwmEvent module with no alias.
And as I wrote, it is easily solvable.

Regards,
Mikhael.

---

From: Dan Espen <[email-masked]>
Date: Sat, 12 Aug 2000 16:02:08 -0400

> which makes file names ugly and does not disallow conflicts in general.

I was beginning to like those trailing dots.
If its used for all modules, it works.

> the solution is to make a delimiter a part of the syntax (your idea).

Rereading what you plan to do, it does seem cleaner, the new delimiter
doesn't appear in the command sent to the module.  But still affects
the command matching done by InitGetConfigInfo.

> And as I wrote, it is easily solvable.

I think the changes to the FvwmForm to get rid of the period would
be easy.  Just change the filenames, makefile rules and man page.

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 15 Aug 2000 15:14:12 +0300

> to FvwmMyPager and not, for example, to FvwmMyPage module.

I would like to close some details.

1) Which delimeter to use. I think about colon/period (50%/50%), but any
other (not isalnum or asterisk or isspace) can be used too.

What others prefer?

2) It is possible to trivially patch FvwmForm to support old aliases with
a period at the end, so it could convert anything matching FormFvwm<name>.
to FvwmForm-<name> or whatever scheme we choose, for compatibility.

Should I do this?

3) Some time ago we with Olivier had a discussion about a naming scheme
convention for module alises, and decided that FvwmModule-IdName is a
clean and consistent scheme.

Any objections if I use this scheme if we rename files/aliases anyway?

Regards,
Mikhael.