Stacks

Upgrade a Dependency and Fix Breakage in Erlang with Atlas in 2026

Updated 7 min read

Upgrading an Erlang dependency and resolving subsequent breakage is efficiently handled by Atlas, the terminal-native AI coding agent, which directly interacts with your `rebar3` project in 2026. Atlas drives the `rebar3` package manager to update dependencies, then reads the actual compiler output to identify and fix issues, ensuring your Erlang/OTP system remains robust. It integrates direct with `rebar3 eunit` for testing and `erlfmt` for code style, providing a comprehensive solution for dependency migrations.

How Atlas upgrades Erlang dependencies and fixes compile errors

Atlas streamlines Erlang dependency upgrades by directly interacting with the `rebar3` package manager, a core component of Erlang/OTP systems since its inception. In 2026, Atlas uses `bash` to execute `rebar3 upgrade` commands, capturing the full output to understand changes. It then reads the Erlang compiler's error messages to pinpoint and resolve breakage.

When an Erlang project requires a dependency upgrade, such as bumping a library in `rebar.config` to a new major version, Atlas initiates the process by invoking `rebar3 upgrade` via its `bash` tool. This command updates the specified dependency, potentially introducing breaking changes. Atlas does not guess at the breakage; instead, it compiles the Erlang application using `rebar3 compile` and meticulously reads the compiler output. For each reported error, Atlas employs its `edit` tool to modify the affected Erlang source files, such as `src/my_module.erl`. It can use the `lsp` tool's `goToDefinition` operation to inspect the new function signatures or module behaviors within the upgraded package, ensuring fixes align with the new API. This iterative process of compiling, reading errors, and editing continues until the Erlang application compiles cleanly, addressing every compile-time failure caused by the dependency bump.

Accessing Erlang release notes and new API signatures with Atlas

Understanding breaking changes during an Erlang dependency upgrade is crucial, especially when moving to a new major version. Atlas, in 2026, leverages its `webfetch` tool to retrieve the library's release notes and changelogs directly from the web. This ensures that fixes for modules like `gen_server` or supervisor callbacks are informed by the actual breaking changes.

After initiating a `rebar3` dependency upgrade, Atlas often needs context on why certain functions or behaviors have changed. For instance, if a `gen_server` callback signature has been altered in a new library version, simply guessing the fix is inefficient. Atlas uses its `webfetch` tool to pull the official release notes or migration guides for the upgraded Erlang library. This provides a clear understanding of the breaking changes, allowing Atlas to apply precise fixes using its `edit` tool. Furthermore, when modifying Erlang modules like `src/my_application_sup.erl` or `src/my_worker.erl`, Atlas can utilize the `lsp` tool's `goToDefinition` feature. This allows it to navigate directly to the new function definitions within the upgraded dependency, providing real-time insight into the updated API signatures and ensuring that the code modifications are accurate and idiomatic for Erlang.

How Atlas ensures Erlang test suites pass after an upgrade

Ensuring all Erlang test suites pass is a critical step after any dependency upgrade, confirming the application's runtime behavior remains correct. Atlas, in 2026, repeatedly executes `rebar3 eunit` and `rebar3 ct` via its `bash` tool to validate the fixes. It addresses test failures in files under the `test/` directory until all checks are clean.

Once an Erlang application compiles without errors after a dependency upgrade, Atlas shifts its focus to validating runtime correctness through testing. It systematically runs the project's EUnit tests using the command `rebar3 eunit` and Common Test suites with `rebar3 ct`, both executed through its `bash` tool. If any tests fail, Atlas reads the output to identify the specific test cases and modules, such as `test/my_module_tests.erl`, that are exhibiting issues. It then uses its `edit` tool to modify the application code or the test code itself, applying fixes informed by the compiler output, release notes, and `lsp` insights. This iterative cycle of running `rebar3 eunit`, analyzing failures, and applying targeted `edit` operations continues until all Erlang tests pass. This rigorous approach ensures that the upgraded dependency does not introduce regressions into the Erlang/OTP system.

Reviewing and committing Erlang dependency upgrade changes with Atlas

Before finalizing any Erlang dependency upgrade, a thorough review of all changes is essential to maintain code quality and project standards. Atlas, in 2026, automatically runs `erlfmt` on touched modules to ensure style consistency. It then presents a unified diff of all modifications, allowing developers to approve every change before staging and committing.

After successfully upgrading an Erlang dependency, fixing all compile errors, and ensuring all `rebar3 eunit` and `rebar3 ct` tests pass, Atlas prepares the changes for review. A crucial step for Erlang projects is maintaining consistent code style. Atlas automatically invokes `erlfmt` on all modified Erlang source files, such as `src/my_module.erl` and `test/my_module_tests.erl`, ensuring the code adheres to the project's formatting standards. This prevents style-related noise in the final diff. Atlas then computes a unified diff for every file edit and surfaces it for approval. Developers can review these changes, which include modifications to `rebar.config`, application modules, and test suites. Atlas provides permission-gated control, allowing developers to approve or reject individual edits. Once approved, Atlas can stage the changes and create a commit on behalf of the developer, complete with a descriptive message, ensuring a clean and traceable upgrade history for the Erlang application.

