Skip to content
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

[RGen] Use the correct attribute for field properties. #21959

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

mandel-macaque
Copy link
Member

We cannot use Export because we need to be ablet to pass the library name to generate the property field correctly. This change moves from using Export to Field which allows to mark a property as a field AND will allow use to add the library name.

This change + the one in PR
#21945 improves the way the Library.g.cs file is generated.

mandel-macaque and others added 2 commits January 13, 2025 14:13
We cannot use Export because we need to be ablet to pass the library
name to generate the property field correctly. This change moves from
using Export<Field> to Field<Property> which allows to mark a property
as a field AND will allow use to add the library name.

This change + the one in PR
#21945 improves the way
the Library.g.cs file is generated.
Copy link
Contributor

⚠️ Your code has been reformatted. ⚠️

If this is not desired, add the actions-disable-autoformat label, and revert the reformatting commit.

If files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).

Copy link
Contributor

@stephen-hawley stephen-hawley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor things, but nothing to hold you up.

error = new (ParsingError.UnknownConstructor, attributeData.ConstructorArguments.Length);

if (attributeData.ConstructorArguments [1].Value is string) {
libraryName = (string?) attributeData.ConstructorArguments [1].Value!;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not:

if (attributeData.ConstructorArguments [1].Value is string libValue) {
    libraryName = (string?)libValue;
}

Copy link
Member Author

@mandel-macaque mandel-macaque Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not think about it, I'll update the code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now that I'm chasing it, I just found it weird to assign the variable, I wish the 'is' had a way to set the variable to be one you already have.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@mandel-macaque mandel-macaque merged commit 9de395d into main Jan 14, 2025
15 of 17 checks passed
@mandel-macaque mandel-macaque deleted the dev/mandel/fields-classes-field-attr branch January 14, 2025 09:47
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 9de395d62bfc360a3370767acfefa26bf2b1dd19 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 9de395d62bfc360a3370767acfefa26bf2b1dd19 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 9de395d62bfc360a3370767acfefa26bf2b1dd19 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 9de395d62bfc360a3370767acfefa26bf2b1dd19 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 9de395d62bfc360a3370767acfefa26bf2b1dd19 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❗ API diff for current PR / commit (Breaking changes)

.NET ( ❗ Breaking changes ❗ )

❗ API diff vs stable (Breaking changes)

.NET ( ❗ Breaking changes ❗ )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 9de395d62bfc360a3370767acfefa26bf2b1dd19 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 9de395d62bfc360a3370767acfefa26bf2b1dd19 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Build passed (Build packages) ✅

Pipeline on Agent
Hash: af3a463905b3e27405990cf3e9b682c8ec05bc8f [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: af3a463905b3e27405990cf3e9b682c8ec05bc8f [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 1 tests failed, 111 tests passed.

Failures

❌ linker tests

1 tests failed, 39 tests passed.
  • trimmode link/Mac Catalyst/Release: Failed (Test run failed.
    Tests run: 130 Passed: 125 Inconclusive: 0 Failed: 1 Ignored: 4)

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: af3a463905b3e27405990cf3e9b682c8ec05bc8f [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants