Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23956] Hyperloop: Improve error handling for non-default Xcode installations

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-09-29T12:22:22.000+0000
Affected Version/shyperloop 1.2.7
Fix Version/sHyperloop 2.2.0
ComponentsHyperloop, Tooling
Labelsn/a
ReporterJan Vennemann
AssigneeJan Vennemann
Created2016-09-28T07:34:14.000+0000
Updated2017-10-06T23:48:24.000+0000

Description

Currently we solely rely on the user having the correct Xcode Version under /Applications/Xcode.app as stated in the [Enabling Hyperloop](https://wiki.appcelerator.org/display/guides2/Enabling+Hyperloop). This can easily lead to unexpected behaviour when different Xcode versions are installed. We should evaluate if it is possible to detected the libclang version that is loaded and then require a minimum version to avoid wrong metabase generation. Also when the user does not have Xcode installed in the above default directory the metebase generation will fail due to the hardcoded rpath. We should catch this error and tell the user what to do to fix it.

Comments

  1. Chris Barber 2016-11-03

    I thought the Hyperloop CLI plugin was getting the correct path from builder.xcodeEnv.path?
  2. Jan Vennemann 2016-11-03

    Yes it is, but the runpath to the libclang library is hardcorded at compile time in the metabase executable. So if anyone has a non-default xcode install location the metabase generation will fail or use the wrong library when different xcode versions are installed.
  3. Jan Vennemann 2017-09-29

    Possible approach to allow different Xcode locations: We might be able to check the result of xcode-select -p, compare the path with the one in the binary with otool -l and then fix it using install_name_tool. A version check inside the metabase binary would be required then to see if we can use the libclang version of the currently selected Xcode.
  4. Abir Mukherjee 2017-10-06

JSON Source