sfrances

sfrances

I have an application which has PropCheck tests. I am now trying to build a command line for this program. However, when I try to run the built escript, I get the following:

16:50:39.136 [info]  Application propcheck exited: exited in: PropCheck.App.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function Mix.Project.config/0 is undefined (module Mix.Project is not available)
            Mix.Project.config()
            (propcheck 1.4.0) lib/mix.ex:11: PropCheck.Mix.counter_example_file/0
            (propcheck 1.4.0) lib/app.ex:51: PropCheck.App.counter_example_file/0
            (propcheck 1.4.0) lib/app.ex:34: PropCheck.App.populate_application_env/0
            (propcheck 1.4.0) lib/app.ex:12: PropCheck.App.start/2
            (kernel 8.0.2) application_master.erl:293: :application_master.start_it_old/4

16:50:39.150 [info]  Application libgraph exited: :stopped

16:50:39.150 [info]  Application proper exited: :stopped

16:50:39.151 [info]  Application iex exited: :stopped
ERROR! Could not start application propcheck: exited in: PropCheck.App.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function Mix.Project.config/0 is undefined (module Mix.Project is not available)
            Mix.Project.config()
            (propcheck 1.4.0) lib/mix.ex:11: PropCheck.Mix.counter_example_file/0
            (propcheck 1.4.0) lib/app.ex:51: PropCheck.App.counter_example_file/0
            (propcheck 1.4.0) lib/app.ex:34: PropCheck.App.populate_application_env/0
            (propcheck 1.4.0) lib/app.ex:12: PropCheck.App.start/2
            (kernel 8.0.2) application_master.erl:293: :application_master.start_it_old/4

Googling around, I tried adding runtime: false to propcheck’s options in my mix.exs. Now the CLI works fine, but mix test won’t work.

== Compilation error in file test/analytic_tableaux_props_test.exs ==
** (exit) exited in: GenServer.call(PropCheck.CounterStrike, {:counter_example, {AnalyticTableauxPropsTest, :"property_a simple formula proves itself", []}}, 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.12.2) lib/gen_server.ex:1014: GenServer.call/3
    (propcheck 1.4.0) lib/properties.ex:151: PropCheck.Properties.tag_property/1
    test/analytic_tableaux_props_test.exs:5: (module)
    (stdlib 3.15.2) erl_eval.erl:685: :erl_eval.do_apply/6
    (elixir 1.12.2) lib/kernel/parallel_compiler.ex:428: Kernel.ParallelCompiler.require_file/2
    (elixir 1.12.2) lib/kernel/parallel_compiler.ex:321: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7

Any help very much appreciated.

Showing Posts 1 to 4

dimitarvp

dimitarvp

Shooting in the dark here, did you try specifying only: [:dev, :test] in mix.exs? IMO you can delete the runtime: false option.

sfrances

sfrances OP

Thanks. Unfortunately I already had those settings in the beginning. It was that setting that led to the first error.

sfrances

sfrances OP

Found a solution: if I just put only: [:test] that works. Thanks again.

dimitarvp

dimitarvp

Oh yeah, my mistake. I was thinking about dialyzer and not a testing library. only: [:test] is indeed the right thing to do.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews