witty-crayon-22786
04/28/2022, 11:46 PM2.11.0
, so i’m getting a patch and another rc out for that tonight. will cut 2.11.0
first thing tomorrow though.average-vr-56795
04/29/2022, 1:45 PMbitter-ability-32190
04/29/2022, 1:47 PM--rerun N
flag which will re-run tests a certain # of times to help identify flaky tests. I could implement this in Pytest + Pants' --force
, but it might be useful for other languages.
Anyone got thoughts?witty-crayon-22786
04/29/2022, 7:20 PM@union
working, heh. combining @rule_helper
with https://github.com/pantsbuild/pants/issues/12934 just jumped way up in my mind.witty-crayon-22786
04/29/2022, 8:01 PMsparse-lifeguard-95737
04/29/2022, 8:37 PMimport-linter
, and trying to debug rule graph errors in the integration tests. I basically copy-paste-adjusted the setups from mypy
and flake8
to set things up. the errors I’m seeing look like:
No source of dependency ImportLinter for @rule(pants.backend.python.lint.import_linter.rules:88:import_linter_lint_partition(ImportLinterPartition, ImportLinterConfigFile, ImportLinterCustomContracts, ImportLinter) -> LintResult, gets=[Get(PythonSourceFiles, PythonSourceFilesRequest), Get(Pex, RequirementsPexRequest), Get(VenvPex, PexRequest), Get(Digest, MergeDigests), Get(FallibleProcessResult, VenvPexProcess)]). All potential sources were eliminated: []
there’s a separate error like ^^^ for every input type to import_linter_lint_partition
. the stacktrace is coming out of my pytest.fixture
for setting up a rule runner:
@pytest.fixture
def rule_runner() -> RuleRunner:
return RuleRunner(
rules=[
*import_linter_rules(),
*import_linter_subsystem_rules(),
*dependency_inference_rules.rules(),
*config_files.rules(),
*target_types_rules.rules(),
QueryRule(LintResults, [ImportLinterRequest]),
],
target_types=[PythonSourcesGeneratorTarget, PythonRequirementTarget, PythonSourceTarget],
)
any tips to help me debug what’s wrong with the setup? I keep wondering if the empty array in All potential sources were eliminated: []
is a sign that the rules aren’t getting collected properlywitty-crayon-22786
04/29/2022, 10:34 PMCategorizing PR#15283... Unable to categorize PR 15283. HTTP error: 403 rate limit exceeded🥲
witty-crayon-22786
04/29/2022, 11:13 PMrc0
now apply to a new release type: a
(alpha) releases. the strategy and process pages have been updated.witty-crayon-22786
04/29/2022, 11:40 PMIncremental adoption
page to “Migrating to Pants” or something. i don’t think i had clicked it, because i assumed that it was for larger repositories, rather than any existing repositoryhundreds-father-404
05/02/2022, 6:19 PMfresh-cat-90827
05/03/2022, 10:50 AMPANTS_SETUP_CACHE
env var to tell Pants where to store the cache (for the Pants installation in customer’s repo). Is there a way to modify the cache location when running Pants from sources in its own repo (https://www.pantsbuild.org/docs/running-pants-from-sources)? I.e. I checkout the https://github.com/pantsbuild/pants and would like to have cache stored in some other location when running ./pants
. Defining PANTS_SETUP_CACHE
doesn’t seem to have any effect.hundreds-father-404
05/03/2022, 8:42 PMhundreds-father-404
05/03/2022, 8:47 PM./pants --version foo bar
in our install guide?enough-analyst-54434
05/03/2022, 9:23 PMnarrow-vegetable-37489
05/03/2022, 10:21 PMpython-lockfile-generator=pex
("No matching distribution found") but works fine with python-lockfile-generator=poetry
. I'm pretty sure it's because my interpreter constraints wants Python 3.9 and the dependency only publishes wheels for 3.6, 3.7 and 3.8 - which I guess results in poetry happily building from source while pex does not? Happy to file a bug if something isn't right there.happy-kitchen-89482
05/03/2022, 11:40 PM./build-support/bin/generate_all_lockfiles.sh
to recognize it? I'm using it in a registered rule, I've added it to the AllTools list, it's set up just like every other tool, but I get Unrecognized resolve name from the option
--generate-lockfiles-resolve`sparse-lifeguard-95737
05/04/2022, 2:38 PMPATH
to the .shims
dir in the DockerBinary
setup here - it’s not obvious to me if there’s a way to inject the absolute path of the final work-dir into that value. I thought about hacking in a $(pwd)
or something, but looks like the values we set in the process env get escaped before being written to __run.sh
hundreds-father-404
05/04/2022, 3:55 PM./pants: line 64: /Users/runner/.cache/pants/pants_dev_deps/Darwin.x86_64.i386.py37.venv/bin/python: No such file or directory
303
narrow-vegetable-37489
05/04/2022, 10:38 PMcolors
and dynamic_ui
are off? It happened to me randomly the other day on 2.11.0rc2 but sorted itself out after a while for unknown reasons, and today it happened to a co-worker on 2.11.0 as well.hundreds-father-404
05/04/2022, 11:05 PM[python-infer].unowned_dependency_behavior
. One issue w/ its warn
mode is it can be extremely verbose -- we give you general guidance how to solve it, but repeat that with every problematic file! Ditto on ambiguous dependencies
Any ideas how we can make this less verbose when in warn mode? "Look at this web page to learn more"? "Look at the log above to learn more"?wide-energy-11069
05/05/2022, 12:34 AMwide-energy-11069
05/05/2022, 6:04 AM$ ./pants goals
...
Compiling process_execution v0.0.1 (/Users/yic/workspace/oss_pants/src/rust/engine/process_execution)
Finished release [optimized + debuginfo] target(s) in 3m 27s
Traceback (most recent call last):
File "/Users/yic/workspace/oss_pants/src/python/pants/bin/pants_loader.py", line 19, in <module>
from pants.bin.pants_runner import PantsRunner
File "/Users/yic/workspace/oss_pants/src/python/pants/bin/pants_runner.py", line 13, in <module>
from pants.engine.environment import CompleteEnvironment
File "/Users/yic/workspace/oss_pants/src/python/pants/engine/environment.py", line 10, in <module>
from pants.engine.rules import collect_rules, rule
File "/Users/yic/workspace/oss_pants/src/python/pants/engine/rules.py", line 25, in <module>
from pants.engine.engine_aware import SideEffecting
File "/Users/yic/workspace/oss_pants/src/python/pants/engine/engine_aware.py", line 9, in <module>
from pants.engine.internals import native_engine
ImportError: dlopen(/Users/yic/workspace/oss_pants/src/python/pants/engine/internals/native_engine.so, 0x0002): tried: '/Users/yic/workspace/oss_pants/src/python/pants/engine/internals/native_engine.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/native_engine.so' (no such file)
It’s okay if not, I can switch back to intel.wide-energy-11069
05/05/2022, 6:56 AMCategorizing PR#15320... Unable to categorize PR 15320. HTTP error: 403 rate limit exceeded
hundreds-father-404
05/05/2022, 2:31 PMmain
? maybe rm -rf src/rust/engine
and i think src/python/pants/engine/internals/native_engine.so
hundreds-father-404
05/05/2022, 2:32 PMhundreds-father-404
05/05/2022, 2:32 PMUSE_PY39=true
bitter-ability-32190
05/05/2022, 6:14 PM./pants --no-pantsd -ldebug --stats-log fmt --only=black ::
(I only retrofitted black for PoC) shows local_cache_requests_uncached: 1048
(vs 14 on main
)
When I then run ./pants --no-pantsd -ldebug --stats-log fmt --only=black src/python/pants/backend/python/lint/black/rules.py
I don't see any processes being run for black
(there are uncached requests/processes for getting the ICs).
https://github.com/thejcannon/pants/tree/synthcacheprocwide-energy-11069
05/05/2022, 7:55 PM% git clean -ffdx
...
% MODE=debug USE_PY39=true ./pants
...
Finished dev [unoptimized + debuginfo] target(s) in 55.23s
Traceback (most recent call last):
File "/Users/yic/workspace/oss_pants/src/python/pants/bin/pants_loader.py", line 19, in <module>
from pants.bin.pants_runner import PantsRunner
File "/Users/yic/workspace/oss_pants/src/python/pants/bin/pants_runner.py", line 13, in <module>
from pants.engine.environment import CompleteEnvironment
File "/Users/yic/workspace/oss_pants/src/python/pants/engine/environment.py", line 10, in <module>
from pants.engine.rules import collect_rules, rule
File "/Users/yic/workspace/oss_pants/src/python/pants/engine/rules.py", line 25, in <module>
from pants.engine.engine_aware import SideEffecting
File "/Users/yic/workspace/oss_pants/src/python/pants/engine/engine_aware.py", line 9, in <module>
from pants.engine.internals import native_engine
ImportError: dlopen(/Users/yic/workspace/oss_pants/src/python/pants/engine/internals/native_engine.so, 0x0002): tried: '/Users/yic/workspace/oss_pants/src/python/pants/engine/internals/native_engine.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/native_engine.so' (no such file)
wide-energy-11069
05/05/2022, 7:56 PM% python3
Python 3.9.12 (v3.9.12:b28265d7e6, Mar 23 2022, 18:22:40)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
hundreds-father-404
05/05/2022, 7:58 PMUSE_PY39=true
only works with release.sh
. Normally I think you set PY=python3.9
. I have an .envrc
I use
export PY=python3.9
export PANTS_PYTHON_INTERPRETER_CONSTRAINTS=[\'==3.9.*\']
export PANTS_BLACK_INTERPRETER_CONSTRAINTS=[\'==3.9.*\']
export PANTS_POETRY_INTERPRETER_CONSTRAINTS=[\'==3.9.*\']