Fix ex-WINE compiler ordering to appear at end of compiler lists#2
Draft
Copilot wants to merge 2 commits intoWINE-compilers-order-fixfrom
Draft
Fix ex-WINE compiler ordering to appear at end of compiler lists#2Copilot wants to merge 2 commits intoWINE-compilers-order-fixfrom
Copilot wants to merge 2 commits intoWINE-compilers-order-fixfrom
Conversation
Co-authored-by: jacobpanov <84049465+jacobpanov@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Based on the problem explained in the compiler-explorer problem: Ex-WINE compilers appear in an unusual order #8006, (ex-WINE) compilers are ordered incorrectly in the list of compilers for a few different sections of compilers. Currently the list is a...
Fix ex-WINE compiler ordering to appear at end of compiler lists
Aug 28, 2025
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.
Fixes compiler-explorer#8006 where ex-WINE compilers were appearing incorrectly at the beginning of compiler lists instead of at the end.
Problem
Ex-WINE compilers (legacy MSVC compilers with "(ex-WINE)" suffix) were being sorted to the beginning of compiler lists due to basic alphabetical string comparison. This resulted in an incorrect ordering like:
When the expected order should place regular compilers first and ex-WINE compilers at the end:
Solution
Replaced the basic alphabetical sort in
CompilerFinder.find()with a custom sorting function that:The implementation uses a simple two-phase comparison:
Changes
lib/compiler-finder.ts: AddedcustomCompilerSort()method and replaced the basic sort calltest/compiler-finder-tests.ts: Added test case to verify ex-WINE compilers are sorted to the endTesting
This is a minimal, targeted fix that only affects compiler list ordering without impacting any other functionality.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.ionode index.js --exec install(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.