Skip to content
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

host2plugin: Allow plugins to set host version constraints #202

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Oct 2, 2022

Fixes #189

This PR adds a new GetVersionConstraint method to the plugin server, allowing you to set version constraints of TFLint the plugin should work with.

The host process calls this endpoint to check if own version satisfies the constraints. If the constraint is not met, the process will be exited with an error before starting the inspection. This avoids confusing users with incorrect behavior in TFLint where new features are not supported.

If no version constraint is set, or if this endpoint is not supported in plugins, TFLint will ignore constraint checking. This behavior is the default, and plugin developers are encouraged not to set constraints unless there is a reason to do so.

@wata727 wata727 force-pushed the version_constraint branch from bece7ac to 4a99577 Compare October 7, 2022 14:30
@wata727 wata727 marked this pull request as ready for review October 7, 2022 14:30
@wata727 wata727 merged commit 76cc991 into master Oct 7, 2022
@wata727 wata727 deleted the version_constraint branch October 7, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Semantic versioning for protocol versions
1 participant