zachallaun/mneme

only two characters of each line displayed

mayel opened this issue · 8 comments

mayel commented

Here's what I see:
Screenshot 2023-11-05 at 14 49 34

Running on zsh, let me what other details you may need.

Very weird. Can you try adding action: :reject when you start Mneme and share the output?

# test_helper.exs
Mneme.start(action: :reject)

Also, could download and run the example tour locally and see whether things work as expected or whether the same issue occurs?

curl -o tour_mneme.exs https://raw.githubusercontent.com/zachallaun/mneme/main/examples/tour_mneme.exs

elixir tour_mneme.exs
mayel commented

could download and run the example tour locally and see whether things work as expected

It seems to work fine :)

Can you try adding action: :reject when you start Mneme and share the output?

The issue doesn't occur anymore, and I get this instead: ** (Mneme.AssertionError) No pattern present

It may be relevant to share my test_helper.exs (I already tried commenting capture_log: true to no effect):

ExUnit.configure(
  formatters:
    [ExUnit.CLIFormatter, ExUnitNotifier]
)

ExUnit.start(
  timeout: 120_000,
  assert_receive_timeout: 1000,
  exclude: [],
  # only show log for failed tests (Can be overridden for individual tests via `@tag capture_log: false`)
  capture_log: true
)

Mneme.start()
mayel commented

Also potentially relevant, the cursor blinks constantly between two positions:
Screenshot 2023-11-05 at 18 28 49
Screenshot 2023-11-05 at 18 28 40

Mneme wraps the default ExUnit formatter; it's possible that there's some compatibility issue with ExUnitNotifier. Could you try running your tests with an extremely basic test_helper?

# please comment out the existing ExUnit.configure/start/etc.

ExUnit.start()
Mneme.start()

This will help me determine whether it's a configuration/compatibility issue or a terminal compatibility issue. Are you using the built-in MacOS Terminal.app?

mayel commented

Could you try running your tests with an extremely basic test_helper

Same result unfortunately.

Are you using the built-in MacOS Terminal

I was using iTerm, but tried that instead, and also using sh instead of zsh and same result...

Thank you for the extra info!

At this point, I really need to be able to replicate this locally in order to figure out what's going on. Some things that would help:

  • Please share the exact Elixir and OTP versions you're using
  • Try to drill down to a minimal reproducible example:
    • If you run individual test files, e.g. mix test test/my_project/some_test.exs, does it always happen, or only with a specific test case?
    • If you find a specific test, would it be possible to share enough with me that I could run it locally? Or to generalize it such that the issue still occurs for you, but you're not sharing anything that might be personal/proprietary.
mayel commented

While preparing the below answer for you I tried something different and found the apparent culprit: https://hexdocs.pm/mix_test_watch/

Using the below project, if I run FEDERATE=yes just test-watch --only live_federation deps/activity_pub/test/activity_pub/live_federation/actor_test.exs I encounter the issue, but not when I run START_SERVER=yes just test --only live_federation deps/activity_pub/test/activity_pub/live_federation/actor_test.ex


This is actually on an open-source project, so if you're willing to jump through some hoops to run it (i.e. having just and docker) you could check if you encounter the issue locally using the same repo: https://github.com/bonfire-networks/bonfire-app/blob/main/docs/HACKING.md

The tool versions used are at https://github.com/bonfire-networks/bonfire-app/blob/main/.tool-versions