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

Support scala-native 0.4 #3750

Merged
merged 1 commit into from
Feb 7, 2021
Merged

Conversation

arashi01
Copy link
Contributor

@arashi01 arashi01 commented Jan 29, 2021

Requires typelevel/discipline-munit#73 and discipline-munit to be published for scala-native first for builds to go green. (Tested locally)

  • Enables all cross modules currently published for Scala.js for Scala Native as well.
  • Updates Scala 2.12 from 2.12.12 to 2.12.13
  • Updates discipline-munit to 1.0.5
  • Reorganises build to split coverage job out of main build matrix.

@larsrh larsrh self-assigned this Jan 29, 2021
@larsrh
Copy link
Contributor

larsrh commented Jan 30, 2021

discipline-munit 1.0.5 release was successful 🎉

@arashi01
Copy link
Contributor Author

Looks like the current build errors are specifically related to scoverage/sbt-scoverage#319 / sbt/sbt#6251

One solution I can think of (other than waiting for scoverage/sbt-scoverage#319 to be resolved) is splitting the coverage tasks into their own CI steps and temporarily disabling coverage / coverageReport for Scala 2.12.13.

@larsrh Any thoughts on this?

@codecov-io
Copy link

codecov-io commented Jan 30, 2021

Codecov Report

Merging #3750 (605678a) into master (8a56313) will decrease coverage by 0.24%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #3750      +/-   ##
==========================================
- Coverage   90.09%   89.85%   -0.25%     
==========================================
  Files         390      389       -1     
  Lines        8898     8870      -28     
  Branches      267      263       -4     
==========================================
- Hits         8017     7970      -47     
- Misses        881      900      +19     

@arashi01
Copy link
Contributor Author

arashi01 commented Jan 31, 2021

Solution, if acceptable, was to move coverageReport and associated prep tasks out of the matrix build and into separate job.

This is arguably a cleaner solution than including coverage generation in buildJVM command, as was the case previously. Coverage was only being run on JVM platform projects, and only for Scala 2.12 / 2.13. This is still the case, with 2.12 not included due to scoverage/sbt-scoverage#319 mentioned above.

Edit: Previous behaviour also had coverage run and reports uploaded for every JDK configured in the main build matrix. If this is actually desired, additional JDKs can be added to coverage job settings.

@arashi01 arashi01 marked this pull request as ready for review January 31, 2021 00:47
@arashi01
Copy link
Contributor Author

@larsrh I think we're ready to go on this. Let me know if anything needs adjusting.

build.sbt Outdated Show resolved Hide resolved
class FutureSuite extends CatsSuite {
val timeout = 3.seconds

// TODO: We shouldn't do this! See: https://github.com/scala-js/scala-js/issues/2102
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still accurate for Scala Native?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems so. Using global ExecutionContext resulted in intermittent test failures.

The actual test suite is copied from the JVM platform project, modified with with synchronous ExecutionContext replacing the global import.

@arashi01 arashi01 force-pushed the scala-native-support branch 2 times, most recently from 791797a to bbbb779 Compare January 31, 2021 17:55
@larsrh
Copy link
Contributor

larsrh commented Jan 31, 2021

Sorry to rain on your parade, but we might kill coverage entirely. PR incoming, which we'll discuss first.

@larsrh larsrh mentioned this pull request Jan 31, 2021
@arashi01
Copy link
Contributor Author

Sorry to rain on your parade, but we might kill coverage entirely. PR incoming, which we'll discuss first.

No problem at all. Will rebase again when necessary!

@larsrh
Copy link
Contributor

larsrh commented Feb 1, 2021

@arashi01 FYI, we've removed coverage from the build now.

@arashi01 arashi01 force-pushed the scala-native-support branch 2 times, most recently from 58ea45b to 5739d58 Compare February 1, 2021 08:13
@arashi01
Copy link
Contributor Author

arashi01 commented Feb 1, 2021

@larsrh Done. Let me know if any changes are needed.

build.sbt Show resolved Hide resolved
build.sbt Outdated Show resolved Hide resolved
build.sbt Outdated Show resolved Hide resolved
@arashi01
Copy link
Contributor Author

arashi01 commented Feb 3, 2021

@larsrh I've removed all build related changes not related to adding Scala Native to build. Can make a separate pull request for build cleanup if necessary. Probably the more correct thing to do anyway!

@larsrh
Copy link
Contributor

larsrh commented Feb 3, 2021

Can make a separate pull request for build cleanup if necessary. Probably the more correct thing to do anyway!

Sounds like a good plan. I'd like to solicit some reviews from others (also, take a closer look myself) before asking you to do even more work though 😉 But regardless, thanks already for this effort. It's nice to see that it doesn't require that many code changes.

@larsrh larsrh self-requested a review February 3, 2021 20:37
Copy link
Contributor

@larsrh larsrh left a comment

Choose a reason for hiding this comment

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

I'm happy with this change. Thanks for pushing through! However I will let it sit for a few more days in case anyone complains.

@larsrh larsrh added this to the 2.4 milestone Feb 5, 2021
@larsrh
Copy link
Contributor

larsrh commented Feb 7, 2021

... and we have lift-off 🚀 Thanks a ton @arashi01.

This will be included in the upcoming 2.4.0 release.

Independently of that, if you're so inclined, it'd be great if you could file a follow-up PR with the build changes.

@larsrh larsrh merged commit af1aad8 into typelevel:master Feb 7, 2021
@arashi01 arashi01 deleted the scala-native-support branch February 7, 2021 15:35
@arashi01
Copy link
Contributor Author

arashi01 commented Feb 7, 2021

... and we have lift-off rocket Thanks a ton @arashi01.

This will be included in the upcoming 2.4.0 release.

Independently of that, if you're so inclined, it'd be great if you could file a follow-up PR with the build changes.

Okay great! And will do!

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

Successfully merging this pull request may close these issues.

4 participants