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

Commita20ee38

Browse files
committed
Merge remote-tracking branch 'upstream/master' into merges/master-to-dev15.7
2 parents8d33c74 +b7c2099 commita20ee38

File tree

12 files changed

+86
-162
lines changed

12 files changed

+86
-162
lines changed

‎DEVGUIDE.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ Then to replace your machine-wide installation:
9393

9494
Full testing is not yet enabled on macOS.
9595

96+
###[Optional] Specifying the install path (Linux or macOS)
97+
98+
You can specify a custom installation path using the DESTDIR shell variable
99+
100+
DESTDIR=/my/path/to/fsharp make install
96101

97102
###Developing the F# Compiler (Linux or macOS - .NET Core)
98103

@@ -107,7 +112,7 @@ Outputs are placed in
107112

108113
This uses an installed .NET SDK 2.0 to build the various duplicated project
109114

110-
Testing the .NET Core version of the F# compiler onmwcOS and Linux is TBD.
115+
Testing the .NET Core version of the F# compiler onmacOS and Linux is TBD.
111116

112117

113118
###Developing the Visual F# IDE Tools (Windows Only)

‎FSharp.Directory.Build.targets‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
</PropertyGroup>
1010

1111
<ImportProject="build\targets\AssemblyVersions.props" />
12-
<ImportProject="build\targets\GitHash.props" />
1312
<ImportProject="build\targets\GenerateAssemblyAttributes.targets" />
1413
<ImportProject="build\targets\GenerateInternalsVisibleTo.targets" />
1514

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ These are the branches in use:
5151
*`dev15.x`
5252
- Latest release branch for the particular point release of Visual Studio.
5353
- Incorporates features and fixes from master up to a particular branch point, then selective cherry-picks.
54-
- May contain new features that depend on new things or fixes inth corresponding Visual Studio release.
55-
- Getsingegrated back into master once the corresponding Visual Studio release is made.
54+
- May contain new features that depend on new things or fixes inthe corresponding Visual Studio release.
55+
- Getsintegrated back into master once the corresponding Visual Studio release is made.
5656
- Used to build Visual F# Tool updates
5757

5858

‎build.cmd‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -655,12 +655,6 @@ set _dotnet20exe=%~dp0Tools\dotnet20\dotnet.exe
655655
setNUGET_PACKAGES=%~dp0Packages
656656
setpath=%~dp0Tools\dotnet20\;%path%
657657

658-
if"%NEEDS_DOTNET_CLI_TOOLS%"=="1" (
659-
:: Restore projects using dotnet CLI tool
660-
echo%_dotnet20exe% restore -v:d build-everything.proj%msbuildflags%%BUILD_DIAG%
661-
%_dotnet20exe% restore -v:d build-everything.proj%msbuildflags%%BUILD_DIAG%
662-
)
663-
664658
echo ----------- Done with package restore, starting dependency uptake check -------------
665659

666660
ifnot"%PB_PackageVersionPropsUrl%"=="" (
@@ -751,7 +745,14 @@ if "%BUILD_PROTO%" == "1" (
751745
@if ERRORLEVEL1echo Error: NGen of proto failed&&goto :failure
752746
)
753747

754-
echo ---------------- Done with proto, starting build ------------------------
748+
if"%NEEDS_DOTNET_CLI_TOOLS%"=="1" (
749+
echo ---------------- Done with proto, starting SDK restore ------------------------
750+
:: Restore projects using dotnet CLI tool
751+
echo%_dotnet20exe% restore -v:d build-everything.proj%msbuildflags%%BUILD_DIAG%
752+
%_dotnet20exe% restore -v:d build-everything.proj%msbuildflags%%BUILD_DIAG%
753+
)
754+
755+
echo ---------------- Done with SDK restore, starting build ------------------------
755756

756757
if"%BUILD_PHASE%"=="1" (
757758

@@ -767,9 +768,11 @@ if "%BUILD_PHASE%" == "1" (
767768
echo ---------------- Done with build, starting assembly version checks ---------------
768769
setasmvercheckpath=%~dp0tests\fsharpqa\testenv\src\AssemblyVersionCheck
769770

770-
echo"%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe"%asmvercheckpath%\AssemblyVersionCheck.fsx --"%~dp0build\config\AssemblySignToolData.json""%~dp0%BUILD_CONFIG%"
771-
"%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe"%asmvercheckpath%\AssemblyVersionCheck.fsx --"%~dp0build\config\AssemblySignToolData.json""%~dp0%BUILD_CONFIG%"
772-
ifERRORLEVEL1echo Error verifying assembly versions and commit hashes.&&goto :failure
771+
if"%BUILD_NET40%"=="1" (
772+
echo"%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe"%asmvercheckpath%\AssemblyVersionCheck.fsx --"%~dp0build\config\AssemblySignToolData.json""%~dp0%BUILD_CONFIG%"
773+
"%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe"%asmvercheckpath%\AssemblyVersionCheck.fsx --"%~dp0build\config\AssemblySignToolData.json""%~dp0%BUILD_CONFIG%"
774+
ifERRORLEVEL1echo Error verifying assembly versions and commit hashes.&&goto :failure
775+
)
773776

774777
echo ---------------- Done with assembly version checks, starting assembly signing ---------------
775778

‎build/targets/AssemblyAttributes.targets‎

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

‎build/targets/GenerateAssemblyAttributes.targets‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<Project>
22

3+
<ImportProject="GitHash.props" />
4+
35
<TargetName="GenerateAssemblyFileVersion"
4-
BeforeTargets="CoreCompile">
6+
BeforeTargets="CoreCompile"
7+
Condition="'$(Configuration)' != 'Proto'">
58

69
<PropertyGroup>
710
<GeneratedFSharpAssemblyVersionFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension)</GeneratedFSharpAssemblyVersionFile>
@@ -41,6 +44,17 @@
4144
</_AssemblyVersionAttributes>
4245
</ItemGroup>
4346

47+
<WriteCodeFragmentAssemblyAttributes="@(_AssemblyVersionAttributes)"
48+
Language="$(Language)"
49+
OutputFile="$(GeneratedFSharpAssemblyVersionFile)"
50+
Condition="'$(_UseWriteCodeFragmentHack)' != 'true'">
51+
<!-- For FSharp.Core, assembly version must be inserted after all Core files, as it defines F# basic types (strings)-->
52+
<OutputTaskParameter="OutputFile"ItemName="Compile"Condition="'$(Language)' != 'F#' or '$(AssemblyName)' == 'FSharp.Core'" />
53+
<!-- For other assemblies, this must be inserted before all source files, to keep exe's EntryPoints (if any) as the last source file-->
54+
<OutputTaskParameter="OutputFile"ItemName="CompileBefore"Condition="'$(Language)' == 'F#' and '$(AssemblyName)' != 'FSharp.Core'" />
55+
<OutputTaskParameter="OutputFile"ItemName="FileWrites" />
56+
</WriteCodeFragment>
57+
4458
<ItemGroupCondition="'$(_UseWriteCodeFragmentHack)' == 'true'">
4559
<_LinesToWriteInclude="//&lt;auto-generated&gt;" />
4660
<_LinesToWriteInclude="namespace FSharp" />
@@ -54,17 +68,6 @@
5468
<FileWritesInclude="$(GeneratedFSharpAssemblyVersionFile)" />
5569
</ItemGroup>
5670

57-
<WriteCodeFragmentAssemblyAttributes="@(_AssemblyVersionAttributes)"
58-
Language="$(Language)"
59-
OutputFile="$(GeneratedFSharpAssemblyVersionFile)"
60-
Condition="'$(_UseWriteCodeFragmentHack)' != 'true'">
61-
<!-- For FSharp.Core, assembly version must be inserted after all Core files, as it defines F# basic types (strings)-->
62-
<OutputTaskParameter="OutputFile"ItemName="Compile"Condition="'$(Language)' != 'F#' or '$(AssemblyName)' == 'FSharp.Core'" />
63-
<!-- For other assemblies, this must be inserted before all source files, to keep exe's EntryPoints (if any) as the last source file-->
64-
<OutputTaskParameter="OutputFile"ItemName="CompileBefore"Condition="'$(Language)' == 'F#' and '$(AssemblyName)' != 'FSharp.Core'" />
65-
<OutputTaskParameter="OutputFile"ItemName="FileWrites" />
66-
</WriteCodeFragment>
67-
6871
<WriteLinesToFileFile="$(GeneratedFSharpAssemblyVersionFile)"
6972
Lines="@(_LinesToWrite)"
7073
Overwrite="true"

‎setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ folder "InstallDir:Common7\IDE\PublicAssemblies\$(LocaleParentCulture)"
1010
folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\$(LocaleParentCulture)"
1111
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Compiler.Private.resources.dll" vs.file.ngen=yes
1212
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Core.resources.dll" vs.file.ngen=yes
13+
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Editor.resources.dll" vs.file.ngen=yes
1314
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.LanguageService.Base.resources.dll" vs.file.ngen=yes
1415
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.LanguageService.resources.dll" vs.file.ngen=yes
1516
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.ProjectSystem.Base.resources.dll" vs.file.ngen=yes
1617
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.ProjectSystem.FSharp.resources.dll" vs.file.ngen=yes
1718
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.ProjectSystem.PropertyPages.resources.dll" vs.file.ngen=yes
19+
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.UIResources.resources.dll" vs.file.ngen=yes
1820
file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.VS.FSI.resources.dll" vs.file.ngen=yes

‎src/FSharpSource.targets‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<RepoRoot>$(MSBuildThisFileDirectory)..\</RepoRoot>
77
</PropertyGroup>
88

9-
<ImportProject="..\build\targets\GitHash.props" />
10-
119
<PropertyGroup>
1210
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
1311
</PropertyGroup>
@@ -338,7 +336,8 @@
338336

339337
</Target>
340338

341-
<ImportProject="..\build\targets\AssemblyAttributes.targets" />
339+
<ImportProject="..\build\targets\GenerateAssemblyAttributes.targets" />
340+
<ImportProject="..\build\targets\GenerateInternalsVisibleTo.targets" />
342341

343342
<UsingTaskTaskName="ReplaceFileText"TaskFactory="CodeTaskFactory"AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
344343
<ParameterGroup>

‎src/fsharp/NameResolution.fs‎

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,14 +1100,9 @@ let ResolveProvidedTypeNameInEntity (amap, m, typeName, modref: ModuleOrNamespac
11001100
| TProvidedNamespaceExtensionPoint(resolutionEnvironment,resolvers)->
11011101
match modref.Deref.PublicPathwith
11021102
| Some(PubPath path)->
1103-
letmatches= resolvers|> List.map(fun r-> ExtensionTyping.TryResolveProvidedType(r,m,path,typeName))
1104-
lettcrefs=
1105-
[for stin matchesdo
1106-
match stwith
1107-
| None->()
1108-
| Some st->
1109-
yield AddEntityForProvidedType(amap, modref, resolutionEnvironment, st, m)]
1110-
tcrefs
1103+
resolvers
1104+
|> List.choose(fun r-> ExtensionTyping.TryResolveProvidedType(r,m,path,typeName))
1105+
|> List.map(fun st-> AddEntityForProvidedType(amap, modref, resolutionEnvironment, st, m))
11111106
| None->[]
11121107

11131108
// We have a provided type, look up its nested types (populating them on-demand if necessary)
@@ -1455,20 +1450,18 @@ type TcSymbolUseData =
14551450
typeTcSymbolUses(g, capturedNameResolutions:ResizeArray<CapturedNameResolution>,formatSpecifierLocations:(range*int)[])=
14561451

14571452
// Make sure we only capture the information we really need to report symbol uses
1458-
letcnrs=[|for cnrin capturedNameResolutions->{ Item=cnr.Item; ItemOccurence=cnr.ItemOccurence; DisplayEnv=cnr.DisplayEnv; Range=cnr.Range}|]
1453+
letallUsesOfSymbols=[|for cnrin capturedNameResolutions->{ Item=cnr.Item; ItemOccurence=cnr.ItemOccurence; DisplayEnv=cnr.DisplayEnv; Range=cnr.Range}|]
14591454
letcapturedNameResolutions=()
14601455
do ignore capturedNameResolutions// don't capture this!
14611456

14621457
memberthis.GetUsesOfSymbol(item)=
1463-
[|forcnrincnrsdo
1464-
if protectAssemblyExplorationfalse(fun()-> ItemsAreEffectivelyEqual g itemcnr.Item)then
1465-
yield(cnr.ItemOccurence, cnr.DisplayEnv, cnr.Range)|]
1458+
[|forsymbolUseinallUsesOfSymbolsdo
1459+
if protectAssemblyExplorationfalse(fun()-> ItemsAreEffectivelyEqual g itemsymbolUse.Item)then
1460+
yieldsymbolUse|]
14661461

1467-
memberthis.GetAllUsesOfSymbols()=
1468-
[|for cnrin cnrsdo
1469-
yield(cnr.Item, cnr.ItemOccurence, cnr.DisplayEnv, cnr.Range)|]
1462+
memberthis.AllUsesOfSymbols= allUsesOfSymbols
14701463

1471-
memberthis.GetFormatSpecifierLocationsAndArity()=formatSpecifierLocations
1464+
memberthis.GetFormatSpecifierLocationsAndArity()= formatSpecifierLocations
14721465

14731466

14741467
/// An accumulator for the results being emitted into the tcSink.

‎src/fsharp/NameResolution.fsi‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,22 @@ type internal TcResolutions =
298298
static memberEmpty:TcResolutions
299299

300300

301+
[<Struct>]
302+
type TcSymbolUseData=
303+
{ Item:Item
304+
ItemOccurence:ItemOccurence
305+
DisplayEnv:DisplayEnv
306+
Range:range}
307+
301308
[<Class>]
302309
/// Represents container for all name resolutions that were met so far when typechecking some particular file
303310
typeinternalTcSymbolUses=
304311

305312
/// Get all the uses of a particular item within the file
306-
memberGetUsesOfSymbol:Item->(ItemOccurence* DisplayEnv* range)[]
313+
memberGetUsesOfSymbol:Item->TcSymbolUseData[]
307314

308-
///Get all the uses of all items within the file
309-
memberGetAllUsesOfSymbols:unit->(Item* ItemOccurence* DisplayEnv* range)[]
315+
///All the uses of all items within the file
316+
memberAllUsesOfSymbols:TcSymbolUseData[]
310317

311318
/// Get the locations of all the printf format specifiers in the file
312319
memberGetFormatSpecifierLocationsAndArity:unit->(range* int)[]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp