Skip to content

build: don't skip ignored directories#1580

Merged
landism merged 1 commit into
masterfrom
mlandis/ch2425/tilt-does-not-correctly-interpret-in-dockerignore
May 6, 2019
Merged

build: don't skip ignored directories#1580
landism merged 1 commit into
masterfrom
mlandis/ch2425/tilt-does-not-correctly-interpret-in-dockerignore

Conversation

@landism

@landism landism commented May 3, 2019

Copy link
Copy Markdown
Member

This might be mildly controversial. This is effectively just reverting #1445, which gave us a big build speedup in some cases. Unfortunately, it introduced a problem:
If, e.g., vigoda's .dockerignore has * and !main.go, we'll filepath.Walk to vigoda, it will be ignored because it matches *, and we'll never descend into vigoda to discover vigoda/main.go.

This change makes the associated test go red -> green and also fixes the vigoda repro mentioned above.

We could be clever by parsing out the exclusions and descending more intelligently (or even only descending if there exists any ! at all), but that's a more complex fix, and it seems best for today to apply this cheap fix to make things work, even if it comes with a perf hit.

@landism
landism requested review from jazzdan and nicks May 3, 2019 15:13
@landism

landism commented May 6, 2019

Copy link
Copy Markdown
Member Author

For posterity: Nick pointed out that docker has a more optimized solution to this here. We should probably do that at some point, but merging this as-is for now just to make things work.

@landism
landism merged commit 8d75ba9 into master May 6, 2019
@landism
landism deleted the mlandis/ch2425/tilt-does-not-correctly-interpret-in-dockerignore branch May 6, 2019 16:46
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.

2 participants