Skip to content
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

GenAPI generates invalid '$' token in method name #31657

Closed
MichaelSimons opened this issue Apr 6, 2023 · 8 comments
Closed

GenAPI generates invalid '$' token in method name #31657

MichaelSimons opened this issue Apr 6, 2023 · 8 comments
Labels
Area-GenAPI untriaged Request triage from a team member

Comments

@MichaelSimons
Copy link
Member

Running GenAPI on Microsoft.Build,16.10.0 (via SBRP) generates the following method

namespace Microsoft.Build.Graph
{
    public partial class GraphBuildOptions : System.IEquatable<GraphBuildOptions>
    {
...
        public virtual GraphBuildOptions <Clone>$() { throw null; }
...

This causes compiler errors:

/repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/lib/net5.0/Microsoft.Build.cs(2558,49): error CS1519: Invalid token '$' in class, record, struct, or interface member declaration [/repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/Microsoft.Build.16.10.0.csproj::TargetFramework=net5.0] [/root/.nuget/packages/microsoft.dotnet.arcade.sdk/8.0.0-beta.23168.1/tools/Build.proj]
/repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/lib/net5.0/Microsoft.Build.cs(2558,49): error CS1056: Unexpected character '$' [/repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/Microsoft.Build.16.10.0.csproj::TargetFramework=net5.0] [/root/.nuget/packages/microsoft.dotnet.arcade.sdk/8.0.0-beta.23168.1/tools/Build.proj]

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Apr 6, 2023
@MichaelSimons
Copy link
Member Author

cc @ViktorHofer

@KalleOlaviNiemitalo
Copy link
Contributor

Shouldn't dotnet/roslyn#67337 have fixed this already

@MichaelSimons
Copy link
Member Author

This reproduces in dotnet/source-build-reference-packages which is using the following version of GenAPI

<Dependency Name="Microsoft.DotNet.GenAPI.Task" Version="8.0.100-preview.4.23203.10">
  <Uri>https://github.com/dotnet/sdk</Uri>
  <Sha>326fa05c36c21a75fec88a28faa555371c9af8c2</Sha>
</Dependency>

This version of the SDK contains Rosyln 542fea0c2a93aacb3e8c52c2ce43e975d29832f3. I am not seeing the fix when looking at the Roslyn source. It looks like the PR was merged into main while the SDK is retrieving updates from release/dev17.6

@ViktorHofer
Copy link
Member

Michael is right. dotnet/roslyn@e625bee which was merged three weeks ago is only part of the main branch right now. @jaredpar do you know when that specific commit will reach dotnet/sdk? I guess it's intentional that roslyn's main branch doesn't flow into dotnet/sdk?

@jaredpar
Copy link
Member

jaredpar commented Apr 13, 2023

@jaredpar do you know when that specific commit will reach dotnet/sdk

I assume it's a part of this #31633

I guess it's intentional that roslyn's main branch doesn't flow into dotnet/sdk?

Yes / No. Historically code flow from roslyn / razor to sdk has been frought with problems that stem from rationalizing the .NET SDK vs. VS schedule. It's lead to lots of missed fixes, scrambles, etc ... For last two months we've been working with the sdk team to find a sane / predictable way to manage the code flow.

For 17.6 we tried a setup where we concentrated flow from our release branches instead of main. That worked fine but resulted in periods of delay. Essentially we were pushing to sdk once per VS preview. For 17.7 we're trying a different approach where we keep the flow where our active branch is.

So yes this was intentional at the time but going forward wont' be.

@ericstj
Copy link
Member

ericstj commented Apr 17, 2023

@MichaelSimons is this still reproducing? Any way we can force an update to ensure the issue is fixed?

@ViktorHofer
Copy link
Member

I can help with making sure that GenAPI receives that fix but I was hoping that roslyn's flow into sdk will normalize soon. Let me check again.

@ViktorHofer
Copy link
Member

dotnet/sdk retrieved new roslyn bits which includes the mentioned fix with #31838. The GenAPI bits from today which automatically flow into SBRP should already have the fix. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-GenAPI untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

5 participants