-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add package-distributed-system - distributed actors implementation #977
base: main
Are you sure you want to change the base?
Conversation
I'm having issues with python in order, stock macOS 15.3 built in python3: /usr/bin/python3 project_precommit_check package-distributed-system --earliest-compatible-swift-version 5.10 ModuleNotFoundError: No module named 'pipes' if changing the pipes to shelx https://docs.python.org/3.12/library/subprocess.html#module-subprocess: common.py", line 122, in <listcomp>
return ' '.join([pipes.quote(x) for x in command]) Then this leads to: File "swift-source-compat-suite/project.py", line 804, in included_element
any(evaluate_predicate(element, ip)
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
for ip in include_predicates)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "swift-source-compat-suite/project.py", line 804, in <genexpr>
any(evaluate_predicate(element, ip)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "swift-source-compat-suite/project.py", line 796, in evaluate_predicate
return eval(predicate) With these changes I'm able to build: diff --git a/common.py b/common.py
index c684e3c..09b4808 100755
--- a/common.py
+++ b/common.py
@@ -16,7 +16,6 @@
import multiprocessing
import os
import pathlib
-import pipes
import platform
import signal
import subprocess
@@ -119,7 +118,7 @@ def shell_join(command):
>>> shell_join(['echo', 'Hello, World!'])
"echo 'Hello, World!'"
"""
- return ' '.join([pipes.quote(x) for x in command])
+ return ' '.join([shlex.quote(x) for x in command])
def debug_print(s, stderr=sys.stderr):
diff --git a/project.py b/project.py
index d5f94ab..6506fe0 100644
--- a/project.py
+++ b/project.py
@@ -790,10 +790,11 @@ def add_minimal_arguments(parser):
def evaluate_predicate(element, predicate):
"""Evaluate predicate in context of index element fields."""
# pylint: disable=I0011,W0122,W0123
- for key in element:
+ local_vars = {}
+ for key,value in element.items():
if isinstance(element[key], str):
- exec(key + ' = """' + element[key] + '"""')
- return eval(predicate)
+ local_vars[key] = value
+ return eval(predicate, {}, local_vars)
def included_element(include_predicates, exclude_predicates, element): |
On Linux(Ubuntu 24.04):
|
@swift-ci test |
@freef4ll Thanks for the PR! Yeah looks like that's from python 3.12, We will update those scripts once we update our CI machines to a new OS with a newer python. As for the pre-commit check, that looks like its out of date on ubuntu, I'll open some PR's to update both the documentation and the pre-commit check 👍 |
Thanks @justice-adams-apple! I see the build failed according to the log:
The environment proxy doesn't have access to api.github.com ? |
I fixed the lz4 failure. Lets try again, the build is in release mode currently and it might fail due to swiftlang/swift#79318, in which case will downgrade to a debug build for the time being. |
@swift-ci test |
Pull Request Description
Would like to add package-distributed-system; a package that uses distributed actors feature set.
Previous compiler crashes (swiftlang/swift#68517 and swiftlang/swift#79318) were identified - there should be value of validating new toolchain builds against this project.
Acceptance Criteria
To be accepted into the Swift source compatibility test suite, a project must:
./project_precommit_check
script run