Denaro icon indicating copy to clipboard operation
Denaro copied to clipboard

Dependency Updates

Open JoseBritto opened this issue 1 year ago • 25 comments

Now uses dotnet 9 and gnome platform 47

Closes #814 Closes #812 Closes #820
Closes #824 ( 531fe4d )

JoseBritto avatar Jan 14 '25 03:01 JoseBritto

All checks seem to be passing now. I haven't tested snap on my machine. Flatpak seem to work fine.

I copied everything from yelp/C to yelp/bg. I have no idea how the translation system works. Please let me know if this was not the correct thing to do. Without the bg folder both snap and flatpak doesnt seem to build

JoseBritto avatar Jan 15 '25 05:01 JoseBritto

Snap seems to be working fine.

soumyaDghosh avatar Jan 28 '25 19:01 soumyaDghosh

Thanks!

JoseBritto avatar Jan 28 '25 20:01 JoseBritto

Not sure why flatpak failed now. It did build after I updated dependencies

JoseBritto avatar Mar 04 '25 19:03 JoseBritto

Not sure why flatpak failed now. It did build after I updated dependencies

Probably requires flatpak-dotnet-generator to update dependencies again.

nlogozzo avatar Mar 04 '25 21:03 nlogozzo

image This could be related. We had a deprecation warning on the last run. upload artifact v3 stopped working according to this: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

JoseBritto avatar Mar 04 '25 22:03 JoseBritto

Seems to be fixed now

JoseBritto avatar Mar 04 '25 22:03 JoseBritto

Some nuget pkgs got outdated in the last 2 months. I can update those and push tonight. @nlogozzo Would that be enough for a release this week? I want to try to tackle #818 and #821 if possible. Those seem like it would take more time, not sure if I'll be able to finish it this week.

JoseBritto avatar Mar 04 '25 23:03 JoseBritto

Some nuget pkgs got outdated in the last 2 months. I can update those and push tonight. @nlogozzo Would that be enough for a release this week?

Yes sounds good to me!

nlogozzo avatar Mar 04 '25 23:03 nlogozzo

Ok, sat down and updated dependencies and immediately I have a few issues: GirCore seems to have a major update and breaks bunch of stuff. Sqlite and QuestPDF has minor updates that doesn't seem like it breaks anything Flatpak generator is throwing a null reference exception now when I run it. It seems to be occurring when parsing json data of a package. I don't think I'll have enough time to debug and fix it today.

Imo, the dependencies are all recent enough for a release now :smiling_face_with_tear:

JoseBritto avatar Mar 05 '25 02:03 JoseBritto

Other than the dependencies everything else should now be ready, I think.

JoseBritto avatar Mar 05 '25 03:03 JoseBritto

For details about the breaking changes in GirCore please see the release notes of version 0.6.2. There are explanations and migration hints.

badcel avatar Mar 05 '25 04:03 badcel

For details about the breaking changes in GirCore please see the release notes of version 0.6.2. There are explanations and migration hints.

Thanks. I'm not familiar working with gobject, so it'll take a bit of time to read and figure out stuff. I'll probably do the migration over the weekend.

JoseBritto avatar Mar 05 '25 04:03 JoseBritto

https://github.com/NickvisionApps/FlatpakGenerator/pull/8

JoseBritto avatar Mar 05 '25 12:03 JoseBritto

Not sure how to properly do https://github.com/NickvisionApps/Denaro/commit/97acb5618393756e15e931f0e2adef87a2715ed4

I assumed it should just work since its only a patch release. The github action still kept looking for 9.0.0 somehow and failing. Reverted the commit for now.

@nlogozzo Let me know if I should reset the branch to https://github.com/NickvisionApps/Denaro/pull/819/commits/95a50148ce048ed9478ab9c0f83586c42052e6db and force push. Left the reverts like this for now incase you can spot something I missed.

JoseBritto avatar Mar 05 '25 14:03 JoseBritto

Might not have done the GirCore upgrade in the cleanest way possible. Probably should be avoiding using DangerousGetHandle methods altogether. Since this would get rewritten anyway I'm not sure if that would be worth the effort.

JoseBritto avatar Mar 11 '25 03:03 JoseBritto

I think this should be now ready for review.

JoseBritto avatar Mar 11 '25 09:03 JoseBritto

I couldn't find a safe alternative to this:

        public static bool Parse(out RGBA? colorRGBA, string spec)
        {
            if (gdk_rgba_parse(out var val, spec))
            {
                colorRGBA = val;
                return true;
            }
            colorRGBA = null;
            return false;
        }

So that and SetExtRGBA in GtkHelper is the only places where C interop is done. All others are removed if I didnt miss anything. There's this method: Gdk.Internal.RGBA.Parse that needs RGBAHandle. I'm not sure how to instantiate one. SetExtRGBA can be replaced by SetRGBA if I can parse an Gtk.Internal.RGBA from a string.

JoseBritto avatar Mar 11 '25 22:03 JoseBritto

So that and SetExtRGBA in GtkHelper is the only places where C interop is done. All others are removed if I didnt miss anything. There's this method: Gdk.Internal.RGBA.Parse that needs RGBAHandle. I'm not sure how to instantiate one. SetExtRGBA can be replaced by SetRGBA if I can parse an Gtk.Internal.RGBA from a string.

I don't have a C# environment setup to test anymore but you should be able to maybe do something like this:

public static bool Parse(out RGBA? colorRGBA, string spec)
{
    Gdk.RGBA rgba;
    if(Gdk.Internal.RGBA.Parse(rgba.Handle, spec))
    {
        colorRGBA = rgba;
        return true;
    }
    colorRGBA = null;
    return false;
}

nlogozzo avatar Mar 12 '25 00:03 nlogozzo

I don't have a C# environment setup to test anymore but you should be able to maybe do something like this:

I couldn't find a way to get the handle of a new RGBA.

Gdk.Internal.RGBA.Parse() needs an RGBAHandle and spec but new Gdk.Internal.RGBA doesnt have a way to get it as far I could find:

image

JoseBritto avatar Mar 12 '25 00:03 JoseBritto

I believe you shouldn't be using Gdk.Internal.RGBA for the actual object, but regular Gdk.RGBA (i.e. RGBA) and then call Gdk.Internal.RGBA.Parse with the handle from Gdk.RGBA.

Again, I could be making all the up but it should work

nlogozzo avatar Mar 12 '25 00:03 nlogozzo

Oh. Yes that works. Thanks.I didnot see that there was Gdk.RGBA. Now my problem is how do I go from string to GLib.Internal.NonNullableUtf8StringHandle for the spec argument :thinking: Need to figure that out

JoseBritto avatar Mar 12 '25 00:03 JoseBritto

Basically this one: https://gircore.github.io/api/Gdk.Internal.RGBA.html#Gdk_Internal_RGBA_Parse_Gdk_Internal_RGBAHandle_GLib_Internal_NonNullableUtf8StringHandle_

JoseBritto avatar Mar 12 '25 00:03 JoseBritto

Ah nevermind. rgba had a parse method. No need to go into internal

JoseBritto avatar Mar 12 '25 00:03 JoseBritto

I have deleted GdkHelper and GtkHelper as I don't think we would need them any longer

JoseBritto avatar Mar 12 '25 00:03 JoseBritto

Is anyone trying to get this into flathub? It's currently depending on an unsupported runtime which isn't great.

swick avatar Apr 04 '25 11:04 swick