Skip to content

Commit 0e2be85

Browse files
authored
Better SDK probing support and graph build fixes (#111)
* project for tool * WIP diagnose sdk issues * Add lots of usage docs * more docs * working buildalyzer cracking of solutions * more experiments * Remove buildalyzer * remove net6.0 * remove helper methods for 3.x and 5.x sdks in favor of ahving callers compute those * use more semanticversioning * reinstate global.json * better error * better error message * tests pick dotnet exe better * fix packaging warning * remove unused parameter * better error message * Add more options for binary log configuration * fix expected path * revert to FCS 39 for now for compatibility * changelogs * use the types, Luke * disable workload resolver at an env variable level to prevent fsi from going bonkers * release notes * readme notes on the cli tool * unify on directoryinfo * float global.json
1 parent e762856 commit 0e2be85

File tree

28 files changed

+736
-338
lines changed

28 files changed

+736
-338
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "5.257.0",
6+
"version": "6.0.0-rc006",
77
"commands": [
88
"paket"
99
]

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
os: [ubuntu-latest, windows-latest, macOS-latest]
10-
dotnet: [5.0.100]
10+
dotnet: [5.0.x]
1111
fail-fast: false # we have timing issues on some OS, so we want them all to run
1212
runs-on: ${{ matrix.os }}
1313
timeout-minutes: 15

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [windows-latest]
13-
dotnet: [5.0.100]
13+
dotnet: [5.0.x]
1414
runs-on: ${{ matrix.os }}
1515

1616
steps:

.paket/Paket.Restore.targets

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
This value should match the version in the props generated by paket
160160
If they differ, this means we need to do a restore in order to ensure correct dependencies
161161
-->
162-
<PropertyGroup Condition="'$(PaketPropsVersion)' != '5.185.3' ">
162+
<PropertyGroup Condition="'$(PaketPropsVersion)' != '6.0.0' ">
163163
<PaketRestoreRequired>true</PaketRestoreRequired>
164164
</PropertyGroup>
165165

@@ -237,12 +237,16 @@
237237
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
238238
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
239239
<CopyLocal Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
240+
<OmitContent Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '7'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
241+
<ImportTargets Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '8'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
240242
</PaketReferencesFileLinesInfo>
241243
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
242244
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
243245
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
244246
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' == '6' And %(PaketReferencesFileLinesInfo.CopyLocal) == 'false'">runtime</ExcludeAssets>
245247
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
248+
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
249+
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.ImportTargets) == 'false'">$(ExcludeAssets);build;buildMultitargeting;buildTransitive</ExcludeAssets>
246250
<Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
247251
<AllowExplicitVersion>true</AllowExplicitVersion>
248252
</PackageReference>
@@ -289,14 +293,16 @@
289293
<PropertyGroup>
290294
<PaketProjectFile>$(MSBuildProjectDirectory)/$(MSBuildProjectFile)</PaketProjectFile>
291295
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
296+
<UseMSBuild16_10_Pack>false</UseMSBuild16_10_Pack>
297+
<UseMSBuild16_10_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND '@(MSBuildMinorVersion)' > '10' ">true</UseMSBuild16_10_Pack>
292298
<UseMSBuild16_0_Pack>false</UseMSBuild16_0_Pack>
293-
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' ">true</UseMSBuild16_0_Pack>
299+
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild16_0_Pack>
294300
<UseMSBuild15_9_Pack>false</UseMSBuild15_9_Pack>
295301
<UseMSBuild15_9_Pack Condition=" '@(MSBuildMajorVersion)' == '15' AND '@(MSBuildMinorVersion)' > '8' ">true</UseMSBuild15_9_Pack>
296302
<UseMSBuild15_8_Pack>false</UseMSBuild15_8_Pack>
297-
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseMSBuild15_8_Pack>
303+
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild15_8_Pack>
298304
<UseNuGet4_Pack>false</UseNuGet4_Pack>
299-
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseNuGet4_Pack>
305+
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseNuGet4_Pack>
300306
<AdjustedNuspecOutputPath>$(PaketIntermediateOutputPath)\$(Configuration)</AdjustedNuspecOutputPath>
301307
<AdjustedNuspecOutputPath Condition="@(_NuspecFilesNewLocation) == ''">$(PaketIntermediateOutputPath)</AdjustedNuspecOutputPath>
302308
</PropertyGroup>
@@ -314,6 +320,55 @@
314320
</ConvertToAbsolutePath>
315321

316322
<!-- Call Pack -->
323+
<PackTask Condition="$(UseMSBuild16_10_Pack)"
324+
PackItem="$(PackProjectInputFile)"
325+
PackageFiles="@(_PackageFiles)"
326+
PackageFilesToExclude="@(_PackageFilesToExclude)"
327+
PackageVersion="$(PackageVersion)"
328+
PackageId="$(PackageId)"
329+
Title="$(Title)"
330+
Authors="$(Authors)"
331+
Description="$(Description)"
332+
Copyright="$(Copyright)"
333+
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
334+
LicenseUrl="$(PackageLicenseUrl)"
335+
ProjectUrl="$(PackageProjectUrl)"
336+
IconUrl="$(PackageIconUrl)"
337+
ReleaseNotes="$(PackageReleaseNotes)"
338+
Tags="$(PackageTags)"
339+
DevelopmentDependency="$(DevelopmentDependency)"
340+
BuildOutputInPackage="@(_BuildOutputInPackage)"
341+
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
342+
SymbolPackageFormat="$(SymbolPackageFormat)"
343+
TargetFrameworks="@(_TargetFrameworks)"
344+
AssemblyName="$(AssemblyName)"
345+
PackageOutputPath="$(PackageOutputAbsolutePath)"
346+
IncludeSymbols="$(IncludeSymbols)"
347+
IncludeSource="$(IncludeSource)"
348+
PackageTypes="$(PackageType)"
349+
IsTool="$(IsTool)"
350+
RepositoryUrl="$(RepositoryUrl)"
351+
RepositoryType="$(RepositoryType)"
352+
SourceFiles="@(_SourceFiles->Distinct())"
353+
NoPackageAnalysis="$(NoPackageAnalysis)"
354+
MinClientVersion="$(MinClientVersion)"
355+
Serviceable="$(Serviceable)"
356+
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
357+
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
358+
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
359+
IncludeBuildOutput="$(IncludeBuildOutput)"
360+
BuildOutputFolders="$(BuildOutputTargetFolder)"
361+
ContentTargetFolders="$(ContentTargetFolders)"
362+
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
363+
NuspecFile="$(NuspecFileAbsolutePath)"
364+
NuspecBasePath="$(NuspecBasePath)"
365+
NuspecProperties="$(NuspecProperties)"
366+
PackageLicenseFile="$(PackageLicenseFile)"
367+
PackageLicenseExpression="$(PackageLicenseExpression)"
368+
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
369+
PackageReadmeFile="$(PackageReadmeFile)"
370+
NoDefaultExcludes="$(NoDefaultExcludes) "/>
371+
317372
<PackTask Condition="$(UseMSBuild16_0_Pack)"
318373
PackItem="$(PackProjectInputFile)"
319374
PackageFiles="@(_PackageFiles)"
@@ -343,6 +398,8 @@
343398
IsTool="$(IsTool)"
344399
RepositoryUrl="$(RepositoryUrl)"
345400
RepositoryType="$(RepositoryType)"
401+
RepositoryBranch="$(RepositoryBranch)"
402+
RepositoryCommit="$(RepositoryCommit)"
346403
SourceFiles="@(_SourceFiles->Distinct())"
347404
NoPackageAnalysis="$(NoPackageAnalysis)"
348405
MinClientVersion="$(MinClientVersion)"
@@ -359,7 +416,8 @@
359416
NuspecProperties="$(NuspecProperties)"
360417
PackageLicenseFile="$(PackageLicenseFile)"
361418
PackageLicenseExpression="$(PackageLicenseExpression)"
362-
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" />
419+
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
420+
NoDefaultExcludes="$(NoDefaultExcludes)" />
363421

