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

Support .tool-versions #2

Open
klaaspieter opened this issue Mar 26, 2021 · 2 comments
Open

Support .tool-versions #2

klaaspieter opened this issue Mar 26, 2021 · 2 comments

Comments

@klaaspieter
Copy link
Owner

asdf can automatically set current versions of tools by reading .tool-versions. Currently this does not work for asdf-xcode because changing Xcode versions works differently from what asdf expects.

asdf changes tool versions by placing shims in $PATH. For example when running ruby you're actually running ~/.asdf/shims/ruby which in turn looks up the current ruby version and invokes ~/.asdf/installs/ruby/[version]/bin/ruby for you.

With Xcode however we want to set DEVELOPER_DIR when entering a directory with a .tool-versions that specifies an Xcode version. Unfortunately asdf does not provide any hooks for this. As a matter of fact asdf doesn't even run when changing directories because it can always rely on it's shims to do the right thing.

This means we either:

  1. Need to accept that managing versions is not possible
  2. Find a way to make changing versions fit into asdf's shim system
  3. Contribute a way to set DEVELOPER_DIR to asdf core
klaaspieter added a commit that referenced this issue Mar 26, 2021
Today I learned that GitHub READMEs do not infer issue numbers.
@airtonix
Copy link

Could we no "just" create ~/.asdf/installs/ruby/[version]/bin/xcode when we run asdf install xcode [version] which is a generated bash file that sets DEVELOPER_DIR ?

@klaaspieter
Copy link
Owner Author

@airtonix that's actually a brilliant suggestion. I don't know if it's going to work but it's worth a try!

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

No branches or pull requests

2 participants