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

Make Configuration.OutputDirectory public #5228

Closed
wants to merge 5 commits into from

Conversation

live1206
Copy link
Contributor

@live1206 live1206 commented Nov 29, 2024

Azure plugin needs to override InputLibrary, which needs Configuration.OutputDirectory as input.

The actual usage is in Azure/azure-sdk-for-net#47374

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Nov 29, 2024
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

Microsoft.Generator.CSharp

@@ -150,7 +150,7 @@ private static class Options
/// <summary> Gets the namespace for the models. </summary>
public string ModelNamespace { get; }

internal string OutputDirectory { get; }
public string OutputDirectory { get; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the usage, I don't think we need this to be public in order to accomplish the goal of adding an IsAzureArm property to the Azure plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replied Azure/azure-sdk-for-net#47374 (comment)

inputLibrary is virtual, but without Configuration.OutputDirectory available it's impossible for sub-plugin to override it.

public virtual InputLibrary InputLibrary => _inputLibrary.Value;

@live1206
Copy link
Contributor Author

live1206 commented Dec 2, 2024

Offline synced with @JoshLove-msft, we will not introduce the inheritance of InputLibrary until we need to add new functionality of InputLibrary in Azure plugin.

@live1206 live1206 closed this Dec 2, 2024
@live1206 live1206 deleted the extend-inputlibrary branch December 2, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants