Skip to content

Conversation

@sgscheffler
Copy link
Contributor

Summary

Add LlvmLinkerParser for LLVM lld linker error parsing

Changes

  • Add LlvmLinkerParser class for parsing ld.lld error messages
  • Support versioned linkers (ld.lld-15, etc.)
  • Handle error/warning/note severity levels
  • Integrate with ClangDescriptor using composite pattern
  • Add comprehensive unit and integration tests

Resolves JENKINS-76141

Testing Done

Unit Tests

  • Created LlvmLinkerParserTest with 7 test methods covering:
    • Basic parsing functionality (4 different severity levels)
    • Versioned LLD linkers (ld.lld-15, ld.lld-18)
    • Mixed output filtering (ignores non-LLD lines)
    • Real-world scenario from JENKINS-76141

Integration Tests

  • Added shouldFindAllClangAndLldIssues to ParsersTest
  • Validates composite parser functionality (Clang + LLD together)
  • All 115 existing parser tests continue to pass

Manual Testing

  • Verified Maven build: mvn clean test passes
  • Confirmed no regressions in existing functionality
  • Tested with sample LLD error output

Verification

  • All tests pass locally
  • No breaking changes to existing parsers
  • Follows established code patterns (based on ClangParser/Gcc4LinkerParser)
  • Comprehensive test coverage for new functionality

Submitter Checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

- Add LlvmLinkerParser class for parsing ld.lld error messages
- Support versioned linkers (ld.lld-15, etc.)
- Handle error/warning/note severity levels
- Integrate with ClangDescriptor using composite pattern
- Add comprehensive unit and integration tests

Resolves JENKINS-76141
@uhafner uhafner added the feature New features label Sep 28, 2025
Copy link
Member

@uhafner uhafner left a comment

Choose a reason for hiding this comment

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

Thanks for your pull request! Just some small comments...

@uhafner
Copy link
Member

uhafner commented Oct 3, 2025

@sgscheffler ping: I'm not sure if you have enabled your notifications...

@sgscheffler
Copy link
Contributor Author

Regex now uses named groups (linker, severity, message);
Parser normalizes to basename.
Tests updated to AssertJ idiom and assert the basename.

Author tags fixed;
Explicit severity mapping kept.
All tests pass locally.
Ready for re-review.
@uhafner

@sgscheffler sgscheffler requested a review from uhafner October 15, 2025 15:26
Copy link
Member

@uhafner uhafner left a comment

Choose a reason for hiding this comment

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

The code looks fine now, thanks!

Can you please have a look at the indention? There are two CheckStyle warnings.

@uhafner uhafner merged commit c258e84 into jenkinsci:main Oct 17, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants