Fix blank designer surface and make load failures diagnosable - #1
Merged
Conversation
A model whose Designer section listed <Diagrams> before <Connection> and <Options> failed EDMX schema validation. That made the artifact designer-unsafe, which silently skipped diagram creation, so the designer opened blank with nothing in the Error List to act on. Root cause and reporting: - Relax TDesigner in Edmx_3.xsd from xs:sequence to xs:choice. The parser dispatches on element name rather than position, so the order carried no meaning; only the schema cared. - Check each structural pre-condition independently and report each failure, instead of collapsing seven checks into one silent boolean. - Retain schema validation messages and source locations rather than only a count, so an invalid document names the element and line. - Report validation errors when the document cannot be matched to a project instead of discarding them, and stop swallowing exceptions during validation. Both defects are present upstream in dotnet/ef6tools. - Send load and validation diagnostics to IVsActivityLog as well as the debugger, so failures leave a trace in Release builds. UI: - Disable the floating zoom commands until a designer instance is loaded. The doc view's LoadView runs before the doc data's OnDocumentLoaded, so the view subscribes to a notification rather than polling. Fixes an assertion when toggling Show Grid over a blank surface. - Remove the dead HasLoadException bindings, which logged a WPF binding error on every Model Browser open and could never resolve. Removals, neither reachable for EF 6.5: - WCF Data Services detection and handling. - EDMX v1 and v2 schemas, which were embedded and copied but never loaded. Tests: - Cover Designer child ordering and schema error retention. Verified they fail against the previous schema. - Serialize SvgShapeRendererTests, which raced DSL Store static initialization under method-level parallelism and failed roughly 60% of runs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
Designersection with<Diagrams>before<Connection>/<Options>failed XSD validation → artifact designer-unsafe → diagram never created → blank surface, nothing in the Error ListTDesignerchanged fromxs:sequencetoxs:choice; the parser dispatches on element name, not position, so the order never meant anythingDiagnostics
(line N, position N)instead of just a countdotnet/ef6tools)catch { }inIsXmlValidIVsActivityLog, not justDebug.WriteLineUI
LoadViewruns beforeOnDocumentLoaded, so the view subscribes to a newModelDiagramLoadedevent instead of pollingHasLoadExceptionbindings (WPF binding error on every Model Browser open)Removed
Tests
xs:sequenceSvgShapeRendererTests→[DoNotParallelize]; raced DSLStorestatics, failed ~60% of runs. 6 clean runs sinceNotes
publishManifest.json, vsixmanifest)mainauto-publishes to VS Marketplace and cuts a release🤖 Generated with Claude Code