Issues running Kestrel on Linux: System.DllNotFoundException: libdl

Looks like folks are having issues running Kestrel on Linux: https://github.com/aspnet/Home/issues/172

Confirming that.. i am not able to run kestrel on debian linux. Libuv is present in version v1.0.0-rc1 but still i get an exception when running kestrel :
Mono: DllImport unable to load library 'libapi-ms-win-core-file-l1-2-0.dll: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden'.
Mono: DllImport unable to load library 'libapi-ms-win-core-file-l1-2-0.dll: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden'.
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.dlopen (string,int) <0xffffffff>
  at Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.LoadLibrary (string) <0x0001b>
  at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load (string) <0x0002e>
  at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor (Microsoft.Framework.Runtime.ILibraryManager) <0x003db>
  at Kestrel.ServerFactory.Start (Microsoft.AspNet.Builder.IServerInformation,System.Func`2<Microsoft.AspNet.FeatureModel.IFeatureCollection, System.Threading.Tasks.Task>) <0x00107>
  at Microsoft.AspNet.Hosting.HostingEngine.Start (Microsoft.AspNet.Hosting.HostingContext) <0x001a8>
  at Microsoft.AspNet.Hosting.Program.Main (string[]) <0x00333>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000ca>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
  at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x000f7>
  at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost,string,string[]) <0x004af>
  at Microsoft.Framework.ApplicationHost.Program.Main (string[]) <0x00347>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000ca>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
  at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x000f7>
  at dnx.host.Bootstrapper.RunAsync (System.Collections.Generic.List`1<string>) <0x00393>
  at dnx.host.RuntimeBootstrapper.ExecuteAsync (string[]) <0x00633>
  at dnx.host.RuntimeBootstrapper.Execute (string[]) <0x0004f>
  at EntryPoint.Main (string[]) <0x00247>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0x80fcaa3]
        mono() [0x814b23c]
        mono() [0x806f30f]
        [0xb77d840c]
        /lib/ld-linux.so.2(+0xe9f6) [0xb77e79f6]
        /lib/ld-linux.so.2(+0x11ba8) [0xb77eaba8]
        /usr/lib/i386-linux-gnu/libdl.so(+0xc2b) [0xb3cd5c2b]
        /lib/ld-linux.so.2(+0xdde6) [0xb77e6de6]
        /usr/lib/i386-linux-gnu/libdl.so(+0x10bc) [0xb3cd60bc]
        /usr/lib/i386-linux-gnu/libdl.so(dlopen+0x41) [0xb3cd5b61]
        [0xb3e0dcac]
        [0xb3e0dc34]
        [0xb3e0d8bf]
        [0xb3e0d17c]
        [0xb3e0cb10]
        [0xb5633a29]
        [0xb57da4ac]
        [0xb57da14f]
        mono() [0x8073be1]

Debug info from gdb:

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

any helping ideas?

I'm running into a similar issue on CentOS 6.5 with Mono 3.12.0:
[root@localhost HelloWeb]#
[root@localhost HelloWeb]# dnx . kestrel
System.InvalidOperationException: Unable to load libuv. Make sure libuv is installed and available as libuv.so.1
  at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load (System.String dllToLoad) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor (ILibraryManager libraryManager) [0x00000] in <filename unknown>:0
  at Kestrel.ServerFactory.Start (IServerInformation serverInformation, System.Func`2 application) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.HostingEngine.Start () [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
  at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
  at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
  at dnx.host.Bootstrapper.RunAsync (System.Collections.Generic.List`1 args) [0x00000] in <filename unknown>:0

But libuv.so.1 is present in /usr/lib:
[root@localhost HelloWeb]# ll /usr/lib/ | grep libuv
lrwxrwxrwx.  1 root root   25 Apr 15 17:10 libuv.so.1 -> /usr/local/lib/libuv.so.1

Did you try to build libuv by yourself? i did it this way : https://github.com/w41dev/ASPNet5_MonoSetup/blob/master/SetupLibuv.sh
on Ubuntu 14.04.2 LTS kestrel works, i got the Problem only on Debian.

Yes I built it myself. I found the issue. Kestrel looks for /usr/lib64/libuv.so.1 but when you build it on CentOS it's stored in ```/usr/local/lib/libuv.so````. The solution was to add a symbolic link, but I wonder by maybe Kestrel should also look under /usr/local/lib ?

@acastaner Kestrel itself is not concerned with actually finding the library. Kestrel asks libdl's dlopen to find "libuv.so.1" and this in turn follows documented rules.
One of the largest issues with Linux in general is the idiosyncrasies of distributions when it comes to the actual semantics of those rules. If you build libuv yourself, please make sure you follow your distribution's rules of where to store the binaries. There is nothing Kestrel can do to help you with that.

Hi @acastaner
How did you find out Kestrel was looking for /usr/lib64/libuv.so.1?
Cheers

@thekane Have a look at Mono's interop documentation. Setting the environment variables also works for the dnx commands: MONO_LOG_LEVEL="debug" MONO_LOG_MASK="dll" dnx . kestrel

Thanks @Tragetaschen I will have a look

I think this may be an issue in mono (any versions) running on Debian 32-bit.
Florian Kummer found out https://bugzilla.xamarin.com/show_bug.cgi?id=4190
I isolated part of the kestrel source code that called libdl
For example, the following C# code fails in mono:  (it uses [DllImport("libdl")])
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;

namespace TestLibdl
{
	public static class PlatformApis
	{
		public static class LinuxApis
		{

			[DllImport("libdl")]
			public static extern IntPtr dlopen(String fileName, int flags);

        		public static void Main()
        		{
				dlopen("libuv.so.1", 2);
                		Console.WriteLine("open :)");

        		}
		}
	}
}

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) TestLibdl.PlatformApis/LinuxApis.dlopen (string,int) <0xffffffff>
  at TestLibdl.PlatformApis/LinuxApis.Main () <0x0001b>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono() [0x81027e3]
	mono() [0x814ea14]
	mono() [0x806d977]
	linux-gate.so.1(__kernel_rt_sigreturn+0) [0xb77ce40c]
	/lib/ld-linux.so.2(+0xf0f6) [0xb77de0f6]
	/lib/ld-linux.so.2(+0x12245) [0xb77e1245]
	/usr/lib/i386-linux-gnu/libdl.so(+0xcbc) [0xb71b4cbc]
	/lib/ld-linux.so.2(+0xe716) [0xb77dd716]
	/usr/lib/i386-linux-gnu/libdl.so(+0x136c) [0xb71b536c]
	/usr/lib/i386-linux-gnu/libdl.so(dlopen+0x41) [0xb71b4d71]
	[0xb7392f8c]
	[0xb7392e34]
	[0xb7392ef7]
	mono() [0x8072101]

Debug info from gdb:

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted

I followed Florian's instructions and I created a wrapper for libdl in C, and named it libdl-debian-32-bit.  I changed my C# code to use the wrapper ([DllImport("libdl-debian-32-bit")]) and "it worked".
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;

namespace TestLibdl
{
	public static class PlatformApis
	{
		public static class LinuxApis
		{

			[DllImport("libdl-debian-32-bit")]
			public static extern IntPtr dlopen(String fileName, int flags);

        		public static void Main()
        		{
				dlopen("libuv.so.1", 2);
                		Console.WriteLine("open :)");

        		}
		}
	}
}

This is how I created the wrapper libdl-debian-32-bit.c :
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>

void* dlopen(const char* file, int flag) {
    void* ret;
    ret = dlopen(file,flag);
    return ret;
}

char* dlerror() {
    char* err;
    err = dlerror();
    return err;
}

void* dlsym(void* handle, const char* symbol) {
    void* ret;
    ret = dlsym(handle,symbol);
    return ret;
}

int dlclose(void* handle) {
    return dlclose(handle);
}

gcc -Wall -fPIC -c libdl-debian-32-bit.c
gcc -shared -o libdl-debian-32-bit.so libdl-debian-32-bit.o
sudo cp libdl-debian-32-bit.so /lib

I said "it worked" because it didn't crash when opening libuv.
I guess I have to find out how to test it  in Microsoft.AspNet.Server.Kestrel/Networking/PlatformApis.cs
Any help will be appreciated. I am a newbie and I have been enjoying Debian.

We'll investigate this in beta8 and see if it's still an issue.

I can't repo this scenario on Ubunto 14.04 with Mono 4.0.4 and our 1.0.0-beta8 bits.

@w41dev @thekane @Tragetaschen @acastaner this issue was filed a few months back. I retried the scenario following our Guide for installing ASP.NET 5 on Linux would you please, give it a try?
I can't repo this issue with

Ubuntu 14.04
Mono 4.0.4
AspNet 5 1.0.0-beta8
Libuv 1.4.2 build from code

If you find this issue to be reproducible on a specific platform, please feel free to reopen this issue and let me know the config.

Hi @troydai
I gave it a try yesterday.
This is my configuration:

Debian 8 "Jessie" 32 bits
Mono 4.0.4
ASP.Net 5 1.0.0-beta8
libuv-1.4.2 build from code

I got the same result as described on July 8 (running dnx + kestrel on mono).
suarez@pluto:~/git-repos/Home/samples/1.0.0-beta8/HelloWeb$ dnx kestrel
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.dlopen (string,int) <0xffffffff>
  at Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.LoadLibrary (string) <0x0001b>
  at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load (string) <0x0002e>
  at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor (Microsoft.Dnx.Runtime.ILibraryManager,Microsoft.AspNet.Server.Kestrel.ServiceContext) <0x002b3>
  at Microsoft.AspNet.Server.Kestrel.ServerFactory.Start (Microsoft.AspNet.Http.Features.IFeatureCollection,System.Func`2<Microsoft.AspNet.Http.Features.IFeatureCollection, System.Threading.Tasks.Task>) <0x0030f>
  at Microsoft.AspNet.Hosting.Internal.HostingEngine.Start () <0x00223>
  at Microsoft.AspNet.Hosting.Program.Main (string[]) <0x001c0>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000c0>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
  at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x00103>
  at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain (Microsoft.Dnx.ApplicationHost.DefaultHost,string,string[]) <0x00283>
  at Microsoft.Dnx.ApplicationHost.Program.Main (string[]) <0x0042b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000c0>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
  at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x00103>
  at Microsoft.Dnx.Host.Bootstrapper.RunAsync (System.Collections.Generic.List`1<string>,Microsoft.Dnx.Runtime.IRuntimeEnvironment,string,System.Runtime.Versioning.FrameworkName) <0x0035f>
  at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync (string[],Microsoft.Dnx.Host.BootstrapperContext) <0x0085b>
  at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute (string[],Microsoft.Dnx.Host.BootstrapperContext) <0x00027>
  at EntryPoint.Main (string[]) <0x00483>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono() [0x8102e03]
	mono() [0x814f0b4]
	mono() [0x806dc77]
	linux-gate.so.1(__kernel_rt_sigreturn+0) [0xb7726d00]
	/lib/ld-linux.so.2(+0xf0f6) [0xb77380f6]
	/lib/ld-linux.so.2(+0x12245) [0xb773b245]
	/usr/lib/i386-linux-gnu/libdl.so(+0xcbc) [0xb4a02cbc]
	/lib/ld-linux.so.2(+0xe716) [0xb7737716]
	/usr/lib/i386-linux-gnu/libdl.so(+0x136c) [0xb4a0336c]
	/usr/lib/i386-linux-gnu/libdl.so(dlopen+0x41) [0xb4a02d71]
	[0xb42727a4]
	[0xb427272c]
	[0xb42917bf]
	[0xb42873fc]
	[0xb42862e0]
	[0xb54d7fbc]
	[0xb5b1f8a9]
	[0xb5b1f525]
	mono() [0x8072421]

Debug info from gdb:

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted
suarez@pluto:~/git-repos/Home/samples/1.0.0-beta8/HelloWeb$

/cc @glennc @muratg i reopen this bug since customer can repo this issue on another platform.

Greetings, I solved it by creating symbolic links to the correct location (Expected by Kestrel):
ln -s /usr/lib64/libdl.so.2 /usr/lib64/libdl
ln -s /usr/local/lib/libuv.so /usr/lib64/libuv.so.1
In my case it works.
You can see this thread: http://stackoverflow.com/questions/31855031/how-do-i-install-netcore-on-centos-machine

I have same problem like user thekane. I tried CamiloBernal solution (with lib not lib64), but it didn´t help. Any ideas?

@BeranekCZ did you run ldconfig?

Hi @BeranekCZ
What operating system are you using?

@BeranekCZ did you try lib64 as well?

I have  Debian 8.2 (jessie), ASP.NET beta 8, mono 4.0.4. So same things as thekane. I tried ldconfig now, but error is still here. It is 32bit OS, so lib64 is not here.

Thanks for your reply @BeranekCZ
Seems to me this is an issue in mono not supporting debian 32 bit.
I think I will have to switch to ubuntu 32 inmediately. After that I will need to get a 64 bit PC to use debian in the long term (because coreclr won't support 32 bits at all).

On CentOS 7 x86_64, got this problem too (System.DllNotFoundException: libuv).
Compiled libuv from https://github.com/libuv/libuv.git.
Solved by creating this simlink :  ln -s /usr/local/lib/libuv.so.1.0.0 /usr/lib/libuv.so

Not sure if anybody noticed (I did only yesterday) but the documentation now includes installation instruction for Red Hat and derivatives and does mention the creation of the simlink:
https://docs.asp.net/en/latest/getting-started/installing-on-linux.html#installing-on-centos-fedora-and-derivatives
I hope someday we'll get a RPM for that, but in the meantime the steps in the documentation work nicely (on CentOS 6 anyway, I haven't tried CentOS 7).

Yeah, the documentation now has the right instructions.  Acquisition on Linux is a little tricky because of the various differences between distros and even version differences between the same distro.

"ln -s /usr/local/lib/libuv.so /usr/lib64/libuv.so.1" is not working for me, as described in the documentation. I still have the "System.DllNotFoundException: libuv" error when I try to start Kestrel.
To make it works, the simlink name must be "libuv.so".

@michaudg That's on CentOS 7?
@danroth27 A good data point to add to the doc.

@muratg CentOS 7.1

Closing this since it's distro specific, there are workarounds, and the library search path is not Kestrel's concern.


RIUI-680 display case lists in ascending order of last updated date.

added logic to sort by lastDateOfAction in asc order
added unit test.

there still going to be issued long term as CCD need to fix this there end but this is fine for now.


Search functionality in the Documentation has stopped working

See original issue on GitLab
In GitLab by [Gitlab user @adds68] on Sep 25, 2018, 13:48
Summary
Steps to reproduce
Got to this link and wait for nothing to return:
https://buildstream.gitlab.io/buildstream/search.html?q=junctions&check_keywords=yes&area=default
What is the current bug behavior?
Nothing.
What is the expected correct behavior?
Things containing the search term are returned

In GitLab by [Gitlab user @adds68] on Sep 26, 2018, 09:37
changed the description

In GitLab by [Gitlab user @tacgomes] on Sep 26, 2018, 22:09
Search is not also working on https://buildstream.gitlab.io/bst-external

In GitLab by [Gitlab user @tpollard] on Oct 1, 2018, 14:01
Do we have any idea why this is happening?

In GitLab by [Gitlab user @LaurenceUrhegyi] on Oct 2, 2018, 10:46
This is proving to be quite annoying for people using the docs.

In GitLab by [Gitlab user @knownexus] on Oct 2, 2018, 10:47
i'll see what i can do :)

In GitLab by [Gitlab user @knownexus] on Oct 2, 2018, 10:47
assigned to [Gitlab user @knownexus]

In GitLab by [Gitlab user @knownexus] on Oct 2, 2018, 16:05
mentioned in merge request !848

In GitLab by [Gitlab user @knownexus] on Oct 2, 2018, 18:14
closed via merge request !848

In GitLab by [Gitlab user @knownexus] on Oct 2, 2018, 18:14
mentioned in commit dae842fd0ba159ab8443fe279e8c8ba1de8871f8


fix coverage comments

Signed-off-by: BAStos525<EMAIL_ADDRESS>

Description of the Change

Benefits

Possible Drawbacks

Usage Examples or Tests [optional]

Alternate Designs [optional]

Codecov Report

Merging #19 (c129698) into iroha2-dev (96ca27d) will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           iroha2-dev      #19   +/-   ##
===========================================
  Coverage       69.75%   69.75%
===========================================
  Files             141      141
  Lines           27862    27862
===========================================
  Hits            19435    19435
  Misses           8427     8427

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96ca27d...c129698. Read the comment docs.


Add method cast() to get casted value after isInstanceOf()

Summary
It will be convenient to have a method that returns a casted object after isInstanceOf call.
For example:
MyException e = assertThatThrownBy(() -> {
            // do smth
        }).isInstanceOf(MyException::class.java).cast()

assertThat(e.getCustomField())...
// Other checks

And it will be convenient to evaluate the following checks using already casted value.
For example:
assertThatThrownBy(() -> {
            // do smth
        }).isInstanceOf(MyException::class.java)
.extracting(e -> {
    // I wanna use fields and methods from MyException here
})

or
assertThatThrownBy(() -> {
            // do smth
        }).isInstanceOf(MyException::class.java).cast()
.extracting(e -> {
    // I wanna use fields and methods from MyException here
})

asInstanceOf() with InstanceOfAssertFactories.type() is probably what you are looking for.
For example, having:
class MyException extends RuntimeException {

  private final String field;

  MyException(String field) {
    this.field = field;
  }

  String getField() {
    return field;
  }
}

You could write:
assertThatThrownBy(() -> { throw new MyException("some-value"); })
  .asInstanceOf(type(MyException.class))
  .extracting(MyException::getField)
  .isEqualTo("some-value");

Type-specific assertions are also possible with extracting() and as(), e.g.:
assertThatThrownBy(() -> { throw new MyException("some-value"); })
  .asInstanceOf(type(MyException.class))
  .extracting(MyException::getField, as(InstanceOfAssertFactories.STRING))
  .startsWith("some");

FYI if you use extracting(String) you can extract without casting:
assertThatThrownBy(() -> { throw new MyException("some-value"); })
  .asInstanceOf(MyException.class)
  .extracting("field")
  .isEqualTo("some-value");

Hi @ars-java, do our answers help with your use case? Please let us know in case something is unclear.

I would love isInstanceOf(T) to return Assert<?, T> instead of Assert<?, ? extends Throwable> since we already checked casting is safe.
Thanks for workarounds @scordio . But is there any real reason not to change return type? It would be very helpful if developers won't need to cast it manually and make code a little cleaner.

@sukolenvo isInstanceOf returns SELF to allow chaining additional assertions for the same type, that's probably where Assert<?, ? extends Throwable> is coming from, and it is not meant to change the current assertion instance. asInstanceOf would be the way to go for the latter.
Maybe I did not fully understand what you have in mind, could you provide a short example?

Hi @scordio , asInstanceOf is exactly what I was looking for. Thank you for your help!


Add hxmath lib to Build Options

This PR adds the hxmath library to the available build options.

hxmath lib has no src folder so hxmath.hxml is pointing to a non existant path.
once corrected it complains about missing nanotest library, because of Test.hx which pulls in all testcases from project root.
I can fix those after install, but it would be best if Test.hx could be moved to test folder.
I reckon everyone using hxmath lib will have type Test available in global namespace?

I reckon everyone using hxmath lib will have type Test available in global namespace?

Wow. yeah, I just checked in a project and Test.hx is indeed available in the namespace. Never noticed that before! I'll raise an issue about it in the repo.

hxmath’s project structure has been updated so that the namespace issues should no longer be a problem 👍
should i request a new haxelib release for hxmath, or are we okay with moving forward with a git version?

thanks, I'm fine with a git version

online demo: https://try.haxe.org/#f3c70192


Mark all external links in footer as such

Brings in work done in the buyers' app in https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/110.

:cry:

Dry those tears, I added the fix in 23bca76


[Bug] Fix issue with Eradicate all Console Logs

Eradicate all Console Logs was not skipping files in node_modues in Windows

Fixes https://github.com/Snowcart/kill-console-log/issues/1


Bmc jinja parsing

The IMPI addresses are no longer +1, as was previously the default. They can now accept jinja syntax to read a bmc_ip from the spreadsheet.
For example, you can now write bmc_ip: "{{bmc_ip(0)}}"
bmc_ip bug: https://issues.redhat.com/browse/NHE-934

Hi @Zinkelburger you can clean up the commits here, this can be a single commit since it is a relatively small discrete change. I would recommend squashing into one.

Also, can you use a shorter more concise name for the commit itself? If it shows as an ellipsis in GH, it's too long. You can put more details in the commit message but keep the header clean and concise.

@bn222  I think I fixed it, f you were free to run the linter again


Add Github Action to update container image

Image should be pushed to Docker Hub or Github's Container Registry.
Updates should run automatically based on changes to the Dockerfile or Podman

Fixed in #13


BinaryTypeStorage will only be initialized with a CONNECTED state socket

Thanks a lot for the fix. But the problem is a bit more deeper: BinaryTypeStorage should not be shared between different IgniteClients. I'm preparing the full fix, it will be ready soon.

The full fix is here: https://github.com/apache/ignite/pull/4554

The ticket is resolved, closing PR.
Please close PRs for your resolved tickets and other non-needed PRs.
Alternatively, ask a committer

to use GitHub UI (committer can associate accounts here: https://gitbox.apache.org/setup/ )
or https://github.com/apache/ignite/blob/master/scripts/apply-pull-request.sh from Apache Ignite source.
or mention in commit message 'Fixes #(a number of PR)'.

These methods will automatically close PR.
Feel free to reopen this PR if it is anyway actual.


civet crashes

On Windows:
$ npm install -g @danielx/civet

added 1 package, and audited 2 packages in 3s

found 0 vulnerabilities

$ civet
node:fs:221
  let mode = stats[1];
                  ^

TypeError: Cannot read properties of undefined (reading '1')
    at isFileType (node:fs:221:19)
    at Object.readFileSync (node:fs:470:16)
    at Object.<anonymous> (C:\Users\edemaine\AppData\Roaming\npm\node_modules\@danielx\civet\dist\civet:12:12)
    at Module._compile (node:internal/modules/cjs/loader:1120:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
    at Module.load (node:internal/modules/cjs/loader:998:32)
    at Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47

Node.js v18.7.0

On Linux:
$ npm install -g @danielx/civet

added 1 package, and audited 2 packages in 2s

found 0 vulnerabilities

$ civet
node:internal/fs/utils:348
    throw err;
    ^

Error: EAGAIN: resource temporarily unavailable, read
    at Object.readSync (node:fs:748:3)
    at tryReadSync (node:fs:448:20)
    at Object.readFileSync (node:fs:494:19)
    at Object.<anonymous> (/afs/csail.mit.edu/u/e/edemaine/.nvm/versions/node/v18.12.1/lib/node_modules/@danielx/civet/dist/civet:12:12)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -11,
  syscall: 'read',
  code: 'EAGAIN'
}

Node.js v18.12.1

@edemaine Thanks for the report!
Currently there is no Civet repl so the civet script only works with civet < infile > outfile.
Civet should probably get a repl eventually, or at least display a message about usage rather than crashing.

I thought the default behavior would be to read a file from stdin, which would include typing interactively if there's no <input.civet. But you're right that it works if I specify an input file... I guess you're doing something different from just reading stdin?

Maybe readFileSync doesn't work with interactive stdin?
https://github.com/DanielXMoore/Civet/blob/master/source/cli.coffee


Issue with "npm install" on Gatsby project

Possible install-time or require-time problem

[x] I have read the documentation relating to installation.
[x] I have ensured that the architecture and platform of Node.js used for npm install is the same as the architecture and platform of Node.js used at runtime.

Are you using the latest version of sharp?

[x] I am using the latest version of sharp as reported by npm view sharp dist-tags.latest.

If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of sharp that is not the latest, please open an issue against that package instead.
Is this a problem with filesystem permissions?
If you are using npm v6 or earlier and installing as a root or sudo user, have you tried with the npm install --unsafe-perm flag?
N/A
If you are using npm v7 or later, does the user running npm install own the directory it is run in?
Yes
If you are using the ignore-scripts feature of npm, have you tried with the npm install --ignore-scripts=false flag?

  System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1
    Memory: 62.33 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.4.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.2.0 - /opt/homebrew/bin/npm
  npmGlobalPackages:
    sharp: 0.31.3

Context
Hello. I've recently cloned a project that my group is working on onto my device and I ran into this issue when running "npm i". I've looked through previous tickets relating to this error and tried the fixes. For example, I've tried deleting the tar.br file (previous post had tar.bg), installing vips via HomeBrew, but those didn't work for me.
The error message after running "npm i":
npm ERR! code 1
npm ERR! path /Users/seanshe/Desktop/bdab_website/node_modules/gatsby-transformer-sharp/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
npm ERR!   LIBTOOL-STATIC Release/nothing.a
npm ERR!   TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR!   CXX(target) Release/obj.target/sharp/src/common.o
npm ERR! info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-darwin-arm64v8.tar.br
npm ERR! ERR! sharp Prebuilt libvips 8.10.0 binaries are not yet available for darwin-arm64v8
npm ERR! info sharp Attempting to build from source via node-gyp but this may fail due to the above error
npm ERR! info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using<EMAIL_ADDRESS>npm ERR! gyp info using<EMAIL_ADDRESS>| darwin | arm64
npm ERR! gyp info find Python using Python version 3.10.9 found at<EMAIL_ADDRESS>npm ERR! gyp info spawn<EMAIL_ADDRESS>npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/seanshe/Desktop/bdab_website/node_modules/gatsby-transformer-sharp/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/seanshe/Library/Caches/node-gyp/19.4.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/seanshe/Library/Caches/node-gyp/19.4.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/seanshe/Library/Caches/node-gyp/19.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/seanshe/Desktop/bdab_website/node_modules/gatsby-transformer-sharp/node_modules/sharp',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! ../src/common.cc:24:10: fatal error: 'vips/vips8' file not found
npm ERR! #include <vips/vips8>
npm ERR!          ^~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.2.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.4.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/seanshe/Desktop/bdab_website/node_modules/gatsby-transformer-sharp/node_modules/sharp
npm ERR! gyp ERR! node -v v19.4.0
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok

npm ERR!      /Users/seanshe/.npm/_logs/2023-01-15T08_56_23_970Z-debug-0.log

The error seems to be in the "gatsby-transformer-sharp" module, so I tried running "npm update gatsby-transformer-sharp module" to see if anything would happen, and gave me this error:
npm ERR! code 1
npm ERR! path /Users/seanshe/Desktop/bdab_website/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
npm ERR!   LIBTOOL-STATIC Release/nothing.a
npm ERR!   TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR!   CXX(target) Release/obj.target/sharp/src/common.o
npm ERR! info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-darwin-arm64v8.tar.br
npm ERR! ERR! sharp Prebuilt libvips 8.10.0 binaries are not yet available for darwin-arm64v8
npm ERR! info sharp Attempting to build from source via node-gyp but this may fail due to the above error
npm ERR! info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using<EMAIL_ADDRESS>npm ERR! gyp info using<EMAIL_ADDRESS>| darwin | arm64
npm ERR! gyp info find Python using Python version 3.10.9 found at<EMAIL_ADDRESS>npm ERR! gyp info spawn<EMAIL_ADDRESS>npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/seanshe/Desktop/bdab_website/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/seanshe/Library/Caches/node-gyp/19.4.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/seanshe/Library/Caches/node-gyp/19.4.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/seanshe/Library/Caches/node-gyp/19.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/seanshe/Desktop/bdab_website/node_modules/sharp',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! ../src/common.cc:24:10: fatal error: 'vips/vips8' file not found
npm ERR! #include <vips/vips8>
npm ERR!          ^~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.2.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.4.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/seanshe/Desktop/bdab_website/node_modules/sharp
npm ERR! gyp ERR! node -v v19.4.0
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok

npm ERR!      /Users/seanshe/.npm/_logs/2023-01-15T09_26_36_750Z-debug-0.log

 Side "fix" that didn't work
One possible fix that was suggested to me was that I switch my node version to 14.15.0 (via nvm), in which I was able to get "npm i" to work, but ran into an issue when running "gatsby develop":

'darwin-x64' binaries cannot be used on the 'darwin-arm64v8' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'darwin-arm64v8' platform.

Any help is appreciated, thank you!

npm ERR! ERR! sharp Prebuilt libvips 8.10.0 binaries are not yet available for darwin-arm64v8
npm ERR! info sharp Attempting to build from source via node-gyp but this may fail due to the above error

As I said in #3525, please upgrade.
It looks like the version of gatsby-transformer-sharp you're using is out of date. It appears to be using an old version of sharp that does not support M1.
https://sharp.pixelplumbing.com/install#apple-m1

Thanks for getting back to me.
 I've tried running the command npm install --arch=arm64 --platform=darwin --libc=glibc sharp which doesn't seem to fix my issue.

You'll need to ensure you're using a version of sharp that supports M1.
https://sharp.pixelplumbing.com/install#apple-m1

Prebuilt sharp and libvips binaries have been provided for macOS on ARM64 since sharp v0.29.0.

Running npm ls sharp in the /Users/seanshe/Desktop/bdab_website directory will help highlight the dependency/ies that require upgrading, which you can do by editing the relevant package.json file and running npm install again.
For example, the most recent gatsby-transformer-sharp is v5.4.0, so please ensure you're using that version.
$ npm view gatsby-transformer-sharp dist-tags.latest
5.4.0

I see. I got it working now. Thank you so much for your help!


Research Logging Text Message on GitHub

Can the text message also send a POST request to GitHub?

Made some progress today. Started messing around with API using cURL and also Postman. Couldn't figure out some stuff about creating a file. Will need to mess around more with it.

Hello,
We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!
As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

Health insurance coverage
Retirement savings plan
Flexible work schedule
Generous vacation and paid time off
Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.
Please click here to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.
Important: You have 24 hours to complete the application process.
If you have any questions or need further information, please don't hesitate to contact us.
Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.
Best regards,
GitHub Recruitment Team
e-nikitin, @kamescg, @0xBC84, @mattoni, @PGoski, @MattKraatz, @gezibash, @gabrielrtakeda, @jack-ox, @BenSparksCode, @Th3R3al0, @roninjin10, @cavanmflynn, @wdcodecn, @q13, @daiwanwei, @kitemao, @jedsada-gh, @vec715, @nuanyang233


Fix shippable CI testing & make it cleanup after itself

After a while, our cloud VMs were running out of disk space. When this happens you can't even ssh into the machine from the cloud console.
Recently Shippable changed the way it works, we need to spend some time and make it work again. Maybe just use their own Docker setup.
If we use our own cloud-instances, we should make sure shippable is cleaning up after itself (it was not before, We should consider filing a bug with shippable too). Maybe a cron-job to cleanup docker images?

We no longer use Shippable.


Changes HttpSM to be Proxy Allocated

A few comments on this:

I couldn't get the proxy allocation macros to work inside the HttpSM::allocate. But, this patch looks more like what we do for other allocators, making it explicit where we need to allocate a new HttpSM. If someone feels strongly that HttpSM::allocate has to survive, I can see if there's a way to make it work.
Bryan requested that I verify that the allocation of the HttpSM happens on the ET_NET thread even with accept threads, and I did verify that and it does. So the HttpSM gets allocated and released on the same ET_NET thread.

@zwoop can you post the performance numbers of having a proxy allocator for the HttpSM vs not?

I've tried this on master, 9.1.x and 9.0.x branches, and on the 9.0.x branch, it will assert always. 9.1.x or master does not have this problem, I think something changed around either the class allocators or the constructor / destructors for the HttpSM.

The performance increase is not tremendous, about 5%. It's possible it make more of a difference on other hardware platforms, where the costs of the atomic operations on the class allocator causes more contention.

Cherry-picked to v9.1.x branch.


does it means any process can put/read until the db is online?

looking at the code it seems that any erlang process csnd read and write once it get the handle. Did i miss anything? All implementations around are putting it inside a gen_server that's why i am asking

bump

got my answer on the ml. closing now :)


KDC3:  New Kerberos.kdc state

This PR part implements RFE #1, introducing and documenting Kerberos defaults and KDC features. This PR is foundation for #2
This formula (with #4, #5  and this commit) is tested successfully with / without pillars on Centos7.  Existing states work, and new kerberos.kdc state part implements KDC suppport in #1
Verification logs

with pillars: kerberos-cent7.log
no pillars:  kerberos-cent7-nopillars.log

Note:  The errors/warnings are salt issue.
Exception raised when processing __virtual__ function for salt.loaded.int.module.ansiblegate.  See: Salt bug: saltstack/salt#44670

Requires #4 and #5

Successful regression test on Ubuntu: ubuntu-kerberos.log.txt

@fintanmm  this too thanks.


sf_read_only=models.NOT_UPDATEABLE

Hi guys,
I am currently struggling with Lead-->Contact conversions. I would like to do it from Django but it seems some fields related to this conversion are not writable. Namely Lead.is_converted and Lead.converted_contact have this sf_read_only=models.NOT_UPDATEABLE set.
Do you know how to deal with this Lead-->Contact conversion with django-salesforce properly?
Currently I have been trying to get it right with the following function
def convert_lead(lead):
    """convert_lead
    Re-implement the `convertLead()` function using the Salesforce
    REST API. At the time this is written, `convertLead()` is only
    available through the SOAP (Apex) API.

    From the official documentation:

    > Convert a Lead into an Account and Contact, as well as (optionally)
    > an Opportunity.

    For the sake of this application, we only need to convert the Lead
    into a Contact.

    This function returns the newly created Contact.
    """
    if not lead.is_converted:
        # Convert the Lead into a Contact
        lead_serial = LeadSerializer(lead)
        contact_serial = ContactSerializer(data=lead_serial.data)

        if contact_serial.is_valid():
            c = contact_serial.object
            c.pk = None  # to avoid using the pk of the Lead instance
            c.save()
            lead.is_converted = True
            lead.status = 'Qualified - converted'
            lead.converted_contact = c
            lead.save()  # this fails (silently) to save the updated lead because of sf_read_only=models.NOT_UPDATEABLE on some fields
            return c
        else:
            # Should not happen
            raise RuntimeError(
                "The provided Lead could not be converted into a Contact.")
    else:
        # This Lead is already converted. Abort the mission.
        raise RuntimeWarning(
            "This Lead has already been converted.")

All the best.

From fields.py I see that

sf_read_only=1 (NOT_UPDATEABLE):  The field can be specified on insert but can not be later never modified. e.g. ContactId in User object (relative frequent)

and also that

[...] describe fixed nature of SF standard objects that can not be modified no ways by no API or spell.

So I guess there is not so much we can do about it :sob:

Yes, Leads can be converted by SOAP API (your link above) or by Apex code or e.g. by an custom extension to REST API written in Apex. I would like to add materialized template for the request, if someone prepare it, but I dislike to add too much code, WSDL etc, I will not incite it. I know also a solution how to upload and run Apex code from Python, but it could look like a backdoor for an uninformed user and so I never committed it to master branch and don't use it actively.
That my categoric "can not be modified" is meant about the attribute sf_read_only from point of view migrations. (Migrations are not implemetedin django-salesforce, theoretically thinkable and only a few simple succesful experiments has been made.) You can set in SF e.g. that a new field is "required" (null=False in Django), "unique" (unique=True), or case sensitive/insensitive (not mapped to any Django field attribute yet because no big problem with it), but sf_read_only is completely determined by SF attributes updateable and createable and doesn't make sense to map them to migrations because no API and no setup tool can modify them, as far as I know. They are fixed by SFDC,
If a field is "updateable" and "createable" it doesn't mean reliably that it is writable, because SFDC is complex, but I dont know a case where a read only field was not really read only. All "history"-like fields are usually read only, e.g. last_modified_date etc. Those mentioned are the history of Lead conversion.

It's actually surprising to me that there aren't more difficulties like this. The DB <=> Salesforce Model relationship we use is definitely a "Leaky Abstraction"; there are a variety of things in Salesforce that just don't make sense from a relational database perspective.
Trying to use the Django ORM mechanics for this looks kind of clunky, even if it did work.
I'd think the "Django way" to implement this would be a custom manager specifically for the Contact class that could accept a Lead instance with something like c = Contact.objects.convert(lead)
A different question is how that might work, but maybe a SOAP call to convert the lead, and then a regular ORM fetch to get the newly "created" Contact object?
Not sure what's involved in adding SOAP support these days. I picked REST because there wasn't much SOAP stuff for Python for awhile, but now https://github.com/pysimplesoap/pysimplesoap seems to have come a long way.

I can look at it in March. I wouldn't like to write much code neither to add new requirements. I think the sooner you do it yourself. Possibilities:

If someone has installed beatbox then it can be used for this. It can be written on four lines according to readme, about ten lines including auth by django-salesforce credentials.. (I used that package before django-salesforce.)
If someone wants to install a custom APEX code from any howto existing currently on the web then it can be used by django-salesforce.

I'm undecided between them and I'm open to both yet, until know what is acceptable for other people. I think that the same one of these should be used also for our future extensions, e.g. for insert and update of multiple SF objects.
Our interface of Lead conversion should be a simple function e.g. convert_lead(lead, to='Contact', db='salesforce'). I don't see a suitable class, because we can't know easily where the Contact or Lead models are implemented by the user, so we can't extend them. The user can add the function to his Lead.
I think that REST api was a good idea. New functionalities are added for REST-like APIs by SFDC, not for SOAP.

Now a question that comes to mind:
Is it worth the effort to integrate the Lead conversion with beatbox (or your second solution) if SFDC is going to add a Lead conversion endpoint in the REST API eventually? I guess it depends on how long we would have to wait before they release it, and I don't know if there is a public roadmap online regarding the REST API.
For what it's worth, it would be my pleasure to contribute to the implementation of the Lead conversion with either of the solutions mentioned, but I would need some guidance at the beginning.

I doubt that SFDC will add this feature into REST; it's just that if they were going to add features, it would be to REST, not SOAP.
I'd like to take a whack at beatbox integration to make this available myself, but I don't know that I have any more available time than Hynek does at this point.
Code submissions are always encouraged. My expectation is that this would be implemented as an optional custom Manager that can be mixed in to a SalesforceModel subclass.

@tvanesse A contribution is wellcome. Look at Beatbox Readme. Write a function that reads password etc. from django.conf.settings, logins by beatbox and converts a Lead or list of leads.
Write also a function that can be used as a test or as a core of the test. It can be later improved. Write a text for Readme. Maybe the spped will be good, maybe you find that it uses or can use the same type of acces token, maybe caching of the login must be added.
@philchristensen
I think that a good full integration to models can be complicated and not effective: It is related to Lead, Contact, Account, Opportunity. It can be useful as queryset method, but I am not sure how it supports multiple databases. Beatbox is an extraneus element that frequently willl be not installed. I would recommend to put the code to a new salesforce.util or similar, until a volunteer would be interested in integration.

I agree. We're on the same page.

Ok I'm on it. I should be able to provide a pull request in a few days.

See pull request #96 for a working implementation. There are things that could be improved, for instance:

support for custom required fields on Account or Contact (see comments in the code)
additional keyword args to use all the endpoint capabilities

To be continued I guess.


Fix rebroadcasting for regular queries

Release the rebroadcast fix implemented in https://github.com/zino-app/graphql-flutter/pull/840 to a stable release
Breaking changes

None

Fixes / Enhancements

Cherry picked the broadcast fix for regular queries implemented here https://github.com/zino-app/graphql-flutter/pull/840

Docs

None

:tada: This PR is included in version 5.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Feature: Add purge_cache API call for zone

This PR adds support for purging cache for a particular zone. See Cloudflare documentation.
I've implemented this to fix https://github.com/leighmcculloch/middleman-cdn/issues/17 which apparently broke the middleman-cdn gem.
Not sure the rspec test is useful though. I have no idea how to test it. 🤔

👏

@ioquatix could you take a look at this feature? If this repo is not supported anymore, I think we'll need to do our own API call in https://github.com/leighmcculloch/middleman-cdn/issues/17.

It looks good.

@ioquatix Thank you for merging this. Would you be able to tag a new version with this functionality?

Released in v3.2.0 :) Thanks for your effort.

