How would people feel about the new "asset inferen...
# general
b
How would people feel about the new "asset inference" feature for Python being on-by-default? I think given that source inference (new name I suppose?) is on by default and the likelihood of false positives is extremely low (and likely has mild side effects if it happens) that we should have it on by default. Thoughts šŸŽ£ ?
h
Hmmmm
h
Our deprecation policy says that technically we should: 1. Deprecate not setting this option by default, i.e. prompt users to make a decision in Pants 2.11 2. in Pants 2.12, we can change the default to be on Downside is that it causes some churn for 2.11 users
b
Can we only force people to set the option if we detect a Python target depending on an asset target?
h
I don't think so because that means that we have to enable asset inference enough to do that, which has a performance impact.
b
Sorry, detect in a BUILD file
But I suppose even that detection has a noticeable impact? šŸ¤”
āž• 1
h
Joshua has pointed out that the ideal default would be
[python-infer].assets
should be True. I think that makes sense, and I definitely want to keep having Pants have the right defaults so that you don't have to turn on some magical options to get things working properly So imo the question is do we "fix the default" via a deprecation or can we do it right way
b
The obvious stumbling blocks: ā€¢ False positives ā€¢ Ambiguity warnings ā€¢ performance hit
h
Ambiguity errors
Which are really just useful-but-annoying(?) warnings; not errors
b
(edited)
šŸ‘ 1
h
The obvious stumbling blocks:
I would add: performance hit. Particulary until we have https://github.com/pantsbuild/pants/issues/14720
āœ… 1
I think my vote is personally for a deprecation, especially w/ the performance concern It's annoying for users to go through a deprecation, but I think it's a less bad sin than breaking our stability. As a Pants user, I would generally expect
./pants dependencies
not change between versions for example, without at least having been made aware
c
+1 on deprecation cycle to avoid surprises.
šŸ‘ 2
āž• 1