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 ReferenceOutputAssembly="false" to language server dlls we don't ship #70195

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

allisonchou
Copy link
Contributor

Follow up PR per Sam's comment in #70176 (comment):

This needs ReferenceOutputAssembly="false" added for compile-time enforcement of the "not directly referenced" condition

@allisonchou allisonchou requested a review from a team as a code owner September 29, 2023 22:48
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 29, 2023
@allisonchou allisonchou enabled auto-merge (squash) September 29, 2023 23:10
Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

Definitely do a dotnet pack locally of the Language Server and verify that the binaries are still contained in the package as expected. I don't expect problems, but we've seen issues here before.

@allisonchou
Copy link
Contributor Author

@jasonmalinowski thanks for the tip. I did a pack and verified that the binaries are contained in the package 👍

@@ -57,7 +57,7 @@
<ProjectReference Include="..\Protocol\Microsoft.CodeAnalysis.LanguageServer.Protocol.csproj" />

<!-- Dlls we don't directly reference but need to include to build the MEF composition -->
<ProjectReference Include="..\..\CSharp\Portable\Microsoft.CodeAnalysis.CSharp.Features.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\CSharp\Portable\Microsoft.CodeAnalysis.CSharp.Features.csproj" />
Copy link
Member

Choose a reason for hiding this comment

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

📝 If we omit ReferenceOutputAssembly="false", the comment needs to be updated. Currently there is a mismatch.

Copy link
Member

Choose a reason for hiding this comment

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

I lean towards keeping the exclusion which allows us to make a conscious decision later if we think need to add references in code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I lean towards keeping the exclusion which allows us to make a conscious decision later if we think need to add references in code.

That's a good point - I've added that line back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants