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

adjust tests on JDK 17+ for PermittedSubclasses change #10383

Merged
merged 1 commit into from Apr 27, 2023

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented Apr 27, 2023

addresses the test failures seen at e.g. https://github.com/scala/scala/actions/runs/4792344656

references #10105

@scala-jenkins scala-jenkins added this to the 2.13.12 milestone Apr 27, 2023
@SethTisue SethTisue modified the milestones: 2.13.12, 2.13.11 Apr 27, 2023
@SethTisue
Copy link
Member Author

SethTisue commented Apr 27, 2023

@som-snytt this is an expected progression, I hope?

it wasn't obvious to me if it's possible to ask for the -old test to run on 8 and 11, rather than just 8. there don't seem to be any examples of syntax for that in the repo currently.

this would still be mergeable as-is I think, but I'd be happy to tweak it, too

it came up recently that I like to pretend that JDK 9–10/12–16/18–19 don't exist, but if you happen to know that the 17+ here could be made more accurate, I'd be happy to adjust it

@SethTisue SethTisue added the internal not resulting in user-visible changes (build changes, tests, internal cleanups) label Apr 27, 2023
@SethTisue SethTisue changed the title adjust tests on JDK 17+ for PermittedSubclasses change adjust tests on JDK 17+ for PermittedSubclasses change Apr 27, 2023
Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

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

Thanks, my apologies, I saw this failure at some point but must have switched branches and cleaned. Please feel free to ping me to do my own follow-ups, I almost said foul-ups.

For future ref, I learned that in partest compilation rounds, "no number" comes first, so for the common case, C.java doesn't need an awkward number, then s_2.scala (or any number >= 0) is second. Also, // scalac tool arg comments are merged per round, so it's only necessary to specify javaVersion once per round; by definition, the files are compiled together.

Soon, partest knowledge will be only of historical interest.

@SethTisue
Copy link
Member Author

it's only necessary to specify javaVersion once per round

yeah I wondered about that but figured the redundant comments wouldn't hurt 🤷

@som-snytt
Copy link
Contributor

yep, only my feelings. Sticks and stones, but not redundant comments.

@som-snytt
Copy link
Contributor

som-snytt commented Apr 27, 2023

I totally missed your comment and question about javaVersion. I swear I just weaked it to accept spaces in the range

javaVersion: 8 - 11

I just spent a half-hour trying to find where, but to no avail. It must be somewhere. The upside to a slow PR queue is that later, I'll notice the feature go that's so cool. I bet I forgot about t8700 because I only partest --branch now.

Edit: it was the opposite, I removed the spaces, apparently because the line is always split now, for some important reason.

60394a9

The PR comment explains

Note "javaVersion" is only used as a lower bound, "19+", as in dotty, the thought leader, so for simplicity [sic] a range must be written without spaces, "11-19".

I forgot to adjust my test path:

sbt:root> partest neg/t8700b
Discarding 1 invalid test paths
Selected 0 tests drawn from the well of despair. I see you're not in a testing mood.

So actually javaVersion can be written just once for all test files. (But the new caching makes these checks less painful, too.) Verifying that range still works:

-- 1 - neg/t8700b-old                            [skipped on Java 19, only running on 8-11]

@som-snytt som-snytt merged commit b702c06 into scala:2.13.x Apr 27, 2023
3 checks passed
@SethTisue SethTisue deleted the fix-t8700b-on-jdk17-plus branch April 27, 2023 14:03
@som-snytt
Copy link
Contributor

TIL why this regressed.

scala/bug#12800

Sometimes I look back at my squandered youth and think what an ignorant wastrel I was!

Other times, I regard not the Springtime of my Youth but just last spring with the same amazed disdain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal not resulting in user-visible changes (build changes, tests, internal cleanups)
Projects
None yet
3 participants