Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mesonbuild/backend/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ def determine_windows_extra_paths(
tests.
"""
result: T.Set[str] = set()
prospectives: T.Set[build.Target] = set()
prospectives: T.Set[T.Union[build.BuildTarget, build.CustomTarget, build.CustomTargetIndex]] = set()
if isinstance(target, build.BuildTarget):
prospectives.update(target.get_transitive_link_deps())
# External deps
Expand Down
8 changes: 4 additions & 4 deletions mesonbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,11 +1001,11 @@ def extract_all_objects(self, recursive: bool = True) -> ExtractedObjects:
return ExtractedObjects(self, self.sources, self.generated, self.objects,
recursive)

def get_all_link_deps(self) -> 'ImmutableListProtocol[Target]':
def get_all_link_deps(self) -> 'ImmutableListProtocol[T.Union[BuildTarget, CustomTarget, CustomTargetIndex]]':
return self.get_transitive_link_deps()

@lru_cache(maxsize=None)
def get_transitive_link_deps(self) -> 'ImmutableListProtocol[Target]':
def get_transitive_link_deps(self) -> 'ImmutableListProtocol[T.Union[BuildTarget, CustomTarget, CustomTargetIndex]]':
result: T.List[Target] = []
for i in self.link_targets:
result += i.get_all_link_deps()
Expand Down Expand Up @@ -2610,7 +2610,7 @@ class RunTarget(Target, CommandBase):

def __init__(self, name: str,
command: T.Sequence[T.Union[str, File, BuildTarget, 'CustomTarget', 'CustomTargetIndex', programs.ExternalProgram]],
dependencies: T.Sequence[T.Union[BuildTarget, 'CustomTarget']],
dependencies: T.Sequence[Target],
subdir: str,
subproject: str,
env: T.Optional['EnvironmentVariables'] = None):
Expand Down Expand Up @@ -2654,7 +2654,7 @@ def type_suffix(self) -> str:
return "@run"

class AliasTarget(RunTarget):
def __init__(self, name: str, dependencies: T.Sequence[T.Union[BuildTarget, 'CustomTarget']],
def __init__(self, name: str, dependencies: T.Sequence['Target'],
subdir: str, subproject: str):
super().__init__(name, [], dependencies, subdir, subproject)

Expand Down
9 changes: 5 additions & 4 deletions mesonbuild/dependencies/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
if T.TYPE_CHECKING:
from ..compilers.compilers import Compiler
from ..environment import Environment
from ..build import BuildTarget, CustomTarget
from ..build import BuildTarget, CustomTarget, IncludeDirs
from ..mesonlib import FileOrString


Expand Down Expand Up @@ -216,9 +216,10 @@ def generate_system_dependency(self, include_type: str) -> 'Dependency':
return new_dep

class InternalDependency(Dependency):
def __init__(self, version: str, incdirs: T.List[str], compile_args: T.List[str],
link_args: T.List[str], libraries: T.List['BuildTarget'],
whole_libraries: T.List['BuildTarget'],
def __init__(self, version: str, incdirs: T.List['IncludeDirs'], compile_args: T.List[str],
link_args: T.List[str],
libraries: T.List[T.Union['BuildTarget', 'CustomTarget']],
whole_libraries: T.List[T.Union['BuildTarget', 'CustomTarget']],
sources: T.Sequence[T.Union['FileOrString', 'CustomTarget']],
ext_deps: T.List[Dependency], variables: T.Dict[str, T.Any]):
super().__init__(DependencyTypeName('internal'), {})
Expand Down
Loading