Commit 6762518
Make Generate deterministic and add CI verification step (#89)
* Make Generate deterministic by sorting files by relative path
The file system enumeration in FindDlls was non-deterministic because
Directory.GetFiles does not guarantee ordering, and the ordering varies
across operating systems. Fix by:
1. Collecting all results into a list instead of yielding immediately
2. Normalizing path separators to forward slash for consistent sorting
3. Sorting by relative path using ordinal comparison
This ensures the generated output is identical regardless of OS or
file system enumeration order.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add CI step to verify generated code is up-to-date
Runs the generator after restore and fails the build if there are any
uncommitted diffs, ensuring PRs always include freshly generated output.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix cross-OS path separator in targets resource paths
Path.Join uses the OS-specific separator between the prefix and the
relative path, producing different output on Windows vs Linux. Replace
with string interpolation using a consistent forward slash separator
since MSBuild handles both styles.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix double-slash in resource paths by trimming leading separator
On Linux, Substring(packagePrefix.Length) produces a leading / in the
relative path. Combined with the interpolated /, this caused // in the
output. TrimStart('/') after normalization ensures no leading separator.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Normalize line endings to LF for cross-OS determinism
Add .gitattributes to enforce LF line endings and normalize the
generator output with ReplaceLineEndings to always produce LF.
This ensures the generator produces identical output on Windows
and Linux, making the CI verification step pass on both platforms.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 06032b9 commit 6762518
55 files changed
Lines changed: 44163 additions & 44149 deletions
File tree
- .github/workflows
- Src
- Basic.Reference.Assemblies.AspNet100
- Basic.Reference.Assemblies.AspNet110
- Basic.Reference.Assemblies.AspNet80
- Basic.Reference.Assemblies.AspNet90
- Basic.Reference.Assemblies.Net100.Wasm
- Basic.Reference.Assemblies.Net100
- Basic.Reference.Assemblies.Net110
- Basic.Reference.Assemblies.Net20
- Basic.Reference.Assemblies.Net35
- Basic.Reference.Assemblies.Net40
- Basic.Reference.Assemblies.Net461
- Basic.Reference.Assemblies.Net472
- Basic.Reference.Assemblies.Net50
- Basic.Reference.Assemblies.Net60Windows
- Basic.Reference.Assemblies.Net60
- Basic.Reference.Assemblies.Net70
- Basic.Reference.Assemblies.Net80Windows
- Basic.Reference.Assemblies.Net80
- Basic.Reference.Assemblies.Net90
- Basic.Reference.Assemblies.NetCoreApp31
- Basic.Reference.Assemblies.NetStandard13
- Basic.Reference.Assemblies.NetStandard20
- Basic.Reference.Assemblies.NetStandard21
- Basic.Reference.Assemblies
- Generate
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
Lines changed: 3805 additions & 3805 deletions
Large diffs are not rendered by default.
Lines changed: 921 additions & 921 deletions
Large diffs are not rendered by default.
Lines changed: 4681 additions & 4681 deletions
Large diffs are not rendered by default.
Lines changed: 1002 additions & 1002 deletions
Large diffs are not rendered by default.
Lines changed: 3658 additions & 3658 deletions
Large diffs are not rendered by default.
Lines changed: 903 additions & 903 deletions
Large diffs are not rendered by default.
Lines changed: 3670 additions & 3670 deletions
Large diffs are not rendered by default.
Lines changed: 906 additions & 906 deletions
Large diffs are not rendered by default.
0 commit comments