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

Split up Main.scala into Main.scala/MainRunner.scala/AmmoniteMain.scala #1229

merged 3 commits into from
Nov 30, 2021


Copy link

@lihaoyi lihaoyi commented Nov 29, 2021

This should help make things easier to find.

The dependency order is AmmoniteMain.scala depends on MainRunner.scala depends on Main.scala

The new main method is in ammonite.AmmoniteMain. This was chosen to help improve the UX of tools like jps which only list the classname and not the package path as part of its output. Previously it would just show a mysterious Main JVM process running, with this change it'll show AmmoniteMain which is a lot more useful.

A few minor helper functions needed to be moved around to preserve acyclicity of the three files, I moved them all to ammonite.util

* The command-line entry point, which does all the argument parsing before
* delegating to [[]]
def main(args0: Array[String]): Unit = {
Copy link

@lefou lefou Dec 10, 2021

Choose a reason for hiding this comment

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

Is it possible, to keep a @deprecated forwarder to the moved main here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants