Filesystems in Elixir Environments?

According to docs Environments

When you compile your source code, Elixir compiles artifacts to the _build directory. However, in many occasions to avoid unnecessary copying, Elixir will create filesystem links from _build to actual source files. When true, :build_embedded disables this behaviour as it aims to provide everything you need to run your application inside _build

here they have mentioned When true, :build_embedded disables this behaviour, but i cant find where to mention the value true?

In a typical mix.exs file there is a project function which returns a keyword list with :build_embedded in it

def project do
  [app: :pusher,
   version: "0.1.0",
   elixir: "~> 1.4",
   build_embedded: Mix.env == :prod, # <-- here
   start_permanent: Mix.env == :prod,
   deps: deps()]
end

Mix.env returns the current environment, it can be :dev, :test, :prod, or whatever else. Mix.env == :prod evaluates to true if the current environment is :prod.

1 Like