Closures Handling

As discussed in #103, this issue is to find a solution about closures handling in Gir.Core libraries.
This issue can be related to #109

As part of this, we should also tackle delegate/callback signatures. Currently we generate delegates with IntPtr for most parameters, but obviously we wouldn't want users to have to marshal themselves. We should modify the generator to generate a managed delegate and associated helper class for each callback which handles marshalling automatically (similar to how we populate TSignalArgs).
If we implement this using closures we can probably kill two birds with one stone here, and also reduce the amount of boilerplate we have to write in methods.

Some ideas on how to handle delegate resources (to avoid the GC):
There is a scope parameter in GIR metadata for parameter.
See https://developer.gnome.org/gi/unstable/gi-GIArgInfo.html#GIScopeType
It has four possible values:

Invalid (not a callback)
Call (only used during the function - can free in-func)
Async (only ever called once - free after use)
Notified (DestroyNotify to free the callback resources)

For example, GtkTickCallback:
<parameter name="callback" transfer-ownership="none" scope="notified" closure="1" destroy="2">
    <doc xml:space="preserve" filename="gtk/gtkwidget.c" line="5301">function to call for updating animations</doc>
    <type name="TickCallback" c:type="GtkTickCallback"/>
</parameter>

From https://gi.readthedocs.io/en/latest/annotations/giannotations.html

call (default) - Only valid for the duration of the call. Can be called multiple times during the call.
async - Only valid for the duration of the first callback invocation. Can only be called once.
notified - valid until the GDestroyNotify argument is called. Can be called multiple times before the GDestroyNotify is called.

Some ideas on how to handle delegate resources (to avoid the GC):
There is a scope parameter in GIR metadata for parameter.
See https://developer.gnome.org/gi/unstable/gi-GIArgInfo.html#GIScopeType
It has four possible values:

Invalid (not a callback)
Call (only used during the function - can free in-func)
Async (only ever called once - free after use)
Notified (DestroyNotify to free the callback resources)

For example, GtkTickCallback:
<parameter name="callback" transfer-ownership="none" scope="notified" closure="1" destroy="2">
    <doc xml:space="preserve" filename="gtk/gtkwidget.c" line="5301">function to call for updating animations</doc>
    <type name="TickCallback" c:type="GtkTickCallback"/>
</parameter>

From https://gi.readthedocs.io/en/latest/annotations/giannotations.html

call (default) - Only valid for the duration of the call. Can be called multiple times during the call.
async - Only valid for the duration of the first callback invocation. Can only be called once.
notified - valid until the GDestroyNotify argument is called. Can be called multiple times before the GDestroyNotify is called.

Pseudocode example:
// Call:

void SomeFunctionCall(tick_callback)
{
    // Allocate
    var thing = new DefaultCallback<TickCallback>(callback);

    // Native Call
    Native.some_function(thing);

    // Free
    Free(thing);
}

// Async:

void SomeFunctionAsync(some_async_func)
{
    var thing = new AsyncCallback<SomeAsyncFunc>(some_async_func);
    Native.some_function(thing.GetCallback());
    Free(thing);
}

// This is hardcoded at generation time
class AsyncCallback<T>
{
    public AsyncCallback<T>(T callback)
    {
        GCH.Root(callback)
    }

    InvokeManagedFunction()
    {
        callback();
        // free resources here because it'll never be called again
    }
}

Pseudocode example:
// Call:

void SomeFunctionCall(tick_callback)
{
    // Allocate
    var thing = new DefaultCallback<TickCallback>(callback);

    // Native Call
    Native.some_function(thing);

    // Free
    Free(thing);
}

// Async:

void SomeFunctionAsync(some_async_func)
{
    var thing = new AsyncCallback<SomeAsyncFunc>(some_async_func);
    Native.some_function(thing.GetCallback());
    Free(thing);
}

// This is hardcoded at generation time
class AsyncCallback<T>
{
    public AsyncCallback<T>(T callback)
    {
        GCH.Root(callback)
    }

    InvokeManagedFunction()
    {
        callback();
        // free resources here because it'll never be called again
    }
}

Big update as a result of some research/testing:

We will need a Default/Async/Notified handler for each callback, as the scope is a property of the parameter, not the callback (i.e. the same callback can be used with any type of scope).
To avoid runtime overhead, it's best if we just generate the three different handlers for each type of callback.

This is a working example of a Notified-scope handler for Gst.BusFunc (hand written for now, the generator needs changes to support this):
// BusFunc.Generated.cs
namespace Gst
{
    public delegate bool BusFunc(Bus bus, Message message);

    public delegate bool BusFuncNative(IntPtr bus, IntPtr message, IntPtr user_data);

    public class BusFuncHandlerNotified
    {
        public event Action OnDestroyNotify;
        public BusFuncNative NativeCallback;

        private BusFunc managedCallback;
        private DestroyNotify DestroyNotify;
        private GCHandle gch;

        public BusFuncHandlerNotified(BusFunc managed)
        {
            DestroyNotify = DestroyCallback;
            NativeCallback = NativeCallbackMarshaller;
            managedCallback = managed;
            gch = GCHandle.Alloc(this);
        }

        private bool NativeCallbackMarshaller(IntPtr bus, IntPtr message, IntPtr userData)
        {
            Bus busParameter = Object.WrapHandle<Bus>(bus);
            Message messageParameter = Marshal.PtrToStructure<Message>(message);
            return managedCallback(busParameter, messageParameter);
        }

        private void DestroyCallback(IntPtr userData)
        {
            OnDestroyNotify();

            // Allow for garbage collection
            gch.Free();
        }
    }
}

// Bus.cs
namespace Gst
{
    public partial class Bus
    {
         public uint AddWatchFull(int priority, BusFunc func)
            => AddWatchFull(priority, func, null);

        public uint AddWatchFull(int priority, BusFunc func, Action? destroyNotify)
        {
            var handler = new BusFuncHandlerNotified(func);

            if (destroyNotify != null)
                handler.OnDestroyNotify += destroyNotify;

            return Native.add_watch_full(Handle, priority, handler.NativeCallback, IntPtr.Zero, handler.DestroyNotify);
        }
    }
}

I haven't yet tested if resources are freed appropriately, but it appears to stop the GC problem for this specific function, and doesn't have any apparent regressions. Will prototype some more then look at integrating this into the generator.
I'm not sure the current generator design is capable of implementing this (particularly marshalling from arbitrary unmananged types -> managed types), so I might start working on #100 at the same time.
See the top for a TODO list.

Big update as a result of some research/testing:

We will need a Default/Async/Notified handler for each callback, as the scope is a property of the parameter, not the callback (i.e. the same callback can be used with any type of scope).
To avoid runtime overhead, it's best if we just generate the three different handlers for each type of callback.

This is a working example of a Notified-scope handler for Gst.BusFunc (hand written for now, the generator needs changes to support this):
// BusFunc.Generated.cs
namespace Gst
{
    public delegate bool BusFunc(Bus bus, Message message);

    public delegate bool BusFuncNative(IntPtr bus, IntPtr message, IntPtr user_data);

    public class BusFuncHandlerNotified
    {
        public event Action OnDestroyNotify;
        public BusFuncNative NativeCallback;

        private BusFunc managedCallback;
        private DestroyNotify DestroyNotify;
        private GCHandle gch;

        public BusFuncHandlerNotified(BusFunc managed)
        {
            DestroyNotify = DestroyCallback;
            NativeCallback = NativeCallbackMarshaller;
            managedCallback = managed;
            gch = GCHandle.Alloc(this);
        }

        private bool NativeCallbackMarshaller(IntPtr bus, IntPtr message, IntPtr userData)
        {
            Bus busParameter = Object.WrapHandle<Bus>(bus);
            Message messageParameter = Marshal.PtrToStructure<Message>(message);
            return managedCallback(busParameter, messageParameter);
        }

        private void DestroyCallback(IntPtr userData)
        {
            OnDestroyNotify();

            // Allow for garbage collection
            gch.Free();
        }
    }
}

// Bus.cs
namespace Gst
{
    public partial class Bus
    {
         public uint AddWatchFull(int priority, BusFunc func)
            => AddWatchFull(priority, func, null);

        public uint AddWatchFull(int priority, BusFunc func, Action? destroyNotify)
        {
            var handler = new BusFuncHandlerNotified(func);

            if (destroyNotify != null)
                handler.OnDestroyNotify += destroyNotify;

            return Native.add_watch_full(Handle, priority, handler.NativeCallback, IntPtr.Zero, handler.DestroyNotify);
        }
    }
}

I haven't yet tested if resources are freed appropriately, but it appears to stop the GC problem for this specific function, and doesn't have any apparent regressions. Will prototype some more then look at integrating this into the generator.
I'm not sure the current generator design is capable of implementing this (particularly marshalling from arbitrary unmananged types -> managed types), so I might start working on #100 at the same time.
See the top for a TODO list.

I think the concept can work in general :+1:. I wonder if the watch should be removed if the bus object is disposed as add_watch_full  has the bus as an instance parameter?

I think the concept can work in general :+1:. I wonder if the watch should be removed if the bus object is disposed as add_watch_full  has the bus as an instance parameter?

I think the current generator should be able to at least generate the helper class quite easily as it would only be a custom scriban script for each delegates which generate a new file. The usage of the helper could be hand written for now. The implementation of the new generator will probably take some time (probably month) so I would prefer the simple solution for now.

I think the current generator should be able to at least generate the helper class quite easily as it would only be a custom scriban script for each delegates which generate a new file. The usage of the helper could be hand written for now. The implementation of the new generator will probably take some time (probably month) so I would prefer the simple solution for now.

Another idea, we should verify if we can leverage function pointers and replace the delegates with them. Perhaps this makes this problem a lot easier.

Another idea, we should verify if we can leverage function pointers and replace the delegates with them. Perhaps this makes this problem a lot easier.

@firox263 I do not know how to work with bus.AddWatchFull but this should probably work from a technical point of view:
public unsafe partial class Bus
{
    private Func<Message, bool>? _watch;

