Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Feature/mapping get only lists #117

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

jorisdebock
Copy link

@jorisdebock
Copy link
Author

I noticed after upgrading the test project to netcoreapp3.1 this one test fails without any other changes to the code, and it seems a bit flaky sometimes the enum is wrong but other times not.

@jorisdebock
Copy link
Author

I have made a separate pull request to update netcoreapp3.1 first, this will fix the failing unit test
#118

@jorisdebock jorisdebock marked this pull request as ready for review May 23, 2020 11:56
@jorisdebock
Copy link
Author

@cezarypiatek I will update this pr soon with the latest changes of the upstream branch and use dotnet 3.0. Could you let me know if this is the right direction for this solution?

@cezarypiatek
Copy link
Owner

@Wazowsk1 please rebase your branch to master and push it again. Then I will be able to review your changes.

@jorisdebock jorisdebock force-pushed the feature/mapping-get-only-lists branch from f36acb3 to 2f6fae0 Compare May 25, 2020 21:01
@cezarypiatek
Copy link
Owner

@Wazowsk1 I've started do review your code. Hell lot of the work 👍 Please give me a couple of days for this.

return true;
}

if (ContainsCollectionWithoutSetter(MappingHelper.GetElementType(member.Type)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to handle recursive types to avoid stack overflow exception

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the mappingPath check in the implementor

{
foreach (var member in type.GetMembers().Where(ObjectHelper.IsPublicPropertySymbol).OfType<IPropertySymbol>())
{
if (ObjectHelper.IsSimpleType(member.Type) || !MappingHelper.IsCollection(member.Type))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this condition will prevent inspections of complex objects

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, see test 037

@jorisdebock jorisdebock force-pushed the feature/mapping-get-only-lists branch from 0e0f951 to 621642d Compare May 31, 2020 16:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants