Skip to content

Conversation

@devel0
Copy link
Contributor

@devel0 devel0 commented Dec 25, 2020

fix avalonia high cpu usage on linux ( AvaloniaUI/Avalonia#5192 )

@FoggyFinder
Copy link
Collaborator

Not totally clear why build is failed. I'll take a look tomorrow if you don't fix it before.

@devel0
Copy link
Contributor Author

devel0 commented Dec 26, 2020

I tried to revert the change just to verify if build process work but it seems it doesn't depend on the avalonia pkg upgrade.

Actually I'm using CSharpMath lib through direct source ref from my project using latest avalonia without issues:

Directory.Build.props

<Project>
    <PropertyGroup>
        <!-- <AvaloniaVersion>0.10.0-preview5</AvaloniaVersion> -->
        <AvaloniaVersion>0.10.0-rc1</AvaloniaVersion>
        <CSharpMathVersion>0.5.0-beta</CSharpMathVersion>
    </PropertyGroup>
</Project>

csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="AngouriMath" Version="1.2.0-preview.5" />    
    <PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />    
    <!-- <PackageReference Include="CSharpMath.Avalonia" Version="$(CSharpMathVersion)" /> -->
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\CSharpMath\CSharpMath.Avalonia\CSharpMath.Avalonia.csproj" />
  </ItemGroup>

</Project>

@FoggyFinder
Copy link
Collaborator

Yep, it is something else. Can you revert back?

@devel0
Copy link
Contributor Author

devel0 commented Dec 26, 2020

Yep, it is something else. Can you revert back?

I did it

@FoggyFinder
Copy link
Collaborator

Can you also update the sample project to make it runnable? (i.e. use new style of defining theme etc)

@devel0
Copy link
Contributor Author

devel0 commented Dec 26, 2020

sry I didn't notice of that change, theme uri, because I not used in my example, now updated so avalonia example is runnable

cd CSharpMath.Avalonia.Example
dotnet run

@FoggyFinder
Copy link
Collaborator

I tried to fix build in #187 and while one was easy to fix the rest isn't obvious. But I think this PR can be merged in before.

@devel0
Copy link
Contributor Author

devel0 commented Dec 26, 2020

Yep, I seen with #187 now Build/Everything works, still pb with test about missing refrence of Color, that's strange because if I run the same cmd of ( https://github.com/verybadcat/CSharpMath/pull/187/checks?check_run_id=1610656618 )

dotnet test CSharpMath.CrossPlatform.slnf -c Release -l GitHubActions --blame --collect:"XPlat Code Coverage" -r .testcoverage -p:PackageReleaseNotes="$RELEASE_NOTES" -p:PackageVersion=187-pr-ci-d97230fd6070d60c60175129ab3dc8cb85228437 -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.IncludeTestAssembly=true

it finishes without errors.

I gotten that type of errors sometimes when a project reference an avalonia version while another uses another one, but may also because there is the need to add some ref like https://www.nuget.org/packages/System.Drawing.Common/ or https://www.nuget.org/packages/Microsoft.Windows.Compatibility/

It may useful to change avalonia ref in this file, may using $(AvaloniaVersion) from Directory.Build.props to keep that in sync but unsure if this could help.

Another option is to upgrade examples from netcoreapp3.1 to net5.0 and leave libraries as netstandard2.0 that actually grant better cross platform; may in a future with net6.0 there could a unified solution about ( https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/ ) to include android and ios.

@Happypig375
Copy link
Collaborator

It may useful to change avalonia ref in this file, may using $(AvaloniaVersion) from Directory.Build.props to keep that in sync but unsure if this could help.

That tests released packages and should use the Avalonia version currently referenced on NuGet.

Copy link
Contributor

@jp2masa jp2masa left a comment

Choose a reason for hiding this comment

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

Not sure if this PR is active, Avalonia 0.10 was released in the meanwhile, here are some suggested changes.

@FoggyFinder
Copy link
Collaborator

@devel0 Would you like to accept changes suggested above or better to merge it to the master as is and then open a separate PR for them?

devel0 and others added 2 commits January 30, 2021 09:47
Co-authored-by: jp2masa <jp2masa@users.noreply.github.com>
use FluentTheme xaml constructor

Co-authored-by: jp2masa <jp2masa@users.noreply.github.com>
@devel0
Copy link
Contributor Author

devel0 commented Jan 30, 2021

@FoggyFinder accepted all suggestions apart for FluentTheme constructor argument-less from code because seems there aren't such construction mode from code ( it may work using dependency injection but for the example could enough using uri spec )

@devel0 devel0 changed the title upgrade avalonia pkg to 0.10.0-rc1 upgrade avalonia pkg to 0.10.0 Jan 30, 2021
@FoggyFinder FoggyFinder merged commit 40b8ddf into verybadcat:master Jan 30, 2021
@Happypig375
Copy link
Collaborator

@FoggyFinder I am busy on other projects right now, you can have the say on this one.

@FoggyFinder
Copy link
Collaborator

@FoggyFinder I am busy on other projects right now, you can have the say on this one.

I've read your mind :-) Done it one minute before the comment was posted

1 similar comment
@FoggyFinder
Copy link
Collaborator

@FoggyFinder I am busy on other projects right now, you can have the say on this one.

I've read your mind :-) Done it one minute before the comment was posted

@Happypig375 Happypig375 added Resolution/Implemented The described enhancement or housekeeping work has been implemented. Type/Housekeeping This includes internal only changes. labels Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Resolution/Implemented The described enhancement or housekeeping work has been implemented. Type/Housekeeping This includes internal only changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants