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

Add GeneratedFilesOutputDirectory to Solution APIs #75389

Open
tmat opened this issue Oct 4, 2024 · 1 comment
Open

Add GeneratedFilesOutputDirectory to Solution APIs #75389

tmat opened this issue Oct 4, 2024 · 1 comment
Assignees
Labels
api-approved API was approved in API review, it can be implemented Area-IDE blocking API needs to reviewed with priority to unblock work Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature Request
Milestone

Comments

@tmat
Copy link
Member

tmat commented Oct 4, 2024

Background and Motivation

Add APIs to the Project and Solution that expose the value of CompilerGeneratedFilesOutputPath msbuild property from the solution snapshot.

See #75387

Proposed API

public readonly struct CompilationOutputInfo
{
    public string? AssemblyPath { get; }

+   public string? GeneratedFilesOutputDirectory { get; }
+   public CompilationOutputInfo WithGeneratedFilesOutputDirectory(string? path);
}

Usage Examples

Alternative Designs

namespace Microsoft.CodeAnalysis;

public class Project
{
+    /// <summary>
+    /// The path to the root directory of source generated files, or null if it is not known.
+    /// </summary>
+    public string? GeneratedFilesOutputDirectory { get; }
}

public class ProjectInfo
{
+    public string? GeneratedFilesOutputDirectory;
+    public ProjectInfo WithGeneratedFilesOutputDirectory(string? path);
}

public class Solution
{
+    public Solution WithProjectGeneratedFilesOutputDirectory(ProjectId projectId, string? path);
}

public class Workspace
{
+    protected internal void OnGeneratedFilesOutputDirectoryChanged(ProjectId projectId, string? outputFilePath);
}

Risks

@tmat tmat added Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature Request labels Oct 4, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 4, 2024
@tmat tmat added api-ready-for-review API is ready for review, it is NOT ready for implementation blocking API needs to reviewed with priority to unblock work labels Oct 4, 2024
@333fred
Copy link
Member

333fred commented Oct 10, 2024

API Review

  • This reflects the compiler generated files path and comes from the project system, not the compiler

Conclusion: API is approved

@333fred 333fred added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for review, it is NOT ready for implementation labels Oct 10, 2024
@arunchndr arunchndr removed the untriaged Issues and PRs which have not yet been triaged by a lead label Nov 6, 2024
@arunchndr arunchndr added this to the 18.0 milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-approved API was approved in API review, it can be implemented Area-IDE blocking API needs to reviewed with priority to unblock work Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants