https://pantsbuild.org/ logo
a

average-breakfast-91545

05/10/2023, 3:57 PM
Just had a very tedious incident caused by a missing file in a pex_binary. There was a warning, can't find an owner for an import, but the package built and deployed. Am I missing a way to make that fail the build? ignore_errors isn't set to True anywhere that I can see.
c

curved-television-6568

05/10/2023, 4:08 PM
❤️ 1
a

average-breakfast-91545

05/10/2023, 4:08 PM
Thanks!
c

curved-television-6568

05/10/2023, 4:09 PM
we think error is the sane thing to do, but it’s warn due to being backwards compatible for when the option didn’t exist, IIRC
a

average-breakfast-91545

05/10/2023, 4:09 PM
I googled around, but it was sort of hard to find the exact place in the docs where that info is recorded
1
c

curved-television-6568

05/10/2023, 4:10 PM
might be a good time to revisit that default value.
sorry you had to learn this the hard way
a

average-breakfast-91545

05/10/2023, 4:12 PM
No bother! I was just confused about whether I'd done this to myself
I low key love Pants, so my tolerance for the unexpected is high
❤️ 6
h

happy-kitchen-89482

05/10/2023, 5:25 PM
We could deprecate the default - we can detect if you're relying on it and warn that you must set it explicitly to continue to get that behavior
It's probably time
a

average-breakfast-91545

05/10/2023, 5:26 PM
As in flip the default and provide a useful error if there's no value set?
That sounds like a PR within my limited capabilities.
❤️ 3
b

busy-vase-39202

05/10/2023, 6:00 PM
Cool! We love it having new contributors. ❤️
h

happy-kitchen-89482

05/10/2023, 6:59 PM
Well, this would be a two-parter. Part one - use our deprecation mechanism to warn you if you're relying on the default. The warning would state that in, say, 2.18.0.dev0 the default will switch. Then, after we cut the 2.17.x release branch, a second PR will change the default and remove the warning.
For the first part, you can use is_default() to check if the value is being provided by the default (it's not enough to check the value, because that could have been explicitly set to the same as the default), and the warning should state that you must set it explicitly if you want to continue to use that value.
We'd love a PR!
a

average-breakfast-91545

05/10/2023, 7:02 PM
Might do this as a warmup before I try and tackle excluding transitive deps.
👍 1
🙏 1
b

busy-vase-39202

05/10/2023, 7:12 PM
Have fun! Reach out if you run into trouble. Maintainers are happy to help.