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

Set RootNamespace earlier #8298

Merged

Conversation

ryanbrandenburg
Copy link
Contributor

Summary of the changes

  • Basically we already have the RootNamespace in most cases where we're adding a project, so we should pass that along to minimize/eliminate the time where we have a null RootNamespace.

Might fix #7942.

Copy link
Contributor

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

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

Love that this unskips a test :)

@@ -209,7 +209,7 @@ public override void UpdateDocument(string filePath, SourceText sourceText, int
TrackDocumentVersion(textDocumentPath, version);
}

public override void AddProject(string filePath)
public override void AddProject(string filePath, string? rootNamespace = null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big fan of optional parameters. Does it cause mountains of additional changes to force it to be passed in? Or maybe add a non-abstract overload to the base class?

@ryanbrandenburg
Copy link
Contributor Author

It seems like (unrelated to this PR) SDK URLs were broken for a time, but they seem to be back online now.

@ryanbrandenburg ryanbrandenburg merged commit d1326ad into dotnet:main Feb 23, 2023
@ryanbrandenburg ryanbrandenburg deleted the GeneratedDocumentInconsistent branch February 23, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated Document inconsistent on project start
2 participants