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 support for source-build #620

Merged
merged 5 commits into from
May 29, 2019
Merged

Add support for source-build #620

merged 5 commits into from
May 29, 2019

Conversation

natemcmaster
Copy link
Contributor

Resolves dotnet/aspnetcore#7282

Changes:

  • ⚠️ Update build.sh/cmd to follow the same pattern used of other aspnet repos. To run tests, use build.cmd -test. We don't run tests in source-build, so this needs to be disabled.
  • Add a test PR check that attempts to imitate the source-build environment
  • Exclude the following from building during source-build
    • everything under src/Razor/test/
    • VSIX projects
    • MPack projects
    • non-shipping, internal tools like dotnet-razorpagegenerator
  • Minor cleanup - use rolling builds to batch jobs in azure-pipelines.yml

cc @dseefeld @crummel

Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

I'm mainly questioning the need for the ⚠️ change

.editorconfig Show resolved Hide resolved
Directory.Build.props Outdated Show resolved Hide resolved
azure-pipelines.yml Show resolved Hide resolved
build.cmd Show resolved Hide resolved
eng/configure-toolset.sh Outdated Show resolved Hide resolved
@@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests

</Target>

<Target Name="RestoreTestProjects" BeforeTargets="Restore;Build">
<Target Name="RestoreTestProjects" BeforeTargets="Restore;Build" Condition="'$(DotNetBuildFromSource)' != 'true'">
Copy link
Member

Choose a reason for hiding this comment

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

This is a test project. Why is it restoring or building at all when '$(DotNetBuildFromSource)' == 'true'?

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 don't really understand why this project exists at all either when the projects could just be restored normally. It causes a double restore. @pranavkm

This change is necessary because the "Build" target still runs on all projects in a source build, but with dummy targets that are overrriden to no-op if ExcludeFromSourceBuild is true. See https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Arcade.Sdk/tools/Empty.targets. Because this project file is using "BeforeTargets" to chain in, it too needs the exclusion to avoid restoring projects that are supposed to be ignored in a source build.

Copy link
Contributor

Choose a reason for hiding this comment

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

when the projects could just be restored normally

Just a regular project reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or added to the .sln file.

Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Seems fine, especially because it's building 😺 My un-resolved suggestions stand (but they're suggestions).

@natemcmaster natemcmaster merged commit 986c224 into master May 29, 2019
@natemcmaster natemcmaster deleted the namc/source-build branch June 7, 2019 01:18
JunTaoLuo pushed a commit to dotnet/aspnetcore that referenced this pull request May 17, 2020
JunTaoLuo pushed a commit to dotnet/aspnetcore that referenced this pull request May 27, 2020
dougbu pushed a commit to dougbu/razor-compiler that referenced this pull request Nov 17, 2021
dougbu pushed a commit to dougbu/razor-compiler that referenced this pull request Nov 17, 2021
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.

Add aspnet/AspNetCore-Tooling to source build
5 participants