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

Drop all usage of sbt-dotty in community build #14395

Merged
merged 4 commits into from
Mar 8, 2022

Conversation

griggt
Copy link
Contributor

@griggt griggt commented Feb 1, 2022

The sbt-dotty plugin was deprecated with the release of sbt 1.5.0, and removed from the dotty build in b477c42

However it was still being injected into the community build, as many projects therein had not been updated to a recent sbt, or were using a (possibly outdated) version of sbt-dotty either directly or indirectly via some other plugin.

This commit discontinues that practice, since sbt 1.6.x no longer plays nice with sbt-dotty (see the linked ticket #14391).

Many of the community build projects are already updated upstream to use sbt 1.5.x or 1.6.x without sbt-dotty; those are updated to their upstream versions in this PR as appropriate.

A handful of community build projects are either unmaintained or do not offer Scala 3 support upstream, or their inclusion in the community build was part of some special effort. Those projects, listed below, have had their dotty-staging forks updated to use sbt 1.6.2 and drop sbt-dotty.

  • betterfiles
  • effpi
  • fastparse
  • intent
  • scalap

This PR also:

  • upgrades to sbt 1.6.2
  • adds some debugging output on dependency overrides to the community build workflows
  • fixes the exclusion of flaky scalatest tests
  • drops algebra as a separate project since it is now incorporated into cats

[test_forward_compat]

Fixes #14391

@griggt griggt self-assigned this Feb 2, 2022
@griggt griggt changed the title [WIP] Drop all usage of sbt-dotty in community build Drop all usage of sbt-dotty in community build Feb 3, 2022
@griggt griggt added this to the 3.2.0 milestone Feb 3, 2022
@griggt
Copy link
Contributor Author

griggt commented Feb 9, 2022

Two of the Cats Effect tests picked up by the resync with upstream are failing since #14295

[info] ThunkSpec
[info] Thunk.asFunction0 should
[error]   x return the same function
[error]    false (file:1)
[info] TracingSpec
[info] IO.delay should
[error]   x generate identical traces
[error]    false (file:1)
[info]   + generate unique traces
[info] Async.delay should
[error]   x generate identical traces
[error]    false (file:1)
[info]   + generate unique traces

They have been disabled for now in dotty-staging/cats-effect@2510979

fyi @armanbilge

@djspiewak
Copy link

@griggt fwiw, I think those tests are picking up an actual regression in the compiler. More discussion on the linked Cats Effect issue, but it appears at least in preliminary analysis that the compiler now generates additional redundant wrapping functions around thunks. CE is sensitive to this because of how it detects call sites for tracing purposes, which is why it fails functional tests, but it should also show up in microbenchmarks and other performance metrics.

@griggt
Copy link
Contributor Author

griggt commented Mar 1, 2022

@djspiewak @armanbilge I see there has been additional discussion re: thunks on the linked ticket and Discord. If ultimately you feel there is a compiler regression that needs attention, please do open an issue. Thanks.

@griggt griggt marked this pull request as ready for review March 1, 2022 20:23
@griggt griggt removed their assignment Mar 1, 2022
This is the file which tracks projects published during the community
build run, which are injected as dependency overrides into subsequently
built projects. It can be useful to inspect this file when debugging.
The sbt-dotty plugin was deprecated with the release of sbt 1.5.0,
and removed from the dotty build in b477c42

However it was still being injected into the community build, as many
projects therein had not been updated to a recent sbt, or were using a
(possibly outdated) version of sbt-dotty either directly or indirectly
via some other plugin.

This commit discontinues that practice, since sbt 1.6.x no longer plays
nice with sbt-dotty (see the linked ticket scala#14391).

Many of the community build projects are already updated upstream to
use sbt 1.5.x or 1.6.x without sbt-dotty; those are updated to their
upstream versions in this PR as appropriate.

A handful of community build projects are either unmaintained or do not
offer Scala 3 support upstream, or their inclusion in the community build
was part of some special effort. Those projects, listed below, have had
their dotty-staging forks updated to use sbt 1.6.2 and drop sbt-dotty.

  - betterfiles
  - effpi
  - fastparse
  - intent
  - scalap
The previous attempt at excluding the flaky tests, adapted from the
Scala 2 community build, was not fully working here, most likely
because of how those test sources are generated in the dotty version
of the ScalaTest build.

The fix in this commit has been verified by running the community build
with the sbt logging level set to info and inspecting the output.
@armanbilge
Copy link
Contributor

@griggt I just tried the latest nightly that includes the changes in #14628. You should be able to re-enable the ThunkSpec and the TracingSpec for Cats Effect in the community build.

Thanks again for your help with this one! :)

@anatoliykmetyuk anatoliykmetyuk merged commit 58171fb into scala:main Mar 8, 2022
@SethTisue
Copy link
Member

Great to see this landing! Thanks Tom & everyone who helped 👏

@griggt griggt deleted the wip/cb-drop-sbt-dotty branch March 8, 2022 16:19
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.

Lots of Builds in the community-build are silently skipping tests and even test-compiles
5 participants