Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Leo
    @leobenkel
    It just says [error] stryker4s.extension.exception.InitialTestRunFailedException: Initial test run failed. Please make sure your tests pass before running Stryker4s. [error] (stryker) stryker4s.extension.exception.InitialTestRunFailedException: Initial test run failed. Please make sure your tests pass before running Stryker4s.
    I am going to try with more logs
    oh i think it is because I had a custom method || to combine two custom classes but I did not have the && so the replacement failed
    Other issue was that I had compiler warning trigger failure
    -Xfatal-warnings
    Leo
    @leobenkel
    its running ! Thanks
    Hugo van Rijswijk
    @hugo-vrijswijk
    Awesome! Good to hear!
    Daniel Westheide
    @dwestheide

    Hey! I have been playing around with using the base-dir config key to get the SBT plugin working in a multi-module project. Unfortunately, I didn't quite get it working. What happened is that the sources to mutate were found, so a few mutants were created, but when the tests were run (both initial test run and running against the mutants), no tests were actually executed, leading to a detection rate of zero percent.

    Has anyone tried this workaround out in the recent past and confirmed that it's working? Maybe I'm just doing something wrong. If you're confident that it should work, I can publish a small example project where it doesn't (for me), so that we can find out what's going on. :)

    Hugo van Rijswijk
    @hugo-vrijswijk
    Hey! Yeah, it should work... Though the last time I've tried it was also a while ago. I can look into it tonight, but a example project would definitely be of help
    Daniel Westheide
    @dwestheide
    @hugo-vrijswijk It turns out I didn't follow the instructions precisely. Instead of sbt "project yourSubmoduleNameHere" stryker I used sbt yourSubmoduleNameHere/stryker. I really thought these were equivalent, but apparently, there is a subtle difference. :)
    Hugo van Rijswijk
    @hugo-vrijswijk
    Wait, there's a difference? I always use the second for running tests...
    Daniel Westheide
    @dwestheide
    I didn't expect there to be a difference either
    Here is an example project: http://github.com/dwestheide/codecov
    You can try comparing the behaviour when running the two commands...
    Max Bo
    @MaxwellBo
    Hi! I'm currently running through https://stryker-mutator.io/stryker4s/quickstart with version 0.6.1. I've tried doing this on 4 seperate projects, and they all throw the same error on a sbt stryker
    sbt:aid-operations> stryker
    01:05:54.916 [pool-34-thread-1] INFO   - Set stryker4s logging level to info
    01:05:54.932 [pool-34-thread-1] INFO  stryker4s.config.ConfigReader$ - Using stryker4s.conf in the current working directory
    [error] java.lang.NoSuchMethodError: scala.meta.io.AbsolutePath$.workingDirectory()Lscala/meta/io/AbsolutePath;
    [error]     at scala.meta.inputs.Input$File$.apply(Input.scala:55)
    [error]     at scala.meta.inputs.Input$.$anonfun$fileToInput$1(Input.scala:92)
    [error]     at scala.meta.common.Convert$$anon$1.apply(Convert.scala:15)
    [error]     at scala.meta.parsers.Api$XtensionParseInputLike.parse(Api.scala:10)
    [error]     at stryker4s.mutants.findmutants.MutantFinder.parseFile(MutantFinder.scala:26)
    [error]     at stryker4s.mutants.findmutants.MutantFinder.mutantsInFile(MutantFinder.scala:15)
    [error]     at stryker4s.mutants.Mutator.findMutants(Mutator.scala:32)
    [error]     at stryker4s.mutants.Mutator.$anonfun$mutate$1(Mutator.scala:17)
    [error]     at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
    [error]     at scala.collection.Iterator.foreach(Iterator.scala:937)
    [error]     at scala.collection.Iterator.foreach$(Iterator.scala:937)
    [error]     at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
    [error]     at scala.collection.IterableLike.foreach(IterableLike.scala:70)
    [error]     at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
    [error]     at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
    [error]     at scala.collection.TraversableLike.map(TraversableLike.scala:233)
    [error]     at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
    [error]     at scala.collection.AbstractTraversable.map(Traversable.scala:104)
    [error]     at stryker4s.mutants.Mutator.mutate(Mutator.scala:16)
    [error]     at stryker4s.Stryker4s.run(Stryker4s.scala:19)
    [error]     at stryker4s.run.Stryker4sRunner.run(Stryker4sRunner.scala:31)
    [error]     at stryker4s.run.Stryker4sRunner.run$(Stryker4sRunner.scala:17)
    [error]     at stryker4s.sbt.Stryker4sSbtRunner.run(Stryker4sSbtRunner.scala:17)
    [error]     at stryker4s.sbt.Stryker4sMain$.$anonfun$strykerTask$1(Stryker4sMain.scala:37)
    [error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
    [error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
    [error]     at sbt.std.Transform$$anon$4.work(System.scala:67)
    [error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
    [error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
    [error]     at sbt.Execute.work(Execute.scala:278)
    [error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
    [error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
    [error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
    [error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [error]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    [error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    [error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    [error]     at java.lang.Thread.run(Thread.java:748)
    [error] (stryker) java.lang.NoSuchMethodError: scala.meta.io.AbsolutePath$.workingDirectory()Lscala/meta/io/AbsolutePath;
    [error] Total time: 1 s, completed 13/08/2019 1:05:55 AM
    Hugo van Rijswijk
    @hugo-vrijswijk
    Hi! Thanks for stopping by. That's certainly surprising. What is sbt version are you running on? And are you running any other sbt plugins?
    I suspect sbt is loading a different scalameta version on the classpath because it is choosing another plugin's version over Stryker4s'
    Would you be able to share a sample project where you are running into this issue?
    Daniel Westheide
    @dwestheide
    Hey! I have seen this error before, when I was experimenting with running stryker4s on various open-source projects. I also suspect that there must be other SBT plugins using a different version of scalameta. Unfortunately, I don't think there is a good way for isolating dependencies of different SBT plugins, but maybe I'm missing something.
    But maybe we should first verify that this is caused by conflicting SBT plugins. @MaxwellBo Could you set up a small SBT project that that makes it possible to reproduce the error?
    Jorge
    @jvican
    Hey guys, great project! How does stryker mutate code and compile it? I'm curious.
    Hugo van Rijswijk
    @hugo-vrijswijk
    @jvican Hi! Thanks a lot for your interest! There's a lot to improve here. We mutate code using Scalameta, write the mutated sources to the target directory
    Then start the sbt/maven test task using that directory as the new sources dir
    Due to some tricks we only need to compile once: https://stryker-mutator.io/blog/2018-10-6/mutation-switching
    Due to the way we call the sbt test task, sbt still does it's compilation tasks and stuff, so there is a lot of area to improve performance there
    FYI: we also have an issue open to support BSP: stryker-mutator/stryker4s#232
    Jorge
    @jvican
    Right, thanks for responding!
    Have you considered using bloop to compile the mutated sources?
    I believe you could get much faster compiles than what you're doing currently :smile:
    Jorge
    @jvican
    Re BSP support, I think that's a great idea! As soon as I get the next bloop release out, I'll drop by that ticket and leave my thoughts, as well as link to some infrastructure you can reuse to be a BSP client :smile:
    Hugo van Rijswijk
    @hugo-vrijswijk
    @jvican That'd be awesome! I had a short look at BSP support, but didn't get very far. The documentation of the protocol is very extensive (dauntingly so, almost)! The compilation itself I don't think we could get huge performance improvements (if we only compile once, it taking 15 or 30s doesn't matter much), but if we can slim down on and improve the steps between test runs using Bloop that'd be awesome!
    Jorge
    @jvican
    Nice, I have some interesting ideas to speed up test execution further too, let me know when you start looking into bsp and I can help you out get started
    temon
    @temon
    I got this error when run the project, I follow the docs in the contribution page :
    ➜  stryker4s git:(master) ✗ sbt stryker4s-core/run
    [info] Loading global plugins from ...
    [info] Loading settings for project stryker4s-build from plugins.sbt ...
    [info] Loading project definition from...
    [info] Loading settings for project stryker4s from build.sbt ...
    [info] Set current project to stryker4s (in build file:...)
    [success] Total time: 0 s, completed 09/10/2019 7:16:12 PM
    [warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
    [error] java.lang.RuntimeException: No main class detected.
    [error]         at scala.sys.package$.error(package.scala:30)
    [error] stack trace is suppressed; run last stryker4s-core / Compile / bgRun for the full output
    [error] (stryker4s-core / Compile / bgRun) No main class detected.
    [error] Total time: 2 s, completed 09/10/2019 7:16:14 PM
    ➜  stryker4s git:(master) ✗
    I checked in the build.sbt, I think currently the main class setting is incorrect or has not set yet for that command...
    Hugo van Rijswijk
    @hugo-vrijswijk
    @temon Yikes we really should take a look at some of our outdated documentation haha. There's no main class in the core project, as that's added by each runner. The best way to run Stryker4s on Stryker4s would be to add the latest version of the sbt plugin to the project
    temon
    @temon
    I can run the unit test there actually...
    I just wondering after I made some changes in the core, should I just test it only by running the unit test?

    @temon Yikes we really should take a look at some of our outdated documentation haha. There's no main class in the core project, as that's added by each runner. The best way to run Stryker4s on Stryker4s would be to add the latest version of the sbt plugin to the project

    but if I run the Stryker4s from the SBT plugin, I can not test the changes that I have done in the current Stryker4s source, right?

    Hugo van Rijswijk
    @hugo-vrijswijk
    @temon Yeah if you make any changes, just running the unit tests is fine (if you push, CI will also do that)
    The way to test the latest changes on Stryker would be to call sbt-stryker4s/publishLocal and add the snapshot build to plugins.sbt
    temon
    @temon
    sure, I will try to make a change first...
    It's related to the issue number 234, I will try to use the Future...
    Hugo van Rijswijk
    @hugo-vrijswijk
    Ah cool! Good luck with it and let me know if you run into any issues 😁
    temon
    @temon
    the changes are done...
    but, 6 TESTS FAILED
    Hugo van Rijswijk
    @hugo-vrijswijk
    😱 Feel free to open a WIP PR!
    Marco Kuper
    @scubamaggo
    Trying my hand at issue #269 and have a couple of questions. Firstly, do we want to have this log feature for the ProcessRunner config as well?
    Marco Kuper
    @scubamaggo
    Secondly, if I understand the status quo correctly, we define the keys for ProccessorConfig and Config in the same file, but ignore the unused keys when parsing. Without using the new PureConfig feature to separate multiple configurations in one file, I think we would always get the warnings with a fully specified configuration file. Since this might be worse than no logging at all, it seems kinda mandatory to change the behaviour here. This would change how the configuration file looks like though, is that ok?
    I also don't quite understand why the Config is implicit everywhere, but this is probably irrelevant for the issue
    Hugo van Rijswijk
    @hugo-vrijswijk