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

Implement retry logic for dealing with compiler errors #946

Merged
merged 27 commits into from
Oct 23, 2021

Conversation

MartinWelgemoed
Copy link
Contributor

@MartinWelgemoed MartinWelgemoed commented Aug 26, 2021

Fixes #188

What it does

Now supports mutants that don't compile

How it works

If a compiler error is detected, the mutant on that line is found and marked as non-compiling. A new version of the file is then made without that particular mutant and recompiled.

Copy link
Member

@hugo-vrijswijk hugo-vrijswijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I want to start off by saying how impressive I find it that a first PR to Stryker4s has such significant changes! Not only is this a feature I've wanted for a really long time, but the changes you've made feel like they're made by someone with experience in the codebase. Kudos!!

I have some comments, I hope they're not too incoherent. The main one is about handling of IDs and building up new files without the compile-errored mutants, which, I think, can be done slightly more separated from other pieces of code. A lot of that code is already somewhat dated by now, so don't be afraid to make larger changes.

I am working on Stryker4s for the whole day tomorrow (Friday, 27th of august), so I'd also be happy to take a look and see if I can have a go at some changes if you want. If you want to tackle the comments yourself, be my guest 🙇‍♂️

sbt/src/main/scala/stryker4s/sbt/Stryker4sSbtRunner.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/model/MutatedFile.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/model/MutatedFile.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/run/Stryker4sRunner.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/model/Mutant.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/Stryker4s.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/Stryker4s.scala Outdated Show resolved Hide resolved
Copy link
Contributor Author

@MartinWelgemoed MartinWelgemoed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the feedback, I'm also working on Stryker for the whole today so I'll see how far I can get with the suggested changes.

Edit: Also I apparently broke the maven logic somehow, oops I'll fix that too.

Copy link
Member

@hugo-vrijswijk hugo-vrijswijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Very sorry for the delayed response. I haven't been able to make much time to have a proper look again. I'd very much like to have this merged soon. I'll probably have a look at adding some sbt integration tests this Friday.

core/src/main/scala/stryker4s/model/MutantRunResult.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/run/MutantRunner.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/run/MutantRunner.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/run/MutantRunner.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/Stryker4s.scala Outdated Show resolved Hide resolved
core/src/main/scala/stryker4s/mutants/Mutator.scala Outdated Show resolved Hide resolved
Copy link
Member

@hugo-vrijswijk hugo-vrijswijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! I am really sorry this PR is taking so long to merge. I have 1 small comment, and made some small cleanups myself, but I can't push them to your branch (I think that's something you can enable, but I'm not sure). So I've pushed a commit to a new 946-review branch in stryker-mutator/stryker4s.

With my last comment I think this is ready to merge. Please also ping me if I'm taking too long to respond 🙏

@hugo-vrijswijk hugo-vrijswijk changed the title First version of the retry logic for dealing with compiler errors Implement retry logic for dealing with compiler errors Oct 23, 2021
@hugo-vrijswijk hugo-vrijswijk merged commit d7ff986 into stryker-mutator:master Oct 23, 2021
@hugo-vrijswijk
Copy link
Member

@MartinWelgemoed 🎉🥳🎈 it's merged. Congratulations! I'm thrilled to finally have this functionality in Stryker4s. When Stryker4s had its first 0.1.0 release, there were two big issues with it: performance and compile errors. The first one was improved earlier this year, and now this! Thanks a lot for starting this PR and having the patience for my reviewing 🙏.

@MartinWelgemoed MartinWelgemoed deleted the retry_compiler_errors branch October 26, 2021 07:12
@hugo-vrijswijk hugo-vrijswijk added the enhancement New feature or request label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom nonEmpty mutated to isEmpty that doesn't exist
2 participants