Skip to content

Prototype for proposed main method generation scheme #8776

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

Merged
merged 14 commits into from
May 4, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 22, 2020

No description provided.

@odersky odersky force-pushed the add-main-proto branch 2 times, most recently from f22c2a4 to 2295aa4 Compare April 23, 2020 00:01
@Alexey-NM
Copy link

def argGetter[T](argName: String, p: ArgumentParser[T], defaultValue: Option[T] = None): () => T =
      argInfos += ((argName, if defaultValue.isDefined then "?" else ""))

Would it be possible to rename argGetter to 'addArgGetter' or something else. It is not obvious by current name that it works depend on order.

@odersky
Copy link
Contributor Author

odersky commented Apr 23, 2020

nextArgGetter?

@Alexey-NM
Copy link

nextArgGetter

I like it.

* tagged line.
* `body` what comes before the first tagged line
*/
case class DocComment(body: String, tags: Map[String, List[String]])
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. The file here was meant as a demonstrator that it's easy to parse doc comments. Maybe we should make CommentParsing.scala generally available instead. It will be work to document everything properly though since it's a large API.

odersky added 13 commits April 26, 2020 19:54
I first thought there'd be a conflict with the current compiler-generated version,
but there isn't after all.
We forgot the type parameters, which caused from-tasty and pickling tests
to fail. We should probably disallow these forms of aliases and check for
this.
 - Communicate a single fully qualified wrapper method name instead of
   classname/methodname

 - Allow to add an annotation to a wrapper method
Change nomenclature from main methods and commands to entry points and
wrappers, since the scheme is now more general than just main method generation.
This one is subsumed by run/decorators now.
@odersky odersky merged commit 11760ea into scala:master May 4, 2020
@odersky odersky deleted the add-main-proto branch May 4, 2020 15:00
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.

3 participants