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 embedded workspace parsing issue 605 #606

Conversation

LizCira
Copy link
Contributor

@LizCira LizCira commented Sep 5, 2018

Hi, as discussed in Issue 605 (#605) here's a proposed fix and associated test for an error encountered when trying to parse Xcode projects that make use of the embedded workspace structure.

closes #605

@@ -73,6 +73,8 @@ def absolute_path(workspace_dir_path)
File.expand_path(File.join(workspace_dir_path, path))
when 'container'
File.expand_path(File.join(workspace_dir_path, path))
when 'self'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we can potentially combine all of these cases since they all return the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I was trying to change the minimum. Should I combine the first three cases as a multi-value case? I tried this locally and tests pass

        workspace_dir_path = workspace_dir_path.to_s
        case type
        when 'group', 'container', 'self'
          File.expand_path(File.join(workspace_dir_path, path))
        when 'absolute'
          File.expand_path(path)
        when 'developer'
          raise "Developer workspace file reference type is not yet supported (#{path})"
        else
          raise "Unsupported workspace file reference type `#{type}`"
        end
      end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

@dnkoutso
Copy link
Contributor

dnkoutso commented Sep 5, 2018

@LizCira one tiny nit, can you squash to a single commit?

@dnkoutso
Copy link
Contributor

dnkoutso commented Sep 6, 2018

thank you!

@LizCira
Copy link
Contributor Author

LizCira commented Sep 6, 2018

My first open source contribution, thank you for being so helpful and prompt about handling it! :)

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

Successfully merging this pull request may close these issues.

"RuntimeError: Unsupported workspace file reference type self" error when using embedded workspace
2 participants