Version 1.7.4 Fails to build Whisper.net.Demo

ChatGPT discussion

[x]  I asked Whisper.net Helper and it couldn't help me, here is the discussion link:
https://chatgpt.com/share/676eb704-9cd0-800b-b1fe-28cf70f543d1

Describe the bug
Cloned latest Whisper.net (1.7.4) and Whisper.net.Demo gives me 36 errors:

Severity	Code	Description	Project	File	Line	Suppression State	Details
Message (active)	CA1050	Types are declared in namespaces to prevent name collisions and as a way to organize related types in an object hierarchy.	Whisper.net.Demo (net9.0)	C:\workspace\___skunks\whisper.net\Whisper.net.Demo\Program.cs	85
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x86\whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x86\ggml-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x86\ggml-cpu-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x86\ggml-base-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x64\whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x64\ggml-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x64\ggml-cpu-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-x64\ggml-base-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-arm64\whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-arm64\ggml-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-arm64\ggml-cpu-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\win-arm64\ggml-base-whisper.dll" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-x64\libwhisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-x64\libggml-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-x64\libggml-cpu-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-x64\libggml-blas-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-x64\libggml-base-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-arm64\libwhisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-arm64\libggml-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-arm64\libggml-metal-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-arm64\libggml-cpu-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-arm64\libggml-blas-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\macos-arm64\libggml-base-whisper.dylib" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-x64\libwhisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-x64\libggml-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-x64\libggml-cpu-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-x64\libggml-base-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm\libwhisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm\libggml-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm\libggml-cpu-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm\libggml-base-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm64\libwhisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm64\libggml-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm64\libggml-cpu-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\linux-arm64\libggml-base-whisper.so" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322
Error (active)	MSB3030	Could not copy the file "C:\workspace\___skunks\whisper.net\runtimes\Whisper.net.Runtime\ggml-metal.metal" because it was not found.	Whisper.net.Demo (net9.0)	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5322

I added the Whisper.net.Runtime version 1.7.4 from Nuget.  I also added all Runtimes as described in the readme.

Hello @steve3p0 ,
It seems that you're trying to build the demo without having the runtimes in the local path.
You can do one of the following:

Remove the local reference to the runtimes from here: https://github.com/sandrohanea/whisper.net/blob/a3ec2f8fa8f19a5fd905dec2368aa16940dd35fd/Whisper.net.Demo/Whisper.net.Demo.csproj#L2
(just delete or comment out that Import)
If you remove that, ensure that you install Whisper.net.Runtime 1.7.4 from Nuget as you said above.

Second option if you want to use the local runtimes, you can build all the dylibs using make (or just fork this repo, run the github action for CI and download the artifacts with the built runtimes). In this case, Whisper.net.Runtime nuget reference won't be needed.

Demo is designed to show and run the app locally, but examples are recommended for low-effort running of Whisper scenarios using the nuget version.

OK.  Option 1 worked!
There is another local reference besides targets for Whisper.net.Runtime that I commented out:
<!--<Import Condition="'$(EnableCoreML)' != 'true'" Project="../runtimes/Whisper.net.Runtime/Whisper.net.Runtime.targets" />-->
<Import Condition="'$(EnableCoreML)' == 'true'" Project="../runtimes/Whisper.net.Runtime.CoreML/Whisper.net.Runtime.CoreML.targets" />

I left that 2nd one and it works... so, cool!
One more question:
Can I just copy the Whisper.net "project" folder from your solution into my solution and add a reference in my solution's project to it?  I don't need anything else, like whisper.cpp, do I?  In my previous attempt that I got working with Windows, I just pretty merged both solution directories.

Sandro,
I'm almost there.  Can you help me with this error:
Severity	Code	Description	Project	File	Line	Suppression State	Details
Error		XAPRAS7023: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\workspace___skunks\Slide.net\Whisper.net\bin\Debug\net9.0\android-x64\Whisper.net.dll'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Xamarin.Android.Tasks.MonoAndroidHelper.HasMonoAndroidReference(ITaskItem assembly) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.cs:line 349
at Xamarin.Android.Tasks.ProcessAssemblies.SetMetadataForAssemblies(List1 output, Dictionary2 symbols) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs:line 129
at Xamarin.Android.Tasks.ProcessAssemblies.RunTask() in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs:line 62
at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25		 	0
I've got some warnings that I think explain why I am getting that error.  I have been struggling with making sure that Whisper.net generates the DLL in location that it's expected.  I have no idea where it gets that path.  I mean see parts of it and RIDs, blah, blah.  I don't completely get it.
Warnings:

MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\workspace___skunks\Slide.net\Whisper.net\bin\Debug\net9.0\win-x64\Whisper.net.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project., Slide.net (net9.0-android), MainActivity.cs, line 6

Message:

IDE0130: Namespace "Slide.net" does not match folder structure, expected "Slide.net.Platforms.Android", Slide.net (net9.0-android), Microsoft.Common.CurrentVersion.targets, line 2413

One more question: Can I just copy the Whisper.net "project" folder from your solution into my solution and add a reference in my solution's project to it? I don't need anything else, like whisper.cpp, do I? In my previous attempt that I got working with Windows, I just pretty merged both solution directories.

Why not using the package directly instead of copying the Whisper.net project folder?
Just reference Whisper.net project to your solution, same as in the examples: (e.g. Simple example)

Sandro, I'm almost there. Can you help me with this error:
Severity Code Description Project File Line Suppression State Details Error XAPRAS7023: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\workspace___skunks\Slide.net\Whisper.net\bin\Debug\net9.0\android-x64\Whisper.net.dll'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Xamarin.Android.Tasks.MonoAndroidHelper.HasMonoAndroidReference(ITaskItem assembly) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.cs:line 349 at Xamarin.Android.Tasks.ProcessAssemblies.SetMetadataForAssemblies(List1 output, Dictionary2 symbols) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs:line 129 at Xamarin.Android.Tasks.ProcessAssemblies.RunTask() in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs:line 62 at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25 0
I've got some warnings that I think explain why I am getting that error. I have been struggling with making sure that Whisper.net generates the DLL in location that it's expected. I have no idea where it gets that path. I mean see parts of it and RIDs, blah, blah. I don't completely get it.
Warnings:

MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\workspace___skunks\Slide.net\Whisper.net\bin\Debug\net9.0\win-x64\Whisper.net.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project., Slide.net (net9.0-android), MainActivity.cs, line 6

Message:

IDE0130: Namespace "Slide.net" does not match folder structure, expected "Slide.net.Platforms.Android", Slide.net (net9.0-android), Microsoft.Common.CurrentVersion.targets, line 2413

Regarding this error, I'm not sure if I understand whay caused it. Do you have some reproduction steps (e.g. some project where the issue is reproduced? )

One more question: Can I just copy the Whisper.net "project" folder from your solution into my solution and add a reference in my solution's project to it? I don't need anything else, like whisper.cpp, do I? In my previous attempt that I got working with Windows, I just pretty merged both solution directories.

Why not using the package directly instead of copying the Whisper.net project folder? Just reference Whisper.net project to your solution, same as in the examples: (e.g. Simple example)

What you are suggesting is to use the pre-compiled builds using nuget, correct?  When I have both Whisper.net and Whisper.net.Runtime added using nuget, IT WORKS!!!! It works on both Windows and Android.  And I assume it will on iPhone.  In fact, you helped me get it to work (THANKS!!!).  See this issue https://github.com/sandrohanea/whisper.net/issues/297.  User @StevePGLS) is my work account.
But alas, I need to modify your code.  AND this is what doesn't work on Android.
On Android, a project reference to your Whisper.net project will result in runtime errors.  But It works on Windows!
So just to be clear:
If I add Whisper.net as a project reference (keeping Whisper.net.Runtime from Nuget), I get a runtime error on Android. But I don't get this error on Windows.  Windows works great with Whisper.net.Rutime version 1.7.4 and your latest Whisper.net code on GitHub (which has a version of 1.7.4 listed in the .csproj file).  But I get the following error on my Android Pixel 8 - API 35 (attached is a log file).
Error message on Android:
[monodroid-assembly] open_from_bundles: failed to load bundled assembly Whisper.net.dll
Here's the full log:
Android_Emulator_Win10_log_whisper.net (from project) error.log
And here is the code in MainPage.xaml.cs where I call Whisper.  The error happens on the 2nd to last line:
var factory = WhisperFactory.FromBuffer(bufferedModel); // <<<< ERROR
MainPage.xaml.cs
using System.IO;
using Whisper.net;
using Whisper.net.Ggml;

namespace Slide.App
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();

            MainPage.TestWhisperNet();
        }

        public static async void TestWhisperNet()
        {
            // Define the model file name
            const string modelFileName = "ggml-tiny.bin";

            // Open the model file as a stream using MAUI's asset system
            using var stream = await FileSystem.Current.OpenAppPackageFileAsync(modelFileName);

            // Read the stream into a byte array
            using var memoryStream = new MemoryStream();
            await stream.CopyToAsync(memoryStream);
            var bufferedModel = memoryStream.ToArray();

            // Initialize the Whisper factory
 ERROR >>>> var factory = WhisperFactory.FromBuffer(bufferedModel);  // <<<< ERROR
            System.Diagnostics.Debug.WriteLine("Whisper model loaded successfully!");
        }
    }
}

Now, I've paired this down to the point that I am just using the out-of-box "Hello, world!" .NET MAUI Blazor sample project.  And I have made some progress.  Before, it was very difficult to get repeatable behavior.  I am getting repeatable behavior now.
I can consistently compile on the command line.  I first run these commands one time:
dotnet workload update
dotnet build -r win-x64
dotnet build -r android-x64

Then whenever I make changes, this set of commands seem to work well for me and it consistently compiles:
dotnet clean
dotnet restore
dotnet clean Whisper.net/Whisper.net.csproj
dotnet build Whisper.net/Whisper.net.csproj -r android-x64
dotnet build .\Slide.App\Slide.App.csproj -f net9.0-android -r android-x64

Sandro, I'm almost there. Can you help me with this error:
Severity Code Description Project File Line Suppression State Details Error

Regarding this error, I'm not sure if I understand whay caused it. Do you have some reproduction steps (e.g. some project where the issue is reproduced? )

This error has been cleared since I went back and started with a fresh copy of the .NET MAUI Blazor sample project solution code.
I also upgraded to .NET MAUI and the .NET Framework from 8.0 to 9.0.  I have much more repeatable behavior with these upgrades and I have tried to make my project code as simple as possible, with the minimum to produce this error.
Here are log files showing it working and not working:
Android_Emulator_Win10_log_whisper.net (from nuget) works.log
Android_Emulator_Win10_log_whisper.net (from project) error.log
Win10_log_whisper.net (from project) works.log


ds/bits contains decidedly not bit-like things

pause(), tick(), tickp(), halt_out_of_order(), benchmark_time_start(), and benchmark_time_end() really seem like they belong somewhere else, probably within the PAL.  Is there a reason they're here instead?

So I viewed bits.h as the CPU abstraction, and the pal.h as the OS/platform abstraction.  These are somewhat orthogonal, and if we put all the CPU abstraction stuff into each pal, then I think we will get a blow up in cases.  That said, it might be worth refactoring bits.h, to separate the CPU abstraction, from various bit manipulating code.
@sylvanc @davidchisnall thoughts?

It's a good point. I think a timing.h containing all the functions @nwf mentions would be good. Possibly also separating out SNMALLOC_ASSUME and Construction. I think the PAL isn't quite right, as the PAL depends on mem, which depends on ds, so I think this stuff should stay in ds.


getValue: "name" but POST value "id"

Is it possible to get the name value from a list of json objects but pass the id or another value to the input field?
Or is there anyway to get the unique id of the input field to pass the value to it using the onSelectItemEvent property.
I have dynamically generated fields.

Did you see the example at http://easyautocomplete.com/guide#sec-function-index
I don't understand what you wish to do that isn't answered by that.

I have multiple dynamically generated fields. The example is no help really.
When a new field is created dynamically with javascript how can I get the value of the specific field that was set? You only have the option to .getSelectedItemData of the specified field but no method to return the unique id of the field that is generated by eac so I can get the value of the field just set.
At the moment I'm using
var value = $(".serviceProvidersList li:last-child input.eacAllServiceProviders").getSelectedItemData().id;
Which only gets the last child of the list of inputs but I need to get the value if someone changes an item above the last child.

onChooseEvent: doesn't have the input field in scope so you can't use this or select it in any way. You have to specify the input to get the data from. I have dynamically generated inputs with JS via an add button that creates a new input and then runs .easyAutocomplete(eacAllServiceProviders); on that dynamically generated input. Is there any way to return the id generated by eac of this input?

I'm not a developer of this project, just trying to help. I don't think eac is very well suited to be initiated dynamically lots of times.
I've just been looking at the code where it creates the list. It doesn't seem to se any id on the li or div. Search the javascript file for

 and maybe add one in yourself.

Ah thanks!
When I use the .easyAutocomplete() method on the input it adds a dynamically generated id to the input and the container div. However, even if I added one myself there is no way to return it as a property. It needs a method for onChooseEvent to return this input's id or to dynamically generate the data-holder hidden inputs and attach the id from the input to the hidden input.
It might be possible to do this when the input field is generated after .easyAutocomplete() is run on the field then get the id and dynamically generate a hidden field that includes the id.


