many-engine-6796
01/02/2023, 7:03 PMrestartable
concept, but it seems that I misconfigure something or it’s not that powerful as I thought it is, because it restarts the app on every change in the repo not inputs only. Details in the thread 🧵.many-engine-6796
01/02/2023, 7:05 PManother
b.py
BUILD
src
a.py
main.py
BUILD
where main.py
has the following contents:
from a import foo
def app():
foo()
while True:
pass
if __name__ == "__main__":
app()
and BUILD
in src is
python_sources()
pex_binary(
name="app",
entry_point="main.py",
restartable=True,
)
I run ./pants run src:app
and get my output. After that I update a.py
and it expectedly re-runs. Then I change b.py
, which isn’t connected to my app target in any ways, but the app still restarts.
Do I misunderstand something? Shouldn’t only the changes in inputs of the running target affect the app restart?happy-kitchen-89482
01/02/2023, 7:12 PMhappy-kitchen-89482
01/02/2023, 7:12 PMhappy-kitchen-89482
01/02/2023, 7:12 PM./pants dependencies --transitive src:app
show?happy-kitchen-89482
01/02/2023, 7:13 PMb
for some reasonmany-engine-6796
01/02/2023, 7:13 PM╰─ ./pants dependencies --transitive src:app
src/a.py
src/main.py
happy-kitchen-89482
01/02/2023, 7:14 PM./pants run src/main.py
?many-engine-6796
01/02/2023, 7:15 PMpython_source
target, it’s not possible to make it restartable (as of 2.14.0), so it doesn’t react to any changes.many-engine-6796
01/03/2023, 6:20 PM