Skip to content
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

Reflection_Engine: SortExtensionMethods fixed to work on generics #2345

Conversation

pawelbaran
Copy link
Member

Issues addressed by this PR

Closes #2344

Test files

On SharePoint - the results do not matter, the methods should just trigger.

Changelog

  • SortExtensionMethods fixed to work on generics

Additional comments

@adecler it would be great if you could prioritise this PR as it breaks quite a few things across the entire engine 😭

An alternative fix could also be move the -1 level methods to the end of the returned list instead of ruling them out:

return methods.Zip(levels, (m, l) => new { m, l }).Where(x => x.l != -1).OrderBy(x => x.l).Select(x => x.m).ToList();

@pawelbaran pawelbaran added severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour labels Feb 25, 2021
@pawelbaran pawelbaran requested a review from adecler February 25, 2021 01:19
@pawelbaran pawelbaran self-assigned this Feb 25, 2021
Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

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

Fixes the problem

@pawelbaran
Copy link
Member Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 25, 2021

@pawelbaran to confirm, check-code-compliance, check-documentation-compliance, check-project-compliance, check-branch-compliance, check-dataset-compliance, and, if applicable, check-copyright-compliance tasks are now queued.

@pawelbaran
Copy link
Member Author

/azp run BHoM_Engine.CheckInstaller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pawelbaran
Copy link
Member Author

@BHoMBot check core

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 25, 2021

@pawelbaran to confirm, check-core task is now queued.

@pawelbaran
Copy link
Member Author

@BHoMBot check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 25, 2021

@pawelbaran to confirm, check-installer task is now queued.

@IsakNaslundBh IsakNaslundBh merged commit a61fd36 into master Feb 25, 2021
@IsakNaslundBh IsakNaslundBh deleted the Reflection_Engine-#2344-SortExtensionMethodsDoesNotWorkWithGenerics branch February 25, 2021 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reflection_Engine: SortExtensionMethods does not work with generics
3 participants