-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: add version field to ExecutionContext #6052
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
feat: add version field to ExecutionContext #6052
Conversation
alamb
left a comment
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.
|
|
||
| /// The shared state of all [`Task`] created from the same [`PipelinePlan`] | ||
| #[derive(Debug)] | ||
| #[allow(dead_code)] |
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 do you think about adding a function like
pub fn version(&self) -> &str {
...
}Which would avoid the need for allow(dead_code) perhaps
I vote for |
f8d81a0 to
8b2154d
Compare
alamb
left a comment
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.
Thanks @Weijun-H !
|
|
||
| /// Return version | ||
| pub fn version(&self) -> &str { | ||
| &self.version |
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 you could just call env!("CARGO_PKG_VERSION") here -- is there any reason to create a string to do so?
| &self.version | |
| env!("CARGO_PKG_VERSION") |
alamb
left a comment
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.
Thank you @Weijun-H 👍
Which issue does this PR close?
Closes #1517
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?