Skip to content

Add all discovered analyses to map used in getter function used by getDependentAnalyses#416

Open
GuillaumeZhang321 wants to merge 1 commit into
eclipse-tracecompass:masterfrom
GuillaumeZhang321:dependent_analyses_feature
Open

Add all discovered analyses to map used in getter function used by getDependentAnalyses#416
GuillaumeZhang321 wants to merge 1 commit into
eclipse-tracecompass:masterfrom
GuillaumeZhang321:dependent_analyses_feature

Conversation

@GuillaumeZhang321

@GuillaumeZhang321 GuillaumeZhang321 commented Jun 5, 2026

Copy link
Copy Markdown

What it does

Addresses #415

How to test

  • Create numerous automatic modules and set them in any order in the plugin.xml
  • Inside of any analysis, make one depend on the others
  • Observe, with a step debugger, that the dependent analyses are acquired and scheduled before the analysis that depends on them runs

Follow-ups

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of dependent analysis modules during initialization to ensure proper module registration and management.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac6b1542-ec6a-4f65-94fd-79b63c97d0bd

📥 Commits

Reviewing files that changed from the base of the PR and between 580df59 and 39a62d2.

📒 Files selected for processing (1)
  • tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/trace/TmfTrace.java

📝 Walkthrough

Walkthrough

TmfTrace.refreshAnalysisModulesImpl() now pre-populates the fAnalysisModules map with newly computed analysis modules for keys missing from the current built-in set, using a synchronized block. A clarifying comment documents that modules already present in the map are disposed because they were previously processed.

Changes

Module Map Pre-population

Layer / File(s) Summary
Module pre-population and disposal clarity
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/trace/TmfTrace.java
Synchronized section iterates over current module keys and inserts newly computed modules into fAnalysisModules for missing keys to enable dependent analysis module builds. Comment added to clarify that previously-handled modules are disposed.

Possibly related issues

  • Better Dependent Analyses support #415: Both changes modify TmfTrace.refreshAnalysisModulesImpl() behavior to pre-populate and manage the fAnalysisModules map for enabling dependent analysis lookups.

Poem

A trace of logic, synchronously sound,
Pre-populates maps where modules are found,
Dependent builders now have their way,
With clarity comments to light up the day. 🐰✨

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding discovered analyses to a map used by the getter function for getDependentAnalyses, which aligns with the code modification that pre-populates fAnalysisModules with newly computed modules.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MatthewKhouzam MatthewKhouzam 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.

You don't allow the same analysis to come in twice, this is good!

@MatthewKhouzam

Copy link
Copy Markdown
Contributor

Was this code AI assisted, if so please add a line in the commit message.

@GuillaumeZhang321

Copy link
Copy Markdown
Author

Was this code AI assisted, if so please add a line in the commit message.

I haven't used AI, should I ask it to verify the changes and then change the commit message to include?

@MatthewKhouzam

Copy link
Copy Markdown
Contributor

No need to change anything then, you're all good!

@MatthewKhouzam

Copy link
Copy Markdown
Contributor

I am expecting it to fail at the OK / APPLY place too.

…endentAnalyses() function.

This allows using the TmfTraceUtils functions to see all available analyses and mark them as dependencies in the getDependentAnalyses() for each Analysis.
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