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

@Option to enable export feature for PitestTask #139

Closed
Vampire opened this issue Aug 27, 2019 · 5 comments
Closed

@Option to enable export feature for PitestTask #139

Vampire opened this issue Aug 27, 2019 · 5 comments

Comments

@Vampire
Copy link
Contributor

Vampire commented Aug 27, 2019

Since Gradle 4.6 you can add custom command-line flags for tasks using the @Option annotation.
It would be nice if the PitestTask had such an option that enables the EXPORT feature, so that you can decide on each run easily whether you want the mutants to be dumped on disk or not without having to edit the build script or implementing the logic using a project property in each build individually.

@szpak
Copy link
Owner

szpak commented Sep 5, 2019

@szpak szpak added this to the 1.4.6 milestone Sep 6, 2019
@szpak
Copy link
Owner

szpak commented Sep 9, 2019

I tried to implement it in a natural way - with an ability to override features property, but I ran into Gradle limitations. Mostly gradle/gradle#10517, but also gradle/gradle#4311 and gradle/gradle#10518.

I don't know if I would like to implement any "hack" to just allow to enable EXPORT. In hindsight, I should rethink introduction of Property API (#105) as due to limitations the old mechanism had to stay for part of the values (no real gain for the others), it blocks some features and it took too much time to implement...

Btw, unfortunately, the other plugin for configuration overriding also doesn't support collections: nebula-plugins/gradle-override-plugin#3

szpak added a commit that referenced this issue Sep 9, 2019
Not implemented yet due to Gradle limitations described in linked issue:
#139
@Vampire
Copy link
Contributor Author

Vampire commented Sep 10, 2019

Just in case you don't know, Spock has a @PendingFeature annotation, that you can use instead of @Ignore.
That will report the test as skipped as long as the tests fail and once all iterations of the feature are successful, the feature is deemed implemented and the test begins to fail, so that the @PendingFeature annotation can be removed.

I don't know if I would like to implement any "hack" to just allow to enable EXPORT.

Actually I wouldn't consider this a hack, but exactly what I wanted.
I don't want an option that overrides all features.
I have in my build script disabled -FLOGCALL for now, but I could have other features configured.
I really would like to be able to just add to that the +EXPORT feature instead of replacing the list of features.

@szpak
Copy link
Owner

szpak commented Sep 11, 2019

Yes, I know @PendingFeature and I intended to use it :).

I implemented --additionalFeatures=+EXPORT. Please take a look at the new commit and provide feedback based on the latest uploaded 1.4.6-SNAPSHOT.

szpak added a commit that referenced this issue Sep 11, 2019
@Vampire
Copy link
Contributor Author

Vampire commented Sep 16, 2019

I didn't test it yet, but from what I see in the commit, it looks nice, thanks :-)

@szpak szpak closed this as completed in b857da1 Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants