Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb41dfc7

Browse files
committed
Merge branch 'fsharp4' into VS2015Support
2 parentsf1c70a0 +bc1480c commitb41dfc7

File tree

8 files changed

+292
-81
lines changed

8 files changed

+292
-81
lines changed

‎DEVGUIDE.md‎

Lines changed: 65 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,15 @@ See the script for what this does. After you do this, you can do further testin
2727
The compiler is compiled as a set of .NET 4.0 components using a bootstrap process. This uses the Last Known Good (LKG) compiler to build.
2828
Note that you need the .NET framework 3.5 installed on your machine in order to complete this step.
2929

30-
```
31-
gacutil /i lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll
32-
msbuild src\fsharp-proto-build.proj
33-
```
30+
gacutil /i lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll
31+
msbuild src\fsharp-proto-build.proj
3432

3533
##2. Building an F# (Debug) library and compiler
3634

3735
This uses the proto compiler to build`FSharp.Core.dll`,`FSharp.Compiler.dll`,`fsc.exe`, and`fsi.exe`.
3836

39-
```
40-
msbuild src/fsharp-library-build.proj
41-
msbuild src/fsharp-compiler-build.proj
42-
```
37+
msbuild src/fsharp-library-build.proj
38+
msbuild src/fsharp-compiler-build.proj
4339

4440
You can now use the updated F# compiler in`debug\net40\bin\fsc.exe` and F# Interactive in`debug\net40\bin\fsi.exe` to develop and test basic language and tool features.
4541

@@ -51,75 +47,81 @@ See [TESTGUIDE.md](TESTGUIDE.md) for full details on how to run tests.
5147

5248
Prior to a**Debug** test run, you need to complete**all** of these steps:
5349

54-
```
55-
msbuild src/fsharp-library-build.proj
56-
msbuild src/fsharp-compiler-build.proj
57-
msbuild src/fsharp-typeproviders-build.proj
58-
msbuild src/fsharp-compiler-unittests-build.proj
59-
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20
60-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47
61-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7
62-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78
63-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259
64-
msbuild src/fsharp-library-unittests-build.proj
65-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47
66-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7
67-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78
68-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259
69-
src\update.cmd debug -ngen
70-
tests\BuildTestTools.cmd debug
71-
```
50+
msbuild src/fsharp-library-build.proj
51+
msbuild src/fsharp-compiler-build.proj
52+
msbuild src/fsharp-typeproviders-build.proj
53+
msbuild src/fsharp-compiler-unittests-build.proj
54+
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20
55+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47
56+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7
57+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78
58+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259
59+
msbuild src/fsharp-library-unittests-build.proj
60+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47
61+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7
62+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78
63+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259
64+
src\update.cmd debug -ngen
65+
tests\BuildTestTools.cmd debug
66+
7267

7368
[Optional] If testing the Visual Studio bits (see below) you will also need:
7469

75-
```
76-
msbuild vsintegration\fsharp-vsintegration-build.proj
77-
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj
78-
```
70+
msbuild vsintegration\fsharp-vsintegration-build.proj
71+
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj
7972

8073
Prior to a**Release** test run, you need to do**all** of these:
8174

82-
```
83-
msbuild src/fsharp-library-build.proj /p:Configuration=Release
84-
msbuild src/fsharp-compiler-build.proj /p:Configuration=Release
85-
msbuild src/fsharp-typeproviders-build.proj /p:Configuration=Release
86-
msbuild src/fsharp-compiler-unittests-build.proj /p:Configuration=Release
87-
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
88-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
89-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
90-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
91-
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
92-
msbuild src/fsharp-library-unittests-build.proj /p:Configuration=Release
93-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
94-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
95-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
96-
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
97-
src\update.cmd release -ngen
98-
tests\BuildTestTools.cmd release
99-
```
75+
msbuild src/fsharp-library-build.proj /p:Configuration=Release
76+
msbuild src/fsharp-compiler-build.proj /p:Configuration=Release
77+
msbuild src/fsharp-typeproviders-build.proj /p:Configuration=Release
78+
msbuild src/fsharp-compiler-unittests-build.proj /p:Configuration=Release
79+
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
80+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
81+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
82+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
83+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
84+
msbuild src/fsharp-library-unittests-build.proj /p:Configuration=Release
85+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
86+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
87+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
88+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
89+
src\update.cmd release -ngen
90+
tests\BuildTestTools.cmd release
91+
10092

