-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Delete src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch #41089
Conversation
@jozkee can you please help with the failure in the sdk-source-build leg? Is the ambiguous call intentional?
cc @jeffhandley I wonder why this only affects source-build and not the msft build. |
You can fix it by changing the src to It is not clear to me why the collection expression Nevertheless, for non-params overloads, this always resolves to List<string> names = new();
Join([names]);
static string Join(string separator, ReadOnlySpan<string> value) => "string";
static string Join(string separator, ReadOnlySpan<object> value) => "object"; It can't convert to |
In case it helps this is with |
Seems like you still need to keep the patch because roslyn hasn't bumped their dotnet version and haven't stepped into this error. |
Just realized that this only affects source-build because in that build configuration, the library in question targets
Yes that's an option. I'm more concerned about a potential breaking change for our customers that we don't know about yet. |
This will be solved by first-class spans. @jjonescz, another test case for the matrix. |
If the argument is a collection expression, the call may be ambiguous, even with first-class span support, because better conversion for collection expressions currently has specific rules for span types and only falls back to implicit conversions for non-span types. Better conversion for collection expression conversions might need an additional rule to prefer |
I expect it will work like arrays do in this scenario, because |
The better conversion rules for collection expression conversions do not include a variance rule for The fix may be to add a rule to better conversion for collection expressions for |
Actually, removing the collection expression rules (and relying on first-class spans) would be a breaking change since we currently prefer |
Tracked by dotnet/roslyn#73857 |
dotnet/roslyn#73656 now hits the failure as well and I expect the roslyn team to fix / work around this directly in the roslyn code base to unblock the Arcade dependency flow. Therefore closing this PR. |
Testing