    public uint AddWatchFull(int priority, Func<Message, bool> func)
    {
        _watch = func;

        [UnmanagedCallersOnly]
        static bool Callback(IntPtr obj, IntPtr message, IntPtr bla)
        {
            if (!GetObject(obj, out Bus bus))
                throw new Exception();

            if (bus._watch is null)
                throw new Exception();

            var m = Marshal.PtrToStructure<Message>(message);

            return bus._watch(m);
        }

        return Native.add_watch_full(Handle, priority, &Callback, IntPtr.Zero, null!);
    }
}

DllImport("Gst", EntryPoint = "gst_bus_add_watch_full")]
public static unsafe extern uint add_watch_full(IntPtr bus, int priority, delegate* unmanaged<IntPtr, IntPtr, IntPtr, bool> func, IntPtr user_data, GLib.DestroyNotify notify);

Can you provide some short sample what must be done to receive the message callbacks?

@firox263 I do not know how to work with bus.AddWatchFull but this should probably work from a technical point of view:
public unsafe partial class Bus
{
    private Func<Message, bool>? _watch;

    public uint AddWatchFull(int priority, Func<Message, bool> func)
    {
        _watch = func;

        [UnmanagedCallersOnly]
        static bool Callback(IntPtr obj, IntPtr message, IntPtr bla)
        {
            if (!GetObject(obj, out Bus bus))
                throw new Exception();

            if (bus._watch is null)
                throw new Exception();

            var m = Marshal.PtrToStructure<Message>(message);

            return bus._watch(m);
        }

        return Native.add_watch_full(Handle, priority, &Callback, IntPtr.Zero, null!);
    }
}

DllImport("Gst", EntryPoint = "gst_bus_add_watch_full")]
public static unsafe extern uint add_watch_full(IntPtr bus, int priority, delegate* unmanaged<IntPtr, IntPtr, IntPtr, bool> func, IntPtr user_data, GLib.DestroyNotify notify);

Can you provide some short sample what must be done to receive the message callbacks?

I think the concept can work in general 👍. I wonder if the watch should be removed if the bus object is disposed as add_watch_full has the bus as an instance parameter?

I don't think we should, as when our Bus object is disposed, we might not be the only owner of the bus (as in, GStreamer may hold on to the bus and even return it to us later), So removing the watch could end up causing unexpected behaviour.

We probably need to change the currently existing code, too and make some kind of API review. Meaning I would like to have some kind of a partially working prototype which covers all major features we want to support before starting the rewrite.

Fully agree. I'm thinking of the generator rewrite as being "version 0.1" if you will, which contains the minimum set of functionality needed to wrap GObject.

I think the current generator should be able to at least generate the helper class quite easily as it would only be a custom scriban script for each delegates which generate a new file. The usage of the helper could be hand written for now. The implementation of the new generator will probably take some time (probably month) so I would prefer the simple solution for now.

I'm not actually sure this is actually possible. In this part of the template:
private bool NativeCallbackMarshaller(IntPtr bus, IntPtr message, IntPtr userData)
{
    Bus busParameter = Object.WrapHandle<Bus>(bus);
    Message messageParameter = Marshal.PtrToStructure<Message>(message);
    return managedCallback(busParameter, messageParameter);
}

We need to, for any arbitrary type (e.g. IntPtr message), be able to know:

This should be marshalled to the managed Message type
Whether Message is a struct (Marshal.PtrToStructure), an object (Object.WrapHandle), or an enum (straightforward cast).

Since we don't have any rich type information in the generator, I'm not sure how feasible this is. It's similar to the interface prefixing problem, where we need to access and modify our knowledge of types at generation time.

Can you provide some short sample what must be done to receive the message callbacks?

From Banshee (specifically Banshee.GStreamerSharp/PlayerEngine.cs):
public void Initialize()
{
    // We add a watch to our playbin
    playbin = ElementFactory.Make ("playbin", "the playbin");
    playbin.GetBus().AddWatchFull (Priority.Default, OnBusMessage);
}

// We declare a method which matches the callback signature
private bool OnBusMessage (Bus bus, Message msg)
{
    switch (msg.type) {
        case MessageType.Eos:
            StopIterating ();
            Close (false);
            OnEventChanged (PlayerEvent.EndOfStream);

            OnEos ();
            break;

        case MessageType.StateChanged:
            if (msg.Src == playbin) {
                State? old_state, new_state, pending_state;
                msg.ParseStateChanged (out old_state, out new_state, out pending_state);
                HandleStateChange (old_state, new_state, pending_state);
            }
            break;

        // ...
    }
}

@firox263 I do not know how to work with bus.AddWatchFull but this should probably work from a technical point of view:

We need to be able to add any number of watches via the AddWatchFull function, so doing it like that wouldn't really work. There's also the problem of needing to free resources for only certain callbacks (as the user/runtime can remove our watch whenever it wants). Also, generally speaking, I'd like to avoid unsafe unless we really need it. If we find a performance hit at any point, we can always switch to it later.

I think the concept can work in general 👍. I wonder if the watch should be removed if the bus object is disposed as add_watch_full has the bus as an instance parameter?

I don't think we should, as when our Bus object is disposed, we might not be the only owner of the bus (as in, GStreamer may hold on to the bus and even return it to us later), So removing the watch could end up causing unexpected behaviour.

We probably need to change the currently existing code, too and make some kind of API review. Meaning I would like to have some kind of a partially working prototype which covers all major features we want to support before starting the rewrite.

Fully agree. I'm thinking of the generator rewrite as being "version 0.1" if you will, which contains the minimum set of functionality needed to wrap GObject.

I think the current generator should be able to at least generate the helper class quite easily as it would only be a custom scriban script for each delegates which generate a new file. The usage of the helper could be hand written for now. The implementation of the new generator will probably take some time (probably month) so I would prefer the simple solution for now.

I'm not actually sure this is actually possible. In this part of the template:
private bool NativeCallbackMarshaller(IntPtr bus, IntPtr message, IntPtr userData)
{
    Bus busParameter = Object.WrapHandle<Bus>(bus);
    Message messageParameter = Marshal.PtrToStructure<Message>(message);
    return managedCallback(busParameter, messageParameter);
}

We need to, for any arbitrary type (e.g. IntPtr message), be able to know:

This should be marshalled to the managed Message type
Whether Message is a struct (Marshal.PtrToStructure), an object (Object.WrapHandle), or an enum (straightforward cast).

Since we don't have any rich type information in the generator, I'm not sure how feasible this is. It's similar to the interface prefixing problem, where we need to access and modify our knowledge of types at generation time.

Can you provide some short sample what must be done to receive the message callbacks?

From Banshee (specifically Banshee.GStreamerSharp/PlayerEngine.cs):
public void Initialize()
{
    // We add a watch to our playbin
    playbin = ElementFactory.Make ("playbin", "the playbin");
    playbin.GetBus().AddWatchFull (Priority.Default, OnBusMessage);
}

// We declare a method which matches the callback signature
private bool OnBusMessage (Bus bus, Message msg)
{
    switch (msg.type) {
        case MessageType.Eos:
            StopIterating ();
            Close (false);
            OnEventChanged (PlayerEvent.EndOfStream);

            OnEos ();
            break;

        case MessageType.StateChanged:
            if (msg.Src == playbin) {
                State? old_state, new_state, pending_state;
                msg.ParseStateChanged (out old_state, out new_state, out pending_state);
                HandleStateChange (old_state, new_state, pending_state);
            }
            break;

        // ...
    }
}

@firox263 I do not know how to work with bus.AddWatchFull but this should probably work from a technical point of view:

We need to be able to add any number of watches via the AddWatchFull function, so doing it like that wouldn't really work. There's also the problem of needing to free resources for only certain callbacks (as the user/runtime can remove our watch whenever it wants). Also, generally speaking, I'd like to avoid unsafe unless we really need it. If we find a performance hit at any point, we can always switch to it later.

I don't think we should, as when our Bus object is disposed, we might not be the only owner of the bus (as in, GStreamer may hold on to the bus and even return it to us later), So removing the watch could end up causing unexpected behaviour.

Yes but wouldn't we use toggle ref to bind the lifetime of our object to the C object? So we would not get disposed if the user is not actively doing it. If the bus get's actively disposed by the user it means it should be destroyed, even on the C side.
As every GObject is disposable I think we should respect it's "expected" behavior. If the user disposes an object it is okay that unexpected behavior occurs. Because relying on a disposed object is in itself an error.
I'm not 100% sure but if we do it like in your example it could probably happen that we never free the BusFuncHandlerNotified  object although it's lifetime is bound to the bus object on C side and on C# side. Meaning C side is freed, C# is garbage collected but the BusFuncHandlerNotified  object is still around because the manually added handle never got freed.

Fully agree. I'm thinking of the generator rewrite as being "version 0.1" if you will, which contains the minimum set of functionality needed to wrap GObject.

This is fine for me :+1:. My alternative suggestion would be to add some helper function to the Script objects which allows to access the GNamespace object in scriban. Then the data should be available (for the currently processed gir file). It could be some helper method either like GetClass (search for class) GetStruct (search for struct) or s.th like Get (return class / struct whatever is found with this name) and GetKind which returns some enum for class / struct. I think my suggestion is easier but probably will fall short some day perhaps even while you code.
So I think you should decide yourself which solution you prefer I just wanted to state an alternative.
In case you want to start with the rewrite I would like to request that you treat the "IntPtr wrapping code" code more like a "service". You already suggested that we can implement some kind of "staged" generator what I like.
Furthermore I want to introduce the concepts of "services". Meaning small pieces of code which do one think have as little dependencies as possible and could be exchanged in case of need. This should increase maintainablity as code is more seperated. The "IntPtr wrapping service" itself could use other smaller services to reach it's goal. If we structure the code from the beginning in this way there should not be the mess we have in the current generator where a lot of things happen in one class what makes it confusing. The hard part will be to separate the services in a meaningful manner.

We need to be able to add any number of watches via the AddWatchFull function, so doing it like that wouldn't really work.

For a general solution you are right, we could just use one dictionary per callback func. In this specific case there will never be more than one watch inside the dictionary as the documentations states:

There can only be a single bus watch per bus, you must remove it before you can set a new one.

The dictionary would probably be cleared in case of the object / bus disposal. Avoiding a leaked object on C# side.

