Skip to content

Merge generics support in mscorlib #245

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Merge generics support in mscorlib #245

wants to merge 6 commits into from

Conversation

josesimoes
Copy link
Member

@josesimoes josesimoes commented Apr 29, 2025

Description

  • Merge with main.

Motivation and Context

  • Used for unit tests in interpreter.

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.

Summary by CodeRabbit

  • Chores
    • Updated pipeline configuration to simplify triggers and adjust release conditions.
    • Improved versioning scheme to use semantic preview versions and included an additional branch for public releases.

- Publish to nuget now happens on build from develop branch too.
- Temporary disable trigger for tags.

***NO_CI***
- Fix parameter name.
- Add branch to publish nugets from.

***NO_CI***
Copy link

coderabbitai bot commented Apr 29, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • nanoFramework.CoreLibrary.nuspec is excluded by none and included by none
  • nanoFramework.CoreLibrary/System/Guid.cs is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

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

Walkthrough

The changes update CI/CD pipeline and versioning configurations. The Azure Pipelines YAML file was modified to adjust trigger filters, add and duplicate a variable, and update template parameters. The release creation task conditions were broadened to include both the main and develop branches, and the logic for preview branch handling was simplified. The versioning configuration was updated to use a semantic versioning format with a preview tag and to include a new branch pattern for public releases.

Changes

File(s) Change Summary
azure-pipelines.yml Simplified pipeline trigger by removing tag filter, added and duplicated DOTNET_NOLOGO variable, set usePreviewBuild to true in a template, added baseBranchName: 'develop' to another template, and broadened GitHub release task conditions to include develop branch and removed preview branch check.
version.json Changed base version to 2.0.0-preview.{height}, introduced preview tag, and added ^refs/heads/generics$ to public release branch patterns.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant AzurePipelines
    participant GitHub
    participant VersionConfig

    Developer->>AzurePipelines: Push code or tag
    AzurePipelines->>AzurePipelines: Trigger build (no tag filter on "v*")
    AzurePipelines->>AzurePipelines: Set DOTNET_NOLOGO variable (global and job)
    AzurePipelines->>AzurePipelines: Run class-lib-build-only.yml (usePreviewBuild: true)
    AzurePipelines->>AzurePipelines: Run class-lib-publish.yml (baseBranchName: 'develop')
    AzurePipelines->>VersionConfig: Read version.json (semantic versioning, preview tag)
    AzurePipelines->>AzurePipelines: Check branch (main or develop)
    alt Not a PR and StartReleaseCandidate is false
        AzurePipelines->>GitHub: Create release
    end
Loading

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
azure-pipelines.yml (2)

59-60: Remove duplicate variable declaration & trailing spaces.

You’ve declared DOTNET_NOLOGO both globally (lines 36–37) and again under the Build_mscorlib job. This duplication is unnecessary and may lead to confusion. Also, YAMLlint flagged trailing spaces on line 60.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 60-60: trailing spaces

(trailing-spaces)


132-136: Consider adding the generics branch to release conditions.

You’ve broadened the GitHub release condition to run on main and develop. To stay consistent with the new publicReleaseRefSpec, you might also include generics here if you intend to create releases from that branch.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cca059e and e37e4b8.

⛔ Files ignored due to path filters (11)
  • .runsettings is excluded by none and included by none
  • Tests/NFUnitTestGC/TestGC.cs is excluded by none and included by none
  • Tests/NFUnitTestSystemLib/UnitTestGCTest.cs is excluded by none and included by none
  • Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs is excluded by none and included by none
  • Tests/NFUnitTestSystemLib/UnitTestReflectionTypeTest.cs is excluded by none and included by none
  • Tests/UnitTestLauncher/UnitTestLauncher.nfproj is excluded by none and included by none
  • nanoFramework.CoreLibrary.nuspec is excluded by none and included by none
  • nanoFramework.CoreLibrary/System/AssemblyInfo.cs is excluded by none and included by none
  • nanoFramework.CoreLibrary/System/GC.cs is excluded by none and included by none
  • nanoFramework.CoreLibrary/System/Guid.cs is excluded by none and included by none
  • nanoFramework.TestFramework is excluded by none and included by none
📒 Files selected for processing (2)
  • azure-pipelines.yml (3 hunks)
  • version.json (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[error] 60-60: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: nanoframework.CoreLibrary (Build_mscorlib)
  • GitHub Check: nanoframework.CoreLibrary (Build_mscorlib)
🔇 Additional comments (4)
version.json (2)

3-3: Approve semantic version update.

Updating the base version to "2.0.0-preview.{height}" correctly switches to semantic versioning with a preview suffix. This aligns with the pipeline change enabling preview builds.


14-14: Approve new public release branch pattern.

Adding ^refs/heads/generics$ to publicReleaseRefSpec ensures the newly merged “generics” branch is considered for public releases.

azure-pipelines.yml (2)

79-79: Verify template supports usePreviewBuild.

You’ve enabled usePreviewBuild: true in the class-lib-build-only.yml invocation. Please confirm that the template accepts and correctly propagates this parameter to invoke preview-mode builds as expected.


122-125: Ensure publish step aligns with new branches.

The class-lib-publish.yml template is now called with baseBranchName: 'develop'. Given that version.json includes a generics branch for public releases, please verify whether baseBranchName should dynamically reflect generics (or accept a list of branches) to fully support that branch.

- Add target for .NET Framework v4.7.2
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.

1 participant