github / semantic

Parsing, analyzing, and comparing source code across many languages
8.97k stars 453 forks source link

Qualify targets associated with `cabal test` and `cabal run` #634

Open Symbolk opened 4 years ago

Symbolk commented 4 years ago

I am always wondering if there is a multi-language parsing tool and that leads me to semantic. So I clone it and install the required platforms on my Macbook Pro 16 2019 (16+512), and try to compile it. Having to say that I did not expect it to cost about 1 hour, and swallowed all my memory :->

After all, it compiled and built successfully, but when I run 'cabal v2-test', it should come with 'all' at the end (Figure 1); when I run 'cabal v2-run semantic -- --help', it did not run the executable semantic.

Although I quickly figured out how to run it directly, I wondering if the document should be updated?

image

image

patrickt commented 4 years ago

Aha, yeah, we need to qualify the cabal run with exe:semantic so it doesn’t run the benchmarks.

Also, the reason it took an hour is because you compiled with optimizations on. Try cabal configure --disable-optimization --enable-tests --disable-documentation --jobs=16