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

Bug when starting iex -S mix with MIX_ENV = test #20

Closed
mindreframer opened this issue Mar 25, 2023 · 9 comments
Closed

Bug when starting iex -S mix with MIX_ENV = test #20

mindreframer opened this issue Mar 25, 2023 · 9 comments

Comments

@mindreframer
Copy link

Reproduction here:

Cheers, and have a good Saturday!

@mindreframer
Copy link
Author

When I comment out mneme from mix.exs, this error goes away, so I assume it is somehow related to mneme.

@zachallaun
Copy link
Owner

Thanks for the report and the reproduction repo!

Unfortunately I'm not able to reproduce this using that repo on Elixir 1.14.2-otp-25, 1.14.2/otp-25.3, or 1.14.3/otp-25.3.

Could you please try the following and let me know if any of them work?

  1. Run MIX_ENV=test mix deps.compile --force and check if the problem persists.
  2. Replace the :mneme dependency with {:mneme, github: "zachallaun/mneme", ref: "remove-dbg"} and check whether the issue persists.

@mindreframer
Copy link
Author

@zachallaun Hey, thanks!

I tried your suggestions.

  1. did not change anyting
  2. this worked!
    But I have noticed, that re-running my IEx session based ExUnit tests multiple times fails with the following error:
TestIex.run
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: table name already exists

    (stdlib 4.2) :ets.new(:__mneme_options_cache__, [:named_table, :public])
    (mneme 0.2.2) lib/mneme/options.ex:100: Mneme.Options.configure/0
    (mneme 0.2.2) lib/mneme.ex:127: Mneme.start/1
    /Users/roman/Desktop/work/sandbox/0.elixir/virtfs/test/test_helper.exs:1: (file)
    iex:2: (file)

I guess you're starting an ETS table without checking, if it's already started. That one should have an easy fix. Should I make an issues for it?

Best,
Roman

@zachallaun
Copy link
Owner

Thanks for checking, Roman!

No need to start an issue re: the ETS table, I'll fix that as well. :) Expect a small release shortly!

@mindreframer
Copy link
Author

Great, thank you a lot! I enjoy using Mneme a lot! In a recent crawler project Mneme in combination with

use Mneme, action: :accept, default_pattern: :last

was awesome for updating big assertions in a blink! Big thank you!

@zachallaun
Copy link
Owner

Thank you so much for saying so! That's awesome to hear! 😄

@zachallaun
Copy link
Owner

@mindreframer Both issues should be fixed in v0.2.3 🙂

@mindreframer
Copy link
Author

Bam! That's crazy speed from report to fix! And this on Saturday. Unbelievable. Thanks again and consider me very-very impressed. You should write a blog post about Mneme, you're doing lots of interesting things in the code base. It's a treasure of cool tricks. Really impressive.

Have a great weekend!

@zachallaun
Copy link
Owner

@mindreframer Thank you so much for the kind words! I really, really appreciate it.

I'm hoping to write more about what I've learned working on this and highlight the bits I'm most proud of at some point soon.

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

No branches or pull requests

2 participants