Corrected grammar in hooks API reference

Currently in the https://reactjs.org/docs/hooks-reference.html#usereducer section is taking wrong param in Counter function.
- function Counter({initialCount}) {
+ function Counter({initialState}) {

LGTM, Thanks!


Crash at launch

When I open a tab - using any browser - it crashes after 2-3 seconds. The terminal doesn't print anything, the page just start to slow down incredibly fast, to the point firefox asks: "This page is slowing down Firefox. To speed up your browser, stop this page." If I don't stop it, after 5-6 seconds or so all my tabs will freeze for about a minute or more. Then, all of the pages excluding stable diffusion will return to normal. The tab remains frozen indefinitely and if I try to interact w/ anything - doesn't work - it repeats the above process all over again. Terminal clean, one time I could open the inspector and it said: "Could load... X from /stable-diffusion-webui/extensions/tagcomplete" a couple of times.
I had the extension for a while and only after I updated both automatic and this extension it got this way. I did git pull the first time that I had the problem, moved the extension out the folder, it ran clean. I tried installing from scratch or via the tab UI, both led me to the same problem.

This isn't really enough info for me to work with, but if you run it locally, the only thing I know will hang the page is if you use one of the full tag sets (so e621.csv or danbooru.csv) as an extra file, which is why I included a warning not to do that. You can check the config.json file in your webui root folder for that without launching it.
Other than that, I would need the full error message from the browser console.

I installed today and its working so far, only getting this error from consoel

If that error only appears after completing a word it's normal, this happens because I need to send an artificial event so the webui backend notices the text box changes. The internal binding expects an actual page element as an event source there so it throws an error, but it doesn't impede any functionality as far as I could tell.
I'll close this issue for now since it's working for you. Feel free to reopen it if the problem appears again.


[HOW TO] Join on multiple table with OR condition

Right now we can join on multiple tables writing this 'join' array:
[ ...,
 '[>]table_3' => ['table_2.ID' => 'ID',
                  'table_1.ID' => 'ID']]

That generates something like that:
...
LEFT JOIN "table_3"
ON "table_2"."ID" = "table_3"."ID"
AND "table_1"."ID" = "table_3"."ID"

But I would like to join multiple tables using the OR condition (instead AND) and I'm not sure if Medoo can do it. For example, I would like a Query like this:
...
LEFT JOIN "table_3"
ON "table_2"."ID" = "table_3"."ID"
OR "table_1"."ID" = "table_3"."ID"

Anyone knows how can I do it?
Thanks

IMBRICATED QUERY is your solution

How can we do it with Medoo? Nothing about imbricated queries appears on the API

I "solved" it rigging the array to generate the correct query. That's the code:
[ ...,
 '[>]table_3' => ['table_2.ID' => 'ID" OR "table_1"."ID" = "table_3"."ID']

But it is not the best solution. If anyone knows how to correctly generate that query, please let us know. Otherwise, please add this function.
Thanks!

Medoo not implement the conjunction OR in join at present.

Well, it is considerable.

Perfect. If you implement this function, let me know it to update the query.


Fix #2514 by keeping UIActionSheet alive until it's dismissed

Fixes #2514
UIActionSheet's Show completion handler should hold a strong reference to the UIActionSheet so that it isn't destroyed before the user can interact with it.

@jaredhms is added to the review. #Closed

:shipit:


modify build.sh to reflect moving runtimes from core to actionRuntime…

Modified build.sh to correspond to directory-reorg change for runtimes in the main openwhisk repo

Thank you @ServoKvd for the contribution


[link redacted] - empty spam post

Please make sure you are familiar with the SIP process documented
(here)[https://github.com/apache/superset/issues/5602]. The SIP will be numbered by a committer upon acceptance.
[SIP] Proposal for ..
Motivation
Description of the problem to be solved.
Proposed Change
Describe how the feature will be implemented, or the problem will be solved. If possible, include mocks, screenshots, or screencasts (even if from different tools).
New or Changed Public Interfaces
Describe any new additions to the model, views or REST endpoints. Describe any changes to existing visualizations, dashboards and React components. Describe changes that affect the Superset CLI and how Superset is deployed.
New dependencies
Describe any npm/PyPI packages that are required. Are they actively maintained? What are their licenses?
Migration Plan and Compatibility
Describe any database migrations that are necessary, or updates to stored URLs.
Rejected Alternatives
Describe alternative approaches that were considered and rejected.

This was spam, I redacted and am closing.


[ISSUE - 340] - Problem with deleting prefix characters

FIX: Added handling for deletion in getPrefixStrippedValue in util.js

The problem is defined in issue #340. In getPrefixStrippedValue, deletion of prefix characters in not taken care.


Nominatim

It looks like that something is wrong with geocoder Nominatim. I got this error:
2015-09-10 08:50:27  WARN: no protocol: null?format=json&lat=44.752307&lon=20.554030&zoom=18&addressdetails=1 - MalformedURLException (... < JsonReverseGeocoder.java:41 < ReverseGeocoderHandler.java:37 < BaseDataHandler.java:29 < ...)

Looks like you haven't specified the URL in the config. For more info on reverse geocoding configuration see following page:
https://www.traccar.org/reverse-geocoding/

Thanks.
I have missed that instructions.


Pass Azure configuration settings to Next backend as environment variables.

Is your feature request related to a problem? Please describe.
I may be mistaken, but currently, Azure Configuration settings (i.e.: those added via the portal) are not passed to the Next backend (for SSR use). This is a problem since it will effectively force secrets to be stored/managed in source control.
Describe the solution you'd like
Ideally, the Configuration settings set in Azure Portal would be passed to the Next backend as environment variables, similar to how Vercel manages secrets. It would be great if we could have environment slots for settings and use the new DB connections as well, but I won't push it. :)
Describe alternatives you've considered
Keeping secrets in next.config.js or piping them in during build are temporary alternatives, but both ultimately require secrets to be in source control and/or stored on disk next to the app. Another alternative would be running the Next backend using a managed identity which could pull secrets from Key Vault. I love this idea, actually, but I'm not sure it's possible. In any case, I'm very open to safe alternatives.
Additional context
I'm currently evaluating the preview support of Next  SSR on SWA for an app that we're beginning to design for release next year. If we could have some clarity around the roadmap of features (such as this one), it would go a long way towards providing reassurance that we're on the right track. Ultimately, I'd love to stay off Vercel and host Next on Azure (next to all of our other stuff) without the hassle of managing containers.

Hi @addexm This should work today for Nextjs apps. If you set configuration settings in portal for SSR use, these should be accessible in your app as environment variables.
Can you please share your app details like name and url, so that we can investigate this further. And also, the app setting name if it's okay to share. Apologies for the inconvenience!
Note: if you are using environment variables starting with NEXT_PUBLIC_.. which are meant for client use, you would have to set them at build time like in github action where the build is happening for example.

@vivekjilla For a number of other issues (not related to SWA), we ended up moving to a classic App Service to host our Next app. Appreciate the response though!


Change namespace to Smokescreen

Follwing #41 , I am changing the namespace to Smokescreen instead of blinding. Similar changes in the interface are being implemented. These will be reflected in the unit tests, documentation, etc.

@jessmuir did a sanity check on the code. I did a fresh install, ran all the tests and example and it all works well. I will merge this now :)


browser-esbuild use 100% CPU

Command
build
Is this a regression?

[X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
Angular 14
Description
According to the blug, I changed
"builder": "@angular-devkit/build-angular:browser"
To
"builder": "@angular-devkit/build-angular:browser-esbuild"
Every time I am compiling, the process uses all my CPU (32 GB) and swap, and the computer gets stuck for a few minutes.
I am working on 5.15.0-58-generic #64-Ubuntu
Minimal Reproduction
nx serve dashboard
Exception or Error
Change to :browser-esbuild, and compile

Your Environment
I am running under nx, and ng version is not working.
node version is v19.5.0
npm version is 9.3.1
This is the package.json:
"devDependencies": {
    "@angular-devkit/build-angular": "15.1.3",
    "@angular-eslint/eslint-plugin": "15.0.0",
    "@angular-eslint/eslint-plugin-template": "15.0.0",
    "@angular-eslint/template-parser": "15.0.0",
    "@angular/cli": "~14.1.0",
    "@angular/compiler-cli": "15.1.2",
    "@angular/language-service": "^15.1.2",
    "@nrwl/cli": "15.6.3",
    "@nrwl/cypress": "15.6.3",
    "@nrwl/eslint-plugin-nx": "15.6.3",

Anything else relevant?
When the compilation is done, everything work fine, but until then the computer is "dead"

From the issue report, it appears that nx is being used.  Can this issue be replicated in an Angular project that is not using nx?
The Angular CLI itself does not currently contain dev-server support for the experimental esbuild-based builder. The issue may be caused by an interaction with the nx serve builder.

Closing due to the lack of communication. Please feel free to open a new issue if the problem persists.


Error writing to virtual device

Hello.
Issue:
Keydogger crashes when triggering macro (macro fails to execute).
E.g. Typing @hello will trigger the crash
When running keydogger debug, the error Error writing to virtual device is printed.
Version running:
Latest commit: https://github.com/jarusll/keydogger/commit/781bbcd328fe8ff1fff237248922780ea0128dbf
My Device Info:
I'm using Hyprland v0.40 on NixOS 24.05
Debugging steps I have taken:
Using a barebones keydoggerrc file (@hello=Hello, World!)

Ensure correct KEYDOGGER_KEYBOARD device. Verified through using evtest to capture input. (Also otherwise keydogger shouldn't even detect a macro is to be triggered)
The virtual device does supposedly successfully register, since once keydogger is started, it is visible via evtest and in /dev/input/event<N>
I ran  sudo env KEYDOGGER_KEYBOARD=/dev/input/event<N> strace keydogger debug and got the following (the last few lines before the crash)

  read(3, "\333\200xf\0\0\0\0\255\364\5\0\0\0\0\0\4\0\4\0\17\0\7\0", 24) = 24
  read(3, "\333\200xf\0\0\0\0\255\364\5\0\0\0\0\0\1\0&\0\1\0\0\0", 24) = 24
  read(3, "\333\200xf\0\0\0\0\255\364\5\0\0\0\0\0\0\0\0\0\0\0\0\0", 24) = 24
  read(3, "\333\200xf\0\0\0\0\34\203\7\0\0\0\0\0\4\0\4\0\22\0\7\0", 24) = 24
  read(3, "\333\200xf\0\0\0\0\34\203\7\0\0\0\0\0\1\0\30\0\1\0\0\0", 24) = 24
  write(3, "\333\200xf\0\0\0\0\34\203\7\0\0\0\0\0\1\0\30\0\0\0\0\0", 24) = 24
  write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 24) = 24
  write(62, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\16\0\1\0\0\0", 24) = -1 EBADF (Bad file descriptor)
  newfstatat(1, "", {st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0
  write(1, "Error writing to virtual device\n", 32Error writing to virtual device
  ) = 32
  exit_group(9)                           = ?
  +++ exited with 9 +++

I attempted to listen to the keydogger virtual device with evtest while it was running. This is what happened after triggering a macro:

# Info
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x4a3 product 0x7cf version 0x0
Input device name: "keydogger"
...
Testing ... (interrupt to exit)
expected 24 bytes, got -1
# Most likely the device getting cleaned up after crashing
evtest: error reading: No such device

The \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\16\0\1\0\0\0 representation is for keycode KEY_BACKSPACE. Can you give me a full strace log till crash?

Not reproducible on Sway.

Ok man, this is the weirdest shit ok excuse my profanity I never write in issues like this. I had different comment in process, but I deleted it when I found this out.
So the main error that stuck out to me, was why it kept trying to write to FD 62, since fkeyboard_device and vkeyboard_device are the last ones to be opened, they should be at FD 3 and FD 4 respectively (which is reflected in the syscalls).
openat(AT_FDCWD, "/dev/input/event6", O_RDWR|O_APPEND) = 3
openat(AT_FDCWD, "/dev/uinput", O_WRONLY) = 4

So I did what any C noob would do, put in print statements everywhere for vkeyboard_device trying to trace why it was becoming 62.
Anyways, apparently https://github.com/jarusll/keydogger/blob/7c0a30ff442744a986e10282997acb347f92cd60/keydogger.c#L205 is to blame.
My test:
    printf("Here-1: V Device fd: %d\n", vkeyboard_device);
    key_codes_to_position[KEY_2 | FLAG_UPPERCASE] = 63;
    printf("Here-2: V Device fd: %d\n", vkeyboard_device);

Output:
Here-1: V Device fd: 4
Here-2: V Device fd: 62

I just forced the FD back to 4
    printf("Here-1: V Device fd: %d\n", vkeyboard_device);
    key_codes_to_position[KEY_2 | FLAG_UPPERCASE] = 63;
    printf("Here-2: V Device fd: %d\n", vkeyboard_device);
    vkeyboard_device = 4;

And everything worked as normal. I thought it was some kind of maybe undefined behavior, so I repeated the assignment
    printf("Here-1: V Device fd: %d\n", vkeyboard_device);
    key_codes_to_position[KEY_2 | FLAG_UPPERCASE] = 63;
    printf("Here-2: V Device fd: %d\n", vkeyboard_device);
    vkeyboard_device = 4;
    key_codes_to_position[KEY_2 | FLAG_UPPERCASE] = 63;
    printf("Here-3: V Device fd: %d\n", vkeyboard_device);

And the output is
Here-1: V Device fd: 4
Here-2: V Device fd: 62
Here-3: V Device fd: 4

Anyways, I was going to originally just ask whether the window-manager would matter in this case, since it seems like the only time wayland stuff gets involved (via wl-clipboard) is when there's a non-ASCII macro definition.

Yup something weird is going on. When I load keydogger into ghidra and inspect the init_key_to_position_map function frame, there it is clear as day
004026fc c7 05 0e    MOV     dword ptr [vkeyboard_device],0x3e                = ??
      4c 00 00
      3e 00 00 00

Brother, I think I figured it out.
You have https://github.com/jarusll/keydogger/blob/7c0a30ff442744a986e10282997acb347f92cd60/keydogger.h#L12
But KEY_SLASH is 53 and FLAG_UPPERCASE is 128, soooo
https://github.com/jarusll/keydogger/blob/7c0a30ff442744a986e10282997acb347f92cd60/keydogger.c#L204
ends up being undefined behavior. I noticed when I added my fix of setting vkeyboard directly, macros containing ? broke, and upon debugging, found that the position of key_codes_to_position[KEY_SLASH | FLAG_UPPERCASE] was somehow now 4.
I changed the MAX_KEY_CODE in the header file to 182 and it fixed both issues.
Opened a PR https://github.com/jarusll/keydogger/pull/4 (What an appropriate PR number)

Thanks for going down this rabbithole.

This is what I got for my dev build. I realized the max key_codes is 57 so I can use 64 for FLAG_UPPERCASE. I confirmed theres no suspicious assignment with 64.
Ideally this should have been a compile error with -Warray-bounds. Thanks.

Anyways, I was going to originally just ask whether the window-manager would matter in this case, since it seems like the only time wayland stuff gets involved (via wl-clipboard) is when there's a non-ASCII macro definition.

This should work on X11 in theory for ascii expansions. I haven't tested it myself.


[backport][opendistro-1.11]fix to include hidden indices when resolving wildcards

(cherry-picked from commit 5a9935a)
Signed-off-by: Nidhi Sridhar<EMAIL_ADDRESS>opensearch-security pull request intake form
Please provide as much details as possible to get feedback/acceptance on your PR quickly

Category: (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Github Issue # or road-map entry, if available:

Description of changes:

Why these changes are required?

What is the old behavior before changes and new behavior after changes? (Please add any example/logs/screen-shot if available)

Testing done: (Please provide details of testing done: Unit testing, integration testing and manual testing)

TO-DOs, if any: (Please describe pending items and provide Github issues# for each of them)

Is it backport from main branch? (If yes, please add backport PR # and commits #)

By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #1489 (f29d6fb) into opendistro-1.11 (7840f9f) will decrease coverage by 0.11%.
The diff coverage is 50.00%.

@@                  Coverage Diff                  @@
##             opendistro-1.11    #1489      +/-   ##
=====================================================
- Coverage              64.22%   64.10%   -0.12%
+ Complexity              3195     3193       -2
=====================================================
  Files                    241      241
  Lines                  16965    16965
  Branches                3044     3044
=====================================================
- Hits                   10896    10876      -20
- Misses                  4513     4533      +20
  Partials                1556     1556

Impacted Files
Coverage Δ

...earch/security/resolver/IndexResolverReplacer.java
61.45% <50.00%> (ø)

...ecurity/configuration/StaticResourceException.java
0.00% <0.00%> (-25.00%)
:arrow_down:

...relasticsearch/security/rest/TenantInfoAction.java
77.61% <0.00%> (-10.45%)
:arrow_down:

...transport/OpenDistroSecuritySSLRequestHandler.java
53.57% <0.00%> (-5.96%)
:arrow_down:

...csearch/security/dlic/rest/api/AuditApiAction.java
63.82% <0.00%> (-4.26%)
:arrow_down:

...asticsearch/security/support/ReflectionHelper.java
47.58% <0.00%> (-2.07%)
:arrow_down:

.../dlic/auth/ldap2/LDAPConnectionFactoryFactory.java
56.48% <0.00%> (-0.77%)
:arrow_down:

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 7840f9f...f29d6fb. Read the comment docs.


Use name@provider instead of provider@name.

What does this PR do?
Uses name@provider instead of provider@name.
Motivation
Enhance readability.
More

[x] Added/updated tests
[x] Added/updated documentation

I love this change. Especially with the move from . -> @

Is the @ syntax meant to be working atm? I know it's listed in the docs but when I tried it, I didn't have any luck(see "Referencing cross-provider").
I had to use the . syntax instead.


Update to the latest chronos release

@jsancio or @ConnorDoyle, please take a look when you have a moment. thanks!

Note this also needs to be pushed to the ea2 branch.


Support for Assistants v2

A new version of Assistants API is available.
Here's the migration path and changes needed: https://platform.openai.com/docs/assistants/migration

Any update on supporting v2 @alexrudall?

TIP: You can use Assistants API v2 setting this monkey patch until someone make the correct solution:
module OpenAIPatch
  def beta(apis)
    dup.tap do |client|
      client.add_headers("OpenAI-Beta": apis.map { |k, v| "#{k}=v2" }.join(";"))
    end
  end
end

OpenAI::Client.prepend(OpenAIPatch)

Released in v7


Clarify statement about Azure Arc requirement

Learn Build status updates of commit d416f98:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/sentinel/connect-cef-ama.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@limwainstein

Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team


[fix](cluster key) fix cluster key duplicated key

What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
the duplicated keys is happend when:

do schema change and not finished
write data and the publish phase skip calculate delete bitmap
compact the newly rowsets without delete bitmap: the mow with cluster key need to do compaction with delete bitmap

Release note
None
Check List (For Author)

Test

[x] Regression test
[ ] Unit Test
[ ] Manual test (add detailed scripts or steps below)
[ ] No need to test or manual test. Explain why:

[ ] This is a refactor/code format and no logic has been changed.
[ ] Previous test can cover this change.
[ ] No code files have been changed.
[ ] Other reason

Behavior changed:

[x] No.
[ ] Yes.

Does this need documentation?

[x] No.
[ ] Yes.

Check List (For Reviewer who merge this PR)

[ ] Confirm the release note
[ ] Confirm test cases
[ ] Confirm document
[ ] Add branch pick label

run buildall

run buildall

run buildall

run buildall

run external


Error highlighting for custom language

i am using monaco in my electron application and want to support an custom language with error highlighting and true intellisence . i come to know that i have to write language parser for it. and i want to know that how to write custom language parser OR is there any other way to highlight syntax errors and provide true intellisence.

Both are possible.  The language parser is responsible for syntax highlighting, and errors / intellisense can be added in as additional handlers.
For syntax highlighting and some basic intellisense, see the custom language example.
A great example on how to add intellisense and error highlighting is the monaco-typescript project.  It handles parsing using its own copy of the typescript compiler, then pushes the output into monaco.  Take a look at languageFeatures.ts for how this is done, especially DiagnostcsAdapter._doValidate (highlights errors with editor.setModelMarkers) and SuggestAdapter (registered in mode.ts via monaco.languages.registerCompletionItemProvider).
Unfortunately, the tokenizer in monaco doesn't seem to be exposed, I am still looking into that myself.  As far as I can tell, you are on your own for parsing your language.


[Improvement]: Ability to call a function with parameters from the LHS and assign the return value to a RHS field

Description
Let's say that we have get a message m1 of the below type:
type Person record {|
   string name;
   string country;
   record {| string street; string city; |} address;
|};

Now we want to transform this to an instance m2 of the below type:
type Employee {|
   string name;
   string address;
   string countryCode;
|}

So the transformation would be:
function transform(Person person) returns Employee => {
    name: person.name,
    countryCode: lookupCountryCode(person.country),
    address: constructAddress(person.address.street, person.address.city)
};

However, it is not possible to create this transformation using the data mapper as function calls with parameters from left hand side fields are not supported.
Describe your problem(s)
No response
Describe your solution(s)
No response
Related area
-> Editor
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response

I was able to achieve the above requirement in plugin v4.1.0 and Ballerina 2201.5.0 as below.

@chathurace hope this addresses your requirement.


[FEATURE] Support for models that were trained on data with different sample rates

I'd like to train models on data that with sample rates other than 48k and use them in the plugin. Currently, this could be done by hacking the training process and just knowing the sample rate to pick when running the plugin. But, I'd like this to be more fool-proof. This also currently rules out having two models with different expected sample rates from being used at the same time.

Tracking for next release, but planning to implement #59 instead, which will make this obsolete.

I guess this is solved by #331 and #338.  #59 is the next frontier!


markdown: Remove file:// support.

As stated in https://github.com/zulip/zulip/pull/19516#issuecomment-915666810

Browser security models have changed in a way that makes that feature no longer exist at the browser level, so we should probably remove the ability to make useless file:// links at this point.

@zulipbot claim

Can I try and contribute towards this?

@zulipbot claim

I am assuming that when the user create a file link, a hyperlink for the same must not be created, instead it must remain as plain text

@rht Would this just mean removing "file" from  allowed schemes?
Also by default the ENABLE_FILE_LINKS constant is by default set to false. Doesn't this already prevent creation of file links? Or can the setting be toggled?
It is checked when creating a file link I suppose. Do correct me if I am missing something.

It's not just removing it from the allowed schemes. You have to remove the file links regex, and the places where ENABLE_FILE_LINKS is used.

Currently In zulip server version 6.0 the ENABLE_FILE_LINKS generates a link that I can click on but I cannot open the file.
If I use a image with file: i also dont get a preview.
Are file links intended to not work anymore at all?

It was not working for server version 4.6 so it probably broke before.

@zulipbot claim

@zulipbot abandon


Why is this extention advertised in Visual Studio market place as developed by Microsoft

This extension is published by omnisharp; however, inside VS marketplace it is advertised as developed by Microsoft:

@kev1010 This repo is part of the .NET Foundation and Microsoft builds and publishes the C# extension from it. It has been announced that this repo will move under the dotnet GitHub org at some point in the future (see announcement).

Thank you. I thought the .NET foundation was independent as well and even though Microsoft might publish the Extention, they are not taking responsibility for it. For example, if we were using a CICD pipeline to publish this extension, who would be the publisher then? It also seems weird that Microsoft was able to take over this project. It seems if they wanted to build something on top of it that was closed source they should be allowed, but taking over an open source project (even though there are no user stories or other ways to communicate with the community in this project) seems to undermine the open source community. Are they allowed to do this because they used the .Net Foundation license?

Microsoft has never taken over this project. From the beginning of Omnisharp, the VS Code extension was built in house by Microsoft and there was never an Omnisharp VS Code extension not published by Microsoft.
At the same time, the extension has always been using the Omnisharp server component (which is community built) and just hosted in this Omnisharp organization. Because of that Omnisharp maintainers that are not MS employees contributed here as well.
I will close this issue now - thanks.

According to the about us page on OmniSharps website, Microsoft didn't own the project but a few of Microsoft's employees worked on the project. Is Microsoft saying the employees didn't have the right to work on the project as individuals? The project was always stored in OmniSharp's repository. If it was owned by Microsoft, why did they not store the project in one of their repos?

The website is a bit confusing on this topic.
Originally the C# support for VS Code was built as integral part of VS Code (and based on the OmniSharp server which is developed in https://github.com/OmniSharp/omnisharp-roslyn). It was later extracted into a stand alone extension which is developed in this repo, but has - from the beginning - been published into the Extension Marketplace as a Microsoft extension (this also aligned with licensing of e.g. debugger, which is a separate closed source component included with the extension).
The placement in this repo allowed OmniSharp server maintainers (and other OmniSharp extension owners) who are non-MS employees (like me) to easier contribute/triage issues/merge PRs to the extension, and let to the extension becoming part of .NET Foundation too, when OmniSharp joined it a few years ago. But the extension has always been published to the marketplace by Microsoft, under the Microsoft brand.

I don't think publishing code is what creates the ownership. Someone was going to have to publish the code regardless. Just because Microsoft did it, does not make them the owners. Any other member of the project could have published it as well but that doesn't make them own the project. That would undermine open source in general.
Industry standards such as microservices and dependency injection specifically eliminate the need for the tight coupling that is causing this confusion. It seems that any code that was included in this project now belongs to the project and if the author did not have the right to include the code, then this is a matter between the rightful owner and the author and remedied.
The .Net foundation advertises as always open source too.

This project is also under the MIT License


Fixing reverse config name.

Really small fix but hopefully helps others using this. Just a small typo on the config name 😄

Wooops thanks!


Python: update for kernel function decorator defaults

Motivation and Context

There was an issue when you create a function with multiple arguments, some with a default.
Description

Improved the parsing of the function, using py3.10 specific features.
Closes #6311
Contribution Checklist

[x] The code builds clean without any errors or warnings
[x] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
[x] All unit tests pass, and I have added new tests where possible
[x] I didn't break anyone :smile:

Python 3.10 Test Coverage Report • FileStmtsMissCoverMissingsemantic_kernel/functions   kernel_function_decorator.py85594%56–57, 97–98, 123TOTAL6288104183%
Python 3.10 Unit Test Overview

Tests
Skipped
Failures
Errors
Time

1341
1 :zzz:
0 :x:
0 :fire:
12.230s :stopwatch:


frame level prediction

Hi Matt,
Thanks a lot for your great work. I have trained "inception model + lstm". In this example, the features of 40 frames are extracted first, and then sent into LSTM. I am wondering whether this example can make prediction for each frame. Could you please give me any tips?
Thanks

@joefang66 Do you mean a prediction per frame, without passing in a sequence of frames? If so, you should take a look at the CNN model. That only requires one frame as input, though it isn't as accurate.


Dart can't infer the type in the switch case. I

in the switch case, it is clearly a cat or a dog, but Dart can't infer the type in the switch case. Is this a bug?
class Animal {
  const Animal();
}

class Dog extends Animal {
  const Dog();
  void woof() {}
}

class Cat extends Animal {
  const Cat();
  void meow() {}
}

void main() {
  final cat = Baz.cat;
  cat.value.meow(); // works
  final baz = Baz.values.byName("cat");
  switch (baz) {
    case Baz.dog:
      print(baz.value.woof()); // error
      break;
    case Baz.cat:
      baz.value.meow(); // error
      print('cat');
      baz.value;
      break;
  }
}

enum Baz<T extends Animal> {
  dog(Dog()),
  cat(Cat());

  const Baz(this.value);
  final T value;
}

Dart can't infer the type in the switch case. Is this a bug?

You could use something that corresponds to this variant in order to proceed:
class Animal {
  const Animal();
}

class Dog extends Animal {
  const Dog();
  void woof() => print('Woof!');
}

class Cat extends Animal {
  const Cat();
  void meow() => print('Meow!');
}

void main() {
  final baz = Baz.values.byName("cat");
  switch (baz) {
    case Baz<Dog>():
      baz.value.woof();
    case Baz<Cat>():
      baz.value.meow();
  }
}

enum Baz<T extends Animal> {
  dog(Dog()),
  cat(Cat());

  const Baz(this.value);
  final T value;
}

In this particular case there is a 1-to-1 correspondence between the subtypes of Animal and the values of Baz, but in the case where this is not true you could perform a case analysis on the values when there is more than one value with the same actual type argument.
@johnniwinther, @stereotype441, would type inference be expected to handle the original example?

We generally do not attempt to infer types based on identical comparisons, other than the null check implicitly in == null.
We could.
Identical checks cannot be fooled, if the two values are identical, then they have the same runtime type, and we can promote either operand to the type of the other (if it's a subtype).
That is, if a check like identical(x1, x2) is true, and the static type of x1 is a subtype of the static type of x2, then we can promote the variable x2 to the type of x1, or symmetrically promote x1.
If the types are unrelated, nothing happens.
The best argument against is that nobody asked for a type check. We don't do general assignment promotion, we only promote to a "type of interest". But that's an assignment, identical is a test, just not a type test, so it's more reasonable that it can promote. Also, if it had to be a type of interest, idential-promotion would likely never trigger, because you wouldn't do a type check before an identical check.
Then, to make this actually work, we'd have to special-case == checks on enums, maybe on other types which has "primitive equality", to be recognized as being equivalent to an identical check.
I'm OK with enums. Less OK with "primitive equality" in general, because that makes having primitive equality even more part of the public contract of a class. Currently that only matters for constants, so if your class doesn't have a const constructor, you don't need to care about having primitive equality or not.
If having primitive equality is enough to let anyone do promotion based on == checks, then it becomes a much more prominent feature, and a breaking change to add a == operator, even if it behaves exactly as before.
So, no to that.
Which means that switch (variable) { case Animal.cat: ... would promote only when variable holds an enum type, since case constant is a == check, not an identical check, and only if we choose to special-case enums (which are required to have primitive equality).
And if you do identical(v, e) manually, then you can get promotion of v to the static type of e.
Which means someone will soon ask for an identical pattern, so they can get promotion in patterns too.
(Let's call it === c :wink: )

You could use something that corresponds to this variant in order to proceed:
class Animal {
  const Animal();
}

class Dog extends Animal {
  const Dog();
  void woof() => print('Woof!');
}

class Cat extends Animal {
  const Cat();
  void meow() => print('Meow!');
}

void main() {
  final baz = Baz.values.byName("cat");
  switch (baz) {
    case Baz<Dog>():
      baz.value.woof();
    case Baz<Cat>():
      baz.value.meow();
  }
}

enum Baz<T extends Animal> {
  dog(Dog()),
  cat(Cat());

  const Baz(this.value);
  final T value;
}

In this particular case there is a 1-to-1 correspondence between the subtypes of Animal and the values of Baz, but in the case where this is not true you could perform a case analysis on the values when there is more than one value with the same actual type argument.
@johnniwinther, @stereotype441, would type inference be expected to handle the original example?

This is nice, and it seems to works. The only issue is that I have to manually write the Generic type, and autofill does not do it by itself


Add logins migration command

The PR is to add new CLI commands "az datamigration login-migration". The same command for Powershell has been published. The new CLI commands has passed local tests.
I am from the service team. I think I am in Microsoft org, but I am not in Azure org somehow. I will see how to join Azure org.
This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[x] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

data migration

@microsoft-github-policy-service agree [company="Microsoft"]

@microsoft-github-policy-service agree company="Microsoft"

Hi @evelyn-ys, it seems that you are the assignee of this PR? This is my first PR to CLI repo. I am working in Azure Data, SqlMigration team. If there is any problem in this PR, please let me know.
Thanks

Hi @yonzhan @evelyn-ys @calvinhzy, may I get a review on this PR? What else do I need to do to get reviews?

Please add test for the new command

Thanks for the comments. I have re-run the local tests with the latest changes. This is one of the test screen shots. It does not allow me to paste any image here. I pasted the commands and results below.
(env) PS C:\repos\azure-cli-extensions> az datamigration login-migration --src-sql-connection-str  "data source=AALAB03-2K8.REDMOND.CORP.MICROSOFT.COM;user id=hijavatestuser1;password=testAdmin123;initial catalog=master;TrustServerCertificate=True" --tgt-sql-connection-str  "data source=canarycentralmi.public.f81a0340269e.database.windows.net,3342;user id=canarycentralmi;password=SqlMiEuapPassw0rd;initial catalog=master;TrustServerCertificate=True" --list-of-login "loginname1" "loginname2"
Running validations...
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Starting logins migration...
Starting server roles migration...
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Starting user-login mappings...
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Starting server role mappings...
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Restoring permissions for logins...
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Restoring permissions for server roles...
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.
Login migration process complete.
If outputFolder parameter is not provided, the default event and error logs folder path: C:\Users\yaly.REDMOND\AppData\Local\Microsoft\SqlLoginMigrations\LoginsMigrationLogs
(env) PS C:\repos\azure-cli-extensions>

Hi @evelyn-ys, any problem or issue you see in this PR? We want to make this command available because the feature is on the way to public review.

Hi @yonzhan @evelyn-ys and @calvinhzy , is there any problem with this PR? If not, could any of you please approve it?


SDK Review Meeting - Tracking Azure Communication Services

This meeting was created by Jorge Garcia Hirota.

It will be used to Track the conversation in the informational Session for the Azure Communication Services Service.

Detailed meeting information and documents provided can be accessed here

Cancelled by: Jorge Garcia Hirota


Dialogs not triggered on collapsed ActionGroup items

🐛 Bug Report

ActionGroup items which have a DialogTigger work fine when the action group is not collapsed. However, when it collapses to the point where the text disappears, the dialog trigger stops working and the dialog will not display when the button is clicked.
🤔 Expected Behavior

Dialog should trigger regardless of uncollapsed or collapsed (text) button.
😯 Current Behavior

When the action group button text is collapsed, the items with dialog triggers stop working.
💁 Possible Solution

🔦 Context

ActionBar uses ActionGroup, so the collapsed icons will not trigger a dialog when pressed.
💻 Code Sample

https://codesandbox.io/s/nice-meadow-0ry2rk?file=/src/App.js
🌍 Your Environment

Software
Version(s)

react-spectrum
3.22

Browser
Chrome 107.0.5304.87

Operating System
macOS 10.15.7

🧢 Your Company/Team

Adobe/Quarry
🕷 Tracking Issue (optional)

I'm not sure what we could do about this; we don't know which it should be, DialogTrigger or DialogContainer. I think if it can collapse, then the best thing to do is listen for the onPress and use a DialogContainer all the time.
Hopefully that's enough to unstick you for the moment as we talk through more of it

Action items for this issue:

add an example of using DialogContainer to ActionGroup/ActionBar docs

I thought of another workaround for this. You can use the FocusableProvider to block the unwanted props that are coming through context and being wrongfully applied to the buttons in the dialog
https://codesandbox.io/s/fancy-sky-mw50sm?file=/src/App.js


fix: standardize client-side vscode debugging (783)

There are no current .vscode files checked into the repo to aid in debugging client-side code. It would be helpful to have these in order to better standardize debugging procedures, at least for those running VSCode.
This is a simple first pass. To use it:

Open usdr-gost.code-workspace
Go to the "Run and Debug" menu
Select "Debug in Chrome (Client)". Under the hood this will run a dev server, and open a debug copy of Chrome.
Set breakpoints in client-side code, see that they're hit!

References:

Debugging in VSCode
microsoft/vscode-recipes

Ticket
#783
Description
See above.
Screenshots / Demo Video

Testing

Open usdr-gost.code-workspace
Go to the "Run and Debug" menu
Select "Debug in Chrome (Client)". Under the hood this will run a dev server, and open a debug copy of Chrome.
Set breakpoints in client-side code, see that they're hit!

Checklist

[x] Provided ticket and description
[x] Your PR title contains the ISSUE ticket number e.g "86: ..."
[x] Provided screenshots/demo
[x] Provided testing information
[x] Provided adequate test coverage for all new code
[x] Run automated tests (docker compose exec app yarn test)
[x] Added PR reviewers
[ ] Ensure at least 1 review before merging

Thanks @ajhyndman ! I will have a followup patch to this as well for enabling test debugging, but I can make a separate issue for this. I'm walking through this tomorrow with Chris as well and he will be writing up some docs around this. This is step 1/3, that is to say! But will hopefully already improve the experience.


https url tag.

Feature Request
Hi! Thank you as always.
If we have https only URL tag, it is really useful for me

HTTPS only URL is not registered in the JSON schema's string format type. Therefore, it is not possible to support by typia as formal type. Instead, those chapters would be helpful. You can make your own validation (or JSON schema plugin type) easily like below:

https://typia.io/docs/validators/tags/#customization
https://typia.io/docs/json/schema/#customization

Oh ok so combine with regret is really good option for this thanks!!


[HUDI-6184] Improve the test on incremental queries

Change Logs
The test TestIncrementalReadWithFullTableScan#testFailEarlyForIncrViewQueryForNonExistingFiles can fail due to changes in archival behavior because of hard-coded parameters.  This PR improves the test to be more robust.
Impact
As above.
Risk level
none
Documentation Update
N/A
Contributor's checklist

[ ] Read through contributor's guide
[ ] Change Logs and Impact were stated clearly
[ ] Adequate tests were added if applicable
[ ] CI passed

@hudi-bot run azure

The CI failure is due to other failed tests.  Merging this PR.


Terminal printing lots of "Operation not permitted" errors regarding certain directories.

Describe Your Issue
Terminal Prints:

warning: could not open directory 'Library/[Insert Directories]': Operation not permitted

See it in action:
Have you tried to debug or fix it?
Reinstalled ZSH, Oh-My-ZSH, and PowerLevel9k multiple times. Not sure of what caused the error, I'm relatively new to all of this.
Environment Information
OS: macOS 10.14.2 (18C54)
System: MacBook Pro (Retina, 13-inch, Early 2015)
ZSH Version: zsh 5.6.2 (x86_64-apple-darwin18.2.0)
ZSH Framework: Oh-My-ZSH
Installation Method: Repo
P9K Version: Release v0.6.6 (Not sure, probably latest)
Terminal Emulator: iTerm2

Tried and put Library in the .gitignore. fixed the issue but now terminal load time is ungodly slow. I have some debugging work to do.

@88maomao Well. Maybe. I would ask why there is a file/folder you don't have access to in your repo.
@Nobody912 You could have a look at our measurings we did. Basically, you could check the commands that are executed in the vcs segment, and see if they are slow itself.
A shot in the dark: Probably that is related to a lot of untracked files (that's what I would guess if my Home-dir would be a repo).
In general, having large repos is usually a bad idea, because there is a lot of overhead (git tracking files, P9K trying to extract the status from git, etc.).

@dritter And I would answer: during testing anything can happen. In my case it was 'docker run -i -t --rm -v $(pwd)/db:/var/lib/posgresql/data postgresql' inside projects folder.
Btw. about slow performance on a large repo https://github.com/robbyrussell/oh-my-zsh/issues/3009#issuecomment-420763151. Having such a latch improves karma.

@88maomao Good answer! I just merged your PR!