Repository navigation
Add support for single method compilation mode - #1516
Conversation
Add a set of command line arguments that let us specify a single method to compile. This is useful when investigating code generation issue to help narrow down the focus and make it easier to set up breakpoints. Fixes dotnet#1142.
|
@nattress PTAL |
| return null; | ||
|
|
||
| if (_singleMethodName == null || _singleMethodTypeName == null) | ||
| throw new CommandLineException("Both method name and type name are required parameters for single method mode"); |
There was a problem hiding this comment.
It would be nice to parse the type / method name as a single string instead of a collection of pieces and if a method fails to compile, write out the name in the same parseable format a la Nutc
Edit: We could bring over TypeNameUtilities to make parsing easier, though we'd have to switch out CCI and replace with the common type system.
There was a problem hiding this comment.
NUTC has -singlemethodbyname TypeName MethodName where TypeName is in the ECMA-335 SerString format and method name is just the method name, followed by a bunch of -singleMethodGenericParam Param.
This is the exact same thing, except we need to split -singlemethodbyname TypeName MethodName because System.CommandLine can't do a switch with two arguments.
There was a problem hiding this comment.
Nit: We should be consistent on whether we use braces for single statement inside ifs / loops. This one has no braces but the throw in FindType above does.
|
LGTM! |
The pattern here is no braces.
Add a set of command line arguments that let us specify a single method
to compile. This is useful when investigating code generation issues to
help narrow down the focus and make it easier to set up breakpoints.
Fixes #1142.