10193
[Optional] If testing the Visual F# IDE Tools (see below) you will also need:
10294

103-
```
104-
msbuild vsintegration\fsharp-vsintegration-build.proj /p:Configuration=Release
105-
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj /p:Configuration=Release
106-
```
95+
msbuild vsintegration\fsharp-vsintegration-build.proj /p:Configuration=Release
96+
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj /p:Configuration=Release
97+
98+
##4.[Optional] Install the Visual F# IDE Tools and Clobber the F# 4.0 SDK on the machine
99+
100+
NOTE: Step#2 will install a VSIX extension into Visual Studio 2015 that changes the Visual F# IDE Tools
101+
components installed into Visual Studio 2015. You can revert this step by disabling or uninstalling the addin.
102+
103+
NOTE: Step#3 will clobber the machine-wide installed F# 4.0 SDK on your machine. This replaces the``fsi.exe``/``fsiAnyCpu.exe`` used
104+
by Visual F# Interactive and the fsc.exe used by Microsoft.FSharp.targets. Repairing Visual Studio 2015 is currently the
105+
only way to revert this step.
106+
107+
NOTE: After you complete the install, the FSharp.Core referenced by your projects will not be updated. If you want to make
108+
a project that references your updated FSharp.Core, you must explicitly change the``TargetFSharpCoreVersion`` in the .fsproj
109+
file to``4.4.0.5099`` (or a corresponding portable version number with suffix``5099``).
110+
111+
For debug:
107112

