Jens-G opened a new pull request, #3798:
URL: https://github.com/apache/thrift/pull/3798

   Nothing in CI builds or runs `lib/d`. `build.yml` has jobs for php, go, 
java-kotlin, netstd, haxe, rust, python, nodejs, cpp and ruby, and its shared 
`CONFIG_ARGS_FOR_LIBS` passes `--without-d`; `docker.yml` only builds and 
validates the images. A regression in `lib/d` can only be found by someone 
building D by hand — which is how THRIFT-6168 had to be verified.
   
   Most of what a job needs already exists, so this is mostly wiring: the 
docker images pin dmd 2.087.0 and the deimos header sets, `configure.ac` has 
`AX_DMD`, and `lib/d/Makefile.am` already lists the debug and release unittest 
binaries in `TESTS`.
   
   ### The job
   
   Installs dmd the way the images do, bootstraps, configures with `--with-d` 
and the other bindings off, and runs `make -C lib/d check`. The compiler 
artifact is needed because `lib/d/test` generates from `.thrift` sources.
   
   ### Four things here are easy to get wrong
   
   **The deimos OpenSSL bindings are deliberately not installed.** They are in 
the docker images, but `lib/d`'s OpenSSL modules do not link against the 
OpenSSL 3.x that `ubuntu-24.04` ships:
   
   ```
   libthriftd-ssl.a(ssl_347_3db.o):src/thrift/internal/ssl.d:
     undefined reference to 'SSL_get_peer_certificate'
   libthriftd-ssl.a(ssl_bio_34b_356.o):src/thrift/internal/ssl_bio.d:
     undefined reference to 'ERR_put_error'
   ```
   
   `ERR_put_error` was dropped in 3.0 and `SSL_get_peer_certificate` renamed to 
`SSL_get1_peer_certificate`. Leaving the headers out makes configure report 
`Building D SSL tests ... no`, which drops those five modules from both the 
library and the test set. That is a real `lib/d` gap rather than a CI one and 
gets its own ticket; the step carries a comment saying to put the headers back 
once it is closed. The libevent bindings **are** installed and their modules 
are covered.
   
   **The sed matches `--without-d` with a word boundary.** Without `\b`, sed 
rewrites the first match in the argument list, which is `--without-dart`, and 
the job would quietly build Dart instead of D.
   
   **dmd is installed with apt rather than dpkg**, because the deb depends on 
`libcurl4` and `dpkg --install` leaves the package unconfigured instead of 
pulling it in.
   
   **The configure step checks that dmd was actually found.** configure 
disables a binding it cannot locate rather than failing, so without that check 
a job whose toolchain step had quietly stopped working would keep reporting 
success while running no tests at all — worse than having no job.
   
   ### Verification
   
   Run end to end on a clean `ubuntu:24.04` with the job's own steps:
   
   ```
   Building D Library ........... : yes
      Building D libevent tests . : yes
      Building D SSL tests ...... : no
      Using D version ........... : DMD64 D Compiler v2.087.0
   
   92 PASS, 0 FAIL      (43 modules in debug and release, less the SSL ones)
   All 2 tests passed   (lib/d/test: client_pool_test, transport_test)
   ```
   
   With `dmd` removed the job fails at configure instead of passing.
   
   ### Not in this PR
   
   - Adding `d` to the `cross-test` matrix. `lib/d/test` already has a 
`precross` target, so that is a follow-up on its own merits.
   - The OpenSSL 3.x port of `lib/d`, above.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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