Endless loop when an assembly definition file references another that only includes Editor

When I only include the Editor platform in one of my assembly definition files, which is then referenced by another assembly definition file which includes everything, I get stuck in an endless loop when compiling. My guess is this is a bug. Does anyone have an idea what it might be?

The reason why this is important to me is because I want those script files to be excluded from builds, only existing in the editor. The referenced assembly definition file also has MonoBehaviours (which are used in prefabs). I’m realizing now that MonoBehaviours should not be editor-only. However, this is still worth investigating. I made a minimal project but I haven’t managed to reproduce the issue. So it’s probably happening due to some complex interaction I haven’t thought of.

This relationship should be the other way around.

Your editor only assembly should reference the run time assembly. It makes more sense that the run time assembly isn’t dependant on editor only code that won’t be included during build time.