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

Tests with PropCheck start executing on compile #1000

Open
lukaszsamson opened this issue Oct 8, 2023 · 0 comments
Open

Tests with PropCheck start executing on compile #1000

lukaszsamson opened this issue Oct 8, 2023 · 0 comments

Comments

@lukaszsamson
Copy link
Collaborator

Reported on slack

My ElixirLS is crashing when I view a test file that has use PropCheck at the top. I've been trying to figure out what I might be able to change/config/tweak, but having little success.

[Error - 2:53:36 PM] GenServer ElixirLS.LanguageServer.ExUnitTestTracer terminating
** (stop) exited in: GenServer.call(PropCheck.CounterStrike, {:counter_example, {MyApp.MyTest, :"property_is false for unintelligible canceledAt values", []}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.14.1) lib/gen_server.ex:1027: GenServer.call/3
    (propcheck 1.4.1) lib/properties.ex:162: PropCheck.Properties.tag_property/1
    test/all_events_timer_test.exs:76: anonymous fn/2 in :elixir_compiler_3.__MODULE__/1
    (ex_unit 1.14.1) lib/ex_unit/callbacks.ex:731: ExUnit.Callbacks.__describe__/4
    test/all_events_timer_test.exs:67: (module)
    (elixir 1.14.1) src/elixir_compiler.erl:65: :elixir_compiler.dispatch/4
    (elixir 1.14.1) src/elixir_compiler.erl:50: :elixir_compiler.compile/3
    (elixir 1.14.1) src/elixir_module.erl:379: :elixir_module.eval_form/6
Last message (from #PID<0.4179.0>): {:get_tests, "/Users/ngeraedts/code/test/my_app/my_test.exs"}
State: %{}
Client #PID<0.4179.0> is alive

    (stdlib 4.2) gen.erl:237: :gen.do_call/4
    (elixir 1.14.1) lib/gen_server.ex:1035: GenServer.call/3
    (language_server 0.16.0) lib/language_server/providers/execute_command/get_ex_unit_tests_in_file.ex:9: ElixirLS.LanguageServer.Providers.ExecuteCommand.GetExUnitTestsInFile.execute/2
    (language_server 0.16.0) lib/language_server/server.ex:807: anonymous fn/4 in ElixirLS.LanguageServer.Server.handle_request/2
    (language_server 0.16.0) lib/language_server/server.ex:845: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2
[Info  - 2:53:36 PM] Connection to server got closed. Server will restart.

You're right... it does look like propcheck is executing the checks during macro compilation. 😬
https://github.com/alfert/propcheck/blob/master/lib/properties.ex#L132
Alright - not a LS issue. I'll see if I can post an issue on PropCheck to see if there's some way to avoid this issue.

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

1 participant