haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Type name mbedtls.SslAuthmode is redefined from module mbedtls.SslAuthmode

Open tobil4sk opened this issue 7 months ago • 0 comments

This error happens randomly when server compilation is enabled in a big project in nightly builds. I have managed to reproduce it with this minimal project:

// Main.hx
import mbedtls.SslAuthmode;

macro function test() {
	// SslAuthmode.SSL_VERIFY_NONE; // <-- uncomment on second build
	return macro null;
}
# build.hxml
Main
--interp

On the first build there is just the import mbedtls.SslAuthmode;, then on the second build you uncomment the line that accesses SSL_VERIFY_NONE which results in the error:

 ERROR  (macro) /usr/local/share/haxe/std/eval/_std/mbedtls/SslAuthmode.hx:4: lines 4-8

 4 | extern enum abstract SslAuthmode(Int) {
 - |   [...]
 8 | }
   |
   | Type name mbedtls.SslAuthmode is redefined from module mbedtls.SslAuthmode (d45f450a8a381bf080409949a2afbdc6)

 ERROR  (macro) Main.hx:4: characters 2-29

 4 |  SslAuthmode.SSL_VERIFY_NONE;
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | Type not found : SslAuthmode

The 4.3 branch also errors, but with: Type not found: mbedtls._SslAuthmode.SslAuthmode_Impl_. I guess it must have been some more recent change that triggers it in the real project, however, it is very difficult to bisect since it happens so randomly. Perhaps it could be related to the parallelisation changes.

tobil4sk avatar Apr 13 '25 17:04 tobil4sk