Closed kaos closed 2 years ago
Duplicate of https://github.com/pantsbuild/pants/issues/15636
Duplicate of https://github.com/pantsbuild/pants/issues/15636
OK, cool. The symptom (and remedy) may be the same, but how the get there was not ;)
I still have issues when running the pre-commit script.
* Typechecking
00:31:01.50 [ERROR] 1 Exception encountered:
Engine traceback:
in select
in pants.vcs.changed.find_changed_owners
in pants.engine.internals.graph.find_owners
in pants.engine.internals.graph.resolve_unexpanded_targets
in pants.engine.internals.specs_rules.addresses_from_raw_specs_without_file_owners
in paths
Traceback (no traceback):
<pants native internals>
Exception: Unmatched globs from CLI arguments: [".github/*", ".github/workflows/*", "3rdparty/python/lockfiles/*", "testprojects/src/python/python_targets/*"]
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to https://www.pantsbuild.org/v2.13/docs/troubleshooting#pants-cannot-find-a-file-in-your-project.
Traceback (most recent call last):
File "/Users/aadt/src/github/kaos/pants/src/python/pants/bin/daemon_pants_runner.py", line 131, in single_daemonized_run
runner = LocalPantsRunner.create(
File "/Users/aadt/src/github/kaos/pants/src/python/pants/bin/local_pants_runner.py", line 159, in create
specs = calculate_specs(
File "/Users/aadt/src/github/kaos/pants/src/python/pants/init/specs_calculator.py", line 93, in calculate_specs
(changed_addresses,) = session.product_request(
File "/Users/aadt/src/github/kaos/pants/src/python/pants/engine/internals/scheduler.py", line 575, in product_request
self._raise_on_error([t for _, t in throws])
File "/Users/aadt/src/github/kaos/pants/src/python/pants/engine/internals/scheduler.py", line 510, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:
Engine traceback:
in select
in pants.vcs.changed.find_changed_owners
in pants.engine.internals.graph.find_owners
in pants.engine.internals.graph.resolve_unexpanded_targets
in pants.engine.internals.specs_rules.addresses_from_raw_specs_without_file_owners
in paths
Traceback (no traceback):
<pants native internals>
Exception: Unmatched globs from CLI arguments: [".github/*", ".github/workflows/*", "3rdparty/python/lockfiles/*", "testprojects/src/python/python_targets/*"]
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to https://www.pantsbuild.org/v2.13/docs/troubleshooting#pants-cannot-find-a-file-in-your-project.
Use -ldebug for more logs.
See https://www.pantsbuild.org/v2.13/docs/troubleshooting for common issues.
Consider reaching out for help: https://www.pantsbuild.org/v2.13/docs/getting-help
To reproduce:
$ echo >> .github/workflows/test.yaml
$ ./build-support/githooks/pre-commit
Thanks for the report! This one is a different codepath.
Apologies for being a pain here now, but it's still an issue for me. Did you try to run my repro above ?
$ echo >> .github/workflows/test.yaml
$ ./build-support/githooks/pre-commit
On: bce58ff356ea1c098cb1a00fdf9e99124dab85d5 I still get:
$ ./build-support/githooks/pre-commit
* Running `./cargo clippy --all`
Finished dev [unoptimized + debuginfo] target(s) in 0.82s
* Checking formatting of Rust files
* Checking Rust target headers
Updating crates.io index
Ignored package `cargo-ensure-prefix v0.1.7` is already installed, use --force to override
error: could not find `=0.1.7` in registry `crates-io` with version `*`
Summary Successfully installed cargo-ensure-prefix! Failed to install =0.1.7 (see error(s) above).
error: some crates failed to install
* Typechecking
14:03:21.54 [ERROR] 1 Exception encountered:
Engine traceback:
in select
in pants.vcs.changed.find_changed_owners
in pants.engine.internals.graph.find_owners
in pants.engine.internals.graph.resolve_unexpanded_targets
in pants.engine.internals.specs_rules.addresses_from_raw_specs_without_file_owners
in paths
Traceback (no traceback):
<pants native internals>
Exception: Unmatched glob from CLI arguments: ".github/workflows/*"
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to https://www.pantsbuild.org/v2.13/docs/troubleshooting#pants-cannot-find-a-file-in-your-project.
Traceback (most recent call last):
File "/Users/aadt/src/github/kaos/pants/src/python/pants/bin/daemon_pants_runner.py", line 131, in single_daemonized_run
runner = LocalPantsRunner.create(
File "/Users/aadt/src/github/kaos/pants/src/python/pants/bin/local_pants_runner.py", line 159, in create
specs = calculate_specs(
File "/Users/aadt/src/github/kaos/pants/src/python/pants/init/specs_calculator.py", line 93, in calculate_specs
(changed_addresses,) = session.product_request(
File "/Users/aadt/src/github/kaos/pants/src/python/pants/engine/internals/scheduler.py", line 575, in product_request
self._raise_on_error([t for _, t in throws])
File "/Users/aadt/src/github/kaos/pants/src/python/pants/engine/internals/scheduler.py", line 510, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:
Engine traceback:
in select
in pants.vcs.changed.find_changed_owners
in pants.engine.internals.graph.find_owners
in pants.engine.internals.graph.resolve_unexpanded_targets
in pants.engine.internals.specs_rules.addresses_from_raw_specs_without_file_owners
in paths
Traceback (no traceback):
<pants native internals>
Exception: Unmatched glob from CLI arguments: ".github/workflows/*"
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to https://www.pantsbuild.org/v2.13/docs/troubleshooting#pants-cannot-find-a-file-in-your-project.
Use -ldebug for more logs.
See https://www.pantsbuild.org/v2.13/docs/troubleshooting for common issues.
Consider reaching out for help: https://www.pantsbuild.org/v2.13/docs/getting-help
With this change:
$ git diff
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 66806d048..3672399bb 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -870,3 +870,4 @@ name: Pull Request CI
push:
branches-ignore:
- dependabot/**
+
Not a pain, I would so much rather fix this from your report than an end user :)
Ah ha, I reproduce. Looks like I fixed --changed-dependees=none
but not yet --changed-dependees=transitive
. Coming right up.
Describe the bug
Pants version On
main
OS Mac
Additional info To repro, edit
.github/workflows/test.yaml
and then run the pre-commit hook.Attempt at fixing this in #15654, but it is incomplete.