mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Use typelib instead of XML
For normal compilation, use .typelib files rather than .gir XML files. This is much faster. Rather than using libgirepository, which would try to actually load the libraries, we use a custom parser. The language server will still read XML because it needs to access documentation, which is not in the typelib, but that's generally fine because it's a long lived process and only has to do that once.
This commit is contained in:
parent
e78fae4f12
commit
06f54c8ff8
10 changed files with 647 additions and 170 deletions
|
@ -3,7 +3,7 @@ from pythonfuzz.main import PythonFuzz
|
|||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
from blueprintcompiler import tokenizer, parser, decompiler
|
||||
from blueprintcompiler import tokenizer, parser, decompiler, gir
|
||||
from blueprintcompiler.completions import complete
|
||||
from blueprintcompiler.errors import PrintableError, MultipleErrors, CompileError, CompilerBugError
|
||||
from blueprintcompiler.tokenizer import Token, TokenType, tokenize
|
||||
|
@ -27,4 +27,8 @@ def fuzz(buf):
|
|||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Make sure Gtk 4.0 is accessible, otherwise every test will fail on that
|
||||
# and nothing interesting will be tested
|
||||
gir.get_namespace("Gtk", "4.0")
|
||||
|
||||
fuzz()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue