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

Commitfeb6d4e

Browse files
authored
Merge pull requestdotnet#4543 from Microsoft/merges/master-to-dev15.7
Merge master to dev15.7
2 parents3e2d4fa +4dce3d1 commitfeb6d4e

File tree

57 files changed

+1649
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1649
-85
lines changed

‎FSharp.Directory.Build.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
<!-- other-->
4848
<PropertyGroup>
49-
<DebugType>full</DebugType>
49+
<DebugType>portable</DebugType>
5050
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
5151
<UseStandardResourceNames>false</UseStandardResourceNames>
5252
<GenerateDocumentationFile>true</GenerateDocumentationFile>

‎FSharp.Directory.Build.targets‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
</Target>
3535

3636
<ImportProject="build\targets\AssemblyVersions.props" />
37+
<ImportProject="build\targets\ConvertPortablePdbs.targets" />
3738
<ImportProject="build\targets\GenerateAssemblyAttributes.targets" />
3839
<ImportProject="build\targets\GenerateInternalsVisibleTo.targets" />
3940

‎NuGet.Config‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<addkey="api.nuget.org"value="https://api.nuget.org/v3/index.json" />
1818
<addkey="myget.org roslyn tools"value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
1919
<addkey="myget.org roslyn"value="https://dotnet.myget.org/F/roslyn-for-vs-for-mac/api/v3/index.json" />
20+
<addkey="myget.org symreader-converter"value="https://dotnet.myget.org/F/symreader-converter/api/v3/index.json" />
2021
</packageSources>
2122

2223
</configuration>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project>
2+
3+
<ItemGroup>
4+
<PackageReferenceInclude="Microsoft.DiaSymReader.Pdb2Pdb"Version="$(MicrosoftDiaSymReaderPdb2PdbPackageVersion)" />
5+
</ItemGroup>
6+
7+
<TargetName="ConvertPortablePdbs"
8+
AfterTargets="AfterBuild"
9+
Condition="Exists('$(TargetPath)') AND ('$(DebugType)' == 'portable' OR '$(DebugType)' == 'embedded')">
10+
<PropertyGroup>
11+
<ConvertedPdbsDirectory>$(FinalOutputPath)\ConvertedPdbs</ConvertedPdbsDirectory>
12+
<PdbConverterExe>$(NuGetPackageRoot)Microsoft.DiaSymReader.Pdb2Pdb\$(MicrosoftDiaSymReaderPdb2PdbPackageVersion)\tools\Pdb2Pdb.exe</PdbConverterExe>
13+
<PdbConverterArgs>"$(TargetPath)" /out "$(ConvertedPdbsDirectory)\$(TargetName).pdb" /verbose /srcsvrvar SRC_INDEX=public</PdbConverterArgs>
14+
</PropertyGroup>
15+
16+
<MakeDirDirectories="$(ConvertedPdbsDirectory)" />
17+
<ExecCommand='"$(PdbConverterExe)" $(PdbConverterArgs)' />
18+
</Target>
19+
20+
</Project>

‎build/targets/PackageVersions.props‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
<!-- other packages-->
5050
<MicrosoftCompositionPackageVersion>1.0.30</MicrosoftCompositionPackageVersion>
51+
<MicrosoftDiaSymReaderPdb2PdbPackageVersion>1.1.0-roslyn-62714-01</MicrosoftDiaSymReaderPdb2PdbPackageVersion>
5152
<MicrosoftMSXMLPackageVersion>8.0.0-alpha</MicrosoftMSXMLPackageVersion>
5253
<MicrosoftVisualFSharpMSBuild150PackageVersion>1.0.1</MicrosoftVisualFSharpMSBuild150PackageVersion>
5354
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>

‎src/fsharp/NicePrint.fs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,7 @@ let isGeneratedExceptionField pos f = TastDefinitionPrinting.isGeneratedExce
19701970
letstringOfTyparConstraint denv tpc= stringOfTyparConstraints denv[tpc]
19711971
letstringOfTy denv x= x|> PrintTypes.layoutType denv|> showL
19721972
letprettyLayoutOfType denv x= x|> PrintTypes.prettyLayoutOfType denv
1973+
letprettyLayoutOfTypeNoCx denv x= x|> PrintTypes.prettyLayoutOfTypeNoConstraints denv
19731974
letprettyStringOfTy denv x= x|> PrintTypes.prettyLayoutOfType denv|> showL
19741975
letprettyStringOfTyNoCx denv x= x|> PrintTypes.prettyLayoutOfTypeNoConstraints denv|> showL
19751976
letstringOfRecdField denv x= x|> TastDefinitionPrinting.layoutRecdFieldfalse denv|> showL

‎src/fsharp/service/service.fs‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,9 @@ type TypeCheckInfo
908908
match itemwith
909909
| Item.Types_| Item.ModuleOrNamespaces_->true
910910
|_->false
911+
912+
/// Find the most precise display context for the given line and column.
913+
member__.GetBestDisplayEnvForPos cursorPos= GetBestEnvForPos cursorPos
911914

