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

Invalid filtering for multiple token options #74

Closed
RustedBones opened this issue May 6, 2022 · 3 comments
Closed

Invalid filtering for multiple token options #74

RustedBones opened this issue May 6, 2022 · 3 comments

Comments

@RustedBones
Copy link
Contributor

Let's consider those scalac options:

  val parallelismOption = new ScalacOption("-Ybackend-parallelism" :: "8" :: Nil)
  val releaseOption = new ScalacOption("-release" :: "8" :: Nil)

when both added to tpolecatScalacOptions ++= Set(parallelismOption, releaseOption) the resulting scalacOptions is invalid:

[info] * -Ybackend-parallelism
[info] * 8
[info] * -release
[info] * -other-option

This is due to the distinct in

(previous ++ newOptions).filterNot(filters).distinct

Which is applied on individual ScalacOption token instead of the full option.
The filtering logic in the plugin does not handle well the case of multiple token options.

@DavidGregory084
Copy link
Member

Yes you are right @RustedBones - the filtering should have been applied on ScalacOption

@DavidGregory084
Copy link
Member

@RustedBones a fix for this went in on #76. I will try to cut a new release (probably 0.4.0) next week

@RustedBones
Copy link
Contributor Author

That was fast 🚀 Thank you so much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants