| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The `check` argument to `run_command()` is now mandatory.
(cherry picked from commit 3b5db10205023bfa43a9675a6ade826653a1c41c)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8e85d1ca937c166f07675d02fc84abb27d06ae11.
Marking colliding properties as not introspectable breaks
a bunch of existing API when compiling the GIR into the
typelib, so we'll have to find another solution during the
grace period.
|
|
|
|
|
| |
We prefer methods, signals, and virtual methods to properties, in case
of a collision.
|
|
|
|
|
| |
We can use them in Gjs to verify whether a value is properly packed
and unpacked to GValue.
|
|
|
|
| |
It's the only basic type missing, better to have for consistency.
|
|
|
|
|
| |
We want to be able to test whether it's possible to convert two
different fundamental types through GValue, so add a function for this.
|
|
|
|
|
| |
This can be used to test we don't do unexpected conversions between
invalid types.
|
|
|
|
|
|
|
|
|
|
| |
A fundamental type may or may not provide set and get value functions,
the regress implementations always provide one, so define a new type
with no such functions so that we can test this case in Gjs.
To avoid repeating lots of duplicated code, we re-use the same
functions of RegressTestFundamentalObject when possible, by using the
same structure.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hack that copies the doctemplates directory into the build
directory has stopped working with newer versions of Meson; while it's
possible to copy files, custom_target() cannot depend on a directory.
Additionally, the dependency has always been broken.
Instead, we enumerate the template files—after all, it's not like they
change a lot—and then we list them as dependencies for the test targets.
Fixes: #414
|
|
|
|
|
|
|
|
| |
Some functions are meant to exist for the entire duration of the
process, and thus have no need for a notification function because
one will never be called.
Fixes: #49
|
|
|
|
|
|
| |
If the (set-property) and (get-property) annotations on methods do not
round trip with the (setter) and (getter) annotations on the
corresponding property, we want to emit a warning.
|
|
|
|
|
|
|
| |
The heuristic is pretty trivial: for any given non-construct-only,
writable property, we check if there's a `set_<property>` method; for
any given readable property, we check if there's a `get_<property>`
method.
|
| |
|
|
|
|
| |
Add an accessors pair to Regress.TestObj and annotate them.
|
|
|
|
|
|
|
| |
This is so that GJS can use these variables in its own build files when
including gobject-introspection as a Meson subproject. Previously we
took the approach of using the files in their installed locations, but
that doesn't work as a subproject.
|
|
|
|
|
|
|
|
|
| |
The (out caller-allocates) and (out callee-allocates) annotations are
meant for structured or pointer types. Plain old data types are just
regular out parameters and don't need the annotation about who allocates
them.
See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2005
|
|
|
|
|
|
|
| |
This member will contain the string from the GEnumValue/GFlagsValue
'value_name' introspection dump.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
| |
Don't rely on runtime name, but on C header parsed symbol.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
| |
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
|
|
|
|
|
|
|
|
|
|
| |
Because of skepticism I received in #224, I made this PR which keeps the
testsuite and CI improvements but doesn't add any new build options. I
hope this would be less controversial:
- no new knobs
- tests for those using existing build options
- CI tests `build_introspection_data = false`
|
|
|
|
|
| |
meson.source_root() return the root of the main project, but in this
case we want the root of the gobject-introspection (sub)project.
|
| |
|
|
|
|
|
| |
The g_memdup() function has been deprecated, so we should use the new
g_memdup2() function if available.
|
|
|
|
|
|
|
|
| |
It is worth to test marshalling of signal arguments, add
a basic (and barebones) object to add signals and emission
methods to, so bindings can test the signal handlers.
Related: https://gitlab.gnome.org/GNOME/gjs/-/issues/377
|
|
|
|
|
|
|
|
| |
Otherwise we'll end up using the locale encoding. While it's usually utf-8,
that's not the case on Windows.
There is one place where a file with filenames is passed, not sure there
so I left it and passed a explicit None.
|
|
|
|
|
|
|
|
|
| |
This reverts commit de6512b31b614567bf1800406303d1ccfb6d9455.
This was causing naming conflicts when the SECTION documentation
was picked over the class documentation.
See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/360
|
|
|
|
|
|
|
|
| |
If g_value_get_enum() or g_value_get_flags() is about to fail with a
precondition check failure, we can improve diagnostics by issuing
a more informative critical warning.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
|
|
|
|
|
|
| |
Bindings sometimes need to handle flags and enums separately, so
everything that is tested for enums should ideally be tested separately
for flags.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
|
|
|
|
|
| |
We already had a test for enums, but flags are not precisely the same,
so testing both can give bindings better coverage.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When writing documentation to the GIR files, GIR tries to match
classes with their matching SECTION: comment in the source code. Some codebases
use kebab-case or CamelCase for their section names, but GIR always expects
them to be flatcase or the matching will fail.
This commit converts all section names to flatcase (by removing "-" and
converting to lowercase) while they are being parsed, so that they are matched
properly later on.
Fixes #350.
|
|\
| |
| |
| |
| | |
Add the notion of standalone doc sections.
See merge request GNOME/gobject-introspection!226
|
| |
| |
| |
| |
| |
| |
| |
| | |
Up to now, section annotations had to match a class or interface
name in order to be serialized in the gir.
With this commit, they now get serialized as docsection nodes,
for potential use by documentation tools.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was previously no mechanism for tagging enum members
and struct fields with Since tags (or other, eg deprecation tags).
While the customary place to add Since tags for these symbols
is inline in the parent symbol's documentation eg:
/**
* Foo:
*
* @FOO_BAR: some bar. Since X.Y
*/
And variations on that theme, implementing parsing for that scheme
would result in a pretty ambiguous grammar, especially if we also
want support for multiple tags.
Instead, the solution implemented here is to allow providing
documentation for individual members and fields through their
own separate block, as is done for virtual functions already.
Inline comments are still used, with a lower precedence.
Fixes #348
|
|
|
|
|
| |
meson.build_root() is the root of the main project, better use
meson.current_build_dir() instead.
|
|
|
|
|
|
| |
Breaks vapigen and changes GListModel definition in Gio-2.0.gir
This reverts commit a9f45431684e6be3623e272e54d481e4c5d9423d.
|
|
|
|
|
|
|
|
| |
GListModel is an interface for creating typed, list-like containers. The
data stored is GObject instances, but it's useful to be able to annotate
the actual type, for both documentation and code generation purposes.
The annotation should be optional, to maintain backward compatibility.
|
|
|
|
|
|
| |
This reverts commit b4c058bba4d95ae10e1e4238f9417fe954f97795.
See: #336
|
|
|
|
|
|
| |
This reverts commit ffe3e435e0b7943a0872034223b5f6ea02258ffa.
See: #336
|
|
|
|
|
|
| |
We need to special case the ListModel container type in the
documentation writer so that we don't fall back into array/list
automatic conversion in the code snippets.
|
|
|
|
|
|
|
|
| |
GListModel is an interface for creating typed, list-like containers. The
data stored is GObject instances, but it's useful to be able to annotate
the actual type, for both documentation and code generation purposes.
Fixes: #328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GTK4 allows adding widget-related actions to the documentation with the
newly defined syntax:
<class_name> '|' <action_name> ':'
This means g-ir-scanner needs to detect this new format, to avoid
emitting unnecessary warnings.
Currently, we don't do anything with the actions; in the future we might
want to add them to the documentation in the GIR, but for that we'd need
a new element.
See also: GNOME/gtk-doc!30
|
|
|
|
| |
Comparing floats directly doesn't always work on all architectures.
|
|
|
|
|
|
|
|
|
| |
parameters
Virtual functions may use input/output parameters but this is not currently
well handled by gjs, so adding test cases to gobject-introspection to verify
that virtual functions correctly receive valid input values and can return
them.
|
|
|
|
|
|
|
|
|
| |
There is no way that non-GCC/CLang compilers will pass this test because the
source position will never match the position that is in
tests/scanner/Regress-1.0-expected.gir.
Fix this the fast way: define a macro according to the compiler check and
update the corresponding source position
|
|
|
|
|
|
| |
We may get drive letters and paths either in upper or lower cases
in Windows, which are actually no different. Ignore the cases
in this case.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids compilation erroring out on C4819 (Unicode handling issue in the
Visual Studio compiler), notably when running on Chinese, Japanese and Korean
(CJK) locales.
This also applies -utf-8 into the cflags passed into the various g-ir-scanner
command lines that are used to generate the *.gir files, where -utf-8 is
available, so that we don't get flooded with C4819 warnings during the
build, and therefore avoid potential mishaps, as C4819 is a real warning that
warngs us the code may be incorrectly built.
|
|
|
|
|
|
|
|
| |
Check that g_object_info_get_ref_function_pointer() actually returns something,
which it doesn't if the shared lib isn't found.
In case a shared lib isn't found g-i will emit a warning, so also make sure
we fail on warnings to avoid similar problems in the future.
|
| |
|
|
|
|
|
|
|
| |
Similar to !180 this should prevent devs from not running all tests by
accident.
This also adds some checks for the required doctool dependencies, mako and markdown.
|