gleam-lang/gleam

Split test/test_erlang test project and make it faster

Open

Aperta il 18 mag 2026

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Rust (21.417 star) (960 fork)batch import
help wanted

Descrizione

The test/test_erlang test project is used to test the compilation of various Erlang-only dependencies.

name = "project"
version = "0.1.0"

[dependencies]
# These are Gleam deps
gleam_stdlib = "~> 0.18"
gleam_erlang = "~> 0.5"

# This is a rebar3 dep that uses files in ./priv
certifi = "~> 2.8"
# This is a rebar3 dep that uses files in ./ebin
cowboy = "~> 2.9"
# This is a mix dep that uses files in ./priv
countries = "~> 1.6"

# This is both a mix and a rebar3 dep!
# We want to default to using rebar3 as that is the build tool that is more
# likely to be installed.
ssl_verify_fun = "~> 1.1"

# This is a rebar3 dep that calls make to compile C into a .so file that is
# loaded at runtime from ./priv
# TODO: replace this with a package with a nif that compiles super fast. Perhaps
# just a hello world.
bcrypt = "~> 1.1"
# This is a rebar3 dep that output files in $REBAR_BARE_COMPILER_OUTPUT_DIR/priv
# and requires absolute paths
ezstd = "~> 1.1"

# This is a rebar3 dep where the application name (hpack, used by the BEAM)
# doesn't match the package name (hpack_erl, used by Hex).
hpack_erl = "~> 0.1"
gleam_javascript = "~> 0.7"

[dev_dependencies]
gleeunit = "~> 1.0"

Split this into multiple tests so each one only tests one compilation edge-case, and replace the expensive slow compiling dependencies with new ones that have the same properties but have minimal amounts of code, making them very fast to compile.

Part of https://github.com/gleam-lang/gleam/issues/5726

Guida contributor