clever-crayon-70731
11/13/2022, 8:30 PMresources(name="locale", sources=["**/*.mo"])
but Pants seems to ignore them?
They don't show up when I run pants dependencies
Is Pants filtering binary files or something?bright-pilot-85305
11/13/2022, 9:02 PMpython_distribution
) where I get the version from the current git tag? Is there a way to do this without writing my own plugin?ancient-accountant-55836
11/14/2022, 4:20 AM./pants run --debug-adapter src/python/greeter/main.py
, I can successfully connect through Python: Remote Attach
in Visual Studio Code. However, when I set a breakpoint on line 9 of /src/python/greeter/main.py
and try to visit localhost:8000/
in my browser, the breakpoint is never activated. I see output in both my terminal and the debug console but the breakpoint is just never activated. Any help would be greatly appreciated, thanks!dazzling-jackal-21474
11/14/2022, 12:17 PMcurved-television-6568
11/14/2022, 3:31 PMcurved-television-6568
11/14/2022, 4:59 PMmypy
config, what’s the reason for having both an extra_requirements
option as well as extra_type_stubs
?plain-carpet-73994
11/14/2022, 7:11 PMtorch.pyi
file and added some type info for the torch.load
method. I was hoping mypy would use the def of torch.load
from my .pyi
file and then fall back to the ones that ship with pytorch for everything else. But that doesn't appear to be the case: now it only pays attention to my .pyi file ignoring all else.
Maybe this is more of a question for the mypy folks??curved-television-6568
11/14/2022, 7:39 PMrough-vase-83553
11/14/2022, 7:57 PMdocker_image
rule? I have a use case of running Docker on a git submodule but I'm trying to avoid modifying the code in that submodule. So my setup is in the parent directory of the submodule and looks like
docker_image(
name="prom-aggregation-gateway",
source="feat-configurable-gauge-agg/cmd/prom-aggregation-gateway/Dockerfile",
dependencies=[
":submodule"
]
)
files(
name = "submodule",
sources = ["./feat-configurable-gauge-agg/**"]
)
Unfortunately, the Docker build isn't able to find /prom-aggregation-gateway
FROM alpine:3.10
COPY prom-aggregation-gateway /
ENTRYPOINT ["/prom-aggregation-gateway"]
refined-addition-53644
11/14/2022, 8:03 PMfreezing-lamp-12123
11/14/2022, 8:09 PMripe-cpu-85141
11/14/2022, 8:43 PM13:08:28.42 [WARN] DEPRECATED: InteractiveProcessRequest is scheduled to be removed in version 2.15.0.dev1.
Instead, use `InteractiveProcess.from_process`.
Is there something I should change?rough-vase-83553
11/14/2022, 10:46 PMrough-vase-83553
11/15/2022, 12:21 AMcool-yacht-37128
11/15/2022, 8:02 AMlemon-oxygen-72498
11/15/2022, 9:08 AMpyright
! I'm coming with an additional request 😉 I've tried pinning `pyright`'s version as follows in `pants.toml`:
[pyright]
version = "pyright==1.1.258"
lockfile = "pants_dir/3rdparty/pyright_lockfile.lock"
But this isn't recognized:
→ PANTS_SHA=11b4fd412631c6315b474e49fe482dec1767cf29 ./pants check libs/geometry::
...
10:00:25.71 [ERROR] Invalid option 'lockfile' under [pyright] in /home/churlin/dev/kaiko-eng/pants.toml
10:00:25.71 [ERROR] Invalid option 'version' under [pyright] in /home/churlin/dev/kaiko-eng/pants.toml
10:00:25.71 [ERROR] Invalid config entries detected. See log for details on which entries to update or remove.
Am I doing something wrong or is the locking support missing? I need it because right now pants
pulls a different version of pyright
than my regular CI and I get discrepancies 😕 I can create an issue if that would help you, let me know.refined-addition-53644
11/15/2022, 2:30 PMgenerate-lockfiles
was taking forever (>=10 mins) and won’t even finish. I figured it out that it’s because of adding s3fs which depends on aiobotocore. It’s the aiobotocore which has some very restrictive dependencies.
How long is pants/pex supposed to keep trying? I tried it with pip and pip throws an error about this.bored-energy-25252
11/15/2022, 4:05 PMgorgeous-eve-12553
11/15/2022, 4:53 PM❯ ./pants
./pants: line 478: /Users/user@company.com/.cache/pants/setup/bootstrap-Darwin-arm64/2.14.0_py39/bin/python: No such file or directory
❯ ls -lah /Users/user@company.com/.cache/pants/setup/bootstrap-Darwin-arm64/2.14.0_py39/bin/python
lrwxr-xr-x 1 <mailto:user@company.com|user@company.com> staff 70B Nov 10 12:43 /Users/user@company.com/.cache/pants/setup/bootstrap-Darwin-arm64/2.14.0_py39/bin/python -> /Users/user@company.com/.pyenv/versions/3.9.13/bin/python3.9
❯ file /Users/user@company.com/.cache/pants/setup/bootstrap-Darwin-arm64/2.14.0_py39/bin/python
/Users/user@company.com/.cache/pants/setup/bootstrap-Darwin-arm64/2.14.0_py39/bin/python: broken symbolic link to /Users/user@company.com/.pyenv/versions/3.9.13/bin/python3.9
This is what I get when I try to run pants on my M1 Mac. I believe the issue might have to do with the “@” in my username since I log in using a federated account?busy-vase-39202
11/15/2022, 5:36 PMripe-cpu-85141
11/15/2022, 6:57 PMgorgeous-eve-12553
11/15/2022, 7:13 PM./pants export ::
I have a dist folder with an isort binary, how can I configure VSCode to use that isort when formatting my code? I have it using the correct black binary, but I can’t get it to use the isort binary. This is with both the default python extension and the microsoft official isort plugin. Any ideas how to get pants and vscode to share the same isort binary?rapid-bird-79300
11/15/2022, 10:45 PM[2022-11-15T22:41:38Z] ModuleNotFoundError: No module named '_sqlite3'
this is when running lint in CI. Will paste some logs in the thread.broad-processor-92400
11/16/2022, 12:39 AMabc/def/ghi:target-name
then dep inference will know that COPY abc.def.ghi/target-name.pex ...
in the docker instructions refers to it... but how can a macro automatically compute the output path? (particularly the abc.def.ghi
part) One option would be to set output_path
to have it fixed, but that risks collisions when the macro is used multiple times.
(Sketch of the macro in the 🧵 )mysterious-horse-27364
11/16/2022, 6:59 AMtall-country-45957
11/16/2022, 3:00 PMbrash-student-40401
11/16/2022, 4:09 PMsrc/services/app/BUILD
currently looks like this:
python_sources(
name="app_sources",
sources=[
"mypy-stubs/stub1.pyi",
"mypy-stubs/stub2.pyi",
]
)
pex_binary(
name="app",
entry_point="main.py",
dependencies=[
"src/vendor/python:reqs#setuptools",
],
restartable=True,
)
With this definition, ./pants run src/services/app:app
, I get ModuleNotFoundError: No module named 'services'
. When I remove the stubs from python_sources
, the run command works fine, except then type checking fails. With this definition, ./pants dependencies
also doesn't show anything - it's as if adding the stubs completely negates any other dependencies. Clearly I've defined things wrong, but I can't seem to find how.wide-midnight-78598
11/16/2022, 9:45 PMNodeToolBase
subsystem:
NodeToolBase
? <-- generalizing to NodeJS
NpxToolBase
? <-- npx
is used under the hood
NpmToolBase
? <-- npx
is part of the npm cli
rough-vase-83553
11/16/2022, 11:35 PM./peek
? Might be a bit scope creepy but very useful for CI + there's already subsystem logic for Git. One use case I have in mind is raising a CI lint error if a Docker image target changes but its version number hasn't changed.happy-kitchen-89482
11/17/2022, 2:57 AM