Woohoo thanks!


Only subscribe to the runtime events for the process requested by the user

To help with #23, only subscribe to GC events for the process requested by the user; we are currently subscribing to all processes' GC data, a majority of which we are not using.

cool! do you have a before/after comparison by doing this? of course the diff would depend on how many other processes are firing GC events. you could have a test running that just does temporary allocations that you are not monitoring, in which case you should see a dramatic reduction in memory allocation (committed bytes should show a smaller diff - you can get the GC committed in windbg - now !eeheap -gc shows committed).

Conducted the following experiment with and without the fix i.e. the bits from this pull request and found that this fix does actually reduce the overall GC committed heap size.
Experiment Details

Created a Console App that allocates a large list in an infinite loop.
Ran GCRealTimeMon.exe -p <PID of the Console App>.
Ran GCRealTimeMon.exe -p <PID of GCRealTimeMon in 2.>.
Ran the following procdump command to get 3 dumps 5 seconds apart for the process in 3. : .\procdump.exe -ma <PID of 3> -s 5 -n 3
Opened up WinDbg, loaded the 3 dumps and then entered !eeheap -gc and noted the GC Allocated Heap Size and GC Committed Heap Size.
Repeated experiment with the fix from this PR.

Data
Without Fix
1st Dump
GC Allocated Heap Size:    Size: 0x5af7c8 (5961672) bytes.
GC Committed Heap Size:    Size: 0x5aa000 (5939200) bytes.
2nd Dump
GC Allocated Heap Size:    Size: 0x5d17c8 (6100936) bytes.
GC Committed Heap Size:    Size: 0x5ca000 (6070272) bytes.
3rd Dump
GC Allocated Heap Size:    Size: 0x5f17c8 (6232008) bytes.
GC Committed Heap Size:    Size: 0x5ea000 (6201344) bytes.
Observation: A monotonically sharp increase in the heap size over time.
With Fix
1st Dump
GC Allocated Heap Size:    Size: 0x53c198 (5489048) bytes.
GC Committed Heap Size:    Size: 0x597000 (5861376) bytes.
2nd Dump
GC Allocated Heap Size:    Size: 0x564198 (5652888) bytes.
GC Committed Heap Size:    Size: 0x597000 (5861376) bytes.
3rd Dump
GC Allocated Heap Size:    Size: 0x582198 (5775768) bytes.
GC Committed Heap Size:    Size: 0x597000 (5861376) bytes.
Observation: A slight increase of the heap size over time that eventually tapers off.
Conclusion
I think this PR should be good to merge if the experimentation is sound. Do let me know if more data is needed.

thanks!
I wonder if this is actually avoiding the allocations done in stacks like what I mentioned in #23:
0e 00007ffa`b4ef8022     : 00007ffa`b4fa4ea8 00000000`00000003 00000116`c609a488 00007ffa`b4efba7d : coreclr!JIT_New+0x201 [D:\a\_work\1\s\src\coreclr\vm\jithelpers.cpp @ 2324]
0f 00007ffa`b4ef105a     : 00000116`c603c3a8 00000116`c603bee8 00000116`c6066100 00000116`c63b1fe8 : Microsoft_Diagnostics_Tracing_TraceEvent!Microsoft.Diagnostics.Tracing.Parsers.Clr.GCPerHeapHistoryTraceData.GenData(Microsoft.Diagnostics.Tracing.Parsers.Clr.Gens)+0x6212
10 00007ffa`b4ee9194     : 00000116`c609a188 00007ffb`14453876 00000000`00000000 00000116`c5f368e0 : Microsoft_Diagnostics_Tracing_TraceEvent!Microsoft.Diagnostics.Tracing.Analysis.GC.GCStats.ProcessPerHeapHistory(Microsoft.Diagnostics.Tracing.Analysis.TraceLoadedDotNetRuntime, Microsoft.Diagnostics.Tracing.Parsers.Clr.GCPerHeapHistoryTraceData)+0x27a
11 00007ffa`b4ef73d9     : 00000116`e81d1740 00000015`1ed7d860 00000116`e81d1f58 00000000`00000238 : Microsoft_Diagnostics_Tracing_TraceEvent!Microsoft.Diagnostics.Tracing.TraceEventDispatcher.DoDispatch(Microsoft.Diagnostics.Tracing.TraceEvent)+0x74
12 00007ffa`b4ee8ce2     : 00000116`e81d1f20 00000015`1ed7d969 00000116`e81b80e0 00000000`00000010 : Microsoft_Diagnostics_Tracing_TraceEvent!Microsoft.Diagnostics.Tracing.ETWTraceEventSource.RawDispatch(EVENT_RECORD*)+0xe6c9
13 00007ffb`4ac337fb     : 00000116`e81d1f20 00000015`1ed7d969 00000116`00000238 00000116`e828c6d0 : System_Console!ILStubClass.IL_STUB_ReversePInvoke(Int64)+0x42

this is avoid whatever allocations we are doing in runtime.GCEnd += delegate (TraceProcess p, TraceGC gc) but my guess is it's not avoiding the allocation above which comes from processing the GCPerHeapHistory event (ie Microsoft.Diagnostics.Tracing.Parsers.Clr.GCPerHeapHistoryTraceData). but then again those allocations should be very temporary. you can verify if it's doing those allocations by setting a bp on kernelbase!VirtualAlloc* during steady state.


TRY_AGAIN magic word not updated

See https://github.com/source-academy/js-slang/pull/667.
The magic word should be "try_again" instead of "try again" to match the documentation. Currently "try_again" only works in the command line repl, I believe.

Never mind. I was on was sourceacademy.nus.edu.sg, which was on an old build.


💭 flash button on barcode Scanner

Question
I want to add a simple button on the camera to allow the user to turn off and on the flash(torch). is there any way that I can do it
What I tried
<>
                <Camera
                    style={StyleSheet.absoluteFill}
                    device={device}
                    isActive={true}
                    codeScanner={codeScanner}
                    torch={isFlashOn ? "on" : "off"}
                    lowLightBoost={false}

                />
                <TouchableOpacity
                    onPress={toggleFlash}>
                    <Image source={isFlashOn ? FlashOff : FlashOn}/>
                </TouchableOpacity>
 </>

VisionCamera Version
4.3.2
Additional information

[ ] I am using Expo
[X] I have read the Troubleshooting Guide
[X] I agree to follow this project's Code of Conduct
[X] I searched for similar questions in the issues page as well as in the discussions page and found none.

I think is related with #2928


xortool: init at 1.0.0

Motivation for this change
Tool to analyze multi-byte XOR cipher
https://github.com/hellman/xortool
Related to #81418
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.


Get the REST API structure defined

Discuss the needed route for the new REST API to support existing feature and future request.

Hello @manwar 👋
From how things are structured on the website theweeklychallenge.org, I think we need the following routes:

/team (GET)
/about (GET)
/chart (GET)
/user (GET, POST)
/faqs (GET, POST)
/members (GET, POST)
/perl-review (GET)
/raku-review (GET)

Hi @manwar
Are there other necessary routes that I missed ? Or routes that are not really required on this list?
I would like your feedback. Thanks!

@baimamboukar please add a document explaining each route and its input and output.

@baimamboukar You could check this: https://swagger.io/resources/articles/best-practices-in-api-design/

@baimamboukar please add a document explaining each route and its input and output.

Alright @manwar.
I'm on it ✨

These are some great suggestions by @baimamboukar 👏🏻
@manwar Here are a few additional suggestions that I have considering we'll be having login/signup routes as well:

We might want to restrict access to certain routes only to logged-in users. We can achieve this by checking the user's session status within those routes and redirecting them to login if not authenticated.
The /user route could potentially handle both user creation (signup) and retrieval (login) depending on the POST request data. We can consider separating these functionalities into dedicated /signup and /login routes for better clarity.
Additionally, we can also have a /logout route which itself doesn't display anything in the browser but handles the server-side logic of invalidating the user's session. After session invalidation, the user can be redirected to another page either the home page or the login page. We can also maybe add a confirmation page displaying a "successfully logged out" message.

Let me know what you think about this @manwar!

@ayushichoudhary-19 If you are actually coding then think of bigger picture and create library that can be used inside Dancer2 web framework and managed by unit test independently.

These are some great suggestions by @baimamboukar 👏🏻
@manwar Here are a few additional suggestions that I have considering we'll be having login/signup routes as well:

We might want to restrict access to certain routes only to logged-in users. We can achieve this by checking the user's session status within those routes and redirecting them to login if not authenticated.
The /user route could potentially handle both user creation (signup) and retrieval (login) depending on the POST request data. We can consider separating these functionalities into dedicated /signup and /login routes for better clarity.
Additionally, we can also have a /logout route which itself doesn't display anything in the browser but handles the server-side logic of invalidating the user's session. After session invalidation, the user can be redirected to another page either the home page or the login page. We can also maybe add a confirmation page displaying a "successfully logged out" message.

Thanks very much @ayushichoudhary-19 ✨
I have taken note of all these information. I will update what I'm doing accordingly 🫡

@manwar I would like to be assigned this issue, please!

Hello @manwar @ayushichoudhary-19 👋
This is ready for review https://github.com/ChallengeForge/TheWeeklyChallenge/pull/4


Integrated terminal is slow, seems to cause some buffer overflow/override

Does this issue occur when all extensions are disabled?: Yes, but kind of hard to say, as Remote - SSH is needed to do remote SSH.

VS Code Version: First experienced in May, currently on 1.57
OS Version: Ubuntu 20.04.1 (SSH session) and Windows 10 Home (Rust problems)

Steps to Reproduce:

Type fast or
Connect to an SSH target and type at normal speed. Preferably a heavily trafficked SSH target.  or
Set terminal in raw mode to process keystrokes. e.g.

Rust termion crate
Set up a line buffer, and run loop, printing characters after processing them.
Watch characters disappear as new ones come in at rather normal typing speed.

Thought of creating an issue when made my little shell project impossible to do in the integrated terminal, but now the problem turned up in a normal ssh session as well. Experienced none of these problems in other, external terminal emulators.
Just to show how the line buffer can become inconsistent with what is printed:

What was expected:

What was interpreted:

Does setting "terminal.integrated.localEchoLatencyThreshold": -1 fix this?

Testing for a while with "terminal.integrated.localEchoLatencyThreshold": -1, I think it got less frequent, though the bugs still appear:


Remove unreachable code

As we have checked j.job.Status.Phase here before calling setup(), these codes can never be reached.
@gaocegege @jlewi PTAL, thanks!

This change is

/assign @gaocegege

Coverage decreased (-0.1%) to 28.27% when pulling a141d78c77bfdc19f3b84504959341da2bdae0e1 on ScorpioCPH:minor-fix into 6706903c1b45e775ddb310fe00fce6e07942ddb4 on kubeflow:master.


Sourcemaps for Typescript files not displaying correctly in Chrome using Brunch 2.10.9

Description
Building my Typescript project using brunch does not include correct sourcemapping in the browser anymore. I noticed this starts breaking in 2.10.0 (so I'm using 2.9.1 for now).
Expected behavior
I expect to see Typescript code when I open the mapped files in the browser for debugging.
Actual behavior
Chrome still shows .ts source files, but when I open them the content appears to be the transpiled .js files.
Environment

Brunch: 2.10.9
Node.js: 6.9.1
NPM: 3.10.9
Operating system: Windows 7
Code editor: VSCode

package.json contents
{
  "name": "myapp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "my-other-app": "1.0.0-alpha005"
  },
  "devDependencies": {
    "brunch": "^2.10.8",
    "jasmine-core": "^2.5.2",
    "javascript-brunch": "^2.10.0",
    "less-brunch": "^2.10.0",
    "tslint": "^4.5.1",
    "typescript": "^2.2.1",
    "typescript-brunch": "^2.3.0",
    "uglify-js": "^2.8.12"
  }
}

brunch config contents
module.exports = {
    files: {
        javascripts: {
            joinTo: {
                'js/vendor.js': /^Website.UI\/libs\/vendor\//,
                'js/app.js': /^Website.UI\/app\//
            },
            order: {
                before: ['Website.UI/libs/vendor/angular.min.js']
            }
        },
        stylesheets: {
            joinTo: 'css/main.css'
        },
    },
    plugins: {
        brunchTypescript: {
          ignoreErrors: true
        }
    },
    paths: {
        watched: ['Website.UI\/app\/', 'Website.UI\/libs\/vendor\/', 'Website.UI\/less\/'],
        public: 'Website.UI\/public'
    },
    modules: {
        nameCleaner: (path) => path.replace(/^Website\.UI\/app\//, ''),
        autoRequire: {
            'js/app.js': ['app']
        }
    }
}

Not sure, but seems like I had the same problem last few days. Thanks for reaching us out! Gonna take a look at this and try to solve.

It is a well-known source maps issue caused by compiler chaining. Progress in #1664.

@shvaikalesh The issue you references is just a long list of more references. Which one is the one I need to look into to get this fixed on my app?

@phillipp #1664 will certainly fix many issues, including this one. for now, you can downgrade to ~2.9.

@shvaikalesh Thanks, but the problem persists in 2.9.1.
I still have no idea what the specific list item in #1664 is, that will fix this. Or are you talking about an unspecified "there will be a fix in 3.0 that I will reference in issue 1664 but it isn't there yet"

I submitted pull request #1756 as a possible fix for broken sourcemaps on Brunch 2.10
I really am not sure what this would potentially break, but in my case it seemed to fix sourcemaps which have not been working for a while. In fact, I was able to see the original source for both coffeescript and vue single file components (*.vue files).
Let me know if this is correct or way outta line...

Also see #1635

Perhaps #1757 solves this?


Error executing luv callback with message bad argument #1 to 'func'. neotest throws this error with lunarvim config.

Helllo,
I've been trying to use neotest with Lunarvim, but is showing this error message every time.  Apart from this error message the plugin seems to work just fine, it shwos the test results on the screen and on the side bar. If possible I could just silence this message.
Error executing luv callback:
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with th
is message: ...vim/site/pack/packer/start/neotest/lua/neotest/async.lua:28: bad argument #1 to 'func' (table expected, got nil)
stack traceback:
        [C]: in function 'error'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: in function 'callback_or_next'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:40: in function <...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:39>
        [C]: in function 'matchlist'
        ...pack/packer/start/lualine.nvim/lua/lualine/component.lua:78: in function 'apply_padding'
        ...pack/packer/start/lualine.nvim/lua/lualine/component.lua:242: in function 'draw'
        .../packer/start/lualine.nvim/lua/lualine/utils/section.lua:26: in function 'draw_section'
        ...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:152: in function <...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:143>
        [C]: in function 'pcall'
        ...ck/packer/start/lualine.nvim/lua/lualine/utils/utils.lua:158: in function 'statusline'
        ...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:302: in function <...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:287>

Press ENTER or type command to continue

Error executing luv callback:
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with th
is message: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: .../packer/start/neotest-python/lua/neotest-python/init.lua:132: bad argument #1
 to 'stream_data' (table expected, got nil)
stack traceback:
        [C]: in function 'error'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: in function 'callback_or_next'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:40: in function <...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:39>
Press ENTER or type command to continue

I need some info about your setup. What OS? What adapters? What NeoVim version?
Can you reproduce with the following init file?
nvim --clean -u minimal.lua
You'll have to add the adapter your using
-- ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.expand("~/.config/nvim"))
vim.opt.packpath:remove(vim.fn.expand("~/.local/share/nvim/site"))
vim.opt.termguicolors = true

-- append test directory
local test_dir = "/tmp/nvim-config"
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))

-- install packer
local install_path = test_dir .. "/pack/packer/start/packer.nvim"
local install_plugins = false

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
  vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
  vim.cmd("packadd packer.nvim")
  install_plugins = true
end

local packer = require("packer")

packer.init({
  package_root = test_dir .. "/pack",
  compile_path = test_dir .. "/plugin/packer_compiled.lua",
})

packer.startup(function(use)
  -- Packer can manage itself
  use("wbthomason/packer.nvim")

  use("vim-test/vim-test")
  use({
    "nvim-neotest/neotest",
    requires = {
      "nvim-lua/plenary.nvim",
      "nvim-treesitter/nvim-treesitter",
      "antoinemadec/FixCursorHold.nvim",
    },
    config = function()
      require("neotest").setup({
        adapters = {
          ...
        },
      })
    end,
  })

  if install_plugins then
    packer.sync()
  end
end)

vim.cmd([[
command! NeotestSummary lua require("neotest").summary.toggle()
command! NeotestFile lua require("neotest").run.run(vim.fn.expand("%"))
command! Neotest lua require("neotest").run.run(vim.fn.getcwd())
command! NeotestNearest lua require("neotest").run.run()
command! NeotestDebug lua require("neotest").run.run({ strategy = "dap" })
command! NeotestAttach lua require("neotest").run.attach()
]])

I'm seeing the same problem when using the neotest-python adapter, and it appears to be related to recent changes in nvim-neotest/neotest-python@aaf8310.
If I revert to nvim-neotest/neotest-python@023b7bd the error message does not present.

I'm seeing the same problem when using the neotest-python adapter, and it appears to be related to recent changes in nvim-neotest/neotest-python@aaf8310. If I revert to nvim-neotest/neotest-python@023b7bd the error message does not present.

