-
Notifications
You must be signed in to change notification settings - Fork 163
Upgrade Ionide.ProjInfo to 0.74.2 #1055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -291,12 +291,15 @@ module Crack = | |||||
|
|
||||||
|
|
||||||
| let result = | ||||||
| // Needs to be done before anything else | ||||||
| let cwd = System.Environment.CurrentDirectory |> System.IO.DirectoryInfo | ||||||
| let dotnetExe = getDotnetHostPath () |> Option.map System.IO.FileInfo | ||||||
| let _toolsPath = Init.init cwd dotnetExe | ||||||
| ProjectLoader.getProjectInfo projectFile extraMsbuildProperties BinaryLogGeneration.Off customProperties | ||||||
| //file |> Inspect.getProjectInfos loggedMessages.Enqueue msbuildExec [gp] [] | ||||||
| let projectCollection = new Microsoft.Build.Evaluation.ProjectCollection(dict extraMsbuildProperties) | ||||||
|
||||||
| let projectCollection = new Microsoft.Build.Evaluation.ProjectCollection(dict extraMsbuildProperties) | |
| use projectCollection = new Microsoft.Build.Evaluation.ProjectCollection(dict extraMsbuildProperties) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other cases would have failed anyway, says Claude; we should just be moving the error earlier. Claude is confident of that statement, but I haven't completely tracked everything down. Here's a partial analysis, with additional comments inline in code snippets from Claude.
The type definition is https://github.com/ionide/proj-info/blob/35d34d3e2181e476d3c008c291670253eee35afc/src/Ionide.ProjInfo/Library.fs#L997 .
type LoadedProjectInfo =
| StandardProjectInfo of ProjectOptions // Normal .fsproj/.csproj with design-time build
| TraversalProjectInfo of ProjectReference list // IsTraversal=true (e.g., dirs.proj aggregators)
| OtherProjectInfo of ProjectInstance // No design-time targets (e.g., .shproj)
proj-info classifies them at https://github.com/ionide/proj-info/blob/35d34d3e2181e476d3c008c291670253eee35afc/src/Ionide.ProjInfo/Library.fs#L661
match pi with
| IsTraversal -> Ok(TraversalProject pi) // Has IsTraversal=true property
| DesignTimeCapable designTimeTargets -> doDesignTimeBuild () // Has all design-time build targets
| _ -> Ok(Other pi) // Lacks design-time targets
On main which uses v0.62.0 of proj-info, loadProject runs design-time build unconditionally: https://github.com/ionide/proj-info/blob/v0.62.0/src/Ionide.ProjInfo/Library.fs#L542
Claude claims that a traversal project or a shared project wouldn't have ResolveAssemblyReferencesDesignTime, so the Build call would error on main; we're just making the error more explicit. It's not clear to me that this is actually true.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,7 +51,7 @@ | |
| <PackageReference Include="FSharp.Core" /> | ||
| <PackageReference Include="CommandLineParser" /> | ||
| <PackageReference Include="Ionide.ProjInfo" /> | ||
| <PackageReference Include="Ionide.ProjInfo.Sln" /> | ||
| <PackageReference Include="Microsoft.Build" IncludeAssets="compile" ExcludeAssets="runtime" PrivateAssets="all" /> | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is due to ionide/proj-info#206 (specifically https://github.com/ionide/proj-info/pull/206/changes#diff-44471b59d78aad3cf24d57a7b262f424f22d24d33090ace15bf5ce8345d4a53fR599 ). |
||
| <PackageReference Include="Suave" /> | ||
| </ItemGroup> | ||
| </Project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude moved this to earlier in the flow (i.e. the start of
crackProjects).