ancient-vegetable-10556
02/14/2023, 6:56 PM{SomeField.alias}
and discovering that I had circular references, so for your edification, HelpString
. It looks like an f
-string, but can be used to forward-refer to classes defined in the same file: https://github.com/pantsbuild/pants/pull/18246help
on Target
and Field
subclasses now supports 0-argument lambdas, as long as you use the help_text
helper function for help values! https://github.com/pantsbuild/pants/pull/18248curved-television-6568
02/14/2023, 7:52 PMpants
or scie-pants
if so.. 🧵careful-address-89803
02/15/2023, 6:11 PMMyLockfileSentinel <: SimplePexLockfileSentinel <: GenerateToolLockfileSentinel
? And would that even work if I had rules that were (GenerateToolLockfileSentinel) => A
and (SimplePexLockfileSentinel) => A
?sparse-lifeguard-95737
02/15/2023, 10:04 PMshy-architect-61291
02/15/2023, 11:17 PMdocker
out to its own crate. However, there are calls in the <http://docker_tests.rs|docker_tests.rs>
file that reference the <http://local_tests.rs|local_tests.rs>
file from process_execution
crate. Despite having scoped the <http://lib.rs|lib.rs>
file and Cargo.toml
correctly (as indicated by other dependencies that check out), this will fail /.cargo test -p docker
with a
use process_execution::local_tests::named_caches_and_immutable_inputs
^^^^^^^^^^^ could not find `local_tests` in `process_execution`
Process::new(owned_string_vec(&["/bin/echo", "-n", "foo"]))
^^^ function or associated item not found in `Process`
error. For reference, relevant code snippets:
// in docker/Cargo.toml
[dependencies]
...
process_execution = { path = "../process_execution" }
// in process_execution/lib.rs
pub mod local;
#[cfg(test)]
pub mod local_tests
// also an import problem:
pub struct Process { /*..*/ };
impl Process {
#[cfg(test)
pub fn new()....
}
Is there something special about test configurations that prevent cross-crate references?witty-crayon-22786
02/16/2023, 12:00 AM2.15.x
: see https://github.com/pantsbuild/pants/issues/18162#issuecomment-1432238187careful-address-89803
02/16/2023, 3:06 AM# TODO: It is pretty ad-hoc that we do add the interpreter version for resolves but not for tools.
# We should pick one and deprecate the other.
Would anything bad happen if we were to not add the full version? I don't think it's possible for a resolve to have 2 interpreters associated with it?
removing the version from the path of the exported venv would help solve issues setting up dev environments, like this one, and also what I hit today where my system's version of python got bumped but the old venv stuck around.
For backwards compatibility, we could add it as a toggle. or go all the way with the linked issue and provide custom export paths optionally with the versionbitter-ability-32190
02/16/2023, 9:13 PMtests/python/pants_test/init/test_plugin_resolver.py
due to symlinking big files...
# Kill the repo source dir and re-resolve. If the PluginResolver truly detects exact
# requirements it should skip any resolves and load directly from the still intact
# cache.
safe_rmtree(repo_dir)
Can someone help me understand what's going on here?
The issue is it the second go-around I guess it's re-resolving plugins (which I suppose is a symptom of the bug) and failing to find jake
broad-processor-92400
02/17/2023, 1:43 AM--loop
for monitoring file changes (very nice when it works), but discovered a bunch of bugs: https://github.com/pantsbuild/pants/issues?q=is%3Aissue+is%3Aopen+loop+infinite
I filed them as mostly separate issues, since they felt like they might have different causes/resolutions if one was to play whack-a-mole and fix things individually (since, e.g., test failures under pants --loop test ...
don't get rerun infinitely, so clearly it's doing something special), but potentially there's a single change that'll make `--loop`'s behaviour much nicer globally?sparse-lifeguard-95737
02/17/2023, 3:06 PMpython
subsystem. something like:
python.resolves_to_tags]
scientific = ["intel-only"]
legacy = ["intel-only", "py36-only"]
to have tags auto-apply to all targets in a given resolve.
this would solve our problem because once the tags are in place, we can filter on them using existing mechanisms.
what do people think? I can try to knock it out if there are no objections 🧵average-vr-56795
02/17/2023, 9:01 PMproud-dentist-22844
02/18/2023, 5:09 PMfast-nail-55400
02/20/2023, 9:15 PMscie-pants
with the pants
repo itself, what is the correct answer to:
The `pants.toml` at /home/tdyas/Projects/Pants/pants/pants.toml has no `pants_version` configured in the `GLOBAL` section.
Would you like set `pants_version` to the latest stable release? (Y/n):
broad-processor-92400
02/20/2023, 10:56 PMbitter-ability-32190
02/21/2023, 1:45 AMfoo.pex
how could I tease out that 3.8
is the latest compatibleenough-analyst-54434
02/21/2023, 1:50 AMunzip -qc foo.pex PEX-INFO | jq .
- it should be pretty obvious from there even if there are no ICs declared.bitter-ability-32190
02/21/2023, 3:54 PMPexRequest.__init__
is missing a few type hints, which means we have some naughty callers we aren't typechecking.bitter-ability-32190
02/21/2023, 4:41 PMfind_python
rule in system_binaries
not just use sys.executable
? For pants
it'd be the standlone, for ./pants
it'd be whatever the script found.shy-architect-61291
02/21/2023, 7:54 PMprocess_execution
crate up so docker and remote (with remote_cache) are separate. I did not move nailgun since there’s already a nailgun crate in the parent engine directorybitter-ability-32190
02/21/2023, 9:51 PMjosh@cephandrius:~/work/pants$ which python3.7
josh@cephandrius:~/work/pants$ pyenv versions
* system (set by /home/josh/.pyenv/version)
3.8.16
josh@cephandrius:~/work/pants$ ./pants run src/python/pants/runme.py
/home/josh/.cache/pants/named_caches/pex_root/venvs/s/9ccfd9b4/venv/bin/python3.7
Note that Pyenv and building Python was completely sandboxed.
(Python is still required on the system for a few non-user-code places, but that can be tackled separetly)bitter-ability-32190
02/21/2023, 10:04 PMVenvPex
it has some guards against the venv being deleted, but if I delete the venv dir I see path/to/venv_dir/pex: No such file or directory
Working backwards, when we make the PEX with --venv --seed verbose
I see pex
in the output JSON having the right path, but the second portion isn't related to any portion in PEX-INFO
. Where is that second hash coming from?shy-architect-61291
02/22/2023, 6:34 PM“Error making env for store at <dir>: Too many open files”
I see the containers spin up correctly in docker desktop. Following the error shows it originates from the lmdb setup. Is there some config I need to set up prior? (Running MacOS x86_64)clever-toothbrush-13797
02/23/2023, 1:20 PMpants
release for testing locally, so I might avoid a mistake like https://github.com/pantsbuild/pants/pull/18342 in the future?proud-dentist-22844
02/23/2023, 4:21 PMbitter-ability-32190
02/23/2023, 4:26 PMThread 2 "tokio-runtime-w" received signal SIGSEGV, Segmentation fault.
🫠
From pants --no-pantsd help
on a branch with only-Python changesfast-nail-55400
02/23/2023, 9:11 PMancient-vegetable-10556
02/23/2023, 10:48 PMshell_command
and adhoc_tool
, which also allows version pinning for pre-installed binaries that themselves need runnable dependencies (e.g. yarn
depends on node
). Would appreciate some feedback on the API approach here:
https://github.com/pantsbuild/pants/pull/18347average-vr-56795
02/24/2023, 12:31 AMbusy-vase-39202
02/24/2023, 7:24 PMwitty-crayon-22786
02/24/2023, 7:45 PM