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

consider not recommending -Xcheckinit #10

Closed
SethTisue opened this issue Aug 5, 2019 · 8 comments
Closed

consider not recommending -Xcheckinit #10

SethTisue opened this issue Aug 5, 2019 · 8 comments

Comments

@SethTisue
Copy link
Member

it has a performance cost, and lord knows whether it induces correctness issues or not

I would suggest you not recommend it here. personally I would only ever enable it temporarily, during troubleshooting

@DavidGregory084
Copy link
Member

I don't know if I agree with this @SethTisue - debugging initialization order issues is one of the most frustrating things about Scala.

I'd rather find out where the root of the issue is straight away when I run my unit tests than have to enable it later after something silently goes wrong in production, and I don't think I'm alone in feeling that way.

@tpolecat
Copy link
Member

tpolecat commented Aug 5, 2019

Yeah I always have it on. It's a workaround for the worst bug in Scala and for me it's pretty essential.

@SethTisue
Copy link
Member Author

okay, no consensus on this one I see :-)

@BalmungSan
Copy link

Would it be possible, somehow (I don't know too much about SBT), that the flag is not used when building production artifacts?
Maybe trough a configuration flag?

@SethTisue
Copy link
Member Author

yes. the details would depend on how the publishing aspect of your build is set up.

@BalmungSan
Copy link

I mean that, if it would be possible for the plugin itself to provide a simple and standard way to disable this flag.

Each project should be in charge of disabling it when building production artifacts.

@SethTisue
Copy link
Member Author

Ah, I see. Well, that exceeds my own ambition level here.

@DavidGregory084
Copy link
Member

@BalmungSan it's an interesting idea for sure. I think a lot of the community projects are under-utilising the Scala optimizer for this reason, for example.

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

No branches or pull requests

4 participants