Support the :compilers option
Module
Mix
242 changes across 53 versions
Changes by version
Add Mix.install_project_dir/0
Add environment variable for reusing Mix.install/2 installation
Allow to opt out of starting apps in Mix.install/2
Properly set SSL configuration for Mix downloads when running on Erlang/OTP 26
Mix.install/2 accepts atoms as paths
Add :config_path and :lockfile options to Mix.install/2
Do not start apps with runtime: false on Mix.install/2
Mix.Tasks.Xref.calls/1 is deprecated in favor of compilation tracers
Make protocol consolidation part of the Mix.install/2 cache
Add MIX_INSTALL_FORCE environment variable support
Support :config and :system_env in Mix.install/2
Add Mix.installed?/0
:exit_code in Mix.raise/2 has been deprecated in favor of :exit_status
Rename inconsistent :exit_code option to :exit_status on Mix.raise/2
Make sure Mix.install/2 expand paths for deps
Add Mix.install/2 for dynamically installing a list of dependencies
Support :exit_code option in Mix.raise/2
Discard MIX_ENV and MIX_TARGET values if they are empty strings
Print the time taken to execute a task with on MIX_DEBUG=1
Add inet6 fallback to Mix usage of httpc
Follow XDG base dir specification in Mix for temporary and configuration files
Add Mix.target/0 and Mix.target/1 to control dependency management per target
Add support for the :sparse option in Mix.SCM.Git
Skip dependendency loading if MIX_NO_DEPS is set to 1
Also store external resources that are not part of the current working directory in compilation manifest
Always include the compiled file source in manifests
Add MIX_NO_DEPS env var for disabling dep loading. Used for third-party scripts and tools like Nix package manager
Add mix test --listen-on-stdin that automatically reruns tests on stdin
Disable --warnings-as-errors when compiling dependencies
Add --filter option to mix deps.unlock to unlock only matching dependencies
Ensure missing protocol dependencies are discarded in umbrella projects with shared build
Do not load modules for xref purposes, instead use BEAM info
Ensure deps.check does not check archives (that's done in loadpaths)
Validate application properties before traversing them
Check for proper Makefile when compiling on Windows
Enforce space after comma in mix do
Add mix xref and mix compile.xref that runs cross-reference checks, with the latter running after compilation by default
Add mix app.tree and mix deps.tree
Add Mix.Task.rerun/2 that reenables and re-runs a task
Integrate OptionParser.ParseError into Mix, automatically converting such exceptions into Mix.Error and embedding the task information
Support @preferred_cli_env attribute when defining tasks
Support mix test --raise that will raise when a test suite fails (instead of setting the exit code to 1)
Enable rebar3 manager by default for Hex dependencies
Add mix escript.install to install escripts
Print stacktraces for Mix.Error when MIX_DEBUG=1 is set
Add a user friendly error for merge conflicts on mix.lock
Track files between path dependencies. This means umbrella applications will no longer trigger full recompilation when a sibling changes. Instead it will only recompile the files affected by the sibling changes
No longer print every file being compiled. Instead a generic "Compiling N files (.ext)" will be printed and files will only be logged in case they take more than 5 seconds to compile. This threshold can be customized by passing the --long-compilation-threshold flag and the previous behaviour can be reenabled by giving --verbose to mix compile
Add mix test --stale that uses static analysis on source files to know which tests should run when source files changes. If any test file changes, it will also re-run. Changing a configuration file or the test helper will trigger a full recompilation
Improve task not found message when Mix would include the not found task as a suggestion due to different casing
Ignore lock revision when the lock is out of date when updating Mix dependencies. Before this fix, Git tags and branches in the lock file would erroneously take higher precedence than the one in mix.exs
Only recompile empty Elixir files if they change instead of recompiling them on every run
Ensure .app file is written in UTF-8 (this allows app descriptions to contain UTF-8 characters)
Do not assume @impl is always a list
Add :archives configuration to def project that allows projects to list archive dependencies. --no-archives-check (as well as --no-deps-check) will disable the archive check. The :archives option is not checked for dependencies.
Add deps.precompile task as hook
Support --include-children in mix deps.compile option
Purge Erlang modules on recompilation
Add Mix.Projects.deps_paths that returns the dependencies path as a map
Reject non fullfilled optional dependencies later on in the convergence resolution for proper dependency sorting
Ensure retrieve compile manifests do fail if some compilers are not yet available
Automatically merge managers according to the mix > rebar3 > rebar > make order
Force recompilation if dependency was recently fetched
Ensure dependencies are properly skipped when --only option is given to mix deps.get
Cache and always consolidate protocols
Add warn_test_pattern to mix test that will warn on potentially misconfigured test files
Introduce MIX_QUIET environment variable that configures the underlying Mix task to output only error messages
Introduce MIX_DEBUG environment variable that prints information about the task being run
Validate git options and warn on conflicting ref, branch or tags
New umbrella applications will now share configuration and build files
Add experimental support for Rebar 3
Do not warn when an optional dependency has a conflicting :only option with another dependency
Raise readable error message when parsertools is not available
Add --build flag to mix deps.clean DEP to only remove artifacts from _build
Always run non-recursive tasks at the umbrella root
Ensure rebar projects work on directory names that contain non-latin characters
Ignore directories inside apps in umbrellas that do not have a mix.exs file
Ensure Mix can be used with path dependencies where the app name is different than the path basename
Ensure dependencies won't crash when updating from a git repository to a hex repository and the git version did not respect SemVer
Do not run remote converger if dependencies have diverged
Ensure umbrella dependencies across all environments are loaded on parent deps.get/deps.update
Mix.Utils.camelize/1 and Mix.Utils.underscore/1 are soft deprecated in favor of Macro.camelize/1 and Macro.underscore/1
Ensure umbrella apps can boot when build_embedded is true
Check Elixir version right after archive installation and provide feedback if there is a mismatch
Allow rebar dependencies with mix.exs to be compiled with Mix
Allow rebar dependencies to be specified via :path
Also consider subdirectories in config directory for Mix.Project.config_files/0
Allow dynamic configuration in Mix projects by storing config in an agent
Support rebar3 style Git refs in rebar.config files
Only recompile compile time dependencies in mix projects. This should considerably speed up recompilation times in Elixir projects
Warn when configuring an application that is not available
Add mix profile.fprof for easy code profiling
Abort when dependencies have conflicting :only definitions
Fully recompile projects if Elixir or SCM changes
Allow checksum to be checked on archive install via --sha512 option
Add mix local.public_keys to safely manage installation of Hex and Rebar dependencies
Use the safer https protocol instead of git for :github dependencies
Ensure automatic protocol consolidation via :consolidate_protocols is triggered in umbrella apps
Do not raise if wildcard given to import_config does not match any file
Applications with :build_embedded set to true require explicit compilation step
Also remove consolidated protocols on mix clean
Ensure --exclude in mix test concatenates with test helper excludes
Ensure config is escaped before being injected into escripts. This fixes a bug where escripts failed to build when containing values like maps in config files
Ensure we properly underscore acronyms followed by paths, for example, HTTP.Foo
Support "--search PATTERN" in "mix help"
Support :start_permanent that starts the application as permanent
Support :build_embedded that compile protocols, avoid symlinks and ensure protocols are loaded on boot
Make "mix app.start" public and support "--permanent" and "--temporary" options
Store relative paths in erlang manifests
Fix httpc proxy option profile for downloading hex and other safe packges
Fix missing behaviour warning when compiling Erlang modules
Provide clearer error message when updating archives on Windows
Don't go through hex.pm API server to install Hex
Don't show hex update message on mix local.hex
Ensure tasks are properly underscored and camelized
Ensure Mix does not use ANSI escapes on Windows unless ANSI is enabled
Only shutdown Logger if the Mix application is being actually started
Ensure priv/include are copied on Windows even if source did not change
Ensure rebar dependencies work when user path has a space on Windows
Add MIX_ENV output to archive.build (as on escript.build)
Load dependencies before deps.check compiles dependencies
Ensure Mix.Config is deep merged
Change version requirement in new apps to ~> MAJOR.MINOR
Report correct location if local.hex fails and give higher priority to powershell install on Windows
Ensure --elixirc-paths option for compile.elixir is a subset of the project :elixirc_paths configuration and it does not remove skipped entries from the manifest
Ensure compile.elixir writes to manifest when files are removed
Ensure compile.elixir purges and deletes modules before compiling
Do not crash on malformed proxy env var
Load mix deps only when there is a need to use them (this improves the timing for the majority of tasks in a Mix project)
Make the environment explicit on the success message generated after escript.build is invoked
Load config/config.exs inside escripts
Store and check Elixir version requirement for generated archives
Ensure aliases are invoked on umbrella recursive tasks
Leave it up to the application to start the Logger after compilation
Accept more forms of git versions (like "git version 1.9.3 (Apple Git-50)")
Allow --app flag to be passed to mix new
Support lowercase http(s)_proxy environment variables
Allow elixirc_paths to also be given through the command line to mix compile.elixir
Mix color configuration expects a list of atoms instead of a string with colors separated by comma
Use absolute symbolic links on Windows for _build instead of copying
Add Mix.compilers that returns all default compilers used by mix tasks
Issue warning and reset mtime for source files from the future
Support task aliases in Mix
Ensure Mix dependencies are not compiled every second time when mix deps.compile is invoked
Fix a bug where Mix.shell.error/1 and friends choked when printing a map
Ensure multiple @external_resource entries are read by Mix compilers
Fix a bug where tasks for umbrella projects were not properly reenabled
mix escriptize is deprecated in favor of escript.build
mix local.install and mix local.uninstall have been deprecated in favor of mix archive.install and mix archive.uninstall respectively
:embed_extra_apps for escripts is deprecated, instead list the dependencies inside def application
mix archive.build replaces the functionality of mix archive, mix archive now lists locally installed archives
Mix.shell.info/1 no longer automatically escape ANSI sequences. Instead if has to be explicitly enabled with the ansi: true option
Allow built Git dependencies to run on a system without Git by passing --no-deps-check
Add MIX_ARCHIVES env variable (it is recommended for Elixir build tools to swap this environment)
Mix.Generator.from_file/1 is deprecated in favor of passing from_file: file option to embed_text/2 and embed_template/2 (note though that from_file/1 expects a path relative to the current file while the from_file: file expects one relative to the current working directory)
Ensure umbrella project is recompiled when a dependency inside an umbrella child changes
:escript_* options were moved into a single :escript group
Add Mix.Config to ease definition of configuration files
Add mix loadconfig task that can be called multiple times to load external configs
Support --config option on mix run
Support HTTP_PROXY and HTTPS_PROXY on Mix url commands
Support --names options in mix help which emit only names (useful for autocompletion)
Fix mix do task for Windows' powershell users
Exceptions that define a :mix_error field to be compatible with Mix are no longer supported. Instead please provide a :mix field and use Mix.raise/1 and Mix.raise/2
mix new no longer generates a supevision tree by default, please pass --sup instead
Mix.project/0 is deprecated in favor of Mix.Project.config/0
mix deps.clean now works accross environments
Support line numbers in mix test, e.g. test/some/file_test.exs:12
Use @file attributes to detect dependencies in between .ex and external files. This means changing an .eex file will no longer recompile the whole project only the files that depend directly on it
Support application configurations in config/config.exs which can be customized by specifying your own :config_path
Support user-wide configuration with ~/.mix/config.exs
mix help now uses ANSI formatting to print guides
Generate .gitignore for --umbrella projects
Verify if a git dependency in deps has a proper git checkout and clean it automatically when it doesn't
Ensure mix test works with IEx.pry/0
Mix.project/0 is deprecated in favor of Mix.Project.config/0
Support MIX_EXS as configuration for running the current mix.exs file
Support Hex out of the box. This means users do not need to install Hex directly, instead, Mix will prompt whenever there is a need to have Hex installed
Fix issue on rebar install when the endpoint was redirecting to a relative uri
:env key in project configuration is deprecated
Add dependency option :only to specify the dependency environment. mix deps.get and mix deps.update works accross all environment unless --only is specified
Add Mix.Shell.prompt/1
Ensure the project is compiled in case Mix' CLI cannot find a task
Automatically recompile on outdated Elixir version and show proper error messages
Ensure generated .app file includes core dependencies
Allow a dependency with no SCM to be overridden
Allow queries in mix local.install URL
Automatically recompile on outdated Elixir version and show proper error messages
Remove MIX_GIT_FORCE_HTTPS as Git itself already provides mechanisms for doing so
mix deps.get and mix deps.update no longer compile dependencies afterwards. Instead, they mark the dependencies which are going to be automatically compiled next time deps.check is invoked (which is done automatically by most mix tasks). This means users should have a better workflow when migrating in between environments
Do not fail if a Mix dependency relies on an outdated Elixir version
Ensure mix properly copies _build dependencies on Windows
Ensure deps.get updates origin if lock origin and dep origin do not match
Use relative symlinks in _build
Also symlink include directories in _build dependencies
Require :escript_main_module to be set before generating escripts
Add mix iex that redirects users to the proper iex -S mix command
Support build_per_environment: true in project configuration that manages a separete build per environment, useful when you have per-environment behaviour/compilation
Mix now compiles files to _build. Projects should update just fine, however documentation and books may want to update to the latest information
Improve dependency convergence by explicitly checking each requirement instead of expecting all requirements to be equal
Support optional dependencies with optional: true. Optional dependencies are downloaded for the current project but they are automatically skipped when such project is used as a dependency
Ensure Mix does not load previous dependencies versions before deps.get/deps.update
Ensure umbrella apps are sorted before running recursive commands
Ensure umbrella apps run in the same environment as the parent project
Ensure dependency tree is topsorted before compiling
Raise error when duplicated projects are pushed into the stack
Setting :load_paths in your project configuration is deprecated
Allow umbrella children to share dependencies between them
Allow mix to be escriptize'd
Speed mix projects compilation by relying on more manifests information
Ensure cyclic dependencies are properly handled
Umbrella apps now treat children apps as dependencies. This means all dependencies will be checked out in the umbrela deps directory. On upgrade, child apps need to point to the umbrella project by setting deps_path: "../../deps_path", lockfile: "../../mix.lock" in their project config
Allow apps to be selected in umbrella projects
Address an issue where a dependency was not compiled in the proper order when specified in different projects
Ensure compile: false is a valid mechanism for disabling the compilation of dependencies
Mix.Version was renamed to Version
File.IteratorError was renamed to IO.StreamError
mix new now defaults to the --sup option, use --bare to get the previous behaviour
Automatically recompile a project if the Elixir version changes
Fix Mix.Version matching on pre-release info
Ensure watch_exts trigger full recompilation on change with mix compile
Fix regression on mix clean --all
:umbrella option for umbrella paths has been deprecated in favor of :in_umbrella
:test_helper project configuration did not affect mix test and was therefore removed. A test/test_helper.exs file is still necessary albeit it doesn't need to be automatically required in each test file
Add manifests for yecc, leex and Erlang compilers, making it easier to detect dependencies in between compilers and providing a more useful clean behaviour
mix help now outputs information about the default mix task
Add --no-deps-check option to mix run, mix compile and friends to not check dependency status
Add support for MIX_GIT_FORCE_HTTPS system environment that forces HTTPS for known providers, useful when the regular git port is blocked. This configuration does not affect the mix.lock results
Allow coverage tool to be pluggable via the :test_coverage configuration
Add mix cmd as a convenience to run a command recursively in child apps in an umbrella application
Support umbrella: true in dependencies as a convenience for setting up umbrella path deps
mix run now behaves closer to the elixir command and properly mangles the ARGV
mix deps.update, mix deps.clean and mix deps.unlock no longer change all dependencies unless --all is given
Always run mix loadpaths on mix app.start, even if --no-compile is given
:test_coverage option now expect keywords arguments and the --cover flag is now treated as a boolean
mix archive now includes the version of the generated archive
Mix now requires explicit dependency overriding to be given with override: true
Projects can now define an :elixir key to outline supported Elixir versions
On dependencies conflict, show from where each source is coming from
Empty projects no longer leave empty ebin files on mix compile
Deprecate mix run EXPR in favor of mix run -e EXPR