cool-easter-32542
05/25/2023, 4:44 AMexport goal, but a warning message states my approach will be deprecated. Is there another approach I can use to achieve the same thing while keeping the single lock file? Or.. :) .. any chance the feature can not become deprecated?
Thanks,
James
Some more detail:
We can create a virtual env containing only the 3rd party dependencies needed by the target by doing e.g.:
pants export projects/myproject:
Additionally we can get additional dev tool packages to be included in that env by specifying them as source dependencies in the project's BUILD, e.g.:
python_sources(
name="myproject",
dependencies=["//:root#pytest", "//:root#behave"],
)
However when I run pants export I see this warning:
[WARN] DEPRECATED: exporting resolves without using the --resolve option is scheduled to be removed in version 2.23.0.dev0.
If instead we export using resolves, then the virtual env contains the dependencies of all projects which is not what we want. Also, if we keep the tooling dependencies in a separate resolve - they end up in a separate virtual env which is not so good for IDE integration (though I note this is covered in another discussion).
pantsbuild/pants