PDGGK opened a new pull request, #121:
URL: https://github.com/apache/iotdb-extras/pull/121

   ### Why
   
   `iotdb-thingsboard-table` implements ThingsBoard storage SPIs but cannot 
depend on ThingsBoard at build time — neither `org.thingsboard.common:data` nor 
`org.thingsboard:dao` is published to Maven Central (`numFound 0` for both). 
`src/provided/java` therefore carries a compile-only surface of the types the 
module touches, excluded from the built jar so the real ThingsBoard classpath 
supplies them at runtime.
   
   That keeps the module buildable for everyone. Its one cost is that a 
hand-written surface can drift from the real interfaces and nothing in the 
default build would notice.
   
   ### What this adds
   
   A procedure for checking that it has not drifted: build the two ThingsBoard 
modules locally, swap the compile-only surface for the real artifacts, run the 
suite. It is deliberately **not** wired into the default build — doing so would 
require every contributor and every CI run to clone and build ThingsBoard 
first, which is the situation the compile-only surface exists to avoid.
   
   Two things I tried to make it earn its place:
   
   - **A control.** A green build proves nothing on its own: if the 
compile-only sources are still on the source path, everything compiles exactly 
as before. The doc gives the check — `Compiling 58 source files` with the 
surface, `19` without — so a reader can catch the procedure silently not having 
taken effect.
   - **The traps, written as traps.** `commons-lang3` must match the version 
ThingsBoard pins (3.18.0 for 4.3.1.2); with an older one, every test in a suite 
touching `EntityType` fails at static initialisation with 
`NoClassDefFoundError`, which looks like drift and is not. And `verify` runs 
`apache-rat`, so a file added while working through the procedure fails the 
build *after* the tests have passed.
   
   ### Result recorded in the doc
   
   Against ThingsBoard 4.3.1.2, with the compile-only surface removed and the 
real artifacts on the classpath: 190 unit tests and 57 container integration 
tests green, no drift — every type matched and all three `implements` clauses 
bound against the real interfaces.
   
   This does not establish that ThingsBoard as a whole runs on this DAO; the 
doc says so explicitly.
   
   ### Notes for review
   
   Documentation only — one new file, no build or code changes, so no workflow 
approval is needed for this one. Both commands in it were run exactly as 
written, without skip flags, and `apache-rat` passes with the file in place.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to