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

Mikael Holmén via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 11 00:30:29 PST 2025


mikaelholmen wrote:

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
```


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


More information about the libcxx-commits mailing list