lemon-yak-80782
11/09/2023, 11:39 AM2.18.0rc5
and I am not able to export any tools. For example: pants export --resolve=black
fails with: `ExportError: No resolve named black found in [python].resolves.`Am I using the wrong command?broad-processor-92400
11/09/2023, 6:46 PMpants fmt ::
) still work normally?lemon-yak-80782
11/09/2023, 9:36 PM2.17.1rc3
. Yes, everything works as expected, I am just not able to export. To be honest I am not sure if the problem existed in 2.17.1rc3
, because I tend to forget to export if I do not have any issues with autocompletion, etc.broad-processor-92400
11/09/2023, 10:30 PMpants.toml
?
(Background: I'm trying to assess if this is a regression for 2.18.0, that we need to fix before the release.)lemon-yak-80782
11/10/2023, 7:34 AMlemon-yak-80782
11/10/2023, 7:54 AM2.17.*
versions. It seems the issue was introduced with pants 2.18.0rc1
.broad-processor-92400
11/10/2023, 7:55 AMlemon-yak-80782
11/10/2023, 7:57 AMhappy-kitchen-89482
11/10/2023, 1:08 PMhappy-kitchen-89482
11/10/2023, 1:38 PMhappy-kitchen-89482
11/10/2023, 1:39 PMhappy-kitchen-89482
11/10/2023, 1:40 PM[black].install_from_resolve
to point to it (or you can add black to your default lockfile and point to that if you prefer)happy-kitchen-89482
11/10/2023, 1:40 PMhappy-kitchen-89482
11/10/2023, 1:40 PMbroad-processor-92400
11/10/2023, 7:50 PMlemon-yak-80782
11/10/2023, 8:54 PM2.17.
I just exported all tools and could integrate them inside my IDE/Editor.
With 2.18.0
I am only able to get an export if I install from resolve. In my specific case this leads to some issues. Currently, we are using two lockfiles:
• One for all our python dependencies, constraint to python 3.10
. For me the focus is to get the tool integration working for this environment.
• One for pants plugins, constraint to python 3.9
resolves_to_interpreter_constraints = { python-default = [
">=3.10,<3.11",
], pants-plugins = [
">=3.9,<3.10",
] }
For example adding flake8
to my default lock file is not possible with this configuration, because it requires to run on the same python version as the code it is linting. As a result I have to create a third lockfile for flake8
, just to integrate flake8
into our IDEs.
My current work around is to add the tools to the default lockfile requirements file, but not use [flake8].install_from_resolve
. This is not perfect, but I am able to export the tools without creating separate lockfiles for them.
I think IDE tool integration is a bit of a draw back in general when using pants
. For example, integration of mypy
always was an issue, since it has to be in the default lockfile to provide a working VSCode integration. When I work on plugins I just deactivate it and rely on pants check ::
, which is ok in that case.