Skip to content

Requirements could not be serialised as LDAP filter strings, which blocked bridging p2 to the OSGi Repository Service. - #1107

Merged
merks merged 1 commit into
eclipse-equinox:masterfrom
subyssurendran666:LDAP_Filter_support_for_requirements_211
Jul 27, 2026
Merged

Requirements could not be serialised as LDAP filter strings, which blocked bridging p2 to the OSGi Repository Service.#1107
merks merged 1 commit into
eclipse-equinox:masterfrom
subyssurendran666:LDAP_Filter_support_for_requirements_211

Conversation

@subyssurendran666

@subyssurendran666 subyssurendran666 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Requirements could not be serialised as LDAP filter strings, which blocked bridging p2 to the OSGi Repository Service. The root cause was that RequiredCapability match expressions store bound values as Parameter placeholder nodes, which the existing Equals/Compare serialisers could not handle.

The fix adds toLDAPString overrides to MatchExpression, Exists, and LambdaExpression. MatchExpression substitutes each Parameter with a Literal before delegating to the existing serialisers; Exists and LambdaExpression simply drop their wrappers.

Fixes: #211

@merks

merks commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What does org.eclipse.equinox.p2.metadata.expression.IExpression.toLDAPString(StringBuilder) return? If that doesn't work, might it be better to make that work?

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Test Results

   18 files  ± 0     18 suites  ±0   29m 13s ⏱️ +32s
2 181 tests +10  2 178 ✅ +10  3 💤 ±0  0 ❌ ±0 
5 197 runs  +30  5 188 ✅ +30  9 💤 ±0  0 ❌ ±0 

Results for commit 7cc0afc. ± Comparison against base commit c3c473b.

♻️ This comment has been updated with latest results.

@subyssurendran666

Copy link
Copy Markdown
Contributor Author

You are right. Adding toLDAPString overrides to Exists, LambdaExpression, and Parameter is the cleaner fix. It completes what was already designed without a separate utility method. I'll update the PR accordingly.

@subyssurendran666
subyssurendran666 force-pushed the LDAP_Filter_support_for_requirements_211 branch from 7bbe6e0 to 6839d9a Compare July 24, 2026 07:34
@subyssurendran666 subyssurendran666 changed the title Add LDAP filter serialisation for RequiredCapability match expressions Requirements could not be serialised as LDAP filter strings, which blocked bridging p2 to the OSGi Repository Service. Jul 24, 2026
@subyssurendran666
subyssurendran666 force-pushed the LDAP_Filter_support_for_requirements_211 branch 2 times, most recently from 5b0a11f to 80b4f1c Compare July 27, 2026 08:06
@subyssurendran666

Copy link
Copy Markdown
Contributor Author

@merks could you please re-review whenever this you have a moment? Thanks.

@subyssurendran666
subyssurendran666 force-pushed the LDAP_Filter_support_for_requirements_211 branch from 80b4f1c to 25f0a3e Compare July 27, 2026 13:17
Requirements could not be serialised as LDAP filter strings, which
blocked bridging p2 to the OSGi Repository Service. Fixes
IMatchExpression.toLDAPString() to work for all predefined
RequiredCapability version-range expressions.

Fixes: eclipse-equinox#211
@subyssurendran666
subyssurendran666 force-pushed the LDAP_Filter_support_for_requirements_211 branch from 25f0a3e to 7cc0afc Compare July 27, 2026 13:23

@merks merks left a comment

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.

It looks sensible.

@merks
merks merged commit 7be7398 into eclipse-equinox:master Jul 27, 2026
12 checks passed
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.

LDAP Filter support for requirements

2 participants