Commit Graph

1060 Commits

Author SHA1 Message Date
Daniel Kolesa c601944a13 eolian: fix a parse bug where composites was treated as implements
In the specific case where you had "class A extends B composites C"
the correct composites branch was ignored and instead the implements
branch was used. This was entirely wrong/an oversight that did not
appear until now. Other combinations were handled correctly.
2019-12-04 16:07:09 +01:00
Daniel Kolesa c360f5edb6 eolian: account for entire inheritance trees when compositing
When a class composites an interface, we need to ignore all of
its extends (and extends of those) as well as the main interface
when doing API checks, as composites essentially provides a
guarantee that this *will* be implemented at runtime, which
further extends to the whole inheritance tree of that interface.

Fixes T8491.
2019-12-04 15:30:17 +01:00
Daniel Kolesa 9f50f08349 eolian: emit correct c_name for keyword builtins 2019-12-02 12:09:50 +01:00
Marcel Hollerbach 40571bf0ee eolian_aux: do not leak 2019-12-02 08:53:46 +01:00
Daniel Kolesa a1cb493d4f eolian: fix memory leak when using error objects 2019-11-15 13:36:57 +01:00
Lauro Moura 86191b02c7 eolian: Leave default text for libeolian users
Summary:
Instead of setting the default text at the library level, keep the
summary empty if nothing is provided.

The libeolian users them are free to check if the summary was actually
empty or a placeholder text was added.

ref T8309

Test Plan: Run attached tests

Reviewers: q66, segfaultxavi

Subscribers: cedric, brunobelo, #reviewers, felipealmeida, #committers

Tags: #efl

Maniphest Tasks: T8309

Differential Revision: https://phab.enlightenment.org/D10285
2019-10-09 16:18:30 +02:00
Davide Andreoli 3cdb87990a Pyolian gendoc: add ability to generate only the stable API
gendoc.py --exclude-beta

generate the docs excluding all the classes/types/etc in beta state,
a bit hackish but do the job. There are some broken links around that
refer to objects in beta state that are (correctly) not generated,
nothing we can do to fix this.
2019-10-07 19:39:07 +02:00
Daniel Kolesa 71c83d2005 efl: add code to enforce presence of @since tags
This is not yet enabled because there's too many instances where
this is broken.

Ref T7704
2019-09-30 20:12:35 +02:00
Xavi Artigas 835e230f2f Revert "eolian: disallow missing docs for stable API where necessary"
I'm afraid but this breaks the mono bindings too close to a release.
This also fixes the missing docs errors by adding a lot of inconsistent
placeholder text ("No description supplied.", "TBD") which will make
finding them later on more complicated.

I was the one that asked for this feature but it is not critical at this
point, so I suggest we explore some refinements (like T8291) before landing
this patch in its current state.

This reverts commit 2946cb3c32.
2019-09-30 19:48:19 +02:00
Daniel Kolesa 2946cb3c32 eolian: disallow missing docs for stable API where necessary
The things that require docs include classes, variables, typedecls,
events and methods/properties. Implements, params, returns, parts
and struct/enum fields don't require them.

Empty/whitespace only string does not count as documentation.
2019-09-30 18:21:17 +02:00
Daniel Kolesa 27291b4486 eolian: fix potential ABI violation in expr serialization
While this may seem safe, and likely is on any 64-bit system,
it may not be entirely well defined. And in this case we should
not have to worry about copying.

Maybe fixes T8276...
2019-09-30 11:32:41 +02:00
Daniel Kolesa 79aa86df5a eolian: better error message for const on strings 2019-09-26 17:33:44 +02:00
Daniel Kolesa b0ee540ec9 eolian: rename param direction enum and fields for consistency 2019-09-26 16:56:13 +02:00
Daniel Kolesa cdff7852e0 eolian: loosen the requirements on API (don't return stringshare) 2019-09-26 16:47:22 +02:00
Daniel Kolesa 6d93dc4cbf eolian: rename event_prefix to event_c_prefix for consistency 2019-09-26 16:47:22 +02:00
Daniel Kolesa 7e10d96d27 eolian: move EOLIAN_TYPE_BUILTIN_HASH into beta section 2019-09-26 16:47:21 +02:00
Daniel Kolesa a95870286e eolian: stricter checks for const() validity 2019-09-26 16:19:12 +02:00
Daniel Kolesa 71cd89c580 eolian: expose most API as stable
There is still some TODO with builtin types, parameter
directions and prefixes, which will be resolved in the
next commits.
2019-09-25 18:26:07 +02:00
Daniel Kolesa 92da64a532 eolian: remove support for globals
This was meant to happen but did not previously happen. It is not
ideal to do it now but better do it while we still can.

In short, this removes one half of the variables API (keeps
constants as they are) and repurposes the API to be only for
constants. This is also better for consistency to match errors.
2019-09-24 18:27:37 +02:00
Daniel Kolesa 553ce69bad efl: remove remaining instances of .eo global variables 2019-09-24 18:27:37 +02:00
Daniel Kolesa 4ce7444dd1 efl: use new eolian error functionality instead of globals
Also enable referencing errors in docs.
2019-09-24 16:29:55 +02:00
Daniel Kolesa 74becf76c0 eolian: allow read-only stringshare in events
While the type cannot be moved to the callee, it at least provides
a hint that it's a stringshare, leeting people ref it instead of
copying.
2019-09-23 15:26:23 +02:00
Daniel Kolesa 53a3326ddc eolian: rename any_value_ptr -> any_value_ref for consistency 2019-09-20 18:03:39 +02:00
Daniel Kolesa 7cbd08ee8c eolian: string(share) is always const, allow in events out of box 2019-09-20 17:47:43 +02:00
Daniel Kolesa 718f3cd495 eolian: make hashes beta-only for now
They're not completely settled on and we don't even know if we want
them at all. So let's make them beta only for now.

Ref T8050.
2019-09-20 17:04:48 +02:00
Daniel Kolesa 539dc642e9 eolian: remove the composite keyword (replaced by composites) 2019-09-19 18:20:56 +02:00
Daniel Kolesa bc793753cb eolian: allow composites keyword in place of composite
Fixes T8218.
2019-09-19 18:20:56 +02:00
Daniel Kolesa 46a6949b2e eolian: auto-add composited interfaces into implements if needed
The condition here is that the composited interface does not
already appear in the inheritance tree of the given class. If
it does, don't add. If it doesn't, add it to the class that
specifies the composited block.
2019-09-19 18:20:56 +02:00
Daniel Kolesa 4de4995fa2 eolian: return NULL instead of EINA_FALSE on safety checks 2019-09-19 16:05:34 +02:00
Daniel Kolesa 1f19af7780 eolian: disallow void for out/inout for stable API 2019-09-18 21:09:15 +02:00
Daniel Kolesa 4a60495d91 eolian: skip funcs from beta-classes when unimplemented-checking 2019-09-17 13:48:44 +02:00
Daniel Kolesa 81441638db eolian: enable unimplemented function errors for stable API 2019-09-17 12:36:50 +02:00
Daniel Kolesa d9594dbc9d eolian: drop @ctor_param and the associated APIs
This has been unused for a while, and has been just lingering
around the code, so drop it so it doesn't make it into a release.
2019-09-16 15:37:04 +02:00
Daniel Kolesa 266fd9bb36 eolian: support complex monospace syntax $[...]
This is to allow monospace bits with periods, commas and other
non-alphabetical characters. Newlines are not supported (they end
the block) and escapes are supported (for ]).

Fixes T8213.
2019-09-13 16:58:49 +02:00
Xavi Artigas 4c018509c5 eolian: Remove the EOLIAN_PROPERTY_DOC_WARN envvar
This test is now always enabled, so ALL properties should have property-level
documentation. Setter and getter docs are optional.
2019-09-13 12:41:16 +02:00
Daniel Kolesa afc011d893 eolian: hard ban usage of ptr() in stable API 2019-09-10 14:35:41 +02:00
Daniel Kolesa b6815a2f99 eolian: account for @by_ref when serializing return types
This fixes cases such as missing const when having a @by_ref
return type. The const should not be avoided there because it
is not returning the whole type as const, just what the pointer
dereferences to.
2019-09-10 14:17:53 +02:00
Daniel Kolesa 5cd851ea25 eolian: consider @by_ref marked elements ownable 2019-09-10 14:10:49 +02:00
Daniel Kolesa b880a1c7e8 eolian: add an optional warning for ptr() usage in stable API 2019-09-10 14:06:46 +02:00
Daniel Kolesa 267c57d0f1 eolian: remove second parameter for eolian_type_c_type_get
This has been replaced by newer APIs.
2019-09-09 18:26:49 +02:00
Daniel Kolesa 3b540fc9f9 eolian: remove @owned keyword 2019-09-06 17:07:01 +02:00
Daniel Kolesa 67c2a4f5f1 eolian: disallow duplicate entries in requires/composite sections 2019-09-06 16:58:49 +02:00
Daniel Kolesa eb25e92770 eolian: change composite syntax from block to inheritance section
This makes more sense as these are related to inheritance tree.
Therefore, change while we still can.

Fixes T8183
2019-09-06 15:14:20 +02:00
Daniel Kolesa 917b5feb27 eolian: make sure to include by_ref in validation of expressions 2019-09-04 18:26:13 +02:00
Daniel Kolesa 6751f011c1 eolian: remove the expression eval_type API
This is unnecessary because for all contexts where type is
relevant the validator already makes sure the type and expression
match correctly, so you don't ever need to re-validate it. If you
are doing a generic case and are not sure, just use MASK_ALL.
2019-09-04 18:02:47 +02:00
Daniel Kolesa d7397aca4d eolian: proper error message for @by_ref on pointer types 2019-09-04 16:27:54 +02:00
Daniel Kolesa 0275ef0f33 eolian: add APIs to get full C types of parameters/returns/fields
These are needed because the type itself does not carry all the
information it needs to carry (particularly by_ref).
2019-09-04 16:27:54 +02:00
Daniel Kolesa 99754341e7 eolian: add support for function pointers in utility APIs 2019-09-03 16:51:58 +02:00
Daniel Kolesa d9551af6e1 eolian: fix typos in function_return_is_by_ref 2019-09-03 16:51:58 +02:00
Daniel Kolesa 0b6e8f71f1 eolian: move all tests to use the new @move syntax and API 2019-09-02 15:24:14 +02:00