Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Swift from .swift-version installs a version of clang that messes up many other tools #3462

Closed
stevelandeyasana opened this issue Dec 11, 2024 · 1 comment · Fixed by #3468
Labels

Comments

@stevelandeyasana
Copy link

stevelandeyasana commented Dec 11, 2024

Describe the bug

Swift includes a clang binary which Mise allows to shadow the system clang binary, causing chaos.

To Reproduce

  1. Create a file .swift-version containing the string 6.0.2
  2. Create a mise.toml file containing:
    [tools]
    ruby = "3.3"
  3. mise activate fish | source (I happen to use fish)
  4. mise install swift
  5. mise install ruby

It will fail on the Ruby installation because Swift includes a clang binary, and its header paths aren't configured correctly.

It will also cause other things to fail when attempted in tasks, but this is the most obvious problem.

Expected behavior
A clear and concise description of what you expected to happen.

Honestly I'm not sure. It seems like you'd want tools to be able to install C compilers.

A decent band-aid would be to be able to somehow disable Mise paying attention to .swift-version files, since I don't need Swift for Mise.

mise doctor output

version: 2024.12.5 macos-arm64 (2024-12-10)
activated: yes
shims_on_path: no

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Tue, 10 Dec 2024 18:39:48 +0000
  Rust Version: rustc 1.83.0 (90b35a623 2024-11-26) (Homebrew)
  Profile: release

shell:
  fish
  fish, version 3.7.1

dirs:
  cache: ~/Library/Caches/mise
  config: ~/.config/mise
  data: ~/.local/share/mise
  shims: ~/.local/share/mise/shims
  state: ~/.local/state/mise

config_files:
  ~/.config/mise/config.toml
  ~/dev/mise-test/.swift-version
  ~/dev/mise-test/Gemfile
  ~/dev/mise-test/mise.toml

backends:
  aqua
  asdf
  cargo
  core
  gem
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  swiftformat  https://github.com/younke/asdf-swiftformat.git#8f0e34d
  swiftlint    https://github.com/klundberg/asdf-swiftlint.git#79f2c6e
  tuist        https://github.com/asdf-community/asdf-tuist.git#bffa4c9
  usage        https://github.com/jdx/mise-usage.git#fe3888a

toolset:
  asdf:swiftformat@0.55.3
  asdf:swiftlint@0.57.1
  asdf:tuist@4.31.0
  core:ruby@3.3.6       (missing)
  core:swift@6.0.2
  spm:Asana/locheck@0.9.11
  spm:MobileNativeFoundation/XCLogParser@v0.2.38

env_vars:
  MISE_SHELL=fish

settings:
  experimental  true ~/.config/mise/config.toml
  experimental  true ~/dev/mise-test/mise.toml

Additional context

@stevelandeyasana
Copy link
Author

stevelandeyasana commented Dec 11, 2024

Ah, I found idiomatic_version_file_disable_tools = ['swift']. (Mise has a LOT of options!) This will work for now, but is worth thinking about, maybe. One of Mise's advantages is that it can unify tooling for different ecosystems, and Swift developers often install Ruby so they can use fastlane, so maybe it's worth addressing this compiler problem in particular.

jdx added a commit that referenced this issue Dec 11, 2024
Also correctly marked rust+swift as experimental. This was the case before but should have been documented.
Fixes #3462
@jdx jdx closed this as completed in #3468 Dec 11, 2024
jdx added a commit that referenced this issue Dec 11, 2024
Also correctly marked rust+swift as experimental. This was the case before but should have been documented.
Fixes #3462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant