Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't add stream_data to archive #417

Merged
merged 1 commit into from
Nov 26, 2020
Merged

Don't add stream_data to archive #417

merged 1 commit into from
Nov 26, 2020

Conversation

tomekowal
Copy link
Contributor

@tomekowal tomekowal commented Nov 26, 2020

Closes #413

While trying to build current master on Erlang/OTP 22 Elixir 1.9.1 I encountered an error:

mix elixir_ls.release -o ~/elixir_ls
warning: Building with Erlang/OTP 22. Make sure to build with OTP 21 if publishing the compiled packages because modules built with higher versions are not backwards-compatible.

** (ErlangError) Erlang error: {:invalid_status, :compile}}
    lib/mix/tasks/archive/build.deps.ex:78: anonymous fn/3 in Mix.Tasks.Archive.Build.Deps.list/1
    (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
    (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
    lib/mix/tasks/archive/build.deps.ex:53: Mix.Tasks.Archive.Build.Deps.build_archives/1
    (mix) lib/mix/task.ex:331: Mix.Task.run_task/3
    lib/mix.tasks.elixir_ls.release.ex:17: Mix.Tasks.ElixirLs.Release.run/1
    (mix) lib/mix/task.ex:331: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2

I debugged it and seen that it is because mix_task_archive_deps tries to package all dependencies except itself. But stream_data is a test-only dependency, so it crashes. Adding StreamData to applications ignored during packaging fixes the issue.

I thought about adding a more complex solution that automatically checks for test dependencies, but I saw that in one of the issues there is discussion if elixir_ls should use mix_task_archive_deps at all #115 . I personally believe it shouldn't hence the quick fix.

Copy link
Member

@axelson axelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ❤️! I agree that this is the way forward for now.

@axelson axelson merged commit 3ffda94 into elixir-lsp:master Nov 26, 2020
@tomekowal tomekowal deleted the fix-release-generation branch November 27, 2020 08:23
@axelson
Copy link
Member

axelson commented Nov 27, 2020

FYI, for anyone looking at this later in order to make use of this fully you need to rm -rf deps _build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not possible to build after recent change
2 participants