mirror of
https://github.com/giancarloerra/socraticode.git
synced 2026-07-03 14:05:21 +02:00
fc249fdfcf
`buildCsNamespaceMap` previously iterated `fileSet` in fs.readdir() traversal order, which POSIX does not guarantee. Combined with the `candidates[0]` selection in `resolveImport`, this meant a `using` directive could resolve to different files on different machines or runs. Sort the `.cs` paths lexically before scanning so candidate lists are stable. Adds a regression test that builds the map twice from sets populated in different orders and asserts both produce the same candidate sequence and the same first candidate. Found by CodeRabbit on PR #34.