From 39c9b07b974425dbca4219cf2e4b1ec25d1a11fb Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 25 Apr 2024 17:10:25 -0700 Subject: [PATCH] changed pyright config from yaml to toml --- .efrocachemap | 56 ++++++++++++------------- .idea/dictionaries/ericf.xml | 4 +- CHANGELOG.md | 2 +- Makefile | 2 +- config/toolconfigsrc/pyrightconfig.toml | 16 +++++++ config/toolconfigsrc/pyrightconfig.yaml | 19 --------- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/shared/ballistica.cc | 2 +- tools/efrotools/toolconfig.py | 6 +-- 9 files changed, 52 insertions(+), 57 deletions(-) create mode 100644 config/toolconfigsrc/pyrightconfig.toml delete mode 100644 config/toolconfigsrc/pyrightconfig.yaml diff --git a/.efrocachemap b/.efrocachemap index 87886c53..5e29f6a9 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4056,26 +4056,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "76b444d4517b0208ede0788b92f50e7e", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "2a87b1e2981456da65163060698539e4", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "70994d86810990ca401a6e1afc12ab32", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "5838cb0e85ab02b3f0a528e9b9711dd1", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "434328cb50c34641330a534f48ede0bc", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "6ba80319cbfefe4e83ec6034a8fe211a", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "c11c8dc8cbb6e38c68c2eaaa18989e1c", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "777c271999b5dd107df613bb8743db86", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "54cba2d355425e56f9f323e975b5c86f", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "30d77d93e86b2d9058745b1bff5a190c", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "1d13d1f625eea48c7ec55a5e02ac674a", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "cc8847bb862daa492be919e78e34e9fd", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "b7fe03a39aae127d5fa6fff12e167ab9", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "bd30f2d8d7d520a580959b3d71115b98", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "6ea3f9ede6d276a635424c42d81724a8", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "47db2df8c5da2c60e748019cb545837a", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "37b5411af0661ec9721231a71f3ff12f", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "4181aea90c4e5a8ea7a037e3b638d80d", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "aab212155f82e1d1849a85e6c8b41168", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "f1f3f7b20f1750cc369ae59b24bfea67", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "e553487272cc8d9ea777a5b7d16ba62e", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "b979f63bcc3f53841d7b89ae1be26504", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "a282c22c281c3234665f1e7421fd80c6", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "eb02b5727311db707a4372c4733eeb49", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "b7824de9695fe9219d07fcf96e039a16", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "5fe54ba7d7250a4e88203ddc7d122d72", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "d36e3dfb83b4d4a4eeb3c5221a230d31", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "676a86a2235dc5feeb5b2ac50faef8c3", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "c3f9e038e33af20df864ac218a0a4f29", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "a54c48845d6a222083e27a8eeacfcf4f", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "e8b988d8474bab7152239dd7cca2125b", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "e85ad52a005548cdffec2d3f68c76c6c", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "c68c792ef7b89d961a0fc2f2c7a2a53d", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "a9df28724e77a4f241561a8da401c6a4", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "6009222450e3d51276f31299364accd3", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "931e8d780ca39a9b4f6878c15cf34283", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "0f1ce2a8347fec692c121d3d980ed9dd", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "ac1775db2ccec6be00c59b915098d71a", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "097bce1746a439817e153b01067150b5", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2ddec85274dfa4c41edf2e175e31071d", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "e40234644df79316d71808a731ba14f0", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "8563857336ffcf40abfeac81fc3955eb", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "e40234644df79316d71808a731ba14f0", @@ -4092,14 +4092,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "9768548c6dfdff65fb25661540025ffe", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "1a0cc7e78dc66dec6ee85a8a0d68aefd", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "9768548c6dfdff65fb25661540025ffe", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "3513bf3993376900610dee9da33c0f07", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "e8c86d2c3f0c2a8df57e180f21c776a4", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "384293e407d9f073aef46809900592e4", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "cd1fa29a1899837f0727fa95377c2a15", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "01cea2d44833efcb779b7768dd43dbf6", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "c95442a63f465448b0c7b3c726df8b77", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "7ccb4e3efb92d1b1cfde496996f79a28", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "0444563f9bac05b84f4f116a29df88ea", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "4baede5ec7e5689ef398a07b2cd4d8b0", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "96f9084001fb46ae7f6b5c369dd54597", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "069e9d0c5dc09e93826a85f4888f13e0", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "4e1356a6e4d253df2768fd1619d981a6", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "d81cc208e26a6cfa37b8fa156a2bffba", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "a87689ec2c168833bb5e1753d0b360a6", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "f15c686d83350f1e6fcbc04bd7619775", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "4c32efd6dced334def9d466cb3df3d7f", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 032a8ebd..4be721ff 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -679,7 +679,6 @@ cval cwdg cxxabi - cyaml cycledelay cygwinccompiler dandroid @@ -2019,7 +2018,6 @@ objset objsizes objt - objtoyaml objtype objtypes obval @@ -3411,4 +3409,4 @@ zval - \ No newline at end of file + diff --git a/CHANGELOG.md b/CHANGELOG.md index e45b5825..4abeb8aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.34 (build 21820, api 8, 2024-04-25) +### 1.7.34 (build 21821, api 8, 2024-04-25) - Bumped Python version from 3.11 to 3.12 for all builds and project tools. One of the things this means is that we can use `typing.override` instead of the `typing_extensions` version so the annoying requirement of installing diff --git a/Makefile b/Makefile index f46ba42b..f55fefd4 100644 --- a/Makefile +++ b/Makefile @@ -1265,7 +1265,7 @@ tools/bacloud: tools/efrotools/genwrapper.py tools/efrotools/pyver.py .mypy.ini: config/toolconfigsrc/mypy.ini $(TOOL_CFG_SRC) @$(TOOL_CFG_INST) $< $@ -.pyrightconfig.json: config/toolconfigsrc/pyrightconfig.yaml $(TOOL_CFG_SRC) +.pyrightconfig.json: config/toolconfigsrc/pyrightconfig.toml $(TOOL_CFG_SRC) @$(TOOL_CFG_INST) $< $@ # Set this to 1 to skip environment checks. diff --git a/config/toolconfigsrc/pyrightconfig.toml b/config/toolconfigsrc/pyrightconfig.toml new file mode 100644 index 00000000..b63cb49b --- /dev/null +++ b/config/toolconfigsrc/pyrightconfig.toml @@ -0,0 +1,16 @@ +# Pyright's actual config is a json file but we're using yaml here so we +# can include lovely comments (yaml is a superset of json) and then we +# bake it down into a json file. + +# For now I'm listing explicit things here. Once we get everything +# passing we can autogenerate the include list like we do for other +# checkers. +include = [ 'tools' ] + +# Ideally we should get to 'strict' for everying if we want to consider +# leaning on this as much as we do mypy. +typeCheckingMode = 'basic' + +reportMissingTypeStubs = true +stubPath = 'src/stubs' +pythonPlatform = 'Linux' diff --git a/config/toolconfigsrc/pyrightconfig.yaml b/config/toolconfigsrc/pyrightconfig.yaml deleted file mode 100644 index cd067498..00000000 --- a/config/toolconfigsrc/pyrightconfig.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Pyright's actual config is a json file but we're using yaml here so we can -# include lovely comments (yaml is a superset of json) and then we bake it down -# into a json file. -{ - - # For now I'm listing explicit things here. Once we get everything passing we - # can autogenerate the include list like we do for other checkers. - "include": [ - "tools" - ], - - # Ideally we should get to 'strict' for everying if we want to consider - # leaning on this as much as we do mypy. But - "typeCheckingMode": "basic", - - "reportMissingTypeStubs": true, - "stubPath": "src/stubs", - "pythonPlatform": "Linux" -} diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 7af0ab61..b64449b1 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21820 +TARGET_BALLISTICA_BUILD = 21821 TARGET_BALLISTICA_VERSION = '1.7.34' diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index f2318f38..918ca1ed 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21820; +const int kEngineBuildNumber = 21821; const char* kEngineVersion = "1.7.34"; const int kEngineApiVersion = 8; diff --git a/tools/efrotools/toolconfig.py b/tools/efrotools/toolconfig.py index 648202bb..81f60546 100644 --- a/tools/efrotools/toolconfig.py +++ b/tools/efrotools/toolconfig.py @@ -26,12 +26,12 @@ def install_tool_config(projroot: Path, src: Path, dst: Path) -> None: # Special case: if we've got a src .yaml and a dst .json, convert. # This can be handy to add annotations/etc. in the src which isn't # possible with json. - if src.suffix == '.yaml' and dst.suffix == '.json': - import yaml + if src.suffix == '.toml' and dst.suffix == '.json': + import tomllib import json with src.open(encoding='utf-8') as infile: - contents = yaml.safe_load(infile.read()) + contents = tomllib.loads(infile.read()) cfg = json.dumps(contents, indent=2, sort_keys=True) # In normal cases we just push the source file straight through.