Skip to content

Updates and remove redundant settings #101

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.10.6
sbt.version = 1.10.7
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that a later PR (perhaps #109) has superseded this change.

8 changes: 4 additions & 4 deletions src/main/g8/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "3.3.3" // A Long Term Support version.
scalaVersion := "3.3.5" // A Long Term Support version.
Copy link
Contributor

Choose a reason for hiding this comment

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

A timely & positive edit when created but Overcome By Events: PR #109.


enablePlugins(ScalaNativePlugin)

Expand All @@ -10,7 +10,7 @@ import scala.scalanative.build._

// defaults set with common options shown
nativeConfig ~= { c =>
c.withLTO(LTO.none) // thin
Copy link
Member

Choose a reason for hiding this comment

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

These were here to help people with these basic settings (using the defaults) with some suggestions in the comments for settings you might want to select - maybe the comments where not explained well but that was deliberate as the first thing people asked for was how to optimize and such.

.withMode(Mode.debug) // releaseFast
.withGC(GC.immix) // commix
c.withSourceLevelDebuggingConfig(
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps the current nativeConfig section, with the alternatives
can be preserved and the right hand comment changed to something
like "// frequent alternative 'foo'".

The problem with minimalism, especially for people just joining the party, is the balance between how may people a comment gains and how many people it looses/confuses. I'd ask to be given Wisdom but
I am afraid that is something that must be earned.

As one voice among many, I like having that section, with some alternatives and use both it and the alternative quick reference all the time "now, once again, is that releaseFast or release-fast?"

SourceLevelDebuggingConfig.enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

I've never used this feature. What does it do?
What is it's overhead? Does it need to be backed off or
output stripped for an application release?

Since it is non-default, perhaps it could be put either as a comment
block stating that developers find it useful, with a link to the
section in the "User's Guide".

Another alternative would be, if overhead in eventual binary is low,
to have another code block which either enables it or shows it
as the default disabled and suggests, as a step beyond "Getting Started" that one read the URL link and enable it.

I think that Eric formulated the idea of having a README of links
to more advanced .g8 templates actually used by experienced developers. Perhaps we could salt it with an "Once you have gotten started" intermediate template (perhaps showing C "-v" verbose options or such.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Folks, Where do we go from here?

I am hoping that "Hell in a handbasket" is not one of the suggestions.

Thanks,
Lee

Copy link
Member

Choose a reason for hiding this comment

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

I am hoping that "Hell in a handbasket" is not one of the suggestions.

Must be getting late there. :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

I used to (attempt to) teach young adults. They taught me to never ask an
open ended question if you were not willing to accept all answers offered ;-)

) // enable rich stacktraces
}
2 changes: 1 addition & 1 deletion src/main/g8/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.10.6
sbt.version = 1.10.7
Copy link
Contributor

Choose a reason for hiding this comment

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

Superseded by PR #109

2 changes: 1 addition & 1 deletion src/main/g8/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.6")
Copy link
Contributor

Choose a reason for hiding this comment

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

A merciful and well needed update at the time of creation but
now superseded. I believe the current template uses 0.5.8.

5 changes: 1 addition & 4 deletions src/main/g8/src/main/scala/Main.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
object Main {
def main(args: Array[String]): Unit =
println("Hello, world!")
}
@main def hello = println("Hello world from Scala Native!")
Copy link
Contributor

Choose a reason for hiding this comment

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

I, for one, like this change and would like to see it proceed.

Not an earth shaking changes, but I have "Hello world", of various
flavors, popping into my log files all over the place. Always nice to
know who is speaking, just like radio protocol.

Copy link
Member

Choose a reason for hiding this comment

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

I think there was none lto because it was failing on the Mac. As long as we have a NativeConfig so the user doesn't have to figure out that ceremony I am good.