912915
member__.GetVisibleNamespacesAndModulesAtPosition(cursorPos:pos):ModuleOrNamespaceRef list=
913916
let(nenv,ad),m= GetBestEnvForPos cursorPos
@@ -1982,6 +1985,7 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp
19821985
|_->
19831986
async.Return dflt
19841987

1988+
19851989
memberinfo.GetToolTipText(line,colAtEndOfNames,lineStr,names,tokenTag,userOpName)=
19861990
info.GetStructuredToolTipText(line, colAtEndOfNames, lineStr, names, tokenTag, ?userOpName=userOpName)
19871991
|> Tooltips.Map Tooltips.ToFSharpToolTipText
@@ -2093,6 +2097,13 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp
20932097
RequireCompilationThread ctok
20942098
scope.IsRelativeNameResolvableFromSymbol(pos, plid, symbol))
20952099

2100+
memberinfo.GetDisplayEnvForPos(pos:pos):Async<DisplayEnvoption>=
2101+
letuserOpName="CodeLens"
2102+
reactorOp userOpName"GetDisplayContextAtPos" None(fun ctok scope->
2103+
DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent ctok
2104+
let(nenv,_),_= scope.GetBestDisplayEnvForPos pos
2105+
Some nenv.DisplayEnv)
2106+
20962107
memberinfo.ImplementationFiles=
20972108
ifnot keepAssemblyContentsthen invalidOp"The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies"
20982109
scopeOptX

‎src/fsharp/service/service.fsi‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ type public FSharpCheckFileResults =
242242

243243
member internal GetVisibleNamespacesAndModulesAtPoint: pos-> Async<Tast.ModuleOrNamespaceRef[]>
244244

245+
/// Find the most precise display environment for the given line and column.
246+
member internal GetDisplayEnvForPos: pos: pos-> Async<DisplayEnv option>
247+
245248
/// Determines if a long ident is resolvable at a specific point.
246249
///<param name="userOpName">An optional string usedfor tracing compiler operations associatedwith this request.</param>
247250
memberinternalIsRelativeNameResolvable:cursorPos:pos* plid: string list* item: Item* ?userOpName: string-> Async<bool>

‎src/fsharp/symbols/Symbols.fs‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,6 +1844,23 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
18441844
prefix+ x.LogicalName
18451845
with_->"??"
18461846

1847+
memberx.FormatLayout(denv:FSharpDisplayContext)=
1848+
match x.IsMember, dwith
1849+
|true, V v->
1850+
NicePrint.prettyLayoutOfValOrMemberNoInst{(denv.Contents cenv.g)with showMemberContainers=true} v.Deref
1851+
|_,_->
1852+
checkIsResolved()
1853+
letty=
1854+
match dwith
1855+
| E e-> e.GetDelegateType(cenv.amap, range0)
1856+
| P p-> p.GetPropertyType(cenv.amap, range0)
1857+
| M m| C m->
1858+
letrty= m.GetFSharpReturnTy(cenv.amap, range0, m.FormalMethodInst)
1859+
letargtysl= m.GetParamTypes(cenv.amap, range0, m.FormalMethodInst)
1860+
mkIteratedFunTy(List.map(mkRefTupledTy cenv.g) argtysl) rty
1861+
| V v-> v.TauType
1862+
NicePrint.prettyLayoutOfTypeNoCx(denv.Contents cenv.g) ty
1863+
18471864

18481865
andFSharpType(cenv,typ:TType)=
18491866

@@ -1989,7 +2006,11 @@ and FSharpType(cenv, typ:TType) =
19892006

19902007
memberx.Format(denv:FSharpDisplayContext)=
19912008
protect<|fun()->
1992-
NicePrint.prettyStringOfTyNoCx(denv.Contents cenv.g) typ
2009+
NicePrint.prettyStringOfTyNoCx(denv.Contents cenv.g) typ
2010+
2011+
memberx.FormatLayout(denv:FSharpDisplayContext)=
2012+
protect<|fun()->
2013+
NicePrint.prettyLayoutOfTypeNoCx(denv.Contents cenv.g) typ
19932014

19942015
overridex.ToString()=
19952016
protect<|fun()->

‎src/fsharp/symbols/Symbols.fsi‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,9 @@ and [<Class>] public FSharpMemberOrFunctionOrValue =
819819

820820
/// Indicates if this is a constructor.
821821
memberIsConstructor:bool
822+
823+
/// Format the type using the rules of the given display context
824+
memberFormatLayout:context:FSharpDisplayContext->Layout
822825

823826

824827
/// A subtype of FSharpSymbol that represents a parameter
@@ -931,6 +934,9 @@ and [<Class>] public FSharpType =
931934
/// Format the type using the rules of the given display context
932935
memberFormat:context:FSharpDisplayContext->string
933936

937+
/// Format the type using the rules of the given display context
938+
memberFormatLayout:context:FSharpDisplayContext->Layout
939+
934940
/// Instantiate generic type parameters in a type
935941
memberInstantiate:(FSharpGenericParameter* FSharpType)list->FSharpType
936942

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp