Skip to content

made ICompilerSettings and CSharpCodeProvider ctor public#55

Merged
Jinhuafei merged 2 commits intoaspnet:masterfrom
MyUNiDAYS:make-internals-accessible
Jul 13, 2018
Merged

made ICompilerSettings and CSharpCodeProvider ctor public#55
Jinhuafei merged 2 commits intoaspnet:masterfrom
MyUNiDAYS:make-internals-accessible

Conversation

@trullock
Copy link
Copy Markdown
Contributor

@trullock trullock commented Jul 3, 2018

Its unclear why CompilationSettings doesn't allow falling back to the tooling installed on the dev environment, or to use a csc compiler from a different location that whats shipped with this assembly.

By making the ICompilerSettings interface public this becomes trivial.

I don't see any reason for this to be internal

@msftclas
Copy link
Copy Markdown

msftclas commented Jul 3, 2018

CLA assistant check
All CLA requirements met.

@Jinhuafei
Copy link
Copy Markdown
Contributor

@trullock The original goal for this package is to enable asp.net to leverage Roslyn compilers for dynamical compilation. In that context, it doesn't make sense to expose the non-default-constructor, since asp.net only uses default constructor.
Now I saw more and more developers using this package in non-web apps, it makes sense to expose that constructor.


namespace Microsoft.CodeDom.Providers.DotNetCompilerPlatform {
internal interface ICompilerSettings {
public interface ICompilerSettings {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please add some comments?


// Constructor used for unit test purpose
internal CSharpCodeProvider(ICompilerSettings compilerSettings = null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please also update VBCodeProvider?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks. :)

@Jinhuafei Jinhuafei requested a review from HongGit July 9, 2018 19:05
@Jinhuafei Jinhuafei self-assigned this Jul 9, 2018
@Jinhuafei Jinhuafei merged commit fbd1ca3 into aspnet:master Jul 13, 2018
@trullock
Copy link
Copy Markdown
Contributor Author

Excellent. Can we get a 2.0.1 nuget of this soon?

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