question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi packages configuration with tests in more than one

See original GitHub issue

Hi, I have a multi packages configuration and I have tests now in more than one package…

when working on a test you are running the following command in background :

stack repl dolla-consensus-base:test:test dolla-consensus-proposing-flushing:test:dolla-consensus-proposing-flushing-test --no-build --ghci-options -ghci-script=/Users/nhenin/Library/Caches/com.github.rikvdkleij.intellij-haskell/repl.ghci  --ghc-options -v1 --test

I have the following that is silently happening behind and that blocks the feedback from your pluging :

* * * * * * * *
The main module to load is ambiguous. Candidates are:
1. Package `dolla-consensus-base' component dolla-consensus-base:test:test with main-is file: /Users/nhenin/dev/dolla/consensus-base/test/Spec.hs
2. Package `dolla-consensus-proposing-flushing' component dolla-consensus-proposing-flushing:test:dolla-consensus-proposing-flushing-test with main-is file: /Users/nhenin/dev/dolla/consensus-proposer/packages/flushing/test/Spec.hs
You can specify which one to pick by:
 * Specifying targets to stack ghci e.g. stack ghci dolla-consensus-base:test:test
 * Specifying what the main is e.g. stack ghci --main-is dolla-consensus-base:test:test
 * Choosing from the candidate above [1..2]
* * * * * * * *

In the console I’m using this command : stack test --fast --file-watch

How can run it properly ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rikvdkleijcommented, Sep 22, 2020

Thanks for reporting!

Some versions ago I changed the plugin of having one REPL per target to a REPL per target type. I have to make it some smarter to prevent your case by checking if there is a main defined in stanza or back again to one REPL per target for test targets.

0reactions
rikvdkleijcommented, Sep 27, 2020

Great to hear!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Multiple Test Frameworks Simultaneously
The short answer: Yes, you should use the right frameworks for the right needs. Using more than one test framework is typically not...
Read more >
Run unit tests in IntelliJ IDEA from multiple modules together
Select first module, right-click on test/java directory and "Run All Tests". It creates test configuration. Select "Edit configurations" and check "Share" on ...
Read more >
Execute all Testng class under multiple packages via surefire ...
Execute all Testng class under multiple packages via surefire plugin ... Create a Maven project with test classes with methods under ...
Read more >
Structuring and Testing Modules and Layers with Spring Boot
Slice your Spring Boot applications into vertical modules and make them testable in isolation using Spring Boot's testing features.
Read more >
Multiple Job unit testing with @SpringBatchTest #3699 - GitHub
Hi all, From documentation, it seems impossible to unit test a Spring Batch with more than one job, problem is JobLauncherTestUtils ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found