364422
<PackTask Condition="$(UseMSBuild15_9_Pack)"
365423
PackItem="$(PackProjectInputFile)"
@@ -390,6 +448,8 @@
390448
IsTool="$(IsTool)"
391449
RepositoryUrl="$(RepositoryUrl)"
392450
RepositoryType="$(RepositoryType)"
451+
RepositoryBranch="$(RepositoryBranch)"
452+
RepositoryCommit="$(RepositoryCommit)"
393453
SourceFiles="@(_SourceFiles->Distinct())"
394454
NoPackageAnalysis="$(NoPackageAnalysis)"
395455
MinClientVersion="$(MinClientVersion)"
@@ -433,6 +493,8 @@
433493
IsTool="$(IsTool)"
434494
RepositoryUrl="$(RepositoryUrl)"
435495
RepositoryType="$(RepositoryType)"
496+
RepositoryBranch="$(RepositoryBranch)"
497+
RepositoryCommit="$(RepositoryCommit)"
436498
SourceFiles="@(_SourceFiles->Distinct())"
437499
NoPackageAnalysis="$(NoPackageAnalysis)"
438500
MinClientVersion="$(MinClientVersion)"
@@ -475,6 +537,8 @@
475537
IsTool="$(IsTool)"
476538
RepositoryUrl="$(RepositoryUrl)"
477539
RepositoryType="$(RepositoryType)"
540+
RepositoryBranch="$(RepositoryBranch)"
541+
RepositoryCommit="$(RepositoryCommit)"
478542
SourceFiles="@(_SourceFiles->Distinct())"
479543
NoPackageAnalysis="$(NoPackageAnalysis)"
480544
MinClientVersion="$(MinClientVersion)"

.vscode/launch.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,40 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "Launch Tool 5.0 graph resolver",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/src/Ionide.ProjInfo.Tool/bin/Debug/net5.0/Ionide.ProjInfo.Tool.dll",
12+
"args": [
13+
"--project",
14+
"<your project>",
15+
"--graph"
16+
],
17+
"cwd": "${workspaceFolder}/src/Ionide.ProjInfo.Tool",
18+
"stopAtEntry": false,
19+
"console": "internalConsole",
20+
"justMyCode": true,
21+
},
22+
{
23+
"name": "Launch Tool 5.0 normal resolver",
24+
"type": "coreclr",
25+
"request": "launch",
26+
"program": "${workspaceFolder}/src/Ionide.ProjInfo.Tool/bin/Debug/net5.0/Ionide.ProjInfo.Tool.dll",
27+
"args": [
28+
"--project",
29+
"<your project>",
30+
],
31+
"cwd": "${workspaceFolder}/src/Ionide.ProjInfo.Tool",
32+
"stopAtEntry": false,
33+
"console": "integratedTerminal",
34+
"justMyCode": false,
35+
"symbolOptions": {
36+
"searchPaths": [],
37+
"searchMicrosoftSymbolServer": false,
38+
"searchNuGetOrgSymbolServer": true
39+
}
40+
},
741
{
842
"name": "Ionide.ProjInfo.Tests",
943
"type": "coreclr",

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.54.0] - 2021-08-08
8+
### Added
9+
10+
- The save path for binary logs can now be set
11+
12+
### Changed
13+
14+
- Reverted to FCS 39 for compatibilties' sake
15+
- Removed dependency on MsBuild.Locator
16+
- Massively improved compatibility for cracking projects on a broader range of SDK versions
17+
- Fixed a regression in the MSBuild Graph Workspace Loader that resulted in it not working on SDKs greater than 5.0.10x
18+
- centralized the setting of process-level MSBuild and dotnet SDK environment variables into the `init` function, extracting them out of the individual workspace loaders. this should ensure a consistent experience regardless of loader chosen.
19+
720
## [0.53.1] - 2021-06-23
821

