Skip to content

Multitarget packages to remove dependencies for source build #12936

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

Merged
merged 4 commits into from
Aug 10, 2019

Conversation

JunTaoLuo
Copy link
Contributor

A followup to dotnet/extensions#2090. WIP

@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Aug 7, 2019
@JunTaoLuo JunTaoLuo added the tell-mode Indicates a PR which is being merged during tell-mode label Aug 8, 2019
@JunTaoLuo JunTaoLuo marked this pull request as ready for review August 8, 2019 20:22
@SteveSandersonMS
Copy link
Member

We're about to factor most of those dependencies out of Microsoft.AspNetCore.Components, so would it be OK to leave that project unchanged for now? This refactoring will happen over the next few working days.

@JunTaoLuo
Copy link
Contributor Author

@SteveSandersonMS good to know. Will revert those changes.

@JunTaoLuo
Copy link
Contributor Author

cc @HaoK for DataProtection, Identity
cc @Tratcher for Http, Server, Security
cc @BrennanConroy @mikaelm12 for SignalR

@@ -3,6 +3,7 @@
<PropertyGroup>
<Description>Common serialiation primitives for SignalR Clients Servers</Description>
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.0</TargetFrameworks>
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to make this a more generic thing in https://github.com/aspnet/AspNetCore/tree/master/eng/targets so we don't pollute all our .csproj's?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea maybe probably

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented Aug 8, 2019

Is the multitargeting going to increase local build times substantially? Looking at this naively it seems that a build is going to do significantly more work.

Ah, maybe you are mitigating this by hiding the multitargeting behind Condition="'$(DotNetBuildFromSource)' == 'true'. Is that right?

@JunTaoLuo
Copy link
Contributor Author

@SteveSandersonMS I don't see any significant build time increase on the CI. Do you have particular concerns (or numbers) for build time increases, maybe in a particular project?

@dougbu
Copy link
Contributor

dougbu commented Aug 8, 2019

factor most of those dependencies out of Microsoft.AspNetCore.Components

@SteveSandersonMS are the dependencies moving somewhere else?

@SteveSandersonMS
Copy link
Member

I’m concerned about the dev inner loop time. If you edit code inside a project A that is a deep dependency of B, then build B inside VS, does it now build A (and intermediate dependencies) multiple times, once for each target framework?

@JunTaoLuo JunTaoLuo force-pushed the johluo/multitarget branch from a4ce65b to e6571c9 Compare August 9, 2019 18:47
@JunTaoLuo
Copy link
Contributor Author

@SteveSandersonMS I tried factoring out the components changes but it turns out I'll need to disable source build for a ton of projects (Components, Mvc, SharedFx) to do so. I see your PR in https://github.com/aspnet/AspNetCore/pull/12999/files and don't think it'll be too difficult to rebase changes on top of this one. I need to get this change in since it will soon start blocking the dependency flow from Extensions => ... => AspNetCore in the 3.0 branch.

As for the inner loop performance, I think that's something we can address separately since I'm not sure if the build time increase would be noticeable in practice.

@JunTaoLuo JunTaoLuo force-pushed the johluo/multitarget branch from e6571c9 to a51c223 Compare August 9, 2019 22:58
@JunTaoLuo JunTaoLuo merged commit 88a3a74 into release/3.0 Aug 10, 2019
@ghost ghost deleted the johluo/multitarget branch August 10, 2019 02:25
@JunTaoLuo
Copy link
Contributor Author

Will file issues to follow up some of the feedback brought up here.

JunTaoLuo pushed a commit that referenced this pull request Aug 10, 2019
JunTaoLuo pushed a commit that referenced this pull request Aug 12, 2019
* Add empty Authorization src and test projects

* Add references

* Move auth types into .Authorization project

* Move auth tests

* Fix Mvc.ViewFeatures

* Remove the reference from .Web to .Authorization, so it's truly optional

* Add empty Forms src and test projects

* Remove dependencies from Components.csproj

* Move forms sources and tests

* Reference .Forms from .Web (needed unless we also have .Forms.Web)

* Rebase on #12936

* Update reference assemblies

* CR: Add Authorization namespace

* Update ref sources

* Add missing using

* Add another missing using
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants