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

Exclude derived data folders from from Xcode #64

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mdab121
Copy link

@mdab121 mdab121 commented Dec 19, 2020

No description provided.

tests/AsimovTest.php Outdated Show resolved Hide resolved
asimov Outdated Show resolved Hide resolved
Copy link
Owner

@stevegrunwell stevegrunwell left a comment

Choose a reason for hiding this comment

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

Thank you for the addition!

Copy link
Owner

@stevegrunwell stevegrunwell left a comment

Choose a reason for hiding this comment

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

The tests failing here made me dig deeper, and I'm hoping someone with Xcode experience can help provide context.

From what I've read, Xcode will store build artifacts in the DerivedData/ directory, and this is usually(?) at a system-wide level (e.g. ~/Library/Developer/Xcode/DerivedData) — is this correct? If so, Asimov would be better-served blocking that directory.

As it stands now, the code in this PR tells Asimov "Look for a DerivedData directory that sits adjacent to...itself", which seems like a roundabout way of saying "Block all DerivedData directories from Time Machine backups. However, that runs counter to Asimov's more conservative "make sure there's a matching dependency file so we don't block anything accidentally" ethos.

Granted, "DerivedData" seems very unlikely to be anything else on a developer's machine (save for perhaps some Swift developer's musical side-project), but I'd like to better understand this directory before including it in Asimov, please.

@mdab121
Copy link
Author

mdab121 commented Dec 22, 2020

Hey!

Thanks for the response. You're right, that the DerivedData folder (which is basically build artifacts, indexes, etc) are located at ~/Library/Developer/Xcode/DerivedData by default.

However it's very common to have it in the project directory. I do that as an iOS developer, and I know many other devs that do. That's why it's also listed in the default .gitignore for XCode.

It's really a time machine killer, because these tend to be ~1GB even for a simple XCode project.


What i can suggest is to make it conditional to exclude DerivedData unless an XCode project file exists in the directory? Which would be anything like *.xcodeproj.

@stevegrunwell
Copy link
Owner

What i can suggest is to make it conditional to exclude DerivedData unless an Xcode project file exists in the directory? Which would be anything like *.xcodeproj.

I think that makes the most sense, but it'll require refactoring how the find command is utilized within Asimov, as test -e checks for the existence of a file, but doesn't account for wildcards.

We want to make sure that whatever we do here is still performant, but adding wildcard support would open up some opportunities.

@stevegrunwell stevegrunwell changed the title Exclude derived data folders from from xcdoe Exclude derived data folders from from Xcode Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants