Skip to content

Mark deprecated constants in Equinox for removal#1177

Open
elsazac wants to merge 1 commit into
eclipse-equinox:masterfrom
elsazac:DeprecatedConstants1
Open

Mark deprecated constants in Equinox for removal#1177
elsazac wants to merge 1 commit into
eclipse-equinox:masterfrom
elsazac:DeprecatedConstants1

Conversation

@elsazac
Copy link
Copy Markdown

@elsazac elsazac commented Oct 24, 2025

Mark deprecated constants in the Equinox repo to indicate planned removal in the future release.

@elsazac
Copy link
Copy Markdown
Author

elsazac commented Oct 24, 2025

@merks Could you check this?

@elsazac elsazac force-pushed the DeprecatedConstants1 branch 3 times, most recently from 1deadae to 0fe67f1 Compare October 24, 2025 12:06
* @deprecated
*/
@Deprecated
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will not remove support for this. It is not worth it. Any bundles using it would silently fail and it is not worth the effort to add a warning at runtime IMO. Also removing here would not impact the support for this header in the framework which is done with the internal constant org.eclipse.osgi.container.builders.OSGiManifestBuilderFactory.HEADER_OLD_PROVIDE_PACKAGE

Besides that, this is part of an overall deprecated resolver API that I don't think we should be modifying except for very special cases.

public static final String PROP_LOG_CAPTURE_ENTRY_LOCATION = "equinox.log.capture.entry.location"; //$NON-NLS-1$

@Deprecated
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not worth the trouble to remove in my opinion. Just to silently cause someone's configuration to fail?

*
* @deprecated As of 1.2.
*/
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should never modify OSGi APIs. That should only be done by the OSGi Specification working group. Besides that, the specification will never make such a breaking change to their stable APIs. They are one of the few that live and breath semantic versioning and will likely never produce a 2.0 major version change to break any import version ranges on their APIs for consuming bundles.

*
* @deprecated As of 1.2.
*/
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't modify OSGi APIs

* @deprecated As of 1.3. This has been replaced by
* {@link #VERSION_ATTRIBUTE}.
*/
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't modify OSGi APIs

* @deprecated Since 1.4. Replaced by {@link LogLevel#INFO}.
*/
@Deprecated
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't modify OSGi APIs

* @deprecated Since 1.4. Replaced by {@link LogLevel#DEBUG}.
*/
@Deprecated
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't modify OSGi APIs

* version information is available.
* @deprecated As of 1.2. Replaced by {@link #getVersion()}.
*/
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't modify OSGi APIs

* @deprecated
*/
@Deprecated
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment, we will not remove this. This is implemented at runtime with the class org.eclipse.osgi.container.builders.OSGiManifestBuilderFactory. Removing this constant will not remove the impl.

* @deprecated
*/
@Deprecated
@Deprecated(forRemoval = true, since = "2025-12")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment, we will not remove this. This is implemented at runtime with this constant org.eclipse.osgi.container.builders.OSGiManifestBuilderFactory.ATTR_OLD_REPRIVIDE

@elsazac elsazac force-pushed the DeprecatedConstants1 branch 4 times, most recently from ee649a2 to 63234ad Compare December 17, 2025 11:01
@elsazac
Copy link
Copy Markdown
Author

elsazac commented Dec 17, 2025

Thank you for the clarification. I completely agree on that.

I just wanted to clarify the intent behind this PR: it does not immedialtly remove any APIs. The change only adds deprecation-for-removal tags to constants that are already marked deprecated and currently unused in the codebase.The goal is simply to document that these constants should not be newly used and to provide clearer guidance to consumers. This does not imply any immediate removal, and existing usage would continue to work as before.

I have addressed the review comments and removed the changes for constants that are referenced in the codebase. it is now narrowed down only to those constants that are not used anywhere in the codebase and have no references.

please let me know of any other further changes required on this

@elsazac elsazac force-pushed the DeprecatedConstants1 branch 3 times, most recently from f1723d1 to f08a6d3 Compare December 17, 2025 11:45
@elsazac elsazac force-pushed the DeprecatedConstants1 branch from f08a6d3 to 66897d9 Compare January 13, 2026 08:55
@akurtakov
Copy link
Copy Markdown
Member

@elsazac Please take into account @tjwatson 's requests like #1177 (comment) to not touch OSGi APIs before you rebase again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants