Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
cca60e5a
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cca60e5a
编写于
5月 10, 2018
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up the checker class
上级
9ca9c322
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
13 deletion
+26
-13
src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs
src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs
+26
-13
未找到文件。
src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs
浏览文件 @
cca60e5a
...
...
@@ -9,6 +9,22 @@
namespace
BuildBoss
{
/// <summary>
/// Verifies the contents of our compiler toolset NuPkg, and related, files are correct.
///
/// The compiler toolset is a particularly difficult package to get correct. In essense it is
/// merging the output of three different exes into a single directory. That causes a number
/// of issues during pack time:
///
/// - The dependencies are not necessarily equal between all exes
/// - The dependencies can change based on subtle changes to the code
/// - There is no project which is guaranteed to have a superset of dependencies
/// - There is no syntax for using the union of DLLs in a NuSpec file
/// - There is no way to use a NuSpec file as input to a SWR file
///
/// The least crazy solution that could be decided on was to manage the list of dependencies
/// by hand in the NuSpec file and then rigorously verify the solution here.
/// </summary>
internal
sealed
class
CompilerNuGetCheckerUtil
:
ICheckerUtil
{
internal
string
ConfigDirectory
{
get
;
}
...
...
@@ -35,10 +51,11 @@ public bool Check(TextWriter textWriter)
}
}
/// <summary>
/// Verify the contents of our desktop targeting compiler packages are correct.
/// </summary>
private
bool
CheckDesktop
(
TextWriter
textWriter
)
{
// TODO: MSBuild task dependencies need to be checked here as well since they are included in
// the same directory
var
(
allGood
,
dllFileNames
)
=
GetDllFileNames
(
textWriter
,
@"Exes\Csc\net46"
,
...
...
@@ -68,25 +85,23 @@ private bool CheckDesktop(TextWriter textWriter)
allGood
&=
VerifySwrFile
(
textWriter
,
dllFileNames
);
var
ignoreExtraDllFileNames
=
new
[]
{
"Microsoft.Build.Tasks.CodeAnalysis.dll"
};
// TODO: Don't hard code the nupkg names
allGood
&=
VerifyNuPackage
(
textWriter
,
FindNuGetPackage
(
@"NuGet\PreRelease"
,
"Microsoft.Net.Compilers"
),
@"tools"
,
dllFileNames
,
ignoreExtraDllFileNames
:
ignoreExtraDllFileNames
);
dllFileNames
);
allGood
&=
VerifyNuPackage
(
textWriter
,
FindNuGetPackage
(
@"DevDivPackages\Roslyn"
,
"VS.Tools.Roslyn"
),
string
.
Empty
,
dllFileNames
,
ignoreExtraDllFileNames
:
ignoreExtraDllFileNames
);
dllFileNames
);
return
allGood
;
}
/// <summary>
/// Verify the contents of our desktop targeting compiler packages are correct.
/// </summary>
private
bool
CheckCoreClr
(
TextWriter
textWriter
)
{
var
(
allGood
,
dllFileNames
)
=
GetDllFileNames
(
...
...
@@ -170,11 +185,9 @@ void recordDependencies(MD5 md5, string directory)
TextWriter
textWriter
,
string
nupkgFilePath
,
string
folderRelativePath
,
IEnumerable
<
string
>
dllFileNames
,
IEnumerable
<
string
>
ignoreExtraDllFileNames
=
null
)
IEnumerable
<
string
>
dllFileNames
)
{
Debug
.
Assert
(
string
.
IsNullOrEmpty
(
folderRelativePath
)
||
folderRelativePath
[
0
]
!=
'\\'
);
ignoreExtraDllFileNames
=
ignoreExtraDllFileNames
??
Array
.
Empty
<
string
>();
// Get all of the DLL parts that are in the specified folder. Will exclude items that
// are in any child folder
...
...
@@ -231,7 +244,7 @@ IEnumerable<string> getPartsInFolder()
map
[
relativeName
]
=
true
;
}
}
else
if
(!
ignoreExtraDllFileNames
.
Contains
(
name
,
StringComparer
.
OrdinalIgnoreCase
))
else
{
textWriter
.
WriteLine
(
$"\tFound unexpected dll
{
relativeName
}
"
);
allGood
=
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录