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

Fix our custom test task #798

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Fix our custom test task #798

merged 1 commit into from
Sep 18, 2024

Conversation

solnic
Copy link
Collaborator

@solnic solnic commented Sep 18, 2024

So, we have this silly mistake that I just discovered, it causes this:

➜  sentry-elixir (solnic/fix-custom-test-task) mix help                                                                                                                                                         ✱
** (FunctionClauseError) no function clause matching in anonymous fn/1 in Mix.Tasks.Help.load_aliases/0    
    
    The following arguments were given to anonymous fn/1 in Mix.Tasks.Help.load_aliases/0:
    
        # 1
        [test: ["sentry.package_source_code", "test"]]
    
    (mix 1.17.2) lib/mix/tasks/help.ex:135: anonymous fn/1 in Mix.Tasks.Help.load_aliases/0
    (elixir 1.17.2) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    (elixir 1.17.2) lib/map.ex:262: Map.new_from_enum/2
    (mix 1.17.2) lib/mix/tasks/help.ex:49: Mix.Tasks.Help.run/1
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.2) lib/mix/cli.ex:96: Mix.CLI.run_task/2
    /usr/local/bin/mix:2: (file)

...however, running mix test just works, but it doesn't run the alias, because defining the alias is most likely crashing silently.

I reckon it's something worth fixing in Mix itself.

@solnic solnic marked this pull request as ready for review September 18, 2024 10:24
@whatyouhide
Copy link
Collaborator

Yes we can probably give a much better error in Mix. Feel free to give that a try and I'll help if ya want 🙃

@whatyouhide whatyouhide merged commit 277b1f8 into master Sep 18, 2024
4 checks passed
@whatyouhide whatyouhide deleted the solnic/fix-custom-test-task branch September 18, 2024 11:16
@solnic
Copy link
Collaborator Author

solnic commented Sep 18, 2024

Yes we can probably give a much better error in Mix. Feel free to give that a try and I'll help if ya want 🙃

@whatyouhide I was going to suggest that I could give this a shot! will do then, thanks :)

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.

2 participants