silly-queen-7197
10/05/2023, 7:30 PMmkdocs I have a BUILD file in docs
file(
name="mkdocs_yml",
source="mkdocs.yml",
)
files(
name="docs",
sources=["docs/*.md"],
)
pex_binary(
name="serve",
entry_point="mkdocs",
args=["serve", "-f", "docs/mkdocs.yml", "--no-livereload"],
restartable=True,
dependencies=[
":mkdocs_yml",
":docs",
"//:reqs#mkdocs"
]
)
and a directory structure like
docs/
mkdocs.yml
docs/
index.md
When I run pants --loop run docs:serve I expect pants to restart mkdocs serve if I make a change to docs/index.md but that's not the case. If I manually cancel ``pants run docs:serve`` and restart it I can see my changes so I know things are wired up correctly. I'm using v2.17.0silly-queen-7197
10/05/2023, 7:42 PMpants run //:reqs#mkdocs -- serve -f docs/mkdocs.yml insteadcurved-television-6568
10/05/2023, 8:23 PM__main__ module in it’s package for it to work though. So it won’t work with all requirements.enough-analyst-54434
10/05/2023, 8:36 PM-m <root-package>.enough-analyst-54434
10/05/2023, 8:45 PM$ pex ruff -m ruff -- -h
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
...
File "/home/jsirois/.pex/installed_wheels/8e087b24d0d849c5c81516ec740bf4fd48bf363cfb104545464e0fca749b6af9/ruff-0.0.292-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/ruff/__main__.py", line 34, in <module>
ruff = find_ruff_bin()
File "/home/jsirois/.pex/installed_wheels/8e087b24d0d849c5c81516ec740bf4fd48bf363cfb104545464e0fca749b6af9/ruff-0.0.292-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/ruff/__main__.py", line 30, in find_ruff_bin
raise FileNotFoundError(path)
FileNotFoundError: /home/jsirois/.local/bin/ruff
Console Script binding:
$ pex ruff -c ruff -- -h
Ruff: An extremely fast Python linter.
Usage: ruff [OPTIONS] <COMMAND>
Commands:
check Run Ruff on the given files or directories (default)
rule Explain a rule (or all rules)
config List or describe the available configuration options
linter List all supported upstream linters
clean Clear any caches in the current directory and any subdirectories
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Log levels:
-v, --verbose Enable verbose logging
-q, --quiet Print diagnostics, but nothing else
-s, --silent Disable all logging (but still exit with status code "1" upon detecting diagnostics)
For help with a specific command, see: `ruff help <command>`.happy-kitchen-89482
10/05/2023, 9:21 PMrestartable=True you should get auto-restarting when deps change. Can you put up a small repo on github that reproduces the error? Would be good to capture your exact config and so on.silly-queen-7197
10/06/2023, 2:29 AMloop command behaves as expected.
Is that expected behavior?silly-queen-7197
10/06/2023, 2:42 AMsilly-queen-7197
10/06/2023, 2:42 AMhappy-kitchen-89482
10/06/2023, 3:05 AMhappy-kitchen-89482
10/06/2023, 3:06 AMhappy-kitchen-89482
10/06/2023, 3:07 AMhappy-kitchen-89482
10/06/2023, 3:07 AMpants run path/to/main.py instead of pants run path/to:pex, but in your case there is no main.py, since you're just building a pex directly from a third-party wheelsilly-queen-7197
10/06/2023, 3:41 AM$ pants --keep-sandboxes=always run docs:serve
20:37:42.28 [INFO] Preserving local process execution dir /tmp/pants-sandbox-BhJYIN for interactive process
INFO - Building documentation...
INFO - Cleaning site directory
INFO - Documentation built in 0.04 seconds
INFO - [20:37:42] Serving on <http://127.0.0.1:8000/>silly-queen-7197
10/06/2023, 3:47 AM