Revert "eolian: strict validation for EFL (errors by default)"

This reverts commit 21a2a8007d.

Please run make check from time to time.
This commit is contained in:
Cedric BAIL 2016-02-17 14:34:20 -08:00
parent d8166c7507
commit 56a21ab5f2
2 changed files with 10 additions and 10 deletions

View File

@ -15,21 +15,21 @@ SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
$(MKDIR_P) $(dir $@); \
EOLIAN_VALIDATE_STRICT=1 $(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gc -o $@ $<
$(EOLIAN_GEN) --legacy --silent-types $(EOLIAN_FLAGS) --gc -o $@ $<
%.eo.h: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
$(MKDIR_P) $(dir $@); \
EOLIAN_VALIDATE_STRICT=1 $(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
EOLIAN_VERBOSE_TYPES=1 $(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
%.eot.h: %.eot ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
$(MKDIR_P) $(dir $@); \
EOLIAN_VALIDATE_STRICT=1 $(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
EOLIAN_VERBOSE_TYPES=1 $(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
$(MKDIR_P) $(dir $@); \
EOLIAN_VALIDATE_STRICT=1 $(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gh -o $@ $<
$(EOLIAN_GEN) --legacy --silent-types $(EOLIAN_FLAGS) --gh -o $@ $<
CLEANFILES += $(BUILT_SOURCES)

View File

@ -174,10 +174,9 @@ _ef_map_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
static Eina_Bool
_type_error(const Validator *vs, const Eolian_Type *tp, const char *msg)
{
Eina_Bool weak = !getenv("EOLIAN_VALIDATE_STRICT");
if (vs->silent_types)
return weak;
if (!weak)
return EINA_FALSE;
if (getenv("EOLIAN_VERBOSE_TYPES"))
{
fprintf(stderr, "eolian:%s:%d:%d: %s\n", tp->base.file, tp->base.line,
tp->base.column, msg);
@ -185,7 +184,7 @@ _type_error(const Validator *vs, const Eolian_Type *tp, const char *msg)
}
eina_log_print(_eolian_log_dom, EINA_LOG_LEVEL_WARN, tp->base.file, "",
tp->base.line, "%s at column %d", msg, tp->base.column);
return EINA_TRUE;
return EINA_FALSE;
}
static Eina_Bool
@ -213,7 +212,8 @@ _validate_type(const Validator *vs, const Eolian_Type *tp)
{
char buf[256];
snprintf(buf, sizeof(buf), "undefined type %s", tp->full_name);
return _type_error(vs, tp, buf);
_type_error(vs, tp, buf);
return EINA_TRUE; /* for now only warn */
}
return _validate_type(vs, tpp);
}
@ -246,7 +246,7 @@ _validate_type(const Validator *vs, const Eolian_Type *tp)
char buf[256];
snprintf(buf, sizeof(buf), "undefined class %s "
"(likely wrong namespacing)", tp->full_name);
return _type_error(vs, tp, buf);
_type_error(vs, tp, buf);
}
return EINA_TRUE;
}