Background
#205 wired MS0024 into the Phase B walker, but the diagnostic has no production trigger in the current build because:
Net effect: the explicit branch of IsExplicitQueryableOptIn cannot fire today, so user-authored unsupported bodies still leak through silently when they go through a custom [Queryable] extension method.
Proposal
Broaden trigger detection so MS0024 covers the real opt-in path the [Queryable] attribute promises:
- Teach
IrLinqMapping.TryResolve (or a sibling resolver) to recognise user-authored methods carrying [Queryable] — at least for the LINQ-pipe shape source.MyStage(lambda) where the lambda is the principal predicate / selector.
- Or: hoist trigger detection out of the LINQ-chain walker entirely, so any call site with a lambda argument whose target parameter has
[Queryable] or Expression<Func<…>> runs through the walker.
Either path turns MS0024 into a real, user-visible diagnostic.
Scope
References
Background
#205 wired MS0024 into the Phase B walker, but the diagnostic has no production trigger in the current build because:
TryCaptureQueryableMetais gated byIrLinqMapping.TryResolve, which recognises onlySystem.Linq.EnumerableandSystem.Linq.Queryable.System.Linq.Queryablestages always have anIQueryable<T>receiver, which Phase B: emit MS0024 hard error when opt-in queryable lambda body falls outside MVP subset #205 classifies as implicit — silent bail.System.Linq.Enumerablestages takeFunc<…>, notExpression<Func<…>>, and carry no[Queryable]attribute.Net effect: the explicit branch of
IsExplicitQueryableOptIncannot fire today, so user-authored unsupported bodies still leak through silently when they go through a custom[Queryable]extension method.Proposal
Broaden trigger detection so MS0024 covers the real opt-in path the
[Queryable]attribute promises:IrLinqMapping.TryResolve(or a sibling resolver) to recognise user-authored methods carrying[Queryable]— at least for the LINQ-pipe shapesource.MyStage(lambda)where the lambda is the principal predicate / selector.[Queryable]orExpression<Func<…>>runs through the walker.Either path turns MS0024 into a real, user-visible diagnostic.
Scope
TryCaptureQueryableMeta(or a new analogous entry point).[Queryable]-tagged extension method with an unsupported body — expecting MS0024.IrExpressionTreeExtractor's class-level docstring to drop the "no production trigger" caveat once the surface is broadened.References
src/Metano.Compiler/Extraction/IrExpressionExtractor.cs(TryCaptureQueryableMeta)src/Metano.Compiler/Extraction/IrLinqMapping.cs(TryResolve,IsLinqContainer)