Also, generally speaking, I'd like to avoid unsafe unless we really need it. If we find a performance hit at any point, we can always switch to it later.

I have no fixed opinion on this. But I thought we already agreed to tend to use unsafe code for the native side (see #109) to avoid marshalling which should make it easier to generate the code and be faster. But we can decide which parts to be marshalled and which to be native in a case by case manner as the different situations should be isolated from each other.

I don't think we should, as when our Bus object is disposed, we might not be the only owner of the bus (as in, GStreamer may hold on to the bus and even return it to us later), So removing the watch could end up causing unexpected behaviour.

Yes but wouldn't we use toggle ref to bind the lifetime of our object to the C object? So we would not get disposed if the user is not actively doing it. If the bus get's actively disposed by the user it means it should be destroyed, even on the C side.
As every GObject is disposable I think we should respect it's "expected" behavior. If the user disposes an object it is okay that unexpected behavior occurs. Because relying on a disposed object is in itself an error.
I'm not 100% sure but if we do it like in your example it could probably happen that we never free the BusFuncHandlerNotified  object although it's lifetime is bound to the bus object on C side and on C# side. Meaning C side is freed, C# is garbage collected but the BusFuncHandlerNotified  object is still around because the manually added handle never got freed.

Fully agree. I'm thinking of the generator rewrite as being "version 0.1" if you will, which contains the minimum set of functionality needed to wrap GObject.

This is fine for me :+1:. My alternative suggestion would be to add some helper function to the Script objects which allows to access the GNamespace object in scriban. Then the data should be available (for the currently processed gir file). It could be some helper method either like GetClass (search for class) GetStruct (search for struct) or s.th like Get (return class / struct whatever is found with this name) and GetKind which returns some enum for class / struct. I think my suggestion is easier but probably will fall short some day perhaps even while you code.
So I think you should decide yourself which solution you prefer I just wanted to state an alternative.
In case you want to start with the rewrite I would like to request that you treat the "IntPtr wrapping code" code more like a "service". You already suggested that we can implement some kind of "staged" generator what I like.
Furthermore I want to introduce the concepts of "services". Meaning small pieces of code which do one think have as little dependencies as possible and could be exchanged in case of need. This should increase maintainablity as code is more seperated. The "IntPtr wrapping service" itself could use other smaller services to reach it's goal. If we structure the code from the beginning in this way there should not be the mess we have in the current generator where a lot of things happen in one class what makes it confusing. The hard part will be to separate the services in a meaningful manner.

We need to be able to add any number of watches via the AddWatchFull function, so doing it like that wouldn't really work.

For a general solution you are right, we could just use one dictionary per callback func. In this specific case there will never be more than one watch inside the dictionary as the documentations states:

There can only be a single bus watch per bus, you must remove it before you can set a new one.

The dictionary would probably be cleared in case of the object / bus disposal. Avoiding a leaked object on C# side.

Also, generally speaking, I'd like to avoid unsafe unless we really need it. If we find a performance hit at any point, we can always switch to it later.

I have no fixed opinion on this. But I thought we already agreed to tend to use unsafe code for the native side (see #109) to avoid marshalling which should make it easier to generate the code and be faster. But we can decide which parts to be marshalled and which to be native in a case by case manner as the different situations should be isolated from each other.

badcel: Yes but wouldn't we use toggle ref to bind the lifetime of our object to the C object? So we would not get disposed if the user is not actively doing it. If the bus get's actively disposed by the user it means it should be destroyed, even on the C side.

I don't think we should (for wrapper objects at least). GObjects tend to handle their own cleanup, so as long as we unref/clear where appropriate, there shouldn't be any problems.
We'd only use toggle refs for subclass objects as they contain important (managed) state which is not captured by the gobject. Wrapper types are simply a thin wrapper over an IntPtr handle, so we can destroy and recreate them as necessary. Generally speaking, toggle refs are not desirable and cause a lot of trouble (e.g. in GJS), so we'd only use them where necessary. From the docs for g_object_add_toggle_ref:

Multiple toggle references may be added to the same gobject, however if there are multiple toggle references to an object, none of them will ever be notified until all but one are removed. For this reason, you should only ever use a toggle reference if there is important state in the proxy object.

Where important state = managed class state, which is only present on subclasses, as wrappers just call into GObject for state.
Specifically in the case of GstBus, we shouldn't make any assumptions about cleanup because disposing of the bus (analogus to unreffing the bus) does not actually destroy it. From gst_bus_add_watch_full:

The bus watch will take its own reference to the bus, so it is safe to unref bus using gst_object_unref after setting the bus watch.

For the watch itself, it says:

Return FALSE if the event source should be removed.

So in the case of gstreamer watches, the watch itself determines it should be removed by returning false, at which point GObject will then send the DestroyNotify event. So we don't need to worry about memory leaks upon disposing, as GStreamer keeps a reference to the bus anyway, so both the bus and our watch will still be alive. The bus is only destroyed when all references are released, including the one that we own (through the proxy object), and the one that GStreamer owns for the watch. When the user removes the source (returning false), this reference should be released.

I'm not 100% sure but if we do it like in your example it could probably happen that we never free the BusFuncHandlerNotified object although it's lifetime is bound to the bus object on C side and on C# side. Meaning C side is freed, C# is garbage collected but the BusFuncHandlerNotified object is still around because the manually added handle never got freed.

In my prototype, the manually added handle gets freed in destroy notify, which gets called whenever the async source is removed.
I made a small test here in C (firox263/destroy-notify.c) which shows that destroy notify is called by returning FALSE. So I don't think there's a chance we'd having a floating delegate handler, as the user must explicitly signal to stop iterating, and the library takes care to notify us when this happens.

I like your idea of services a lot 👍 I've been playing around with the generator a bit, and I might try and land some initial work alongside delegates, as I'm not sure if it's worth trying to hack a type dictionary into the existing generator (for marshalling).

In this specific case there will never be more than one watch inside the dictionary

Ah yes you're right, missed that. I wonder what happens if you try add another one? Maybe it just returns zero and silently fails.

I have no fixed opinion on this. But I thought we already agreed to tend to use unsafe code for the native side (see #109) to avoid marshalling which should make it easier to generate the code and be faster?

I was meaning more in the mean time while we still have lots of moving parts. Makes it easier to debug 😅. No problems with using more unsafe long term, as long as we can test it reliably.

badcel: Yes but wouldn't we use toggle ref to bind the lifetime of our object to the C object? So we would not get disposed if the user is not actively doing it. If the bus get's actively disposed by the user it means it should be destroyed, even on the C side.

I don't think we should (for wrapper objects at least). GObjects tend to handle their own cleanup, so as long as we unref/clear where appropriate, there shouldn't be any problems.
We'd only use toggle refs for subclass objects as they contain important (managed) state which is not captured by the gobject. Wrapper types are simply a thin wrapper over an IntPtr handle, so we can destroy and recreate them as necessary. Generally speaking, toggle refs are not desirable and cause a lot of trouble (e.g. in GJS), so we'd only use them where necessary. From the docs for g_object_add_toggle_ref:

Multiple toggle references may be added to the same gobject, however if there are multiple toggle references to an object, none of them will ever be notified until all but one are removed. For this reason, you should only ever use a toggle reference if there is important state in the proxy object.

Where important state = managed class state, which is only present on subclasses, as wrappers just call into GObject for state.
Specifically in the case of GstBus, we shouldn't make any assumptions about cleanup because disposing of the bus (analogus to unreffing the bus) does not actually destroy it. From gst_bus_add_watch_full:

The bus watch will take its own reference to the bus, so it is safe to unref bus using gst_object_unref after setting the bus watch.

For the watch itself, it says:

Return FALSE if the event source should be removed.

So in the case of gstreamer watches, the watch itself determines it should be removed by returning false, at which point GObject will then send the DestroyNotify event. So we don't need to worry about memory leaks upon disposing, as GStreamer keeps a reference to the bus anyway, so both the bus and our watch will still be alive. The bus is only destroyed when all references are released, including the one that we own (through the proxy object), and the one that GStreamer owns for the watch. When the user removes the source (returning false), this reference should be released.

I'm not 100% sure but if we do it like in your example it could probably happen that we never free the BusFuncHandlerNotified object although it's lifetime is bound to the bus object on C side and on C# side. Meaning C side is freed, C# is garbage collected but the BusFuncHandlerNotified object is still around because the manually added handle never got freed.

In my prototype, the manually added handle gets freed in destroy notify, which gets called whenever the async source is removed.
I made a small test here in C (firox263/destroy-notify.c) which shows that destroy notify is called by returning FALSE. So I don't think there's a chance we'd having a floating delegate handler, as the user must explicitly signal to stop iterating, and the library takes care to notify us when this happens.

I like your idea of services a lot 👍 I've been playing around with the generator a bit, and I might try and land some initial work alongside delegates, as I'm not sure if it's worth trying to hack a type dictionary into the existing generator (for marshalling).

In this specific case there will never be more than one watch inside the dictionary

Ah yes you're right, missed that. I wonder what happens if you try add another one? Maybe it just returns zero and silently fails.

I have no fixed opinion on this. But I thought we already agreed to tend to use unsafe code for the native side (see #109) to avoid marshalling which should make it easier to generate the code and be faster?

I was meaning more in the mean time while we still have lots of moving parts. Makes it easier to debug 😅. No problems with using more unsafe long term, as long as we can test it reliably.

For this reason, you should only ever use a toggle reference if there is important state in the proxy object.

Where important state = managed class state, which is only present on subclasses, as wrappers just call into GObject for state.

You are right, according to the documentation this sounds like the right approach. I think there are multiple ways forward but we could just start with this one  and see how it goes. I opened a new issue for this see #185

Regarding the watch you are right i did not fully understand the API. The API is like guaranteeing that the bus is available as long as the destroy notify is not called.

For this reason, you should only ever use a toggle reference if there is important state in the proxy object.

Where important state = managed class state, which is only present on subclasses, as wrappers just call into GObject for state.

You are right, according to the documentation this sounds like the right approach. I think there are multiple ways forward but we could just start with this one  and see how it goes. I opened a new issue for this see #185

Regarding the watch you are right i did not fully understand the API. The API is like guaranteeing that the bus is available as long as the destroy notify is not called.

@firox263 can we close this with #323?

@firox263 can we close this with #323?

Yes, closures should be fully supported now. Anything remaining would fall under "general correctness", so I'd say we can go ahead and close this


Check for Author URI and Theme URI

[New sniff] Check for Author URI and Theme URI
Rule type:
Warning
Rule:
WARNING | Check specifically against style.css whether the two recommended headers are found.

Rule as it is found in the handbook.
There is no specific rule in the handbook for this.

Theme check file covering this rule:
https://github.com/Otto42/theme-check/blob/master/checks/style_suggested.php
[Optional Section] Decision needed:
Stylesheets and Scripts (Recommended)
The main style.css header can optionally include Author URI and Theme URI.
Advice/Request for decision: Should the above header recommendation be added to the recommended list?
Notes for implementation:

This sniff will rely on the WordPress_AbstractThemeSniff Class to get the $sniff_helper array.
Testing will require that a style.css file is in the same folder as the test file.

To do:

[ ] Decision/Add the rule in the Theme Review handbook to the Recommended page.
[ ] Create unit tests
[ ] Create new sniff
[ ] Adjust existing WPCS / PHPCS sniff and send in PR upstream.
[ ] Add existing sniffname sniff to the ruleset.

I have this sniff ready to go, however it uses the $sniff_helper array from the proposed WordPress_AbstractThemeSniff class.

This is checked in Theme Sniffer, there we have more lenience about actually doing an API call so I'll close this for now, as I don't think a sniff is a good candidate for this.


Can I use c++'s multithreading to develop the realsense D400 family?

Required Info

Camera Model
{ D400 }

Operating System & Version
{Win (10) / Linux (Ubuntu 16)

SDK Version
{ legacy / 2.<14>.<1> }

Language
{c++}

Issue Description
<When I use c++'s multithreading to develop the realsense D400 family, it show show the error about that I can not open the camera.>

Hi @PipgZ
The high-level answer is yes, there are several samples using threads.
Please share more information about what you are doing, so we can help.
What operating system are you using? What error do you get? Can you share the code snippet?

[Realsense Customer Engineering Team Comment]
@PipgZ
Any update?


ID scalar type

Hi there,
First of all, thank you for great products!
I was composing a graphql payload for my tests having field of ID  type, and when I Ctrl+clicked this type it brought me to plugin docs saying:

When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID

So I bravely left 4 as my ID field. It broke on deserialization during test run, saying string was expected (using gengql for Go), so I went to graphql.org for truth and found there:

ID: The ID scalar type represents a unique identifier, often used to refetch an object or as the key for a cache. The ID type is serialized in the same way as a String; however, defining it as an ID signifies that it is not intended to be human‐readable.

Suggestion: improve docs removing mention of integer as a good value for standard ID scalar type.

Hi, @glebsts. You can definitely specify an integer for the ID scalar type, your case should be related to the specific graphql implementation used, e.g. gengql.

Input Coercion
When expected as an input type, any string (such as "4") or integer (such as 4 or -4) input value should be coerced to ID as appropriate for the ID formats a given GraphQL service expects. Any other input value, including float input values (such as 4.0), must raise a request error indicating an incorrect type.


Upgrade ember-cli-htmlbars to remove deprecation warning

The current release (1.11.0) triggers an annoying deprecation warning w/ recent versions of Ember that would be fixed by upgrading to the latest release of ember-cli-htmlbars (2.x). Please consider upgrading this.
├─┬<EMAIL_ADDRESS>│ └─┬<EMAIL_ADDRESS>│   └──<EMAIL_ADDRESS>
The deprecation warning looks like this and is described here:
DEPRECATION: An addon is trying to access project.nodeModulesPath. This is not a reliable way to discover npm modules. Instead, consider doing: require("resolve").sync(something, { basedir: project.root }). Accessed from:   new NPMDependencyVersionChecker (/path/to/project/node_modules/ember-getowner-polyfill/node_modules/ember-cli-version-checker/src/npm-dependency-version-checker.js:11:33)

@jacobq the warning you pasted references ember-getownerpolyfill, but I do see a similar warning in ember-sortable that references ember-new-computed.  I opened a PR to remove that in #175 which should address this (i think).

@Dhaulagiri Thanks for looking into this! My understanding what the the old version (1.3.1) of ember-cli-version-checker would cause this all by itself. I will try to see if this clears the warning now.

Hmm, I still see references to the old ember-cli-version-checker in v1.11.1 and #master, but when I set up a new/empty app and install the addon I don't get the warning now. Also, I can confirm that ember-new-computed appears to be gone now, as you said.
Latest release:
$ npm ls ember-cli-version-checker@1
<EMAIL_ADDRESS>/home/jquant/tmp/test-app
└─┬<EMAIL_ADDRESS>  ├─┬<EMAIL_ADDRESS>  │ └──<EMAIL_ADDRESS>  └─┬<EMAIL_ADDRESS>    └─┬<EMAIL_ADDRESS>      └──<EMAIL_ADDRESS>
Current master:
$ ember install<EMAIL_ADDRESS>...
$ npm ls ember-cli-version-checker@1
<EMAIL_ADDRESS>/home/jquant/tmp/test-app
└─┬<EMAIL_ADDRESS>(github:jgwhite/ember-sortable#381809ccb35c51dad79ba78f71c30810977839b2)
  ├─┬<EMAIL_ADDRESS>  │ └──<EMAIL_ADDRESS>  └─┬<EMAIL_ADDRESS>    └──<EMAIL_ADDRESS>deduped

My PR, which attempts to upgrade to<EMAIL_ADDRESS>$ npm ls ember-cli-version-checker@1
<EMAIL_ADDRESS>/home/jquant/tmp/ember-sortable
└── (empty)

but it still has a few failing test :/

This project is now being maintained by the team at @heroku.
To get the project healthy and maintainable again, we're going to be upgrading ember-cli and all dependencies to their latest stable versions. Hopefully that will fix this issue. Watch this space.

This should be fixed now in 1.12, please re-open if you notice otherwise


Update for Xcode 8 beta 6

Conversion between UnsafePointerof different types isn’t allowed anymore. Now using
the new UnsafeRawPointer for conversion
Implicit Swift bridging is gone, now explicitly casting
public/private changed to open/fileprivate using Xcode migrator

Tests all succeeded, hoping my fixes actually work (haven't been able to test inside my own project yet).

@thebluepotato
Thanks for the quick work buddy. LGTM and I think it shouldn't have any problems functioning as a library, but let's have a bit more reflection on how we should set the open/public access levels.
I've read the release note of beta 6, it seems that declaring a class/function as public is like declaring them as final outside the defining module.
Sure if we want to keep the behavior exactly the same as 2.2, all the public should be changed to open. Let's think about:

Do people really need to subclass XMLDocument/HTMLDocument/XMLElement etc.?
There're many stored properties changed to open, many of them relies on some fileprivate properties to work. Do people need them as open?
The Queryable methods are still public after merging this PR. Whether we should make them all open, or should we make other open methods/classes back to public?

I guess most people don't subclass or override existing methods, but if you are doing it(which I guess might be the reason you changed public to open), I would love to know why.

As mentioned in the first post, I used the Xcode migrator for all the open/fileprivate additions. It basically did the same as replacing all public/private keywords with open/fileprivate. However while

As said in the intro, I blindly used the Xcode migrator which basically changed all public to open and private to fileprivate (the public that are left are part of protocols which can't be overridden anyway a so can't be declared open).
I believe all the fileprivate are justified but we're on the same page regarding open and I think that's the point of these new access levels : do we really need to allow subclassing. Because I'm not yet 100% sure how the access levels work (I'll read the swift-evolution proposal which led to the change) I'd like to test different cases but for that I'd need my project to compile (which needs Alamofire to be updated to beta 6).
However I can think of various situations :

One could want to extend the various documents with properties but I don't know if the class needs to be open for that. Can a final class be extended? I think so.
One could want to subclass XMLDocument for their own format, but a similar result could be achieved with extending (because all XML is basically the same).

That's regarding the classes. For the computed variables I don't see why we'd let people override the getter. I think public is the better keyword for those.
I personally use Fuzi as-is and I don't need to extend/subclass it. If Alamofire updates (or I'll make a test project) I'll gladly test changing most open to public tonight.
Cheers!

@thebluepotato Gotcha. I'll merge this PR to bring the swift-3 branch back to life again. I will consider adjusting some of the access levels when I got some free time. Thanks buddy, cheers🍻


Link validation on the toolbar

looks good to me, alltough i would prefer to leave this entirely to the LinkInput-component (just because it is less opiniated and simpler).

hi!
Should this URL below be a valid URL?
http://metal.com.com.br.v
Take a look at this regex examples: https://mathiasbynens.be/demo/url-regex

@macrozone I thought that too, but I had to paint the toolbar red when showing the error, so I ascended the error one level.
Thanks, @marcelometal, I've changed the regex


GitHub Actions for tests

Alright, I know what's the issue but I have no idea why it happens on CI, I've tested with the same version of Python, Nats, and even CPU resources already. What happens is the messages arrive in Nats too late or something, and so they are not consumed by a single burst. But why? I tried to increase the timeout, no luck. I guess I can try running the actor twice, but I'd better make the burst mode more reliable if possible.

So, there are 2 "flaky" tests that don't want to work on CI. I skip them for now. Some CI is better than no CI. I'm not sure yet what's the cause.


Experimenting with showing test reports on CI

https://www.notion.so/Experimenting-with-showing-test-reports-on-CI-21d3f05c6b0d40009d41aa81e003d997
┆Issue is synchronized with this Wrike task by Unito

Included in https://github.com/golemcloud/golem/pull/352


Tutorial throw a bone is referencing an outdated block in step 7

It says to drag out an on any button pressed block, but it should say on a button pressed since the default changed

@jwunderl looks like your bug


closes#1694 Configurable timezone for Rally logging

closes #1694, closes #1700

Have you signed the contributor license agreement? YES
Have you followed the contributor guidelines? YES
Have you run make check-all successfully? YES
Did you choose a descriptive title and description for your PR? YES
(Only for maintainers) Did you apply appropriate labels and a milestone? SKIP

I have signed the Contributor Agreement. Please trigger the bot check again.

@elasticmachine test this please

buildkite build this please

@pquentin  please review once again.
esrally race --track=http_logs --test-mode

is working now. Thank you

buildkite build this please

Thanks, I see all existing tests are passing now. I'll try to review this tomorrow.

Thank you @pquentin for the detailed inputs. I have modified the code as advised. Please review it once you get a chance!

buildkite build this please

Do you need help for adding the unit test?

The test cases were done however I was working around an issue I observed so please check the details below:
Issue: After this change gets merged, the local configuration file @ ~/.rally/logging.json was still pointing to esrally.log.configure_utc_formatter which caused esrally fail to run.
Running ./rally --help gave this error:
Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.10/logging/config.py", line 392, in resolve
    self.importer(used)
ModuleNotFoundError: No module named 'esrally.log.configure_utc_formatter'; 'esrally.log' is not a package

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.10/logging/config.py", line 544, in configure
    formatters[name] = self.configure_formatter(
  File "/home/codespace/.python/current/lib/python3.10/logging/config.py", line 656, in configure_formatter
    result = self.configure_custom(config)
  File "/home/codespace/.python/current/lib/python3.10/logging/config.py", line 471, in configure_custom
    c = self.resolve(c)
  File "/home/codespace/.python/current/lib/python3.10/logging/config.py", line 399, in resolve
    raise v
  File "/home/codespace/.python/current/lib/python3.10/logging/config.py", line 392, in resolve
    self.importer(used)
ValueError: Cannot resolve 'esrally.log.configure_utc_formatter': No module named 'esrally.log.configure_utc_formatter'; 'esrally.log' is not a package

Steps tried to fix:
make prereq
make install
source .venv/bin/activate
./rally --help

I was expecting make install might also update the local logging.json, but that didn't happen.
Resolution: Manually replaced esrally.log.configure_utc_formatter to esrally.log.configure_time_formatter
Please advise if you think this could be a breaking change or if handling the local logging.json is out of scope for esrally.
If this is considered an issue, a quick fix could be to replace the function name configure_time_formatter back to configure_utc_formatter. I would love to hear your thoughts on this. Thank you!

no problem at all @pquentin. I also agree with the new changes.

buildkite build this please


Logic of understanding cancelled or expired subscription to undo premium features

Hello,
Firstly, thanks for this beautiful library! Forgive me if i miss this on the docs because i am so confused and want to know how this job is done.
My question is: After a succesfully subscription, how we should understand user cancelled subscription or expired etc. to take premium features back ?
If you going to say check on every app start with getAvailablePurchases() function, then what is Restore Purchases for ? (On the docs we restore purchases with getAvailablePurchases() too)
Or is there an other proper way to check is subscription active or not ?
I am trying to understand the logic behind this, Thanks for reading and assist.

You should setup an endpoint in your server to receive and handle notifications from app store/google play..
See the following references:

https://developer.android.com/google/play/billing/rtdn-reference#sub
https://developer.apple.com/documentation/appstoreservernotifications

You should setup an endpoint in your server to receive and handle notifications from app store/google play..
See the following references:

https://developer.android.com/google/play/billing/rtdn-reference#sub
https://developer.apple.com/documentation/appstoreservernotifications

Thanks for answer.
What is the disadvantage of doing "check on every app start with getAvailablePurchases()" instead of this ?
Plus, lets assume a user subscribed for 1 month and cancelled at 20th day, so he got 10 more premium days. getAvailablePurchases returns a json in that 10 days, after 10 days it returns null so we can understand subscription is active or not  by return.
How is the way you suggested handles this scenario ?

By handling server notifications, your server is notified immediately when the user's subscription changes in any way.
In your example, your server would be notified exactly when the user cancels their subscription, and you can perform the appropriate action (not having to wait until they open the app).

By handling server notifications, your server is notified immediately when the user's subscription changes in any way.
In your example, your server would be notified exactly when the user cancels their subscription, and you can perform the appropriate action (not having to wait until they open the app).

Thanks a lot for your explanation :) No lies, checking on app launches seemed easier to me :\

By handling server notifications, your server is notified immediately when the user's subscription changes in any way.
In your example, your server would be notified exactly when the user cancels their subscription, and you can perform the appropriate action (not having to wait until they open the app).

Do you have any open code for this server handling? I will do it in Cloud Functions, but the code may be using any platform


Examine re-enabling reposts on odysee homepage

Must not show duplicates
Put test version up on dev server for evaluation by growth team

Seems like already working:

Also double-checked the code.  We are setting limit_claims_per_channel for the homepages.

it has to be done in a way that the same claim doesn't show up twice, even if it is reposted
if it's not feasible to do cleanly with existing APIs then it should be pushed to SDK team to modify APIs to support this

also, I believe all homepage search queries for odysee.com need to be modified to allow reposts as a type, but this should only be done if repetition problem is addressed

@shyba please comment when this is workable (i.e. live on wallet servers)

On hold pending #6180

This can be worked on currently, not blocked by 6180. The separate changes were reverted on SDK for now.
The SDKs / hubs were updated last night and now have this param:
 --remove_duplicates             : (bool) removes duplicated content from search by picking either the
                                                     original claim or the oldest matching repost

We probably want this enabled by default on all claim searches.

Restore reposts as being allowed on homepage claim_searches
Add remove_duplicates flag


attempt to use RotoColorEmoji.ttf causes crash on iOS simulator

I downloaded RotoColorEmoji.ttf from the https://www.google.com/get/noto/ and included it in my Flutter app.  It seems to work ok in the Android emulator but attempts to run the app in the iOS simulator crash on app load.
I get this message in the debug console:
Launching lib/main.dart on iPhone 11 in debug mode...
Xcode build done.                                           118.3s
[VERBOSE-2:FontFamily.cpp(184)] Could not get cmap table size!
[VERBOSE-3:FontCollection.cpp(95)] nTypefaces == 0
Lost connection to device.
Exited (sigterm)
Steps to Reproduce

git clone app at https://github.com/corymalcolmtaylor/game_maze.git
(as of commit   f109cf606f8371ba072fe9411654a209fdec446a  )
run the app in an iOS simulator
app will crash and the following message will be in the debug console:

[VERBOSE-2:FontFamily.cpp(184)] Could not get cmap table size!
[VERBOSE-3:FontCollection.cpp(95)] nTypefaces == 0
Lost connection to device.

So far i have observed this on iOS simulators for iOS 13.2.  It does not seem to affect android emulators.
Target Platform:  iOS
Target OS version/browser:  iOS 13.2
Devices:  iOS simulator iPhone 8 and 11 tested
Logs

flutter run --verbose
[  +41 ms] executing: [/Volumes/macex/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +130 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +4 ms] 27321ebbad34b0a3fafe99fac037102196d655ff
[   +1 ms] executing: [/Volumes/macex/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +301 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.12.13+hotfix.5-0-g27321ebba
[  +53 ms] executing: [/Volumes/macex/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +15 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Volumes/macex/flutter/] git ls-remote --get-url origin
[  +20 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +184 ms] executing: [/Volumes/macex/flutter/] git rev-parse --abbrev-ref HEAD
[  +23 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +31 ms] executing: sw_vers -productName
[  +45 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +37 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15.2
[        ] executing: sw_vers -buildVersion
[  +34 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19C57
[ +113 ms] executing: /usr/bin/xcode-select --print-path
[  +41 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +4 ms] executing: /usr/bin/xcodebuild -version
[+1668 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[        ] Xcode 11.2.1
           Build version 11B500
[ +156 ms] executing: /Volumes/macex/androidSDK/platform-tools/adb devices -l
[  +32 ms] Exit code 0 from: /Volumes/macex/androidSDK/platform-tools/adb devices -l
[        ] List of devices attached
           emulator-5554          device product:sdk_gphone_x86_64 model:Android_SDK_built_for_x86_64 device:generic_x86_64
           transport_id:1
[  +98 ms] executing: /Volumes/macex/flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
[ +127 ms] /usr/bin/xcrun simctl list --json devices
[ +216 ms] More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all
devices.
[  +10 ms] /Volumes/macex/androidSDK/platform-tools/adb -s emulator-5554 shell getprop
[ +805 ms] ro.hardware = ranchu
[  +11 ms] Android SDK built for x86 64 • emulator-5554                        • android-x64 • Android 10 (API 29) (emulator)
[   +7 ms] iPhone 11                    • 161A8CFA-781E-4952-B4A2-6EBB19664920 • ios         •
com.apple.CoreSimulator.SimRuntime.iOS-13-2
           (simulator)
[  +39 ms] "flutter run" took 3,530ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:289:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:590:11)
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:515:33)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#5      _rootRun (dart:async/zone.dart:1126:13)
#6      _CustomZone.run (dart:async/zone.dart:1023:19)
#7      _runZoned (dart:async/zone.dart:1518:10)
#8      runZoned (dart:async/zone.dart:1465:12)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
#11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#14     _rootRun (dart:async/zone.dart:1126:13)
#15     _CustomZone.run (dart:async/zone.dart:1023:19)
#16     _runZoned (dart:async/zone.dart:1518:10)
#17     runZoned (dart:async/zone.dart:1465:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
#20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#21     new Future.sync (dart:async/future.dart:224:31)
#22     CommandRunner.run (package:args/command_runner.dart:112:14)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
#24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
#25     _rootRun (dart:async/zone.dart:1126:13)
#26     _CustomZone.run (dart:async/zone.dart:1023:19)
#27     _runZoned (dart:async/zone.dart:1518:10)
#28     runZoned (dart:async/zone.dart:1502:12)
#29     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#30     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#31     _rootRun (dart:async/zone.dart:1126:13)
#32     _CustomZone.run (dart:async/zone.dart:1023:19)
#33     _runZoned (dart:async/zone.dart:1518:10)
#34     runZoned (dart:async/zone.dart:1465:12)
#35     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#36     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
#37     run (package:flutter_tools/runner.dart:50:10)
#38     main (package:flutter_tools/executable.dart:65:9)
#39     main (file:///Volumes/macex/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#40     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
#41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)

flutter analyze
Analyzing game_maze...
No issues found! (ran in 10.4s)

flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-CA)
    • Flutter version 1.12.13+hotfix.5 at /Volumes/macex/flutter
    • Framework revision 27321ebbad (6 days ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Volumes/macex/androidSDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2.1, Build version 11B500
    • CocoaPods version 1.7.1

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.40.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.7.1

[✓] Connected device (2 available)
    • Android SDK built for x86 64 • emulator-5554                        • android-x64 • Android 10 (API 29) (emulator)
    • iPhone 11                    • 161A8CFA-781E-4952-B4A2-6EBB19664920 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-13-2
      (simulator)

• No issues found!

I guess that particular ttf uses a special format not compatible with macOS/iOS.

Based on your comment, @corymalcolmtaylor , I'm going to close this as not a Flutter bug. Thanks for letting us know!


notebook 6.5.2

Update notebook to 6.5.2

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_2aq20bc5h4/clone/recipe/meta.yaml:80: missing_description: The recipe is missing a description
WARNING: /tmp/abs_2aq20bc5h4/clone/recipe/meta.yaml:80: missing_license_url: The recipe is missing a license_url
Warnings were found


Really, how do you end a connection/disconnect without getting the 'unexpected EOF' message in the server log?

Hi,
Sorry I'm posting this again, but I'm still having this issue and I don't know if I can re-open the closed issue. I put added some comments on the other issue, but I don't know if anyone will read them.
I'm using node-vertica version 0.5.2 and Vertica Analytic Database v7.1.1-0. I'm facing an issue where when I call disconnect(), I always see this message in the server log:
Unexpected EOF on client connection
I'm simply executing a query and then disconnecting:
var   vertica = require('vertica')
var _ = require('lodash')

var verticaSettings = {<props>}

vertica.connect(verticaSettings, function (err, conn) {
    if (err) {
        console.log('connection error', err)
    } else {
        queryVertica("select count(*) from sessions", conn, function(err, results) {
            console.log('err = ', err)
            console.log('results = ', results)
            conn.disconnect()
        })
    }
})

The log file still indicates an Unexpected EOF:
8:17.729 Init Session:0x7fed34014010 <LOG> @v_verticadb_node0001: 00000/2705: Connection received: host=<IP_ADDRESS> port=51740 (connCnt 3)
8:17.730 Init Session:0x7fed34014010 <LOG> @v_verticadb_node0001: 00000/4540: Received SSL negotiation startup packet
8:17.730 Init Session:0x7fed34014010 <LOG> @v_verticadb_node0001: 00000/4691: Sending SSL negotiation response 'N'
8:17.733 Init Session:0x7fed34014010 <LOG> @v_verticadb_node0001: 00000/4686: Authentication - sendAuthRequest: user=dbUser database=verticaDB host=<IP_ADDRESS> authType=3
8:17.735 Init Session:0x7fed34014010-a0000000006308 [Txn] <INFO> Begin Txn: a0000000006308 'check_login_history'
8:17.735 Init Session:0x7fed34014010-a0000000006308 [Txn] <INFO> Rollback Txn: a0000000006308 'check_login_history'
8:17.735 Init Session:0x7fed34014010 <LOG> @v_verticadb_node0001: 00000/4686: Authentication - sendAuthRequest: user=dbUser database=verticaDB host=<IP_ADDRESS> authType=0
8:17.735 Init Session:0x7fed34014010 <LOG> @v_verticadb_node0001: 00000/2703: Connection authenticated: user=dbUser database=verticaDB host=<IP_ADDRESS>
8:17.737 Init Session:0x7fed34014010 [Session] <INFO> [Query] TX:0(iod-vertica-1-20028:0x36fdd) select count(*) from sessions
8:17.738 Init Session:0x7fed34014010-a0000000006309 [Txn] <INFO> Begin Txn: a0000000006309 'select count(*) from sessions'
8:17.785 Init Session:0x7fed34014010-a0000000006309 <LOG> @v_verticadb_node0001: 08006/5167: Unexpected EOF on client connection
8:17.785 Init Session:0x7fed34014010-a0000000006309 <LOG> @v_verticadb_node0001: 00000/4719: Session iod-vertica-1-20028:0x36fdd ended; closing connection (connCnt 3)
8:17.785 Init Session:0x7fed34014010-a0000000006309 [Txn] <INFO> Rollback Txn: a0000000006309 'select count(*) from sessions'

I noticed that vertica provides the finish() method in their odbc driver and if finish() is called from perl, then there is no 'Unexpected EOF' message:
$query = "SELECT distinct Calendar_Month_Name FROM Date_Dimension";
$sth = $dbh->prepare($query);
$sth->execute();

# Bind the variables and then look throuhg the results

$sth->bind_columns(undef, \$month );

while($sth->fetch())
   {
   print "$month\n"
   }
# Disconnect from the database
$sth->finish;
$dbh->disconnect
or warn "Disconnection failed: $DBI::errstr\n";
exit;

I couldn't find a 'finish' call in the node-vertica module. Perhaps this is the problem?

I have the same issue...
Did you manage to resolve this?

Hi All,
I am working on a very big project utilizing your driver and I'm experiencing the same problem.
Every time I close a connection I get the msg : Unexpected EOF on client connection.
I read it might be caused by closing the connection incorrectly.
Is there a fix on the horizon?
Thanks.

I am not planning on working on this any time soon, because I don't work with either node, nor Vertica anymore on a daily basis. I would welcome a fix though.

I used something like below.
let connection;
try {
    connection.disconnect()
}
catch (e) {
    // console.log(e)
    // console.log('NOT DISCTNNECT')
}
finally {

    connection = new Vertica({
        user: 'userName',
        host: 'IP',
        database: 'DB',
        password: 'password',
        post: 5433,
        keepAlive: false
    }, (error) => {
        if (error) {
            logger.error(' ERROR : ', error)
        }
        else {
            logger.info('SUCCESS');
        }
    })
}

Therefore, for each request, There will be a new Connection

I used something like below.
let connection;
try {
    connection.disconnect()
}
catch (e) {
    // console.log(e)
    // console.log('NOT DISCTNNECT')
}
finally {

    connection = new Vertica({
        user: 'userName',
        host: 'IP',
        database: 'DB',
        password: 'password',
        post: 5433,
        keepAlive: false
    }, (error) => {
        if (error) {
            logger.error(' ERROR : ', error)
        }
        else {
            logger.info('SUCCESS');
        }
    })
}

Therefore, for each request, There will be a new Connection


Undefined global for builtins

I'm having troubles with lua lsp recently. It seems that the lsp completely forgot about builtins, such as ipairs, tonumber, even table module and treats them as undefined globals.
I have sumneko configured as per lspconfig documentation to work with nvim runtime as a workspace library and this issue only happens for configuration files; everything works fine if I create a lua file anywhere outside nvim runtime path.
I haven't modified my config in months and everything used to work fine, what could have caused this?
lsp version is 3.5.6 (macports)

Did you modified these configs:

Lua.runtime.meta
Lua.runtime.fileEncoding
Lua.runtime.builtin
Lua.workspace.supportScheme

Could you please provide your server log?
Or you can check if the log had something like this:
[22:38:50.679][debug][#0:script\library.lua:242]: Builtin status:	builtin	default
[22:38:50.679][debug][#0:script\library.lua:266]: Meta path:	c:/Users/sumne/.vscode-insiders/extensions/vscode-lua/server/meta/Lua 5.4 zh-cn utf8/builtin.lua

These may help:

Where to find log file
Logging level flag

Is the version you downloaded 3.5.6 Relase or the latest version in Github Actions?
Maybe it is broken in latest version and macports always using the latest version.

Latest from the release page worked fine, but idk when macports port was last updated


Fix TypeScript addKeys declaration

Since we expect an object that's any
instead of an array any[]

:+1:


Cannot install Paralus when using a managed PostgreSQL database

Expected vs actual behavior
I'm running locally a cloudnative-pg instance and trying to use it to host the Paralus data, however, I'm not able to get it up and running.
$: kubectl logs -f paralus-6988958d6-8ll9w -c migrate-admindb
error: Dirty database version 21. Fix and force version.

NAME    NAMESPACE       REVISION        UPDATED                                         STATUS          CHART           APP VERSION
paralus paralus-system  1               2023-09-11 15:52:52.157432395 +0200 CEST        deployed        ztka-0.2.4      v0.2.4

What is your environment setup? Please tell us your cloud provider, operating system, and include the output of kubectl version --output=yaml and helm version. Any other information that you have, eg. logs and custom values, is highly appreciated!
Running locally on Kind, vanilla Kubernetes.
cloudnative-pg installed using Helm
NAME            NAMESPACE               REVISION        UPDATED                                         STATUS          CHART                   APP VERSION
cnpg            cnpg-system             1               2023-09-06 15:04:58.159471577 +0000 UTC         deployed        cloudnative-pg-0.18.2   1.20.2

(optional) If you have ideas on why the bug happens or how it can be solved, please provide it here

[x] I've described the bug, included steps to reproduce it, and included my environment setup with all customizations.

[x] I'm using the latest version of the project.

@prometherion I tried cloudnative-pg and paralus locally on a Kind cluster. It is working fine.
I have used app user (default cloudnative-pg user) and its password instead of postgres. - https://cloudnative-pg.io/documentation/1.20/bootstrap/
$ kubectl get pod
NAME                                         READY   STATUS    RESTARTS      AGE
cluster-example-1                            1/1     Running   0             34m
dashboard-6fdb498f8b-ft2nj                   1/1     Running   0             18m
myrelease-contour-contour-7fccf45974-7ww7g   1/1     Running   0             18m
myrelease-contour-envoy-d8hlz                2/2     Running   0             18m
myrelease-fluent-bit-gn27w                   1/1     Running   0             18m
myrelease-kratos-courier-0                   2/2     Running   0             18m
myrelease-kratos-f4b895987-phpdc             2/2     Running   0             18m
paralus-5fc66f7d49-lf6pk                     2/2     Running   0             18m
prompt-6d9cf67478-f7jmj                      2/2     Running   0             18m
relay-server-74fb9fb87f-59ph7                2/2     Running   6 (10m ago)   18m

error: Dirty database version 21. Fix and force version.

Can you provide --previous flag to kubectl logs command and get the initial error occurred?

I found the solution to the reported issue.
When kratos is disabled, as well as missing the kratos.kratos.development=true, the migration issue is faced: with the following values everything was up and ready.
analytics:
  enable: false
deploy:
  contour:
    enable: false
  postgresql:
    address: paralus-rw.paralus-system.svc
    database: app
    password: <REDACTED>
    username: postgres
fqdn:
  coreConnectorSubdomain: <REDACTED>
  domain: <REDACTED>
  hostname: <REDACTED>
  userSubdomain: <REDACTED>
kratos:
  kratos:
    development: true
ingress:
  enabled: true
  className: <REDACTED>

It wasn't clear to me how the components work together, and why Kratos is required. Not sure if it's me who didn't pay enough attention to the documentation, or if it's missing some required RTFM section (sarcasm on).

@prometherion I suppose there isnt enough emphasis on kratos and why it is an important component for paralus to work. Will add some details around the same and improve the documentation. I created an issue to track it - https://github.com/paralus/website/issues/92

@prometherion Glad to see this is resolved. Closing this issue, feel free to reopen if you've further questions.
Thanks @niravparikh05 for new issue, indeed document would help.


move xpath gem html definitions into capybara

Move the html element selector definitions from the xpath gem into the capybara selectors and modify them so nil locators devolve into just finding element types

:tada:


Added styles for ebook

fixed https://github.com/o2project/vivliostyle-theme-o2project/issues/27

:tada: This PR is included in version 1.9.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


no "managed by puppet" comments

If you don't mind, I would like to add "managed by puppet" comments to the templates so that it's clear to the sysadmin which files came from puppet templates and which ones didn't?

PR raised https://github.com/jfryman/puppet-nginx/pull/750


multirelease: Support cross-compiling using an older Gradle JVM to a newer target version

Currently, multirelease jar building requires the Gradle JVM to be at least the version of the newest source files. We should be able to cross-compile with JVMs that are newer than the running JVM as well as older though.

No longer relevant, multirelease wip uses Gradle 6.7's toolchain support


Added SidebarSubmenu for all Kinds

Signed-off-by: Andre Wanlin<EMAIL_ADDRESS>Hey, I just made a Pull Request!
Added SidebarSubmenu for all Kinds making it easier to discover them in the Catalog.
https://user-images.githubusercontent.com/67169551/198735235-7ee46dab-c4f1-4694-a3bd-e728611ccb70.mov
:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[ ] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[x] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

@freben I understand that this might be moderately controversial so I'm open to this maybe being something we just have in the documentation but my experience with our instance of Backstage was that once this was added it made things much easier to find and opened up people to what was all in the Catalog

@Rugvip ready for another review when you have some time, please?

Sweet, thanks @Rugvip 🚀


Easybell: Initial commit

Created download and munki recipe. minimum_os_version is retrieved from dmg automatically.

The app bundle is called easybell.app, the running app is listed as easybell. I would change the default naming for the Munki item to easybell instead of Easybell App.
Beside this: Everything works fine and as expected.


AssociatedObject and BlockImpTest failures on Linux

I just tested on Linux/x86 with clang 14.0.6
         19 - AssociatedObject_legacy (Subprocess aborted)
         20 - AssociatedObject_legacy_optimised (Subprocess aborted)
         26 - BlockImpTest_optimised (SEGFAULT)
         28 - BlockImpTest_legacy_optimised (SEGFAULT)

AssociatedObject_legacy: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.

AssociatedObject_legacy_optimised: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.

This looks like heap corruption.  Can you run the test with valgrind?

Not enough information to debug or reproduce.  Please reopen this if you are able to run the tests with valgrind or asan.


ResourceDeploymentFailure

I got this error, there doesn't seem to be troubleshooting guide on this..
The resource operation completed with terminal provisioning state 'Failed'."

Default value of GitHub repository URL on ARM Template is incorrect.
Correct value: https://github.com/OfficeDev/microsoft-teams-apps-stickers.git
ARM Template: https://github.com/OfficeDev/microsoft-teams-stickers-app.git
I guess input correct value in the deployment process, and re-deploy a few times, the deployment process will be completed successfuly.


I see a blank page while running locally

After I clone repo

npm install
npm start

Expected behavior
I should see Grpah explorer local running on local browser
Actual behavior
I see blank page which shows browser sync connected. but nothing else
Steps to reproduce the behavior
mentioned already
HTTP traffic capture

@agrabhi does this still persist with this new repo?


PHOENIX-5268 HBase 2.1/2.2 compatibility

depend on Hbase 2.2.1
adopt code to the changed HBase APIs
update the maven version
synchronize @AfterClass and @BeforeClass in ParallelStatsDisabledIT
Co-authored-by: Ankit Singhal<EMAIL_ADDRESS>

I see some test failures in org.apache.phoenix.end2end.LastValueFunctionIT and org.apache.phoenix.end2end.NullIT. Will have to re-run against master to make sure these aren't just flaky.

I see some test failures in org.apache.phoenix.end2end.LastValueFunctionIT and org.apache.phoenix.end2end.NullIT. Will have to re-run against master to make sure these aren't just flaky.

FWIW, I don't remember seeing either of those those fail during my testing.

Ah, they just OOM'ed because the number of forked ITs was too large :). False alarm!

Phoenix 5.0.0 has not been updated for one year( since 04/jul/2018)...
When HBase 2.2.2 will be supported after all?

@mlkui a random pull request is the wrong place to ask about project roadmap. These discussions happen on the dev mailing list.

@joshelser @stoty What is blocking this PR? Happy to help if I can.

Apart from needing an update it to HBase 2.2.2, I consider the patch production ready.
The project hasn't made a decision yet on how to handle the loss of HBase 2.0 compatibility ( abandon it, fork the codebase, or use some kind of compat module/maven profile hack)
It is probably not a bad time to (re)start that discussion.

Updated for Hbase 2.2.1 and current Phoenix master

@stoty I was trying to test your PR out (rebased on 5.0.0-HBase-2.0) and I'm hitting this error:
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java:[84,20] compare(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell) in <anonymous org.apache.phoenix.hbase.index.covered.data.IndexMemStore$1> cannot override compare(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell) in org.apache.hadoop.hbase.CellComparatorImpl
However, I'm sure this has been fixed somehow (even though I can't seem to figure out how since it looks like it is still trying to override the method on the master branch: https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java#L82)
Did you run into that error?


PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra

We are facing this issue after upgrading our complete dependencies:
/root/.local/share/virtualenvs/build-3vGKWv3F/lib/python3.6/site-packages/cvxpy/cvxcore/python/canonInterface.py:92: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
return np.asfortranarray(np.matrix(matrix))
Is the issue being considered in the new version of cvxpy?

https://github.com/cvxgrp/cvxpy/pull/638 was just merged, and it addresses this issue.

@akshayka I am using cvxpy version 1.0.15 but still this issue is showing up. My python version is 3.6.7.

Is it exactly the error you posted at the top of the thread? That would be strange because the matrix class is not used in canonInterface.py anymore.

@SteveDiamond Let me do a double check from my end, and get back to you. Thanks


createSearchChoice: How would one achieve this Select2 feature in ui-Select?

Is there an equivalent way to achieve what Select2 does in createSearchChoice?

Does tagging require multiple?
All the examples I'm finding uses it. What if we only need single-select?

@kimardenmiller For what it's worth: No it does not. Try pressing ( , comma) after tagging.
@brianfeister Why does (Enter) work as a tagging token by default on multiple, and it does not work on single; even if defined in tagging-tokens?


help

Hi, i didn´t cheating with osiris long time and i can´t remember how i fixed this so can someone help me please ? https://streamable.com/mgqyt7

just press TAB or CAPS

Thank you 🥰


Rename file does not update name on open editor tab

Lapce Version
0.2.1
System information
Linux (flatpak)
Describe the bug
Steps to reproduce:

Open a file from a project
In the sidebar, right-click on the same file and rename it

Expected result:

The open file will be renamed in the open editor tab
Saving the open file will save under the new name

Actual result:

The file in the editor tab is not renamed in the tab's title
Saving the file will save a copy under the old name

Additional information
I found the similar issue #730 where someone else also reported this in the comments.  There was a request to open a separate issue for the editor tab mismatch, but I was not able to find one.

I would like to implement this feature!


Feature Request:

Is your feature request related to a problem? Please describe.
I try to automate my daily manual actions with the cameras but it not all functions seem supported
Describe the solution you'd like
I would like to be able to toggle the "privacy mode" vfrom home assistant. This mode is controllable via official tapo android app.
Describe alternatives you've considered
I have not found any alternatives
Additional context

I found the switch in your integration. I really had a good look before and didn't see it. Could it appear late after adding a camera?
Anyway, no new feature needed. Thank you for this integration, you made my day now that it works!!

Indeed. More sensors and controls are showing much later than when the camera was added. I also got motion detection sensor now, which I surely didnt have when adding. I installed the integration about 30 minutes ago

Use the correct integration, you are using core one. Follow instructions in readme in Usage.


Proxy error

Hi,
First of all thanks for this awesome project 👍
I'm trying to access Cloudfare protected website through FlareSolverrSharp, here the error on FlareSolverr.exe : NS_ERROR_PROXY_CONNECTION_REFUSED

Ask me if any other information is needed, in advance thank you !

The error is clear, flaresolverr can not connect to the proxy.
Are you running Flaresolverr in Docker? Use the host machine ip instead of <IP_ADDRESS>

I'm not using Docker indeed, is there any way to make Flaresolverr.exe run without it ?

Yes, flaresolverr works without docker.
Check the logs of the proxy or try to use the proxy in your browser to se if its working well.

As you recommended yesterday i replaced the <IP_ADDRESS> by my public IP, now the proxy is timeout :

Here's my code :

Take a look at the tests => https://github.com/FlareSolverr/FlareSolverrSharp/tree/master/test/FlareSolverrSharp.Tests

Did i miss some configuration or code ? I have the same usage as your readme.md
I just ran FlareSolverrSharp.Tests but i'm not comfortable to understand the problem in my case, here's the result :

flaresilverr.exe :

I also tried the tests with my IP instead of 127. for the ProxyUrl, i got the same result.

Are you sure the proxy is working? I have tested mine with FlareSolverr and it's working as expected. The error you see is caused by Firefox not being able to use the proxy.


integrate with johnzon

From<EMAIL_ADDRESS>on November 11, 2014 20:19:12
Hi,
current json is handled with gson or jackson. Would be great to integrate johnzon.
A new release is coming (0.2-incubating) in few days so maybe wait 1 or 2  weeks before working on this task but here is what I use in my current app:
RestAssured.objectMapper(new ObjectMapper() {

        // all these sets are optional but makes the behavior closer
        // to jackson, defaults use getter/setter only
        // and private constructors are not supported
        private final Mapper mapper = new MapperBuilder().setAccessModeName("field").setSupportHiddenAccess(true).build();

        @Override
        public Object deserialize(final ObjectMapperDeserializationContext context) {
            final Class<?> type = context.getType();
            final InputStream entityStream = context.getDataToDeserialize().asInputStream();
            if (type.isArray()) {
                return mapper.readArray(entityStream, type);
            }
            return mapper.readObject(entityStream, type);
        }

        @Override
        public Object serialize(final ObjectMapperSerializationContext context) {
            final StringWriter stream = new StringWriter();
            mapper.writeObject(context.getObjectToSerialize(), stream);
            return stream.toString();
        }
    });

Original issue: http://code.google.com/p/rest-assured/issues/detail?id=371

From<EMAIL_ADDRESS>on November 13, 2014 10:38:28
Do I understand it correctly that johnzon is an implemention of the JsonProcessing JSR that will be available in Java 9? In that case I think it's very important to have support for it.
Thanks for the example
Status: Accepted
Labels: -Priority-Medium Priority-High

From<EMAIL_ADDRESS>on November 13, 2014 11:47:38
No no, it implements the jsonp spec of JavaEE 7

From<EMAIL_ADDRESS>on November 13, 2014 22:10:01
Alright, thanks for clarifying :)
Labels: -Priority-High Priority-Medium


Cannot find module @actions/core

We're facing a bug when using this in one of our composite actions.
We've added the following step before turbo build:
    - name: Cache for Turbo
      uses<EMAIL_ADDRESS>
And the issue prevented the workflow from completion in GitHub Actions.

Hello,
Thank you for your issue. I fix this bug in the latest version (v1.3) https://github.com/rharkor/caching-for-turbo/pull/35
Also I wanted to thank you for the pull request helping me correcting my poor english level :joy:


Startup with dynamic tasks problem

Hello, we encounter a problem when restarting our service that uses Quantum.
Context:
We have a service that loads dynamic jobs in at startup. We run this in Kubernetes on three pods. We implemented a custom storage backend that stores the jobs in Redis. These get loaded in at startup, however all the three pods execute the same jobs, only at startup, the future scheduled jobs only get executed once (as expected).
Is this a known issue? Maybe you can point us in the correct direction on how to solve this?
Maybe something like an on startup callback that announces  to the other nodes that needs to sync data/state ?
Looking forward to your response(s)

After some digging we figured out that remove the subtract one fixes our problem. Can you remember why this is there in the clock_broadcaster?
  @impl GenStage
  @spec init(opts :: InitOpts.t()) :: {:producer, State.t()}
  def init(%InitOpts{
        debug_logging: debug_logging,
        storage: storage,
        scheduler: scheduler,
        start_time: start_time
      }) do
    start_time =
      scheduler
      |> Module.concat(Storage)
      |> GenServer.whereis()
      |> storage.last_execution_date()
      |> case do
        :unknown -> start_time
        date -> date
      end
      |> NaiveDateTime.truncate(:second)
      # Roll back one second since handle_tick will start at `now + 1`.
      |> NaiveDateTime.add(-1, :second)  # <--- this part

    :timer.send_interval(1000, :tick)

    {:producer,
     %State{
       time: start_time,
       debug_logging: debug_logging,
       remaining_demand: 0
     }}
  end

@thomas9911 This was part of #449

We also came up against the same issue in tasks starting unexpectedly, commenting out the 1 second clock skew seemed to solve the problem, thanks for the find @thomas9911


@state_trigger does not work when changes to 'helper' states are made by pyscript

Input numbers and booleans (toggles made in HA "helpers" menu) modified by Pyscript do not trigger the state triggers that are listening to them.
For example, nothing is logged when the below is ran even though HA updates the GUI and fires the state_changed events as expected.
@state_trigger("input_number.tv_brightness")
def tv_brightness_set(value=None):
    log.warning(f"TV brightness set to {value}")

input_number.set_value(entity_id="input_number.tv_brightness", value=75)
task.sleep(3)
input_number.set_value(entity_id="input_number.tv_brightness", value=50)
state.set("input_number.tv_brightness", 25)

@state_trigger("input_boolean.dev_bool")
def dev_bool(value=None):
    log.warning(f"dev_bool set to {value}")

input_boolean.toggle(entity_id="input_boolean.dev_bool")

After digging deeper, it seems this is limited to reloading (saving the .py file) and calling the changes bare.  The changes probalby trigger before the decorators have had time to setup so they're not caught.  This seems like such an edge case i'll close the issue.
I was also calling input_number changes wrong in some of my files which made me think this was an issue.  state.set("input_number.somenumber", 25) is the wrong way to call it as it only updaes the GUI.  People should use input_number.set_value(entity_id="something", value=25) instead


Lite/Full split: define new extension API

https://github.com/eclipse-ee4j/cdi/blob/864e1b4f779e4d6d5a80f147d975a510446d4987/spec/src/main/asciidoc/core/spi_lite.asciidoc

Resolved as part of https://github.com/eclipse-ee4j/cdi/pull/546.
Closing now...


Only filter preview extensions when preview feat disabled

Currently we filter ALL contributed tabs when preview features are enabled. This makes more sense to scope down to just filtering out extensions that are actually marked as being in preview - other extensions should still be shown.

I thought the preview flag was just for the workbench. Have customers asked for this particular behavior change?

Last we discussed I believe the decision was that our extensions should respect the flag as well.
This is not a customer request but rather me fixing what I see as incorrect behavior (there's no reason why we should hide ALL extension tabs when preview features are disabled).
Although I'm not exactly sure what you mean by the preview flag being "only for workbench". Could you explain that a bit more?

Heh, so I completely misread your description the first time. Apologies! This makes sense to me now. Not filtering everything makes a lot of sense to me.

Reverting this based on offline discussion - extension-contributed tabs are still considered a "preview" feature for now so should all be disabled (regardless of whether the extension itself is in preview)


No default min value on rep(1)sep

Repsep is 0 or more and rep1sep is 1 or more, but you still have to pass in a minimum, which feels unnatural, especially for repsep where the minimum is implied to be 0 anyway. Default values of 0 or 1, or overloads to the same effect would be useful.

I'd happily take an overload. I'm not as huge of a fan with defaults as they can present some compatibility problems on changes.
Can you send a PR with a test that it behaves like expected?
The reason btw we don't force min is that originally I didn't have the Accumulator (which is a restricted version of CanBuildFrom since we always know a parser doesn't build a collection from another and generally does not know the size). But I thought this method would be used when you wanted zero or more OR you wanted the return type to be a List.
Now we have the repAs methods which allow you to control the return type (although we didn't yet make a repSepAs variant).
Lastly I'll add that we don't have a version that optionally allows a trailing separator, that might also be nice to have.

@martijnhoekstra should we add a variant with only the sep?

@martijnhoekstra should we add a variant with only the sep?

Yeah, I think so, though I'm not too sure about the other variation with trailing separator. Shall I do it?

Yeah, I think so, though I'm not too sure about the other variation with trailing separator. Shall I do it?


add environment report to each of our services

For non secrets, we should be able to query a service (eg curl GET http://service/config) and get its configuration.  This will help in supporting customers.
The configuration should be the values for all environment variables that do not contain any secure information such as account id and passwords.   there are some potential security concerns so we need to think through that a bit.

Closing issue as part of project shutdown


modules: create an FAQ for the common "upgrade problems"

Breaking this out from https://github.com/cue-lang/cue/issues/3127
There are a number of points to cover here:

What is a major version suffix?
What version of language.version should I set?
When do I require a source field?
...

Published at https://github.com/cue-lang/cue/wiki/FAQ:-Modules-and-v0.9.0, thank you @myitcv. I published your original draft as one revision (commit), then my tweaks as extra revisions afterwards. This way you can later review my changes and shout if you disagree with any of them.


menyentryswapper: Add ability to swap Castle Wars teleport to default on equipped rings of dueling

Pretty useful for most skills that require banking. Default config is off.

We already have shift-click configuration for inventory swaps, so this will not be implemented. And for equipment the swaps are rejected:
https://github.com/runelite/runelite/wiki/Rejected-or-Rolled-Back-Features

runeliteplus accepts rejected features ;)
https://github.com/runelite-extended/runelite/
https://runelitepl.us


Private fields inside strings

From Twitter: https://twitter.com/jasnell/status/1207085555567087617
Looks like using private fields inside template strings breaks things.

Duplicate of https://github.com/microsoft/TypeScript/issues/34898


VMS: two small fixes

Marked urgent because of current build error:
https://ci.buildbot.openssl.org/#/builders/40/builds/186/steps/7/logs/stdio

Also covering https://ci.buildbot.openssl.org/#/builders/2/builds/333/steps/7/logs/stdio

Agree urgent

Regarding "urgent"....repo is currently frozen!

Regarding "urgent"....repo is currently frozen!

Yeah, I didn't think of that when I submitted this
(and I still think it's unwise to freeze the master branch)

Merged to master branch. Thank you.


Fix option name in configuration template

Thanks to contribute and bug report!
I'll release next version 💎  right away!


Make the bot check that new versions are solvable before opening PRs for them

Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

This was suggested in https://github.com/conda-forge/pyobjc-framework-coreservices-feedstock/pull/3#issuecomment-1250414755

Agreed, thanks for the review @larsoner!