-
Notifications
You must be signed in to change notification settings - Fork 91
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
[eas-cli] Use Git to pack Git projects #2841
[eas-cli] Use Git to pack Git projects #2841
Conversation
Size Change: -3.95 kB (-0.01%) Total Size: 53.4 MB
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2841 +/- ##
==========================================
+ Coverage 52.62% 52.87% +0.26%
==========================================
Files 584 583 -1
Lines 22638 22647 +9
Branches 4707 4715 +8
==========================================
+ Hits 11910 11973 +63
+ Misses 9800 9741 -59
- Partials 928 933 +5 ☔ View full report in Codecov by Sentry. |
e250482
to
d3e8dfb
Compare
✅ Thank you for adding the changelog entry! |
Subscribed to pull request
Generated by CodeMention |
if ( | ||
uncommitedChangesAfterCaseSensitivityChange !== uncommittedChangesBeforeCaseSensitivityChange | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the format of these 2? is there a chance that git will return files in different order causing us to enter this if statement even if nothing changed? maybe we should operate on sets here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed there is no chance that Git would return files in different order.
// that were marked as changed after the case sensitivity change. | ||
const uncommittedChangesBeforeCaseSensitivityChange = await gitStatusAsync({ | ||
showUntracked: true, | ||
cwd, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are using rootPath
as cwd for it here, but previously we used this.maybeCwdOverride
does this change matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good, but I'm not too familiar with this part of the codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable
This reverts commit 18bf417.
Why
Currently, when
eas-cli
create a project tarball for EAS Build or Workflows, unless the user hasrequireCommit: true
ineas.json
, the project is being packed with a plainmakeShallowCopyAsync
which copies all the files that are deemed ignored byignore
package and.easignore
or.gitignore
files.This is suboptimal for
eas workflow:run
experience — a developer with a project with Git expects the repository to exist on EAS.How
This was a big pain.
Previously, we had
GitClient
which required commit and its subclass,GitNoCommitClient
which overrode some functions to allow uncommitted changes. On top of that,GitClient
copied project withgit clone
, whileGitNoCommitClient
copied it withmakeShallowCopyAsync
. This meantGitClient
's copy would include.git
, whereasGitNoCommitClient
would not. Moreover, thus,GitClient
would adhere to.gitignore
andGitNoCommitClient
would not — only to.easignore
.This pull request:
requireCommit
option.git
directory to exist in copies withrequireCommit = false
.easignore
requireCommit = false
situation.).easignore
toisFileIgnoredAsync
.As far as I can see the behavior looks like this:
The breaking change in here is that we're going to start adhering to
.easignore
even if someone hasrequireCommit = true
.Test Plan
I used
easd build:inspect
a bunch to verify it works like I expect. I encourage fellow reviewers to do the same.