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

Avoid withOptimize(false) on Scala Native until fixed #1141

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Feb 4, 2021

No description provided.

@lefou
Copy link
Member

lefou commented Feb 4, 2021

@lolgab Do you expect a fix for this soon, e.g. in the next release? We might want to override this only for the exactly known buggy version. Does it make sense to provide an extra target in ScalaNativeModule to make this configurable for all users?

@lolgab
Copy link
Member Author

lolgab commented Feb 4, 2021

Does it make sense to provide an extra target in ScalaNativeModule to make this configurable for all users?

The sbt plugin makes it configurable and defaults to true if the SCALANATIVE_OPTIMIZE env variable is not defined, I didn't make it configurable because I followed what mill does with Scala.js, it hides under fastOpt/fullOpt instead of making it configurable..
I don't really know what to do 😃
Sometimes I think that mill should recreate a copy of the Scala.js/Scala Native configuration to be friendlier to the people coming from Sbt.
At the same time I like how mill is configured.

@lolgab
Copy link
Member Author

lolgab commented Feb 4, 2021

Do you expect a fix for this soon, e.g. in the next release? We might want to override this only for the exactly known buggy version.

Yes, it has already a fixing PR ready: scala-native/scala-native#2147
At the moment there is only a version of Scala Native working with mill: 0.4.0.
This setting is the default on Sbt, even on the debug mode, which adds very little ( < 1sec ) to the build time.
It's not a big deal anyway.

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.

Ok. My initial idea was to just add a simple guard to the case if scalaNativeVersion == "0.4.0" but now I see that we haven't access to the version here and would require a greater change to make the version visible. Doable, but probably not what you had in mind with this PR.

I'm still suspicious, that we need to configure this (and can't) for a specific version/situation. I guess, we may expose this as a configuration option sometimes.

@lefou lefou merged commit 2e2feb6 into com-lihaoyi:master Feb 4, 2021
@lefou lefou added this to the after 0.9.5 milestone Feb 4, 2021
@lolgab lolgab deleted the withOptimize-native branch February 4, 2021 22:41
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