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

chore(tests): Avoid mocking internal compiler state to test phase actions #909

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

Johnnei
Copy link
Contributor

@Johnnei Johnnei commented Dec 26, 2024

Rewire ScapegoatPhaseTest to run Dotty instead of trying to mock the internal state of the compiler well enough to be able to test it directly. This will fix the errors caused by upgrading to 3.6.2 in #904

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.95%. Comparing base (fa90063) to head (8bd2d29).
Report is 66 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #909      +/-   ##
==========================================
- Coverage   88.08%   83.95%   -4.14%     
==========================================
  Files         142       21     -121     
  Lines        1578      324    -1254     
  Branches      278       31     -247     
==========================================
- Hits         1390      272    -1118     
+ Misses        188       52     -136     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Johnnei Johnnei force-pushed the run-dotty-for-phase-tests branch from de1bfd0 to b9705b3 Compare December 26, 2024 03:48
@Johnnei
Copy link
Contributor Author

Johnnei commented Dec 28, 2024

@saeltz Please help review this one. I've tested it locally with 3.6.2 but didn't include that part to keep the change isolated.

@saeltz
Copy link
Collaborator

saeltz commented Dec 28, 2024

Would you please revert the unrelated formatting changes in the inspection file?

@Johnnei Johnnei force-pushed the run-dotty-for-phase-tests branch from b9705b3 to 8bd2d29 Compare December 29, 2024 01:44
@Johnnei
Copy link
Contributor Author

Johnnei commented Dec 29, 2024

Would you please revert the unrelated formatting changes in the inspection file?

Done. Probably worth to add scalafmtCheck into the additional checks job as that file got reformatted from an scalafmtAll to clean up my change.

@saeltz saeltz merged commit bfd9a00 into scapegoat-scala:master Dec 29, 2024
14 of 15 checks passed
@saeltz
Copy link
Collaborator

saeltz commented Dec 29, 2024

Thanks! Created #911.

@Johnnei Johnnei deleted the run-dotty-for-phase-tests branch December 29, 2024 14:15
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.

2 participants