Project

General

Profile

Actions

Bug #466

open
FI AM

Various multi component bugs

Bug #466: Various multi component bugs

Added by Félix Ingrand 17 days ago. Updated 11 days ago.

Status:
Resolved
Priority:
Normal

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

genom3.patch (4.14 KB) genom3.patch Félix Ingrand, 2026-10-23 14:04
genom3-pocolibs.patch (1.29 KB) genom3-pocolibs.patch Félix Ingrand, 2026-10-23 14:04

FI Updated by Félix Ingrand 17 days ago Actions #1

... 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 Actions #2

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 Actions #3

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 Actions #4

  • 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 Actions #5

  • Project changed from genom3-pocolibs to genom3
Actions

Also available in: Atom