Skip to content

Add .NET9 Support#10233

Merged
mikes-gh merged 5 commits into
MudBlazor:devfrom
ScarletKuro:net9_support
Nov 13, 2024
Merged

Add .NET9 Support#10233
mikes-gh merged 5 commits into
MudBlazor:devfrom
ScarletKuro:net9_support

Conversation

@ScarletKuro
Copy link
Copy Markdown
Member

@ScarletKuro ScarletKuro commented Nov 12, 2024

Description

Blocked by: #10231, MudBlazor/Workflows#8

How Has This Been Tested?

Build locally. Casually tested viewer and docs

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions Bot added enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library PR: needs review labels Nov 12, 2024

@{
#nullable enable
#pragma warning disable IL2111
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Seems like a regression, see: https://github.com/dotnet/razor/issues/11203

/// <typeparam name="T">The type of data represented by each row in this grid.</typeparam>
[CascadingTypeParameter(nameof(T))]
public partial class MudDataGrid<T> : MudComponentBase, IDisposable
public partial class MudDataGrid<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T> : MudComponentBase, IDisposable
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is all because of this line:

private PropertyInfo[] _properties = typeof(T).GetProperties();

And we are forced to add this DAM annotation to all DataGrid classes that use generic and are dependent on datagrid class and it's descendants.
Perhaps we would want to redo this feature to not have this annotation almost everywhere in the datagrid.

@mikes-gh
Copy link
Copy Markdown
Contributor

@xC0dex rerunning now net9 is released please recheck logs

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.51%. Comparing base (c8529ab) to head (a498774).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10233      +/-   ##
==========================================
+ Coverage   91.22%   91.51%   +0.29%     
==========================================
  Files         414      413       -1     
  Lines       12547    12978     +431     
  Branches     2449     2447       -2     
==========================================
+ Hits        11446    11877     +431     
  Misses        557      557              
  Partials      544      544              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xC0dex
Copy link
Copy Markdown
Member

xC0dex commented Nov 13, 2024

@mikes-gh LGTM 🚀.

Copy link
Copy Markdown
Member

@xC0dex xC0dex left a comment

Choose a reason for hiding this comment

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

🚀

@mikes-gh
Copy link
Copy Markdown
Contributor

@ScarletKuro LGTM. Just want to check azure hosting is ready

@mikes-gh
Copy link
Copy Markdown
Contributor

Because we publish self-contained the runtime on azure doesn't matter
dotnet publish ${{ inputs.project-directory }} -c Release --runtime win-x64 --self-contained -o ${{ inputs.web-app-name }}

Therefore, I am inclined to merge this and just see if dev.mudblazor.com works.

@sonarqubecloud
Copy link
Copy Markdown

@mikes-gh mikes-gh merged commit 960e7c1 into MudBlazor:dev Nov 13, 2024
@ScarletKuro
Copy link
Copy Markdown
Member Author

Thanks for the fixes @mikes-gh

@ScarletKuro ScarletKuro deleted the net9_support branch November 13, 2024 20:13
@mikes-gh
Copy link
Copy Markdown
Contributor

@ScarletKuro Thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants