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

Add -Ysafe-init option #85

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Add -Ysafe-init option #85

merged 1 commit into from
Oct 31, 2023

Conversation

joan38
Copy link
Contributor

@joan38 joan38 commented Oct 1, 2023

No description provided.

@joan38
Copy link
Contributor Author

joan38 commented Oct 3, 2023

Are we good with this?

@joan38
Copy link
Contributor Author

joan38 commented Oct 6, 2023

Ping @satorg

@joan38
Copy link
Contributor Author

joan38 commented Oct 19, 2023

@satorg @armanbilge @BalmungSan How can we move forward on this?

@@ -647,6 +650,7 @@ private[scalacoptions] trait ScalacOptions {
val privateOptions: Set[ScalacOption] = ListSet(
privateNoAdaptedArgs,
privateKindProjector,
privateSafeInit,
Copy link
Member

Choose a reason for hiding this comment

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

Will this line enable it by default? If that's the case, I won't as it's still marked as experimental. There might be other experimental flags here that are already included by default though, I'm not sure.

Copy link
Contributor Author

@joan38 joan38 Oct 31, 2023

Choose a reason for hiding this comment

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

Yes it will. Should I remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know there is a mention of the word "experimental" but it's not under the Experimental section https://docs.scala-lang.org/scala3/reference/other-new-features/safe-initialization.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also this is check so not sure if the experimental refers to the fact that it wouldn't catch all of them or if it would fail on false positives like the unused imports

Copy link
Member

Choose a reason for hiding this comment

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

I don't know why it's not in the experimental section, maybe an oversight 🤷

Copy link
Member

Choose a reason for hiding this comment

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

Yes it will. Should I remove it?

Yes, Seth explained here why: #85 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adressed

"partial-unification",
version => version.isBetween(V2_11_11, V2_13_0)
)
privateOption("partial-unification", version => version.isBetween(V2_11_11, V2_13_0))
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to clarify: is this change supposed to be about re-formatting only?

Copy link
Member

Choose a reason for hiding this comment

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

+1 on this. If it's just reformatting please revert it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adressed

@SethTisue
Copy link
Member

This is experimental and should not be enabled by default.

In general -Y flags are experimental and should not be enabled by default. (It's possible you might make a different decision in an individual case, but -Y flags should be presumed guilty, not presumed innocent.)

@TonioGela
Copy link
Member

LGTM now. @SethTisue, @satorg opinions?

@TonioGela TonioGela merged commit fca373c into typelevel:main Oct 31, 2023
9 checks passed
@joan38 joan38 deleted the safe-init branch October 31, 2023 22:58
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.

4 participants