Skip to content

Conversation

@dcyonce
Copy link

@dcyonce dcyonce commented Jul 23, 2025

Added parameterless constructor
Added CompareTo(Guid)
Added Equals(Guid)
Added == and != overloads

Description

Motivation and Context

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

Added parameterless constructor
Added CompareTo(Guid)
Added Equals(Guid)
Added == and != overloads
@coderabbitai
Copy link

coderabbitai bot commented Jul 23, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dcyonce
Copy link
Author

dcyonce commented Jul 23, 2025 via email

@dcyonce
Copy link
Author

dcyonce commented Jul 23, 2025 via email

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

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

Thank for this PR.
Mostly code style changes.
And if you could add a few unit tests to cover these new operators and catch the issues you've originally faced, that would be stellar!

Copy link
Author

@dcyonce dcyonce left a comment

Choose a reason for hiding this comment

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

I've made the changes... but I'm not sure how to use this GitHub Pull/Push Change process.
Do I submit a new Pull Request ?

@josesimoes
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

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

Looking good. Thanks.
Just added a few more.

You'll add the Unit tests in the next commit?

As for the pipelines, don't worry, for security reasons it requires a comment from a maintainer to run. I already did it for this last commit.

@dcyonce
Copy link
Author

dcyonce commented Aug 15, 2025

Sorry, I would add tests if I could, but I do not understand your test structure and how to run them.
I have added a file called UnitTestGuid.cs, but cannot figure out to run it. I always get deployment errors when trying to deploy NFUnitTestTypes

@josesimoes josesimoes changed the title Fixed null references in multiple methods, added == and != overloads Fixed null references and added == and != overloads in Guid Aug 18, 2025
@josesimoes
Copy link
Member

@dcyonce there are already a bunch of unit test for Guid. Please check here: Tests\NFUnitTestSystemLib\UnitTestGuid.cs

As for running the unit tests project: you have to build the solution (as usual). Following which, open the Test Explorer in VS.
You can run just the NFUnitTEstSystemLib group. Select it and hit the green arrow at the right.

image

The test runner should be able to install the virtual nanoclr (if not already there) and run the test group.
You can, of course, choose to run only the sub-group for Guid, but will take the same amount of time as the runner has to execute the complete group.

@dcyonce
Copy link
Author

dcyonce commented Aug 18, 2025 via email

@josesimoes
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@josesimoes
Copy link
Member

Doesn't seem to work. See the right panel: Outcomes: "351 Not Run"

That can show on test failure... I can't see any image, not sure if you've sent it.
Anyways, I've requested the pipeline to run the tests you've added. Let's how that goes.

@josesimoes
Copy link
Member

Unit tests failed because of the (expected) change in mscorlib assembly signature. This is caused because of the new operators you've added. Let me port these to the interpreter and see how this works.

@josesimoes
Copy link
Member

@dcyonce I've update the nf-interpreter with the declaration derived from these changes. Unit tests are all green.

nanoframework/nf-interpreter#3207

https://dev.azure.com/nanoframework/nf-interpreter/_build/results?buildId=56897&view=logs&j=b7088049-bee7-53c3-e276-6ac34cacc2cd&t=aedc1314-42e7-561b-942f-e764cb1b38bb

I've bumped the native assembly version, required when changes in the API surface.
If you don't have anything else to add, I'll merge this one.

@josesimoes
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@networkfusion
Copy link
Member

@dcyonce are you able to reply to @josesimoes last comment?

@josesimoes
Copy link
Member

@dcyonce one last attempt pinging your about this PR. Can you address my comment above and wrap up the work on this please? If not, let me know so we can add it to the work queue. 😉

@dcyonce
Copy link
Author

dcyonce commented Oct 31, 2025

Jose,
Your last comment was "Unit tests failed because of the (expected) change in mscorlib assembly signature. This is caused because of the new operators you've added. Let me port these to the interpreter and see how this works."

I don't see anything for me to do.

@josesimoes
Copy link
Member

@dcyonce just scroll down a little bit... 😅
This should be working now, just need your confirmation that there are no other changes that you want to add here.

@dcyonce
Copy link
Author

dcyonce commented Oct 31, 2025 via email

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for the nice improvement and fix.

@josesimoes josesimoes added Status: Waiting for native support ⚠️ DO NOT MERGE ⚠️ This is not to be merged. In doubt check with the person that put the label. labels Oct 31, 2025
@josesimoes
Copy link
Member

All good here. Waiting for a new release to merge.

@josesimoes josesimoes changed the base branch from main to develop November 24, 2025 12:35
@josesimoes josesimoes removed Status: Waiting for native support ⚠️ DO NOT MERGE ⚠️ This is not to be merged. In doubt check with the person that put the label. labels Nov 24, 2025
@josesimoes josesimoes merged commit 4738eed into nanoframework:develop Nov 24, 2025
2 checks passed
@nfbot
Copy link
Member

nfbot commented Nov 24, 2025

@dcyonce thank you again for your contribution! 🙏😄

.NET nanoFramework is all about community involvement, and no contribution is too small.
We would like to invite you to join the project's Contributors list.

Please edit it and add an entry with your GitHub username in the appropriate location (names are sorted alphabetically):

  <tr>
    <td><img src="https://github.com/dcyonce.png?size=50" height="50" width="50" ></td>
    <td><a href="/dcyonce">Don Yonce</a></td>
  </tr>

(Feel free to adjust your name if it's not correct)

@josesimoes josesimoes mentioned this pull request Nov 24, 2025
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot compare Guid to Guid.Empty

4 participants