Certain entity queries don't compile in ComponentSystem, while they do as Jobs

The following code compiles as expected:

    public class InterpolateTransformSystem : JobComponentSystem {
        protected override JobHandle OnUpdate(JobHandle inputDeps) {
            Entities.ForEach((ref Translation t, ref Rotation rot, in InterpolateTransform lerp) => {

            });
           
            return default;
        }
    }

while the following, which inherits from “ComponentSystem”, does not:

    public class InterpolateTransformSystem2 : ComponentSystem {
        protected override void OnUpdate() {
            Entities.ForEach((ref Translation t, ref Rotation rot, in InterpolateTransform lerp) => {

            });
        }
    }

The code for the InterpolateTransform is as follows:

    public struct InterpolateTransform : IComponentData {
        public float3 From;
        public float3 To;
    }

Rider states the following:

The type ‘Unity.Entities.EntityQueryBuilder’ must be convertible to ‘Unity.Entities.CodeGeneratedJobForEach.ISupportForEachWithUniversalDelegate’ in order to use it as parameter ‘TDescription’ in the generic method ‘TDescription LambdaForEachDescriptionConstructionMethods.ForEach<TDescription,T0,T1,T2>(this TDescription, RRI<T0,T1,T2>)’

This is using the following versions:

“com.unity.burst”: “1.2.0-preview.11”,
“com.unity.entities”: “0.4.0-preview.10”,
“com.unity.jobs”: “0.2.2-preview.6”,
“com.unity.mathematics”: “1.1.0”,

Error is misleading. I think if you replace “in” with “[ReadOnly] ref” it will work in ComponentSystem. ComponentSystem and JobComponentSystem have different Entities.ForEach mechanisms. The ComponentSystem version was released first. The JobComponentSystem version is superior in every way because it uses code-gen to make the lambda GC-free and there’s not really a reason to use ComponentSystem anymore.

Okay. While that explains it, I think it’s still a bug that my IDE provides the autocompletion for it nonetheless. It looks like the extension methods belong to both query “paths”, the Jobified and the default version (which expects the attribute).