feat(rdl): add property and event shorthand syntax for interfaces#4143
feat(rdl): add property and event shorthand syntax for interfaces#4143
Conversation
|
@copilot this PR has unrelated changes - please rebase on master |
The feature implementation is correct and only touches 7 files relative to current master ( The PR is showing unrelated files (25 total) because the stored PR base sha is The fix requires force-pushing a clean linear branch ( |
|
@copilot I can clone the branch - give me the exact git command to run., |
git clone https://github.com/microsoft/windows-rs
cd windows-rs
git fetch origin master copilot/add-simpler-syntax-patterns
git checkout copilot/add-simpler-syntax-patterns
git reset --soft 1ec3db9
git commit -m "feat(rdl): add property and event shorthand syntax for interfaces"
git push --force origin copilot/add-simpler-syntax-patterns
|
11fd640 to
d7cdb6e
Compare
|
@tim-weis thoughts? |
|
@copilot - looks like a bad merge - please fix |
The automated push tooling rebases rather than force-pushes, so it can't rewrite the merge history. To squash the bad merge down to a single clean commit on top of current master, run: git fetch origin copilot/add-simpler-syntax-patterns
git checkout copilot/add-simpler-syntax-patterns
git reset --soft 0c719dc
git commit -m "feat(rdl): add property and event shorthand syntax for interfaces"
git push --force origin copilot/add-simpler-syntax-patterns
|
9bd3766 to
b7202ee
Compare
…uash Agent-Logs-Url: https://github.com/microsoft/windows-rs/sessions/3864acd7-a8ea-48c6-92d8-c0a18fb29083 Co-authored-by: kennykerr <9845234+kennykerr@users.noreply.github.com>
That looked good until it was brought to my attention that I had overlooked the opportunity for a collision with the RDL
Regardless of the approach taken, there are a few rough edges that should be addressed: Canonical representation (QoL)Enforcing canonical representations is a good thing, and I was delighted to see the RDL parser rejecting This should be rejected for the same reason that Type loss (bug)A similarly structured RDL surfaces a genuine bug: Running this RDL through the same V-table ordering (bug)Toying about with this, I discovered another, more realistic bug: Interleaving disparate gets round-tripped into: This effectively moves Symbol duplication (QoL/bug?)There's another unrelated yet prevalent issue that's probably not exclusive to properties: Symbols can be repeated within the same scope. Consider the following RDL This round-trips perfectly and makes for a valid interface description in terms of the ABI. This interface description, however, cannot be directly/easily projected into any programming language I'm familiar with. This is an issue that needs to be addressed. |
InterfaceMember::Methodarm — WinRT type-validation and param code displaced into the wrong loops by a bad merge squashreader/interface.rs(restore WinRT param/return validation in correct positions, remove displacedparam(pt)from attrs loop, remove dangling code outside the match arm)panic.rstest file (two new test functions missing their closing);and})