damianszczepanik / cucumber-reporting

HTML reports for Cucumber
GNU Lesser General Public License v2.1
546 stars 402 forks source link

[pom] Add byte-buddy directly as a java agent #1149

Closed hazendaz closed 9 months ago

hazendaz commented 9 months ago

This resolves newer jdk 19+ that suggests java will block this in the future from dynamically adding. Therefore this is no longer dynamically added both for lower jdks as well as jdk 17+

How and where byte-buddy is used?

While the agent is the concern here, we need to make sure both stay in sync as they are well known to fail if out of sync on more recent versions (such as latest here) due to the versions mockito / assertj are using. That is even if its true, assertj just released new and is up to date now.

For an extremely lengthy discussion on it as well as links/mentions to the JSR involved, see https://github.com/mockito/mockito/issues/3037. What is being done here is all the way at the bottom and best that can be done for maven currently.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (1684d1a) 98.27% compared to head (8b06a82) 98.27%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1149 +/- ## ========================================= Coverage 98.27% 98.27% Complexity 567 567 ========================================= Files 55 55 Lines 1214 1214 Branches 105 105 ========================================= Hits 1193 1193 Misses 10 10 Partials 11 11 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hazendaz commented 9 months ago

Will do.

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Damian Szczepanik @.> Sent: Wednesday, January 3, 2024 1:24:19 PM To: damianszczepanik/cucumber-reporting @.> Cc: Jeremy Landis @.>; Author @.> Subject: Re: [damianszczepanik/cucumber-reporting] [pom] Add byte-buddy directly as a java agent (PR #1149)

@damianszczepanik requested changes on this pull request.

Can you add some documentation/article to get familiar with this issue/problem?

— Reply to this email directly, view it on GitHubhttps://github.com/damianszczepanik/cucumber-reporting/pull/1149#pullrequestreview-1802868300, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHODI4VOHKPYCZJIQPPA5DYMWO5HAVCNFSM6AAAAABBJQZH26VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMBSHA3DQMZQGA. You are receiving this because you authored the thread.Message ID: @.***>

hazendaz commented 9 months ago

@damianszczepanik Added a link to a very lengthy discussion regarding this as it pertains with maven that has been going on for a long time. It states the JSR where java starts warning as well as fact longer term they will block any dynamic usage, the very last item on that page is how to get around it. It basically boils down to the consumer must tell java its using an agent until they have an api solution completed (replacement of asm) or they will start blocking such surprising usage. By stating up front you are using an agent (jacoco for example adds their agent in the build so its somewhat obvious), then it means the consumer of the build is aware an agent is going to manipulate some form of code internally. In our case during unit tests so the argline works well for that purpose. Link https://github.com/mockito/mockito/issues/3037