Skip to content

Lock down public surface - #950

Merged
nguerrera merged 5 commits into
masterfrom
internalize
Mar 9, 2017
Merged

nguerrera merged 5 commits into
masterfrom
internalize

Conversation

@nguerrera

@nguerrera nguerrera commented Mar 7, 2017 •

Copy link
Copy Markdown
Contributor

Fix #55 - We now public-sign on non-Windows builds instead of leaving assemblies unsigned there
Fix #656 - Limit public surface to Tasks and use InternalsVisibleTo(tests) for other things that were public only for test purposes and being blocked by #55

Also, get rid of the #if PRODUCT and special handling of CacheArtifactParser.cs. I had intended to make this go through IVTA too, but then found that this level of tests do not reference the build tasks, but merely execute them via msbuild, and I didn't want to break that layering. I just wrote the trivial parsing from scratch in to the test using an XLinq query. This is intentionally different from the product code. If the format changes, the tests will break, but I consider that a feature.

@eerhardt @ramarag @333fred @dsplaisted

@nguerrera nguerrera changed the title [WIP] InternalsVisibleTo tests Lock down public surface Mar 8, 2017
@eerhardt

eerhardt commented Mar 8, 2017

Copy link
Copy Markdown
Member
    public ProduceContentAssets()

What do you think about moving this out of the "Test Support" region?


Refers to: src/Tasks/Microsoft.NET.Build.Tasks/ProduceContentAssets.cs:104 in 6a32ae6. [](commit_id = 6a32ae6, deletion_comment = False)

@eerhardt

eerhardt commented Mar 8, 2017

Copy link
Copy Markdown
Member
    public ResolvePackageDependencies()

Same question about moving this out of the "Test support" region.


Refers to: src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs:119 in 6a32ae6. [](commit_id = 6a32ae6, deletion_comment = False)

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for doing this! This has been annoying for quite a while.

@ramarag
ramarag self-requested a review March 8, 2017 22:43
@nguerrera

nguerrera commented Mar 8, 2017 •

Copy link
Copy Markdown
Contributor Author

@eerhardt Moved the public ctors out in 5fbf662. (I dislike regions, but that's a battle for another day.)

@eerhardt

eerhardt commented Mar 8, 2017

Copy link
Copy Markdown
Member

I dislike regions

agreed!

@nguerrera

Copy link
Copy Markdown
Contributor Author

@livarcocc

<!-- Non-shipping binaries are simply signed with the Roslyn internal key. -->
<Otherwise>
<PropertyGroup>
<!-- Public sign on non-Windows as full signing isn't currently supported (https://github.com/dotnet/roslyn/issues/8210) -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this is necessary; this should already be true on non-Windows.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since the <SignAssembly Condition="'$(OS)'=='Windows_NT'">true</SignAssembly> conditional set was removed.

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.

We only set public-sign/delay-sign for non-shipping != true. Here we assume since we're using the internal key we can just full sign, but we can't.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, got it. 👍

@333fred 333fred left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Signing stuff looks good

@nguerrera
nguerrera merged commit 2c5dd65 into master Mar 9, 2017
@nguerrera
nguerrera deleted the internalize branch March 9, 2017 04:38
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.

6 participants