feat(render): detect case-insensitive filename collisions in rendered output#117
Draft
feat(render): detect case-insensitive filename collisions in rendered output#117
Conversation
… output Agent-Logs-Url: https://github.com/microsoft/azure-linux-dev-tools/sessions/6ee2337d-e001-45c3-a4db-0ea0421c43de Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add error reporting for source files that differ by case
feat(render): detect case-insensitive filename collisions in rendered output
Apr 23, 2026
dmcilvaney
reviewed
Apr 23, 2026
|
|
||
| // Check for files whose names differ only by case. Such files collide on | ||
| // case-insensitive filesystems (e.g. Windows git clones). | ||
| if collisionErr := checkCaseCollisions(env.FS(), componentDir); collisionErr != nil { |
Contributor
There was a problem hiding this comment.
@copilot The intent is to do as much of the render as possible, this tool will be running in a linux environment so there is no reason not to copy the files AND return an error.
Contributor
Author
There was a problem hiding this comment.
Done in 877706f. The collision check now runs before the copy, but if collisions are found the copy still proceeds. A caseCollisionError sentinel type lets finishOneComponent distinguish this case and skip the RemoveAll/RENDER_FAILED marker — so the output directory contains the fully-rendered files while the component is still reported as error in the table.
Agent-Logs-Url: https://github.com/microsoft/azure-linux-dev-tools/sessions/529e4976-7614-4211-837c-7349b1339304 Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some packages (e.g. Fedora's chromium) ship source files whose names differ only in case — these collide on case-insensitive filesystems encountered during Windows git clones.
Changes
checkCaseCollisions— new helper inrender.gothat recursively walks the component staging directory after unreferenced files are removed, building a lowercase→original-path map and collecting any case-insensitive collisions.finishComponentRender— collision detection runs before the copy to output. When collisions are found, the files are still copied to the output directory (the tool runs on Linux where the files coexist without issue), and the component is markedstatus: errorin the results table with a message listing the colliding pairs and suggesting an overlay fix. All other components continue rendering unaffected.caseCollisionErrorsentinel type — allowsfinishOneComponentto distinguish a collision error (files copied successfully) from a hard failure, so the output directory is preserved and noRENDER_FAILEDmarker is written.Example error output for a colliding component: