Skip to content

Conversation

RikkiGibson
Copy link
Member

@RikkiGibson RikkiGibson commented Oct 20, 2025

This package will be used to support dotnet/roslyn#80575.

Some things I haven't figured out yet:

  • GracefulException probably won't work in the source package.
    • Adding a compilation symbol which simply declares this type when we are not in context of dotnet cli
  • JSON generator error in RunApiCommand.cs.
  • Failing to include MSBuildUtilities.cs in the source package. See Microsoft.DotNet.FileBasedPrograms.projitems. It seems like a .cs file which is "out of tree" doesn't make it into the package. I'm unsure if that is expected. @tmat may have some suggestion for how to address this part.
    • Working around this by simply making another copy.

@jjonescz would be interested to know any thoughts you have on the above bullets or the TODOs in source.

}

// TODO: getting the following error, which is not suppressible with pragma.
// error SYSLIB1225: The type 'Encoding' includes the ref like property, field or constructor parameter 'Preamble'. No source code will be generated for the property, field or constructor. (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1225)
Copy link
Member Author

@RikkiGibson RikkiGibson Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it is complaining about System.Text.Encoding.Preamble. But AFAIK, I only changed where some of the types involved are declared, not what their members are.

I managed to "debug" this by commenting out some of the attributes and then members on various types.

It looks like this is ultimately coming through via:

  • [JsonSerializable(typeof(RunApiOutput))] to
  • class Project : RunApiOutput to
  • ImmutableArray<SimpleDiagnostic> Diagnostics to
  • Position SimpleDiagnostic.Location to
  • SourceFile SimpleDiagnostic.SourceFile to
  • SourceText SourceFile.Text to
  • Encoding SourceText.Encoding

... and, it looks like the release/10.0.1xx branch version of SimpleDiagnostic does not have SourceFile on it. So, I think moving to that "version" of the declaration would probably make the generator error go away.

It looks like I copied the implementation from the wrong branch here. @jjonescz is release/10.0.1xx the correct branch to be using as a starting point for changes here? I assume we can't get this source package work into there as it is taking servicing fixes only. Is there some step we neglected to take in order to make sure the changes going into the release branch make their way into main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant