-
Notifications
You must be signed in to change notification settings - Fork 11
Rewrite getModsInLoadOrder to handle circular dependencies between mods. #42
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
Rewrite getModsInLoadOrder to handle circular dependencies between mods. #42
Conversation
What exactly is the intention of the code? Circular mod dependencies are not valid, the game will error out if they exist. Does this code try to do the same or does it try to resolve the circular mod dependency somehow? |
I found at least one example of mods with a circular dependency between them. space-exploration --> space-exploration-postprocess --> space-exploration. With these mods installed, the original code got into an infinite loop. I used a debugger to find this particular example of circular dependencies. I was surprised the game allows it. |
These mods do not have a circular dependency, the |
I see, thanks for the context. I'll close this PR. I may try to improve the parsing code if that would be welcome. However, I also think that my original goal may be out of reach, since mod loading requires so much work. My goal is to export data that shows which entities, recipes, and items come from which mods. |
That would be appreciated but is in no way expected. If you do, this regex might help:
The large part I can see blocking here is the require problems also mentioned in #37. I'd somewhat expect that an export of the prototype history data from the game itself might be easier to implement (from the Factorio dev side). But that would lack a lot of detail, it's the list of mod names you also see in the tooltips in-game. If that would be enough for you, I can inquire whether it could be added to the modding api. It is generally my goal to fix mod loading in the data wrapper (it will be needed for 1.2) but the timeline on that is quite loose. |
…`~` which indicates dependencies that don't affect mod loading order. Relates to issues demodude4u#37 and demodude4u#42.
…`~` which indicates dependencies that don't affect mod loading order. Relates to issues demodude4u#37 and demodude4u#42.
I ended up asking internally. The runtime function |
Thank you very much! My goal is to be able to display which mods a blueprint uses. Maybe afterwards, searching by mods. |
I just realized that I got rid of the behavior of throwing on missing dependencies. I probably have to add that back.