[Repo Assist] Update Ionide.ProjInfo to 0.74.2, fix URI format exception#1056
[Repo Assist] Update Ionide.ProjInfo to 0.74.2, fix URI format exception#1056github-actions[bot] wants to merge 4 commits intomainfrom
Conversation
- Update Ionide.ProjInfo from 0.62.0 to 0.74.2 - Remove Ionide.ProjInfo.Sln (merged into main package at v0.70.0) - Migrate crackProjectFileAndIncludeTargetFrameworks to use WorkspaceLoader.Create + LoadProjects instead of the removed ProjectLoader.getProjectInfo API - Fix InspectSln.tryParseSln pattern: Ok(_, slnData) -> Ok slnData (return type changed from Result<unit * SolutionData, exn> to Result<SolutionData, exn> in v0.74.x) Fixes #1054 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
(Consider #1055 instead, which uses the helper function from proj-info. Or don't; I don't mind!) |
This comment has been minimized.
This comment has been minimized.
|
@Smaug123 Trying to understand why your onw required the MSBuild package reference and this one doesn't seem to need to |
|
/repo-assist Please take a close look at #1055 which uses the helper function from proj-info and see if you can fold that in. Also analyze if/why the MSBuild reference was necessary in that PR and if there's something missing from your PR or maybe it doesn't much matter either way. Report back here with a comment or update this PR if you're really sure. |
…paceLoader Adopt the simpler lower-level API from Ionide.ProjInfo (as in PR #1055): - Replace WorkspaceLoader.Create + Notifications + LoadProjects with ProjectLoader.loadProject + ProjectLoader.getLoadedProjectInfo - Add explicit Microsoft.Build reference (compile-time only, ExcludeAssets=runtime) since ProjectCollection is now directly instantiated in user code - Fewer lines of code, no async notification subscription needed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
🤖 This is an automated response from Repo Assist. I've updated this PR to fold in PR #1055's approach. Here's the analysis: Why PR #1055 needed the
|
| | Ok loadedProject -> | ||
| match ProjectLoader.getLoadedProjectInfo projectFile customProperties loadedProject with | ||
| | Ok(ProjectLoader.LoadedProjectInfo.StandardProjectInfo projOptions) -> Ok projOptions | ||
| | Ok _ -> Error $"project '%s{projectFile}' is not a standard project" |
There was a problem hiding this comment.
I think we should log at info/debug and ignore if something isn't a standard project. So this could become Ok None, and fix up the filtering.
There was a problem hiding this comment.
Looks like we already have a "skipping" mechanism, so maybe just verify this doesn't stop processing other project.
This might require a @baronfel response |
|
@TheAngryByrd From the analysis above it looks like it may be better for us to continue to use WorkspaceLoader and avoid the MSBuild dependency, what do you think? |
|
Yeah I agree, the WorkspaceLoader is the interface to use. |
🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #1054
What Changed
Ionide.ProjInfo0.62.0 → 0.74.2 inDirectory.Packages.propsIonide.ProjInfo.Slnpackage — its functionality was merged into the mainIonide.ProjInfopackage at v0.70.0; no separate package exists for v0.70.0+ProjectCracker.fsto the newWorkspaceLoaderAPI:ProjectLoader.getProjectInfocall withWorkspaceLoader.Create(toolsPath, extraMsbuildProperties)+loader.LoadProjects([projectFile], customProperties, BinaryLogGeneration.Off)loader.NotificationsforWorkspaceProjectState.Failedto capture error messagesInspectSln.tryParseSlnpattern: changedOk(_, slnData)→Ok slnData— the return type changed fromResult(unit * SolutionData, exn)toResult(SolutionData, exn)in v0.74.xRoot Cause
The
VisualTree.relativePathOfURI format exception (reported in #1054) was triggered by a code path in olderIonide.ProjInfoversions that handled file URIs. The v0.74.2 release fixes this upstream. This PR upgrades to that version and adapts the API calls accordingly.Trade-offs
WorkspaceLoaderAPI loads the project and reports errors asynchronously viaNotifications. Errors are captured in aConcurrentQueuebefore being matched against the existingCrackErrorstype — no behaviour change for callers.Ionide.ProjInfo.Slnprovided solution-file parsing utilities; since these were merged intoIonide.ProjInfoitself, removing the separate package reference has no functional impact.Test Status
✅
dotnet build FSharp.Formatting.sln --configuration Release— succeeded, 0 warnings, 0 errors✅
dotnet test FSharp.Formatting.sln --configuration Release --no-build— 76 passed, 0 failed, 4 skipped✅
dotnet fantomas src/fsdocs-tool/ProjectCracker.fs— file already correctly formatted (unchanged)