witty-crayon-22786
03/29/2023, 5:47 PMancient-vegetable-10556
03/29/2023, 5:48 PMrunnable_dependencies
as implemented over in adhoc_process_support
resolves the envvars needed to run a target; so the infrastructure for embedding a JVM is there in runnable_dependencies
. Getting runnable_dependencies
into more places would solve Tal’s problemproud-dentist-22844
03/30/2023, 12:02 AMneeds-cherrypick
label and the 2.16.x
milestone. Is that the right way to do that?
Is this a good candidate for getting into 2.16.x?
https://github.com/pantsbuild/pants/pull/18619curved-manchester-66006
03/30/2023, 1:30 PM.pants.bootstrap
trick but though I would try anyway). I imagine to a user it would look like a handy object with properties for the sha, branch etc, and that it would make sense to leverage the existing GitWorktree
I'm a little lost for what the 'shape' of this should be though with the existing precedents:
• I don't think this is a new target or field...
• I don't think it can be a BuildFileAliases.object
(a "normal" python object) if it's going to reuse GitWorktree
and it's engine integration
• ContextAwareObjectFactory
looked close but it's deprecated and/or there are zero left?
• ParseState
has some things like env() hard coded, but the necessity of that exceeded my ability to follow alongproud-dentist-22844
03/31/2023, 4:21 AM[tool].install_from_resolve
?
https://github.com/pantsbuild/pants/issues/15358#issuecomment-1491262069
The special tool IC handling seems to not work as well with [tool].install_from_resolve
because you have to define the ICs for each resolve+lockfile instead of pants magically adding as many ICs as required for the tool. And, once you set the IC for the resolve, sometimes you have to overrides [tool].interpreter_constraints
as well so that they agree with each other. So, I wonder what the best UX would be for IC definition across multiple resolves for both tools and user code.
Maybe something along the lines of "named" configs: https://github.com/pantsbuild/pants/issues/12652
Thoughts?broad-processor-92400
03/31/2023, 5:22 AM<http://path.to|path.to>.some/target.pex
), which seems moderately unfortunate from a caching perspective. https://github.com/pantsbuild/pants/blob/1f4b040ba4e3e875d1b08c6c1d6bbbccc6538f0e/src/python/pants/backend/python/util_rules/pex.py#L572-L573
For instance: if a build target is renamed, or if multiple targets end up building the same PEX (e.g. multiple include_sources=False
pexes that happen to have the same set of 3rd party requirements would be convenient to share from each other).
Is that output path doing something other than moving the file around? As in, could it be fixed for the process invocation, and the renaming managed outside?worried-painter-31382
03/31/2023, 7:37 AMenough-analyst-54434
03/31/2023, 4:23 PMproud-dentist-22844
03/31/2023, 7:11 PMproud-dentist-22844
04/01/2023, 6:42 AMhappy-kitchen-89482
04/01/2023, 3:28 PMhappy-kitchen-89482
04/01/2023, 10:01 PMhundreds-father-404
04/02/2023, 1:40 PMhappy-kitchen-89482
04/02/2023, 4:11 PMbitter-ability-32190
04/03/2023, 4:45 PMsparse-lifeguard-95737
04/03/2023, 8:07 PMhappy-kitchen-89482
04/03/2023, 10:13 PMpytest.mark.skip
?future-oxygen-10553
04/04/2023, 1:41 PMpyproject.toml
support, so I took a stab here: https://github.com/pantsbuild/pants/pull/18672 Thanks!wide-midnight-78598
04/04/2023, 2:30 PMancient-vegetable-10556
04/04/2023, 4:17 PMbitter-ability-32190
04/04/2023, 7:45 PMbusy-vase-39202
04/04/2023, 7:54 PMwide-midnight-78598
04/04/2023, 8:00 PMscie
- is there a good reason to still have the pex_binary.entry_point
populated? I know it's optional, but could that interfere with the scie config?
e.g. After using PEX_TOOLS to unpack and compile our application - I'm running my binary like this.
"exe": "{scie.bindings.venv}/venv/bin/uvicorn",
"args": [
"apigateway.main:app"
]
Just wondering if I should keep my eye out for potential hiccups either at runtime, or in an upgrade workflowambitious-actor-36781
04/04/2023, 11:27 PMtest
can collect additional stuff.
Currently you can define [test].extra_env_vars
to inject extra stuff into the env, and runtime_package_dependencies
to add packageable targets to the test process digest. But from a quick skim of the code, all of this is replicated in each backends subprocess call.
My thinking is to push it up a level so the TestRequest
contains a env_vars
and a additional_digest
that the backend folds into its subprocess calls.
Then extra_env_vars
and runtime_package_dependencies
could be implemented as Union rules, and other plugins can then set up prerequisites for tests as needed.
ie. for my use case, I want to upload a target to a 3rd party and run integration tests against the remote resource.
...
Is there a preferred process for going about making this sort of (large?) change?ancient-vegetable-10556
04/05/2023, 4:43 PMchrisjrn@chrisjrns-MacBook-Pro pants % ./pants --keep-sandboxes=on_failure export-codegen src/rust/engine:compile_rust
09:42:54.04 [INFO] Preserving local process execution dir /private/var/folders/0m/h2n902qn38b8555xq8z0w_h40000gn/T/pants-sandbox-EdlSZp for Testing candidate for `python3` at `/Users/chrisjrn/.pyenv/shims/python3`
09:42:54.04 [INFO] Completed: Testing candidate for `python3` at `/Users/chrisjrn/.pyenv/shims/python3`
09:42:54.05 [INFO] Writing generated files to dist/codegen
chrisjrn@chrisjrns-MacBook-Pro pants % ls ./dist/codegen/src/rust/engine/target/debug
build examples libclient.d libengine.d pants
deps incremental libclient.rlib libengine.dylib pants.d
chrisjrn@chrisjrns-MacBook-Pro pants %
👀wide-midnight-78598
04/05/2023, 7:46 PMwide-midnight-78598
04/05/2023, 9:20 PMscie
creation (for Python, currently). ... Mostly because I'm manually creating these in one of my projects, and manual steps fly in the face of my sensibilities.
https://github.com/sureshjoshi/pants-plugins/blob/83-scie/pants-plugins/experimental/scie/rules.py
pex_binary(
name="hellotyper-pex",
entry_point="hellotyper.main",
dependencies=[":libhellotyper"],
)
scie_binary(
name="hellotyper-scie",
dependencies=[":hellotyper-pex"],
)
It's early days, need to pull a bunch of hardcoded stuff into the target's fieldset - and the goal here is not a comprehensive plugin, but rather a practical 80/20 one (e.g. can it create a standalone binary for CLIs and Application Servers is probably my target wheelhouse). Aiming to have scie
binaries for all of the example python applications by tonight or tomorrowwide-midnight-78598
04/06/2023, 5:07 PMKeyError: <class 'pants.core.goals.deploy.DeployFieldSet'>
error because my project doesn't currently have any targets that use Deploy?
peekable_field_sets = [PackageFieldSet, TestFieldSet, DeployFieldSet]
target_roots_to_field_sets_get = [Get(
TargetRootsToFieldSets,
TargetRootsToFieldSetsRequest(
field_set_superclass=fs,
goal_description="",
no_applicable_targets_behavior=NoApplicableTargetsBehavior.ignore,
),
) for fs in peekable_field_sets]
ancient-vegetable-10556
04/06/2023, 5:08 PMPANTS_SHA
-like behaviour, or do we need to use PANTS_SOURCE
and a local source checkout?proud-dentist-22844
04/06/2023, 7:35 PMexport <addresses>
) that will stay as is; this will only apply when using export --resolve=
).
So, here’s my question:
Should we have a new export option to enable/disable editable installs? If so, should it default to enabled or disabled (disabled is the backwards compatible option)?
Or should we always do editable install of dists when exporting a resolve that includes dists?