(self, target_id: str, target: build.Target)
return []
Returns a list of source dicts with the following format for a given target:
        [
            {
                "language": "<LANG>",
                "compiler": ["result", "of", "comp.get_exelist()"],
                "parameters": ["list", "of", "compiler", "parameters],
                "sources": ["list", "of", "all", "<LANG>", "source", "files"],
                "generated_sources": ["list", "of", "generated", "source", "files"]
            }
        ]

        This is a limited fallback / reference implementation. The backend should override this method.
Returns a list of source dicts with the following format for a given target:
        [
            {
                "language": "<LANG>",
                "compiler": ["result", "of", "comp.get_exelist()"],
                "parameters": ["list", "of", "compiler", "parameters],
                "sources": ["list", "of", "all", "<LANG>", "source", "files"],
                "generated_sources": ["list", "of", "generated", "source", "files"]
            }
        ]
Returns a list of source dicts with the following format for a given target : [ { language : <LANG > compiler : [ result of comp . get_exelist () ] parameters : [ list of compiler parameters ] sources : [ list of all <LANG > source files ] generated_sources : [ list of generated source files ] } ]
def get_introspection_data(self, target_id: str, target: build.Target) -> T.List['TargetIntrospectionData']:
        '''
        Returns a list of source dicts with the following format for a given target:
        [
            {
                "language": "<LANG>",
                "compiler": ["result", "of", "comp.get_exelist()"],
                "parameters": ["list", "of", "compiler", "parameters],
                "sources": ["list", "of", "all", "<LANG>", "source", "files"],
                "generated_sources": ["list", "of", "generated", "source", "files"]
            }
        ]

        This is a limited fallback / reference implementation. The backend should override this method.
        '''
        if isinstance(target, (build.CustomTarget, build.BuildTarget)):
            source_list_raw = target.sources
            source_list = []
            for j in source_list_raw:
                if isinstance(j, mesonlib.File):
                    source_list += [j.absolute_path(self.source_dir, self.build_dir)]
                elif isinstance(j, str):
                    source_list += [os.path.join(self.source_dir, j)]
                elif isinstance(j, (build.CustomTarget, build.BuildTarget)):
                    source_list += [os.path.join(self.build_dir, j.get_subdir(), o) for o in j.get_outputs()]
            source_list = list(map(lambda x: os.path.normpath(x), source_list))

            compiler: T.List[str] = []
            if isinstance(target, build.CustomTarget):
                tmp_compiler = target.command
                for j in tmp_compiler:
                    if isinstance(j, mesonlib.File):
                        compiler += [j.absolute_path(self.source_dir, self.build_dir)]
                    elif isinstance(j, str):
                        compiler += [j]
                    elif isinstance(j, (build.BuildTarget, build.CustomTarget)):
                        compiler += j.get_outputs()
                    else:
                        raise RuntimeError(f'Type "{type(j).__name__}" is not supported in get_introspection_data. This is a bug')

            return [{
                'language': 'unknown',
                'compiler': compiler,
                'parameters': [],
                'sources': source_list,
                'generated_sources': []
            }]

        return []
def get_introspection_data ( self , target_id : str , target : build . Target ) -> T . List [ 'TargetIntrospectionData' ] : if isinstance ( target , ( build . CustomTarget , build . BuildTarget ) ) : source_list_raw = target . sources source_list = [ ] for j in source_list_raw : if isinstance ( j , mesonlib . File ) : source_list += [ j . absolute_path ( self . source_dir , self . build_dir ) ] elif isinstance ( j , str ) : source_list += [ os . path . join ( self . source_dir , j ) ] elif isinstance ( j , ( build . CustomTarget , build . BuildTarget ) ) : source_list += [ os . path . join ( self . build_dir , j . get_subdir ( ) , o ) for o in j . get_outputs ( ) ] source_list = list ( map ( lambda x : os . path . normpath ( x ) , source_list ) ) compiler : T . List [ str ] = [ ] if isinstance ( target , build . CustomTarget ) : tmp_compiler = target . command for j in tmp_compiler : if isinstance ( j , mesonlib . File ) : compiler += [ j . absolute_path ( self . source_dir , self . build_dir ) ] elif isinstance ( j , str ) : compiler += [ j ] elif isinstance ( j , ( build . BuildTarget , build . CustomTarget ) ) : compiler += j . get_outputs ( ) else : raise RuntimeError ( f'Type "{type(j).__name__}" is not supported in get_introspection_data. This is a bug' ) return [ { 'language' : 'unknown' , 'compiler' : compiler , 'parameters' : [ ] , 'sources' : source_list , 'generated_sources' : [ ] } ] return [ ]