Skip to content

Code.compiler_options are not propagated to dependency compiler partition workers #15457

Description

@doorgan

Existing issue

  • I have searched existing issues and could not find a duplicate.

Elixir and Erlang/OTP versions

Erlang/OTP 29 [erts-17.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.20.0 (compiled with Erlang/OTP 29)

Operating system

Any

Current behavior

Working on Expert, I'm using compiler tracers to index the user project as it compiles. I have a DependencyTracer which should work only for dependencies, and a ProjectTracer that works only for the user project.

I noticed that when MIX_OS_DEPS_COMPILE_PARTITION_COUNT is >1, the DependencyTracer would not consistently run. It does run when that env var is 1, but apparently if more workers need to be spawned they don't inherit the compiler tracers from the compiler options, so DependencyTracer does not work.

This is not an issue with project compilation(which happens after deps compilation), if I understand correctly because the worker processes in that step are running inside the same VM reusing the available schedulers rather than spawning separate OS processes like deps compilation does.

Expected behavior

I expected compiler options to be propagated regardless of the value of MIX_OS_DEPS_COMPILE_PARTITION_COUNT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions