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

stdlib-sourcelinks-test is failing on CI #13196

Closed
griggt opened this issue Jul 28, 2021 · 5 comments
Closed

stdlib-sourcelinks-test is failing on CI #13196

griggt opened this issue Jul 28, 2021 · 5 comments

Comments

@griggt
Copy link
Contributor

griggt commented Jul 28, 2021

See https://github.com/lampepfl/dotty/runs/3179654611?check_suite_focus=true#step:4:1008

Error:  Test dotty.tools.scaladoc.sourcelinks.RemoteLinksTest.runTest failed: Expected to find ScalaWholeNumberProxy at https://github.com/scala/scala/blob/v2.13.6/src/library/scala/runtime/ScalaNumberProxy.scala at lines 57-573, took 5.304 sec
Error:  Failed: Total 4, Failed 1, Errors 0, Passed 3
Error:  Failed tests:
Error:  	dotty.tools.scaladoc.sourcelinks.RemoteLinksTest

running sbt scaladoc/sourceLinksIntegrationTest:test from the newest master (pulled a few minutes ago) locally succeeds with no error, whereas on GitHub it failed.

The members that are tested are selected at random, and the random number generator on CI seems to produce a different sequence for the same seed than is produced locally. For me locally, IntegralProxy is selected from ScalaNumberProxy.scala, whereas on CI, ScalaWholeNumberProxy is selected.

Neither of these seems to be correctly linked in the current API docs.
IntegralProxy links to L60 when I think it should link to L55.
ScalaWholeNumberProxy links to L57 instead of L52.

Also, there is a bug in the test which is causing it to be more lenient than it should be:

https://github.com/lampepfl/dotty/blob/d7d70c06ecdc0d5c5a40fab75beaf265992a865b/scaladoc/test-source-links/dotty/tools/scaladoc/source-links/RemoteLinksTest.scala#L46-L48

Here, expectedLine is of type String

Originally posted by @griggt in #13180 (comment)

@romanowski
Copy link
Contributor

@griggt I was debugging the problem last night and the test is not perfect but it detects the problem correctly. It boils down to the reading of scala 2 pickles and in a certain situation source file information is populated with data from other file. In problematic case ScalaNumberProxy.scala gets updated with content of NumericRange.scala. I am in contact with @nicolasstucki how to fix the problem.

@romanowski
Copy link
Contributor

romanowski commented Jul 29, 2021

#13201 fixed tests locally for me but I do not believe it is a proper fix. I need more input from @nicolasstucki to solve to problem properly.

@bishabosha
Copy link
Member

is this resolved by #13200 ?

@griggt
Copy link
Contributor Author

griggt commented Jul 29, 2021

#13201 fixed CI (but see note above re: proper fix), #13200 fixed the other bug I noticed

@romanowski wdyt, should we keep this issue open for a proper fix?

@romanowski
Copy link
Contributor

Sorry, I wanted to write down my finding but I wasn't able to do so. I will do it in a separate issue and we can close this one.

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

No branches or pull requests

4 participants