[libcxx-commits] [libcxx] [libc++] Improves type-safety in generator script. (PR #101880)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 11 10:13:05 PST 2025


Prabhuk wrote:

We 

> Hi @mordante and @ldionne ,
> 
> Does this patch require a newer python version? The current requirement according to https://llvm.org/docs/GettingStarted.html#software is 3.8 and when I run lit tests with this patch with 3.8.0 I get
> 
> ```
> # .---command stderr------------
> # | Traceback (most recent call last):
> # |   File "/repo/uabelho/main-github/libcxx/test/libcxx/feature_test_macro/version_header_implementation.sh.py", line 19, in <module>
> # |     from generate_feature_test_macro_components import FeatureTestMacros, VersionHeader
> # |   File "/repo/uabelho/main-github/libcxx/utils/generate_feature_test_macro_components.py", line 1959, in <module>
> # |     class Metadata:
> # |   File "/repo/uabelho/main-github/libcxx/utils/generate_feature_test_macro_components.py", line 1960, in Metadata
> # |     headers: list[str] = None
> # | TypeError: 'type' object is not subscriptable
> # `-----------------------------
> # error: command failed with exit status: 1
> ```
> 
> for these tests
> 
> ```
> Failed Tests (7):
>   llvm-libc++-shared.cfg.in :: libcxx/feature_test_macro/ftm_metadata.sh.py
>   llvm-libc++-shared.cfg.in :: libcxx/feature_test_macro/implemented_ftms.sh.py
>   llvm-libc++-shared.cfg.in :: libcxx/feature_test_macro/invalid.sh.py
>   llvm-libc++-shared.cfg.in :: libcxx/feature_test_macro/standard_ftms.sh.py
>   llvm-libc++-shared.cfg.in :: libcxx/feature_test_macro/std_dialects.sh.py
>   llvm-libc++-shared.cfg.in :: libcxx/feature_test_macro/version_header.sh.py
>   llvm-libc++-shared.cfg.in :: libcxx/feature_test_macro/version_header_implementation.sh.py
> ```

We are seeing the same failures in Fuchsia toolchain builders as well. 
Link to the builder: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8723301937322040385/overview
Link to the logs: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8723301937322040385/+/u/clang/test/stdout

https://github.com/llvm/llvm-project/pull/101880


More information about the libcxx-commits mailing list