| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This provides a test case for https://bugzilla.gnome.org/show_bug.cgi?id=722104
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove GInitiallyUnowned special case in gdumpparser where fields are
copied from GObject. Add generic solution where anytime we have multiple
typedef structs, the fields become shared:
typedef struct _Foo Foo;
typedef struct _Foo Bar;
struct _Foo {...};
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
| |
Add structs parsed from C's "tag namespace" into their own cache for lookup
by typdef parsing. This fixes issues where a typedef declared after a
struct would not have a correct name. This also cleans up the need for
special casing struct tags prefixed with an underscore.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
| |
There was some dependence on the serial test harness in the recent tests
that were added. Update GI to use the parallel test harness to avoid
incompatibilities.
https://bugzilla.gnome.org/show_bug.cgi?id=721477
|
|
|
|
|
|
| |
Add a basic transformer unittest for callback typedefs.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
| |
Add a sub-set of tests found in struct testing as only basic validation is
needed due to the shared code paths.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
| |
Add tests for nested structs as they pass through the transformer.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
| |
Add tests for various combinations of struct tags and typedefs. This
includes tests for orderings of a typedef prior to struct definition,
reversed, all in one, and multiple typdefs. The currently failing tests have
been marked as "expectedFailure" so the test suite doesn't bail out.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use g_slist_copy prior to returning the lists run through g_slist_reverse.
This preserves the source scanners internally held lists where previously
they would only point to a single element after a call, leaking memory and
breaking subsequent calls. Note the functions as (transfer container) and
use g_slist_free after calls in the Python bindings.
Add new unittest file: test_sourcescanner.py for isolated unittesting of the
SourceScanner.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
| |
Add functional blackbox tests typedefs.[h|c] for various struct typedef
orderings. Use XFAIL_TESTS with the new Typedefs-1.0.gir target.
This allows for a differing expected gir that does not cause the suite
to fail but rather a goal to work towards.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Python unittest module parameterization support to gi-tester through the
use of a "TESTARGS" variable. Use the Automake test harness along with
gi-tester for running the Python annotationparser tests.
Add tests/scanner/annotationparser/Makefile.am and localize testing
rules and EXTRA_DIST setup to this file. Specific Python tests can now be
run as follows:
cd tests/scanner/annotationparser
make check TESTS=test_patterns.py TESTARGS=TestTagValueStability
https://bugzilla.gnome.org/show_bug.cgi?id=720713
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update both test_parser.py and test_patterns.py to dynamically generate
TestCase sub-classes rather than modify a statically defined one.
Use unittest.TestSuite to queue up the generated test cases via the
"load_tests" hook.
Use underscores instead of periods as a seperator for dynamically generated
test cases and methods to match Python identifiers.
Beyond general cleanup, these changes will help the ability to specify
Python tests individually.
https://bugzilla.gnome.org/show_bug.cgi?id=720713
|
|
|
|
|
|
|
|
| |
Update tests/Makefile.am and tests/scanner/Makefile.am to use
EXTRA_LTLIBRARIES which minimizes the building of libraries to only
dependencies of specific tests when using: make check TESTS="..."
https://bugzilla.gnome.org/show_bug.cgi?id=720713
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add gi-tester script for dispatching various scanner diff tests based on
their target suffix. Hook the dispatcher script into the Automake test
harness which is passed the diff test target name. Remove usage of
check-local which is always run regardless of whether or not the TESTS
variable is set from the command line. This allows for both the ability to
use the harnesses XFAIL_TESTS variable for expected failures as well as
testing of targets individually, for example:
cd tests/scanner
make check TESTS=GtkFrob-1.0.gir
make check TESTS=Regress-1.0-Python
Add Headeronly-1.0-expected.gir for validating the results of the header
only gir creation test.
https://bugzilla.gnome.org/show_bug.cgi?id=720713
|
|
|
|
|
|
|
|
| |
Aliasing TRUE or FALSE is not very common, but done occasionally
for extra clarity. Namely G_SOURCE_REMOVE / G_SOURCE_CONTINUE are
self-explanatory, unlike the "raw" booleans.
https://bugzilla.gnome.org/show_bug.cgi?id=719566
|
|
|
|
|
|
|
|
| |
I'd like to be able to use this inside GTK+.
See: https://bugzilla.gnome.org/show_bug.cgi?id=711153
https://bugzilla.gnome.org/show_bug.cgi?id=711157
|
|
|
|
| |
Related to: https://bugzilla.gnome.org/show_bug.cgi?id=710561
|
|
|
|
|
|
| |
Structure field documentation was not being included in the gir file.
https://bugzilla.gnome.org/show_bug.cgi?id=710562
|
|
|
|
|
|
|
|
| |
A hidden exception was being thrown (which we now log), due to fields
being treated as function parameters. Fixed to make field array
annotations be transformed and written out to the gir correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=710561
|
|
|
|
|
|
|
|
|
| |
When scanning for macros respect ifdefs of __GI_SCANNER__
in the various header files. Only #ifdef and #ifndef are supported.
If __GI_SCANNER__ appears in plain #if statements, a warning is
printed.
https://bugzilla.gnome.org/show_bug.cgi?id=698367
|
|
|
|
|
|
|
|
|
| |
GTK-Doc has trouble parsing multiline parameter
description fields if the first word of a continuation
line is "returns". We're already doing the right thing
but make sure we continue to do so in the future
https://bugzilla.gnome.org/show_bug.cgi?id=708445
|
|
|
|
|
|
| |
some make implementations don't like empty $(AM_V_GEN) rule
commands, see http://lists.gnu.org/archive/html/bug-coreutils/2009-04/msg00251.html
for more info.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When encountering /**/ in the source, parse_gtk_doc_comment()
would be executed (due to the /** part starting a GTK-Doc
comment block) and would happily consume the / and everything
up until the next comment block was closed or EOF, thus
consuming a whole block of C code...
Encoutered in the wild here:
https://git.gnome.org/browse/clutter-gst/tree/clutter-gst/clutter-gst-player.c?id=03f0d8f48bd7f60e582e6185cb73a07038e8d55d#n1926
|
|
|
|
|
|
| |
Makes our GTK-Doc comment block rewriting tool halt on
such issues, requireing user intervention instead of writing
back even more bogus data.
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
| |
|
|
|
|
| |
tests/warn/unkown-parameter.h:41 still passes with this...
|
| |
|
| |
|
|
|
|
|
|
|
| |
GTK-Doc comment block fixer tool will refuse to rewrite source
files that generated errors (indicating a source->parse tree->source
would result in information being lost), but will happily continue
on warnings (which do not result in information being lost).
|
|
|
|
|
|
|
|
|
| |
GTK-Doc parameter description fields are allowed to span
multiple lines, tag description fields are allowed to span
multiple lines and paragraphs. A tool fixing/rewriting
GTK-Doc comment blocks in source files would need to have
description fields parsed and stored (almost) exactly as
they appear in the source file.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GTK-Doc description fields for tags can contain multiple lines and
even multiple paragraphs. Whitespace cannot be preserved in XML
attributes, so we move the "deprecated" description text into
a "<doc-deprecated />" element right next to where we already have
the "<doc />" element. Keep the "deprecated" attribute around for
backwards compatibility though, but set its value to "1" (analogous
to the "writable", "contruct", etc attributes) if the annotated
symbol is marked as deprecated.
While at it, add <doc-version /> and <doc-stability /> which
was not yet available in the .gir files...
This takes care of the "Since:", "Stability:" and "Deprecated:"
GTK-Doc tags. Nothing needs to be done for the "Returns:" tag as
as we already write a "<doc />" child element on "<return-value />".
|
|
|
|
|
|
| |
so we can later use them to re-write source files containing
broken GTK-Doc comment blocks where /** is preceded by and/or
*/ is followed by code...
|
|
|
|
|
|
|
|
| |
- annotations on the identifier (formerly g-i specific tags) have
never been validated before, so fix this
- removes duplicate validation code from GtkDocTag and GtkDocParameter
- remove repeated validation code doing the same thing as
annotationparser from maintransformer...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After discussing a different issue with the GTK-Doc maintainers,
we learned that our g-i specific top level tags should never have
existed in the first place. The prefered notation for annotations
that apply to the identifier should be written on the identifier
line, for example like what we already do with (skip).
As a result, this patch deprecates g-i specific top level tags and
implements them as annotations on the identifier instead but still
keeps support for malformed comment blocks using g-i specific top
level tags.
This means that all annotated code "out there" will continue to work
just fine with this version of g-i, but when a developer decides to
fix deprecation warnings in his/her comment blocks, the dependency
on g-i needs to be raised to a version that contains at least this
patch. #676133
https://bugzilla.gnome.org/show_bug.cgi?id=676133
|
|
|
|
|
|
|
|
|
|
| |
- remove annotations regex, restore proper parens parsing
- drop weird DocOption() storage class and use lists/dicts
as appropriate
- make GtkDocAnnotations a simple OrderedDict subclass instead
of a weird hybrid dict/list storage class
- Deprecate Attribute: tag, replace with (attributes) annotation
on the identifier
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
No need to track what type of identifier we've found as we don't
use that information later on. Continue searching for an identifier
if it's not found on the first line like gtkdoc-mkdb does.
|
|
|
|
|
| |
and move it downwards after DocTag, DocOptions etc for
easier reading
|
|
|
|
|
| |
Accepted by old version of annotationparser.py and actually
encountered in the wild. Internaly normalize to 'Returns:'.
|
|
|
|
|
|
|
|
| |
Turns out gtkdoc-mkdb has always accepted identifier parts
with and without a delimiter after the identifier_name field,
so it is safe to only require it when annotations are present or
in other words, when there are actually multiple fields to be
seperated...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not yet being used but will be in the future by
annotationparser.py to signal the difference between
message.WARNING:
something is wrong but the comment block can still
be parsed and serialized back into a comment block
without information being lost
message.ERROR:
something is wrong and the comment block can *not*
be parsed and serialized back into a comment block
without information being lost
Different tools can then act accordingly. Nothing will
change for g-ir-scanner but this will be important for
the GTK-Doc comment block rewriting tool to prevent
extremely broken input leading to even more broken
output...
|
|
|
|
|
|
|
|
|
|
| |
Normalize deprecated @Varargs [1] and named __VA_ARGS__ [2]
notations in as single location, add tests. Remove special
casing in maintransformer as it is no longer a special case
(tests/warn/unknown-parameter.h passes).
[1] https://git.gnome.org/browse/gtk-doc/commit/gtkdoc-mkdb.in?id=4c9d4db0e264d403b301dad9be1c290134846d03
[1] https://git.gnome.org/browse/gtk-doc/commit/gtkdoc-mkdb.in?id=55c78181d6ae1606bdf7885e9caed70a484127ec
|