-
Notifications
You must be signed in to change notification settings - Fork 14
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
Data_Engine: Handling of nested request issues fixed #2311
Data_Engine: Handling of nested request issues fixed #2311
Conversation
…sted inside LogicalNotRequest
…the same type as splitting type fixed
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.
Not really @adecler: the issue consists of 3 sub-issues, your suggested change seems to be fixing only the 1st from what I can see. The other two still require intervention (and therefore I am changing three files instead of one). From what I can deduct from reading the code, the change proposed by you in By the way, I agree that the code looks pretty convoluted as for a relatively simple tree handling problem, but I could not make it any better due to the fact that some |
It solved the two red components in the example file for me so didn't look further (difficult to debug something that is already working). Then consider this change request limited to the
Yes, I am not a big fan of having to constantly check if an |
Yeah, and the fixes are made inside the methods causing problems, nowhere else - there is simply 3 methods causing different problems, not one (see the issue). And the problem is not only the component turning red, it is also about the output being wrong, that is why there is a few scripts, not one.
Actually, the problem is not only the existence of To push this PR forward, I would opt for treating it as a bugfix and no more than that, not to keep it hanging. Afterwards, I am happy to raise an issue to discuss simplification and possible wider refactoring of the |
Agreed, I just provided a suggestion since you were asking for one but don't expect it to be part of this PR. I would still like to see the fix on |
|
…calNotRequest being null
I have pushed the discussed fixes @adecler - not sure if this can be made look much better without major refactoring 🙈 |
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.
Getting closer. Just a final change needed on SplitRequestTreeByType.cs
if (request is LogicalNotRequest) | ||
((LogicalNotRequest)request).Request = subSub[0]; | ||
else | ||
subRequests.Insert(i, subSub[0]); | ||
{ | ||
subRequests.RemoveAt(i); | ||
|
||
if (subSub[0].GetType() == request.GetType()) | ||
subRequests.InsertRange(i, ((ILogicalRequest)subSub[0]).IRequests()); | ||
else | ||
subRequests.Insert(i, subSub[0]); | ||
} |
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.
I'll be honest, this whole method is confusing me a lot. I get the purpose but I just don't get why it is so complex. Since refactoring this method is not the purpose of this PR, I'll ignore it but I cannot guarantee that this part of the code is bug-free. So I'll have to trust you on this one (with the assumption that this will be reworked soon anyways as discussed).
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.
Yeah, 100% agreed about everything above - happy to reiterate together with @alelom in the next milestone 👍
@BHoMBot check compliance |
@pawelbaran to confirm, |
@BHoMBot check installer |
@pawelbaran to confirm, |
/azp run BHoM_Engine.CheckInstaller |
Azure Pipelines successfully started running 1 pipeline(s). |
FAO: @FraserGreenroyd The check they wish to have dispensation on is code-compliance. If you are providing dispensation on this occasion, please reply with:
|
@BHoMBot this is a CI/CD instruction. I am authorising dispensation to be granted on check ref. 1954410922 This is following a discussion with @pawelbaran and the agreement to raise #2332 to resolve this as it is outside the scope of this Pull Request which is already tackling an in depth issue. |
@FraserGreenroyd I have now provided a passing check on reference |
@BHoMBot check ready-to-merge |
@FraserGreenroyd to confirm, the task for checking if this Pull Request is ready to merge is now queued. |
@BHoMBot check serialisation |
@FraserGreenroyd to confirm, |
@BHoMBot check core |
@FraserGreenroyd to confirm, |
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.
I am now happy with the changes.
I guess what is left is to deal with the bot 😋
@BHoMBot check ready-to-merge |
@pawelbaran to confirm, the task for checking if this Pull Request is ready to merge is now queued. |
Issues addressed by this PR
Closes #2310
Test files
This is an issue-specific file. However, all other files from this folder should still work correctly.
Additional comments