-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Enable source link support #5905
Changes from 15 commits
d8f6851
abf7706
8959470
81def18
44c6c39
2f0d7f5
7932d36
e7ebe8d
82e2700
a68cd9c
a149254
16db33d
716d230
8bbb85c
162973c
b4ca952
1250201
fb2c363
7e71c09
fbcf10f
dc6ea1d
f1d58d2
c4d5a2d
b555bb8
127e96b
cfa9ed0
38159ef
3648108
6950190
261698a
d4ac19b
cd4451c
8d888a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
init: | ||
- git config --global core.autocrlf true | ||
- git config --global core.autocrlf input | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is used only on Windows. Why is this change required? Will we need to change the configuration of other (non-AppVeyor) CI builds? (We don't use AppVeyor for official builds.) If Windows users can't use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dougbu I am fully aware of Windows developer resistance if you try to get rid of their carriage return. 😅 That is why adding SourceLink to your project doesn't change your local development at all. SourceLink only runs on the CI builds. This is documented in the readme at the end of this section. The next section about dotnet-sourcelink-git explains the line endings and then there is a dedicated wiki page on line endings. You need to not change the line ending on the build server to enable source linking. This only affects Windows CI builds. What are you using for the official builds? Team City? Do you control the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, we use TeamCity. AppVeyor builds are just for PR verification. We don't control the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I searched around a bit and found this:
https://confluence.jetbrains.com/display/TCD9/Git So a solution is to create a build configuration with:
Do you think that may work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, the autofix built into SourceLink only bumps the build time from 19 minutes to 20 minutes on AppVeyor. Not bad and may be acceptable instead of dealing with this build configuration stuff. Setting |
||
branches: | ||
only: | ||
- master | ||
|
@@ -12,3 +12,5 @@ clone_depth: 1 | |
test: off | ||
deploy: off | ||
os: Visual Studio 2017 RC | ||
artifacts: | ||
- path: artifacts\build\*.nupkg |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<DebugType>embedded</DebugType> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="SourceLink.Create.GitHub" Version="2.0.0" PrivateAssets="all" /> | ||
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.0.0" /> | ||
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<Import Project="..\..\build\common.props" /> | ||
<Import Project="..\..\build\sourcelink.props" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're not doing this in KoreBuild, shouldn't this be in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably. I don't know how to do that. Do you have the code or an example that might work? I can try it. It would really simplify this pull request. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haven't played with it. But, I'd start with <ItemGroup>
<OtherProjectsToPack Include="@(ProjectsToPack)" Exclude="$(ProjectName)" />
</ItemGroup>
<Import Project="..\..\build\sourcelink.props" Condition=" @(OtherProjectsToPack) != @(ProjectsToPack) "/> Of course, the path to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note the above will likely mean projects get source links only when built from the solution level. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried the above and got an error about metadata not being allowed in the position. I got a similar error when I tried: <Import Project="..\sourcelink.props" Condition="'%(ProjectsToPack)' == '$(MSBuildProjectFullPath)'" /> Programming in xml is so efficient. 🐌 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still haven't tried it but <Import Project="..\..\build\sourcelink.props" Condition=" '@(OtherProjectsToPack)' != '@(ProjectsToPack)' "/> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tried: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dougbu I'm not worried about how to integrate this right now, because per my earlier comment, this is at least 2 - 3 weeks out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. |
||
|
||
<PropertyGroup> | ||
<Description>ASP.NET Core MVC abstractions and interfaces for action invocation and dispatching, authorization, action filters, formatters, model binding, routing, validation, and more. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ public async Task CanRender_ViewComponentWithArgumentsFromController() | |
#if GENERATE_BASELINES | ||
ResourceFile.UpdateFile(_resourcesAssembly, outputFile, expectedContent, responseContent); | ||
#else | ||
Assert.Equal(expectedContent, responseContent, ignoreLineEndingDifferences: true); | ||
Assert.Equal(expectedContent.Trim(), responseContent, ignoreLineEndingDifferences: true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Odd that both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, but it was to make the test pass. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For a little while, some developers weren't aware of Bottom line, we should figure out why
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed bug #5907. |
||
#endif | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ public TagHelpersTest( | |
[InlineData("About")] | ||
[InlineData("Help")] | ||
[InlineData("UnboundDynamicAttributes")] | ||
[InlineData("ViewComponentTagHelpers")] | ||
// [InlineData("ViewComponentTagHelpers")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only test I couldn't get to pass on Windows when the file is |
||
public async Task CanRenderViewsWithTagHelpers(string action) | ||
{ | ||
// Arrange | ||
|
@@ -59,7 +59,7 @@ public async Task CanRenderViewsWithTagHelpers(string action) | |
#if GENERATE_BASELINES | ||
ResourceFile.UpdateFile(_resourcesAssembly, outputFile, expectedContent, responseContent); | ||
#else | ||
Assert.Equal(expectedContent, responseContent, ignoreLineEndingDifferences: true); | ||
Assert.Equal(expectedContent.Trim(), responseContent.Trim(), ignoreLineEndingDifferences: true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also weird. |
||
#endif | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change merged in from #5906 which appears to fix the Travis CI build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah Travis has limits on how much log output it'll take... and MVC's build produces waaaaaay too much output 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mvc is feeling a bit defensive here 😺. It's
msbuild
and the problem (dotnet/msbuild#1792) doesn't just affect Mvc.tee
ing is a viable workaround. But, we shouldn't check this in to a single .travis.yml file. My aspnet/KoreBuild#192 will do this everywhere. Yeah, kind-of like @Eilon suggested we might want to enable source link support.