-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an option to not strip out PDB symbols from nutget feeds (#689)
- Loading branch information
Showing
11 changed files
with
157 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/NuGetForUnity/Editor/Helper/PortableSymbolFileHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.IO; | ||
|
||
namespace NugetForUnity.Helper | ||
{ | ||
/// <summary> | ||
/// Provides methods for working with symbol files. | ||
/// </summary> | ||
internal static class PortableSymbolFileHelper | ||
{ | ||
/// <summary> | ||
/// Determines whether the specified PDB file is a portable symbol file. | ||
/// </summary> | ||
/// <param name="filePath">The path to the PDB file.</param> | ||
/// <returns> | ||
/// <c>true</c> if the specified PDB file is a portable symbol file; otherwise, <c>false</c>. | ||
/// </returns> | ||
public static bool IsPortableSymbolFile(string filePath) | ||
{ | ||
using (var stream = File.OpenRead(filePath)) | ||
{ | ||
return stream.ReadByte() == 'B' && stream.ReadByte() == 'S' && stream.ReadByte() == 'J' && stream.ReadByte() == 'B'; | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/NuGetForUnity/Editor/Helper/PortableSymbolFileHelper.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -393,10 +393,7 @@ public void DownloadNupkgToFile(INugetPackageIdentifier package, string outputFi | |
} | ||
|
||
#if TEST_GET_UPDATES_FALLBACK | ||
private static void ComparePackageLists( | ||
List<NugetPackage> updates, | ||
List<NugetPackage> updatesReplacement, | ||
string errorMessageToDisplayIfListsDoNotMatch) | ||
private static void ComparePackageLists(List<NugetPackage> updates, List<NugetPackage> updatesReplacement, string errorMessageToDisplayIfListsDoNotMatch) | ||
{ | ||
var matchingComparison = new StringBuilder(); | ||
var missingComparison = new StringBuilder(); | ||
|
@@ -426,12 +423,7 @@ private static void ComparePackageLists( | |
|
||
if (missingComparison.Length > 0 || extraComparison.Length > 0) | ||
{ | ||
Debug.LogWarningFormat( | ||
"{0}\n{1}\n{2}\n{3}", | ||
errorMessageToDisplayIfListsDoNotMatch, | ||
matchingComparison, | ||
missingComparison, | ||
extraComparison); | ||
Debug.LogWarningFormat("{0}\n{1}\n{2}\n{3}", errorMessageToDisplayIfListsDoNotMatch, matchingComparison, missingComparison, extraComparison); | ||
} | ||
} | ||
#endif | ||
|
@@ -528,7 +520,7 @@ private List<INugetPackage> GetUpdatesFallback( | |
return updates; | ||
} | ||
|
||
private void CopyIsManuallyInstalled(List<INugetPackage> newPackages, ICollection<INugetPackage> packagesToUpdate) | ||
private static void CopyIsManuallyInstalled(List<INugetPackage> newPackages, ICollection<INugetPackage> packagesToUpdate) | ||
Check warning on line 523 in src/NuGetForUnity/Editor/PackageSource/NugetPackageSourceV2.cs GitHub Actions / Pack .NET Core Global Tool (CLI) and PluginAPI
Check warning on line 523 in src/NuGetForUnity/Editor/PackageSource/NugetPackageSourceV2.cs GitHub Actions / Pack .NET Core Global Tool (CLI) and PluginAPI
Check warning on line 523 in src/NuGetForUnity/Editor/PackageSource/NugetPackageSourceV2.cs GitHub Actions / Pack .NET Core Global Tool (CLI) and PluginAPI
|
||
{ | ||
foreach (var newPackage in newPackages) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters