-
Notifications
You must be signed in to change notification settings - Fork 76
fix: limit logging to authoritative plugin version #5579
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
Conversation
@@ -33,6 +33,7 @@ export const getExpectedVersion = async function ({ | |||
pinnedVersion, | |||
featureFlags, | |||
systemLog, | |||
authoritative, |
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.
build/packages/build/src/plugins/expected_version.ts
Lines 87 to 107 in 9b8ed35
getExpectedVersion({ | |
versions, | |
nodeVersion, | |
packageJson, | |
packageName, | |
packagePath, | |
buildDir, | |
pinnedVersion, | |
featureFlags, | |
systemLog, | |
}), | |
getExpectedVersion({ | |
versions, | |
nodeVersion, | |
packageJson, | |
packageName, | |
packagePath, | |
buildDir, | |
featureFlags, | |
systemLog, | |
}), |
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.
Just not clear to me which one of those should be authoritative
one :S
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.
Oops! My bad. I was passing it to the unit test and saw it working, but forgot to add it to the actual place it needs to be.
Fixed in 83dc1b2.
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.
Just not clear to me which one of those should be
authoritative
one :S
I think it needs to be the one that sends the pinned version, which is the one that decides which version to use. Otherwise we would never take the pinned version into account.
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.
Yeah -
build/packages/build/src/plugins/compatibility.ts
Lines 15 to 25 in 9b8ed35
/** | |
* Retrieve the `expectedVersion` of a plugin: | |
* - This is the version which should be run | |
* - This takes version pinning into account | |
* - If this does not match the currently cached version, it is installed first | |
* This is also used to retrieve the `compatibleVersion` of a plugin | |
* - This is the most recent version compatible with this site | |
* - This is the same logic except it does not use version pinning | |
* - This is only used to print a warning message when the `compatibleVersion` | |
* is older than the currently used version. | |
*/ |
Summary
Adds additional system logging to the plugin version resolution logic.