From 57f0098c5bf27493991557df3ae048d01eed3904 Mon Sep 17 00:00:00 2001 From: Joerg Henrichs Date: Thu, 15 Jan 2026 14:52:13 +1100 Subject: [PATCH 1/2] #539 Remove message about builtins. --- source/fab/parse/x90.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/fab/parse/x90.py b/source/fab/parse/x90.py index 322de4cde..09bb7aac1 100644 --- a/source/fab/parse/x90.py +++ b/source/fab/parse/x90.py @@ -6,12 +6,15 @@ from pathlib import Path from typing import Iterable, Set, Union, Optional, Dict, Any -from fparser.two.Fortran2003 import Use_Stmt, Call_Stmt, Name, Only_List, Actual_Arg_Spec_List, Part_Ref # type: ignore +from fparser.two.Fortran2003 import ( # type: ignore + Use_Stmt, Call_Stmt, Name, Only_List, Actual_Arg_Spec_List, + Part_Ref) from fparser.two.utils import walk # type: ignore +from psyclone.domain.lfric.lfric_builtins import BUILTIN_MAP # type: ignore -from fab.parse import AnalysedFile from fab.build_config import BuildConfig from fab.parse.fortran_common import FortranAnalyserBase, logger, _typed_child +from fab.parse import AnalysedFile from fab.util import by_type @@ -21,7 +24,8 @@ class AnalysedX90(AnalysedFile): """ def __init__(self, fpath: Union[str, Path], file_hash: int, - # todo: the fortran version doesn't include the remaining args - update this too, for simplicity. + # todo: the fortran version doesn't include the remaining + # args - update this too, for simplicity. kernel_deps: Optional[Iterable[str]] = None): """ :param fpath: @@ -123,4 +127,5 @@ def _process_call_statement(self, symbol_deps: Dict[str, str], analysed_file, ob if arg_name in symbol_deps: analysed_file.kernel_deps.add(arg_name) else: - logger.debug(f"arg '{arg_name}' to invoke() was not used, presumed built-in kernel") + if arg_name.lower() not in BUILTIN_MAP: + logger.debug(f"arg '{arg_name}' is unknown.") From 104a7e1d9ab760c011fac4d61e675385c88090bf Mon Sep 17 00:00:00 2001 From: Joerg Henrichs Date: Fri, 16 Jan 2026 10:20:57 +1100 Subject: [PATCH 2/2] #539 Make Fab work if PSyclone is not installed. --- source/fab/parse/x90.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/fab/parse/x90.py b/source/fab/parse/x90.py index 09bb7aac1..4821471dd 100644 --- a/source/fab/parse/x90.py +++ b/source/fab/parse/x90.py @@ -10,7 +10,10 @@ Use_Stmt, Call_Stmt, Name, Only_List, Actual_Arg_Spec_List, Part_Ref) from fparser.two.utils import walk # type: ignore -from psyclone.domain.lfric.lfric_builtins import BUILTIN_MAP # type: ignore +try: + from psyclone.domain.lfric.lfric_builtins import BUILTIN_MAP # type: ignore +except ImportError: + BUILTIN_MAP = {} from fab.build_config import BuildConfig from fab.parse.fortran_common import FortranAnalyserBase, logger, _typed_child