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

V2 planning (breaking changes) #368

Closed
ckipp01 opened this issue Sep 9, 2021 · 3 comments
Closed

V2 planning (breaking changes) #368

ckipp01 opened this issue Sep 9, 2021 · 3 comments
Milestone

Comments

@ckipp01
Copy link
Member

ckipp01 commented Sep 9, 2021

While working on Scala 3 support I've hit on a few things that will need to be adjusted in the way scoverage is structured to be able to re-use more of the existing code. This will end up being a major breaking change, so I figured this was also a good time to address a few other long-standing requests or issues that people have brought up in the past. If you're a maintainer of a tool that is utilizing the current scalac-scoverage-plugin I'll do my best to keep everyone up to date with changes and help with a migration guide of sorts.

Current structure and upcoming structural change

The current structure is that there are two artifacts being published from this repo, the runtime and the plugin. The plugin is the actual compiler plugin and all the utilities necessary to write/read the coverage data to disk and also to handle the report creation. The runtime artifact is basically the invoker. In the Scala 3 implementation of this both the invoker and the plugin will inlined to the compiler. Therefore since we'll no longer be publishing a compiler plugin, we'll need separate out the reporting utilities to be cross compiled to Scala 3 and re-used by the various build tool plugins that will be used to read up the coverage data and write the actual report.

No longer relying on an absolute path

I also came across the fact that we are relying on absolute paths. There was some work done for this in #275 and I'd like to continue to go down this path to ensure scoverage will work in a distributed setting. The initial issue with that PR is that is assumed the working dir was the current dir. However my gut feeling is that we can do something similar to that of what semanticdb does and have a sourceroot dir passed in to signify where the sourceroot of the project is in order to put together the paths. More coming on this soon.

No longer support 2.11

Default encoding everywhere is now utf8.

Remove deprecated gradle-specific aggregate.

@deprecated("1.4.0", "Used only by gradle-scoverage plugin")
  def aggregate(baseDir: File, clean: Boolean): Option[Coverage] = {
    aggregate(IOUtils.scoverageDataDirsSearch(baseDir))
  }

Pinging a few people that I know maintain integrations with this: @maiflai @lefou

@ckipp01 ckipp01 pinned this issue Sep 9, 2021
@lefou
Copy link
Contributor

lefou commented Sep 9, 2021

Thanks for the info!

@ckipp01 ckipp01 added this to the 2.0 milestone Sep 27, 2021
ckipp01 added a commit that referenced this issue Sep 27, 2021
* Ensure utf8 encoding is defaulted everywhere.

Closes #122
Closes #326

Relates to #368

* Bump timeout in test for concurrency tests on windows
@ckipp01
Copy link
Member Author

ckipp01 commented Oct 31, 2021

The first Milestone release with many of the changes listed above was released today. You can find some more notes on the changes here and also my plans for next steps: https://github.com/scoverage/scalac-scoverage-plugin/releases/tag/v2.0.0-M2

@ckipp01
Copy link
Member Author

ckipp01 commented Jun 25, 2022

Now that 2.0.0 is release, I'll go ahead and close this. Please see the release pages for all the changes.

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