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

Fix: replace class side API implementation #63

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

guillep
Copy link
Contributor

@guillep guillep commented Jan 11, 2024

And some incompatible with Pharo12

@coveralls
Copy link

coveralls commented Jan 11, 2024

Pull Request Test Coverage Report for Build 7491128361

  • 13 of 19 (68.42%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 58.337%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/MuTalk-Model/MutationTestingAnalysis.class.st 5 11 45.45%
Totals Coverage Status
Change from base Build 7489850629: 0.0%
Covered Lines: 3859
Relevant Lines: 6615

💛 - Coveralls

@DurieuxPol
Copy link
Collaborator

Indeed I forgot to replace the class side API, thanks !
However the aBloc millisecondsToRun code doesn't seem to work in pharo 10.

@guillep
Copy link
Contributor Author

guillep commented Jan 11, 2024

Auch, true! It only works in Pharo 12!
And the thing is that the old API does not work in Pharo12!

I'll fix it :)

@DurieuxPol
Copy link
Collaborator

Maybe if we use deprecated:transformWith: instead of deprecated: for deprecated methods, it will work ?

@guillep
Copy link
Contributor Author

guillep commented Jan 11, 2024

That will rewrite users. We need a version that works for all Pharo versions.
There are not many solutions, and there are no magical ones ;)

  • option 1: we choose our "good" api and provide a compatibility package that introduces it in the version it does not exist
  • option 2: we add an if per version (if Pharo 12 we do this, otherwise we do that)
  • option 3: we rely on a lower level API that is compatible but maybe not so nice to read

@guillep
Copy link
Contributor Author

guillep commented Jan 11, 2024

Now, since this is for a little method, I'm for option 2 :)

If we had incompatibilities in the compiler or some more complex stuff, or in something we use a lot then I would have a different opinion maybe.

@guillep
Copy link
Contributor Author

guillep commented Jan 11, 2024

Actually, there is timeToRun that is compatible in all pharo versions and returns a duration instead of an integer.
Which comes in handy because mutalk is taking the integer and converting it manually to a duration, so now there is no need for that. So Option 3ish it was!

@DurieuxPol
Copy link
Collaborator

Ok nice !
So everything works as intended now right ?

@guillep
Copy link
Contributor Author

guillep commented Jan 11, 2024

Well tests are green, in the CI, and in my machine in P12.
We should look forward to add the P12 CI.

@guillep guillep merged commit 683e86d into pharo-contributions:master Jan 11, 2024
3 checks passed
@guillep guillep deleted the fix-old-API branch January 11, 2024 15:55
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.

3 participants