-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
base: main
Are you sure you want to change the base?
Conversation
- 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***
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughCI pipeline and versioning were updated: azure-pipelines.yml changes template parameters, variables, triggers, and release conditions; a new template was added to extract nanoCLR build IDs from PRs and optionally download artifacts; version.json switched to semantic preview versioning and added a branch pattern. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant AP as AzurePipelines
participant GH as GitHub
participant Art as ArtifactStorage
Dev->>AP: Push / open PR
AP->>AP: Start pipeline
alt PR present
AP->>AP: Run check-nf-interpreter-to-test template
AP->>GH: GET /repos/.../pulls/{PR} (auth: GITHUB_TOKEN)
GH-->>AP: PR payload (body)
AP->>AP: Verify PR number, extract buildId via regex
alt buildId found and DownloadNanoClrPreview = true
AP->>Art: Download nanoCLR artifact (by buildId)
Art-->>AP: artifact (nanoCLR dll)
AP->>AP: Set NF_MDP_NANOCLR_INSTANCE_PATH variable
else
AP-->>AP: Skip download
end
end
AP->>AP: Run class-lib-build-only (usePreviewBuild: true)
AP->>AP: Run class-lib-publish (baseBranchName: develop)
AP->>AP: Read version.json (2.0.0-preview.{height})
AP->>AP: Evaluate release condition (branch main or develop, not StartReleaseCandidate)
alt release conditions satisfied
AP->>GH: Create GitHub release (isPreRelease when branch is develop)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this 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_NOLOGOboth globally (lines 36–37) and again under theBuild_mscorlibjob. 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 thegenericsbranch to release conditions.You’ve broadened the GitHub release condition to run on
mainanddevelop. To stay consistent with the newpublicReleaseRefSpec, you might also includegenericshere if you intend to create releases from that branch.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (11)
.runsettingsis excluded by none and included by noneTests/NFUnitTestGC/TestGC.csis excluded by none and included by noneTests/NFUnitTestSystemLib/UnitTestGCTest.csis excluded by none and included by noneTests/NFUnitTestSystemLib/UnitTestInitLocalTests.csis excluded by none and included by noneTests/NFUnitTestSystemLib/UnitTestReflectionTypeTest.csis excluded by none and included by noneTests/UnitTestLauncher/UnitTestLauncher.nfprojis excluded by none and included by nonenanoFramework.CoreLibrary.nuspecis excluded by none and included by nonenanoFramework.CoreLibrary/System/AssemblyInfo.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/GC.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Guid.csis excluded by none and included by nonenanoFramework.TestFrameworkis 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$topublicReleaseRefSpecensures the newly merged “generics” branch is considered for public releases.azure-pipelines.yml (2)
79-79: Verify template supportsusePreviewBuild.You’ve enabled
usePreviewBuild: truein theclass-lib-build-only.ymlinvocation. 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.ymltemplate is now called withbaseBranchName: 'develop'. Given thatversion.jsonincludes agenericsbranch for public releases, please verify whetherbaseBranchNameshould dynamically reflectgenerics(or accept a list of branches) to fully support that branch.
|
…nto develop ***NO_CI***
- Add target for .NET Framework v4.7.2
***NO_CI***
***NO_CI***
- Add AZDO template to run unit tests with specific build of nanoCLR. ***NO_CI***
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (7)
azure-pipelines-templates/check-nf-interpreter-to-test.yml (6)
27-31: Comment mismatch (body vs commit message).You’re parsing the PR body, not the commit message. Update the comment to avoid confusion.
- # grab PR commit message + # grab PR body (description)
47-51: Condition compares against unquoted booleans.Azure DevOps variables are strings; compare to 'true' to avoid surprises.
- and( - eq(variables['DownloadNanoClrPreview'], true), - ne(variables['NFINTERPRETER_BUILDID'], '') - ) + and( + eq(variables['DownloadNanoClrPreview'], 'true'), + ne(variables['NFINTERPRETER_BUILDID'], '') + )
63-69: Replicate boolean-string comparison in second condition.Mirror the fix to keep behavior consistent.
and( succeeded(), - eq(variables['DownloadNanoClrPreview'], true), + eq(variables['DownloadNanoClrPreview'], 'true'), ne(variables['NFINTERPRETER_BUILDID'], '') )
44-45: Env var provided but not used in script.You set GITHUB_TOKEN but read $(GitHubToken) inline. After adopting $env:GITHUB_TOKEN, this stays aligned.
Verify the variable is secret-scoped in the pipeline/variable group.
1-1: Normalize line endings to LF.YAMLlint flags CRLF. Convert to LF to satisfy linters/CI.
74-75: Variable vs env for downstream tasks.setvariable defines a pipeline variable; ensure consumers read it as variable or map to env if required. If an env var is needed, use isOutput + stage/job dependencies or setVariable with isSecret as needed.
azure-pipelines.yml (1)
59-61: Duplicate DOTNET_NOLOGO variable.Already defined at pipeline level (Lines 35-37). Remove duplication here.
- - name: DOTNET_NOLOGO - value: true
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (24)
Tests/NFUnitTestSystemLib/NFUnitTestSystemLib.nfprojis excluded by none and included by noneTests/NFUnitTestSystemLib/RuntimeHelpersTests.csis excluded by none and included by noneTests/NFUnitTestSystemLib/UnitTestNullable.csis excluded by none and included by noneTests/NFUnitTestSystemLib/UnitTestReflectionTypeTest.csis excluded by none and included by noneTests/NFUnitTestTypes/UnitTestsSpanByte.csis excluded by none and included by nonenanoFramework.CoreLibrary.nuspecis excluded by none and included by nonenanoFramework.CoreLibrary/CoreLibrary.nfprojis excluded by none and included by nonenanoFramework.CoreLibrary/System/Array.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/ArrayTypeMismatchException.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/Generic/Comparer.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/Generic/ComparerHelpers.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/Generic/IComparer.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Diagnostics/DebuggerAttributes.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Diagnostics/StackTraceHiddenAttribute.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Guid.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Nullable.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/ReadOnlySpan.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Runtime/CompilerServices/RuntimeFeature.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Runtime/CompilerServices/RuntimeHelpers.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Runtime/InteropServices/InAttribute .csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Span.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/SpanDebugView.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/String.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Type.csis excluded by none and included by none
📒 Files selected for processing (2)
azure-pipelines-templates/check-nf-interpreter-to-test.yml(1 hunks)azure-pipelines.yml(3 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
azure-pipelines-templates/check-nf-interpreter-to-test.yml
[error] 1-1: wrong new line character: expected \n
(new-lines)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: nanoframework.CoreLibrary (Build_mscorlib)
🔇 Additional comments (4)
azure-pipelines-templates/check-nf-interpreter-to-test.yml (1)
55-56: Verify Azure DevOps project name.project: 'nf-interpreter' must be the Azure DevOps Project, not the repo. Confirm it matches the pipeline definition 34.
azure-pipelines.yml (3)
72-73: New nf-interpreter check template inclusion looks good.Placement after process-pr-labels is appropriate; inner step condition limits to PRs.
Confirm the template file path is correct in this repo.
81-81: usePreviewBuild parameter addition LGTM.Matches the PR goal to enable preview builds.
124-126: class-lib-publish baseBranchName parameter LGTM.Explicitly setting to develop clarifies behavior.
- Can't use nested field refs with .NET 4.8. ***NO_CI***
- Fix task to download nanclr artifact for unit tests. - GitHub auth now uses token directly. - Fix condition for pre-release on develop branch. ***NO_CI***
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
azure-pipelines.yml (2)
49-51: Inconsistent boolean vs string comparisons in conditionsAzure DevOps variables are strings; mixing boolean literals leads to false negatives. Standardize to string comparisons.
- eq(variables['UPDATE_DEPENDENTS'], 'false'), - eq(variables['StartReleaseCandidate'], 'true') + eq(variables['UPDATE_DEPENDENTS'], 'false'), + eq(variables['StartReleaseCandidate'], 'true')- eq(variables['StartReleaseCandidate'], false), + eq(variables['StartReleaseCandidate'], 'false'),Apply the same fix to all occurrences in this file (e.g., Lines 88-89, 109-110, 134-135).
Also applies to: 88-89, 109-110, 134-135
45-52: Align tag conditions and comment in Build_mscorlib jobThe Build_mscorlib job excludes
refs/tags/v*, so its “ON tags” release step never runs. Either:
- Option A (tags): remove the job’s
not(startsWith(…,'refs/tags/v'))and change the GithubRelease step’s branch check tostartsWith(variables['Build.SourceBranch'], 'refs/tags/v').- Option B (branches): rename the
# create or update GitHub release ON tagscomment to reflect main/develop-only releases.Applies to lines 44–52 & 128–139.
🧹 Nitpick comments (4)
azure-pipelines.yml (2)
59-60: Duplicate DOTNET_NOLOGO variableAlready defined at Lines 36-37. Remove the duplicate in job variables.
- - name: DOTNET_NOLOGO - value: true
124-127: baseBranchName hardcoded to 'develop' can misroute behavior on mainIf the template adapts behavior based on the base branch, prefer passing the actual branch.
- baseBranchName: 'develop' + baseBranchName: ${{ variables['Build.SourceBranchName'] }}If the template expects the long ref, use variables['Build.SourceBranch'] instead.
azure-pipelines-templates/check-nf-interpreter-to-test.yml (2)
13-18: Add guard when GITHUB_TOKEN is missingAvoid unauthenticated requests and confusing failures.
$headers = @{ Authorization = "token $env:GITHUB_TOKEN" 'User-Agent' = 'azure-pipelines' Accept = 'application/vnd.github+json' } + + if (-not $env:GITHUB_TOKEN) { + Write-Error "GITHUB_TOKEN is not set. Configure the 'GitHubToken' secret variable." + exit 1 + }
1-1: Normalize line endings to LFYAML lint flagged “wrong new line character”. Convert file EOLs to LF to satisfy linters.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (11)
Tests/NFUnitTestSystemLib/RuntimeHelpersTests.csis excluded by none and included by nonenanoFramework.CoreLibrary/CoreLibrary.nfprojis excluded by none and included by nonenanoFramework.CoreLibrary/System/Array.Enumerators.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/Generic/Comparer.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/Generic/IComparer.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/Generic/IEnumerable.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/Generic/IEnumerator.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/IEnumerable.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Collections/IList.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/IComparable.csis excluded by none and included by nonenanoFramework.CoreLibrary/System/Nullable.csis excluded by none and included by none
📒 Files selected for processing (2)
azure-pipelines-templates/check-nf-interpreter-to-test.yml(1 hunks)azure-pipelines.yml(4 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
azure-pipelines-templates/check-nf-interpreter-to-test.yml
[error] 1-1: wrong new line character: expected \n
(new-lines)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: nanoframework.CoreLibrary (Build_mscorlib)
🔇 Additional comments (4)
azure-pipelines.yml (3)
72-73: Good addition: PR-driven nanoCLR discoveryTemplate inclusion looks correct. Ensure the secret variable GitHubToken exists in the pipeline/library so the template can authenticate to GitHub.
81-81: usePreviewBuild parameter: LGTMPassing usePreviewBuild: true aligns with the intent to exercise preview bits in CI.
151-151: Prerelase flag on develop: LGTMThis prevents stable releases from develop while keeping main stable.
azure-pipelines-templates/check-nf-interpreter-to-test.yml (1)
52-68: DownloadPipelineArtifact inputs: LGTM (uses buildId correctly)Using buildId with buildVersionToDownload: specific is correct. Thanks for fixing the prior pipelineId issue.
| eq(variables['DownloadNanoClrPreview'], true), | ||
| ne(variables['NFINTERPRETER_BUILDID'], '') | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boolean condition mismatch may disable nanoCLR download
Template compares variables to boolean true; variables are strings. Quote the literal.
- eq(variables['DownloadNanoClrPreview'], true),
+ eq(variables['DownloadNanoClrPreview'], 'true'),Apply to both conditions (Lines 55 and 73).
Also applies to: 72-75
🤖 Prompt for AI Agents
In azure-pipelines-templates/check-nf-interpreter-to-test.yml around lines 55-57
(and likewise adjust the similar block at lines 72-75), the pipeline is
comparing pipeline variables to the boolean literal true which fails because
variables are strings; change the comparison to use the string literal 'true'
(e.g., eq(variables['DownloadNanoClrPreview'], 'true')) and ensure any other
boolean comparisons in the indicated lines use quoted string literals.
|



Description
Motivation and Context
How Has This Been Tested?
[tested against nanoclr buildId 57190].
Screenshots
Types of changes
Checklist:
Summary by CodeRabbit
Chores
New Features