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
switch to scala 2.12 and add scaffolding for scala.js #1426
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sad to see all the pain introduced by cross-compiling to JS, but oh well. There is no better way anyway.
.gitignore
Outdated
@@ -1,2 +1,3 @@ | |||
tags | |||
target | |||
.DS_Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should not be here, you can include such OS specific exclude in your global gitignore, ty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Should I remove tags
as well, while I'm in there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep indeed! ty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted everything but target
.
scalacOptions ++= Seq("-feature","-deprecation", "-Xlint", "-language:higherKinds", | ||
"-Ydelambdafy:method", "-Ypartial-unification", "-target:jvm-1.8"), | ||
"-Ydelambdafy:method", "-Ypartial-unification", "-target:jvm-1.8", "-opt:l:project", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find suspicious that -opt:l:project
is required here, what is the impact on performance?
Inlining is known to have cause issues in the best in users library/projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely measurable. However, I can manually inline the critical section if necessary, which will achieve most of the gains. The optimizer will only inline methods so annotated (@inline
), and it looks more carefully engineered than 2.11.x.
Let me know how to handle it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would interesting to have opinion of @retronym on such thing, as he knows how such a library is crafted and he is probably well aware of the current state of the inliner.
I don't feel qualified enough to make a decision here, I'm just pushing on the safe side due to bad memories about inlining... But it would be a shame to miss such improvement if they are now properly implemented... might be worth trying initially... and can go back later...
Thanks Kenji for the pointer!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left the inline pragma for now. However, in the future, if we decide to remove it, I can manually inline critical section code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like opt:l:project
is now deprecated: scala/scala#5964
build.sbt
Outdated
@@ -1,28 +1,57 @@ | |||
import org.scalajs.sbtplugin.ScalaJSPlugin | |||
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe these imports unnecessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted them, turns out they were not required.
Great effort BTW, I wish I did start this way. |
@aloiscochard @xuwei-k All right, this is ready for merge. |
@aloiscochard @xuwei-k Anything else I should change before this gets merged? |
LGTM! great stuff :) |
@aloiscochard Would you mind merging? I don't have permissions. Thanks! |
@jbgi Great. So now you have to inline in two places: the code, and the build file. 🙄 😆 I think in my next PR I'll just manually inline... |
A bunch of prep work to ease the painful situation I'm in presently with scalaz.effect.