flat-zoo-31952
06/08/2023, 6:20 PMimport pytest
and is resolved to pytest 7.0 ? I thought Pants/Pex would choke on that but it seems to be working stranglelybitter-ability-32190
06/08/2023, 6:22 PMbitter-ability-32190
06/08/2023, 6:24 PMenough-analyst-54434
06/08/2023, 6:38 PMsys.path
wins. IIRC Pants constructs a pytest runner PEX once using the pytest "tool" resolve and then joins that with the code under test PEX.enough-analyst-54434
06/08/2023, 6:38 PMflat-zoo-31952
06/08/2023, 6:39 PMenough-analyst-54434
06/08/2023, 6:39 PMbitter-ability-32190
06/08/2023, 6:39 PMpytest
resolve to your code's resolveflat-zoo-31952
06/08/2023, 6:39 PMflat-zoo-31952
06/08/2023, 6:39 PMenough-analyst-54434
06/08/2023, 6:39 PMenough-analyst-54434
06/08/2023, 6:40 PMflat-zoo-31952
06/08/2023, 6:42 PM[pytest]
install_from_resolve = "pip-f37"
requirements = ["pytest"]
but it works for the pants-plugin resolveenough-analyst-54434
06/08/2023, 6:43 PMflat-zoo-31952
06/08/2023, 6:43 PMbitter-ability-32190
06/08/2023, 6:43 PMflat-zoo-31952
06/08/2023, 6:44 PMenough-analyst-54434
06/08/2023, 6:44 PMenough-analyst-54434
06/08/2023, 6:45 PMenough-analyst-54434
06/08/2023, 6:47 PMflat-zoo-31952
06/08/2023, 6:47 PMflat-zoo-31952
06/08/2023, 6:47 PMflat-zoo-31952
06/08/2023, 6:47 PMbitter-ability-32190
06/08/2023, 6:48 PM[pytest]
inherit_resolve = True
meaning the resolve for pytest
at build time should be the resolve of the target.
Although, I'm sure we'll find out why we can't do that 😅flat-zoo-31952
06/08/2023, 6:48 PMenough-analyst-54434
06/08/2023, 6:48 PMflat-zoo-31952
06/08/2023, 6:49 PMtest
is written, where it resolves pytest first, then resolves the local_dists, and then merges themenough-analyst-54434
06/08/2023, 6:49 PMflat-zoo-31952
06/08/2023, 6:49 PMhappy-kitchen-89482
06/08/2023, 6:56 PMhappy-kitchen-89482
06/08/2023, 6:56 PMinstall_from_resolve=name_of_resolve
on the tool's subsystemflat-zoo-31952
06/08/2023, 6:56 PMbitter-ability-32190
06/08/2023, 6:56 PMhappy-kitchen-89482
06/08/2023, 6:56 PMhappy-kitchen-89482
06/08/2023, 6:57 PMbitter-ability-32190
06/08/2023, 6:57 PMhappy-kitchen-89482
06/08/2023, 6:57 PMflat-zoo-31952
06/08/2023, 6:58 PMflat-zoo-31952
06/08/2023, 6:58 PMhappy-kitchen-89482
06/08/2023, 6:58 PMhappy-kitchen-89482
06/08/2023, 6:59 PMhappy-kitchen-89482
06/08/2023, 6:59 PMbitter-ability-32190
06/08/2023, 6:59 PMpytest
is special because you use it as a tool AND import itflat-zoo-31952
06/08/2023, 6:59 PMflat-zoo-31952
06/08/2023, 6:59 PMbitter-ability-32190
06/08/2023, 6:59 PMblack
and expect it to work when running black
happy-kitchen-89482
06/08/2023, 6:59 PMflat-zoo-31952
06/08/2023, 6:59 PMhappy-kitchen-89482
06/08/2023, 6:59 PMbitter-ability-32190
06/08/2023, 7:00 PMhappy-kitchen-89482
06/08/2023, 7:00 PMflat-zoo-31952
06/08/2023, 7:00 PMhappy-kitchen-89482
06/08/2023, 7:00 PMhappy-kitchen-89482
06/08/2023, 7:01 PM--pytest-install-from-resolve=resolve
for different parts of the codebase?flat-zoo-31952
06/08/2023, 7:01 PMflat-zoo-31952
06/08/2023, 7:01 PMhappy-kitchen-89482
06/08/2023, 7:02 PMhappy-kitchen-89482
06/08/2023, 7:02 PMbitter-ability-32190
06/08/2023, 7:02 PMflat-zoo-31952
06/08/2023, 7:02 PMhappy-kitchen-89482
06/08/2023, 7:02 PMhappy-kitchen-89482
06/08/2023, 7:02 PMbitter-ability-32190
06/08/2023, 7:02 PMhappy-kitchen-89482
06/08/2023, 7:02 PMflat-zoo-31952
06/08/2023, 7:03 PMhappy-kitchen-89482
06/08/2023, 7:03 PMhappy-kitchen-89482
06/08/2023, 7:03 PMbitter-ability-32190
06/08/2023, 7:03 PMflat-zoo-31952
06/08/2023, 7:03 PMhappy-kitchen-89482
06/08/2023, 7:04 PMbitter-ability-32190
06/08/2023, 7:04 PMhappy-kitchen-89482
06/08/2023, 7:04 PMbitter-ability-32190
06/08/2023, 7:04 PM• Inheriting BUILD file metadata up the filesystemAsk @curved-television-6568 how many times I've bugged him in the past few months regarding this 😉
flat-zoo-31952
06/08/2023, 7:04 PMhappy-kitchen-89482
06/08/2023, 7:05 PMflat-zoo-31952
06/08/2023, 7:05 PMhappy-kitchen-89482
06/08/2023, 7:05 PMhappy-kitchen-89482
06/08/2023, 7:05 PMbitter-ability-32190
06/08/2023, 7:05 PMWell, nothing else supports it either. So it's more like "we won't have a monorepo"Makefiles wouldsolve this, if I may...
flat-zoo-31952
06/08/2023, 7:05 PMbitter-ability-32190
06/08/2023, 7:06 PMcurved-television-6568
06/08/2023, 7:06 PMbitter-ability-32190
06/08/2023, 7:06 PMPathGlob
be satisfied by a target, and never not from a target)curved-television-6568
06/08/2023, 7:07 PMflat-zoo-31952
06/08/2023, 7:08 PMpants test pants-plugins:: --no-pytest-config-discovery --pytest-install-from-resolve=pants-plugins
works for now and I think that's a decent workaroundflat-zoo-31952
06/08/2023, 7:09 PM_pytest
parts of it in our tests)curved-television-6568
06/08/2023, 7:14 PM• The artificial split between config that goes in BUILD files vs pants.toml
I’ve been playing with the idea in my head about having subsystems configured in BUILD files.. sounds pretty much like ☝️ That would then of course be possible to have different configs for the same subsystem in different parts of your repo. The “trick” then is to have the config propagate properly to each target that consumes them.
happy-kitchen-89482
06/08/2023, 8:12 PMbitter-ability-32190
06/08/2023, 8:13 PMhappy-kitchen-89482
06/08/2023, 8:13 PMhappy-kitchen-89482
06/08/2023, 8:13 PMbitter-ability-32190
06/08/2023, 8:14 PMbitter-ability-32190
06/08/2023, 8:15 PMsome_target(
dependencies=[
dependency("<addr>", for_goals=["check"], asset_type="file")
]
)
where dependency
is an object with some known keys (and maybe plugin-provided keys as well) would make dep traversal much richerflat-zoo-31952
06/09/2023, 1:28 PMpants.toml
and BUILD
files is that nothing really has pants.toml
as filedeps so for those of us that use the --changed
subsystem pants.toml
won't trigger things. This can be really useful at times (since touching a .BUILD dirties all of its targets from a --changed
perspective), but also sometimes things that should be checked get missed.curved-television-6568
06/09/2023, 1:32 PMflat-zoo-31952
06/09/2023, 1:33 PMcurved-television-6568
06/09/2023, 1:33 PMcurved-television-6568
06/09/2023, 1:33 PMflat-zoo-31952
06/09/2023, 1:34 PMflat-zoo-31952
06/09/2023, 1:42 PMbitter-ability-32190
06/09/2023, 2:00 PMflat-zoo-31952
06/09/2023, 2:03 PMflat-zoo-31952
06/09/2023, 2:10 PMpants lint check test
CI simplicity doesn't feel realistic in anyway.flat-zoo-31952
06/09/2023, 2:12 PM