Page MenuHomeFeedback Tracker

Circular dependency error when an addon using skipWhenMissingDependencies requires another addon using skipWhenMissingDependencies
Acknowledged, NormalPublic

Description

If you have three addons in a dependency chain (A-B-C) and B & C use skipWhenMissingDependencies, when A is not loaded a circular dependency error will occur. RPT:

17:41:42 Skipped loading of addon 'swmd_addonB' as required addon 'swmd_addonA' is not present
17:41:42 ------------------------------------------------------------------------------------------------------------------
17:41:42 Circular addon dependency detected (0 addons).
17:41:42 List of addons that can't be resolved and their dependencies:

I've read through the original feature request, but I'm not sure if this is the expected behavior - I would expect that both B and C would be skipped.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Config
Steps To Reproduce

I've attached the configs I used to test this, but these are the steps:

  1. Create addon B depending on a dummy addon, enable skipWhenMissingDependencies
  2. Create addon C depending on addon B, enable skipWhenMissingMissingDependencies
  3. Attempt to start the game and encounter circular dependency error

Event Timeline

This comment was removed by aarpitbala.
This comment was removed by LouMontana.
dedmen changed the task status from New to Acknowledged.Apr 30 2024, 9:28 AM
dedmen added a subscriber: dedmen.

It is what I mentioned here
https://feedback.bistudio.com/T172179#2447268

Notice how you only get a message for B being skipped, but not for C.
C is still loaded, but its dependency cannot be resolved as it was removed afterwards.

That code wasn't built for this. The message is actually wrong as its not a dependency error, but rather a "required addon not found" error.

Its not viable to fix this.
The skip check is done before the dependency ordering.

The C addon loaded in the game first. Saw that B was to-be-loaded, and thus its dependencies are satisfied.
B addon loaded after that, noticed A was missing and removed itself. But C already got through thinking B would be there, and now it's gone.

This will not be fixed. Lets just say chains of skippable addons are not supported.