| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Otherwise people may not know about --warn-all.
https://bugzilla.gnome.org/show_bug.cgi?id=631644
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, we were adding the --libs-only-L from pkg-config files
during initial scanning, as if --library-path was specified,
*and* inside the dumper, we used --libs.
Fix this by always doing -L. <introspected libraries> <pkg-config libs>
This should ensure we don't duplicate the search path anyways.
https://bugzilla.gnome.org/show_bug.cgi?id=631348
|
|
|
|
|
| |
Split it into pieces that will be reusable across different
command line tools.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only store types that can be referenced in the cache store
this reduces the size of the serialized Gtk-3.0.gir in the store
from 5.7M to 366k on my system.
It also reduces the time it takes to create a gir in gtksourceview
by 35% and the time to run the warnings test by more than 50%
This also disables the cache for passthrough mode since it needs
access to the whole serialized tree.
|
|
|
|
|
|
| |
We still really do want people to port to --identifier-prefix
(and --symbol-prefix if necessary) because there's no ambiguity.
Before the way we were casefolding was just a terrible mess.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of handling constants by lower-casing them, stripping the
lower-case prefix and upper-casing them again, leave them in the
original case and check against upper-cased versions of
namespace.symbol_prefixes.
Wwe detect what version to test against by looking at the first character
of the identifier, so we assume that --symbol-prefix options are always
in lowercase. If that needs to be relaxed, then we'll have to check all
symbols against both sets of prefixes.
Add tests for constants to Regress.h and fix tests/warn/unresolved-type.h
for a warning message that improved with this change.
https://bugzilla.gnome.org/show_bug.cgi?id=629007
|
|
|
|
|
|
|
| |
For backwards compat, keep the presence of the environment
variable at all to mean "exception".
Also start a HACKING file.
|
|
|
|
|
| |
Since the delete parameter of NamedTemporaryFile is only
available on python 2.6
|
| |
|
|
|
|
|
|
|
|
| |
We need a way to add a .gir file, without also attempting to load
the pkg-config file for it (since it may not be installed yet).
Example: clutter builds multiple .gir files, Cally-1.0 depends on
Clutter-1.0.
|
|
|
|
| |
Create a new option parser when parsing pkg-config output
|
|
|
|
| |
And migrate over to using the message logger
|
|
|
|
|
| |
Move the remaining callsites over to the new message
module
|
|
|
|
|
| |
This module will be used to report warnings, which
doesn't explicitly depend on the transformer instance.
|
| |
|
|
|
|
| |
Pass around its symbols instead
|
| |
|
| |
|
|
|
|
| |
It has been broken for a while and nobody uses it.
|
| |
|
| |
|
|
|
|
|
| |
Make the common case (no validation) much simple and
add error checking while writing the output
|
| |
|
|
|
|
|
| |
In case that the temporary directory and the output directory
is not on the same filesystem.
|
|
|
|
|
|
| |
If the current directory is not writable nor if
the directory of the output file isn't, use the standard
temporayr directory as a last resort.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, merge the implementations of parsing both identifiers and
symbols, since they had more in common than they had differences.
Secondly, fix the logic for priority of --accept-unprefixed in
the presence of unprefixed includes. The current namespace should
win. An example of this is mutter which has unprefixed public
symbols, but also includes xlib, which has no prefix.
Third, for unprefixed namespaces, actually look at the contents
rather than just blindly returning them. This is a bit of a hack,
but better than the alternatives.
|
|
|
|
| |
This is necessary for Mutter right now.
|
|
|
|
|
| |
Add namespacing prefixes to the static .gir files. Support the empty
prefix, as is needed for xlib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of the first big changes in this rewrite is changing the Type
object to have separate target_fundamental and target_giname properties,
rather than just being strings. Previously in the scanner, it was
awful because we used heuristics around strings.
The ast.py is refactored so that not everything is a Node - that
was a rather useless abstraction. Now, only things which can have
a GIName are Node. E.g. Type and Field are no longer Node.
More things were merged from glibast.py into ast.py, since it isn't
a very useful split.
transformer.py gains more intelligence and will e.g. turn GLib.List
into a List() object earlier. The namespace processing is a lot
cleaner now; since we parse the included .girs, we know the C
prefix for each namespace, and have functions to parse both
C type names (GtkFooBar) and symbols gtk_foo_bar into their
symbols cleanly. Type resolution is much, much saner because
we know Type(target_giname=Gtk.Foo) maps to the namespace Gtk.
glibtransformer.py now just handles the XML processing from the dump,
and a few miscellaneous things.
The major heavy lifting now lives in primarytransformer.py, which
is a combination of most of annotationparser.py and half of
glibtransformer.py.
annotationparser.py now literally just parses annotations; it's
no longer in the business of e.g. guessing transfer too.
finaltransformer.py is a new file which does post-analysis for
"introspectability" mainly.
girparser.c is fixed for some introspectable=0 processing.
|
|
|
|
|
|
|
|
| |
This is to support cases such as WebKitGTK+, that have C API
implemented in C++ files. Do note this does not mean we support proper
C++ parsing.
https://bugzilla.gnome.org/show_bug.cgi?id=627152
|
|
|
|
|
|
|
|
|
|
|
|
| |
When debugging the dumper, it's extremely useful to be able
to see the argument it's passing to the compiler/linker.
This patch makes g-ir-scanner work the same way as libtool basically;
we default to printing out stuff, and add a --quiet option.
The Makefile.introspection handles passing --quiet automatically.
https://bugzilla.gnome.org/show_bug.cgi?id=622751
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This work allows us to move closer to replacing gtk-doc, among other
things. We add a generic attribute "introspectable", and inside the
typelib compiler if we see "introspectable=no", we don't put it in the
typelib. This replaces the hackish pre-filter for varargs with a much
more generic mechanism.
The varargs is now handled in the scanner, and we emit
introspectable=no for them.
Add generic metadata to Node with references to file/line/column,
which currently comes from symbols.
Add scanner options --warn-all and --warn-error.
https://bugzilla.gnome.org/show_bug.cgi?id=621570
|
|
|
|
| |
This reverts commit 074192b89c6afcdd7f062f03989972e44334b8bf.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This work allows us to move closer to replacing gtk-doc, among other
things. We add a generic attribute "introspectable", and inside the
typelib compiler if we see "introspectable=no", we don't put it in the
typelib. This replaces the hackish pre-filter for varargs with a much
more generic mechanism.
The varargs is now handled in the scanner, and we emit
introspectable=no for them.
Add generic metadata to Node with references to file/line/column,
which currently comes from symbols.
Add scanner options --Wall and --Werror.
|
|
|
|
| |
We should avoid exceptions being propagated to the toplevel.
|
|
|
|
|
|
|
|
|
|
| |
One might need to call some init functions before being able to call
get_type() to create the types of a library.
--add-init-section let the user insert some initialization code in the
introspection program.
https://bugzilla.gnome.org/show_bug.cgi?id=605778
|
|
|
|
|
|
|
| |
--no-libtool means that one does not want to use libtool to compile the
introspection program.
https://bugzilla.gnome.org/show_bug.cgi?id=605774
|
|
|
|
|
|
|
|
|
| |
We need to differentiate between --pkg options we use to parse
ourself, and --pkg-export which are needed for library consumers.
When introspecting a library we won't necessarily have the
pkg-config file built, so add a --pkg-export line so library
authors can explicitly make the .gir -> pkg-config association.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to commit 6d510b8db, we now no longer need LD_LIBRARY_PATH
to be set for invoking the compiler.
Next, before we were taking the LD_LIBRARY_PATH variable and
turning it into a compile path, presumably to attempt to handle
the cases where we weren't getting the right -L flags. Also
interacting with this was a while ago we weren't really doing
uninstalled libtool libraries correctly, which is probably
how hacks involving LD_LIBRARY_PATH crept into the scanner.
Just require that we're passed the right -L flags, and we
should be doing libtool libraries better now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using ctypes.util.find_library() to resolve library names to
sonames causes problems with dealing with uninstalled libtool
operation properly. We're unlikely to find any way of combining
the two that will be robust against future changes in both
facilities.
Switch to a different approach - run 'ldd' on the compiled
introspection binary and extract sonames from there This is
less portable but should be quite robust where it works.
utils.py dumper.py: Move libtool-command-line finding into utils.py
girwriter.py: Remove library name resolution from here, expect libraries
to be passed in preresolved.
shlibs.py scannermain.py: New file including resolve_shlibs() to resolve
library names using the introspection binary.
tests/scanner/Makefile.am: Add .libs to LD_LIBRARY_PATH
http://bugzilla.gnome.org/show_bug.cgi?id=591669
|
|
|
|
|
|
|
| |
This has a few use cases; the main one in mind right now is that
when we place this in the .typelib as well, we can use it to optimize
lookups based on GType names, by skipping entirely typelibs whose
c:prefix is not a prefix of the target type lookup.
|
|
We don't want to pollute the global namespace with our private
libraries. Also, this sidesteps all the craziness that is happening
with OS vendors changing how Python installs modules.
|