922
### Changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Parsing and evaluating of `.fsproj` files. This repository contains several pack
77
* `Ionide.ProjInfo.Sln` - library for parsing `.sln` files
88
* `Ionide.ProjInfo.FCS` - library providing utility for mapping project data types used by `Ionide.ProjInfo` into `FSharpProjectOptions` type used by `FSharp.Compiler.Service`
99
* `Ionide.ProjInfo.ProjectSystem` - library providing high level project system component that can be used by editor tooling. It supports features like tracking changes, event-driven notifications about project loading status, and persistent caching of the data for fast initial load.
10+
* `Ionide.ProjInfo.Tool` - a CLI tool intended to help with debugging the cracking of various projects easily
1011

1112
---
1213
You can support Ionide development on [Open Collective](https://opencollective.com/ionide).

build.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Target.create
132132
("PackageTags", tags)
133133
("RepositoryType", "git")
134134
("RepositoryUrl", gitUrl)
135-
("PackageLicenseUrl", gitUrl + "/LICENSE")
135+
("PackageLicenseExpression", "MIT")
136136
("PackageReleaseNotes", packageReleaseNotes)
137137
("PackageDescription", summary)
138138
("EnableSourceLink", "true") ]

global.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"sdk": {
3-
"version": "5.0.100"
3+
"version": "5.0.300",
4+
"rollForward": "minor"
45
}
56
}

ionide-proj-info.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Ionide.ProjInfo.FCS", "src\
1717
EndProject
1818
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Ionide.ProjInfo.ProjectSystem", "src\Ionide.ProjInfo.ProjectSystem\Ionide.ProjInfo.ProjectSystem.fsproj", "{5156E51B-B489-4E0A-865B-79BADB009BD1}"
1919
EndProject
20+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Ionide.ProjInfo.Tool", "src\Ionide.ProjInfo.Tool\Ionide.ProjInfo.Tool.fsproj", "{70299F84-2326-4814-9D13-44766E7EEAFC}"
21+
EndProject
2022
Global
2123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2224
Debug|Any CPU = Debug|Any CPU
@@ -90,12 +92,25 @@ Global
9092
{5156E51B-B489-4E0A-865B-79BADB009BD1}.Release|x64.Build.0 = Release|Any CPU
9193
{5156E51B-B489-4E0A-865B-79BADB009BD1}.Release|x86.ActiveCfg = Release|Any CPU
9294
{5156E51B-B489-4E0A-865B-79BADB009BD1}.Release|x86.Build.0 = Release|Any CPU
95+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
96+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
97+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Debug|x64.ActiveCfg = Debug|Any CPU
98+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Debug|x64.Build.0 = Debug|Any CPU
99+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Debug|x86.ActiveCfg = Debug|Any CPU
100+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Debug|x86.Build.0 = Debug|Any CPU
101+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
102+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Release|Any CPU.Build.0 = Release|Any CPU
103+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Release|x64.ActiveCfg = Release|Any CPU
104+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Release|x64.Build.0 = Release|Any CPU
105+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Release|x86.ActiveCfg = Release|Any CPU
106+
{70299F84-2326-4814-9D13-44766E7EEAFC}.Release|x86.Build.0 = Release|Any CPU
93107
EndGlobalSection
94108
GlobalSection(NestedProjects) = preSolution
95109
{B86D70F6-12F9-42E7-8A04-2C21FC91DF9C} = {0EF20E50-D076-480D-BC88-951E5AC8643E}
96110
{7C01A809-1EA9-43A4-BEDC-5488084A22B1} = {0EF20E50-D076-480D-BC88-951E5AC8643E}
97111
{84BB0C5F-EE12-41C4-ADC9-05FBF54CB7CC} = {E53FFF53-7874-40D6-8070-EB4E6F5067B9}
98112
{AFEB904E-2ACD-4144-BD4B-BEC5772CCFA7} = {0EF20E50-D076-480D-BC88-951E5AC8643E}
99113
{5156E51B-B489-4E0A-865B-79BADB009BD1} = {0EF20E50-D076-480D-BC88-951E5AC8643E}
114+
{70299F84-2326-4814-9D13-44766E7EEAFC} = {0EF20E50-D076-480D-BC88-951E5AC8643E}
100115
EndGlobalSection
101116
EndGlobal

0 commit comments

Comments
 (0)