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

only two characters of each line displayed #58

Open
mayel opened this issue Nov 5, 2023 · 8 comments
Open

only two characters of each line displayed #58

mayel opened this issue Nov 5, 2023 · 8 comments

Comments

@mayel
Copy link

mayel commented Nov 5, 2023

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

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

@zachallaun
Copy link
Owner

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

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

@zachallaun
Copy link
Owner

zachallaun commented Nov 5, 2023

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
Copy link
Author

mayel commented Nov 5, 2023

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
Copy link
Author

mayel commented Nov 5, 2023

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

@zachallaun
Copy link
Owner

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
Copy link
Author

mayel commented Nov 5, 2023

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...

@zachallaun
Copy link
Owner

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
Copy link
Author

mayel commented Nov 6, 2023

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

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