Skip to content

Fix artifact selection when repository name casing differs#1662

Open
aaryan-iiitu wants to merge 1 commit intoscalacenter:mainfrom
aaryan-iiitu:fix/artifact-selection-scalafx
Open

Fix artifact selection when repository name casing differs#1662
aaryan-iiitu wants to merge 1 commit intoscalacenter:mainfrom
aaryan-iiitu:fix/artifact-selection-scalafx

Conversation

@aaryan-iiitu
Copy link
Copy Markdown

Context

While looking into issue #1576, I noticed that Scaladex can end up selecting an outdated artifact when the repository name and the artifact name differ only by casing (for example, ScalaFX vs scalafx). This happens because artifact selection currently relies on case sensitive string comparisons and case sensitive alphabetical ordering.

What this PR changes

  • Compare repository names and artifact names in a case-insensitive way
  • Make alphabetical ordering of artifact names case insensitive as well
  • Add a regression test to ensure this behavior doesn’t break again

Why this approach

The existing selection rules and priority order are kept exactly the same. This change only normalizes string comparisons so that casing differences don’t affect which artifact is selected.

Verification

  • Added a test that reproduces the issue
  • Ran the full coreJVM/test suite locally; all tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant