cold-soccer-63228
05/02/2022, 5:25 PMPipfile.lock
cannot be used as the lockfile? Generating lockfiles via Pants seems to be very slow...
➜ ./pants generate-lockfiles
⠠ 461.47s Determine all Python interpreter versions used by Pytest in your proje
⠠ 461.47s Determine if MyPy should use Python 3.8+ (for lockfile usage)
⠠
cold-soccer-63228
05/02/2022, 5:28 PMwitty-crayon-22786
05/02/2022, 5:32 PMwitty-crayon-22786
05/02/2022, 5:33 PMsudo py-spy dump -p $pants_pid
show anything interesting?cold-soccer-63228
05/02/2022, 5:35 PM➜ tree .
...
3913 directories, 30054 files
witty-crayon-22786
05/02/2022, 5:40 PMmypy
, but this report just made me realize that it hasn’t been fixed for lockfile generation for mypy
witty-crayon-22786
05/02/2022, 5:42 PMwitty-crayon-22786
05/02/2022, 5:46 PMmypy
lockfile? even if you do, being more specific with ./pants generate-lockfiles
would skip regenerating it: i.e., running only:
./pants generate-lockfiles --resolve=python-default
…for examplecold-soccer-63228
05/02/2022, 5:49 PMmypy
lockfile, but mypy
is one of our dev-packages
for our Pipfile
.hundreds-father-404
05/02/2022, 5:50 PMpipenv_requirements
. Super easy to implementwitty-crayon-22786
05/02/2022, 5:51 PMhundreds-father-404
05/02/2022, 5:51 PMpants.toml
?witty-crayon-22786
05/02/2022, 5:51 PMcold-soccer-63228
05/02/2022, 5:52 PMpants.toml
file.
[GLOBAL]
pants_version = "2.10.0"
use_deprecated_python_macros = false
backend_packages = [
"pants.backend.python",
"pants.backend.experimental.python.lint.autoflake",
"pants.backend.python.lint.black",
"pants.backend.python.typecheck.mypy",
"pants.core",
]
[anonymous-telemetry]
enabled = false
[autoflake]
args = [
"--in-place",
"--remove-all-unused-imports",
"--exclude='front_porch/modules/__init__.py'",
]
[python]
enable_resolves = true
interpreter_constraints = ["CPython==3.9.*"]
run_against_entire_lockfile = true
hundreds-father-404
05/02/2022, 5:53 PMDetermine if MyPy should use Python 3.8+ (for lockfile usage)
would ideally not trigger. I'll open an issuecold-soccer-63228
05/02/2022, 5:54 PMPipfile.lock
?hundreds-father-404
05/02/2022, 5:54 PMhundreds-father-404
05/02/2022, 5:55 PMcold-soccer-63228
05/02/2022, 5:57 PM3rdparty/python/default.lock
file by parsing the Pipfile.lock
?hundreds-father-404
05/02/2022, 9:18 PMhundreds-father-404
05/02/2022, 9:42 PMIs it not possible to just generate the 3rdparty/python/default.lock file by parsing the Pipfile.lock?That is theoretically possible, but Pants would need technology to do that. Instead, you could use the
export
command from pipenv to get it in a format understood by Pantscold-soccer-63228
05/03/2022, 4:37 PM./pants generate-lockfiles
. Was there something specific I had to do?
⠄ 235.18s Determine if MyPy should use Python 3.8+ (for lockfile usage)
hundreds-father-404
05/03/2022, 4:43 PMcold-soccer-63228
05/03/2022, 4:47 PMwitty-crayon-22786
05/12/2022, 8:17 PM2.11.x
will continue to have slow lockfile generation though unfortunately.