Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
412caa97
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,发现更多精彩内容 >>
提交
412caa97
编写于
4月 24, 2017
作者:
B
BattleRush
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code review changes
上级
2b433bec
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
55 addition
and
29 deletion
+55
-29
src/Compilers/CSharp/Portable/CSharpResources.Designer.cs
src/Compilers/CSharp/Portable/CSharpResources.Designer.cs
+9
-0
src/Compilers/CSharp/Portable/CSharpResources.resx
src/Compilers/CSharp/Portable/CSharpResources.resx
+3
-0
src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
+2
-1
src/Compilers/CSharp/Portable/Errors/MessageProvider.cs
src/Compilers/CSharp/Portable/Errors/MessageProvider.cs
+1
-0
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
...rp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
+1
-7
src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
...Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
+0
-9
src/Compilers/Core/Portable/CodeAnalysisResources.resx
src/Compilers/Core/Portable/CodeAnalysisResources.resx
+0
-3
src/Compilers/Core/Portable/Diagnostic/CommonMessageProvider.cs
...mpilers/Core/Portable/Diagnostic/CommonMessageProvider.cs
+1
-0
src/Compilers/Core/Portable/Emit/EditAndContinue/DefinitionMap.cs
...ilers/Core/Portable/Emit/EditAndContinue/DefinitionMap.cs
+4
-8
src/Compilers/VisualBasic/Portable/Errors/Errors.vb
src/Compilers/VisualBasic/Portable/Errors/Errors.vb
+1
-0
src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb
src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb
+6
-0
src/Compilers/VisualBasic/Portable/VBResources.Designer.vb
src/Compilers/VisualBasic/Portable/VBResources.Designer.vb
+9
-0
src/Compilers/VisualBasic/Portable/VBResources.resx
src/Compilers/VisualBasic/Portable/VBResources.resx
+4
-0
src/Test/Utilities/Portable/Mocks/TestMessageProvider.cs
src/Test/Utilities/Portable/Mocks/TestMessageProvider.cs
+8
-0
src/Workspaces/Core/Portable/Shared/Utilities/DocumentationComment.cs
...es/Core/Portable/Shared/Utilities/DocumentationComment.cs
+6
-1
未找到文件。
src/Compilers/CSharp/Portable/CSharpResources.Designer.cs
浏览文件 @
412caa97
...
...
@@ -5560,6 +5560,15 @@ internal class CSharpResources {
}
}
/// <summary>
/// Looks up a localized string similar to Unable to read debug information of method '{0}' (token 0x{1}) from assembly '{2}'.
/// </summary>
internal static string ERR_InvalidDebugInfo {
get {
return ResourceManager.GetString("ERR_InvalidDebugInfo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Invalid debug information format: {0}.
/// </summary>
...
...
src/Compilers/CSharp/Portable/CSharpResources.resx
浏览文件 @
412caa97
...
...
@@ -5076,4 +5076,7 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data
name=
"ERR_LocalFunctionMissingBody"
xml:space=
"preserve"
>
<value>
'{0}' is a local function and must therefore always have a body.
</value>
</data>
<data
name=
"ERR_InvalidDebugInfo"
xml:space=
"preserve"
>
<value>
Unable to read debug information of method '{0}' (token 0x{1}) from assembly '{2}'
</value>
</data>
</root>
\ No newline at end of file
src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
浏览文件 @
412caa97
...
...
@@ -1240,6 +1240,7 @@ internal enum ErrorCode
ERR_InvalidAssemblyCulture
=
7100
,
ERR_EncReferenceToAddedMember
=
7101
,
ERR_MutuallyExclusiveOptions
=
7102
,
ERR_InvalidDebugInfo
=
7103
,
#
endregion
diagnostics
introduced
in
C
#
6
// huge gap here; unused 7103-8000
...
...
@@ -1343,7 +1344,7 @@ internal enum ErrorCode
#
region
diagnostics
for
local
functions
introduced
in
C
#
7
ERR_DynamicLocalFunctionParamsParameter
=
8108
,
ERR_ExpressionTreeContainsLocalFunction
=
8110
,
ERR_LocalFunctionMissingBody
=
8111
,
//https://github.com/dotnet/roslyn/issues/14900
ERR_LocalFunctionMissingBody
=
8111
,
#
endregion
diagnostics
for
local
functions
introduced
in
C
#
7
#
region
diagnostics
for
instrumentation
...
...
src/Compilers/CSharp/Portable/Errors/MessageProvider.cs
浏览文件 @
412caa97
...
...
@@ -218,6 +218,7 @@ public override void ReportDuplicateMetadataReferenceWeak(DiagnosticBag diagnost
public
override
int
ERR_PeWritingFailure
=>
(
int
)
ErrorCode
.
ERR_PeWritingFailure
;
public
override
int
ERR_ModuleEmitFailure
=>
(
int
)
ErrorCode
.
ERR_ModuleEmitFailure
;
public
override
int
ERR_EncUpdateFailedMissingAttribute
=>
(
int
)
ErrorCode
.
ERR_EncUpdateFailedMissingAttribute
;
public
override
int
ERR_InvalidDebugInfo
=>
(
int
)
ErrorCode
.
ERR_InvalidDebugInfo
;
public
override
void
ReportInvalidAttributeArgument
(
DiagnosticBag
diagnostics
,
SyntaxNode
attributeSyntax
,
int
parameterIndex
,
AttributeData
attribute
)
{
...
...
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
浏览文件 @
412caa97
...
...
@@ -7133,15 +7133,9 @@ static void F()
generation0
,
ImmutableArray
.
Create
(
new
SemanticEdit
(
SemanticEditKind
.
Update
,
f0
,
f1
,
GetSyntaxMapFromMarkers
(
source0
,
source1
),
preserveLocalVariables
:
true
)));
// TODO: better error code https://github.com/dotnet/roslyn/issues/11512
string
expectedMessage
=
string
.
Format
(
CodeAnalysisResources
.
UnableToReadDebugInfo
,
"C.F()"
,
"06000001"
,
"PdbReadingErrorsAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
);
diff1
.
EmitResult
.
Diagnostics
.
Verify
(
// (6,14): error CS7038: Failed to emit module 'Unable to read debug information of method 'C.F()' (token 0x06000001) from assembly 'PdbReadingErrorsAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null''.
Diagnostic
(
ErrorCode
.
ERR_
ModuleEmitFailure
,
"F"
).
WithArguments
(
expectedMessage
).
WithLocation
(
6
,
14
));
Diagnostic
(
ErrorCode
.
ERR_
InvalidDebugInfo
,
"F"
).
WithArguments
(
"C.F()"
,
"06000001"
,
"PdbReadingErrorsAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
).
WithLocation
(
6
,
14
));
}
[
Fact
]
...
...
src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
浏览文件 @
412caa97
...
...
@@ -1441,15 +1441,6 @@ internal class CodeAnalysisResources {
}
}
/// <summary>
/// Looks up a localized string similar to Unable to read debug information of method '{0}' (token 0x{1}) from assembly '{2}'.
/// </summary>
internal
static
string
UnableToReadDebugInfo
{
get
{
return
ResourceManager
.
GetString
(
"UnableToReadDebugInfo"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to A node in the list is not of the expected type..
/// </summary>
...
...
src/Compilers/Core/Portable/CodeAnalysisResources.resx
浏览文件 @
412caa97
...
...
@@ -594,9 +594,6 @@
<data
name=
"Stream_contains_invalid_data"
xml:space=
"preserve"
>
<value>
Stream contains invalid data
</value>
</data>
<data
name=
"UnableToReadDebugInfo"
xml:space=
"preserve"
>
<value>
Unable to read debug information of method '{0}' (token 0x{1}) from assembly '{2}'
</value>
</data>
<data
name=
"CannotCallWhenQueueIsCompleted"
xml:space=
"preserve"
>
<value>
Cannot call {0} when the queue is already completed.
</value>
</data>
...
...
src/Compilers/Core/Portable/Diagnostic/CommonMessageProvider.cs
浏览文件 @
412caa97
...
...
@@ -220,6 +220,7 @@ public DiagnosticInfo FilterDiagnosticInfo(DiagnosticInfo diagnosticInfo, Compil
public
abstract
int
ERR_PeWritingFailure
{
get
;
}
public
abstract
int
ERR_ModuleEmitFailure
{
get
;
}
public
abstract
int
ERR_EncUpdateFailedMissingAttribute
{
get
;
}
public
abstract
int
ERR_InvalidDebugInfo
{
get
;
}
/// <summary>
/// Takes an exception produced while writing to a file stream and produces a diagnostic.
...
...
src/Compilers/Core/Portable/Emit/EditAndContinue/DefinitionMap.cs
浏览文件 @
412caa97
...
...
@@ -233,16 +233,12 @@ internal VariableSlotAllocator TryCreateVariableSlotAllocator(EmitBaseline basel
}
catch
(
InvalidDataException
)
{
string
message
=
string
.
Format
(
CodeAnalysisResources
.
UnableToReadDebugInfo
,
MessageProvider
.
GetErrorDisplayString
(
method
),
MetadataTokens
.
GetToken
(
previousHandle
).
ToString
(
"X8"
),
MessageProvider
.
GetErrorDisplayString
(
method
.
ContainingAssembly
));
//TODO: use better error code (https://github.com/dotnet/roslyn/issues/11512)
diagnostics
.
Add
(
MessageProvider
.
CreateDiagnostic
(
MessageProvider
.
ERR_
ModuleEmitFailure
,
MessageProvider
.
ERR_
InvalidDebugInfo
,
method
.
Locations
.
First
(),
message
MessageProvider
.
GetErrorDisplayString
(
method
),
MetadataTokens
.
GetToken
(
previousHandle
).
ToString
(
"X8"
),
MessageProvider
.
GetErrorDisplayString
(
method
.
ContainingAssembly
)
));
return
null
;
...
...
src/Compilers/VisualBasic/Portable/Errors/Errors.vb
浏览文件 @
412caa97
...
...
@@ -1731,6 +1731,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
ERR_BadLanguageVersion
=
37287
ERR_InvalidPreprocessorConstantType
=
37288
ERR_TupleInferredNamesNotAvailable
=
37289
ERR_InvalidDebugInfo
=
37290
'// WARNINGS BEGIN HERE
WRN_UseOfObsoleteSymbol2
=
40000
...
...
src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb
浏览文件 @
412caa97
...
...
@@ -545,6 +545,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return
ERRID
.
ERR_BadAssemblyName
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ERR_InvalidDebugInfo
As
Integer
Get
Return
ERRID
.
ERR_InvalidDebugInfo
End
Get
End
Property
End
Class
End
Namespace
src/Compilers/VisualBasic/Portable/VBResources.Designer.vb
浏览文件 @
412caa97
...
...
@@ -5918,6 +5918,15 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to read debug information of method '{0}' (token 0x{1}) from assembly '{2}'.
'''</summary>
Friend ReadOnly Property ERR_InvalidDebugInfo() As String
Get
Return ResourceManager.GetString("ERR_InvalidDebugInfo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid debug information format: {0}.
'''</summary>
...
...
src/Compilers/VisualBasic/Portable/VBResources.resx
浏览文件 @
412caa97
...
...
@@ -5484,4 +5484,8 @@
<data
name=
"WRN_Experimental_Title"
xml:space=
"preserve"
>
<value>
Type is for evaluation purposes only and is subject to change or removal in future updates.
</value>
</data>
<data
name=
"ERR_InvalidDebugInfo"
xml:space=
"preserve"
>
<value>
Unable to read debug information of method '{0}' (token 0x{1}) from assembly '{2}'
</value>
</data>
</root>
src/Test/Utilities/Portable/Mocks/TestMessageProvider.cs
浏览文件 @
412caa97
...
...
@@ -441,5 +441,13 @@ public override int ERR_BadDocumentationMode
throw
new
NotImplementedException
();
}
}
public
override
int
ERR_InvalidDebugInfo
{
get
{
throw
new
NotImplementedException
();
}
}
}
}
src/Workspaces/Core/Portable/Shared/Utilities/DocumentationComment.cs
浏览文件 @
412caa97
...
...
@@ -65,6 +65,11 @@ internal sealed class DocumentationComment
/// </summary>
public
string
CompletionListCref
{
get
;
private
set
;
}
/// <summary>
/// Used for TrimEachLine(string text) method, to prevent new allocation of string
/// </summary>
private
static
string
NewLineString
=
Environment
.
NewLine
;
private
DocumentationComment
()
{
ParameterNames
=
ImmutableArray
<
string
>.
Empty
;
...
...
@@ -157,7 +162,7 @@ private static void ParseCallback(XmlReader reader, CommentBuilder builder)
private
string
TrimEachLine
(
string
text
)
{
return
string
.
Join
(
Environment
.
NewLine
,
text
.
Split
(
new
string
[]
{
Environment
.
NewLine
},
StringSplitOptions
.
RemoveEmptyEntries
).
Select
(
i
=>
i
.
Trim
()));
return
string
.
Join
(
NewLineString
,
text
.
Split
(
new
string
[]
{
NewLineString
},
StringSplitOptions
.
RemoveEmptyEntries
).
Select
(
i
=>
i
.
Trim
()));
}
private
void
ParseCallback
(
XmlReader
reader
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录