alibaba / transmittable-thread-local

📌 a missing Java std lib(simple & 0-dependency) for framework/middleware, provide an enhanced InheritableThreadLocal that transmits values between threads even using thread pooling components.
https://github.com/alibaba/transmittable-thread-local
Apache License 2.0
7.62k stars 1.69k forks source link

chore(ci): add bytecode version verification plugin #590

Closed wuwen5 closed 9 months ago

wuwen5 commented 9 months ago

增加字节码版本校验,便于在升级外部依赖时校验与本项目构建版本是否兼容.

例如 当我们试图升级javassist-3.30.1-GA时,能快速检测出它的构建版本为jdk11

[INFO] --- maven-enforcer-plugin:3.4.1:enforce (enforce-maven) @ ttl-agent ---
[INFO] Adding ignore: module-info
[INFO] Restricted to JDK 8 yet org.javassist:javassist:jar:3.30.1-GA:compile contains javassist/ByteArrayClassPath$BytecodeURLConnection.class targeted to JDK 11
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] ttl3-parent ........................................ SUCCESS [  0.431 s]
[INFO] TransmittableThreadLocal(TTL) ...................... SUCCESS [  8.068 s]
[INFO] TransmittableThreadLocal(TTL) Agent ................ FAILURE [  0.024 s]
[INFO] TransmittableThreadLocal(TTL) kotlin support ....... SKIPPED
[INFO] TransmittableThreadLocal(TTL) v2 compatible ........ SKIPPED
[INFO] ttl-bom ............................................ SKIPPED
[INFO] vertx4-ttl-integration ............................. SKIPPED
[INFO] vertx3-ttl-integration ............................. SKIPPED
[INFO] sample-ttl-agent-extension-transformlet ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.712 s
[INFO] Finished at: 2023-12-20T10:15:29+08:00
[INFO] Final Memory: 48M/901M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.4.1:enforce (enforce-maven) on project ttl-agent:
[ERROR] Rule 0: org.codehaus.mojo.extraenforcer.dependencies.EnforceBytecodeVersion failed with message:
[ERROR] Found Banned Dependency: org.javassist:javassist:jar:3.30.1-GA
[ERROR] Use 'mvn dependency:tree' to locate the source of the banned dependencies.
codecov-commenter commented 9 months ago

Codecov Report

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

Comparison is base (46ec33e) 41.54% compared to head (e8cfe42) 41.54%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #590 +/- ## ========================================= Coverage 41.54% 41.54% Complexity 293 293 ========================================= Files 47 47 Lines 1733 1733 Branches 237 237 ========================================= Hits 720 720 Misses 987 987 Partials 26 26 ```

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

oldratlee commented 9 months ago

COOOL 🚀