`gleam compile-package` outputs symlink to `priv` directory
Author: ginkogruenCreated Sep 10, 2026Updated Sep 10, 2026
Hello, as requested here's the behavior I found hoping I haven't overlooked any obvious errors and everything is easy to reproduce.
Versions
System: aarch64-darwin (macOS 27.0 Golden Gate)
Gleam version: 1.18.1 (tested with official binary & the one from nixpkgs)
Erlang version: Erlang/OTP 28 (tested with OTP 29 too) (both from nixpkgs)
Steps to reproduce:
I have set up a small project for reproduction but I assume any project with a dependency such a lustre will do.
- Populate
build/dev/erlang&build/packages/lustre
gleam run- Run
gleam compile-package
gleam compile-package --target erlang --package build/packages/lustre --lib build/dev/erlang --out lustre-compiled- Check compilation output
ls -al lustre-compiledFor me the output is:
drwxr-xr-x - ginkogruen 10 Sep 17:08 _gleam_artefacts
drwxr-xr-x - ginkogruen 10 Sep 17:08 ebin
drwxr-xr-x - ginkogruen 10 Sep 17:08 include
lrwxr-xr-x - ginkogruen 10 Sep 17:08 priv -> /Users/ginkogruen/repos/priv_symlink_reproduction/build/packages/lustre/privLogging output
From `gleam compile-package` INFO Reading precompiled module metadata files
DEBUG reading_directory path="build/dev/erlang"
DEBUG reading_directory path="build/dev/erlang/houdini/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/houdini/_gleam_artefacts/houdini.cache"
DEBUG reading_directory path="build/dev/erlang/gleeunit/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/gleeunit/_gleam_artefacts/gleeunit@internal@gleam_panic.cache"
DEBUG reading_file path="build/dev/erlang/gleeunit/_gleam_artefacts/gleeunit.cache"
DEBUG reading_file path="build/dev/erlang/gleeunit/_gleam_artefacts/gleeunit@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleeunit/_gleam_artefacts/[email protected]"
DEBUG reading_directory path="build/dev/erlang/gleam_stdlib/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_stdlib/_gleam_artefacts/[email protected]"
DEBUG reading_directory path="build/dev/erlang/gleam_otp/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/gleam_otp/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_otp/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_otp/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_otp/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_otp/_gleam_artefacts/gleam@otp@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_otp/_gleam_artefacts/gleam@otp@static_supervisor.cache"
DEBUG reading_file path="build/dev/erlang/gleam_otp/_gleam_artefacts/gleam@otp@factory_supervisor.cache"
DEBUG reading_directory path="build/dev/erlang/lustre/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@internals@json_object_builder.cache"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre.cache"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@internals@mutable_map.cache"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@runtime@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@server_component.cache"
DEBUG reading_file path="build/dev/erlang/lustre/_gleam_artefacts/lustre@[email protected]"
DEBUG reading_directory path="build/dev/erlang/gleam_json/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/gleam_json/_gleam_artefacts/[email protected]"
DEBUG reading_directory path="build/dev/erlang/gleam_erlang/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/gleam_erlang/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_erlang/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_erlang/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_erlang/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_erlang/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_erlang/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_file path="build/dev/erlang/gleam_erlang/_gleam_artefacts/gleam@[email protected]"
DEBUG reading_directory path="build/dev/erlang/priv_symlink_reproduction/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/priv_symlink_reproduction/_gleam_artefacts/priv_symlink_reproduction.cache"
DEBUG reading_directory path="build/dev/erlang/exception/_gleam_artefacts"
DEBUG reading_file path="build/dev/erlang/exception/_gleam_artefacts/exception.cache"
DEBUG reading_file path="build/packages/lustre/gleam.toml"
DEBUG writing_file path="/var/folders/85/9lqf3zrd0xq21g1r9nkhr3yw0000gn/T/.tmpT9XhkV"
TRACE spawn_beam_compiler escript_path="/var/folders/85/9lqf3zrd0xq21g1r9nkhr3yw0000gn/T/.tmpT9XhkV"
INFO Compiling package
TRACE compile{package=lustre}:load: gleam_source_files "build/packages/lustre/src"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre.cache_meta"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre/runtime"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre/element"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre/internals"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@server_component.cache_meta"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre/dev"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre/vdom"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre/runtime/server"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_directory path="build/packages/lustre/src/lustre/runtime/client"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@internals@mutable_map.cache_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@internals@json_object_builder.cache_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]_meta"
DEBUG compile{package=lustre}:load: reading_file path="lustre-compiled/_gleam_artefacts/lustre@runtime@[email protected]_meta"
TRACE compile{package=lustre}:load: gleam_source_files "build/packages/lustre/test"
TRACE compile{package=lustre}:load: gleam_source_files "build/packages/lustre/dev"
TRACE compile{package=lustre}: CacheFiles::modules_with_meta_files "lustre-compiled/_gleam_artefacts"
DEBUG compile{package=lustre}: reading_directory path="lustre-compiled/_gleam_artefacts"
DEBUG compile{package=lustre}: reading_directory path="lustre-compiled/_gleam_artefacts/lustre"
DEBUG compile{package=lustre}: reading_directory path="lustre-compiled/_gleam_artefacts/lustre/runtime"
DEBUG compile{package=lustre}: reading_directory path="lustre-compiled/_gleam_artefacts/lustre/internals"
DEBUG compile{package=lustre}: reading_directory path="lustre-compiled/_gleam_artefacts/lustre/vdom"
DEBUG compile{package=lustre}: reading_directory path="lustre-compiled/_gleam_artefacts/lustre/runtime/server"
DEBUG compile{package=lustre}: reading_directory path="lustre-compiled/_gleam_artefacts/lustre/runtime/client"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/internals/constants
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/internals/json_object_builder
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@internals@json_object_builder.cache"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/vdom/vattr
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/attribute
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/effect
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/internals/mutable_map
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@internals@mutable_map.cache"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/internals/ref
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/vdom/vnode
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/element
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/element/html
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/vdom/patch
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/runtime/transport
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/vdom/path
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/vdom/cache
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/vdom/diff
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/runtime/server/runtime
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@runtime@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/runtime/app
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/component
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre.cache"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/dev/query
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/dev/simulate
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/element/keyed
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/element/mathml
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/element/svg
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/event
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/[email protected]"
DEBUG compile{package=lustre}: module_to_load_from_cache module=lustre/server_component
DEBUG compile{package=lustre}: reading_file path="lustre-compiled/_gleam_artefacts/lustre@server_component.cache"
INFO compile{package=lustre}: analysing_modules count=0
DEBUG compile{package=lustre}: performing_code_generation
DEBUG compile{package=lustre}: copying_native_source_files
DEBUG compile{package=lustre}: reading_directory path="build/packages/lustre/src"
DEBUG compile{package=lustre}: skipping_unchanged_native_file_unchanged file="build/packages/lustre/src/lustre.erl"
DEBUG compile{package=lustre}: skipping_unchanged_native_file_unchanged file="build/packages/lustre/src/lustre@[email protected]"
DEBUG compile{package=lustre}: skipping_unchanged_native_file_unchanged file="build/packages/lustre/src/lustre@internals@mutable_map.erl"
DEBUG compile{package=lustre}: skipping_unchanged_native_file_unchanged file="build/packages/lustre/src/lustre@[email protected]"
DEBUG compile{package=lustre}: skipping_unchanged_native_file_unchanged file="build/packages/lustre/src/lustre@[email protected]"
DEBUG compile{package=lustre}: skipping_unchanged_native_file_unchanged file="build/packages/lustre/src/lustre@[email protected]"
DEBUG comSource: gleam-lang/gleam