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

Strange behavior with Xcode 8 #405

Closed
vincentisambart opened this issue Aug 24, 2016 · 3 comments
Closed

Strange behavior with Xcode 8 #405

vincentisambart opened this issue Aug 24, 2016 · 3 comments

Comments

@vincentisambart
Copy link
Contributor

When using Xcodeproj 1.2.0, if the Xcode version selected with xcode-select is Xcode 8 beta 6, the following code displays KO. It displays OK if you're using Xcodeproj 1.1.0 or if you've selected Xcode 7.

require "pathname"
require "xcodeproj"

# The project can be anything, a default iOS project generated by Xcode will do.
xcodeproj_path = Pathname.new("Test.xcodeproj")
xcodeproj = Xcodeproj::Project.open(xcodeproj_path)
xcodeproj.save # If this line is commented out, the problem disappears.

# Creating a directory named "test"
# (the bug also occurs is the directory is not created by the code but beforehand)
test_path = Pathname.new("/tmp/mylittletestdirectory")
test_path.mkpath
current_path = Dir.pwd
# Go to /tmp/mylittletestdirectory.
Dir.chdir(test_path) do
  if current_path != Dir.pwd
    puts "OK"
  else
    puts "KO" # The current directory should have changed but did not.
  end
end

This seems to have something to do with #389. Removing the line loading one of DVTAnalyticsClient, DVTAnalytics or SourceKit seems to make the problem disappear...

@segiddins
Copy link
Member

This is a known issue with Xcode 8 breaking Dir.chdir

@alloy
Copy link
Member

alloy commented Aug 24, 2016

See #404

@neonichu
Copy link
Member

Has been fixed by #407

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

4 participants