Hello, this does fix the problem. Thank you. Sorry for the lack of  information, but I use the neotest-python, neovim version 0.7.2 on arch linux.

Just a simple question. How do I navigate the error log? Is it possible?

@PedroVSCoimbra do you mean something like :messages?

Can you please check if the minimal init.lua has the same issue for you? I need to know it's actually an issue with neotest before trying to debug this.
It seems like this is a lualine error and causing failures in neotest throught plenary's async library.
This is the actual error being thrown:
 [C]: in function 'error'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: in function 'callback_or_next'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:40: in function <...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:39>
        [C]: in function 'matchlist'
        ...pack/packer/start/lualine.nvim/lua/lualine/component.lua:78: in function 'apply_padding'
        ...pack/packer/start/lualine.nvim/lua/lualine/component.lua:242: in function 'draw'
        .../packer/start/lualine.nvim/lua/lualine/utils/section.lua:26: in function 'draw_section'
        ...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:152: in function <...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:143>
        [C]: in function 'pcall'
        ...ck/packer/start/lualine.nvim/lua/lualine/utils/utils.lua:158: in function 'statusline'
        ...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:302: in function <...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:287>

This error is because of some poor handling in plenary's async lib (nothing to do with neotest AFAICT)
Error executing luv callback:
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with th
is message: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: .../packer/start/neotest-python/lua/neotest-python/init.lua:132: bad argument #1
 to 'stream_data' (table expected, got nil)

@PedroVSCoimbra do you mean something like :messages?

Yeah, could be something like that.
Do you use telescope right? It has a way to scroll the file with  while search for something. The question is more of something like that. In your plugin it pops a floating window the idea would be to enter that buffer and navigate in it.

Can you please check if the minimal init.lua has the same issue for you? I need to know it's actually an issue with neotest before trying to debug this.
It seems like this is a lualine error and causing failures in neotest throught plenary's async library. This is the actual error being thrown:
 [C]: in function 'error'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: in function 'callback_or_next'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:40: in function <...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:39>
        [C]: in function 'matchlist'
        ...pack/packer/start/lualine.nvim/lua/lualine/component.lua:78: in function 'apply_padding'
        ...pack/packer/start/lualine.nvim/lua/lualine/component.lua:242: in function 'draw'
        .../packer/start/lualine.nvim/lua/lualine/utils/section.lua:26: in function 'draw_section'
        ...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:152: in function <...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:143>
        [C]: in function 'pcall'
        ...ck/packer/start/lualine.nvim/lua/lualine/utils/utils.lua:158: in function 'statusline'
        ...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:302: in function <...rvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:287>

This error is because of some poor handling in plenary's async lib (nothing to do with neotest AFAICT)
Error executing luv callback:
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with th
is message: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: .../packer/start/neotest-python/lua/neotest-python/init.lua:132: bad argument #1
 to 'stream_data' (table expected, got nil)

No, with the minimal config it runs just fine. But uses a terminal to show the log

OK I'm closing this issue as it's nothing to do with neotest as far as can be shown. I'd suggest opening an issue with lualine

not sure the problem is necessarily with lualine - my traceback is simpler:
Error executing vim.schedule lua callback: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:26: bad argument #1 to 'returned_function' (string expected, got nil)
stack traceback:
        [C]: in function 'returned_function'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:26: in function 'callback_or_next'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:40: in function <...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:39>

Unfortunately that doesn't say much, just that something went wrong in plenary. Can you reproduce with the minimal init file?

It looks like the line that's failing is here:
https://github.com/nvim-neotest/neotest/blob/master/lua/neotest/consumers/output.lua#L10
and the output field isn't being populated when using the latest version of neotest-python (because the output data is coming from a stream instead?)
this seems to fix things:
  local output = opts.short and result.short or result.output and lib.files.read(result.output)

I'll make a PR if the above seems logical :)


docs: Cleanup BUILD.md and various other documents

Fixup build documentation up to standard set by VVL
Add documentation for running vkcube/vulkaninfo on Android
Make BUILD_WERROR off by default
Remove out of date documentation
Remove pointless documentation

CI Vulkan-Tools build queued with queue ID 61504.

CI Vulkan-Tools build queued with queue ID 61511.

CI Vulkan-Tools build # 1227 running.

CI Vulkan-Tools build queued with queue ID 61520.

CI Vulkan-Tools build # 1228 running.

CI Vulkan-Tools build # 1228 passed.

CI Vulkan-Tools build queued with queue ID 61546.

CI Vulkan-Tools build # 1229 running.

CI Vulkan-Tools build # 1229 passed.

Updated based on feedback


Non-boolean MLIL_CONST in MLIL_IF condition

This code is lifted to an MLIL_IF with a condition that is an MLIL_CONST of size 4 instead of a size 0 which indicates a boolean:
mov eax, 0
test eax, eax
je l1
ret
l1:
ret

>>> current_mlil[0]
<il: if (1) then 1 @ 0x17f else 2 @ 0x17e>
>>> current_mlil[0].operation
<MediumLevelILOperation.MLIL_IF: 55>
>>> current_mlil[0].condition
<il: 1>
>>> current_mlil[0].condition.operation
<MediumLevelILOperation.MLIL_CONST: 13>
>>> current_mlil[0].condition.size
4L

This might be the same bug only the condition variable wasn't optimized out:
xor eax, eax
l1:
ja l1
cmp ebp, eax
jmp l1

>>> current_mlil.ssa_form[0]
<il: cond:0#1 = 0>
>>> current_mlil.ssa_form[0].size
0L
>>> current_mlil.ssa_form[0].src.size
4L


Nodes are movable

Nodes can be moved, I don't think this is expected behavior, see animation. @vicory

Ultimately the nodes should probably be movable but moving them would cause the things attached to that node (quads, spokes) to adjust with it. I can show you how this currently works in Pablo if you want a demo. If we don't want to implement that right now then they should probably be non-movable.

@vicory @phcerdan
Agreeing with Jared on this

Makes sense. I we go to emulate the other software with such a great name, I do think we need a mrmlNode to have all these models connected.

I will make them non-movable until then.


Trouble using $posted store

Description
This project works locally but not on Stackblitz. I appreciate if this could be confirmed to work locally for others.
How to reproduce:

Click submit with an empty form. Posted should be true.
Enter a valid name and email, click submit. Posted should be true in SuperDebug, but is false on Stackblitz (true locally).

Hi, @ciscoheat

I appreciate if this could be confirmed to work locally for others.

I don't know if I misunderstood the description, but the stackblitz flow is the same, in that it's true -> false. Surprisingly, even locally, this is the behaviour. (I downloaded the same shared repro above)
https://github.com/ciscoheat/sveltekit-superforms/assets/87414827/a0099e07-7064-4645-a8dd-8918a5a36a0d
Please let me know if there's anything else you want me to confirm/check out.

Thank you, I realized what is the problem now. When the form is reset, the $posted value is also reset to false. It should be true if the form is posted, so I'll fix that for the next release.

Fixed now with 2.2.1.


Poll rate is fixed to 60 secs which is too long

Can't adjust poll rate during integration. This is fixed to 60 secs

ha_iammeter uses the http get mode to obtain data. The default is to obtain data once every 60 seconds. If you want to obtain data faster, you can use ha_iammeter_modbus integration.

Automation can also reduce the sensor acquisition interval.
`alias: Fast Update Sensors
description: Fast Update Sensors
trigger:

platform: time_pattern
seconds: /3
condition: []
action:
service: homeassistant.update_entity
target:
entity_id:
- sensor.solarpv_power_a
- sensor.solarpv_power_b
- sensor.solarpv_power_c
data: {}
mode: single`


Add skins export

For https://github.com/snapshot-labs/snapshot/pull/499

I'll just change " to ' and filename to index.ts

I'll just change " to ' and filename to index.ts

.ts doesn't work for me, if get this Cannot find module './aave.scss' or its corresponding type declarations.ts(2307)

@samuveth Where you get this error? On snapshot UI or this repo?

@samuveth Where you get this error? On snapshot UI or this repo?

@bonustrack On the Ui.

@samuveth Ok weird, can change to js then


[Op] Cherry pick SparseApplyAdagrad and SparseApplyFtrl Op from nvidia tensorflow

GPU capability == 7.5

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


device-plugins: Add a new USB selector

Is your feature request related to a problem? Please describe:
A clear and concise description of what the problem is.
With https://github.com/kubevirt/kubevirt/pull/10015, a cluster admin can define USB devices that are plugged into Nodes to be used by VMI. The only selector available is by vendor and product. In case we have multiple identical devices plugged into the same Node, we have no way of knowing which device is going to which VM.
Describe the solution you'd like:
A clear and concise description of what you want to happen.
We should add another selector that makes it straightforward to identify which device is going to which VM. The proposal is to use bus and device number, such as bus=4 and device=2 for the example below:
> lsusb
Bus 004 Device 002: ID 0781:55ae SanDisk Corp. Extreme 55AE

Describe alternatives you've considered:
A clear and concise description of any alternative solutions or features you've considered.
We could use serial number or other metadata but those are not are always present. Using bus and device number should provide the feature we want without worrying about corner cases.
Additional context:
Add any other context or screenshots about the feature request here.
The problem is related to devices plugged in the same node. If the user wants a specific device in a specific node, it should use a node selector

@TheRealSibasishBehera, would you like to give it a try?

Git history is your friend:

2ced17283d62880e669b47230abb40ee6bf0097d added current vendor/product selector. Remember to run make generate afterwards
a06f27ab95ca6badd329460a13c6dc7b46c6fc52 added functional testing. The PR that implements this should extend the functional testing.

To run a cluster with emulated USB environment, you can:
export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
make cluster-up && make cluster-sync

And to run functional test related to USB
FUNC_TEST_ARGS='-focus-file=usb' make functest

/labe good-first-issue

/assign

/label good-first-issue

@pat-glitch I have already completed most of the work here and will be making a PR soon.  This is a small-ticket issue, but if you are interested, please join its PR review when its done.


Hardcoded gradle plugin version 3.0.1 incompatible w/Android Studio previews

(On Android Studio 3.2 Canary update path)
Had been on sqldelight 0.6.1, all working OK
Updated to 0.7.0, build failing w/error:
Could not find com.android.tools.build:gradle:3.0.1.
Required by:
               project :data > com.squareup.sqldelight:gradle-plugin:0.7.0

You need to add the google() repository to your buildscript repositories.

Thank you, that worked


add kube-aws-iam-controller-crd

CRD chart for kube-aws-iam-controller
sample CRD manifest: https://github.com/mikkeloscar/kube-aws-iam-controller#specifying-aws-iam-role-on-pods

👍


TrackEvalForAllReID is missing!

For the from TrackEvalForAllReID import trackeval mentioned in src/eval_track_eval.py, here is no TrackEvalForAllReID module!

Thank you for the question! I just adapted the code, it has to be from TrackEvalForGHOST import trackeval since this is the repository that you have to clone as mentioned in the README.md. Can you re-try if it works now? :)


tf.control_dependencies() not respected with Keras layers

System information

TensorFlow version: v1.12.0-0-ga6d8ffae09 1.12.0
Python version: 3.6.7

I want to switch dropout on and off while processing one single batch of data (i.e., feeding data just once). For this I replace the learning_phase placeholder used by Keras with a variable, which I can then assign dynamically, and use tf.control_dependencies() to control the order of operations. Order of execution does not seem to be respected, leading to random behavior.
More details: In the context of reinforcement learning, for each batch of data, I want to: (1) do a forward pass over my network with dropout disable to build targets; and (2) do a training step with those targets with dropout enabled.
Code to reproduce the issue
The code below is a toy example that resembles what I want to do. I would expect o1 and o3 to be equal and different than o2. I would also expect to run w/o crashing.
from tensorflow.keras.layers import Dropout, Dense, Input, Lambda, Layer, Add, RepeatVector, LSTM
from tensorflow.python.keras import backend as K
from tensorflow.keras import Model
import tensorflow as tf
import numpy as np

lph = tf.Variable(False, dtype=tf.bool, name='lph')
g = tf.get_default_graph()
K._GRAPH_LEARNING_PHASES[g] = lph

repeat = RepeatVector(2)
lstm = LSTM(1, dropout=0.5, recurrent_dropout=0.5)

ph1 = tf.placeholder(tf.float32, shape=(None, 1), name='ph1')
h = repeat(ph1)
o1 = lstm(h)

with g.control_dependencies([lph.assign(True), tf.identity(o1)]):
  target1 = tf.stop_gradient(o1)

  ph2 = tf.placeholder(tf.float32, shape=(None, 1), name='ph2')
  h = repeat(ph2)
  o2 = lstm(h)

  with g.control_dependencies([lph.assign(False), tf.identity(o2)]):
    target2 = tf.stop_gradient(o2)

    ph3 = tf.placeholder(tf.float32, shape=(None, 1), name='ph3')
    h = repeat(ph3)
    o3 = lstm(h)

    loss = target1 + target2 - o2
    opt = tf.train.GradientDescentOptimizer(0.1)
    train = opt.minimize(loss)

sess = tf.Session()
K.set_session(sess)
sess.run(tf.global_variables_initializer())

data = np.ones((1,1))
sess.run([o1, o2, o3, train], feed_dict={ph1:data, ph2:data, ph3:data})

Closing this since there is not a problem, actually. Splitting each of the control_dependencies() commands in two, as shown below, solves the issue.
with g.control_dependencies([o1]):
       with g.control_dependencies([lph.assign(True)]):
               ....


Add unit test for overriding margin/padding props

I thought it would be useful to test for this to ensure no regression occurs.

Thank you! 🙏


[Question] Using AsyncLocalStorage

I currently going to refactor previous orm on our nestjs backend from Typeorm to Mikro ORM, i see using Mikro ORM with nestjs requiring RequestContext Middleware to ensure each request have clean entity manager state. Because middleware is only for regular http request and cannot be used on background job, queue, or any task running on background.
So using entity manager outside request scope the function should be anotated with @UseRequestContext (i aware with this because we have large codebase that mostly run on background will cause DRY Code)
If using AsyncLocalStorage instead RequestContext still we need anotate the function with UseRequestContext ? i look into UseRequestContext there no conditional case if context handled by request or local storage

@UseRequestContext decorator is currently bound to the domain api only, but the code is very simple, you can create custom decorator that will use the ALS easily.
https://github.com/mikro-orm/nestjs/blob/master/src/mikro-orm.common.ts

@UseRequestContext decorator is currently bound to the domain api only, but the code is very simple, you can create custom decorator that will use the ALS easily.
https://github.com/mikro-orm/nestjs/blob/master/src/mikro-orm.common.ts

So @UseRequestContext not need when using AsyncLocalStorage ? but how to achieve same behavior with AsyncLocalStorage ? or its not required ?

So @UseRequestContext not need when using AsyncLocalStorage ? but how to achieve same behavior with AsyncLocalStorage ? or its not required ?

I'm curious about this as well, since I'm trying to use ALS for event based request contexts.

v5 is using ALS by default


QPPCT-681: disable javadoc for private

Information

QPPCT-681

Changes proposed in this PR:

disabled generation of java documentation for private members

Checklist

[ ] All JUnit tests pass (mvn clean verify).
[ ] New unit tests written to cover new functionality.
[ ] Added and updated JavaDocs for non-test classes and methods.
[ ] No local design debt. Do you feel that something is "ugly" after your changes?
[ ] Updated documentation (README.md, etc.) depending if the changes require it.

SonarQube analysis reported 1 issue
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

 ScopedQppOutputEncoder.java#L4: Remove this unused import 'gov.cms.qpp.conversion.Converter'.

SonarQube analysis reported 1 issue
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

 ScopedQppOutputEncoder.java#L4: Remove this unused import 'gov.cms.qpp.conversion.Converter'.


Ignite-2.5.1.b4

PR seems to be temporary for testing, closing it, for now, feel free to reopen if it is needed.


POST /wallet/bumpfee supports unique coin per transaction

Done in #1059

I say 'ole chap, shall we put an end to the issue @placer14 ?


Use test name for temporary test directories.

The test.NewWriter() method uses a directory prefix of fileWriter. When
multiple tests fail its difficult to know what directory relates to what
test. This ensures we have a delineation between test artifacts

/lgtm


glibc-packages for termux-armv7 gcc compile cmake 3.13 Bad system call

Discussed in https://github.com/termux-pacman/glibc-packages/discussions/40

Originally posted by szllzs June 18, 2023

I tried the 3.17, 3.13 and 3.27 source code, but all of them produced a "bad system call" error during bootstrap or configure

@szllzs, could you please send your cmake compilation steps?

@szllzs, could you please send your cmake compilation steps?

run bootstrap or configure


Cannot read property 'offsetTop'

I tried to use this fantastic plug-in and it works well, as long there is no navigation bar at the top of the site.
When using the bootstrap navigation bar, smartscroll generates the error "Cannot read property 'offsetTop'" on chrome or a "Die Eigenschaft "offsetTop" eines undefinierten oder Nullverweises kann nicht abgerufen werden." (property "offsetTop" of a undefined Null-reference could not be read)  on IE.
Is it possible to set an offset for the page top ?

Thanks for letting me know, do you think it'd be possible for you to host your site somewhere so I can directly debug from there?

Hi Daniel,
thanks for the fast reply, the site is online at: www.ib-barwich.de/testhttp://www.ib-barwich.de/test
I tried to figure out if there is any interacting with other scripts used by the site, but could not find the problem yet.
Von: Daniel Li<EMAIL_ADDRESS>Gesendet: Mittwoch, 13. Mai 2015 03:34
An: d4nyll/smartscroll
Cc: Axel Barwich
Betreff: Re: [smartscroll] Cannot read property 'offsetTop' (#7)
Thanks for letting me know, do you think it'd be possible for you to host your site somewhere so I can directly debug from there?
—
Reply to this email directly or view it on GitHubhttps://github.com/d4nyll/smartscroll/issues/7#issuecomment-101479033.

I took a look at your markup.
Right now, the structure needs to be:

Where the section needs to be direct children of the container. Also, for the time being, there cannot be anything in between the sections (which is part of the 'Requirements' - There can only be one set of adjoining sections).
So you'd need to structure it that way.
Also for the time being, hybrid scroll doesn't work at the bottom #8, so you'd have to scrolljack down to the 'Contact' section. But I aim to fix this soon.
Please let me know if that's possible for you, and whether you're able to resolve the issue!

I got the same problem using html5 tags structure.
Solved it by replacing css selector used on smartscroll.js, line 57:
replace :nth-of-type by :nth-child
@d4nyll is there any particular reason you used :nth-of-type ?

@maoosi I used :nth-of-type because originally, I wanted to allow the users to have other things inside the section wrapper. But now I can change it to :nth-child, it'd be equivalent. Still I am curious why :nth-of-type didn't work...

Because :nth-of-type selector is attached to a particular type, so if we don't want to use the same tag type (something different from a
 like
 or
, or even differents types inside the same parent element), it will not work anymore.
I think you can replace all your :nth-of-type by :nth-child everywhere it's used in your plugin in order to make it more flexible.

@maoosi That's a very good point I didn't consider. I will update it in the next push! Thanks!