Merge branch 'wip/p3732/search-paths' into 'main'

Expand gir/typelib search paths

See merge request jwestman/blueprint-compiler!183
This commit is contained in:
Peter Eisenmann 2024-12-21 19:59:59 +00:00
commit dc6fe66d32
2 changed files with 56 additions and 25 deletions

View file

@ -27,7 +27,7 @@ import typing as T
from . import formatter, interactive_port, parser, tokenizer
from .decompiler import decompile_string
from .errors import CompileError, CompilerBugError, PrintableError, report_bug
from .gir import add_typelib_search_path
from .gir import add_user_typelib_paths
from .lsp import LanguageServer
from .outputs import XmlOutput
from .utils import Colors
@ -145,8 +145,7 @@ class BlueprintApp:
def cmd_compile(self, opts):
if opts.typelib_path != None:
for typelib_path in opts.typelib_path:
add_typelib_search_path(typelib_path)
add_user_typelib_paths(opts.typelib_path)
data = opts.input.read()
try:
@ -166,8 +165,7 @@ class BlueprintApp:
def cmd_batch_compile(self, opts):
if opts.typelib_path != None:
for typelib_path in opts.typelib_path:
add_typelib_search_path(typelib_path)
add_user_typelib_paths(opts.typelib_path)
for file in opts.inputs:
data = file.read()