q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a2ccdb7b2188c1832665981141fb9e3b9093866c

commit a2ccdb7b2188c1832665981141fb9e3b9093866c
Author: Daniel Kolesa <[email protected]>
Date:   Thu Apr 19 13:40:41 2018 +0200

    eolian: re-enable non-dependencied parsing
    
    The issue was that standalone-parsed files (outside of dependencies
    of some other unit) were not being included in that dependency tree
    (obviously) which resulted in their own dependency tree being
    excluded from merging, causing the database hashes to lack the
    necessary elements.
    
    To fix this, I trigger merging of the "standalone" dependency trees
    separately, by calling _merge_units from defer parsing cb.
---
 src/lib/eolian/eolian_database.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index f595878222..d9da402d90 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -876,6 +876,7 @@ database_defer(Eolian_State *state, const char *fname, 
Eina_Bool isdep)
 }
 
 static Eina_Bool _parse_deferred(Eolian_Unit *parent);
+static void _merge_units(Eolian_Unit *unit);
 
 typedef struct _Defer_Data
 {
@@ -885,15 +886,22 @@ typedef struct _Defer_Data
 
 static Eina_Bool
 _defer_hash_cb(const Eina_Hash *hash EINA_UNUSED, const void *key,
-               void *data EINA_UNUSED, void *fdata)
+               void *data, void *fdata)
 {
    Defer_Data *d = fdata;
+   Eina_Bool alone = ((size_t)data <= 1);
    Eolian_Unit *parent = d->parent;
    /* not a dependency; parse standalone */
-   /*if ((size_t)data <= 1)
-     parent = &parent->state->staging.unit;*/
+   if (alone)
+     parent = &parent->state->staging.unit;
    Eolian_Unit *pdep = _eolian_file_parse_nodep(parent, key);
-   return (d->succ = (pdep && _parse_deferred(pdep)));
+   d->succ = (pdep && _parse_deferred(pdep));
+   /* standalone-parsed stuff forms its own dependency trees,
+    * so we have to merge the units manually and separately
+    */
+   if (d->succ && alone)
+     _merge_units(pdep);
+   return d->succ;
 }
 
 static Eina_Bool

-- 


Reply via email to