Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
cccdfb1d
F
fsharp
项目概览
dotNET Platform
/
fsharp
10 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cccdfb1d
编写于
5月 19, 2022
作者:
D
Don Syme
提交者:
GitHub
5月 19, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting: test adjusting line length to 140 (#13170)
* adjust line length * apply formatting
上级
907e4392
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
21 addition
and
81 deletion
+21
-81
.editorconfig
.editorconfig
+1
-0
src/FSharp.Build/FSharpEmbedResXSource.fs
src/FSharp.Build/FSharpEmbedResXSource.fs
+1
-3
src/FSharp.Build/FSharpEmbedResourceText.fs
src/FSharp.Build/FSharpEmbedResourceText.fs
+5
-26
src/FSharp.Build/MapSourceRoots.fs
src/FSharp.Build/MapSourceRoots.fs
+2
-6
src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.ProjectFile.fs
...encyManager.Nuget/FSharp.DependencyManager.ProjectFile.fs
+1
-3
src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs
...ndencyManager.Nuget/FSharp.DependencyManager.Utilities.fs
+1
-7
src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.fs
...Sharp.DependencyManager.Nuget/FSharp.DependencyManager.fs
+8
-31
src/fsi/console.fs
src/fsi/console.fs
+1
-3
src/fsi/fsimain.fs
src/fsi/fsimain.fs
+1
-2
未找到文件。
.editorconfig
浏览文件 @
cccdfb1d
root = true
[*.fs]
max_line_length=140
fsharp_newline_between_type_definition_and_members=true
fsharp_max_infix_operator_expression=80
fsharp_max_array_or_list_width=80
...
...
src/FSharp.Build/FSharpEmbedResXSource.fs
浏览文件 @
cccdfb1d
...
...
@@ -98,9 +98,7 @@ module internal {1} =
XElement
(
xname
"summary"
,
docComment
)
.
ToString
()
.
Split
([|
"
\r\n
"
;
"
\r
"
;
"
\n
"
|],
StringSplitOptions
.
None
)
|>
Array
.
fold
(
fun
(
sb
:
StringBuilder
)
line
->
sb
.
AppendLine
(
" /// "
+
line
))
(
StringBuilder
()
)
|>
Array
.
fold
(
fun
(
sb
:
StringBuilder
)
line
->
sb
.
AppendLine
(
" /// "
+
line
))
(
StringBuilder
()
)
// add the resource
let
accessorBody
=
match
(
generateLegacy
,
generateLiteral
)
with
...
...
src/FSharp.Build/FSharpEmbedResourceText.fs
浏览文件 @
cccdfb1d
...
...
@@ -175,12 +175,7 @@ type FSharpEmbedResourceText() =
|
'
f'
->
AddHole
"System.Double"
|
'
s'
->
AddHole
"System.String"
|
'
%
'
->
sb
.
Append
(
'
%
'
)
|>
ignore
|
c
->
Err
(
fileName
,
lineNum
,
sprintf
"'%%%c' is not a valid sequence, only %%d %%x %%X %%f %%s or %%%%"
c
)
|
c
->
Err
(
fileName
,
lineNum
,
sprintf
"'%%%c' is not a valid sequence, only %%d %%x %%X %%f %%s or %%%%"
c
)
i
<-
i
+
2
else
...
...
@@ -219,11 +214,7 @@ type FSharpEmbedResourceText() =
i
<-
i
+
1
// parse short identifier
if
i
<
txt
.
Length
&&
not
(
System
.
Char
.
IsLetter
(
txt
.[
i
]))
then
Err
(
fileName
,
lineNum
,
sprintf
"The first character in the short identifier should be a letter, but found '%c'"
txt
.[
i
]
)
Err
(
fileName
,
lineNum
,
sprintf
"The first character in the short identifier should be a letter, but found '%c'"
txt
.[
i
])
while
i
<
txt
.
Length
&&
System
.
Char
.
IsLetterOrDigit
txt
.[
i
]
do
identB
.
Append
txt
.[
i
]
|>
ignore
...
...
@@ -240,11 +231,7 @@ type FSharpEmbedResourceText() =
i
<-
i
+
1
if
i
=
txt
.
Length
then
Err
(
fileName
,
lineNum
,
sprintf
"After the identifier '%s' and comma, there should be the quoted string resource"
ident
)
Err
(
fileName
,
lineNum
,
sprintf
"After the identifier '%s' and comma, there should be the quoted string resource"
ident
)
else
let
str
=
try
...
...
@@ -405,13 +392,7 @@ open Printf
&& (File.GetLastWriteTimeUtc(fileName) <= File.GetLastWriteTimeUtc(outXmlFileName))
if condition5 then
printMessage (
sprintf
"
Skipping
generation
of
%
s
and
%
s
from
%
s
since
up
-
to
-
date
"
outFileName
outXmlFileName
fileName
)
printMessage (sprintf "
Skipping
generation
of
%
s
and
%
s
from
%
s
since
up
-
to
-
date
" outFileName outXmlFileName fileName)
Some(fileName, outFileName, outXmlFileName)
else
...
...
@@ -543,9 +524,7 @@ open Printf
printMessage
(
sprintf
"Generating .resx for %s"
outFileName
)
fprintfn
out
""
// gen validation method
fprintfn
out
" /// Call this method once to validate that all known resources are valid; throws if not"
fprintfn
out
" /// Call this method once to validate that all known resources are valid; throws if not"
fprintfn
out
" static member RunStartupValidation() ="
...
...
src/FSharp.Build/MapSourceRoots.fs
浏览文件 @
cccdfb1d
...
...
@@ -153,12 +153,8 @@ type MapSourceRoots() =
// Since the paths in ItemSpec have backslashes replaced with slashes on non-Windows platforms we need to do the same for ContainingRoot.
match
topLevelMappedPaths
.
TryGetValue
(
Utilities
.
FixFilePath
(
containingRoot
))
with
|
true
,
mappedTopLevelPath
->
root
.
SetMetadata
(
MappedPath
,
mappedTopLevelPath
+
ensureEndsWithSlash
(
nestedRoot
.
Replace
(
'\\'
,
'
/
'
))
)
|
false
,
_
->
log
.
LogError
(
FSBuild
.
SR
.
mapSourceRootsNoSuchTopLevelSourceRoot
containingRoot
)
root
.
SetMetadata
(
MappedPath
,
mappedTopLevelPath
+
ensureEndsWithSlash
(
nestedRoot
.
Replace
(
'\\'
,
'
/
'
)))
|
false
,
_
->
log
.
LogError
(
FSBuild
.
SR
.
mapSourceRootsNoSuchTopLevelSourceRoot
containingRoot
)
|
NullOrEmpty
->
log
.
LogError
(
FSBuild
.
SR
.
mapSourceRootsNoSuchTopLevelSourceRoot
""
)
|
NullOrEmpty
->
()
else
...
...
src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.ProjectFile.fs
浏览文件 @
cccdfb1d
...
...
@@ -96,9 +96,7 @@ module internal ProjectFile =
let
fields
=
line
.
Split
(
'
,
'
)
if
fields
.
Length
<
8
then
raise
(
InvalidOperationException
(
sprintf
"Internal error - Invalid resolutions file format '%s'"
line
)
)
raise
(
InvalidOperationException
(
sprintf
"Internal error - Invalid resolutions file format '%s'"
line
))
else
{
NugetPackageId
=
fields
[
0
]
...
...
src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs
浏览文件 @
cccdfb1d
...
...
@@ -144,13 +144,7 @@ module internal Utilities =
|
None
->
-
1
let
arguments
prefix
=
sprintf
"%s -restore %s %c%s%c /nologo /t:InteractivePackageManagement"
prefix
binLoggingArguments
'\"'
projectPath
'\"'
sprintf
"%s -restore %s %c%s%c /nologo /t:InteractivePackageManagement"
prefix
binLoggingArguments
'\"'
projectPath
'\"'
let
workingDir
=
Path
.
GetDirectoryName
projectPath
let
dotnetHostPath
=
getDotnetHostPath
()
...
...
src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.fs
浏览文件 @
cccdfb1d
...
...
@@ -58,20 +58,12 @@ module FSharpDependencyManager =
p
seq
{
match
not
(
String
.
IsNullOrEmpty
(
inc
)),
not
(
String
.
IsNullOrEmpty
(
ver
)),
not
(
String
.
IsNullOrEmpty
(
script
))
with
|
true
,
true
,
false
->
yield
sprintf
@
" <ItemGroup><PackageReference Include='%s' Version='%s' /></ItemGroup>"
inc
ver
match
not
(
String
.
IsNullOrEmpty
(
inc
)),
not
(
String
.
IsNullOrEmpty
(
ver
)),
not
(
String
.
IsNullOrEmpty
(
script
))
with
|
true
,
true
,
false
->
yield
sprintf
@
" <ItemGroup><PackageReference Include='%s' Version='%s' /></ItemGroup>"
inc
ver
|
true
,
true
,
true
->
yield
sprintf
@
" <ItemGroup><PackageReference Include='%s' Version='%s' Script='%s' /></ItemGroup>"
inc
ver
script
yield
sprintf
@
" <ItemGroup><PackageReference Include='%s' Version='%s' Script='%s' /></ItemGroup>"
inc
ver
script
|
true
,
false
,
false
->
yield
sprintf
@
" <ItemGroup><PackageReference Include='%s' /></ItemGroup>"
inc
|
true
,
false
,
true
->
yield
sprintf
@
" <ItemGroup><PackageReference Include='%s' Script='%s' /></ItemGroup>"
inc
script
|
true
,
false
,
true
->
yield
sprintf
@
" <ItemGroup><PackageReference Include='%s' Script='%s' /></ItemGroup>"
inc
script
|
_
->
()
match
not
(
String
.
IsNullOrEmpty
(
src
))
with
...
...
@@ -188,8 +180,7 @@ module FSharpDependencyManager =
let
mutable
timeout
=
None
lines
|>
List
.
choose
(
fun
line
->
parsePackageReferenceOption
scriptExt
(
fun
p
->
binLogPath
<-
p
)
(
fun
t
->
timeout
<-
t
)
line
)
|>
List
.
choose
(
fun
line
->
parsePackageReferenceOption
scriptExt
(
fun
p
->
binLogPath
<-
p
)
(
fun
t
->
timeout
<-
t
)
line
)
|>
List
.
distinct
|>
(
fun
l
->
l
,
binLogPath
,
timeout
)
...
...
@@ -202,8 +193,7 @@ module FSharpDependencyManager =
match
directive
with
|
"i"
->
sprintf
"RestoreSources=%s"
line
|
_
->
line
)
|>
List
.
choose
(
fun
line
->
parsePackageReferenceOption
scriptExt
(
fun
p
->
binLogPath
<-
p
)
(
fun
t
->
timeout
<-
t
)
line
)
|>
List
.
choose
(
fun
line
->
parsePackageReferenceOption
scriptExt
(
fun
p
->
binLogPath
<-
p
)
(
fun
t
->
timeout
<-
t
)
line
)
|>
List
.
distinct
|>
(
fun
l
->
l
,
binLogPath
,
timeout
)
...
...
@@ -391,13 +381,7 @@ type FSharpDependencyManager(outputDirectory: string option) =
let
directiveLines
=
Seq
.
append
packageManagerTextLines
configIncludes
let
resolutionResult
=
prepareDependencyResolutionFiles
(
scriptExt
,
directiveLines
,
targetFrameworkMoniker
,
runtimeIdentifier
,
timeout
)
prepareDependencyResolutionFiles
(
scriptExt
,
directiveLines
,
targetFrameworkMoniker
,
runtimeIdentifier
,
timeout
)
match
resolutionResult
.
resolutionsFile
with
|
Some
file
->
...
...
@@ -425,13 +409,6 @@ type FSharpDependencyManager(outputDirectory: string option) =
|
None
->
let
empty
=
Seq
.
empty
<
string
>
ResolveDependenciesResult
(
resolutionResult
.
success
,
resolutionResult
.
stdOut
,
resolutionResult
.
stdErr
,
empty
,
empty
,
empty
)
ResolveDependenciesResult
(
resolutionResult
.
success
,
resolutionResult
.
stdOut
,
resolutionResult
.
stdErr
,
empty
,
empty
,
empty
)
generateAndBuildProjectArtifacts
:>
obj
src/fsi/console.fs
浏览文件 @
cccdfb1d
...
...
@@ -189,9 +189,7 @@ type internal ReadLineConsole() =
if
(
lastDot
<
0
)
then
None
,
name
,
input
.
Substring
(
0
,
start
)
else
Some
(
name
.
Substring
(
0
,
lastDot
)),
name
.
Substring
(
lastDot
+
1
),
input
.
Substring
(
0
,
start
+
lastDot
+
1
)
Some
(
name
.
Substring
(
0
,
lastDot
)),
name
.
Substring
(
lastDot
+
1
),
input
.
Substring
(
0
,
start
+
lastDot
+
1
)
try
complete
(
attr
,
pref
)
...
...
src/fsi/fsimain.fs
浏览文件 @
cccdfb1d
...
...
@@ -232,8 +232,7 @@ let evaluateSession (argv: string[]) =
let
fsiTy
=
fsiAssembly
.
GetType
(
"FSharp.Compiler.Interactive.Settings"
)
if
isNull
fsiAssembly
then
failwith
"failed to find type FSharp.Compiler.Interactive.Settings in FSharp.Compiler.Interactive.Settings.dll"
failwith
"failed to find type FSharp.Compiler.Interactive.Settings in FSharp.Compiler.Interactive.Settings.dll"
Some
(
callStaticMethod
fsiTy
"get_fsi"
[]
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录