-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-Extensions-Optionssource-generatorIndicates an issue with a source generator featureIndicates an issue with a source generator feature
Milestone
Description
runtime/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs
Lines 40 to 42 in 3ef2c80
| string suffix = $"_{new Random().Next():X8}"; | |
| _staticValidationAttributeHolderClassName += suffix; | |
| _staticValidatorHolderClassName += suffix; |
Generated code should be deterministic. Many companies and orgs have requirements around deterministic builds.
Is this the code that prompted https://github.com/dotnet/roslyn-analyzers/pull/6882/? Should we change this code to not use Random, and instead be deterministic?
cc @jaredpar
Originally posted by @eerhardt in #89148 (comment)
Metadata
Metadata
Assignees
Labels
area-Extensions-Optionssource-generatorIndicates an issue with a source generator featureIndicates an issue with a source generator feature