Bug #466
openVarious multi component bugs
Description
Here is the patch... no need to explain. Note that I did not fix the rest of the code to make the regular template work (in particular with the genom_<"$comp">_activity_ether :
calcifer-adaptateur3:build felix$ git diff
diff --git a/templates/common/activity.h b/templates/common/activity.h
index ee34261..c6552b1 100644
--- a/templates/common/activity.h
+++ b/templates/common/activity.h
@@ -117,8 +117,14 @@ genom_tfini_activity(struct genom_activity *a)
}
}
+<'foreach c $components {'>
+<' set comp [$c name]'>
+<' foreach s [$c services] {'>
+/* <"[--- $comp =========================================================]"> */
+
+
static inline void
-genom_activity_ether(
+genom_<"$comp">_activity_ether(
struct genom_activity *a, genom_event ex, genom_context ctx)
{
assert(a->status != ACT_VOID); assert(a->status != ACT_ETHER);
@@ -143,12 +149,6 @@ genom_activity_ether(
}
-<'foreach c $components {'>
-<' set comp [$c name]'>
-<' foreach s [$c services] {'>
-/* <"[--- $comp =========================================================]"> */
-
-
/* <"[--- [$s kind] [$s name] -------------------------------------------]"> */
/* activity data */
diff --git a/templates/common/exception.h b/templates/common/exception.h
index 5a99310..db65dd4 100644
--- a/templates/common/exception.h
+++ b/templates/common/exception.h
@@ -20,7 +20,7 @@ lang c
# get exceptions with details, uniquifying on mangled name
set edict [dict create]
-foreach c $component {
+foreach c $components {
foreach t [$c types public] {
if {[$t kind] ne "exception"} continue
if {![llength [$t members]]} continue
diff --git a/templates/common/parameters-c.h b/templates/common/parameters-c.h
index 09457fe..f433dd5 100644
--- a/templates/common/parameters-c.h
+++ b/templates/common/parameters-c.h
@@ -19,6 +19,7 @@
args components
lang c
+set services [list]
foreach c $components {
lappend services {*}[$c services]
lappend services {*}[$c remotes]
(venv) calcifer-adaptateur3:build felix$
Files
FI Updated by Félix Ingrand 17 days ago
... and we need genom_<"$comp">_activity_ether because you test <"$comp">_ether in it... May be you have a smarter fix.
FI Updated by Félix Ingrand 16 days ago
- File genom3.patch genom3.patch added
- File genom3-pocolibs.patch genom3-pocolibs.patch added
Forget about the previous patch... here are 2 patches to at least make the pocolibs version to work.
AM Updated by Anthony Mallet 11 days ago
On Thursday 22 Oct 2026, at 17:23, François Félix Ingrand wrote:
... and we need genom_<"$comp">_activity_ether because you test
<"$comp">_ether in it... May be you have a smarter fix.
Yes, there is an ambiguity between `state <"$comp">_ether` and
`state NULL' to indicate a successful activity (without exception).
Does it break badly if I instead make it clear that `state == NULL` is
the `ether` state? This is consistent with functions that return
`genom_ok` (NULL) in case of success and also with what the exec_codel
does (it sets the state to NULL when a codel returns `ether`). It's
only in `genom_activity_ether()` that the state is put back to `ether`
when it's NULL.
Then `genom_activity_ether()` could remain generic as it was intended
to be.
AM Updated by Anthony Mallet 11 days ago
- Status changed from New to Resolved
This should be fixed with the attached commits, let me know
AM Updated by Anthony Mallet 11 days ago
- Project changed from genom3-pocolibs to genom3