Skip to content

Fix handling of empty complogs - #305

Merged
jjonescz merged 1 commit into
dotnet:mainfrom
jjonescz:empty-slns
Aug 28, 2026
Merged

jjonescz merged 1 commit into
dotnet:mainfrom
jjonescz:empty-slns

Conversation

@jjonescz

Copy link
Copy Markdown
Member

Empty slns generated by BinLogToSln already report a warning

Solution ... has 0 projects because it contains no C# or VB projects

But when switched to complogs, those become an error

[SEVERE] Solution ... has 0 projects - this is suspicious

See https://dev.azure.com/dnceng/internal/_build/results?buildId=3059096.

This PR fixes that issue.

}

internal static bool CanBeLegitimatelyEmpty(string solutionFilePath)
=> solutionFilePath.EndsWith(".complog", StringComparison.OrdinalIgnoreCase);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the scenario/reason a complog can be legitimately empty here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If they don't contain any C# projects, for example. I guess it could also be a bug of the stage1 artifact producer, but it shouldn't stop the source indexer job from continuing.

For example, currently fsharp and windowsdesktop repos produce empty complogs IIRC (and with BinLogToSln they produced empty solutions).

@jjonescz
jjonescz merged commit da7f9b6 into dotnet:main Aug 28, 2026
2 checks passed
@jjonescz
jjonescz deleted the empty-slns branch August 28, 2026 14:47
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.

2 participants