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

C#: Order files in buildless extraction #16945

Merged

Conversation

tamasvajk
Copy link
Contributor

This is an attempt to make buildless extraction deterministic.

I've seen alert wobble in the following scenario: there are multiple source files in the repo with global statements, Roslyn chooses (hopefully by the syntax tree order in the compilation) one of the files to contain the generated <Main>$, in the other files the global statements are not extracted.

@github-actions github-actions bot added the C# label Jul 10, 2024
@tamasvajk tamasvajk marked this pull request as ready for review July 10, 2024 09:25
@tamasvajk tamasvajk requested a review from a team as a code owner July 10, 2024 09:25
@@ -91,7 +91,9 @@ private IEnumerable<FileInfo> SelectSmallFiles(IEnumerable<FileInfo> files)
private FileInfo[] GetAllFiles()
{
logger.LogInfo($"Finding files in {SourceDir}...");
var files = SourceDir.GetFiles("*.*", new EnumerationOptions { RecurseSubdirectories = true });
var files = SourceDir
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm surprised that GetFiles is not deterministic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a wild guess.

@tamasvajk tamasvajk merged commit 57efb84 into github:main Jul 10, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants