Skip to content

Enable implicit framework references#26200

Merged
jaredpar merged 2 commits intodotnet:masterfrom
jaredpar:fix-implicit
Apr 17, 2018
Merged

Enable implicit framework references#26200
jaredpar merged 2 commits intodotnet:masterfrom
jaredpar:fix-implicit

Conversation

@jaredpar
Copy link
Copy Markdown
Member

Implicit framework references were disabled at the time we moved over to
the new SDK due to some remanants of project.json in our build. Those
have all been cleaned up now and hence moving us over to using implicit
framework references.

Not having this enabled meant the API surface we were targeting in our
projects was not actually what was available in the project target
framework. Instead it was the intersection of the target framework and
the set of NuGet packages we reference. This meant that code which
should work simply wasn't due to the API surface not being correct.

Ask Mode template not completed

Customer scenario

What does the customer do to get into this situation, and why do we think this
is common enough to address for this release. (Granted, sometimes this will be
obvious "Open project, VS crashes" but in general, I need to understand how
common a scenario is)

Bugs this fixes

(either VSO or GitHub links)

Workarounds, if any

Also, why we think they are insufficient for RC vs. RC2, RC3, or RTW

Risk

This is generally a measure our how central the affected code is to adjacent
scenarios and thus how likely your fix is to destabilize a broader area of code

Performance impact

(with a brief justification for that assessment (e.g. "Low perf impact because no extra allocations/no complexity changes" vs. "Low")

Is this a regression from a previous update?

Root cause analysis

How did we miss it? What tests are we adding to guard against it in the future?

How was the bug found?

(E.g. customer reported it vs. ad hoc testing)

Test documentation updated?

If this is a new non-compiler feature or a significant improvement to an existing feature, update https://github.com/dotnet/roslyn/wiki/Manual-Testing once you know which release it is targeting.

Implicit framework references were disabled at the time we moved over to
the new SDK due to some remanants of project.json in our build. Those
have all been cleaned up now and hence moving us over to using implicit
framework references.

Not having this enabled meant the API surface we were targeting in our
projects was not actually what was available in the project target
framework. Instead it was the intersection of the target framework and
the set of NuGet packages we reference. This meant that code which
should work simply wasn't due to the API surface not being correct.
@jaredpar jaredpar added this to the 15.8 milestone Apr 17, 2018
@jaredpar jaredpar requested a review from a team April 17, 2018 16:29
@jaredpar jaredpar requested review from a team as code owners April 17, 2018 16:29
@jaredpar
Copy link
Copy Markdown
Member Author

CC @dotnet/roslyn-infrastructure, @tmat for review

</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="$(MicrosoftCSharpVersion)" />
<PackageReference Include="System.Dynamic.Runtime" Version="$(SystemDynamicRuntimeVersion)" />
Copy link
Copy Markdown
Contributor

@sharwell sharwell Apr 17, 2018

Choose a reason for hiding this comment

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

SystemDynamicRuntimeVersion

❓ Can you remove any of these from packages.props?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Eventually yes. I'm trying to get BuildBoss back to the state where it will gripe if you have Packages.props entries that aren't valid. I'm still unwinding the string here though on our core package references though. Have to track @terrajobst down to get some more detail before I can squash the rest of this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There are also other implications like: what if you use the wrong version of Sysetm.Dynamic.Runtime? We are kind of taking it on faith that we're doing it correctly today vs. using the correct versions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Have to track @terrajobst down to get some more detail before I can squash the rest of this.

What concerns do you have around this?

Copy link
Copy Markdown
Member

@tmat tmat left a comment

Choose a reason for hiding this comment

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

:shipit:

@jaredpar jaredpar merged commit 998b5b3 into dotnet:master Apr 17, 2018
@jaredpar jaredpar deleted the fix-implicit branch April 17, 2018 22:51
@jasonmalinowski
Copy link
Copy Markdown
Member

@jaredpar Although I don't object to the change itself, does this open us up to surprises where somebody accidentally depends on a new assembly that we're not deploying to VS? Or does your change to PortableFacades.swr now include the entire set so we're protected?

@jaredpar
Copy link
Copy Markdown
Member Author

Or does your change to PortableFacades.swr now include the entire set so we're protected?

This is the case and bonus is that it's automatic. I didn't make this change, the tooling noticed the diff, updated the file and gave me an error message that it had changed.

In talking with @tmat I'm worried because this tool is using a hueristic vs. firm algorithm. I'm noodling on ways to make this more definitive. But this has always been the case though, it's not a new problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants