eduherminio / AoCHelper

Helper .NET library for solving Advent of Code puzzles

Home Page:https://adventofcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems being solved backwards order

tslater2006 opened this issue · comments

I added a Day02.cs today, and tried SolveLast() but it ran Day01 again. Running Solver.SolveAll() results in this output:

image

As far as I can tell the SolveAll() relies on LoadAllProblems() which just scans the assembly for classes that extend BaseDay but doesn't sort them? Unsure how to resolve this on my side, hoping you have some ideas (or I'm doing something wrong).

Project layout:
image

I've also tried the naming convention Day_xx with an underscore between the class prefix and index number.

It's happening because the lack of namespace in Day02.cs file.
I'll have a look to see if I can fix the default behavior when something like this happens, but adding a namespace there should solve the issue for now.

Perfect! thanks for such a quick response. Will close this issue.

While implementing a solution for this use case I've concluded that "it's not a bug, it's a feature" (for now at least) 😂

When ordering types by full name instead of name, namespace is taken into account, which in some scenario can be used to run problems from different years sequentially instead of all Day01s first, all Day02s later, etc.