-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature/atr 8 dev no bql field #544
Conversation
…et and works faster on average than the immutable hashset
…m semantic model for aggregated field attributes
…operties and added HasAcumaticaAttributes property
…tPropertyValueInternal private helper
…lFieldTypeMapping type
… renamed local variables
…oBqlFieldTypeMapping type
…ype with Contains methods and intergrated changes. Details: - extended mappping helper between property type and BQL field type with Contains methods that check if type is present in mapping tables - integrated changes into legacy BQL field and constant analyzers - removed mapping table from the BQL field analyzer since it is moved to the mapping helper in utilities
…same as the Acumatica types and to reflect that they are interfaces
… pass property type to the code fix
@@ -402,4 +402,7 @@ | |||
<data name="PX1022Graph" xml:space="preserve"> | |||
<value>NonPublicGraph</value> | |||
</data> | |||
<data name="PX1065" xml:space="preserve"> |
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.
@EAndrosova please review the diagnostic short name
@@ -702,4 +702,10 @@ public virtual int? SomeDacField{ get; set; }</value> | |||
<data name="PX1022GraphExtensionFix" xml:space="preserve"> | |||
<value>Make the graph extension public</value> | |||
</data> | |||
<data name="PX1065TitleFormat" xml:space="preserve"> |
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.
@EAndrosova please review the diagnostic and code fix messages
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.
What about adding a test for a property that does not have any PXEventSubscriberAttribute
-inherited attribute and checking that the diagnostic is not reported on such property since it is not "DAC field"?
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.
great idea! I'll add it
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.
Actually, after I added new tests, I decided to also add a tests with base DAC in external dll, so I've integrated one into the repo and tests. And with it I discovered a huge bug in the way this version of Roslyn does collection of data from the external symbols. ISymbol.GetTypeMembers
method returns type itself instead of nested types.
So, it was a great idea to add new tests.
The verifier previously used only the first diagnostic in the set to get available code actions. If that diagnostic couldn't provide any code action to apply, then the verifier stopped. This led to a situation when the first diagnostic in the code source didn't provide an action, and the verifier stops even if the second diagnostic can provide valid code actions
…rce for regulsr DAC
…o Acumatica attributes to the base DAC
This solution should be used to test Acuminator data collection and analysis from the external dll
… and to the project generated for tests
…AC field with its base info
Added PX1065 diagnostic to check DAC field properties for missing BQL fields + refactored common logic out of legacy BQL fields and constants analyzers.
Overview:
PX1065 diagnostic:
Test Infrastructure:
CodeFixVerifier
that caused code fix verification to exit prematurely if the first diagnostic didn't have any code actions registeredCodeFixVerifier
Semantic Model
PropertyTypeToBqlFieldTypeMapping
helperDacFieldAttributeInfo
withIsAcumaticaAttribute
flag + refactoringIOverridableItem
interface withCombineWithBaseInfo
to add to existing semantic infos initial support for combination with their base members. The combination should calculate effective properties of the semantic info object based on its declared properties and properties of its base info object. Implemented initial support for this combination.IsAcumaticaAttribute
flagOther Code Analysis Changes
MissingTypeListAttributeAnalyzer
to support aggregator attributes and use precalculated data about them. PX1002 check became more precise.Utilities Changes:
Other:
IBqlTable
withPXBqlTable