Skip to content

Fix dotty CI #20363

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

Merged
merged 1 commit into from
May 8, 2024
Merged

Fix dotty CI #20363

merged 1 commit into from
May 8, 2024

Conversation

hamzaremmal
Copy link
Member

Closes #20362

@sjrd sjrd enabled auto-merge May 8, 2024 08:29
@hamzaremmal
Copy link
Member Author

hamzaremmal commented May 8, 2024

When I generated the checkfile in the branch of #20325, I get the following feedback

-- Error: tests/neg/i20317.scala:3:10 ----------------------------------------------------------------------------------
3 |def foo[A <: Foo[A]]: Unit = () // error // error
  |          ^
  |          Recursion limit exceeded.
  |          Maybe there is an illegal cyclic reference?
  |          If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
  |          For the unprocessed stack trace, compile with -Yno-decode-stacktraces.
  |          A recurring operation is (inner to outer):
  |
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            ...
  |
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
-- Error: tests/neg/i20317.scala:3:8 -----------------------------------------------------------------------------------
3 |def foo[A <: Foo[A]]: Unit = () // error // error
  |        ^
  |        Recursion limit exceeded.
  |        Maybe there is an illegal cyclic reference?
  |        If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
  |        For the unprocessed stack trace, compile with -Yno-decode-stacktraces.
  |        A recurring operation is (inner to outer):
  |
  |          type parameters of A
  |          type parameters of Foo[A]
  |          type parameters of  <: Foo[A]
  |          type parameters of A
  |          type parameters of A
  |          type parameters of Foo[A]
  |          type parameters of  <: Foo[A]
  |          type parameters of A
  |          type parameters of A
  |          type parameters of Foo[A]
  |          ...
  |
  |          type parameters of A
  |          type parameters of A
  |          type parameters of Foo[A]
  |          type parameters of  <: Foo[A]
  |          type parameters of A
  |          type parameters of A
  |          type parameters of Foo[A]
  |          type parameters of  <: Foo[A]
  |          type parameters of A
  |          type parameters of Foo[A]

@odersky Is this the expected behaviour ? Should this PR be considered as unblocking the CI and not a fix ?

@sjrd
Copy link
Member

sjrd commented May 8, 2024

We've merged so many PRs in the past 2 days that it's not very surprising that we got so-called semantic conflicts. Reporting 1 or 2 "illegal cyclic" errors doesn't make any difference. So if it unblocks the CI, that's good enough.

@odersky
Copy link
Contributor

odersky commented May 8, 2024

Yes let's change the check file. It's an evil and completely senseless test problem. We only test that the compiler survives it, with some indication what is wrong.

@hamzaremmal
Copy link
Member Author

@odersky The error reporting is non-deterministic, the CI failed and when I rerun the test locally I get the following checkfile (which is the second error that we thought is ignored):

-- Error: tests/neg/i20317.scala:3:10 ----------------------------------------------------------------------------------
3 |def foo[A <: Foo[A]]: Unit = () // error
  |          ^
  |          Recursion limit exceeded.
  |          Maybe there is an illegal cyclic reference?
  |          If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
  |          For the unprocessed stack trace, compile with -Xno-decode-stacktraces.
  |          A recurring operation is (inner to outer):
  |
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            ...
  |
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]
  |            type parameters of A
  |            type parameters of Foo[A]
  |            type parameters of  <: Foo[A]

@odersky
Copy link
Contributor

odersky commented May 8, 2024 via email

@sjrd sjrd merged commit 3393f7e into scala:main May 8, 2024
19 checks passed
@hamzaremmal hamzaremmal deleted the i20362 branch May 8, 2024 12:21
@Kordyjan Kordyjan added this to the 3.5.1 milestone Jul 3, 2024
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.

Nightly Dotty workflow of 2024-05-08 failed
4 participants