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

Fixed flattening of relative paths (#525) #550

Merged
merged 3 commits into from
Apr 9, 2019
Merged

Fixed flattening of relative paths (#525) #550

merged 3 commits into from
Apr 9, 2019

Conversation

sroebert
Copy link
Contributor

Currently when adding relative paths as a source root, all folders are flattened as root groups in the Xcode project (#525). This fix makes sure the folder structure is kept without flattening.

@yonaskolb
Copy link
Owner

Thanks for this @sroebert. Are you able to add a unit test to SourceGeneratorTests that demonstrates the issue and the fix.

You'll also need to rebase to fix the conflicts

@sroebert
Copy link
Contributor Author

sroebert commented Apr 7, 2019

Done!

@@ -247,7 +247,7 @@ class SourceGenerator {
let isOutOfBasePath = !path.absolute().string.contains(project.basePath.absolute().string)

// has no valid parent paths
let isRootPath = isOutOfBasePath || path.parent() == project.basePath
let isRootPath = (isBaseGroup && isOutOfBasePath) || path.parent() == project.basePath
Copy link
Owner

Choose a reason for hiding this comment

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

The isBaseGroup param is a newer addition than the rest of this line. I wonder if that's all we need

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.

3 participants