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

Make Evaluator and EvaluatorState normal classes #1740

Merged
merged 3 commits into from
Feb 15, 2022

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Feb 12, 2022

Extracted from #1663 to allow introducing new fields in the Evaluator and EvaluatorState classes without breaking the binary compatibility.

@lolgab lolgab marked this pull request as ready for review February 12, 2022 11:41
@lolgab lolgab requested a review from lefou February 12, 2022 11:42
failFast: Boolean = true,
threadCount: Option[Int] = Some(1)
) {
class Evaluator @deprecated(message = "Use apply instead", since = "0.10.1") (
Copy link
Member Author

Choose a reason for hiding this comment

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

When a new field gets added to the class, this constructor needs to be moved to a separate def this and the main constructor needs to be made private

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me.

I'd prefer to include the word "mill" in the @deprecated since attribute, to improve reading of compiler deprecation messages. Note, that the compiler just spits out all deprecation warnings as they occur and as a user it can be hard to guess where these are coming from and what dependency could be the culprit (esp. when transitive). So I'd go with the convention to always include the library name. The "after x.y.z" might be a bit weird, but it's actually the most accurate message we can leave without the need for later maintenance edits.

Example:

@deprecated("...", "mill 0.10.1")
// or if the next version is still unclear
@deprecated("...", "mill after 0.10.0")

/** @since Mill after 0.10.0 */

@lolgab
Copy link
Member Author

lolgab commented Feb 15, 2022

If we merge this PR now (befor the release of 0.10.1) we know for sure that next version will be 0.10.1. Isn't it correct to say deprecated since mill 0.10.1?

@lefou
Copy link
Member

lefou commented Feb 15, 2022

If we merge this PR now (befor the release of 0.10.1) we know for sure that next version will be 0.10.1. Isn't it correct to say deprecated since mill 0.10.1?

Sure. Just add the "mill" then. I wanted to explain my whole reasoning, as I had situations before, e.g. in the late 0.9 and early 0.10 phase.

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Thank you!

@lefou lefou merged commit 506fecc into com-lihaoyi:main Feb 15, 2022
@lefou lefou added this to the after 0.10.0 milestone Feb 15, 2022
@lolgab lolgab deleted the evaluator-api-change branch February 15, 2022 12:25
@lolgab lolgab restored the evaluator-api-change branch February 15, 2022 12:25
@lolgab lolgab deleted the evaluator-api-change branch February 15, 2022 12:25
@lolgab lolgab restored the evaluator-api-change branch February 15, 2022 12:25
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