Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 25, 2025

Target platform filters currently operate silently, making it difficult to verify filter configurations or debug why certain units are excluded from the build.

Changes

Enhanced TargetPlatformFilterEvaluator.FilterLogger:

  • Track and log individual filtered units (limited to first 10 to avoid log spam)
  • Log INFO when filters match no units
  • Log INFO when units are filtered, showing unit IDs and versions
  • Preserve existing WARN when all matching units are removed

Extended filter logging to REMOVE_ALL filters:

  • Previously only RESTRICT filters had any logging
  • Now both filter types provide visibility into their operations

Example Output

[INFO] Removed 2 unit(s) matching {type=OSGI_BUNDLE, id="org.eclipse.osgi"}: org.eclipse.osgi_3.15.0, org.eclipse.osgi_3.16.0
[INFO] Filter {type=OSGI_BUNDLE, id="non.existent.bundle"} did not match any units
[INFO] Removed 15 unit(s) matching {type=OSGI_BUNDLE, id="org.apache.commons"}: commons-lang_2.0.0, commons-lang_2.1.0, ..., commons-lang_2.8.0, ... and 5 more

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • testng.org
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/tycho/.codeql-scratch/dbs/java/working/files-to-index15831785581795953666.list --sourceArchiveDir=/home/REDACTED/work/tycho/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/tycho/.codeql-scratch/dbs/java/trap/java (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Print filtered units

We have an option to filter units, and it is often not trivial to see it actually work as intended (see documentation here https://tycho.eclipseprojects.io/doc/latest/target-platform-configuration/target-platform-configuration-mojo.html#filters )

It would be good to enhance the Filtering to log an info message:

  • if filters are defined but nothing matched
  • if something matched what was actually filtered out

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits October 25, 2025 09:42
Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>
Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance filtering to log matched and unmatched units Add logging for target platform filter operations Oct 25, 2025
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.

2 participants