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

Mutation failed #587

Open
cbrunnkvist opened this issue Sep 25, 2020 · 1 comment
Open

Mutation failed #587

cbrunnkvist opened this issue Sep 25, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@cbrunnkvist
Copy link
Contributor

Summary

13:52:30.686 [pool-29-thread-1] WARN  stryker4s.mutants.applymutants.MatchBuilder - Failed to add mutation(s) 926 to new mutated code
13:52:30.688 [pool-29-thread-1] WARN  stryker4s.mutants.applymutants.MatchBuilder - The code that failed to mutate was: [
    e.rules
      .map { r =>
        s"""${r.cityRule
          .map(
            c => s"<li>City: ${c.cityId} (${c.cityName.getOrElse("Unknown")})</li>"
          )
          .getOrElse("")}
          ${r.areaRule
          .map(
            a => s"<li>Area: ${a.areaId} (${a.areaName.getOrElse("Unknown")})</li>"
          )
          .getOrElse("")}
       """
      }
      .getOrElse("")
] at Input.File(new File("..."), Charset.forName("UTF-8")):53:24

Stryker4s config

(nothing unusual)

Stryker4s environment

stryker4s 0.10.0-RC1

Your Environment

software version(s)
Scala version 2.12.8
Build tool & version 1.3.13
Operating System macOS 10.15.6
@hugo-vrijswijk
Copy link
Member

Hi @cbrunnkvist! Thanks for creating this set of issues! They're super helpful in fixing bugs in the mutant-placing code! I've fixed the previous two unplaceable mutant issues, but this one seems to be a little more tricky. I won't work on this any time soon as I think the way to fix this would be a bigger rework of the mutant searching and replacing logic. At the very least after 0.10.0.

For future reference, a reproduceable smaller code example:

serviceProvider
  .request { _ => "foo" }
  .getOrElse("bar")

@hugo-vrijswijk hugo-vrijswijk added the bug Something isn't working label Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants