-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
fix: Skip preparation of plugins native files in case they are not changed #3768
Conversation
Add logging in projectChangesService's checkForChanges method in order to know which files are changed. This will help us to understand why prepare is triggered.
ef0070f
to
92cf983
Compare
this._changesInfo.modulesChanged = true; | ||
} | ||
if (this._changesInfo.modulesChanged || this._changesInfo.appResourcesChanged) { | ||
this.$logger.trace(`Set configChanged to true, current value of moduleChanged is: ${this._changesInfo.modulesChanged}, appResourcesChanged is: ${this._changesInfo.appResourcesChanged}`); |
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.
Maybe it is better to print all changesInfo.
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.
It is printed at the end of the method. Or you want to know the value of the properties before setting all of them to true?
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.
Actually I just want to see all changesInfo and didn't notice it is printed at the end of the method.
test/plugins-service.ts
Outdated
assert.deepEqual(testData.dataPassedToWriteJson, { [testData.pluginData.name]: newPluginHashes }); | ||
}); | ||
|
||
it("does not prepare the files when plugin has platforms dir and has files has not changed since then", async () => { |
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.
Maybe
has files that are not changed since then?
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.
After green build!
92cf983
to
d159572
Compare
…anged Skip the preparation of plugins' native files in case there's no change of the files since last operation when the files have been prepared. Do this by using hash sums of files in each plugin's `platforms/<platform>` dir in case such exists. This way, in case you apply a change outside of the `<plugin dir>/platforms/<platform>` dir, the plugin's native files will not be prepared again. This way application will not be rebuilt as there's no need to do this.
Skip the preparation of plugins' native files in case there's no change of the files since last operation when the files have been prepared.
Do this by using hash sums of files in each plugin's
platforms/<platform>
dir in case such exists. This way, in case you apply a change outside of the<plugin dir>/platforms/<platform>
dir, the plugin's native files will not be prepared again. This way application will not be rebuilt as there's no need to do this.chore: Add logging in projectChangesService
Add logging in projectChangesService's checkForChanges method in order to know which files are changed. This will help us to understand why prepare is triggered.
PR Checklist
What is the current behavior?
Whenever a change in
node_modules
is detected, CLI prepares the native resources. For example this leads to regeneration of Podfile whenever a change in.js
or even.css
insidenode_modules
is detected.What is the new behavior?
CLI persists shasums for each plugin's native part. In case the plugin's native part is not changed, CLI will not prepare the native resources of the plugin itself.
Partial fix for #3549