Skip to content

Colliding paths on case-insensitive filesystems #1062

Open
@gabrielsoldani

Description

@gabrielsoldani

Describe the Bug

When asdf clones this repo for the first time (such as when adding a plugin for the first time) on a case-insensitive filesystem, some plugins have case-sensitive paths, so Git cannot put them in the work tree.

Steps to Reproduce

  1. Clone this repository in a case-insensitive filesystem (for example, the default filesystem on macOS). This can be done by adding a plugin for the first time on a fresh install of asdf.

See the output:

initializing plugin repository...Cloning into '/Users/gabriel.soldani/.asdf/repository'...
remote: Enumerating objects: 6174, done.
remote: Counting objects: 100% (1852/1852), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 6174 (delta 1824), reused 1773 (delta 1770), pack-reused 4322 (from 1)
Receiving objects: 100% (6174/6174), 1.42 MiB | 6.48 MiB/s, done.
Resolving deltas: 100% (3396/3396), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'plugins/luaJIT'
  'plugins/luajit'
  'plugins/R'
  'plugins/r'

Expected Behaviour

Colliding paths should be avoided so asdf works consistently across case-sensitive and case-insensitive filesystems for users, and contributors can use case-insensitive filesystems.

asdf plugin add restricts plugin names to lowercase characters. I'm not sure if the paths Git picks in collisions is part of its contract or an implementation detail. In my case it picked the lowercase variants, but if it picked the mixed-case variants these plugins would be inaccessible.

Backwards compatibility for systems relying on the mixed case variant (in scripts and configuration files), if required, can be done by asdf when it maps a plugin name to its path.

Actual Behaviour

The following message is printed:

initializing plugin repository...Cloning into '/Users/gabriel.soldani/.asdf/repository'...
remote: Enumerating objects: 6174, done.
remote: Counting objects: 100% (1852/1852), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 6174 (delta 1824), reused 1773 (delta 1770), pack-reused 4322 (from 1)
Receiving objects: 100% (6174/6174), 1.42 MiB | 6.48 MiB/s, done.
Resolving deltas: 100% (3396/3396), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'plugins/luaJIT'
  'plugins/luajit'
  'plugins/R'
  'plugins/r'

Environment

OS:
Darwin [hostname redacted] 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:37:36 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6020 arm64

SHELL:
zsh 5.9 (arm64-apple-darwin24.0)

BASH VERSION:
5.2.37(1)-release

ASDF VERSION:
v0.14.1

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/gabriel.soldani/.asdf
ASDF_DIR=/opt/homebrew/opt/asdf/libexec
ASDF_CONFIG_FILE=/Users/gabriel.soldani/.asdfrc

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master c36e6f0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions