-
Notifications
You must be signed in to change notification settings - Fork 73
🐛 Fix: disallow need variants for list type fields #1489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The variant processing was turning these into strings, which does not make sense and breaks the need item schema. Since this is the case, and has not been noticed before, it is doubtful that variants were ever used in this context.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1489 +/- ##
==========================================
+ Coverage 86.87% 88.66% +1.78%
==========================================
Files 56 68 +12
Lines 6532 8451 +1919
==========================================
+ Hits 5675 7493 +1818
- Misses 857 958 +101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is a good observation. Really seems like it was only working for options as match_variants
returns str | None
, so you have a fair point. I will approve this as it makes SN safer.
However I think variant handling is a powerful feature, also for links.
I am ok for disabling this for now and listen to user's feedback whether link variants are a thing.
@danwos marking you so you are aware of this
I have seen once a use case, where variant management was needed for links, as the user wanted to link a spec to 2 different requirements, which were coming from 2 OEMs. Would it cost much time to fix it instead of deactivating it? |
The question is; what does this syntax even mean, in terms of a list of strings? For example here; The idea of variants is not necessarily bad, but the implementation is a complete ill-though out mess. I will be disabling this for now, |
…/sphinx-needs into disallow-variant-links
The variant processing was turning these into strings, rather than list of strings, which does not make sense and breaks the need item schema.
Since this is the case, and has not been noticed before, it is doubtful that variants are ever used in this context.