gray-shoe-19951
12/19/2022, 3:44 PMcurved-microphone-39455
12/19/2022, 4:00 PMulimit
with WSL2
I can't make it work correctly on Windows, every time I get, I also tried to modify different files following many tutorial, I still have the warning at the beginning...
ulimit -n 65536
-bash: ulimit: open files: cannot modify limit: Operation not permitted
some-morning-1340
12/19/2022, 4:09 PM./pants tailor <path-to-removed-file>
, the BUILD file is not regenerated even if there are still unmapped targets in that directory. Is this expected behaviour?
This also happens if I run ./pants --changed-since=<commit-with-removed-file> tailor
tall-family-5367
12/19/2022, 4:52 PMtall-family-5367
12/19/2022, 4:59 PMtall-plastic-15186
12/19/2022, 8:08 PMpyenv
to manage the python version and then dynamically setting .vscode/settings.json
to {"python.defaultInterpreterPath": sys.executable}
in order to get autocomplete functionality etc. This path typically points to the venv in the cache directory. Is this right approach or do you recommend another setup for VSCode? Thanks.fresh-cat-90827
12/19/2022, 8:35 PM--dependencies-type
option was deprecated. The docs say:
This option is misleading and not very useful. In the future there will be a more robust way of querying and filtering dependencies.suggesting doing this in the meanwhile
./pants dependencies ::
| xargs ./pants filter --target-type=python_requirement
| xargs ./pants peek | jq -r '.[]["requirements"][]'
Have I missed a clever way to list only 3rd party or only 1st party dependencies in Pants now? 😕eager-dress-66405
12/19/2022, 8:56 PM./pants lint ::
. Is there anything we can do? An env var we could set on these systems to always filter out targets on the "bad" resolve?late-keyboard-89314
12/19/2022, 8:57 PM2.15.0rc1
might release? I’m trying to decide if I should wait for it or just use 2.16.0.dev3
which contains the bugfix I’m waiting for already. How buggy are dev releases normally for sort of day-to-day use where the build being blocked for a couple hours is no big deal?late-keyboard-89314
12/19/2022, 9:28 PMGOOS
and GOARCH
env vars on a go_binary
target? I’m not seeing anything documented or in the source but maybe there’s some way I’m missing?
Edit: nevermind, found PANTS_GOLANG_SUBPROCESS_ENV_VARS
as well as Environments.gray-shoe-19951
12/19/2022, 9:32 PMthousands-plumber-33255
12/19/2022, 9:56 PMcrooked-country-1937
12/20/2022, 1:08 AM➜ ./pants --no-pantsd -l=debug generate-lockfiles
06:23:00.28 [WARN] /Users/vish/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.Z3K0Pi/install/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py:255: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
warnings.warn(
06:23:00.28 [ERROR] 1 Exception encountered:
InvalidRequirement: Parse error at "'='": Expected string_end
Wasn’t helping. Anyways, after messing about the toml file a bit more and checking git diffs, I was able to resolve it. What I had done was this:
[python.resolves_to_interpreter_constraints]
airflow-default = "CPython>=3.7.10, <3.8"
The correct way is to set it as an array:
[python.resolves_to_interpreter_constraints]
airflow-default = ["CPython>=3.7.10, <3.8"]
I think these kinds of mistakes can occur. if the error message pointed to line or even say the error was in toml file, I would have been able to resolve it more easily. It isn’t critical, but a nice usability improvement 🙂happy-kitchen-89482
12/20/2022, 1:33 AMm1_incompatible
tag and set it on all the relevant targets, and then have m1 users set the PANTS_TAG env var to exclude those targets. This is how Pants selects targets to run on macs in its own CI, for example.happy-kitchen-89482
12/20/2022, 1:34 AMhappy-kitchen-89482
12/20/2022, 1:35 AMeager-dress-66405
12/20/2022, 1:35 AMhappy-kitchen-89482
12/20/2022, 1:35 AMm1_incompatible_python_sources
macro could save you some typinghappy-kitchen-89482
12/20/2022, 1:37 AMeager-dress-66405
12/20/2022, 1:53 AMeager-dress-66405
12/20/2022, 1:55 AMhigh-magician-46188
12/20/2022, 11:05 AMpants run ...
.
When the script is a single file, it works perfectly.
However, I can't figure out how to configure it to work with relative imports.
Will appreciate any help.
Details in 🧵.eager-dress-66405
12/20/2022, 4:07 PM'resolve': parametrize('default', 'cnvkit')
. I am not aware of any way to apply the m1-incompatible
tag only to the @resolve=cnvkit
targets.most-jordan-40579
12/20/2022, 4:47 PM[scala.version_for_resolve]
jvm-default = "3.2.1"
When I run ./pants check ::
it errors with:
17:18:37.48 [ERROR] 1 Exception encountered:
MissingRequiredJvmArtifactsInResolve: The JVM resolve `jvm-default` is missing one or more requirements for the Scala runtime library. Since at least one JVM target type in this repository consumes a `scala_sources` target in this resolve, this resolve must contain `jvm_artifact` targets for each requirement of the Scala runtime library.
Please add the following `jvm_artifact` target(s) somewhere in the repository and re-run `./pants generate-lockfiles --resolve=jvm-default`:
jvm_artifact(
name="org.scala-lang_scala-library",
group="org.scala-lang",
artifact="scala-library",
version="3.2.1",
resolve="jvm-default",
)
Which is expect from what I've seen in the docs.
I created a BUILD
file in the root with this config.
jvm_artifact(
name="org.scala-lang_scala-library",
group="org.scala-lang",
artifact="scala-library",
version="3.2.1",
resolve="jvm-default",
)
The problem is that this artifact doesn't exist, the scala-library for scala 3 is named scala3-library. If I try to change the artifact name to the correct one it errors with the same message as above.curved-manchester-66006
12/20/2022, 4:56 PMrequirements.txt
file that is installed in a managed environment with some pre-existing packages that ought to be treated as constraints but are not yet. It is fair to see that this at best accidentally works and the dependencies are messy. Pants/pex keeps telling me -- correctly! -- variants of "this doesn't work! neither does that! these dependencies are incompatible you fool!", This is good in the sense that part of the reason pants is attractive is to have dependencies that more than accidentally resolve, but it is really hard to get to "first light" for this repo where the unit tests run. Right now it would feel nice if there was a --yolo
flag to have things "work" like they do today.chilly-holiday-77415
12/20/2022, 5:28 PMfastapi
which vendors starlette
as a transitive dependency with a different package name - I’m using a poetry pyproject.toml
which I guess may be the issue as starlette
is listed in my lockfile but not in the pyproject.toml
?
17:14:25.85 [WARN] Pants cannot infer owners for the following imports in the target projects/api/main.py:api:
* starlette.middleware.base.RequestResponseEndpoint (line: 13)
but the fastapi
dependency is being pulled in:
./pants dependencies projects/api/main.py:api
//:poetry0#fastapi
//:poetry0#loguru
//:poetry0#mangum
projects/api/api_metadata.py:api
projects/api/router/all_routers.py
so this feels close but not quite there 🙂eager-dress-66405
12/20/2022, 6:58 PMhappy-kitchen-89482
12/20/2022, 8:08 PMhappy-kitchen-89482
12/20/2022, 8:15 PMlate-keyboard-89314
12/20/2022, 9:06 PM2.16.0.dev3
):
stderr:
There was 1 error downloading required artifacts:
1. dockerfile 3.2 from <https://files.pythonhosted.org/packages/6e/75/1395fac29bd2dcccb51ffae11ba9a19fe159eabf9596bca4cf49c1a2b191/dockerfile-3.2.0.tar.gz>
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
This seems to be coming from bootstrapping the docker backend. Where can I find the logs of this process to keep troubleshooting? I’ve got --keep-sandboxes=on_failure
set.