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

Commit47aff4d

Browse files
committed
Merge branch 'master' into fsharp4
2 parents3a1ddb1 +bf32157 commit47aff4d

File tree

12 files changed

+58
-23
lines changed

12 files changed

+58
-23
lines changed

‎src/fsharp/FSharp.Build/Fsc.fs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
350350
base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands)
351351
/// Intercept the call to ExecuteTool to handle the host compile case.
352352
overridefsc.ExecuteTool(pathToTool,responseFileCommands,commandLineCommands)=
353-
letho= box fsc.HostObject
354-
matchhowith
353+
lethost= box fsc.HostObject
354+
matchhostwith
355355
|null->
356356
base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands)
357357
|_->
@@ -362,7 +362,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
362362
letbaseCallDelegate=new System.Converter<int,int>(baseCall)
363363
try
364364
letret=
365-
(ho.GetType()).InvokeMember("Compile", BindingFlags.Public||| BindingFlags.NonPublic||| BindingFlags.InvokeMethod||| BindingFlags.Instance,null,ho,
365+
(host.GetType()).InvokeMember("Compile", BindingFlags.Public||| BindingFlags.NonPublic||| BindingFlags.InvokeMethod||| BindingFlags.Instance,null,host,
366366
[| box baseCallDelegate; box(capturedArguments|> List.toArray); box(capturedFilenames|> List.toArray)|],
367367
System.Globalization.CultureInfo.InvariantCulture)
368368
unbox ret

‎src/fsharp/tast.fs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4128,7 +4128,8 @@ let accessSubstPaths (newPath,oldPath) (TAccess paths) =
41284128
letcompPathOfCcu(ccu:CcuThunk)= CompPath(ccu.ILScopeRef,[])
41294129
lettaccessPublic= TAccess[]
41304130
lettaccessPrivate accessPath= TAccess[accessPath]
4131-
lettaccessInternal= TAccess[CompPath(ILScopeRef.Local,[])]
4131+
letcompPathInternal= CompPath(ILScopeRef.Local,[])
4132+
lettaccessInternal= TAccess[compPathInternal]
41324133
letcombineAccess(TAccess a1)(TAccess a2)= TAccess(a1@a2)
41334134

41344135
//---------------------------------------------------------------------------

‎src/fsharp/tc.fs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,12 @@ let computeAccessRights eAccessPath eInternalsVisibleCompPaths eFamilyType =
276276
AccessibleFrom (eAccessPath :: eInternalsVisibleCompPaths, eFamilyType) // env.eAccessRights
277277

278278
let emptyTcEnv g =
279-
let cpath =CompPath (g.ilg.traits.ScopeRef,[])
279+
let cpath =compPathInternal // allow internal access initially
280280
{ eNameResEnv = NameResolutionEnv.Empty(g)
281281
eUngeneralizableItems=[]
282282
ePath=[]
283-
eCompPath=cpath// dummy
284-
eAccessPath=cpath// dummy
283+
eCompPath=cpath
284+
eAccessPath=cpath
285285
eAccessRights=computeAccessRights cpath [] None // compute this field
286286
eInternalsVisibleCompPaths=[]
287287
eModuleOrNamespaceTypeAccumulator= ref (NewEmptyModuleOrNamespaceType Namespace)

‎tests/fsharp/core/verify/build.bat‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ call %~d0%~p0..\..\..\config.bat
1414
"%PEVERIFY%""%FSCOREDLLPORTABLEPATH%"
1515
@if ERRORLEVEL1goto Error
1616

17+
"%PEVERIFY%""%FSCOREDLLNETCOREPATH%"
18+
@if ERRORLEVEL1goto Error
19+
20+
"%PEVERIFY%""%FSCOREDLLNETCORE78PATH%"
21+
@if ERRORLEVEL1goto Error
22+
23+
"%PEVERIFY%""%FSCOREDLLNETCORE259PATH%"
24+
@if ERRORLEVEL1goto Error
25+
1726
"%PEVERIFY%""%FSCBinPath%\FSharp.Build.dll"
1827
@if ERRORLEVEL1goto Error
1928

‎tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/ModuleDefinitions/env.lst‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# failing due to bug 175204, uncomment when fix is ready
2-
# SOURCE="Module_internal01.fs Module_internalConsumer01.fs"# Module_internal01
1+
SOURCE="Module_internal01.fs Module_internalConsumer01.fs"# Module_internal01
32

43
SOURCE=E_ModuleSuffix01.fsx SCFLAGS="--test:ErrorRanges"# E_ModuleSuffix01.fsx
54
SOURCE=E_ModuleSuffix_NameClash01.fsx SCFLAGS="--test:ErrorRanges"# E_ModuleSuffix_NameClash01.fsx

‎vsintegration/src/unittests/Tests.ProjectSystem.UpToDate.fs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ type UpToDate() =
3333
<Content Include=""content.txt"" />
3434
<Resource Include=""resource.txt"" />
3535
<EmbeddedResource Include=""embedresource.txt"" />
36+
<None Include=""App.config"" />
3637
<None Include=""none.txt"" />
3738
</ItemGroup>
3839
",(fun project->
@@ -44,6 +45,7 @@ type UpToDate() =
4445
letsourcePath= Path.Combine(project.ProjectFolder,"file1.fs")
4546
letcontentPath= Path.Combine(project.ProjectFolder,"content.txt")
4647
letresourcePath= Path.Combine(project.ProjectFolder,"resource.txt")
48+
letconfigPath= Path.Combine(project.ProjectFolder,"App.config")
4749
letnonePath= Path.Combine(project.ProjectFolder,"none.txt")
4850
letembedPath= Path.Combine(project.ProjectFolder,"embedresource.txt")
4951

@@ -52,18 +54,19 @@ type UpToDate() =
5254
File.AppendAllText(sourcePath,"printfn\"hello\"")
5355
File.AppendAllText(contentPath,"some content")
5456
File.AppendAllText(resourcePath,"some resource")
57+
File.AppendAllText(configPath,"""<?xml version="1.0" encoding="utf-8" ?><configuration></configuration>""")
5558
File.AppendAllText(nonePath,"none")
5659
File.AppendAllText(embedPath,"some embedded resource")
5760

5861
Assert.IsFalse(config.IsUpToDate(logger,true))
5962
project.Build(configNameDebug, output,"Build")|> ignore
6063
Assert.IsTrue(config.IsUpToDate(logger,true))
6164

62-
// None items should not affect up-to-date
65+
// None items should not affect up-to-date (unless captured by well-known items, e.g. App.config)
6366
File.SetLastWriteTime(nonePath, DateTime.Now.AddMinutes(5.))
6467
Assert.IsTrue(config.IsUpToDate(logger,true))
6568

66-
for pathin[sourcePath; contentPath; resourcePath; embedPath]do
69+
for pathin[sourcePath; contentPath; resourcePath; embedPath; configPath]do
6770
printfn"Testing path%s" path
6871

6972
// touch file

‎vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
<DelaySign>true</DelaySign>
4040
</PropertyGroup>
4141
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.settings.targets" />
42-
<PropertyGroup>
43-
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(protoCLIDir)\bin</OutputPath>
44-
</PropertyGroup>
4542
<ItemGroup>
4643
<ReferenceInclude="Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
4744
<SpecificVersion>true</SpecificVersion>

‎vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/GroupingReferenceNode.cs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ public class GroupingReferenceNode : ReferenceNode
3535
publicstringIdentity{get;privateset;}
3636
publicstringResolutionPath{get;privateset;}
3737
publicstringVersion{get;privateset;}
38+
publicstring[]GroupedItems{get;privateset;}
3839

39-
publicGroupingReferenceNode(ProjectNodeproject,stringname,stringidentity,stringresolutionPath,stringversion)
40+
publicGroupingReferenceNode(ProjectNodeproject,stringname,stringidentity,stringresolutionPath,stringversion,string[]groupedItems)
4041
:base(project)
4142
{
4243
Name=name;
4344
Identity=identity;
4445
ResolutionPath=resolutionPath;
4546
Version=version;
47+
GroupedItems=groupedItems;
4648
}
4749

4850
publicoverridestringCaption

‎vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs‎

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,16 +1484,44 @@ internal bool GetUTDCheckInputs(ref HashSet<string> inputs)
14841484
inputs.Add(Utilities.CanonicalizeFileNameNoThrow(Path.Combine(projDir,propVal)));
14851485
}
14861486

1487+
// other well-known special files that were otherwise missed
1488+
varspecialFiles=this.project.InteropSafeIVsHierarchyasIVsProjectSpecialFiles;
1489+
if(specialFiles==null)
1490+
returnfalse;
1491+
1492+
for(intfileId=(int)__PSFFILEID5.PSFFILEID_FIRST5;fileId<=(int)__PSFFILEID.PSFFILEID_LAST;fileId++)
1493+
{
1494+
uintitemId;
1495+
stringfileName;
1496+
if(ErrorHandler.Succeeded(specialFiles.GetFile(fileId,(uint)__PSFFLAGS.PSFF_FullPath,outitemId,outfileName))
1497+
&&itemId!=(uint)VSConstants.VSITEMID.Nil)
1498+
{
1499+
inputs.Add(Utilities.CanonicalizeFileNameNoThrow(fileName));
1500+
}
1501+
}
1502+
14871503
// assembly and project references
1488-
foreach(varreferenceinthis.project.GetReferenceContainer().EnumReferences())
1504+
foreach(varreferenceinthis.project.GetReferenceContainer().EnumReferences())
14891505
{
14901506
if(referenceisAssemblyReferenceNode)
14911507
inputs.Add(Utilities.CanonicalizeFileNameNoThrow(reference.Url));
14921508
elseif(referenceisProjectReferenceNode)
14931509
inputs.Add(Utilities.CanonicalizeFileNameNoThrow((referenceasProjectReferenceNode).ReferencedProjectOutputPath));
1510+
elseif(referenceisComReferenceNode)
1511+
inputs.Add(Utilities.CanonicalizeFileNameNoThrow((referenceasComReferenceNode).InstalledFilePath));
1512+
elseif(referenceisGroupingReferenceNode)
1513+
{
1514+
foreach(vargroupedRefin((GroupingReferenceNode)reference).GroupedItems)
1515+
{
1516+
inputs.Add(Utilities.CanonicalizeFileNameNoThrow(groupedRef));
1517+
}
1518+
}
14941519
else
1520+
{
14951521
// some reference type we don't know about
1522+
System.Diagnostics.Debug.Assert(false,"Unexpected reference type","{0}",reference);
14961523
returnfalse;
1524+
}
14971525
}
14981526

14991527
returntrue;

‎vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectSystem.Base.csproj‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
<StrongNames>true</StrongNames>
3838
<DelaySign>true</DelaySign>
3939
</PropertyGroup>
40-
<PropertyGroup>
41-
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(protoCLIDir)\bin</OutputPath>
42-
</PropertyGroup>
4340
<ItemGroup>
4441
<ReferenceInclude="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
4542
<SpecificVersion>true</SpecificVersion>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp