HaxeFoundation / HaxeFoundation/haxe

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

Open
#12,172 0 comments 0 reactions 1 assignee Claimed by @kLabz View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

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:

```hx
// Main.hx
import mbedtls.SslAuthmode;

macro function test() {
// SslAuthmode.SSL_VERIFY_NONE; // <-- uncomment on second build
return macro null;
}
```
```hxml
# 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.