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

Solves in reverse order #140

Closed
MelvinSnijders opened this issue Dec 11, 2022 · 4 comments
Closed

Solves in reverse order #140

MelvinSnijders opened this issue Dec 11, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@MelvinSnijders
Copy link

Using Solver.SolveAll(); will result in a reverse order, and somehow a duplicate being printed, as seen below:

This is my folder structure:

It looks like this issue is related to #137, but I'm not sure why this happens in my case.

@eduherminio eduherminio self-assigned this Dec 11, 2022
@eduherminio
Copy link
Owner

Hi Melvin,

Thanks for suing AoCHelper and raising the issue.

The reverse order problem has indeed to do with the other issue you pointed out. Based pure observation, types were returned ordered by FullName when invoking System.Reflection.Assembly.GetTypes(), but apparently that's not the case when one has _ symbols in them, and that's your case. I'll make sure to explicitly order them so that you get them in the right order.

Your repository also uncovered another issue: AoCHelper doesn't handle correctly exceptions in the constructors, with such exceptions making the Solve/SolveAll methods crash. I'll also look into that.

Regarding that duplicate being printed, I need to look deeper into that since it involves Spectre Console. It brings back some ghosts from v0.x when Spectre Console didn't support Live display.

eduherminio added a commit that referenced this issue Dec 11, 2022
Stop relying on default ordering returned by `Assembly.GetTypes()`
This tackles one of the issues raised in #140.
@eduherminio eduherminio added the bug Something isn't working label Dec 11, 2022
eduherminio added a commit that referenced this issue Dec 11, 2022
This aims to tackle an issue uncovered in #140.
@eduherminio
Copy link
Owner

@MelvinSnijders Could you please test v2.0.2-alpha.1 version and verify that both the ordering issue and the construction exceptions one are fixed?

I'll track the double rendering issue separately in #143.

@MelvinSnijders
Copy link
Author

Just tested it, works great, thanks!

@eduherminio
Copy link
Owner

Awesome to read!
I'll try to look into the other issue, but if I don't immediately solve it I'll just release a non alpha version for these ones (v2.0.2) in the following days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants