-
Notifications
You must be signed in to change notification settings - Fork 147
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
Enable integration target version ranges #338
Conversation
return false; | ||
} | ||
|
||
if (target.min_v_major > metadata.majorVersion) { |
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 was thinking about how we could move this code that compares versions somewhere else and realized there's already a Version
struct that we can probably use here. We can add relational operators to it (it already has an equality operator) and do comparisons like:
// compares major, minor, etc
if (target.min_version <= metadata.version &&
metadata.version <= target.max_version) {
// version is inside valid range
}
We could also add a method to parse from a string, and maybe even a conversion from ASSEMBLYMETADATA
.
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, that's perfect. Is it okay if I visit that in the next PR? I'll be applying this to all existing integrations per the docs, as well as adding exclusion reasons as logs.
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.
Sure. Thanks!
This pull request enables specifying safe version ranges for targeted methods in integrations.
Example: An integration which is only safe to load for v6 of the Elasticsearch.Net client
Filtering happens at
ModuleLoadFinished
, not theJITCompilationStarted
event. Future enhancement would be to add another check withinJITCompilationStarted
.