x/sys/unix: solaris ioctl wrappers using incorrect function signatures

(Can be assigned to me unless some kind soul has the bandwidth to work on it before me.)
Copied from https://github.com/WireGuard/wireguard-go/pull/39#discussion_r1134844172

It looks like ioctl has the wrong signature in Go. According to https://illumos.org/man/2/ioctl req is an int. In Go, that's int32, not int or uint as the Go code has now.  Presumably it's too late to fix that, which is unfortunate.

Is it too late?
Regarding ioctls using negative numbers:

The easiest way to do this is probably just by adding & 0xffffffff onto the end of the constant definition.
(The lazy version, by the way, is just unix.IoctlLifreq(tun.ipfd, unix.SIOCGLIFMTU & 0xffffffff, &l)).

Affected functions:
$ git grep "req uint" unix/syscall_solaris.go
unix/syscall_solaris.go://sys   ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
unix/syscall_solaris.go://sys   ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
unix/syscall_solaris.go:func ioctl(fd int, req uint, arg uintptr) (err error) {
unix/syscall_solaris.go:func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
unix/syscall_solaris.go:func IoctlSetTermio(fd int, req uint, value *Termio) error {
unix/syscall_solaris.go:func IoctlGetTermio(fd int, req uint) (*Termio, error) {
unix/syscall_solaris.go:func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
unix/syscall_solaris.go:func IoctlSetString(fd int, req uint, val string) error {
unix/syscall_solaris.go:func IoctlLifreq(fd int, req uint, l *Lifreq) error {
unix/syscall_solaris.go:func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {

To anyone labeling this issue, this affects both solaris and illumos.
While I'm likely going to be the one doing the work, I could definitely use some guidance on what approach will make the most sense.

(CC @golang/solaris @golang/illumos)

Do you propose to change the signature of the Ioctl functions on Solaris/Illomos?
cc @ianlancetaylor for whether this type of API change is acceptable.

There is no reason for Go function signatures to precisely match C function signatures.  It's true that the C function takes a 32-bit integer, but it's fine for the Go function to take a 32- or 64-bit integer depending on the platform.  Either way you have to pass a magic constant anyhow.  The Go code does the right thing when invoking the system call.
Closing because I don't think there is anything to do.  Please comment if you disagree.

From a usability and readability perspective, it seems to me like one would expect to be able to write
err := unix.IoctlLifreq(tun.ipfd, unix.SIOCGLIFMTU, &l)

I'm fairly certain, at least for that ioctl, that my code is the only consumer.
Is it too late to change things to make that possible?
The following feels very clunky (as elaborated here: https://github.com/WireGuard/wireguard-go/pull/39#discussion_r1134778678) :
reqnum := int(unix.SIOCGLIFMTU)
err := unix.IoctlLifreq(tun.ipfd, uint(reqnum), &l)

I suppose the alternative is to recommend something like:
// some helpful comment explaining why this is necessary
SIOCGLIFMTU := unix.SIOCGLIFMTU & 0xffffffff
// ...
err := unix.IoctlLifreq(tun.ipfd, SIOCGLIFMTU, &l)

But that too feels kind of gross.
I do agree with the reviewer of my other code that the two lines including the extra assignment to do the ioctl looks gross.
If nothing else, it would be nice to clean up the test case with at least a better explanation and ideally a cleaner function call.

Maybe we could change unix.SIOCGLIFMTU to be a positive number that fits in a uint?

Heh. Today I learned that the POSIX ioctl in <stropts.h> doesn't match the Linux ioctl in <sys/ioctl.h>. POSIX specifies the (signed) int signature, whereas Linux defines it as unsigned long.
Actually, https://www.gnu.org/software/gnulib/manual/html_node/ioctl.html links to three different LSB specifications, two of which use int and one of which uses unsigned long. 😵💫
The Solaris and Illumos system calls defined in C match the POSIX signature and header file. So I agree that the signatures in x/sys/unix seem to be wrong, but I also agree with @zx2c4 that it's probably too late to fix that. 😞

Maybe we could change unix.SIOCGLIFMTU to be a positive number that fits in a uint?

It gets defined in unix/zerrors_solaris_amd64.go which is auto-generated by unix/mkerrors.sh so that might be tricky.

The script can be changed, if we decide to change the constant.

Heh. Today I learned that the POSIX ioctl in <stropts.h> doesn't match the Linux ioctl in <sys/ioctl.h>. POSIX specifies the (signed) int signature, whereas Linux defines it as unsigned long.

Thank you for looking into this.

Actually, https://www.gnu.org/software/gnulib/manual/html_node/ioctl.html links to three different LSB specifications, two of which use int and one of which uses unsigned long. 😵💫
The Solaris and Illumos system calls defined in C match the POSIX signature and header file. So I agree that the signatures in x/sys/unix seem to be wrong, but I also agree with @zx2c4 that it's probably too late to fix that. 😞

Any suggestions? @cherrymui suggested we could change the way mkerrors.sh defines the constants. Would doing that be backwards compatible with existing code? (My experiments in the go playground suggest not, but I could be doing it wrong...)

Neither change would be entirely compatible, unfortunately. I'm not sure whether it's worth a breaking change to fix, but in my opinion if it is worthwhile it would be cleaner to change the signature on Solaris to match the C system call signature than to give the constant a value that isn't exactly equal to the value of the C constant.

You mean change req uint into req int? Yea, seems reasonable.

Some of these ioctls are very very very likely only in use by my code. It should be fine to do a breaking change on those (in my opinion.)
If anyone else is using them, they will probably appreciate the cleanup that the breaking change allows.

For the Lifreq, it could look something like this?
diff --git a/unix/syscall_solaris.go b/unix/syscall_solaris.go
index d3444b6..eb01da4 100644
--- a/unix/syscall_solaris.go
+++ b/unix/syscall_solaris.go
@@ -1120,8 +1120,8 @@ func (l *Lifreq) GetLifruUint() uint {
        return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
 }

-func IoctlLifreq(fd int, req uint, l *Lifreq) error {
-       return ioctlPtr(fd, req, unsafe.Pointer(l))
+func IoctlLifreq(fd int, req int, l *Lifreq) error {
+       return ioctlPtr(fd, uint(req), unsafe.Pointer(l))
 }

 // Strioctl Helpers
diff --git a/unix/syscall_solaris_test.go b/unix/syscall_solaris_test.go
index 6c2b906..dc46bd5 100644
--- a/unix/syscall_solaris_test.go
+++ b/unix/syscall_solaris_test.go
@@ -367,17 +367,13 @@ func TestLifreqGetMTU(t *testing.T) {
        if err != nil {
                t.Fatalf("could not open udp socket: %v", err)
        }
-       // SIOCGLIFMTU is negative which confuses the compiler if used inline:
-       // Using "unix.IoctlLifreq(ip_fd, unix.SIOCGLIFMTU, &l)" results in
-       // "constant -1065850502 overflows uint"
-       reqnum := int(unix.SIOCGLIFMTU)
        var l unix.Lifreq
        for link, mtu := range tc {
                err = l.SetName(link)
                if err != nil {
                        t.Fatalf("Lifreq.SetName(%q) failed: %v", link, err)
                }
-               if err = unix.IoctlLifreq(ip_fd, uint(reqnum), &l); err != nil {
+               if err = unix.IoctlLifreq(ip_fd, unix.SIOCGLIFMTU, &l); err != nil {
                        t.Fatalf("unable to SIOCGLIFMTU: %v", err)
                }
                m := l.GetLifruUint()

I can open a CR for changing the ioctls that I added for wireguard-go. I'm a little more nervous about any other ones that were added for other purposes.

Hrm. It appears that this issue also affects aix.
Checking various references for ioctl(2), I see

unsigned long

linux
darwin
freebsd
netbsd
openbsd
dragonfly
hurd

int:

aix (apparently declared in K&R syntax 😅)
solaris
illumos
zos

I believe it is an SVR4 and STREAMS heritage thing, so I would expect to see it in operating systems from that part of the family tree.

I'll update the solaris CL to use an Updates # tag instead of a Fixes #, so these can be addressed one by one.

Updating the CL to include aix and zos.


Can't claim handle on waitlist wallet

i'm already whitelist from phaver but when i tried claim lens profile it keep show "Something went wrong when claiming"
keep getting this message after claim whitelist on phaver,note already clear chache,flus dns,etc but still get same message,change browser using mobile app stil got same error.
on
@orbapp_
it said already locked

Try refreshing

No more waitlist


Using PancakeView with Entry in TitleView throws NotSupportedException on Android

If you use PancakeView with an Entry in NavigationPage.TitleView, it throws a NotSupportedException if you touch the entry and start to type.
I've also seen the same exception in a PancakeView with an Entry on the Page itself, but this seems to be very rare, couldn't reproduce it anymore.
The following code was used:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:pancakeView="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView"
             mc:Ignorable="d"
             x:Class="PancakeViewBugTitleView.MainPage">
    <NavigationPage.TitleView>
        <StackLayout>
            <pancakeView:PancakeView HeightRequest="40" CornerRadius="20,20,20,20" BackgroundColor="Gray">
                <pancakeView:PancakeView.Border>
                    <pancakeView:Border Color="#33333c" Thickness="1" />
                </pancakeView:PancakeView.Border>
                <StackLayout Orientation="Horizontal" HeightRequest="20" Padding="10,0,10,0">
                    <Image Source="icon_search.png" HorizontalOptions="Start" VerticalOptions="CenterAndExpand"/>
                    <Entry Placeholder="Click here, try to type, it will crash"
                                          HorizontalOptions="FillAndExpand"
                                          VerticalOptions="CenterAndExpand"
                                          MaxLength="20"
                                          IsTextPredictionEnabled="False"
                                          IsSpellCheckEnabled="False"
                                          ReturnType="Done">
                    </Entry>
                </StackLayout>
            </pancakeView:PancakeView>
        </StackLayout>
    </NavigationPage.TitleView>
    <ContentPage.Content>
        <StackLayout>
            <pancakeView:PancakeView HeightRequest="40" CornerRadius="20,20,20,20" BackgroundColor="Gray">
                <pancakeView:PancakeView.Border>
                    <pancakeView:Border Color="#33333c" Thickness="1" />
                </pancakeView:PancakeView.Border>
                <StackLayout Orientation="Horizontal" HeightRequest="20" Padding="10,0,10,0">
                    <Image Source="icon_search.png" HorizontalOptions="Start" VerticalOptions="CenterAndExpand"/>
                    <Entry Placeholder="Sometimes crashes here too, but it's very rare"
                                          HorizontalOptions="FillAndExpand"
                                          VerticalOptions="CenterAndExpand"
                                          MaxLength="20"
                                          IsTextPredictionEnabled="False"
                                          IsSpellCheckEnabled="False"
                                          ReturnType="Done">
                    </Entry>
                </StackLayout>
            </pancakeView:PancakeView>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

Here is the Exception:
07-14 13:46:32.007 I/MonoDroid(29578): UNHANDLED EXCEPTION:
07-14 13:46:32.043 I/MonoDroid(29578): System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.PancakeView.Droid.PancakeViewRenderer from native handle 0x61 (key_handle 0x9ebaae5). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.PancakeView.Droid.PancakeViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
07-14 13:46:32.043 I/MonoDroid(29578):    --- End of inner exception stack trace ---
07-14 13:46:32.043 I/MonoDroid(29578):   at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x000b5] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00111] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):    --- End of inner exception stack trace ---
07-14 13:46:32.043 I/MonoDroid(29578):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017e] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x00023] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Android.Views.View.get_Parent () [0x0001f] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Xamarin.Forms.Platform.Android.DescendantFocusToggler.RequestFocus (Android.Views.View control, System.Func`1[TResult] baseRequestFocus) [0x0002f] in <312f0ce8dbcc4c47b5fc27a24af8b2b0>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Xamarin.Forms.Platform.Android.FormsEditTextBase.Xamarin.Forms.Platform.Android.IDescendantFocusToggler.RequestFocus (Android.Views.View control, System.Func`1[TResult] baseRequestFocus) [0x00015] in <312f0ce8dbcc4c47b5fc27a24af8b2b0>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Xamarin.Forms.Platform.Android.FormsEditTextBase.RequestFocus (Android.Views.FocusSearchDirection direction, Android.Graphics.Rect previouslyFocusedRect) [0x0001b] in <312f0ce8dbcc4c47b5fc27a24af8b2b0>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at Android.Views.View.n_RequestFocus_ILandroid_graphics_Rect_ (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 native_direction, System.IntPtr native_previouslyFocusedRect) [0x00011] in <55654ebe9f2a48e6bade2862bb243f94>:0
07-14 13:46:32.043 I/MonoDroid(29578):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.76(intptr,intptr,int,intptr)
07-14 13:46:32.531 E/AndroidRuntime(29578): FATAL EXCEPTION: main
07-14 13:46:32.531 E/AndroidRuntime(29578): Process: com.app, PID: 29578
07-14 13:46:32.531 E/AndroidRuntime(29578): crc64fe7e538dcffb0c36.MonoExceptionHelper: (NotSupportedException) Unable to activate instance of type Xamarin.Forms.PancakeView.Droid.PancakeViewRenderer from native handle 0x61 (key_handle 0x9ebaae5).
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Java.Interop.TypeManager.CreateInstance(System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)[0x0017e](Java/Interop/TypeManager0x0017e.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Java.Lang.Object.GetObject(System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type)[0x00023](Java/Lang/Object0x00023.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Java.Lang.Object._GetObject[T](System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)[0x00017](Java/Lang/Object0x00017.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Java.Lang.Object.GetObject[T](System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)[0x00000](Java/Lang/Object0x00000.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Android.Views.View.get_Parent()[0x0001f](Android/Views/View0x0001f.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Xamarin.Forms.Platform.Android.DescendantFocusToggler.RequestFocus(Android.Views.View control, System.Func`1[TResult] baseRequestFocus)[0x0002f](Xamarin/Forms/Platform/Android/DescendantFocusToggler0x0002f.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Xamarin.Forms.Platform.Android.FormsEditTextBase.Xamarin.Forms.Platform.Android.IDescendantFocusToggler.RequestFocus(Android.Views.View control, System.Func`1[TResult] baseRequestFocus)[0x00015](Xamarin/Forms/Platform/Android/FormsEditTextBase/Xamarin/Forms/Platform/Android/IDescendantFocusToggler0x00015.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Xamarin.Forms.Platform.Android.FormsEditTextBase.RequestFocus(Android.Views.FocusSearchDirection direction, Android.Graphics.Rect previouslyFocusedRect)[0x0001b](Xamarin/Forms/Platform/Android/FormsEditTextBase0x0001b.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Android.Views.View.n_RequestFocus_ILandroid_graphics_Rect_(System.IntPtr jnienv, System.IntPtr native__this, System.Int32 native_direction, System.IntPtr native_previouslyFocusedRect)[0x00011](Android/Views/View0x00011.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.76(intptr,intptr,int,intptr).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): Caused by: crc64fe7e538dcffb0c36.MonoExceptionHelper: (MissingMethodException) No constructor found for Xamarin.Forms.PancakeView.Droid.PancakeViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Java.Interop.TypeManager.CreateProxy(System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)[0x000b5](Java/Interop/TypeManager0x000b5.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Java.Interop.TypeManager.CreateInstance(System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)[0x00111](Java/Interop/TypeManager0x00111.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): Caused by: crc64fe7e538dcffb0c36.MonoExceptionHelper: (JavaLocationException) Exception of type 'Java.Interop.JavaLocationException' was thrown.
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown..(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at   --- End of managed Java.Lang.Error stack trace ---.(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at java.lang.Error: Java callstack:.(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at crc643f46942d9dd1fff9.FormsEditTextBase.n_requestFocus(Native Method).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at crc643f46942d9dd1fff9.FormsEditTextBase.requestFocus(FormsEditTextBase.java:53).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.view.View.requestFocus(View.java:12367).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.view.View.requestFocus(View.java:12309).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at crc643f46942d9dd1fff9.FormsEditText.n_onSelectionChanged(Native Method).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at crc643f46942d9dd1fff9.FormsEditText.onSelectionChanged(FormsEditText.java:62).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.widget.TextView.spanChange(TextView.java:10684).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.widget.TextView$ChangeWatcher.onSpanChanged(TextView.java:13400).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.text.SpannableStringBuilder.sendSpanChanged(SpannableStringBuilder.java:1307).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.text.SpannableStringBuilder.sendToSpanWatchers(SpannableStringBuilder.java:651).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:580).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:507).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:37).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:843).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.view.inputmethod.BaseInputConnection.setComposingText(BaseInputConnection.java:616).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:393).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:89).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.os.Handler.dispatchMessage(Handler.java:107).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.os.Looper.loop(Looper.java:214).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at android.app.ActivityThread.main(ActivityThread.java:7356).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at java.lang.reflect.Method.invoke(Native Method).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492).(unknown.cs:1)
07-14 13:46:32.531 E/AndroidRuntime(29578): 	at 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930).(unknown.cs:1)

I also created a repro repository:
https://github.com/acuntex/PancakeViewBug_TitleView
It's possible to add the missing constructor, but it's more import why he suddenly needs that weird constructor.

As per Samantha's comment here it might be the linker removing PancakeView:
https://github.com/xamarin/Xamarin.Forms/issues/11098
You could try calling PancakeViewRenderer.Init(); from your MainActivity's OnCreate.

I also wonder whether this is a bug specific to PancakeView or if something similar happens with other types of views.

No, PancakeView works fine when it's not in the TitleView. The problem is that somehow the Framework is looking for another constructor with two parameters (System.IntPtr, Android.Runtime.JniHandleOwnership)
The bug occurs also on Debug without any optimizations, so there's no R8 or anything active. I've seen that Xamarin had similar issues with the LabelRenderer or other Renderers before, according to them it's fixed, apparently not.
The following workaround works:
    public class TitleViewPancakeView: PancakeView
    {
    }

[assembly: ExportRenderer(typeof(TitleViewPancakeView), typeof(CustomPancakeViewRenderer))]
namespace YourApp.Droid.Renderer
{
    public class CustomPancakeViewRenderer: PancakeViewRenderer
    {
        public CustomPancakeViewRenderer(Context context) : base(context)
        {
        }

        [Obsolete]
        public CustomPancakeViewRenderer(IntPtr handle, JniHandleOwnership transfer): base(Xamarin.Forms.Forms.Context)
        {
        }
    }
}

Just make sure to set the Visual of the PancakeView to Default because if it is not, the DependencyResolver of Xamarin.Forms (https://github.com/xamarin/Xamarin.Forms/blob/719fc7a604ff0cce8922d717c99bfb0fa17e35e0/Xamarin.Forms.Core/DependencyResolver.cs) has a pretty dirty workaround in line 50, which checks if the constructor has two parameters (without any type checking) and then fails because it does not match.
In the Repro-Repository you can see both cases, in titleview and not in titleview, it just crashes when you start typing.

I can add a constructor to the renderer as a workaround?
[Obsolete]
public PancakeViewRenderer(IntPtr handle, JniHandleOwnership transfer) : base(Xamarin.Forms.Forms.Context)
{
}

It would work, but you would also have to set the Visual of the PancakeView to the Default because if a parent Visual is e.g. Material, it will crash because of the dirty workaround there is in the DependencyResolver in Xamarin.Forms.
Basically a workaround of a workaround because Xamarin uses workarounds :-(

Guess I'll try. Have to admit that a different solution doesn't quite spring to mind just yet.

I would say overriding the Visual property and not providing a setter should do the trick. Thoughts?
public new IVisual Visual => VisualMarker.Default;

I got this only when I navigate back to a page. And I think it started after I upgraded my project to AndroidX.

@dhindrik The error seems to occur when Android tries to Dispose the Renderer... It's also on versions < AndroidX.
I'm starting to believe it's a Xamarin.Forms Bug but they don't want to listen. :(

Could you try this in https://www.nuget.org/packages/Xamarin.Forms.PancakeView/<IP_ADDRESS>1-beta?

Made a comment in the commit.
Will check it out, if you want a fast check, you can get https://github.com/acuntex/PancakeViewBug_TitleView and start it in the android Emulator.
The current version should crash, after you updated it should work hopefully.

Confirmed fixed in #116


Support layer masking

Thanks for the contribution! Tried the masking and it works great. But I discovered a bug that allows you to open multiple windows. I can operate on any of those windows, but confirming the change will only close the last opened one and the rest still stays. Would you mind addressing those?
https://github.com/user-attachments/assets/11109db5-a0f8-4211-b928-22d8919c3f41

Haha oops good catch. What do you suggest the menu button should do in the case of a window already being open? We could close the existing window, or perhaps bring it to focus, or maybe we disable the menu button entirely

Hmm, not totally sure, but was thinking maybe bring it to focus? I thought it would be the most familiar for people since Windows or maybe other OSs do something like that as well 😅 what do you think?

I'd suggest taking inspiration from the Godot editor itself, since it's cross platform while OS behavior may vary with respect to child windows.
Are there examples in Godot of child windows popping up at the press of a button?

Are there examples in Godot of child windows popping up at the press of a button?

So the only examples I can find actually block the entire Godot main window until the child window is closed. I guess we could do that? I think it's called "exclusive" so I'll just enable that.

I'd suggest taking inspiration from the Godot editor itself, since it's cross platform while OS behavior may vary with respect to child windows.

Thanks for the suggestion, very helpful.
I think everything looks good, I'm merging this. Thanks for the contribution again!


fix: update ESLint React rules

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Create Workflow for release and tag with Changelog

What this PR does / why we need it:
Automate ODH Release Process for Kserve repos
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #RHOAIENG-2732

/ok-to-test

/lgtm

/test e2e-raw

/test e2e-slow

/retest

/test e2e-slow

/lgtm


Calling GetError causes an InvalidCastException

First of all, thanks for the bindings, they have been quite fun to play around with. I've been able to get up and running pretty smoothly, but calling WebGLRenderingContextBase.GetError seems to cause an error like the following:
Uncaught (in promise) Error: System.InvalidCastException: Specified cast is not valid.
  at WebGLDotNET.WebGLRenderingContextBase.InvokeForBasicType[T] (:8000/System.String method, System.Object[] args) [0x00000] in E:\projects\WebGL.NET\src\WebGLDotNET\WebGL.Backend.cs:155
  at :8000/WebGLDotNET.WebGLRenderingContextBase.GetError () [0x00000] in E:\projects\WebGL.NET\src\WebGLDotNET\WebGL.cs:792

Without knowing too much about how the wasm layer is working, it's hard to diagnose this one.

I noticed the same problem was also happening in the GetUniformBlockIndex function, which is  more of a problem for my library. I was able to fix it by changing the implementation to the following, and the same works for GetError.
- public uint GetUniformBlockIndex(WebGLProgram program, string uniformBlockName) => InvokeForBasicType<uint>("getUniformBlockIndex", program, uniformBlockName);
+ public uint GetUniformBlockIndex(WebGLProgram program, string uniformBlockName) => (uint)InvokeForBasicType<int>("getUniformBlockIndex", program, uniformBlockName);

Hi Eric,
When I saw you were reporting issues a smile rendered in my face :-) Thanks in advance for them.
You reached one of the multiple calls we've still not tested. Although we started by calling functions by hand we moved into a transpiler to generate the entire API, adding such stuff like the one you found. So, I'll look into this and surely add such cast.
Thanks again,
—Marcos


Open a single file in debug

Is your feature request related to a problem? Please describe.

I'm a totally new guy to coding, so i'm learning first steps of JS coding and HTML design. I tried using this extension to open debug window within VSCode to see live changes to HTML file i`m currently working with and use debug feature to see how script is being processed by machine. But i cant figure out how to open my exact file with F5 (debug) command in this extension.

That is how my launch.json looks like and i tried to use same settings as with opening debug mode in Chrome, but when i use this, instead of opening file i get this

I dont understand what i`m doing wrong, and where can i read how to set up opening single file properly.
Describe the solution you'd like:

I`d like to know what am i doing wrong. Is there a guide for total noobs somewhere?
Describe alternatives you've considered:

Additional context:

Hi there, we're looking into this and will come back to you soon.

Any news on how to properly open single html file for preview?

It is part of our next sprint - we're currently working on fixing a lot of of other bugs reported here.

@Stroichik
Try this launch.json configuration:
        {
            "type": "pwa-msedge",
            "request": "launch",
            "name": "Open index.html",
            "file": "${file}",
            "webRoot": "${workspaceFolder}/public",
        }

This should launch the file you are currently focusing on and will allow you to set breakpoints in any script that is running in the page.  If you want to open the DevTools from here to inspect the DOM elements, you can click on this button in the connection toolbar:

Let me know if this worked for you or if you run into any more issues!

Well, it opens debug tools inside VSCode, but it opens file in a browser, instead of inside VScode. So its actually no point in using it, since any click on debug tools or DOM elements will make VSCode window to overlap browser window.
Main point of a plugin is to have all 3 elements in 1 window - code itself, DOM-tree and preview of actual web page - so that i could change code and see live changes on a page and DOM-tree.

Try using this launch.json setting and launching the DevTools the same way above:
        {
            "type": "pwa-msedge",
            "request": "launch",
            "name": "Open index.html",
            "file": "${file}",
            "webRoot": "${workspaceFolder}/public",
            "runtimeArgs": [
                "--headless"
            ],
        }

You should be able to toggle an in-VSCode browser screencast with this button here if it isn't already open on launch:

Thanks for finding that bug about the screencast cursor offset.  I created a new issue on it here: https://github.com/microsoft/vscode-edge-devtools/issues/924
As for this issue, I am going to close it out.


feat(Editor): use javascript isolation

use javascript isolation

Description
close #1012

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: ArgoZhang:x: Argo ZhangArgo Zhang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Singularize headers for special case 1

Makes it easier to read the repository 'report'.
Edit:
Just thought about to add the date of the last tag / creation of the repo.
I think it would add some valuable information but introduces the problem of date formatting, what do you think?

I feel like this might benefit from a little pluralize helper function. Something like:
func pluralize(count int, singular string, plural string) string {
    if count > 1 {
        return fmt.Sprintf("%d %s", count, plural)
    }
    return fmt.Sprintf("1 %s", singular)
}

Then we can basically get rid of all the if-then-else blocks. What do you think?

Could even add a check for count being 0:
...
if count == 0 {
    return fmt.Sprintf("No %s", plural)
}
...

Then we can basically get rid of all the if-then-else blocks. What do you think?

Yes, don't know why I didn't make it that way in the first place.
In case you don't want to have the function in main.go feel free to move it.
Take care, I did remove the early return in commit.go as far as I understand the code this should change nothing in terms of functionality (maybe a tiny amount of runtime).

Perfect, looks good to me! Another project, another contribution from you, thank you so much!


Sahern

Coverage increased (+7.4%) to 46.0% when pulling 9208d3952731a9d2fc447eb0bee5eabd02717a54 on sahern into f6d3ac700add7e257f3f0d584e2f8f6ece5a773e on master.


Cannot view the passphrase of the sub-account created by near-cli

The user created a sub-account by near-cli and did not view the passphrase of it. He want to view the passphrase and log in with it.
We can support the creation of sub-accounts, or allow the user to copy passphrase in the command line.

Unfortunately NEAR Wallet is not fully tested with sub-accounts, do we have a Zendesk ticket with this issue?

Unfortunately NEAR Wallet is not fully tested with sub-accounts, do we have a Zendesk ticket with this issue?

No，the requirement is from a Chinese  wechat user.

I'll close this one for two reasons:

this is blocked by near-cli, as it doesn't support the export of a private key via seed passphrase
NEAR Wallet wouldn't be able to recover a sub-account from a raw private key, the only way is to enter the seed phrase


fix(parser): correct parse_object fn

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Fixes #12597. This change adds more conditions to the parse_object_name function to let it identify what types of token is not allowed to be in the object name. In this case, when a - is part of the object name, the function would identify that this token is not allowed, thus raising an Unexpected token error. So far, only - is identified to be not part of the object name. There could be other types of tokens.
The following token that is checked now also includes whitespace as the whitespace is needed for the function to stop looping through to another token. Plus, object names do not have whitespaces between them unless they are in the "" delimiter. If whitespace is not included in checking the next token a hyphen that could intentionally be used for subtraction could be mistaken as part of the object name. An example that would be affected is select '1'::rw_int256 - '1'::rw_int256;

Checklist

[X] I have written necessary rustdoc comments

[X] I have added necessary unit tests and integration tests

[X] All checks passed in ./risedev check (or alias, ./risedev c)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

The following token that is checked now also includes whitespace as the whitespace is needed for the function to stop looping through to another token. Plus, object names do not have whitespaces between them unless they are in the "" delimiter. If whitespace is not included in checking the next token a hyphen that could intentionally be used for subtraction could be mistaken as part of the object name. An example that would be affected is select '1'::rw_int256 - '1'::rw_int256;

This may be an overkill. The most straightforward fix is to just report:
ERROR:  QueryError: sql parser error: expect description of the format but found - at line:1, column:xx
Near "create source foo-"

That is, we still treat foo in create source foo-bar ... as object name just like in select foo-bar from t; But we know - cannot be a part of the create source statement. Note that currently both parse_columns_with_watermark and parse_with_properties are allowed to be empty, deferring the error until parse_source_schema_with_connector attempts to match - against FORMAT or ROW FORMAT. Optionally, we can go one step further and require with_properties to contain at least a nonempty connector (@tabVersion any concerns on tightening the requirement here?).

#13944


Nimble : getting BLE_HS_ENOTCONN after connection established (IDFGH-9185)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.0
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32S3-DevkitM1
Power Supply used.
USB
What is the expected behavior?
I am calling peer_disc_all (which calls ble_gattc_disc_svc_by_uuid) after receiving BLE_GAP_EVENT_CONNECT.
I'm expecting that it starts discovering BLE services.
What is the actual behavior?
Sometimes, I'm getting an error with status 7 (BLE_HS_ENOTCONN : No open connection with the specified handle)
Steps to reproduce.
static int
blecent_gap_event(struct ble_gap_event *event, void *arg)
{
    case BLE_GAP_EVENT_CONNECT:
        if (event->connect.status == 0) {
            MODLOG_DFLT(INFO, "Connection established ");
            rc = peer_disc_all(event->connect.conn_handle,
                                        blecent_on_disc_complete, NULL);
            (...)
        }
        (...)
}

static void
blecent_on_disc_complete(const struct peer *peer, int status, void *arg)
{
    if (status != 0) {
        /* Service discovery failed.  Terminate the connection. */
        MODLOG_DFLT(ERROR, "Error: Service discovery failed; status=%s "
                    "conn_handle=%d\n", error_code_to_string(status), peer->conn_handle);
        (...)
    }
    (...)
}

Debug Logs.
I (14:16:03.211) NimBLE: GAP procedure initiated: connect;
I (14:16:03.217) NimBLE: peer_addr_type=1 peer_addr=
I (14:16:03.222) NimBLE: df:bd:04:a5:1a:02
I (14:16:03.227) NimBLE:  scan_itvl=16 scan_window=16 itvl_min=250 itvl_max=600 latency=3 supervision_timeout=3200 min_ce_len=0 max_ce_len=0 own_addr_type=0
I (14:16:03.242) NimBLE:

I (14:16:03.809) NimBLE: Connection established

I (14:16:03.813) NimBLE: GATT procedure initiated: discover service by uuid; uuid=
I (14:16:03.821) NimBLE: a7630001-f491-4f21-95ea-846ba586e361
I (14:16:03.827) NimBLE:

E (14:16:09.003) NimBLE: Error: Service discovery failed; status=BLE_HS_ENOTCONN No open connection with the specified handle. conn_handle=1

More Information.
No response

I reproduced, followed by a crash this time :
I (08:27:32.303) NimBLE_BLE_CENT: Scan finished, RSSI -43, connecting...
I (08:27:32.311) NimBLE: GAP procedure initiated: connect;
I (08:27:32.317) NimBLE: peer_addr_type=1 peer_addr=
I (08:27:32.322) NimBLE: df:bd:04:a5:1a:02
I (08:27:32.327) NimBLE:  scan_itvl=16 scan_window=16 itvl_min=250 itvl_max=600 latency=3 supervision_timeout=3200 min_ce_len=0 max_ce_len=0 own_addr_type=0
I (08:27:32.342) NimBLE:

I (08:27:32.909) NimBLE: Connection established
I (08:27:32.909) NimBLE:

I (08:27:32.910) NimBLE_BLE_CENT: Added peer
I (08:27:32.912) NimBLE: GATT procedure initiated: discover service by uuid; uuid=
I (08:27:32.920) NimBLE: a7630001-f491-4f21-95ea-846ba586e361
I (08:27:32.926) NimBLE:

E (08:27:37.421) NimBLE: Error: Service discovery failed; status=BLE_HS_ENOTCONN No open connection with the specified handle. conn_handle=1

I (08:27:37.424) NimBLE: GAP procedure initiated: terminate connection; conn_handle=1 hci_reason=19

I (08:27:37.464) NimBLE: GAP procedure initiated: connect;
I (08:27:37.470) NimBLE: peer_addr_type=1 peer_addr=
I (08:27:37.476) NimBLE: df:bd:04:a5:1a:02
I (08:27:37.481) NimBLE:  scan_itvl=16 scan_window=16 itvl_min=250 itvl_max=600 latency=3 supervision_timeout=3200 min_ce_len=0 max_ce_len=0 own_addr_type=0
I (08:27:37.495) NimBLE:

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40056eed  PS      : 0x00060030  A0      : 0x820152b6  A1      : 0x3fcbf760
A2      : 0x3fc9f134  A3      : 0x00000007  A4      : 0x00000007  A5      : 0x3fc9f321
A6      : 0x3fc9f31c  A7      : 0x00000001  A8      : 0x00000007  A9      : 0x00000001
A10     : 0x00000001  A11     : 0x3fc9e79c  A12     : 0x00060820  A13     : 0x00060823
A14     : 0x00000000  A15     : 0x0000abab  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000007  LBEG    : 0x420154fe  LEND    : 0x4201550c  LCOUNT  : 0x00000002
0x420154fe: ble_hs_hci_evt_dispatch_find at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:150
 (inlined by) ble_hs_hci_evt_process at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:914

0x4201550c: ble_hs_hci_evt_process at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:917

Backtrace: 0x40056eea:0x3fcbf760 |<-CORRUPTED

ELF file SHA256: 11f10f0b8eae5952

Rebooting...

Hi @QuentinFarizon,
Do you observe this behaviour if you use the bleprph example of IDF ? We tried quickly at our end, and didn't observe this issue.
If this is a self developed application, can you possibly share your sample application code that we can try to use to reproduce the issue ?
Initial analysis looks like service discovery has failed which can be related to remote not sending any packet. The crash you have mentioned seems to be happening because a new connect request is sent from application when a previous disconnection attempt is still in progress.

Maybe the service discovery failed due to the remote, but I would expect to have a different error code in this case.
When I look at Nimble code, BLE_HS_ENOTCONN is thrown only when ble_hs_conn_find does not find the connection with given handle.
But as I discover service in BLE_GAP_EVENT_CONNECT, I'd expect connection handle to be set

Hi @QuentinFarizon ,
I have been trying to reproduce this issue for quite sometime, but not able to see the service discovery failure. I checked your logs in detail and the error print is in the service discovery callback function routine. At this point , it is expected to get some packets pertaining to gatt services. I think, an error OR disconnection can also cause the service discovery callback to be invoked and it happens to be with status 7.
In order to debug this further, may i request you to please help share one console log with attached patch . I have just introduced a dump to print the callstack when error happens to get more understanding for the code flow which will assist us to understand the failure scenario being observed at your end..
client_assert.txt
Thanks,
Rahul

@QuentinFarizon Thanks for reporting, would you please help share if any updates for the issues? Thanks.

Hello,
Still getting this error.
See log below, I am getting BLE_HS_ENOTCONN from service discovery callback before having been called on BLE_GAP_EVENT_DISCONNECT
I (19253) NimBLE: Connection established; conn_handle=1
I (19253) NimBLE_BLE_CENT: BLE_GAP_EVENT_CONNECT setting conn_handle to 1
I (19253) NimBLE:

I (19253) NimBLE_BLE_CENT: Added peer; conn_handle=1
I (19263) NimBLE: GATT procedure initiated: discover service by uuid; uuid=
I (19273) NimBLE: a7630001-f491-4f21-95ea-846ba586e361
I (19273) NimBLE:

I (21093) NimBLE: mtu update event; conn_handle=1 cid=4 mtu=40

I (24843) NimBLE: GAP procedure initiated:
I (24843) NimBLE: connection parameter update; conn_handle=1 itvl_min=12 itvl_max=120 latency=0 supervision_timeout=400 min_ce_len=0 max_ce_len=0
I (24843) NimBLE:

I (28593) NimBLE: GATT procedure initiated: discover all characteristics;
I (28593) NimBLE: start_handle=14 end_handle=22

I (51833) NimBLE: connection params update event; conn_handle=1 status=OK

I (51833) NimBLE:

E (51843) NimBLE: Error: Service discovery failed; status=BLE_HS_ENOTCONN No open connection with the specified handle. conn_handle=1

Hi @QuentinFarizon ,
I assumed you are using IDF examples and had provided the patch. Can you please confirm that the peer.c file changes i provided in previous comment were applied ?  the callback on service discovery  completion looks to be called in your logs, but the backtrace information is not seen , which the previous patch , if applied, shows in my testing.

Here is the stacktrace with your assert :
I (285102) NimBLE_BLE_CENT: Scan finished, RSSI -53, connecting...
I (285112) NimBLE: GAP procedure initiated: connect;
I (285112) NimBLE: peer_addr_type=1 peer_addr=
I (285122) NimBLE: cf:de:db:5e:7b:31
I (285122) NimBLE:  scan_itvl=16 scan_window=16 itvl_min=250 itvl_max=600 latency=3 supervision_timeout=3200 min_ce_len=0 max_ce_len=0 own_addr_type=0
I (285142) NimBLE:

I (285392) NimBLE: Connection established; conn_handle=1
I (285392) NimBLE:

I (285392) NimBLE_BLE_CENT: Added peer; conn_handle=1
I (285392) NimBLE: GATT procedure initiated: discover service by uuid; uuid=
I (285402) NimBLE: a7630001-f491-4f21-95ea-846ba586e361
I (285412) NimBLE:

E (290132) NimBLE: disconnection error during service discovery ; rc=7

assert failed: peer_disc_complete peer.c:83 (0)

Backtrace: 0x40376036:0x3fcbf180 0x4038049d:0x3fcbf1a0 0x403867f5:0x3fcbf1c0 0x4200b0aa:0x3fcbf2e0 0x4200b2d1:0x3fcbf300 0x42015889:0x3fcbf320 0x420158bf:0x3fcbf340 0x42015fe9:0x3fcbf360 0x42016e11:0x3fcbf390 0x42019553:0x3fcbf3b0 0x4201534b:0x3fcbf410 0x42015561:0x3fcbf430 0x42014b51:0x3fcbf450 0x4037ea05:0x3fcbf470 0x40377dfd:0x3fcbf490 0x42009ade:0x3fcbf4b0
0x40376036: panic_abort at /home/quentin/esp/esp-idf/components/esp_system/panic.c:412

0x4038049d: esp_system_abort at /home/quentin/esp/esp-idf/components/esp_system/esp_system.c:135

0x403867f5: __assert_func at /home/quentin/esp/esp-idf/components/newlib/assert.c:78

0x4200b0aa: peer_disc_complete at /home/quentin/Code/Boks/boks-link/main/ble/peer.c:83
 (inlined by) peer_disc_complete at /home/quentin/Code/Boks/boks-link/main/ble/peer.c:77

0x4200b2d1: peer_svc_disced at /home/quentin/Code/Boks/boks-link/main/ble/peer.c:635

0x42015889: ble_gattc_disc_svc_uuid_cb at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gattc.c:1585

0x420158bf: ble_gattc_disc_svc_uuid_err at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gattc.c:1657

0x42015fe9: ble_gattc_fail_procs at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gattc.c:1091

0x42016e11: ble_gattc_connection_broken at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gattc.c:4773

0x42019553: ble_gap_master_connect_reattempt at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gap.c:1002

0x4201534b: ble_hs_hci_evt_disconn_complete at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:233
 (inlined by) ble_hs_hci_evt_disconn_complete at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:187

0x42015561: ble_hs_hci_evt_process at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:919

0x42014b51: ble_hs_event_rx_hci_ev at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs.c:542

0x4037ea05: npl_freertos_event_run at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/src/npl_os_freertos.c:450

0x40377dfd: ble_npl_event_run at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h:185
 (inlined by) nimble_port_run at /home/quentin/esp/esp-idf/components/bt/host/nimble/nimble/porting/nimble/src/nimble_port.c:217

0x42009ade: blecent_host_task at /home/quentin/Code/Boks/boks-link/main/ble/main_ble.c:572

ELF file SHA256: 61c6ab3d09679840

Rebooting...

I see that CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT is enabled, I was not aware of that. Could it be the cause of the issue ?
What I want is ti maintain a permanent connection, always scanning and always connecting when down, so I already manages to reconnect if disconnected. So I guess I should disable CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT and keep managing it myself ?

Hi @QuentinFarizon ,
The CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT macro would attempt connection thrice if the connection did not happen in the first attempt. This basically gives more chance to get a connection through, in case the first attempt failed with reason 3E.
You can disable this macro as per your use case.
However, this still doesn't give input as to why disconnection is happening in the first place. Do you have any provision of taking a Over the Air log ?   Is this issue seen with all devices or seen with a particular remote device ?
Thanks,
Rahul

@QuentinFarizon Thanks for reporting, would you please help share if any further updates for the issue? Thanks.

Closing issue due to no further response. Please feel free to reopen with logs , if needed.


When opening a jupyter notebook file, shortcut keys create two windows/tabs.

When opening a jupyter notebook file, shortcut keys create two windows/tabs

Steps to cause the bug to occur

Open a jupyter notebook file on vscode with the Python extension.
Press Ctrl+Shift+n to create a new window, or Ctrl+n to create a new tab.

Actual behavior
Two new windows, or two new tabs created.
Expected behavior
Only one new window/tab should be created.

Your Jupyter and/or Python environment
Please provide as much info as you readily know

Jupyter server running: Local
Extension version: 2020.4.74986
VS Code version: 1.44.2
Setting python.jediEnabled: true
Python and/or Anaconda version: 3.7.6 / 4.8.2
OS: Manjaro Linux
Virtual environment: conda

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

Sorry I'm not reproing this. It only opens a single new window or a single new tab.
What happens if you do the same thing with a preview pane for an .md file? I suspect that if you're hitting this, it's not caused by our extension. We don't handle that command ourselves. It might be caused by having a webview open which is why I asked if it repro'd with a preview of an md file.

@rchiodo I looked into this before. It was actually a VSCode bug on Linux only. They actually just fixed it in vscode insiders.
@HappyCtest if you want you can try vscode-insiders build, the issue should be fixed there.
https://github.com/microsoft/vscode/issues/90579


Support multiple custers in the same VCN

@prydie what's the current problem around this? I'd be very interested to help out with whatever that may be since we do exactly this.

So the issue is we try to find the nodename in all the vnics in all the
subnets in the VCN. We only check the hostname against the vnic and not the
subnet DNS label.
So a node with the same hostname but different subnet DNS label could be
found and the volume attached to the wrong instance.
Currently we don't deploy like this but it's a possible configuration.
On Thu, 12 Apr 2018, 02:12 Josh Horwitz<EMAIL_ADDRESS>wrote:

@prydie https://github.com/prydie what's the current problem around
this? I'd be very interested to help out with whatever that may be since we
do exactly this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/oracle/oci-flexvolume-driver/issues/64#issuecomment-380643123,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABCPakwCQ_8WwXu3d0cg8MFq_1wvYXrVks5tnqnmgaJpZM4Scnuq
.

Sweet, so it actually does support this. It's only a problem if the display name doesn't match since that's checked first over the vnic logic which won't ever be the case in our use since node names/display names include the cluster name.

Solved by https://github.com/oracle/oci-flexvolume-driver/pull/149


Overwritten method Object.defineProperty breaking functionality of jsPDF

The rewriteDescriptor function being called by the zone.js Object.defineProperty override is breaking some functionality of the popular jsPDF library: https://github.com/MrRio/jsPDF/issues/2429
I don't really understand why the rewriteDescriptor method changes the desc.configurable to true but it breaks several places in the jsPDF code where jsPDF tries to define non-configurable properties like this:
var _BBox = [];
Object.defineProperty(this, 'BBox', {
   configurable: false,
   writeable: true,
   get: function () {
       return _BBox;
   },
   set: function (value) {
       _BBox = value;
   }
});

It could be fixed by freezing the desc object in jsPDF like this:
var _BBox = [];
Object.defineProperty(this, 'BBox', Object.freeze({
   configurable: false,
   writeable: true,
   get: function () {
       return _BBox;
   },
   set: function (value) {
       _BBox = value;
   }
}));

However, the jsPDF maintainers make a good point when they ask why they should change their code when it's adhering to standard functionality. I really can't answer that as I don't know enough about zone.js but I hope someone here can help us get this figured out.

@sirhcybe, thanks for posting the issue, I will check it.


Added Marco as Thanos Maintainer

As voted by Thanos Team, @pracucci is now part of our team! :heart:

Also, reordered list alphabetically.
Signed-off-by: Bartlomiej Plotka<EMAIL_ADDRESS>

Thanks Thanos team for this opportunity (and responsability). I will do my best to contribute and serve to this amazing project ❤

We will announce on Twitter later today (:


Add a TODO comment to FrozenStringLiteral module

Follow up of #5036.
This PR adds a memorandum to source code.
If frozen string literal is default in Ruby 3.0 it will remove this TODO comment and if not default it will need to change the conditional expression of return true if ruby_version >= 3.0.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[ ] Added tests.
[ ] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Run rake default or rake parallel. It executes all tests and RuboCop for itself, and generates the documentation.

👍


Add support for Go! AOP Framework

Currently the proxy support only Flow Framework, but should be possible to have a specific pathmapper for Go! AOP Framework

With 9e0d94e938b23552fdea905b4b1f4aacbbb64781 the path mapper storage is extracted from Flow path mapper to avoid code duplication between multiple XDebugProcessorPlugin.

Unfortunatly I never found the time to work on the support for Go! AOP, but the current debugproxy API can have pluggable mapper, so if anyone out there is up to give it a try, PR welcome.


Break up LARGE cpp files by class

Right now, disk.cpp is HUGE. There are multiple class definitions in the same file and its difficult to maintain. This file should be broken down to logical controller / drive types.
rascsi.cpp should also be broken down so that the argument parsing logic and thread are more isolated from main().

Disk.cpp has been split up and been in use for a while. Closing this issue. If someone wants to break apart rascsi.cpp someday, that’s fine. But I don’t think it’s really necessary


Discord channel Invite Invalid

The README contains a link to a Discord channel but when I click the link I get an error message "Invite Invalid."

Sorry, duplicate issue to #26


open .offlineimaprc in conf-mode

Observed behavior
emacs opens ~/.offlineimaprc in fundamental mode, even after enable :app email layer
Expected behavior
emacs should open ~/.offlineimaprc in conf-mode
Steps to reproduce

enable :app email layer
open ~/.offlineimaprc
emacs opens in fundamental mode instead of conf-mode

System information

Click to expand

OS: darwin (x86_64-apple-darwin18.2.0)
Emacs: 26.1 (Dec 27, 2018)
Doom: 2.0.9 (develop 5e3d4c3ba286f4b9ef5a59e502ff733673e38e46)
Graphic display: t (daemon: nil)
System features: DBUS NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2
Details:elc count: 0
uname -a:  Darwin SteamedFish-iMac.local 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64
modules:   (:feature debugger eval (evil +everywhere) file-templates (lookup +docsets) snippets spellcheck syntax-checker workspaces :completion company helm :ui deft doom doom-dashboard doom-modeline doom-quit evil-goggles fci hl-todo nav-flash treemacs (popup +all +defaults) pretty-code unicode vc-gutter vi-tilde-fringe window-select :editor format multiple-cursors rotate-text :emacs dired ediff electric eshell hideshow imenu term vc :tools ansible docker editorconfig gist macos make magit pdf rgb terraform tmux upload :lang cc data emacs-lisp go javascript latex markdown (org +attach +babel +capture +export +present) perl php python (sh +fish) web :app email irc (write +wordnut +langtool) :config default)
packages:  (cnfonts fcitx)
exec-path: (/usr/local/opt/python/libexec/bin/ /usr/local/bin/ /usr/local/sbin/ /usr/bin/ /bin/ /usr/sbin/ /sbin/ /usr/libexec/ /Volumes/DATA/ConTeXt/tex/texmf-osx-64/bin/ /usr/local/opt/llvm/bin/ /opt/X11/bin/ /Applications/Wireshark.app/Contents/MacOS/ /usr/local/Cellar/emacs-mac/emacs-26.1-z-mac-7.4/libexec/emacs/26.1/x86_64-apple-darwin18.2.0/)

As of b1aca7db, both .offlineimaprc and .mbsyncrc files should open in conf-mode if app/email is enabled. Let me know if that isn't the case.
Thanks for letting me know!


Fix some wrong German words (confusion B / ß)

@stweil Stefan, when the tesseract-ocr/langdata is updated, this does not mean that the /tessdata is updated, as far as I know.
As your recent patches are very important for DE language (and would save me from publishing my post-filter sed script which is still needed to repair German-ocr-ed texts), please can you take care that the deu*.traineddata files are updated (retrained) as well ?

Yes, fixes in langdata need additional work to result in updates of tessdata.
I'm afraid that I cannot do much there. See another comment which I have just written.
To summarize, tessdata updates for Tesseract 3.x are manageable for contributors like me, but updates for Tesseract 4.x with LSTM are much more difficult. @theraysmith recently announced that he is going to start the training for an update of tessdata with an improved training process, and I hope that this is sufficient to fix some of the problems which we see for German texts (although I am not sure about that, see also the tesseract-dev forum).

https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/tesseract-ocr/wQ8AUCkvDbo/QQJ91biKAAAJ

Very often tesseract detects "StraBe" instead of "Straße".

Yes, I use -l=deu

Ray did not use the fixed dictionary when he created the LSTM traineddata files, but used new dictionaries with the old (and additional new) errors.

https://github.com/tesseract-ocr/tessdata/issues/62#issuecomment-319839971

@stweil you said that improving the ocr result is harder with 4.0. What does "harder" mean?
I can provide a lot of german scan input which has broken results.
If training material is needed, just tell me.
I could provide parts of scans where a single german word is visible and the corresponding word in utf8.

I am sorry to drop in here, but please have a look to the proposal (not a solution, yet) https://github.com/tesseract-ocr/tesseract/issues/1442 [Suggestion] "Training light" - Learning by doing - re-feeding a corrected text file to retrain tesseract.


platformsh: 5.0.13 -> 5.0.15

Description of changes
https://github.com/platformsh/cli/releases/tag/5.0.15

It looks like you accidentally mass-pinged a bunch of people, which are now subscribed
and getting notifications for everything in this pull request. Unfortunately, they
cannot be automatically unsubscribed from the issue (removing review request does not
unsubscribe), therefore development cannot continue in this pull request anymore.
Please create a new pull request, link back to this one and ping the
people actually involved in here over there. For the next time, remember to set your PR to draft status before rebasing. In draft status, you can preview the list of maintainers that are about to be requested for review, which allows you to sidestep this issue.
In order to avoid this in the future, there are instructions for how to properly
rebase between branches in our contribution guidelines.
Setting your pull request to draft prior to rebasing is strongly recommended.
In draft status, you can preview the list of people that are about to be requested
for review, which allows you to sidestep this issue.
This is not a bulletproof method, though, as OfBorg still does review requests even on draft PRs.


Video does not play at start but audio does

This happens on all Twitch streams I tried at all quality settings. mplayer2 starts and shows the first frame, but does not update the video or the time elapsed (stuck at 00:00:00) even though the audio plays.
mplayer2 config:
ao=alsa
cache-min=20
cache=8192
dvd-device=/dev/sr0
font="Segoe UI"
nolirc=true
prefer-ipv4=false
really-quiet=false
vo=xv

This also happens with vo=gl. With xv/gl, if I seek forward when the player starts, the video and audio restart synced. If I change vo=x11, I get no video (blank window) but audio still plays.
livestreamer g46b9e07
rtmpdump dc76f0a
mplayer2 g6c87a98
Arch Linux

Just for posterity, ffplay seems to work fine: livestreamer twitch.tv/<user> --player ffplay


Start button no longer works

The problem
Issue seems introduced by latest update.
Pressing the "Start" button on the washing machine, throws an error:
Version of miele integration having the issue?
0.1.12
Version of Home Assistant Core having the issue?
Home Assistant 2023.4.2
Anything in the logs that might be useful for us?
No response
Additional information

Thank you for reporting. Fixed in PR #258
I am waiting for a few other fixes and plan to release later today or tomorrow. If you are in a hurry you can reinstall version "main" via HACS as soon as this PR is merged.


(Global) Rationale and warning prompts make my eyes bleed

Note: #1859 has a handy list of all the various types of warning/rational prompts.
Paul already did some design exploration of this in Sketch and I think the following illustrations are pretty close to what he had, with some variation based on whether it's a less destructive change (yellow background/orange icons/header/button text) or more destructive action (red background/red icons/header/button text)

Current styling is all over the map in terms of colors and styles. Here's an example:

Also, the triangular "!" warning icons are missing from some, but not all, of our confirmation prompts
Here's an example where it's missing:

Where it's still there:
.

would it surprise you to learn these have been built in about 5 different ways & that this is not simple at all?
this is maybe why I’ve put it off for a year…

I have some prototypes with only minimal style changes. To approximate the styles in the mockups at top would require overhauling some core PNotify shared elsewhere, and introduce a lot of regressions. I’d like to do this, but we should talk about strategies going forward.
We can mix and match colors (aka types), and supply any element to any time. Examples follow.
Default notice
ie. create_unified_changeset_notice({}) note that all text & inputs are null/false/empty, but all controls and icons are true. We must explicitly supply text for everything but the confirmation buttons. This is to prevent overloading options & allowing the UI to break obviously.

Success notice with header, preamble, and no confirmation buttons

Notice (aka warning) with text, reason dropdown (FPO), and rationale field

Error message with custom text and confirmation buttons but no form elements

Info message with custom text and confirmation buttons but no form elements

Dev notes:
See http://<IP_ADDRESS>:8000/pnotify-prototype on the 1187-pnotify-eyebleed branch
I have not thoroughly regression-tested the other place where we use create_unified_changeset_notice (results form I think).
Important* note that I cribbed the code from create_changeset_notice instead of calling it from create_unified_changeset_notice. Why?

I needed to affect some styling and layout in create_changeset_notice but didn’t want to introduce regressions
it felt like an unnecessary indirection
we should defer to the unified function in the future anyway

Pnotify has really limited ability to affect the markup (kind of lousy skinning options all around aktch), which is the Bootstrap Way™ of doing this sort of styling. To get these things looking really sharp would mean making some bigger choices about both BS-style alerts & pnotify growls elsewhere in the app.


fix: avoid strict validations for skipped rows

This PR contains:

[x] bugfix
[ ] feature
[ ] refactor
[ ] tests
[ ] documentation
[ ] metadata

Breaking Changes?

[x] yes
[ ] no

skipped rows skipped using skipLines are not validated against strict option
fixes issue https://github.com/mafintosh/csv-parser/issues/136

FYI @shellscape

Please don't tag/ping maintainers in replies unless a significant amount of time has passed without review.
You'll need to add a test for this fix for us to accept the changes.

Please don't tag/ping maintainers in replies unless a significant amount of time has passed without review.
Thanks for the PR beer You'll need to add a test for this fix for us to accept the changes.

sure will add tests and re submit, anyway contribution link is broken such i couldn't find the requirements for a PR, can you please provide a resource for the completeness criteria for a PR (to avoid the trouble :) )?

Thanks for putting together this PR. It is appreciated. The fix for this was somewhat simpler than what you had submitted. I've committed a fix and tests for it. We'll release this fix later on in the day.


build not working on mac

building the javascript dependencies doesn't work out of the box  on mac.
it seems to me that the typescript rollup plugin doesn't like something in the init.ts file.
when i try to run npm run build a second time, the error changes to something else, but still in the typescript rollup plugin.
i will attach the output of me trying to build a fresh repository clone, in case it might help:
buildfail.txt

Hello, I'm trying to figure it out. Let's see what is happening.

@monsterkodi  try it once and make sure to run each run each command separately

@Kanai2003 I think you likely tagged the wrong person.


Add farallon prod hub

Moved data over with AWS DataSync (https://aws.amazon.com/datasync/)
Image tag update to satisfy https://github.com/2i2c-org/pangeo-hubs/issues/2#issuecomment-866210082

Ref https://github.com/2i2c-org/pilot-hubs/issues/368

@damianavila done!

ty, @damianavila


Return instance of log in callback rather than only errors

It makes more sense to return the instance of Log, for a given lint run, in place
of the copy of just the errors, for the lint run, in the callback. This remove
the need to expose it as an instance method of the linter.
Closes #18

Coverage remained the same at 100.0% when pulling 0580d6d815f01bc1caee4e2c4f532a26be0a7a18 on kalisjoshua:log-instance-callback-arg into 6297211f2ea28ce2497377e2a53032d33f385e40 on QuickenLoans:master.

Coverage remained the same at 100.0% when pulling 287f7b0f1f7817a39fca5e5d60be14421bc042c7 on kalisjoshua:log-instance-callback-arg into 24b9414c2820c3eb0ae4e4c0972028e7f6ac02c7 on QuickenLoans:master.

Coverage remained the same at 100.0% when pulling 2f06b092521fdf23b2a758f124e6cef6eb99e593 on kalisjoshua:log-instance-callback-arg into 24b9414c2820c3eb0ae4e4c0972028e7f6ac02c7 on QuickenLoans:master.

Tagging this as 1.2 would violate semver, since you're breaking compatibility with users of the error logger.
Since there are still changes being made, and there are no releases tagged yet, maybe you should drop back down to the 0.x series until the API is fully stabilized.
Code looks ok to me. I don't see any glaring issues, but I don't know how it works well enough to do a good code review!

I don't want to roll back to a previous version for a number of reasons. But I feel like rolling a full version forward is a little drastic for this change. I agree with you that it is probably a breaking change though.
What if I change it from returning an instance of Log to the full list of log entries. The previous version was only returning an array of errors so this change would be less drastic of a change.

I actually just ran across this - https://www.npmjs.com/package/raml-parser?__hstc=72727564.54b17e190667d6afff329b9eb9be7806.1425410707751.1432154547620.1432298154282.25&__hssc=72727564.1.1432298154282&__hsfp=1801885937 - check out their description of versioning; I kinda like it for this.

If your implementation as represented here is the best way of solving the problem, it doesn't make sense to choose a less-good solution just for the sake of a version number.
I would think sticking to semver is better, because it's more widely accepted.

Coverage remained the same at 100.0% when pulling 9fad03f380786e0870443c2aaf13df7dad7b51f2 on kalisjoshua:log-instance-callback-arg into c430d9204f7751adfddd84cb9037a6bd164ef09b on QuickenLoans:master.


Check the render method of WithContext.

Hi,  I am using this package of version 6.4.2
and my peer dependencies are
{
"react": "^16.13.1",
"react-dnd": "^5.0.0",
"react-dnd-html5-backend": "^3.0.2",
"react-dom": "^16.13.1",
}
Initially this was working fine, but now it is throwing error like this
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Apologies for the delayed reply!
@imprintnext-kamal does this happen with 6.10.2 as well ? In case yes, please share a reproducible code sandbox link so I can look into it.


Add benchmarks

Added a benchmark project using BenchmarkDotNet which measures a few scenarios on all supported runtimes. The scenarios are:

Encoding a small integer
Encoding a large integer
Encoding multiple integers

The same cases are covered for decoding. The project is currently using a benchmark switcher to make space for future benchmarks, but feel free to change it to just run the one benchmark.

I've created an example optimization in this commit.
It uses a local stack-based buffer instead of a StringBuilder. Notice how the allocations are cut in half for EncodeSmall.
Before:

After:

@Genbox Could you make a PR for this commit?

Yep. I'll get right on it. Note that the stack buffer one seems to work, but I'm unsure if the size of the buffer is enough. I did create a function that calculates the length needed before doing the work, but it was slower on a few of the platforms and didn't really save much allocation.


Remove duplicate content

Remove content that's duplicated and point to https://docs.microsoft.com/dotnet/core/extensions/dependency-injection

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0d78f540-81fd-1ba9-cb90-591e4ec27d9b
Version Independent ID: 2251f557-dd3a-ec35-2558-6243337db009
Content: Dependency injection in ASP.NET Core
Content Source: aspnetcore/fundamentals/dependency-injection.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Corresponding PDF file still contains duplicated content.


Bugfix/handle labels on defaultvalues

PR Checklist
This PR fulfills the following requirements:

[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[x] A changelog entry has been added to CHANGELOG.md if necessary

PR Type
What kind of change does this PR introduce?

[x] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] react application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Default value doesn't map the labels
https://jira.antwerpen.be/browse/OCAPIO-1214
What is the new behavior?
It does
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information
Resolved issues
https://jira.antwerpen.be/browse/OCAPIO-1214

@HybridFox Both single selection and multiple selection should account for a single string as an array of strings, just in case the user mismatches. Don't expect the user to know exactly which one to use for which case.

I have added the tests for my added functionality and handled both array and non arrays


Average with negative weights

Problem description
In several contexts, we discussed how to compute weighted averages when the weights are negative. The prime use case for this is an average carbon price over several regions, weighted by the (possibly negative) emissions in each region.
The current implementation of the aggregate_region implements a direct weighted sum:

value * weight / sum(weight)

This can lead to very counter-intuitive results - see more below.
Illustration
Use the following snippet to explore the current behaviour:
def test_aggregate(value, weight):

    TEST_DF = pd.DataFrame([
        ['reg_a', 'Price|Carbon', 'USD/t CO2', value[0]],
        ['reg_b', 'Price|Carbon', 'USD/t CO2', value[1]],
        ['reg_a', 'Emissions|CO2', 'Mt CO2', weight[0]],
        ['reg_b', 'Emissions|CO2', 'Mt CO2', weight[1]],
    ],
        columns=['region', 'variable', 'unit', 2010],
    )

    return pyam.IamDataFrame(TEST_DF, model='model_a', scenario='scen_a')\
        .aggregate_region('Price|Carbon', weight='Emissions|CO2')._data.iloc[0]

If the sum of the weights is zero, the resulting average price is infinitetest_aggregate(value=[1, 2], weight=[-1, 1])
>>> inf

Depending on the order of the weight vector, it can also be negative infinity.test_aggregate(value=[1, 2], weight=[-1, 1])
>>> -inf

If sum(weight) == 0 and value * weight == 0, the returned value is nan, which is dropped when initiatilizing the IamDataFrame.test_aggregate(value=[1, 1], weight=[-1, 1])
>>> Error

Other values can lead to situations where the "average" price is outside the range min(value), max(value), e.g.test_aggregate(value=[1, 2], weight=[-1, 2])
>>> 3

Possible solutions

Leave as is, because it's up to the users to know this (including modeling teams uploading to the IIASA Scenario Explorer).

Leave as is, but write a warning message when weights are negative (question is whether users just ignore this).

Raise an error when any weight is negative, forcing users to explicitly choose an alternative approach (average, min, max).

Use the absolute of the weight vector. If there are three regions with emissions -1, 0 and 1, this would mean that the prices of region 1 and 3 are given equal weight and region 2 is ignored. This seems wrong...

Redefine the mathematical expression to

value * weight / sum(abs(weight))

However, this can also lead to strange outcomes, e.g., if all regional values are identical, and the weighted average is different.

Apply normalization (recalculate the weight vector such that min(weight) == 0 and max(weight) == 1, leaving the relative distribution as is. This means that the price of the region with the lowest emissions is ignored (because its weight is 0).

Apply some shift/offset to make all weights positive. Suggestion by @byersiiasa: weight = weight + 2 * min(weight).
The vector weight=[-1, 2] would become [1, 4].
test_aggregate(value=[1, 2], weight=[1, 4])
>>> 1.8

This has the drawback that the offset multiplier is arbitrary - using a multiplier of 3 instead of 2 gives different results...
test_aggregate(value=[1, 2], weight=[2, 5])
>>> 1.7142

Any other ideas...?

Note
The function numpy.avg() faces the same problem. The devs decided to leave the unintuitive behaviour (solution 1 above), see https://github.com/numpy/numpy/issues/9825.

@volker-krey @byersiiasa @peterkolp @gidden @khaeru @OFR-IIASA @l-welder @gunnar-pik @Rlamboll, please share your thoughts or ping other colleagues who might have relevant insights... (or select Unsubscribe on this page if you don't want to be bothered with notifications about this thread).

There is plenty of discussion in various forums on this topic. The mathematical definition appear to require weights to be positive (https://en.wikipedia.org/wiki/Weighted_arithmetic_mean#Mathematical_definition). I would simply refrain from calculating a weighted average in case of et least one weight being negative. If you do something else, there will be users who misinterpret the outcome as they were not aware of whatever non-standard assumption you make (e.g. switching to absolute value for weights).

Yeah, I can't see how you could describe it as an average when it anticorrelates with one of the constituents. You would just use the abs value as the weight. However without wanting to divide by the weight sum, this is just the aggregation function that we discussed here #355, which I use a lot (in Silicone) for constructing remainders.

Thanks @danielhuppmann, good to have this discussion! How about using a different weight, such as population or GDP or Final energy demand? This gives a decent indication of the system size of the regional entities. Not perfect, but in my view better than any of the other alternatives.

so the rationale on 7 is to preserve the ratios between the weights, but adjust them in a way to make them all positive. (what I proposed above of adding above doesn't preserve the ratios however)
It doesn't matter if the weights are [1,2] or [10,20]; the resultant weighed average will be the same if the ratios between the weights are preserved and that is normally the main aim. this falls apart when a weight is 0 or below.
So the 2*min(weight) factor is to offset the lowest weight to it's absolute equivalent (e.g. make -2 into 2), and then increase all other weights by the same amount. But this doesn't preserve the ratio, but at least the absolute differences in emissions between the regions are the same (perhaps that is desirable?)
Alternatively,, whilst I'm not sure how quite, but what if the adjustment of the other weights can be done in a way that makes the lowest weight positive, and then adjusts (e.g. multiply, not add) all the others in a way to preserve the ratio between the weights?

on 6. - there are other "re-scaling" options that preserve the statistical distribution between the weights, if setting the lowest value to 0 is undesirable. E.g. min weight could be given a weight of 1 instead.
I also quite like the Final Energy suggestion of @gunnar-pik

Principle of minimum surprise would suggest: don't do something different than numpy, so certainly not (4) through (7). Definitely do not have different behaviours depending on the particular variable names in use, as suggested in the last two comments.
Of (1), (2), and (3), I would exclude (3), since the numpy thread points out this is mathematically valid, albeit perhaps without a common or obvious application in IA modeling. Between (1) and (2) it's a toss-up and I think depends on the intended user base; if they're likely to make this mistake and unlikely to read the docs carefully, then a warning could help.

I would argue that there will be different awareness of what's happening between (i) direct pyam users, and (ii) the users of the Scenario Explorer that will not know much about what is happening in the scenario processing pipeline. In the former case, issuing a warning as proposed in (2) seems reasonable to me. In the latter case, I would have a pretty strong preference for not calculating a finite value, but use instead NA (or similar) so that test case 4 does not materialize.

Thanks for all comments so far!
There are several levels to this question:

what/how to implement or change the behaviour in pyam?
whether/how to use this pyam feature in the IIASA Scenario Explorer processing pipeline
(aggregation is currently implemented independently there)
how to configure (project-specific) the scenario protocols and processing pipeline to mitigate the problem
(suggestion by @gunnar-pik to use a different variable for a carbon-price, would need to be discussed)

For now, this discussion should remain focused on the first question.
Based on @volker-krey's comment, I added two additional options/suggestions in the description above (repeated here for clarity):

Write a warning when weights are negative and add a keyword-argument whether to drop (default) or not any values aggregated with negative weights.

Same as 8, but default is to include aggregation with negative weights.

So in 8, the default behavior would be @volker-krey's suggestion, with a simple way to switch to option 2, with a warning in either case. This default goes against @khaeru's preference of "doing the same as numpy", but reduces the risk of confusing or misleading results. I therefore think that 8 is the best solution.

I agree this all makes from software perspective.
How / where to have the discussion regarding actual implementation to resolve the problematic issue of when the desirable weights , e.g. Emissions, go negative?


Update Skopeo and use list-tags

This PR updates Skopeo version in the docker image and utilizes skopeo list-tags command to retrieve tags from remote repository. This fixes issues with adding repositories which does not contain latest tag to anchore-engine.
References:

#236
#484

Hi @anxolerd ! First, thanks for the work on this. It's something we've had on the to-do list for a while. We'll review!

With this update, it's also possible to remove: https://github.com/anchore/anchore-engine/blob/master/anchore_engine/services/apiext/swagger/swagger.yaml#L1164 since that API parameter is used for handling the old behavior of skopeo.

@zhill , I've deleted some should-be outdated and no more required references to lookuptag in 06ab80c.

Thanks for the update @anxolerd ! Will do some testing and review and update here. This is much appreciated work. Thanks!

Thanks @anxolerd and @dakaneye !


Add Amanieu to T-libs

...

Seems like some bigger changes are needed... I'll try to do those later...

Merged as part of https://github.com/anp/rfcbot-rs/pull/264.


setSetJson() does not support named blank nodes

I'm getting errors when running a mutation with a named blank node via the dgraph-js client (same works in ratel)
{
  uid: '_:somename',
  description: 'Describe thing',
  aDate: '2019-07-02T04:00:00.000Z'
}

{
  error: Error: 2 UNKNOWN: strconv.ParseUint: parsing "_:somename": invalid syntax
      at Object.exports.createStatusError (/node_modules/grpc/src/common.js:91:15)
      at Object.onReceiveStatus (/node_modules/grpc/src/client_interceptors.js:1204:28)
      at InterceptingListener._callNext (/node_modules/grpc/src/client_interceptors.js:568:42)
      at InterceptingListener.onReceiveStatus (/node_modules/grpc/src/client_interceptors.js:618:8)
      at callback (/node_modules/grpc/src/client_interceptors.js:845:24) {
    code: 2,
    metadata: Metadata { _internal_repr: {} },
    details: 'strconv.ParseUint: parsing "_:somename": invalid syntax'
  }
}

this adds a bunch of impedance when writing dependant mutations...

Are you parsing the obj to JSON? it's not clear from your example.

Thanks for the fast response!
It is sent just like in the examples (if I send a pure JSON string it chokes of course).
    const node = {
      uid: '_:somename',
      description: 'Describe thing',
      aDate: '2019-07-02T04:00:00.000Z'
    };
    const mutation = new dgraph.Mutation();
    mutation.setSetJson(node);
    const done = await txn.mutate(mutation);

If I leave the uid field out the blank nodes come back fine via done.getUidsMap().get('blank-0')

I've did a quick test here and your example is working normally. I thought you were doing something else.
BTW - Ratel uses the HTTP API not any JS client.

const dgraph = require("dgraph-js");

// Create a client stub.
function newClientStub() {
    return new dgraph.DgraphClientStub("localhost:9080");
}

// Create a client.
function newClient(clientStub) {
    return new dgraph.DgraphClient(clientStub);
}

async function createData(dgraphClient) {
    // Create a new transaction.
    const txn = dgraphClient.newTxn();
    try {
        // Create data.
        const p = {
            uid: '_:somename',
            description: 'Describe thing',
            aDate: '2019-07-02T04:00:00.000Z'
          };

        // Run mutation.
        const mu = new dgraph.Mutation();
        mu.setSetJson(p);
        const assigned = await txn.mutate(mu);

        // Commit transaction.
        await txn.commit();

        console.log(`Created person named "somename" with uid = ${assigned.getUidsMap().get("somename")}\n`);

        console.log("All created nodes (map from blank node names to uids):");
        assigned.getUidsMap().forEach((uid, key) => console.log(`${key} => ${uid}`));
        console.log();
    } finally {
        // Clean up. Calling this after txn.commit() is a no-op
        // and hence safe.
        await txn.discard();
    }
}

  async function main() {
  const dgraphClientStub = newClientStub();
  const dgraphClient = newClient(dgraphClientStub);

  await createData(dgraphClient);

  // Close the client stub.
  dgraphClientStub.close();
}

main().then(() => {
  console.log("\nDONE!");
}).catch((e) => {
  console.log("ERROR: ", e);
});

Interesting! Are you using 1.1? I’m on 1.0.16
On Sat, Jul 13, 2019 at 5:15 PM Michel Conrado<EMAIL_ADDRESS>wrote:

Closed #59 https://github.com/dgraph-io/dgraph-js/issues/59.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/dgraph-io/dgraph-js/issues/59?email_source=notifications&email_token=AADMY64QSCYZ5MZ3LE3OEJTP7JAXNA5CNFSM4IC6XCYKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSPQLCNI#event-2480976181,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADMY6YLD6GRQDV2CXNPZADP7JAXNANCNFSM4IC6XCYA
.

 "dgraph-js": "^1.3.0-rc1"
I'm using Dgraph from Master.
Dgraph version   : v1.0.12-rc3-571-ge4a07ad0
Commit SHA-1     : e4a07ad0
Commit timestamp : 2019-07-04 23:27:17 +0530
Branch           : master
Go version       : go1.12.6

I've just tested on v1.0.16 and is working.
Dgraph version   : v1.0.16
Commit SHA-1     : 0590ee95
Commit timestamp : 2019-07-11 11:52:54 -0700
Branch           : HEAD
Go version       : go1.12.5

Oh wow! I owe you a beer! It turns out that a query that happens after the mutation but in the same transaction is where the issue was! I used your code and of course it worked....The blank node was making its way into the query: func(uid(_:somename))... and it was choking there. Ugh :/
Thanks for all your effort looking into this, super appreciated!!!


VueJS

Has anyone ever used this with VueJS framework?

Not as far as we're aware.
There were pretty successful attempts at using it with other frameworks similar enough to Vue however.
Generally it should be possible but will likely require sacrificing some parts of either ZombieBox or Vue functionality since they attempt to solve a lot of the same problems, so this might not be a good idea.
Major ZombieBox components like spatial navigation, focus management, history management or ui toolkit might not work properly with typical Vue app out of the box and likely require some workarounds.
Same should be true for core Vue components, practices and approaches.
Most sane approach is probably using only hardware abstraction layer from ZombieBox: classes in device directory and array of ZombieBox platforms packages.

understood


.alignment does not work at all. does not go right left or center.

Hi,
i am using .alignment on TTGTextTagCollectionView. and it does nothing. by default takes left and never changes. am i doing something wrong or its bug in library ?

Can you provide some Demo Code for me to debug ?


Feature request: copy shortcut

Would it be interesting to you/others to add little sharing shortcuts? Like maybe an icon to copy, or an icon to facilitate sharing?

What do you mean by "sharing"? Share what? Could you give an example of the scenario?
Thx!

What do you mean by "sharing"? Share what? Could you give an example of the scenario?

I think @hcientist  means like Share button on top of the Frame says something like "share this code on *!" or like click to copy?
Example:
------------------REPO NAME ETC -------- Copy/Share ----
1 - echo "hi"
2 - echo "clear"
user Presses:
Copy - Copy all text from 1 to 2 to Clipboard
Share - Copy Github link to clipboard (not to raw, just to repo - branch - file)

Thanks! I'll add a "help wanted" label

Update: @cfurrow and I added the button to copy (#12)

Close inactive (and partially resolved) issue. Reopen if needed :)


[BUG] Change MenuItem Text style from #48509, found in #46030

Details

This PR changes MenuItem Text component's flex prop to 1, to force using all provided space (especially on Android) and thus end in more or less the same place when truncated (depending on the content). This fix changes MenuItem's behaviour in the whole app, but above all in SearchAdvancedFilters, where the previous inconsistency was visible the most.
The change is visible the most on android (far right in first screenshot, middle in the second)
Previously:

After the change:

Fixed Issues

$ https://github.com/Expensify/App/issues/48509
PROPOSAL:
Tests

Check if values in various MenuItems  when too long are truncated at the end of available space (not earlier), it is mainly visible in filters' values in /search/filters.
If possible, check if current change didn't affect any application's feature negatively.

[x] Verify that no errors appear in the JS console

Offline tests

N/A
QA Steps

Check if current change didn't affect any application's feature negatively.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
https://github.com/user-attachments/assets/9b249403-d8ce-4e1e-8052-8ae454989597

Android: mWeb Chrome
https://github.com/user-attachments/assets/486ed0df-b698-41f9-ac4f-87c7bbc5d055

iOS: Native
https://github.com/user-attachments/assets/acb47940-297d-4cc4-adc9-50a5475a4cd6

iOS: mWeb Safari
https://github.com/user-attachments/assets/d000c111-e7da-458a-803f-34c869457a51

MacOS: Chrome / Safari
https://github.com/user-attachments/assets/198cf618-1c1b-4a99-8267-711c65ebc237

MacOS: Desktop
https://github.com/user-attachments/assets/74dd8441-ea2d-4222-88b7-eceb8b03fb19

I'm not assigning any designers directly because this change doesn't present any new designs, @luacmartins can you please tag a QA to check for possible conflicts? 🙏

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.