Open yeekangc opened 4 years ago
If we should support deprecated property inside microprofile-config.properties, we could do that like Spring Boot Metadata https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#configuration-metadata-property-attributes provides with deprecation
information.
We could implement it if we need to support deprecated properties.
@angelozerr Along with any deprecated properties. It would be nice to provide some kind of support for newly added properties. For example: MP Health 3.0 will add a new mp.health.default.readiness.empty.response
property. (https://github.com/eclipse/microprofile-health/releases)
Would be good to only display the property for mp.health.default.readiness.empty.response
if they are using MP health >= 3.0.
Would be good to only display the property for mp.health.default.readiness.empty.response if they are using MP health >= 3.0.
Ok I see the idea. The problem comes from only with static-properties (our static JSON files which describe properties). An idea that I had, is that we could add a new attribute @since
to declare when the property is available.
For instance in https://github.com/eclipse/lsp4mp/blob/master/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/static-properties/mp-health-metadata.json
we could write the property mp.health.default.readiness.empty.response
like this:
{
...
"name": "mp.health.default.readiness.empty.response",
"@since": 3.0
}
The AbstractStaticPropertiesProvider will load the JSON file and loop for each ItemMetadata and when it found @since, it will call a new method boolean checkVersion(SearchContext context, IProgressMonitor monitor)
to check if the property must be collected or not.
We could imagine too to have a settings which returns even the mp.health.default.readiness.empty.response and on MP LS side we could provide a code action which says "Install MP 3.0")
For deprecated property, we could add a new property @upon
and mark the property as deprecated.
This is an "epic" to identify and track the work that is needed to support MP 4.0 APIs when the release reaches GA