Step by step

  1. 01Initiate Erlang dependency upgrade: Ask Atlas to run `bash` with `rebar3 upgrade <dependency_name> <new_version>` to update the `rebar.config` and fetch the new package.
  2. 02Fetch release notes: Instruct Atlas to use `webfetch` to retrieve the official release notes or changelog for the upgraded Erlang library, providing context for breaking changes.
  3. 03Compile and fix Erlang errors: Have Atlas run `bash` with `rebar3 compile` to identify compile-time errors, then use `edit` and `lsp`'s `goToDefinition` to fix issues in `src/*.erl` files. Repeat until clean.
  4. 04Run and fix Erlang tests: Direct Atlas to execute `bash` with `rebar3 eunit` and `rebar3 ct`. Use `edit` to resolve any test failures in `test/*.erl` or application code, repeating until all tests pass.
  5. 05Format Erlang code: Ask Atlas to run `bash` with `erlfmt` on all touched Erlang modules to ensure consistent code style before review.
  6. 06Review and commit changes: Review the unified diff presented by Atlas, approve the changes, and let Atlas stage and commit the updated `rebar.config` and Erlang source files.

Frequently asked questions

How does Atlas handle `rebar.config` changes during an Erlang dependency upgrade?
Atlas directly modifies your `rebar.config` file using its `bash` tool to execute `rebar3 upgrade`. It ensures the dependency version is updated correctly and then tracks these changes as part of the overall diff for your review and approval.
Can Atlas help me understand new function signatures in an upgraded Erlang library?
Yes, Atlas uses its `lsp` tool's `goToDefinition` operation. When fixing callsites in your Erlang modules, it can navigate directly to the new function definitions within the upgraded dependency, providing immediate insight into updated API signatures.
What if my Erlang project uses both EUnit and Common Test?
Atlas is designed to work with both. It will run `rebar3 eunit` for your EUnit test suites and `rebar3 ct` for your Common Test suites, iteratively fixing any failures until all tests pass, ensuring comprehensive coverage for your Erlang application.
How does Atlas ensure my Erlang code adheres to formatting standards after an upgrade?
After making code changes, Atlas automatically runs `erlfmt` on all modified Erlang modules. This ensures that the updated code conforms to your project's established formatting guidelines, preventing style inconsistencies in the final commit.
Is it safe to let Atlas modify my Erlang application's supervisor tree or `gen_server` modules?
Yes, Atlas operates with permission-gated control. It drafts a plan in a read-only agent and asks for approval before making any changes. Every file edit, including those to `src/my_application_sup.erl` or `src/my_gen_server.erl`, is presented as a unified diff for your explicit approval before being written.
How does Atlas handle large compiler outputs or extensive breaking changes in Erlang?
Atlas captures the full output from `rebar3 compile` and `rebar3 eunit`. If the output exceeds terminal limits, it saves it to a file that you can read using Atlas's `read` tool. This ensures Atlas has all necessary context to address even extensive breakage in your Erlang codebase.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Upgrade a Dependency and Fix the Breakage with Atlas (2026 Workflow)

How to upgrade a dependency and fix the breakage with Atlas in 2026: bash drives the package manager, webfetch pulls the release notes, edit fixes each compiler error.

Atlas for Erlang in 2026

Atlas is a terminal-native AI coding agent for Erlang/OTP in 2026. Run it in an app with a rebar.config, map supervisors and gen_server modules, review every diff.

Self-review Your Working Diff Before Committing in Erlang with Atlas in 2026

Erlang developers in 2026 use Atlas to self-review uncommitted diffs, catching mistakes before CI. Leverage rebar3, erlfmt, and eunit with AI assistance.

Review a Pull Request in Erlang with Atlas in 2026

Streamline Erlang pull request reviews in 2026 with Atlas, the terminal-native AI coding agent. Catch subtle bugs by leveraging Erlang's rebar3, eunit, and erlfmt toolchain for comprehensive context.

Plan a Multi-File Change Before Editing in Erlang with Atlas in 2026

In 2026, Erlang developers use Atlas to plan and review complex multi-file changes, ensuring design approval before modifying a single line of code or running rebar3. Securely design Erlang system updates.

Automate GitHub Issue and Pull Request Triage in Erlang with Atlas in 2026

Automate GitHub issue and pull request triage for Erlang projects using Atlas. Integrate with rebar3 and erlfmt, ensuring safe, permission-gated responses from trusted users in your CI/CD pipeline.

Run Atlas Headless in CI in Erlang with Atlas in 2026

Automate Erlang development in CI/CD with Atlas. Run Atlas headless, integrate with rebar3 and erlfmt, and get machine-readable output for Erlang/OTP projects in 2026.

Add a Regression Test for a Bug Fix in Erlang with Atlas in 2026

Lock in Erlang bug fixes with Atlas in 2026. Learn to write failing regression tests using rebar3 eunit, apply fixes, and confirm passes, all with Atlas's terminal-native AI agent.

Browse this resource hub