108-
##4.[Optional] Build and Install the Visual F# IDE Tools
113+
1. Ensure that the VSIX package is uninstalled. In VS, select Tools/Extensions and Updates and if the package`VisualStudio.FSharp.EnableOpenSource` is installed, select Uninstall
114+
1. Run``debug\net40\bin\EnableOpenSource.vsix``
115+
1. Run``vsintegration\update-vsintegration.cmd debug`` (clobbers the installed F# 4.0 SDK)
109116

110-
To build the VS components:
117+
For release:
111118

112-
```
113-
msbuild vsintegration\fsharp-vsintegration-build.proj
114-
```
119+
1. Ensure that the VSIX package is uninstalled. In VS, select Tools/Extensions and Updates and if the package`VisualStudio.FSharp.EnableOpenSource` is installed, select Uninstall
120+
1. Run``release\net40\bin\EnableOpenSource.vsix``
121+
1. Run``vsintegration\update-vsintegration.cmd release`` (clobbers the installed F# 4.0 SDK)
115122

116-
To install the VS components:
123+
Restart Visual Studio, it should now be running your freshly-built Visual F# IDE Tools with updated F# Interactive.
117124

118-
1. Ensure that the VSIX package is uninstalled.
119-
- In VS, select Tools/Extensions and Updates
120-
- If the package`VisualStudio.FSharp.EnableOpenSource` is installed, select Uninstall
121-
1. Run```debug\net40\bin\EnableOpenSource.vsix```
122-
1. Restart Visual Studio, it should now be running your freshly-built Visual F# IDE Tools.
123125

124126
###Notes on the build
125127

‎src/fsharp/FSharp.Core.Unittests/LibraryTestFx.fs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ module SurfaceArea =
123123

124124
// verify public surface area matches expected
125125
letverify expected platform fileName=
126-
letlogFile= sprintf"%s\\CoreUnit_%s_Xml.xml" TestContext.CurrentContext.WorkDirectory platform
126+
letworkDir=
127+
#if OPEN_BUILD
128+
TestContext.CurrentContext.WorkDirectory
129+
#else
130+
""
131+
#endif
132+
letlogFile= sprintf"%s\\CoreUnit_%s_Xml.xml" workDir platform
127133
letnormalize(s:string)=
128134
Regex.Replace(s,"(\\r\\n|\\n)+","\r\n").Trim([|'\r';'\n'|])
129135

‎src/fsharp/fsc.fs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,9 @@ module XmlDocWriter =
648648
(* the xmlDocSigOf* functions encode type into string to be used in "id"*)
649649
letmembers= ref[]
650650
letaddMember id xmlDoc=
651-
letdoc= getDoc xmlDoc
652-
members:=(id,doc)::!members
651+
if hasDoc xmlDocthen
652+
letdoc= getDoc xmlDoc
653+
members:=(id,doc)::!members
653654
letdoVal(v:Val)= addMember v.XmlDocSig v.XmlDoc
654655
letdoUnionCase(uc:UnionCase)= addMember uc.XmlDocSig uc.XmlDoc
655656
letdoField(rf:RecdField)= addMember rf.XmlDocSig rf.XmlDoc

‎tests/fsharpqa/Source/XmlDoc/Basic/env.lst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
SOURCE=xmlDoc002.fs SCFLAGS="-r:System.Xml.dll --doc:xmlDoc002.xml --define:WITHXMLVERIFICATION"# xmlDoc002.fs
33
SOURCE=xmlDoc003.fs SCFLAGS="-r:System.Xml.dll --doc:xmlDoc003.xml --define:WITHXMLVERIFICATION"# xmlDoc003.fs
44
SOURCE=xmlDoc004.fs SCFLAGS="-r:System.Xml.dll --doc:xmlDoc004.xml --define:WITHXMLVERIFICATION"# xmlDoc004.fs
5+
SOURCE=xmlDoc005.fs SCFLAGS="-r:System.Xml.dll --doc:xmlDoc005.xml --define:WITHXMLVERIFICATION"# xmlDoc005.fs
56
SOURCE=XMLDocOnEnum01.fs SCFLAGS="-r:System.Xml.dll --doc:XMLDocOnEnum01.xml --define:WITHXMLVERIFICATION"# XMLDocOnEnum01.fs
67

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// #Regression #XMLDoc
2+
// Verify that XmlDoc names are generated, but no empty members are generated re: issue #148
3+
//<Expects status=success></Expects>
4+
5+
#light
6+
7+
namespaceMyRather.MyDeep.MyNamespace
8+
openSystem.Xml
9+
10+
/// class1
11+
typeClass1()=
12+
/// x
13+
memberthis.X="X"
14+
15+
typeClass2()=
16+
memberthis.Y="Y"
17+
18+
///testModule
19+
moduleMyModule=
20+
21+
letcheck(xml:XmlDocument)name xmlDoc=
22+
letfoundDoc=((xml.SelectSingleNode("/doc/members/member[@name='"+ name+"']")).SelectSingleNode"summary").InnerText.Trim()
23+
if xmlDoc<> foundDocthen
24+
printfn"%s: generated xmlDoc <%s> differs from excpected <%s>" name foundDoc xmlDoc
25+
xmlDoc= foundDoc
26+
27+
lethasEmptyMembers(xml:XmlDocument)=
28+
letnode= xml.SelectSingleNode("/doc/members/member[@name='']")
29+
if node<>nullthen
30+
printfn"Empty member name entries found."
31+
node<>null
32+
33+
lettest=
34+
letmyname= System.Reflection.Assembly.GetExecutingAssembly().Location
35+
letxmlname= System.IO.Path.ChangeExtension(myname,"xml")
36+
37+
38+
#if WITHXMLVERIFICATION
39+
letxml=new XmlDocument()
40+
xml.Load xmlname
41+
if check xml"P:MyRather.MyDeep.MyNamespace.Class1.X""x"
42+
&& check xml"T:MyRather.MyDeep.MyNamespace.Class1""class1"
43+
&&not(hasEmptyMembers xml)
44+
then0else1
45+
#else
46+
0
47+
#endif
48+
49+
test|> exit

‎tests/fsharpqa/Source/XmlDoc/UnitOfMeasure/UnitOfMeasure01.fs‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,24 @@ let test =
2121
xml.Load(xmlname)
2222

2323
leta1= xml.GetElementsByTagName("summary").Item(0).FirstChild.Value="This is B"
24-
ifnot a1then printfn"a1: expected: This is B"; exit1
24+
ifnot a1then
25+
printfn"a1: expected: This is B"
26+
exit1
2527

2628
leta2= xml.GetElementsByTagName("summary").Item(1).FirstChild.Value="This is A"
27-
ifnot a2then printfn"a2: expected: This is A"; exit1
28-
29-
leta3= xml.GetElementsByTagName("member").Item(1).Attributes.Item(0).Value="M:UnitOfMeasure01.B(System.Single)"
30-
ifnot a3then printfn"a3: expected: M:UnitOfMeasure01.B(System.Single)"; exit1
31-
32-
leta4= xml.GetElementsByTagName("member").Item(2).Attributes.Item(0).Value="M:UnitOfMeasure01.A(System.Double)"
33-
ifnot a4then printfn"a4: expected: M:UnitOfMeasure01.A(System.Double)"; exit1
29+
ifnot a2then
30+
printfn"a2: expected: This is A"
31+
exit1
32+
33+
leta3= xml.GetElementsByTagName("member").Item(0).Attributes.Item(0).Value="M:UnitOfMeasure01.B(System.Single)"
34+
ifnot a3then
35+
printfn"a3: expected: M:UnitOfMeasure01.B(System.Single)"
36+
exit1
37+
38+
leta4= xml.GetElementsByTagName("member").Item(1).Attributes.Item(0).Value="M:UnitOfMeasure01.A(System.Double)"
39+
ifnot a4then
40+
printfn"a4: expected: M:UnitOfMeasure01.A(System.Double)"
41+
exit1
3442
#endif
3543
0
3644

‎tests/fsharpqa/Source/XmlDoc/UnitOfMeasure/UnitOfMeasure02.fs‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,24 @@ let test =
2424
xml.Load(xmlname)
2525

2626
leta1= xml.GetElementsByTagName("summary").Item(0).FirstChild.Value="This is B"
27-
ifnot a1then printfn"a1: expected: This is B"; exit1
27+
ifnot a1then
28+
printfn"a1: expected: This is B"
29+
exit1
2830

2931
leta2= xml.GetElementsByTagName("summary").Item(1).FirstChild.Value="This is A"
30-
ifnot a2then printfn"a2: expected: This is A"; exit1
32+
ifnot a2then
33+
printfn"a2: expected: This is A"
34+
exit1
3135

32-
leta3= xml.GetElementsByTagName("member").Item(1).Attributes.Item(0).Value="M:UnitOfMeasure02.B(System.Int32,System.Int32)"
33-
ifnot a3then printfn"a3: expected: M:UnitOfMeasure02.B(System.Int32,System.Int32)"; exit1
34-
35-
leta4= xml.GetElementsByTagName("member").Item(2).Attributes.Item(0).Value="M:UnitOfMeasure02.A(System.Double)"
36-
ifnot a4then printfn"a4: expected: M:UnitOfMeasure02.A(System.Double)"; exit1
36+
leta3= xml.GetElementsByTagName("member").Item(0).Attributes.Item(0).Value="M:UnitOfMeasure02.B(System.Int32,System.Int32)"
37+
ifnot a3then
38+
printfn"a3: expected: M:UnitOfMeasure02.B(System.Int32,System.Int32)"
39+
exit1
40+
41+
leta4= xml.GetElementsByTagName("member").Item(1).Attributes.Item(0).Value="M:UnitOfMeasure02.A(System.Double)"
42+
ifnot a4then
43+
printfn"a4: expected: M:UnitOfMeasure02.A(System.Double)"
44+
exit1
3745
#endif
3846
0
3947

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp