Skip to content

Commit 8237a04

Browse files
committed
Merge pull request #531 from dsyme/integrate-78
Integrate from visualfsharp/master
2 parents c770c9f + 78335fd commit 8237a04

File tree

16 files changed

+73
-1162
lines changed

16 files changed

+73
-1162
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ lib/bootstrap/4.0/policy*
99
aclocal.m4
1010
src/*.userprefs
1111
src/fsharp/FSStrings.resources
12-
lkg
1312
packages
1413
src/fsharp/FSharp.Build/*.resx
1514
src/fsharp/FSharp.Build-proto/*.resx

CHANGELOG-visualfsharp.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,28 @@ Visual F<span>#</span>
99

1010
All notable changes to this project will be documented in this file.
1111

12+
### [4.0.0] - Visual Studio 2015 Update 1 - 30 November 2015
13+
14+
#### Enhancements
15+
* Perf: `for i in expr do body` optimization [#219](https://github.com/Microsoft/visualfsharp/pull/219)
16+
* Remove type provider security dialog and use custom icon for type provider assembly reference [#448](https://github.com/Microsoft/visualfsharp/pull/448)
17+
* Perf: Enable parallel build inside Visual Studio [#487](https://github.com/Microsoft/visualfsharp/pull/487)
18+
* Perf: Remove StructBox for Value Types [#549](https://github.com/Microsoft/visualfsharp/pull/549)
19+
* Add compiler warnings for redundant arguments in raise/failwith/failwithf/nullArg/invalidOp/invalidArg [#630](https://github.com/Microsoft/visualfsharp/pull/630)
20+
* Add a compiler warning for lower case literals in patterns [#666](https://github.com/Microsoft/visualfsharp/pull/666)
21+
22+
#### Bug fixes
23+
* Fix scope of types for named values in attributes improperly set [#437](https://github.com/Microsoft/visualfsharp/pull/437)
24+
* Add general check for escaping typars to check phase [#442](https://github.com/Microsoft/visualfsharp/pull/442)
25+
* Fix AccessViolationException on obfuscated assemblies [#519](https://github.com/Microsoft/visualfsharp/pull/519)
26+
* Fix memory leaks while reloading solutions in Visual Studio [#591](https://github.com/Microsoft/visualfsharp/pull/591)
27+
* Enable breakpoints in `with` augmentations for class types [#608](https://github.com/Microsoft/visualfsharp/pull/608)
28+
* Fix false escaping type parameter check error [#613](https://github.com/Microsoft/visualfsharp/pull/613)
29+
* Fix quotation of readonly fields [#622](https://github.com/Microsoft/visualfsharp/pull/622)
30+
* Keep the reference icons when opening references [#623](https://github.com/Microsoft/visualfsharp/pull/623)
31+
* Don't suppress missing FSI transitive references [#626](https://github.com/Microsoft/visualfsharp/pull/626)
32+
* Make Seq.cast's non-generic and generic IEnumerable implementations equivalent [#651](https://github.com/Microsoft/visualfsharp/pull/651)
33+
1234
### [4.0.0] - 20 July 2015
1335

1436
Includes commits up to `dd8252eb8d20aaedf7b1c7576cd2a8a82d24f587`

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
os: Windows Server 2012 R2
1+
os: Visual Studio 2015
22
init:
33
- git config --global core.autocrlf input
44
build_script:

lib/bootstrap/4.0/SupportedRuntimes.xml

Lines changed: 0 additions & 31 deletions
This file was deleted.

lkg/FSharp-4.0.30319.1/bin/FsLex.exe.config

Lines changed: 0 additions & 7 deletions
This file was deleted.

lkg/FSharp-4.0.30319.1/bin/FsYacc.exe.config

Lines changed: 0 additions & 7 deletions
This file was deleted.
-76 KB
Binary file not shown.

src/FSharpSource.targets

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,9 @@ Some other NuGET monikers to support in the future, see http://docs.nuget.org/do
162162
<!-- MSbuild works out the assembly references -->
163163
</PropertyGroup>
164164

165-
<!-- Target MonoAndroid -->
166-
<PropertyGroup Condition="'$(TargetFramework)'=='monodroid'">
167-
<!--<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>-->
168-
<!-- <TargetFrameworkIdentifier>MonoAndroid</TargetFrameworkIdentifier> -->
165+
166+
<!-- MonoAndroid, MonoTouch, XamarinWatchOS, XamarinTVOS -->
167+
<PropertyGroup Condition="('$(TargetFramework)'=='monodroid') OR ('$(TargetFramework)'=='monotouch') OR ('$(TargetFramework)'=='xamarinwatchos') OR ('$(TargetFramework)'=='xamarintvos')">
169168
<TargetFrameworkOutputDirectory>$(TargetFramework)</TargetFrameworkOutputDirectory>
170169
<DefineConstants>$(DefineConstants);FSHARP_CORE_4_5</DefineConstants>
171170
<DefineConstants>$(DefineConstants);FX_ATLEAST_45</DefineConstants>
@@ -179,63 +178,26 @@ Some other NuGET monikers to support in the future, see http://docs.nuget.org/do
179178
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_EMIT</DefineConstants>
180179
<DefineConstants>$(DefineConstants);FX_NO_BIGINT</DefineConstants>
181180
<DefineConstants>$(DefineConstants);FX_NO_STRUCTURAL_EQUALITY</DefineConstants>
181+
<AssemblySearchPaths>$(FSharpSourcesRoot)\..\dependencies\mono\2.1\XamarinWatchOS;$(AssemblySearchPaths)</AssemblySearchPaths>
182+
</PropertyGroup>
183+
184+
<!-- Target MonoAndroid -->
185+
<PropertyGroup Condition="'$(TargetFramework)'=='monodroid'">
182186
<AssemblySearchPaths>$(FSharpSourcesRoot)\..\dependencies\mono\2.1\MonoAndroid;$(AssemblySearchPaths)</AssemblySearchPaths>
183187
</PropertyGroup>
184188

185-
<!-- Target MonoTouch (should be identical to MonoAndroid configurations, though we sanity check -->
186-
<!-- by building against the MonoTouch mscorlib) -->
189+
<!-- Target MonoTouch: identical to MonoAndroid configurations, though we sanity check by building against the MonoTouch mscorlib -->
187190
<PropertyGroup Condition="'$(TargetFramework)'=='monotouch'">
188-
<!--<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>-->
189-
<!-- <TargetFrameworkIdentifier>MonoTouch</TargetFrameworkIdentifier> -->
190-
<TargetFrameworkOutputDirectory>$(TargetFramework)</TargetFrameworkOutputDirectory>
191-
<DefineConstants>$(DefineConstants);FSHARP_CORE_4_5</DefineConstants>
192-
<DefineConstants>$(DefineConstants);FX_ATLEAST_45</DefineConstants>
193-
<DefineConstants>$(DefineConstants);FX_ATLEAST_40</DefineConstants>
194-
<DefineConstants>$(DefineConstants);FX_ATLEAST_35</DefineConstants>
195-
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
196-
<DefineConstants>$(DefineConstants);QUERIES_IN_FSLIB</DefineConstants>
197-
<DefineConstants>$(DefineConstants);PUT_TYPE_PROVIDERS_IN_FSCORE;</DefineConstants>
198-
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_EMIT</DefineConstants>
199-
<DefineConstants>$(DefineConstants);FX_NO_BIGINT</DefineConstants>
200-
<DefineConstants>$(DefineConstants);FX_NO_STRUCTURAL_EQUALITY</DefineConstants>
201191
<AssemblySearchPaths>$(FSharpSourcesRoot)\..\dependencies\mono\2.1\MonoTouch;$(AssemblySearchPaths)</AssemblySearchPaths>
202192
</PropertyGroup>
203-
204-
<!-- Target XamarinWatchOS (should be identical to MonoTouch configurations, though we sanity check -->
205-
<!-- by building against the Xamarin.WatchOS mscorlib) -->
193+
194+
<!-- Target XamarinWatchOS: identical to MonoTouch configurations, though we sanity check by building against the Xamarin.WatchOS mscorlib -->
206195
<PropertyGroup Condition="'$(TargetFramework)'=='xamarinwatchos'">
207-
<!--<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>-->
208-
<!-- <TargetFrameworkIdentifier>Xamarin.WatchOS</TargetFrameworkIdentifier> -->
209-
<TargetFrameworkOutputDirectory>$(TargetFramework)</TargetFrameworkOutputDirectory>
210-
<DefineConstants>$(DefineConstants);FSHARP_CORE_4_5</DefineConstants>
211-
<DefineConstants>$(DefineConstants);FX_ATLEAST_45</DefineConstants>
212-
<DefineConstants>$(DefineConstants);FX_ATLEAST_40</DefineConstants>
213-
<DefineConstants>$(DefineConstants);FX_ATLEAST_35</DefineConstants>
214-
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
215-
<DefineConstants>$(DefineConstants);QUERIES_IN_FSLIB</DefineConstants>
216-
<DefineConstants>$(DefineConstants);PUT_TYPE_PROVIDERS_IN_FSCORE;</DefineConstants>
217-
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_EMIT</DefineConstants>
218-
<DefineConstants>$(DefineConstants);FX_NO_BIGINT</DefineConstants>
219-
<DefineConstants>$(DefineConstants);FX_NO_STRUCTURAL_EQUALITY</DefineConstants>
220196
<AssemblySearchPaths>$(FSharpSourcesRoot)\..\dependencies\mono\2.1\XamarinWatchOS;$(AssemblySearchPaths)</AssemblySearchPaths>
221197
</PropertyGroup>
222198

223-
<!-- Target XamarinTVOS (should be identical to MonoTouch configurations, though we sanity check -->
224-
<!-- by building against the Xamarin.TVOS mscorlib) -->
199+
<!-- Target XamarinTVOS: identical to MonoTouch configurations, though we sanity check by building against the Xamarin.TVOS mscorlib -->
225200
<PropertyGroup Condition="'$(TargetFramework)'=='xamarintvos'">
226-
<!--<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>-->
227-
<!-- <TargetFrameworkIdentifier>Xamarin.TVOS</TargetFrameworkIdentifier> -->
228-
<TargetFrameworkOutputDirectory>$(TargetFramework)</TargetFrameworkOutputDirectory>
229-
<DefineConstants>$(DefineConstants);FSHARP_CORE_4_5</DefineConstants>
230-
<DefineConstants>$(DefineConstants);FX_ATLEAST_45</DefineConstants>
231-
<DefineConstants>$(DefineConstants);FX_ATLEAST_40</DefineConstants>
232-
<DefineConstants>$(DefineConstants);FX_ATLEAST_35</DefineConstants>
233-
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
234-
<DefineConstants>$(DefineConstants);QUERIES_IN_FSLIB</DefineConstants>
235-
<DefineConstants>$(DefineConstants);PUT_TYPE_PROVIDERS_IN_FSCORE;</DefineConstants>
236-
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_EMIT</DefineConstants>
237-
<DefineConstants>$(DefineConstants);FX_NO_BIGINT</DefineConstants>
238-
<DefineConstants>$(DefineConstants);FX_NO_STRUCTURAL_EQUALITY</DefineConstants>
239201
<AssemblySearchPaths>$(FSharpSourcesRoot)\..\dependencies\mono\2.1\XamarinTVOS;$(AssemblySearchPaths)</AssemblySearchPaths>
240202
</PropertyGroup>
241203

src/absil/ilread.fs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@ type MemoryMappedFile(hMap: MemoryMapping.HANDLE, start:nativeint) =
220220
type ByteFile(bytes:byte[]) =
221221
inherit BinaryFile()
222222

223-
static member OpenIn f = ByteFile(FileSystem.ReadAllBytesShim f)
224-
static member OpenBytes bytes = ByteFile(bytes)
225-
226223
override mc.ReadByte addr = bytes.[addr]
227224
override mc.ReadBytes addr len = Array.sub bytes addr len
228225
override m.CountUtf8String addr =
@@ -905,6 +902,8 @@ type ILModuleReader =
905902
dispose: unit -> unit }
906903
member x.ILModuleDef = x.modul
907904
member x.ILAssemblyRefs = x.ilAssemblyRefs.Force()
905+
interface IDisposable with
906+
member x.Dispose() = x.dispose()
908907

909908

910909
type MethodData = MethodData of ILType * ILCallingConv * string * ILTypes * ILType * ILTypes
@@ -3946,8 +3945,6 @@ let rec genOpenBinaryReader infile is opts =
39463945

39473946
ilModule,ilAssemblyRefs,pdb
39483947

3949-
let CloseILModuleReader x = x.dispose()
3950-
39513948
let mkDefault ilg =
39523949
{ optimizeForMemory=false;
39533950
pdbPath= None;
@@ -3973,7 +3970,7 @@ let OpenILModuleReader infile opts =
39733970
mmap.Close();
39743971
ClosePdbReader pdb) }
39753972
with _ ->
3976-
let mc = ByteFile.OpenIn infile
3973+
let mc = ByteFile(infile |> FileSystem.ReadAllBytesShim)
39773974
let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile mc opts
39783975
{ modul = modul;
39793976
ilAssemblyRefs = ilAssemblyRefs;
@@ -3999,7 +3996,7 @@ let OpenILModuleReaderAfterReadingAllBytes infile opts =
39993996
match cacheResult with
40003997
| Some(ilModuleReader) -> ilModuleReader
40013998
| None ->
4002-
let mc = ByteFile.OpenIn infile
3999+
let mc = ByteFile(infile |> FileSystem.ReadAllBytesShim)
40034000
let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile mc opts
40044001
let ilModuleReader =
40054002
{ modul = modul;
@@ -4011,7 +4008,7 @@ let OpenILModuleReaderAfterReadingAllBytes infile opts =
40114008

40124009
let OpenILModuleReaderFromBytes fileNameForDebugOutput bytes opts =
40134010
assert opts.pdbPath.IsNone
4014-
let mc = ByteFile.OpenBytes bytes
4011+
let mc = ByteFile(bytes)
40154012
let modul,ilAssemblyRefs,pdb = genOpenBinaryReader fileNameForDebugOutput mc opts
40164013
let ilModuleReader =
40174014
{ modul = modul;

src/absil/ilread.fsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ type ILReaderOptions =
4141
val mkDefault : ILGlobals -> ILReaderOptions
4242

4343
// The non-memory resources (i.e. the file handle) associated with
44-
// the read can be recovered by calling CloseILModuleReader. Any remaining
44+
// the read can be recovered by calling Dispose. Any remaining
4545
// lazily-computed items in the metadata graph returned by MetadataOfILModuleReader
4646
// will no longer be valid.
4747
[<Sealed>]
4848
type ILModuleReader =
4949
member ILModuleDef : ILModuleDef
5050
member ILAssemblyRefs : ILAssemblyRef list
51+
interface System.IDisposable
5152

5253
val OpenILModuleReader: string -> ILReaderOptions -> ILModuleReader
53-
val CloseILModuleReader: ILModuleReader -> unit
5454

5555
/// Open a binary reader, except first copy the entire contents of the binary into
5656
/// memory, close the file and ensure any subsequent reads happen from the in-memory store.

0 commit comments

Comments
 (0)