How to use FilePicker and FolderPicker in WinUI 3 and other desktop-based apps

In desktop-based apps (like WinUI 3 desktop or WPF MSIX), The FileOpenPicker, FileSavePicker, and FolderPicker APIs require a HWND associated with them, so that they know which window to display over. That means, unlike UWP, you must add a couple extra lines of code before using the file and folder pickers.
Normally, the following works in UWP...
UWP
var filePicker = new FileOpenPicker();
filePicker.FileTypeFilter.Add("*");
var file = await filePicker.PickSingleFileAsync();

However, for desktop apps, you'll have to add two lines to obtain your current HWND, and set the HWND on the picker...
Desktop-based app
var filePicker = new FileOpenPicker();

// Get the current window's HWND by passing in the Window object
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);

// Associate the HWND with the file picker
WinRT.Interop.InitializeWithWindow.Initialize(filePicker, hwnd);

// Use file picker like normal!
filePicker.FileTypeFilter.Add("*");
var file = await filePicker.PickSingleFileAsync();

What about FileSavePicker and FolderPicker?
Same thing! Add those two lines.
More info on obtaining the HWND
One key thing to note about GetWindowHandle(this), is that the this object you're passing must be a Window (either a WinUI 3 Window, a WPF Window, or a WinForms Window). If you're calling this code from your Window code-behind, this will often work. If you're calling this code from another file, you're going to have to pass a reference of the window.
Here's an example of a complete MainWindow using FileOpenPicker...
public sealed partial class MainWindow : Window
{
    public MainWindow()
    {
        this.InitializeComponent();
    }

    private async void myButton_Click(object sender, RoutedEventArgs e)
    {
        // Create the file picker
        var filePicker = new FileOpenPicker();

        // Get the current window's HWND by passing in the Window object
        var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);

        // Associate the HWND with the file picker
        WinRT.Interop.InitializeWithWindow.Initialize(filePicker, hwnd);

        // Use file picker like normal!
        filePicker.FileTypeFilter.Add("*");
        var file = await filePicker.PickSingleFileAsync();
    }
}

More info on interop
To learn more about these interop APIs, see https://docs.microsoft.com/windows/apps/desktop/modernize/winrt-com-interop-csharp

Can you provide simple example how do you provide reference to window from page object ? Usually an app consists of one main window and multiple pages where main window it's just a container without any logic, everything happens in pages so we need to know how to use it from page level.

@KWodarczyk in most cases, for apps that only have one window, you can create a public static reference in App.xaml.cs to your main window
App.xaml.cs
public static Window Window => m_window;

And then from other files, call it like...
GetWindowHandle(App.Window);

Just in case.
Add a FileTypeFilter when using the FolderPicker.
It works without the FileTypeFilter on a Windows 11, but you (might?) get a COMException on Windows 10.
FolderPicker folderPicker = new();
folderPicker.FileTypeFilter.Add("*");

IntPtr hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd);

StorageFolder folder = await folderPicker.PickSingleFolderAsync();

Damn, this is a leaky abstraction. It's made even worse given that generally you would invoke this from a view model which has no concept as to the window it's owned by.

Just in case. Add a FileTypeFilter when using the FolderPicker. It works without the FileTypeFilter on a Windows 11, but you (might?) get a COMException on Windows 10.
FolderPicker folderPicker = new();
folderPicker.FileTypeFilter.Add("*");

IntPtr hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd);

StorageFolder folder = await folderPicker.PickSingleFolderAsync();

Yes, there probably is, since the picker does not open on Windows 10. But
folderPicker.FileTypeFilter.Add("*");
does the trick.

Tried with Windows 11 and it doesn't work anymore. WASDK 1.1 preview 3

Hi @rayveenemadotmacdotcom! I couldn't reproduce your problem on both Win10 and Win11. All I did was just create a WinUI3 app and use the sample button to open the FileSavePicker and replace App.m_window with this which is the MainWindow.
Maybe you should check if you are getting a valid hwnd.
    private async void myButton_Click(object sender, RoutedEventArgs e)
    {
        FileSavePicker picker = new();
        picker.SuggestedStartLocation = PickerLocationId.Downloads;
        picker.FileTypeChoices.Add("Csv", new List<string>() { ".csv" });
        picker.FileTypeChoices.Add("Plain Text", new List<string>() { ".txt" });
        picker.SuggestedFileName = "Activity Codes";
        picker.SettingsIdentifier = "settingsIdentifier";
        picker.DefaultFileExtension = ".csv";

        var hwnd = WindowNative.GetWindowHandle(this);  // App.m_window?
        InitializeWithWindow.Initialize(picker, hwnd);

        StorageFile file = await picker.PickSaveFileAsync();

        myButton.Content = $"{file?.DisplayName}";
    }

Andrew it works on a Windows, but when you use Pages it doesn’t. I use the navigation view.
The window handle works as I can execute the FileOpenPicker, as in the example code showed. So I know from my page I can execute with a valid window handle.
Give it a try from a page from Navigation view and see if it works.

On May 12, 2022, at 10:10 PM, Andrew KeepCoding @.***> wrote:

Hi @rayveenemadotmacdotcom! I couldn't reproduce your problem on both Win10 and Win11. All I did was just create a WinUI3 app and use the sample button to open the FileSavePicker and replace App.m_window with this which is the MainWindow.
Maybe you should check if you are getting a valid hwnd.
private async void myButton_Click(object sender, RoutedEventArgs e)
{
    FileSavePicker picker = new();
    picker.SuggestedStartLocation = PickerLocationId.Downloads;
    picker.FileTypeChoices.Add("Csv", new List<string>() { ".csv" });
    picker.FileTypeChoices.Add("Plain Text", new List<string>() { ".txt" });
    picker.SuggestedFileName = "Activity Codes";
    picker.SettingsIdentifier = "settingsIdentifier";
    picker.DefaultFileExtension = ".csv";

    var hwnd = WindowNative.GetWindowHandle(this);  // App.m_window?
    InitializeWithWindow.Initialize(picker, hwnd);

    StorageFile file = await picker.PickSaveFileAsync();

    myButton.Content = $"{file?.DisplayName}";
}

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.

@rayveenemadotmacdotcom I tried it on a page inside MainWindow, a page inside a NavigationView (created with Template Studio) on both Win10 and Win11 and works. I should've ask you this first,  but, which code exactly is giving you the exception? the PickSaveFileAsync() ? Can you reproduce this with the minimum code? 🤔

So I have created a new NavigationView app using Template Studio for VS Professional 2022 and the FileSavePicker works using the GetWindowHandle.
This means that my WinUI 3 app that I generated not using Template Studio must have a setting or some discrepancy causing FileSavePicker to not work in the NavigationView solution.
I will dig into my original app and see if I can find the culprit knowing that the FileSavePicker should work.
I’ll post my findings.

On May 13, 2022, at 1:19 AM, Andrew KeepCoding @.***> wrote:
@rayveenemadotmacdotcom https://github.com/rayveenemadotmacdotcom I tried it on a page inside MainWindow, a page inside a NavigationView (created with Template Studio) on both Win10 and Win11 and works. I should've ask you this first, but, which code exactly is giving you the exception? the PickSaveFileAsync() ? Can you reproduce this with the minimum code? 🤔
—
Reply to this email directly, view it on GitHub https://github.com/microsoft/WindowsAppSDK/issues/1188#issuecomment-1125666302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWPTXXLJBPEADQZWKSKGNI3VJXQ6BANCNFSM5BWB2JAQ.
You are receiving this because you were mentioned.

@andrewleader thank you for the example. However when I click the button rapidly multiple folder picker launches. I am unable to make it so that it only launches once. What I want to achieve is the effect that we normally see, the picker window blinks when we try to launch another picker window. If you have any possible work around. Thank you for all your help.

Just in case. Add a FileTypeFilter when using the FolderPicker. It works without the FileTypeFilter on a Windows 11, but you (might?) get a COMException on Windows 10.
FolderPicker folderPicker = new();
folderPicker.FileTypeFilter.Add("*");

IntPtr hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd);

StorageFolder folder = await folderPicker.PickSingleFolderAsync();

I still got COM exception on windows 11.

Just in case. Add a FileTypeFilter when using the FolderPicker. It works without the FileTypeFilter on a Windows 11, but you (might?) get a COMException on Windows 10.
FolderPicker folderPicker = new();
folderPicker.FileTypeFilter.Add("*");

IntPtr hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd);

StorageFolder folder = await folderPicker.PickSingleFolderAsync();

I still got COM exception on windows 11.

This is how you should do it
'''cs
var FolderPicker = new FolderPicker
{
ViewMode = PickerViewMode.Thumbnail,
SuggestedStartLocation = PickerLocationId.DocumentsLibrary
};
var hwnd = App.MainWindow.GetWindowHandle();
WinRT.Interop.InitializeWithWindow.Initialize(FolderPicker, hwnd);
var folder = await FolderPicker.PickSingleFolderAsync();
'''

File picker is even easier since there is already a method that handle that part for you
string fileExtension = ".txt";
var FilePicker = App.MainWindow.CreateOpenFilePicker();
FilePicker.ViewMode = PickerViewMode.Thumbnail;
FilePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
FilePicker.FileTypeFilter.Add(fileExtension);

I'm using the function you mentioned in provided by WinUIEx, but it still give me error:

I'm using Windows 11 22000.795, .NET 6 with WinUI3 and build unpacked application.

@derekhe would you mind sharing more information about your project?
Using Visual Studio 202022 17.3, WinAppSdk 1.1.3 and WinUiEx 1.7.0 on Windows 11 22000.856 in unpacked project I don't have this issue using the same exact code as you showed.

@TRadigk bro, are you running as administrator?

yes, my user is administrator.

comexception.zip
Here is my sample project. I find it is caused by running it as administrator. As a normal user it is fine.
I'm using windows 11 22000.856.

My information vs 2022:
Microsoft Visual Studio Community 2022
Version 17.2.6
VisualStudio.17.Release/17.2.6+32630.192
Microsoft .NET Framework
Version 4.8.04161

Installed Version: Community

Visual C++ 2022   00482-90000-00000-AA897
Microsoft Visual C++ 2022

ASP.NET and Web Tools 2019   17.2.393.26812
ASP.NET and Web Tools 2019

Azure App Service Tools v3.0.0   17.2.393.26812
Azure App Service Tools v3.0.0

C# Tools   4.2.0-4.22281.5+8d3180e5f00d42f0f0295165f756f368f0cbfa44
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

IncrediBuild Build Acceleration   <IP_ADDRESS>
IncrediBuild effectively reduces compilation and development times by up to 90%.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager   6.2.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   <IP_ADDRESS>8101+885a343b00bcab620a90c1550c37dafd730ce984
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.0.62204.01010
Microsoft SQL Server Data Tools

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools   17.0.10418.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.2.0-4.22281.5+8d3180e5f00d42f0f0295165f756f368f0cbfa44
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.1.0-beta.22329.1+702b8e77f5fbfe21e6743324c1750503e02f182d
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

Since this issue is closed, I think it is worth re-opening it and point towards elevated support. I am able to repro the mentioned issue, but as far as I remember WinAppSdk had in the past, and I think still has trouble with elevated privileges.
Maybe this topic is addressed in upcoming Community Call (August 17th)?

@TRadigk this is already opened by me some time ago: https://github.com/microsoft/WindowsAppSDK/issues/2504

I have seen several posts on how to use fileOpenPicker in WinUI3 but for me, the app does not even deploy successfully unless I remove the Declaration.
I always get the error:
DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(38,10): error 0x80070032: Cannot register the 82D57A91-4788-4329-A27B-168BB25CAFFC_<IP_ADDRESS>_x64__84fc1bza3khrr package because the following error was encountered while registering the windows.fileOpenPicker extension: The request is not supported.
Same thing happens with fileSavePicker.
But the app run fine without both declarations.
The manifest file contains this:

Apparently, fileOpenPicker and fileSavePicker are only compatible with "uap"

It can work successfully in this way:
var picker = new FileOpenPicker();
Console.log(picker.ToString());
Console.log(hwnd.ToString());
WinRT.Interop.InitializeWithWindow.Initialize(picker, hwnd);
picker.FileTypeFilter.Add(".jpg");
picker.FileTypeFilter.Add(".jpeg");
picker.FileTypeFilter.Add(".png");
var file = await picker.PickSingleFileAsync();

How to make it work win Page. Why MS so f.. this up. :( im so angry about this. Golden OpenFileDialog.. :(

How to make it work win Page. Why MS so f.. this up. :( im so angry about this. Golden OpenFileDialog.. :(

Your statement is not clear please.

What about Windows.Storage?

My solution is:
Window w = new(); var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(w); WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); openPicker.SuggestedStartLocation = PickerLocationId.Desktop; openPicker.FileTypeFilter.Add("*"); StorageFolder folder = await openPicker.PickSingleFolderAsync(); w.Close();

I have tried pretty much every solution suggested here and still get the System.Runtime.InteropServices.COMException on Windows 11 (222H2, 22621.2861 )

I have tried pretty much every solution suggested here and still get the System.Runtime.InteropServices.COMException on Windows 11 (222H2, 22621.2861 )

why don't you try the one showed on the WinUI 3 Gallery app?
<StackPanel VerticalAlignment="Top" Orientation="Horizontal">
    <Button x:Name="PickAFileButton" Content="Open a file"
            Click="PickAFileButton_Click" Margin="0,0,0,10"/>
    <TextBlock x:Name="PickAFileOutputTextBlock" TextWrapping="Wrap" Padding="20,5,0,0"/>
</StackPanel>

private async void PickAFileButton_Click(object sender, RoutedEventArgs e)
{
    // Clear previous returned file name, if it exists, between iterations of this scenario
    OutputTextBlock.Text = "";

    // Create a file picker
    var openPicker = new Windows.Storage.Pickers.FileOpenPicker();

    // Retrieve the window handle (HWND) of the current WinUI 3 window.
    var window = WindowHelper.GetWindowForElement(this);
    var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window);

    // Initialize the file picker with the window handle (HWND).
    WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd);

    // Set options for your file picker
    openPicker.ViewMode = PickerViewMode.Thumbnail;
    openPicker.FileTypeFilter.Add("*");

    // Open the picker for the user to pick a file
    var file = await openPicker.PickSingleFileAsync();
    if (file != null)
    {
        PickAFileOutputTextBlock.Text = "Picked file: " + file.Name;
    }
    else
    {
        PickAFileOutputTextBlock.Text = "Operation cancelled.";
}

@Guillermo-Santos Thank you for the tip.
I copied your code to the barebone test app and copied WindowHelper.
Unfortunately, WindowHelper.GetWindowForElement(this) returns null.

@Guillermo-Santos I realized the cause of the null problem. I changed the code to use WindowHelper.CreateWindow(). Now, WindowHelper.GetWindowForElement(this) returns non-null window. Unfortunately,  var fileTest = await openPicker.PickSingleFileAsync() still throws System.Runtime.InteropServices.COMException.

@Guillermo-Santos I realized the cause of the null problem. I changed the code to use WindowHelper.CreateWindow(). Now, WindowHelper.GetWindowForElement(this) returns non-null window. Unfortunately,  var fileTest = await openPicker.PickSingleFileAsync() still throws System.Runtime.InteropServices.COMException.

I have not tested this code (xd), but i'll try and see if i have the same result. The only thing i could think that may bring this error is the target of the project (do not really know).

Using your modification throws with 'Access violation' to me, i think you can get rip of the WindowHelper class an intead use var window = App.MainWindow; that one worked for me.

Using your modification throws with 'Access violation' to me, i think you can get rip of the WindowHelper class an intead use var window = App.MainWindow; that one worked for me.

I realized that key is Window vs Page. Here is my code in App.cs:
    public static Window? MainWindow { get; private set; }

    protected override void OnLaunched(LaunchActivatedEventArgs args)
    {
        MainWindow = WindowHelper.CreateWindow();

        // Do not repeat app initialization when the Window already has content,
        // just ensure that the window is active
        if (MainWindow.Content is not Frame rootFrame)
        {
            // Create a Frame to act as the navigation context and navigate to the first page
            rootFrame = new Frame();

            // Place the frame in the current Window
            MainWindow.Content = rootFrame;

            rootFrame.NavigationFailed += OnNavigationFailed;
        }

        if (rootFrame.Content == null)
        {
            // When the navigation stack isn't restored navigate to the first page,
            // configuring the new page by passing required information as a navigation
            // parameter
            rootFrame.Navigate(typeof(MainPage), args.Arguments);
        }

        // Ensure the current window is active
        MainWindow.Activate();
    }

MainPage inherits Page, not Window.

This is mine:
        public static Window MainWindow { get; private set; }
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Invoked when the application is launched.
        /// </summary>
        /// <param name="args">Details about the launch request and process.</param>
        protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
        {
            MainWindow = new MainWindow();
            MainWindow.Activate();
        }

As I say, you do not really need the WindowHelper. there should be a MainWindow.xaml in your project, right? or are we using different templates?

This is mine:
As I say, you do not really need the WindowHelper. there should be a MainWindow.xaml in your project, right? or are we using different templates?

I use a different template:
public sealed partial class MainPage : Page
{
    public MainPage()
    {
        this.InitializeComponent();
    }
}

Does this not work for an app that's running elevated? I keep getting a COMException with the error code 0x80004005 despite trying all of the solutions suggested in this thread. The code in my App.xaml.cs is the same as that posted by zipswich.

¿Esto no funciona para una aplicación que se ejecuta con privilegios elevados? Sigo recibiendo una COMException con el código de error 0x80004005 a pesar de probar todas las soluciones sugeridas en este hilo. El código en mi App.xaml.cs es el mismo que el publicado por zipswich

I think you should run your Visual Studio with administrator privileges, that helps your generated app inherit those privileges... If I'm not mistaken, if you set up your project correctly so that you have unlocked unlocked unsafe code executions, it shouldn't give you any problems


Prevent manual pull on apps with CI/CD enabled

Currently, in apps connected with CI/CD. A developer can still manually pull the changes from a remote branch. A customer would like to prevent this manual pull when CI/CD is involved as its sometimes error-prone.

Requested in this Slack thread.


Set to use same version as peerDependency as we have anyways

Fixes #290

react-native-picker-select was dependent on an older version of react-native-picker and therefore two different versions of React were shipped. This caused a crash when opening a screen with the picker on Android. I have fixed it by specifying a different version to use in package-lock.


Create a "controls demo" as one further example

We should have one example that acts as our "controls demo".
It should cover all widgets supported by Tabris.js.
It should show one widget per page.
Show multiple variations per page where it makes sense (different colors, layouts, ...).
Keep it simple! It should only act as a visual index to our widgets.
Maybe reuse the snippets here?

Would be useful. I like this kind of demo: http://getbootstrap.com/components/
It has the documentation combined with the components

I do not think we should mix documentation and visual index in that example.
Had in mind something like this: https://www.polymer-project.org/components/paper-elements/demo.html

We have the snippets that are reasonably well maintained and serve a similar purpose. Closing this for now.


Support for other JSON libraries

It seems that it is currently only possible to pass JSON in and get JSON out as Jackson JsonNode. It would be nice if it was possible to use JSON representations from other libraries as well, such as Gson's JsonElement.

This could be accomplished by a shim that gets the String from one form and parses into the other... not sure if this should be done in this library of as an external wrapper using something like this:
import com.fasterxml.jackson.databind.JsonNode;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
static ObjectMapper _objectMapper = new ObjectMapper();
public static class GSONConverter {
static public JsonElement toGSON(JsonNode node) throws Exception {
return JsonParser.parseString(_objectMapper.writeValueAsString(node));
}
}


Paging

Not tried your fine tool, but looking at the code, it looks like for a library/section you access the /all endpoint
I strongly recommend, that you use paging!
X-Plex-Container-Start and X-Plex-Container-Size

@ukdtom I will look into it! Yesterday was my first day playing around with the Plex APIs so I'm not super familiar yet.
For reference though, the all endpoint returns in under a second for me though, and I have 680 movies and 562 tv shows on there.

Well, for a large library, you would lock the database until it finished, which is bad, and could lead to a potential PMS crash

Makes sense. I can look into this tonight.

Use like:
VARSTART=0

Loop
https://PMS:32400/library/sections/1/all?X-Plex-Container-Start=VARSTART&X-Plex-Container-Size=50
Do stuff
VARSTART +=50
goto Loop


don't error out on missing template

old constraint: each plugin template must be present for all k8s versions
this is not very convenient if a new plugin is introduced only for new
versions, changed from error to warning
https://github.com/rancher/kontainer-driver-metadata/pull/76

LGTM

added for https://github.com/rancher/rke/issues/1050


Error using typescript

app.get("/manifest.webmanifest", async (_req, res) => {
   res.send(await getManifest(pwaOptions));
});

is failing after a recent upgrade:
Promise returned in function argument where a void return was expected.

The callback function should expect Promise<T> |  T instead of T

Hi @Mister-Hope thank you for the report! We do not actually maintain the TypeScript definitions directly, like many npm modules. The definitions are part of the following project, which you can file an issue or open a PR: https://github.com/DefinitelyTyped/DefinitelyTyped


Pass RenderLayers to VelloCanvas

This is the fix I talked about in #70 and the PR that would be merged (the other should be closed)
This PR adds a config option to VelloPlugin and VelloRenderPlugin that can control the RenderLayers that the VelloCanvas is on. This allows fully taking advantage of RenderLayers as before the canvas was rendering on the default layer, layer 0, which meant any camera that wanted to render it also had to render everything else on the default layer, layer 0.

swapped to VelloRenderSettings Resource for configuration 👍🏼

Thank you for that! I have a slightly different vision where the settings are not an optional resource. I'll apply that directly to your branch. :)

sounds good, feel free to take it away.

@simbleau heads up that the way the Resource is inserted in the new changes here forces consumers to insert the resource after the plugin, or it will silently throw the user's Resource away and use the defaults instead.


Build for Musl-based Linux distros

Hi,
Docker Desktop ships with a LinuxKit-based minimal distro for running containers (based on Alpine Linux). We want to start digging on how to make GPU access just work for Docker Desktop with WSL 2 users but as the whole nvidia container toolkit is built for glibc, that makes things a little more complicated than we thought.
Golang based source code is easy enough to build for musl, but this C based library is a bit more complicated... Are you interested in supporting Musl?

Duplicate of https://github.com/NVIDIA/libnvidia-container/issues/21


Add data on Health Facilities

As discussed in https://github.com/Code4Nepal/nepalmap_app/issues/149 this pr adds that data.
Let me know what you think, I ended up abbreviating some of the facility types in health.py due to some overlap issues on displaying the bar chart.

@Bezzy1999
Thank you very much. This is very nice work and will be a great addition to the data.
Before merging, I would like to do a couple of sanity checks by comparing some data on the original data source with the numbers that you have collected.

@cliftonmcintosh I have updated the sql with these changes. I'm still concerned that we may be consolidating locations but the data does look more reasonable now,
I'll add the updated script as a new pr in maptools once you're happy.
Let me know what you think.

@Bezzy1999
Thank you for the update. Looking through it, it does seem that the figures are more likely than some of the ones before. I don't really know how to assess whether we might be off or by how much. I am comfortable with the strategy of enforcing uniqueness, and I am comfortable with the data.


Add some sort of method to verify the contents of the INDEX file

It would be nice to get some CI going on this, so that when people submit pull requests, they don't accidentally clobber the file.
For instance, it might check to ensure there are the proper number of newlines, that the urls do not 404/302, that the right content exists for a given change etc.
Not sure how the testing would work in practice, but just an idea I thought I'd throw out there.

Sounds good to me. The process of submitting a PR is currently manual, but I am going to release submit a plugin that will take care of everything automatically, leaving me and other collaborators only responsible of merging.
I like this idea anyway and I will add it to a future milestone.

@josegonzalez i've done some form of CI for the index. The checker is here.
Example of a build success is here.
Perhaps we should close this issue and move the discussion to #7.

Closing in favor of #7.


Performance regression after updating to 2.5.0

Bug description
I'm building a demo web app using goakt. It spawns over 600 vehicle actors during its runtime.
With goakt version 2.4.0, I can get over 35k rps when running load test for the request to get the vehicle position. The memory usage is over 17GB.
> hey -c 100 "http://localhost:8080/vehicle?id=0012.02247" -z 30s
Summary:
  Success rate:	1.0000
  Total:	30.0036 secs
  Slowest:	0.4775 secs
  Fastest:	0.0000 secs
  Average:	0.0028 secs
  Requests/sec:	35629.9656

After updating to version 2.5.0, the number of rps dropped to only 3.5k. The memory usage is only <40MB (which is superb).
> hey -c 50 "http://localhost:8080/vehicle?id=0018.00222" -z 30s
Summary:
  Success rate:	1.0000
  Total:	30.0029 secs
  Slowest:	0.3449 secs
  Fastest:	0.0001 secs
  Average:	0.0139 secs
  Requests/sec:	3588.8494

How to reproduce it?

Clone my repo https://github.com/sdil/goakt-realtimemap
Run the server with go run . on first terminal
Run load test on /vehicle?id=<actor name> endpoint. I'm using https://github.com/rakyll/hey so the full command looks like this: hey -c 50 "http://localhost:8080/vehicle?id=<actor name>" -z 30s. You can get the actor name from the log in the terminal
Observe the throughput.

Change the goakt version to 2.4.0 and repeat the same process.
Expected behavior
The performance to remain around the same.
Screenshots
N/A
Library Version:

Go-Akt version: 2.5.0
Go version: go1.22.5 darwin/arm64

Additional context
When running with 1 actor, the performance is kinda similar. But when I spawn 10 actors, it started degrading significantly.

@sdil Thanks for the bug. I will take a look in the course of the week.

@sdil Do I need additional tools before running your sample?

@Tochemey I've updated the step on how reproduce the bug

@Tochemey I've updated the step on how reproduce the bug

When I run go run . as stated I got the following log. Is it something that is expected?

Yes that is expected. The program listen mqtt messages, creates actor and update its state based on the messages

@sdil I have been able to reproduce it. I will take a look at what may be the issue in the weekend. Thanks

@sdil I have added some small test to check actors message handling throughput as shown here:
=== RUN   TestBenchmark_Bench
starting benchmark for (20s): num workers:(50)
workers: 50, messages sent: 61522113, messages received: 61522113 - duration: 20s
messages per second: 3076105
--- PASS: TestBenchmark_Bench (42.65s)
PASS

The test can be found here https://github.com/Tochemey/goakt/blob/issue-perf/bench/benchmark_test.go#L165

I will enhance this benchmark test with additional test cases.

Ahh the Tell operation is fantastic. I didn't realize that Ask is 1/10 of the throughput of Tell. That's a really great benchmark test.
Just curious, what is your machine spec?

Ahh the Tell operation is fantastic. I didn't realize that Ask is 1/10 of the throughput of Tell. That's a really great benchmark test.
Just curious, what is your machine spec?

13-inch M1 2020, 16GB mem, macOS

@sdil Apologies for the delay in figuring out what may be causing the performance drop. I welcome any idea to enhance performance and the library in general.

Did you consider MPSC queue as suggested by @halturin? It seems like the same queue implemented in Akka
Ref: https://concurrencyfreaks.blogspot.com/2014/04/multi-producer-single-consumer-queue.html

Did you consider MPSC queue as suggested by @halturin? It seems like the same queue implemented in Akka
Ref: https://concurrencyfreaks.blogspot.com/2014/04/multi-producer-single-consumer-queue.html

Thanks. I am going to give it a try :)

@sdil using the mpsc queue seems increase some throughput:
=== RUN   TestBenchmark_BenchTell
starting benchmark for (30s): num workers:(50)
total actors spawned: (2000)
total workers: (50), total messages sent: (105993035), total messages received: (105993035) - duration: (30s)
messages per second: (3533101)
--- PASS: TestBenchmark_BenchTell (52.73s)
PASS

@Tochemey in ergo, mpsc gives me 6M msg/sec between two local actors https://github.com/ergo-services/benchmarks

@Tochemey in ergo, mpsc gives me 6M msg/sec between two local actors https://github.com/ergo-services/benchmarks (this perf depends on the HW for sure)

my benchmarks are only for sending messages to an actor not even actor to actor :). Pretty sure something is wrong in my implementation.

@Tochemey i believe you can reach the same numbers easily

@Tochemey i believe you can reach the same numbers easily

I hope so :)

Also let me take a look at ergo, maybe I may abandon Go-Akt and redirect people to ergo as long as it does not require licensing :) because that is the goal of Go-Akt

see v300 then :) its about to release. preparing the docs now. planned for coming September.
https://github.com/ergo-services/examples/tree/v300 - examples. see "demo" there (it has "observer" app embedded, open http://localhost:9911 to see the node/network/processes etc)

@halturin I appreciate the support to help my library to be better. I really do. I will be glad to contribute to ergo. I have few questions to ask:

Does ergo support actor redeployment in case network partition or cluster topology changes?
How does clustering work?
What are the current cluster provider engine integration?(k8, NATS, etc...)

What are the current cluster provider engine integration?(k8, NATS, etc...)

its in the roadmap now.
didnt get the first two.

maybe I may abandon Go-Akt and redirect people to ergo as long as it does not require licensing :) because that is the goal of Go-Akt.

please, don't. we might have different vision of "where to go/how to do".

Personally, I liked go-akt syntaxes because it feels closer to MS Orleans. I really liked that I can do scheduling, passivation, etc. I was abit struggled with proto messaging, but that's because I never used it. Now I understand the type checking it provides.
Ergo looks nice too but I haven't give it a try yet. Ergo looks closer to Erlang & OTP but I struggled with Elixir in the past because of its syntax and paradigm.

@sdil I am trying to see if I can the performance match ergo :)

@sdil I have released 2.5.1 to include the mspc queue and few fixes. At the moment, Go-Akt is not yet close to ergo. Let us leave the issue open while I dig more in some the implementation and see where we can gain some more performance.

I noticed you used generics for your mpsc implementation. I believe, I tried this way and moved back to the 'any" type due to performance issues. But, honestly I had no enough time to dig into it.

Thank you for the release @Tochemey great work! I'm pretty sure we can find some other optimizations in the future 😀

Please let us leave the issue open.

I noticed you used generics for your mpsc implementation. I believe, I tried this way and moved back to the 'any" type due to performance issues. But, honestly I had no enough time to dig into it.

Interesting. Let me take your advice and see the outcome. Thanks for pointing out.

@halturin I will be glad to have a chat with you to help fix some of the bottleneck that is hindering performance.

@Tochemey i was following a series of your development in these PRs

https://github.com/Tochemey/goakt/pull/429
https://github.com/Tochemey/goakt/pull/427
https://github.com/Tochemey/goakt/pull/430

I remember i saw a huge performance gain from these PRs. just curious, why are they not merged?

@sdil I closed those PRs because some of the changes have been added into other PRs which has been merged. However, I have not fully tested the new changes I made. :)

@sdil you can reference the latest main commit and see

@sdil I have released a new version https://github.com/Tochemey/goakt/releases/tag/v2.6.0

Ahh i saw that this morning. I'll give it a try later

@Tochemey I'm still seeing bad load test result here
fyaacob@M1622 ~> hey -c 50 "http://localhost:8080/vehicle?id=0022.00945" -z 30s
Summary:
  Success rate:	1.0000
  Total:	30.0016 secs
  Slowest:	1.7371 secs
  Fastest:	0.0005 secs
  Average:	0.4966 secs
  Requests/sec:	100.0948

  Total data:	1.62 MiB
  Size/request:	566 B
  Size/sec:	55.34 KiB

Plus the CPU is taking 900% now.

This is commit for updating the library https://github.com/sdil/goakt-realtimemap/commit/84143d7fd8168497a1753467306362573d6c5a29
Let me know if messed up with anything 🙏

@sdil I will have through your implementation and see what is going on.

@sdil I will have through your implementation and see what is going on.

 I will look into your implementation when I get some spare time.

@sdil at first glance I can see some loop here constantly querying for actors. I don't know what you want to achieve though but this can be an issue.

I'm running the bench test on my machine and getting this
> make bench
cd bench && rm -f bench.txt && go test -run=^# -bench . -benchmem -count=30 -timeout=0 | tee bench.txt
goos: darwin
goarch: arm64
pkg: github.com/tochemey/goakt/v2/bench
cpu: Apple M1 Pro
BenchmarkActor/tell-10              3304     608753 ns/op    3865833 ops/s      312 B/op        6 allocs/op
BenchmarkActor/tell-10              3435     585545 ns/op    3740811 ops/s      301 B/op        6 allocs/op
BenchmarkActor/tell-10              3436     585312 ns/op    4126291 ops/s      308 B/op        6 allocs/op
BenchmarkActor/tell-10              3439     584775 ns/op    4174597 ops/s      301 B/op        6 allocs/op

I think something is wrong with my machine. I restarted my machine and it's still showing the same result

@sdil I will be glad to sync with you if you are free. :). I can send you an invite on linkedin

@Tochemey yup I'm free right now. this is my linkedin https://www.linkedin.com/in/fadhilyaacob/

@Tochemey yup I'm free right now. this is my linkedin https://www.linkedin.com/in/fadhilyaacob/

@sdil send me a message because it seems I need to activate premium feature before sending you a message. This is mine https://github.com/sdil/goakt-realtimemap/blob/main/main.go#L101

that's not a linkedin URL 😛

I can't message you either.

that's not a linkedin URL 😛
Found it from your github profile

Hahaa. sorry bro: https://meet.google.com/xsf-dcyf-fjn?authuser=0&pli=1

@sdil these are the benchmark results on my machine:
cd bench && rm -f bench.txt && go test -run=^# -bench . -benchmem -cpu=16 -count=10 | tee bench.txt
goos: darwin
goarch: arm64
pkg: github.com/tochemey/goakt/v2/bench
cpu: Apple M1
BenchmarkActor/tell-16         	    3314	    606899 ns/op	   3419724 ops/s	     308 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3421	    587953 ns/op	   3464890 ops/s	     303 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3458	    581630 ns/op	   3568473 ops/s	     302 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3454	    582282 ns/op	   3370989 ops/s	     302 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3444	    583975 ns/op	   3359315 ops/s	     312 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3450	    582916 ns/op	   3659670 ops/s	     301 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3457	    581736 ns/op	   3532655 ops/s	     302 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3446	    583620 ns/op	   3503963 ops/s	     302 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3444	    583934 ns/op	   3551735 ops/s	     302 B/op	       6 allocs/op
BenchmarkActor/tell-16         	    3459	    581408 ns/op	   3568124 ops/s	     302 B/op	       6 allocs/op
BenchmarkActor/ask-16          	 1130342	       966.6 ns/op	   1053943 ops/s	     582 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1161424	       967.1 ns/op	   1052861 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1164417	       967.5 ns/op	   1052337 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1125428	       967.2 ns/op	   1053302 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1146259	       976.0 ns/op	   1043344 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1162370	       969.2 ns/op	   1050534 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1158091	       975.4 ns/op	   1043822 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1154194	       981.9 ns/op	   1036775 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1166288	       968.6 ns/op	   1051095 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-16          	 1154174	       981.5 ns/op	   1037217 ops/s	     576 B/op	      10 allocs/op
PASS
ok  	github.com/tochemey/goakt/v2/bench	194.740s

cd bench && rm -f bench.txt && go test -run=^# -bench . -benchmem -cpu=64 -count=10 | tee bench.txt
goos: darwin
goarch: arm64
pkg: github.com/tochemey/goakt/v2/bench
cpu: Apple M1
BenchmarkActor/tell-64         	    3298	    609897 ns/op	   2955308 ops/s	     354 B/op	       6 allocs/op
BenchmarkActor/tell-64         	    3402	    591229 ns/op	   2697057 ops/s	     329 B/op	       6 allocs/op
BenchmarkActor/tell-64         	    3412	    589500 ns/op	   2814118 ops/s	     320 B/op	       6 allocs/op
BenchmarkActor/tell-64         	    3404	    590840 ns/op	   3612948 ops/s	     310 B/op	       6 allocs/op
BenchmarkActor/tell-64         	  191126	     10791 ns/op	   3664785 ops/s	     296 B/op	       6 allocs/op
BenchmarkActor/tell-64         	    3415	    589012 ns/op	   3017118 ops/s	     323 B/op	       6 allocs/op
BenchmarkActor/tell-64         	    3357	    599198 ns/op	   2940115 ops/s	     310 B/op	       6 allocs/op
BenchmarkActor/tell-64         	    3432	    586095 ns/op	   2924168 ops/s	     322 B/op	       6 allocs/op
BenchmarkActor/tell-64         	  190279	     10906 ns/op	   2930726 ops/s	     296 B/op	       6 allocs/op
BenchmarkActor/tell-64         	    3414	    589249 ns/op	   3017012 ops/s	     336 B/op	       6 allocs/op
BenchmarkActor/ask-64          	 1076030	      1024 ns/op	    994416 ops/s	     581 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1098844	      1011 ns/op	   1007668 ops/s	     577 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1179016	      1008 ns/op	   1008829 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1108654	      1015 ns/op	   1002926 ops/s	     577 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1114039	      1027 ns/op	    991018 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1109829	      1003 ns/op	   1015062 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1105442	      1011 ns/op	   1007678 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1130664	      1011 ns/op	   1006370 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1105929	      1016 ns/op	   1002137 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-64          	 1103197	      1012 ns/op	   1006636 ops/s	     576 B/op	      10 allocs/op
PASS
ok  	github.com/tochemey/goakt/v2/bench	199.049s

cd bench && rm -f bench.txt && go test -run=^# -bench . -benchmem -cpu=10 -count=10 | tee bench.txt                                                                    took  3m 20s at  06:18:32 pm
goos: darwin
goarch: arm64
pkg: github.com/tochemey/goakt/v2/bench
cpu: Apple M1
BenchmarkActor/tell-10         	  185508	     11084 ns/op	   4026571 ops/s	     296 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3444	    583985 ns/op	   3550365 ops/s	     301 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3445	    583769 ns/op	   3601989 ops/s	     301 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3454	    582288 ns/op	   3627675 ops/s	     301 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3450	    582920 ns/op	   3549536 ops/s	     302 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3462	    580915 ns/op	   3526956 ops/s	     301 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3448	    583290 ns/op	   3574290 ops/s	     306 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3458	    581576 ns/op	   3521833 ops/s	     300 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3447	    583429 ns/op	   3584557 ops/s	     301 B/op	       6 allocs/op
BenchmarkActor/tell-10         	    3456	    581910 ns/op	   3632954 ops/s	     301 B/op	       6 allocs/op
BenchmarkActor/ask-10          	 1162461	       957.4 ns/op	   1063679 ops/s	     578 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1178132	       968.8 ns/op	   1050724 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1186813	       969.9 ns/op	   1049383 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1166163	       962.7 ns/op	   1057649 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1164457	       956.7 ns/op	   1064486 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1151874	       969.3 ns/op	   1050524 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1138566	       963.5 ns/op	   1057205 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1174144	       959.1 ns/op	   1061610 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1148130	       962.3 ns/op	   1058367 ops/s	     576 B/op	      10 allocs/op
BenchmarkActor/ask-10          	 1183231	       967.6 ns/op	   1051966 ops/s	     576 B/op	      10 allocs/op
PASS
ok  	github.com/tochemey/goakt/v2/bench	196.840s

@sdil I made some small change to avoid busy thread and without any modification in your code, I am able to reach this throughput which seems promising:

That's pretty good. I wonder how does that change improves the performance

That's pretty good. I wonder how does that change improves the performance

The previous implementation of the receive is just looping even when there is no messages in the mailbox which creates unnecessary busy threads. The enhancement is to react only messages are dropped in the mailbox.

@sdil closing the issue. Let us revisit it when things get worst.

@Tochemey sure. Thanks for your work 🙇


md5 not supported in JSON validator

It's in the schema, but not recognized as an enumeration.  I'd submit a PR but I don't know which file to look at.

It looks like MD5 is supported in the schema:
https://github.com/spdx/spdx-spec/blob/2be70fcdf33c7e54290c17924a2b471d87afa0f0/schemas/spdx-schema.json#L165
Could this be an issue of the enum being case sensitive?
@elear If it is not due to case sensitive enums, you could upload an example file that is not validating?

My apologies.  It is indeed a case problem.


Support --diff parameter with reading from stdin

Issue Type: Feature Request
Calling cat /some/file | code --diff /some/other/file - simply opens /some/other/file instead of generating a diff between its content and stdin. Obviously one would not cat the stdin but the point still holds and generating an intermediate file is not always desired nor possible.
VS Code version: Code 1.51.0 (fcac248b077b55bae4ba5bab613fd6e9156c2f0c, 2020-11-05T18:16:10.374Z)
OS version: Linux x64 5.8.0-26-generic

I cannot recall why I added this check that prevents reading from stdin when file paths are provided:
https://github.com/microsoft/vscode/blob/b813399093b699c719d33bfcb419639dbbc79a7d/src/vs/code/node/cli.ts#L160
Removing it seems to allow to diff properly.
//cc @aeschli since I saw you touched this code recently too, probably for remote support.

/verified


[bug/question] countdown timer not update / Livestream not automatically play

I notice if the countdown timer doesn't show any second, somehow it is not updated and causes the livestream not updated.
I'm using Edge Version 127.0.2651.86 (Official build) (64-bit)
Step to replicate:

Add new stream that not yet started in multiview

Press the play button.

The time message is shown, when the scheduled stream it still take some times, it won't show the seconds counter (expected)

Either minimize the window or open another application (so browser is not the topmost) and wait

Somehow the timer is not updated and it won't auto play.

Note:

Other stream is still playing in the background in multiview mode.
This doesn't happen when the countdown timer is near/showing the seconds, as it still auto update the countdown timer.

Not sure if this issue on youtube side or holodex.
EDIT: opening in other monitor on top also doesn't update the timer. Manually click reload button  and play will refresh the timer
EDIT2: after the timer elapsed (the one with seconds countdown), it reset back to original value and still doesn't auto play. I need to do manual reload. Not sure if it is because of adblocker?

Looks like the adblocker cause it? disabling the ad blocker will load it. Will test with more stream.

looks like adblocker is the issue, closed this issue. Thanks for the work 😄


Bump framework version

Note $subject

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/887464517

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/887464517
Status: success


chore: formatting sigil for test strings

Current dependencies on/for this PR:

main

PR #151   👈

This comment was auto-generated by Graphite.


Compilation of 1.0.62 fails with rust stable (1.63.0)

I get the following error:
   Compiling anyhow v1.0.62
error[E0554]: `#![feature]` may not be used on the stable release channel
   --> /home/amaier/.cargo/registry/src/github.com-1ecc6299db9ec823/anyhow-1.0.62/src/lib.rs:214:32
    |
214 | #![cfg_attr(backtrace, feature(backtrace))]
    |                                ^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.
error: could not compile `anyhow` due to previous error

After forcing a rebuild I can no longer reproduce this problem.

The same has happened to me, quite weird. Clearing the target directory has helped.


Translate to Spanish the index page

Translated the index.md page to Spanish. Hopefully, the first of many to come!

Thanks for your contribution! :globe_with_meridians: :rocket: :cake:


Legion: regression in padded constraint conflicts

One of the HTR unit tests has shown that 1626f5638181c210bc1b74c96838b05e5339ba6d has introduced a bug in the detection of the conflicts between padded constraints. In particular, if a constraint with 0 delta is tested against a constraint with positive delta, the conflict is not detected.
The following patch fixes the issue
diff --git a/runtime/legion/legion_constraint.cc b/runtime/legion/legion_constraint.cc
index d194b5263..7c41fe060 100644
--- a/runtime/legion/legion_constraint.cc
+++ b/runtime/legion/legion_constraint.cc
@@ -1765,32 +1765,15 @@ namespace Legion {
           return true;
         for (int idx = 0; idx < delta.get_dim(); idx++)
         {
-          if (delta.lo()[idx] < 0)
-          {
-            if (other.delta.lo()[idx] > 0)
-              return true;
-          }
-          else if (delta.lo()[idx] > 0)
-          {
-            if (other.delta.lo()[idx] < 0)
-              return true;
-            else if ((other.delta.lo()[idx] > 0) &&
-                (delta.lo()[idx] < other.delta.lo()[idx]))
-              return true;
-          }
-          if (delta.hi()[idx] < 0)
-          {
-            if (other.delta.hi()[idx] > 0)
-              return true;
-          }
-          else if (delta.hi()[idx] > 0)
-          {
-            if (other.delta.hi()[idx] < 0)
-              return true;
-            else if ((other.delta.hi()[idx] > 0) &&
-                (delta.hi()[idx] < other.delta.hi()[idx]))
-              return true;
-          }
+          if ((delta.lo()[idx]*other.delta.lo()[idx]) < 0)
+            return true;
+          else if (delta.lo()[idx] < other.delta.lo()[idx])
+            return true;
+
+          if ((delta.hi()[idx]*other.delta.hi()[idx]) < 0)
+            return true;
+          else if (delta.hi()[idx] < other.delta.hi()[idx])
+            return true;
         }
       }
       return false;

@elliottslaughter, could you please add this issue to #1032 with high priority?

That's not a bug. A delta of 0 means "don't care". In order to say you don't want any padding then you need to give a negative delta. I even wrote that down here:
https://gitlab.com/StanfordLegion/legion/-/blob/master/runtime/legion/legion_constraint.h?ref_type=heads#L704-707

I've evidence that your version of the function allows the runtime to map region requirements with padding constraints on instances without padding. Note that such mappings were not allowed before 1626f5638181c210bc1b74c96838b05e5339ba6d

map region requirements with padding constraints

Non-zero padding constraints? Also, you're sure the safe mapper checks are on? They are off by default in release mode. Without them the runtime will let you do all sorts of illegal things.
It's worth noting that the old code was overly strict compared to the documented semantics. If you were relying on 0 bounds before to mean that there was no padding it would have worked but the implementation was inconsistent with the documentation. Your proposed fix is also overly strict and doesn't handle the cases with zero or negative values correctly.

If you want we can try switching the semantics so that 0 means absolutely no padding and any negative integer means "don't care".

The semantics 0 == "I do not care" can be applicable only when you are talking about region requirements. When you are dealing with the LayoutConstraints of an InstanceManager, 0 means that the underlying instance does not have any padding space.
For instance, you are checking if the LayoutConstraints of a given InstanceManager are compatible with the constraints of the selected task variant at https://gitlab.com/StanfordLegion/legion/-/blob/control_replication/runtime/legion/mapper_manager.cc?ref_type=heads#L1848 . The current version of the code will not recognize a conflict between an instance that has zero padding and a region requirement with a positive padding constraint.
A similar check is in place in many functions of the runtime.
Note 1: your new function would work as expected if you start checking if the layout constraints of the selected task variant conflict with the layout constraints of the selected instance
Note 2: the semantics 0 == "I do not care" is applied by my patch and by your old implementation as well. In fact, the constraints of the task variants are contained in the other.delta in the function. If other.delta is zero along one direction,  you will never enter in any of the if statements
+          if ((delta.lo()[idx]*other.delta.lo()[idx]) < 0)
+            return true;
+          else if (delta.lo()[idx] < other.delta.lo()[idx])
+            return true;
+
+          if ((delta.hi()[idx]*other.delta.hi()[idx]) < 0)
+            return true;
+          else if (delta.hi()[idx] < other.delta.hi()[idx])
+            return true;

regardless of the value of delta, which rapresentes of the size of the padding space of the instance.

The semantics 0 == "I do not care" can be applicable only when you are talking about region requirements.

You missed this part: https://gitlab.com/StanfordLegion/legion/-/blob/master/runtime/legion/legion_instances.cc?ref_type=heads#L3909-3918
There are no instances with 0 constraints.

Do you want a reproducer on sapling?

BTW, your comment is incorrect. If an instance is created with padding constraints only in one direction, it does not go through that path.
For instance, using this padding constraint
const PaddingConstraint padding_1D_X(Point<3>{3, 0, 0}, Point<3>{3, 0, 0});

the runtime will most likely try to create an instance with 3 points of padding on the x sides and 0 points on the other.
If afterwards you launch a task with
const PaddingConstraint padding_1D_Y(Point<3>{0, 3, 0}, Point<3>{0, 3, 0});

the runtime will not recognize that the instance created for the previous task is not compatible with this layout constraint.

If you want to keep your version of the conflict check, you will need to apply the following patch
diff --git a/runtime/legion/legion_instances.cc b/runtime/legion/legion_instances.cc
index 1f6e0e784..eba4ad0a1 100644
--- a/runtime/legion/legion_instances.cc
+++ b/runtime/legion/legion_instances.cc
@@ -3924,6 +3924,14 @@ namespace Legion {
         for (unsigned dim = 0; dim < num_dims; dim++)
           empty[dim] = -1; // no padding
         constraints.padding_constraint.delta = Domain(empty, empty);
+      } else {
+         DomainPoint lo = constraints.padding_constraint.delta.lo();
+         DomainPoint hi = constraints.padding_constraint.delta.hi();
+         for (unsigned dim = 0; dim < num_dims; dim++) {
+            if (lo[dim] == 0) lo[dim] = -1;
+            if (hi[dim] == 0) hi[dim] = -1;
+         }
+         constraints.padding_constraint.delta = Domain(lo, hi);
       }
       // Now let's find the layout constraints to use for this instance
       LayoutDescription *layout = field_space_node->find_layout_description(

Note that also the following fix is required for instances created with delta equal to -1 in some directions
diff --git a/runtime/legion/runtime.cc b/runtime/legion/runtime.cc
index 4bb49bc11..99ec6cb61 100644
--- a/runtime/legion/runtime.cc
+++ b/runtime/legion/runtime.cc
@@ -5323,8 +5323,15 @@ namespace Legion {
 #ifdef DEBUG_LEGION
               assert(domain.get_dim() == delta.get_dim());
 #endif
+              DomainPoint lo = delta.lo();
+              DomainPoint hi = delta.hi();
+              for (int dim = 0; dim < delta.get_dim(); dim++) {
+                lo[dim] = std::max(coord_t(0), lo[dim]);
+                hi[dim] = std::max(coord_t(0), hi[dim]);
+              }
+
               const Domain padded_bounds =
-                Domain(domain.lo() - delta.lo(), domain.hi() + delta.hi());
+                Domain(domain.lo() - lo, domain.hi() + hi);
               switch (domain.get_dim())
               {
 #define DIMFUNC(DIM) \
@@ -5436,7 +5443,13 @@ namespace Legion {
 #ifdef DEBUG_LEGION
             assert(bounds.get_dim() == delta.get_dim());
 #endif
-            outer = Domain(bounds.lo() - delta.lo(), bounds.hi() + delta.hi());
+            DomainPoint lo = delta.lo();
+            DomainPoint hi = delta.hi();
+            for (int dim = 0; dim < delta.get_dim(); dim++) {
+              lo[dim] = std::max(coord_t(0), lo[dim]);
+              hi[dim] = std::max(coord_t(0), hi[dim]);
+            }
+            outer = Domain(bounds.lo() - lo, bounds.hi() + hi);
           }
           else
             outer = bounds;

BTW, your comment is incorrect. If an instance is created with padding constraints only in one direction, it does not go through that path.

That's undefined behavior. You should never be trying to create an instance with "don't-care" padding.  I'm just going to reverse the polarity of "don't care" and "no constraints" so that nobody else makes the same mistake that you did.

Pull and try again.

You still need to apply the patch above to runtime/legion/runtime.cc to make sure that the outer bounds of the instance are properly computed when delta is -1.

Look again, I already did that.

Although I still think that should be undefined behavior/an error.

the execution of the unit test still fails with
(gdb) bt
#0  0x00007f0411a8323f in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x55c1159a4920, rem=rem@entry=0x55c1159a4920) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
#1  0x00007f0411a88ec7 in __GI___nanosleep (requested_time=requested_time@entry=0x55c1159a4920, remaining=remaining@entry=0x55c1159a4920) at nanosleep.c:27
#2  0x00007f0411a88dfe in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#3  0x00007f0415080041 in Realm::realm_freeze (signal=6) at /home/mariodr/legion3/runtime/realm/runtime_impl.cc:200
#4  <signal handler called>
#5  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#6  0x00007f04119c8859 in __GI_abort () at abort.c:79
#7  0x00007f04119c8729 in __assert_fail_base (fmt=0x7f0411b5e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7f0415d08f87 "lo[i] >= 0", file=0x7f0415cfeaf0 "/home/mariodr/legion3/runtime/legion/region_tree.inl", line=505, function=<optimized out>)
    at assert.c:92
#8  0x00007f04119d9fd6 in __GI___assert_fail (assertion=0x7f0415d08f87 "lo[i] >= 0", file=0x7f0415cfeaf0 "/home/mariodr/legion3/runtime/legion/region_tree.inl", line=505,
    function=0x7f0415d0bca0 "Realm::InstanceLayoutGeneric* Legion::Internal::IndexSpaceExpression::create_layout_internal(const Realm::IndexSpace<N, T>&, const Legion::LayoutConstraintSet&, const std::vector<unsigned int>&, const"...) at assert.c:101
#9  0x00007f0414c6dd5d in Legion::Internal::IndexSpaceExpression::create_layout_internal<3, long long> (this=0x7f03f2869860, space=..., constraints=..., field_ids=std::vector of length 2, capacity 2 = {...}, field_sizes=std::vector of length 2, capacity 2 = {...},
    compact=false, piece_list=0x7f03f2f2d7f8, piece_list_size=0x7f03f2f2d800, num_pieces=0x7f03f2f2c2f0) at /home/mariodr/legion3/runtime/legion/region_tree.inl:505
#10 0x00007f0414c4acf2 in Legion::Internal::IndexSpaceNodeT<3, long long>::create_layout (this=0x7f03f2869530, constraints=..., field_ids=std::vector of length 2, capacity 2 = {...}, field_sizes=std::vector of length 2, capacity 2 = {...}, compact=false,
    piece_list=0x7f03f2f2d7f8, piece_list_size=0x7f03f2f2d800, num_pieces=0x7f03f2f2c2f0) at /home/mariodr/legion3/runtime/legion/region_tree.inl:4905
#11 0x00007f04145a00d6 in Legion::Internal::InstanceBuilder::create_physical_instance (this=0x7f03f2f2d5e0, forest=0x55c1123ca840, unsat_kind=0x0, unsat_index=0x0, footprint=0x7f03f2f2d408, precondition=...)
    at /home/mariodr/legion3/runtime/legion/legion_instances.cc:3814
#12 0x00007f04148d7c27 in Legion::Internal::MemoryManager::allocate_physical_instance (this=0x7f03f27109e0, builder=..., footprint=0x7f03f2f2ef90, unsat_kind=0x0, unsat_index=0x0) at /home/mariodr/legion3/runtime/legion/runtime.cc:10366
#13 0x00007f04148cfd5c in Legion::Internal::MemoryManager::find_or_create_physical_instance (this=0x7f03f27109e0, constraints=..., regions=std::vector of length 1, capacity 1 = {...}, result=..., created=@0x7f03f2f2eb29: false, processor=..., acquire=true, priority=0,
    tight_region_bounds=false, unsat_kind=0x0, unsat_index=0x0, footprint=0x7f03f2f2ef90, creator_id=398, remote=false) at /home/mariodr/legion3/runtime/legion/runtime.cc:8728
#14 0x00007f0414913653 in Legion::Internal::Runtime::find_or_create_physical_instance (this=0x55c11344d2e0, target_memory=..., constraints=..., regions=std::vector of length 1, capacity 1 = {...}, result=..., created=@0x7f03f2f2eb29: false, processor=..., acquire=true,
    priority=0, tight_bounds=false, unsat=0x0, footprint=0x7f03f2f2ef90, creator_id=398) at /home/mariodr/legion3/runtime/legion/runtime.cc:26056
#15 0x00007f0414a98446 in Legion::Internal::MapperManager::find_or_create_physical_instance (this=0x55c111d9e360, ctx=0x7f03f29ee4d0, target_memory=..., constraints=..., regions=std::vector of length 1, capacity 1 = {...}, result=..., created=@0x7f03f2f2eb29: false,
    acquire=true, priority=0, tight_region_bounds=false, footprint=0x7f03f2f2ef90, unsat=0x0) at /home/mariodr/legion3/runtime/legion/mapper_manager.cc:2043
#16 0x00007f041473c661 in Legion::Mapping::MapperRuntime::find_or_create_physical_instance (this=0x55c112382540, ctx=0x7f03f29ee4d0, target_memory=..., constraints=..., regions=std::vector of length 1, capacity 1 = {...}, result=..., created=@0x7f03f2f2eb29: false,
    acquire=true, priority=0, tight_bounds=false, footprint=0x7f03f2f2ef90, unsat=0x0) at /home/mariodr/legion3/runtime/legion/legion_mapping.cc:875
#17 0x00007f0414fe5940 in Legion::Mapping::DefaultMapper::default_make_instance (this=0x55c111d9df20, ctx=0x7f03f29ee4d0, target_memory=..., constraints=..., result=..., kind=Legion::Mapping::DefaultMapper::TASK_MAPPING, force_new=false, meets=true, req=...,
    footprint=0x7f03f2f2ef90) at /home/mariodr/legion3/runtime/mappers/default_mapper.cc:2291
#18 0x00007f0414fe3997 in Legion::Mapping::DefaultMapper::default_create_custom_instances (this=0x55c111d9df20, ctx=0x7f03f29ee4d0, target_proc=..., target_memory=..., req=..., index=1, needed_fields=std::set with 0 elements, layout_constraints=...,
    needs_field_constraint_check=false, instances=std::vector of length 1, capacity 1 = {...}, footprint=0x7f03f2f2ef90) at /home/mariodr/legion3/runtime/mappers/default_mapper.cc:1933
#19 0x00007f0414fe1a97 in Legion::Mapping::DefaultMapper::map_task (this=0x55c111d9df20, ctx=0x7f03f29ee4d0, task=..., input=..., output=...) at /home/mariodr/legion3/runtime/mappers/default_mapper.cc:1462
#20 0x00007f0414a91ad0 in Legion::Internal::MapperManager::invoke_map_task (this=0x55c111d9e360, task=0x7f03f2a222d0, input=0x7f03f2f2f110, output=0x7f03f2f2f160, info=0x7f03f29ee4d0) at /home/mariodr/legion3/runtime/legion/mapper_manager.cc:176
#21 0x00007f041430f593 in Legion::Internal::SingleTask::invoke_mapper (this=0x7f03f2a222d0, must_epoch_owner=0x0) at /home/mariodr/legion3/runtime/legion/legion_tasks.cc:3590
#22 0x00007f0414311beb in Legion::Internal::SingleTask::map_all_regions (this=0x7f03f2a222d0, must_epoch_op=0x0, defer_args=0x7f03f2a09560) at /home/mariodr/legion3/runtime/legion/legion_tasks.cc:3984
#23 0x00007f041431fdf9 in Legion::Internal::PointTask::perform_mapping (this=0x7f03f2a222d0, must_epoch_owner=0x0, args=0x7f03f2a09560) at /home/mariodr/legion3/runtime/legion/legion_tasks.cc:7181
#24 0x00007f041492c157 in Legion::Internal::Runtime::legion_runtime_task (args=0x7f03f2a09560, arglen=52, userdata=0x55c11595eb40, userlen=8, p=...) at /home/mariodr/legion3/runtime/legion/runtime.cc:32257
#25 0x00007f041540036e in Realm::LocalTaskProcessor::execute_task (this=0x55c112381ae0, func_id=4, task_args=...) at /home/mariodr/legion3/runtime/realm/proc_impl.cc:1175
#26 0x00007f0415205d88 in Realm::Task::execute_on_processor (this=0x7f03f2a093e0, p=...) at /home/mariodr/legion3/runtime/realm/tasks.cc:326
#27 0x00007f041520b114 in Realm::UserThreadTaskScheduler::execute_task (this=0x55c112381ed0, task=0x7f03f2a093e0) at /home/mariodr/legion3/runtime/realm/tasks.cc:1687
#28 0x00007f0415208ebc in Realm::ThreadedTaskScheduler::scheduler_loop (this=0x55c112381ed0) at /home/mariodr/legion3/runtime/realm/tasks.cc:1160
#29 0x00007f0415211ef8 in Realm::Thread::thread_entry_wrapper<Realm::ThreadedTaskScheduler, &Realm::ThreadedTaskScheduler::scheduler_loop> (obj=0x55c112381ed0) at /home/mariodr/legion3/runtime/realm/threads.inl:97
#30 0x00007f04151df542 in Realm::UserThread::uthread_entry () at /home/mariodr/legion3/runtime/realm/threads.cc:1355
#31 0x00007f0411a014e0 in ?? () at ../sysdeps/unix/sysv/linux/x86_64/__start_context.S:91 from /lib/x86_64-linux-gnu/libc.so.6
#32 0x0000000000000000 in ?? ()
(gdb) f 9
#9  0x00007f0414c6dd5d in Legion::Internal::IndexSpaceExpression::create_layout_internal<3, long long> (this=0x7f03f2869860, space=..., constraints=..., field_ids=std::vector of length 2, capacity 2 = {...}, field_sizes=std::vector of length 2, capacity 2 = {...},
    compact=false, piece_list=0x7f03f2f2d7f8, piece_list_size=0x7f03f2f2d800, num_pieces=0x7f03f2f2c2f0) at /home/mariodr/legion3/runtime/legion/region_tree.inl:505
505	          assert(lo[i] >= 0);
(gdb) p delta
$1 = (const Legion::Domain &) @0x7f03f2f2d670: {static MAX_RECT_DIM = 3, static NO_DOMAIN = {static MAX_RECT_DIM = 3, static NO_DOMAIN = <same as static member of an already seen type>, is_id = 0, is_type = 0, dim = 0, rect_data = {0, 0, 0, 0, 0, 0}}, is_id = 0,
  is_type = 0, dim = 3, rect_data = {3, -1, -1, 3, -1, -1}}

I pushed a fix to the master branch, but need @elliottslaughter to do the merge into control replication to resolve a CMake conflict.

The fix was merged into the control replication branch.

There is still a problem. An unset padding constraint conflucts with a zero padding constraint as you can see in the following case:
(gdb) p $11.padding_constraint
$13 = {<Legion::LayoutConstraint> = {_vptr.LayoutConstraint = 0x5651f277b670 <vtable for Legion::PaddingConstraint+16>}, static constraint_kind = LEGION_PADDING_CONSTRAINT, delta = {static MAX_RECT_DIM = 3, static NO_DOMAIN = {static MAX_RECT_DIM = 3,
      static NO_DOMAIN = <same as static member of an already seen type>, is_id = 0, is_type = 0, dim = 0, rect_data = {0, 0, 0, 0, 0, 0}}, is_id = 0, is_type = 0, dim = 0, rect_data = {0, 0, 0, 0, 0, 0}}}
(gdb) p $12.padding_constraint
$14 = {<Legion::LayoutConstraint> = {_vptr.LayoutConstraint = 0x5651f277b670 <vtable for Legion::PaddingConstraint+16>}, static constraint_kind = LEGION_PADDING_CONSTRAINT, delta = {static MAX_RECT_DIM = 3, static NO_DOMAIN = {static MAX_RECT_DIM = 3,
      static NO_DOMAIN = <same as static member of an already seen type>, is_id = 0, is_type = 0, dim = 0, rect_data = {0, 0, 0, 0, 0, 0}}, is_id = 0, is_type = 0, dim = 3, rect_data = {0, 0, 0, 0, 0, 0}}}
(gdb) p $11.padding_constraint.conflicts($12.padding_constraint)
$15 = true

This issue prevents a region requirement without padding constraints from being mapped on a region mapped with zero padding using the current logic available in the default mapper (https://gitlab.com/StanfordLegion/legion/-/blob/master/runtime/mappers/default_mapper.cc#L1976)
This is fixed by the following patch
diff --git a/runtime/legion/legion_constraint.cc b/runtime/legion/legion_constraint.cc
index e0a757f0f..8f327b296 100644
--- a/runtime/legion/legion_constraint.cc
+++ b/runtime/legion/legion_constraint.cc
@@ -1763,8 +1763,16 @@ namespace Legion {
     {
       if (other.delta.get_dim() > 0)
       {
-        if (delta.get_dim() != other.delta.get_dim())
-          return true;
+        if (delta.get_dim() != other.delta.get_dim()) {
+          if (delta.get_dim() == 0) {
+            for (int idx = 0; idx < other.delta.get_dim(); idx++) {
+              if (other.delta.lo()[idx] > 0) return true;
+              if (other.delta.hi()[idx] > 0) return true;
+            }
+            return false;
+          } else
+            return true;
+        }
         for (int idx = 0; idx < delta.get_dim(); idx++)
         {
           if ((delta.lo()[idx] >= 0) && (other.delta.lo()[idx] >= 0))

I pushed a less restrictive change that will at least handle the case. Conflict testing should only fail if both constraint sets strictly conflict with each other. If either one is "don't care" then they shouldn't ever conflict with each other. For example, if either constraint has a zero dimension, that is considered a "don't care" and therefore will never be able to conflict with another set of constraints.

Sounds good. Thanks for fixing the issue

Thanks for dealing with the churn. It was necessary to make the implementation more robust.


update to v2.0.2

[ ] checked upstream project for requirements
[ ] checked license file
[x] added PyTorch restriction for osx-64 to avoid openmp compatibility issue
[x] building against PyTorch < 2.0.0, which means we may have to rebuild once
PyTorch 2.0.0 is available

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_a8nqvcd_2o/clone/recipe/meta.yaml:26: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_c3h4dg3lnf/clone/recipe/meta.yaml:26: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_a7z9mqqlql/clone/recipe/meta.yaml:26: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_26elnl0ton/clone/recipe/meta.yaml:27: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_7amjit2uo0/clone/recipe/meta.yaml:27: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_0fluy2ahx9/clone/recipe/meta.yaml:27: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

@boldorider4 I forgot that we need to rebuild torchmetrics for py311 support on win64 https://github.com/AnacondaRecipes/torchmetrics-feedstock/pull/7

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_55ueso10qa/clone/recipe/meta.yaml:27: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_c50k4mhrh3/clone/recipe/meta.yaml:27: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

torchmetrics 0.11.4 for py311 on win64 is available

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_d5dkrernnq/clone/recipe/meta.yaml:27: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found

Linter check found the following problems:
The following problems have been found:
WARNING: /tmp/abs_f4y5yvcoyv/clone/recipe/meta.yaml:27: python_build_tool_in_run: The python build tool packaging is in run depends
Warnings were found


Verification error might be a bit more verbose

When propagating signature verification error message, it's meaning gets lost in the stock, but often hits either logs or 40x response to reverse proxied API caller. This might help a lot in debugging of such situations.

wrong source/target branch


RoleManager.FindByNameAsync does not include Users and Claims

When I use RoleManagerto find a role, the returned role.Claims and role.Users is always empty.
I have checked Identity source code and in line 270 on  RoleStore.cs we have:
public virtual Task<TRole> FindByNameAsync(string normalizedName, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            ThrowIfDisposed();
            return Roles.FirstOrDefaultAsync(r => r.NormalizedName == normalizedName, cancellationToken);
        }

It seems Claims and Users are not included by default.
EF7 lazy loading is not implemented yet and I was wondering if Identity should load these explicitly.
To get it working for now I had to create my own RoleManager, register it on startup and
override the FindByNameAsync method like this:
 public override async Task<MyRole> FindByNameAsync(string roleName)
        {
            if (roleName == null)
            {
                throw new ArgumentNullException(nameof(roleName));
            }
            var role = await Roles.Include(x => x.Claims).FirstOrDefaultAsync(x => x.NormalizedName == NormalizeKey(roleName));
            return role;
        }

Identity's default EF provider is no longer including anything, since identity provides APIs to directly access Role claims and role users via the RoleManager api.  You can certainly override the default implementation to include things like this if desired, but this is no longer behavior we are supporting by default...
@divega might be able to provide more guidance on the best way to approach this

See the comments in a similar issue for more guidance: https://github.com/aspnet/Identity/issues/689#issuecomment-171119975


Correct graphs to have appropriate axes

Correct MCAS graphs to have consistent and appropriate scale on graphs e.g., [min, max] scores

MCAS Scale Scores: [200, 280] http://www.doe.mass.edu/mcas/overview.html?faq=all

Refer to #162

Before:

Now:

https://github.com/codeforamerica/somerville-teacher-tool/pull/231


shader on gui element is applied to geometry and text  - probably missing z value

Godot version: 3.0.3

OS/device including version: Windows, 7, 32-bit, Intel HD graphics (coming with Lenovo L570).

Issue description: In 2D: added a ShaderMaterial to a button. The shader code is below. This creates a red rectangle on the left of the button. However, some characters in on the button text also had a red rectangle. Experimenting with different text strings I noticed it was always on the same characters. Changing to a different font I noticed it was on different characters. My best guess here is that the characters showing this effect had the required UV.x value, that is, they were locate on the left edge of the corresponding bitmap holding th characters.
/// code
shader_type canvas_item;
void fragment() {
vec4 c = texture(TEXTURE, UV);
if ((UV.x < 0.1)) {
COLOR.rgba = vec4(1.0, 0.0, 0.0, 1.0);
}
else {
COLOR = c;
}
}
expected behaviour
To the minimum: it should be possible to distinguish in the shader between the various layers that make up a gui element - in the sample project, I used a button with som text so the expected behaviour here would be to have the text on a different layer than the button geometry - so a z-value should be needed.
Better would be to allow for different shaders on gui elements. It makes sense to do this since you can then apply different effects on gui background and the gui front.
Minimal reproduction project:

shadertest.zip

@clayjohn I guess we should just document it then to close this issue?

I'm not sure. I guess we should for 3.2.
The issue arises because we hijack UV1 to use for text, a better solution would be for text to have an optional TEXT_UV. I don't know how the 2D API has changed in 4.0. this may already be fixed, or it may be easy to fix.


Use generics in the proposed hover verbosity API

fixes https://github.com/microsoft/vscode/issues/211155
Use generics in the proposed hover verbosity API

Hi @jrieken in relation to https://github.com/microsoft/vscode/issues/211155, I would like to use generics in the hover provider which requires changing the vscode.d.ts. Could you review the PR since you review API changes?

This PR will be sent for definite review when the verbosity API is finalized


unknown error -505

Hi,
I have an unknown error 505 when I want to install the application (on Nexus 4 Android 5.0.1)
Thanks

Did you install any other app that may access the tasks? Error -505 occurs when another app defines the same permissions. Since Android 5 this is only allowed when the other app is signed by the same key. I hope they change that behavior.

I have install CalDAV-Sync, and i must install Tasks.

Did you compile the task app yourself?

I haven't an IDE with Android SDK on my computer

Even  if it can work in compiling the application, I think that should be corrected so that it works from Google Play

Actually the Google Play version should always work. You'll may into problems when you compile it yourself. The Google Play Versions of our CalDAV-Sync app and of the Task app are signed by the same key.
Can you try to get a system log? The log should show what the actual problem is.

where is the system log on Android?

If you have root access you can use an app like CatLog. If you have the Android SDK you can use adb logcat. Unfortunatley there is no easy way to get the log without root access.

I haven't a rot access.

I have installed a old version (1.0.12) from amazon app shop

All our versions are available here: https://github.com/dmfs/tasks/tree/master/releases
I won't be able to tell what exactly the problem is without a log, sorry. Maybe you can try to install adb on your computer and capture the log. That works without root. You just need to enable developer options and USB debugging.

I can't install from tasks-1.1.2.apk.
I try to install android SDK to use adb

Interesting. Maybe Error -505 has other reasons as well. Thanks for helping to debug this.

I can't connect my Nexus with adb :-(
But i have generet a bug report file ( contains the  SYSTEM LOG (logcat -v threadtime -d *:v) )
This is an extract from the SYSTEM LOG when I have the error -505:
02-17 16:10:09.646  1540  1540 D Finsky  : [1] InstallerTask.startInstallingGzippedApk: Prepare to unzip org.dmfs.tasks from content://downloads/my_downloads/4510
02-17 16:10:09.848  1540  1540 D Finsky  : [1] 9.onPostExecute: Successfully unpacked gzipped APK to update org.dmfs.tasks
02-17 16:10:10.158  1540  1540 D Finsky  : [1] 1.onPostExecute: Committing session 487864670 for org.dmfs.tasks
02-17 16:10:10.158  1540  1540 D Finsky  : [1] 4.installBeginning: Begin install of org.dmfs.tasks
02-17 16:10:10.639   556   590 I ActivityManager: Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=9920 uid=10013 gids={50013, 9997, 1028, 1015, 1023, 2001} abi=armeabi-v7a
02-17 16:10:10.776  1540  1540 D Finsky  : [1] PackageVerificationReceiver.onReceive: Verification requested, id = 0
02-17 16:10:10.782  1540  1540 D Finsky  : [1] WorkerTask.onPreExecute: Verification Requested for id = 0, data=file:///data/app/vmdl487864670.tmp flags=18 fromVerificationActivity=false
02-17 16:10:10.785  1540  1667 D Finsky  : [160] PackageVerificationService.getPackageInfo: Cannot read archive for file:///data/app/vmdl487864670.tmp in request id=0
02-17 16:10:10.788   556   590 D PackageManager: /data/app/vmdl487864670.tmp already staged; skipping copy
02-17 16:10:10.792  1540  1540 D Finsky  : [1] PackageVerificationReceiver.onReceive: Verification requested, id = 0
02-17 16:10:11.227   556   590 W PackageManager: Package org.dmfs.tasks attempting to redeclare permission org.dmfs.permission.WRITE_TASKS already owned by org.dmfs.caldav.lib
02-17 16:10:11.239   556   724 I ActivityManager: Killing 3764:com.google.android.calendar/u0a6 (adj 15): empty #17
02-17 16:10:11.352   556   773 W libprocessgroup: failed to open /acct/uid_10006/pid_3764/cgroup.procs: No such file or directory
02-17 16:10:11.414   556   590 I art     : Explicit concurrent mark sweep GC freed 148801(6MB) AllocSpace objects, 35(1330KB) LOS objects, 33% free, 26MB/40MB, paused 1.648ms total 182.084ms
02-17 16:10:11.425  1540  1540 D Finsky  : [1] PackageInstallerImpl.cancelSession: Canceling session 487864670 for org.dmfs.tasks
02-17 16:10:11.425  1540  1540 E Finsky  : [1] PackageInstallerImpl.handleCommitCallback: Error -505 while installing org.dmfs.tasks: INSTALL_FAILED_DUPLICATE_PERMISSION: Package org.dmfs.tasks attempting to redeclare permission org.dmfs.permission.WRITE_TASKS already owned by org.dmfs.caldav.lib
02-17 16:10:11.426  1540  1540 W Finsky  : [1] 4.installFailed: Install failure of org.dmfs.tasks: -505 null
02-17 16:10:11.446  1540  1540 D Finsky  : [1] InstallerTask.cancelCleanup: Cancel running installation of org.dmfs.tasks
02-17 16:10:11.457  1540  1540 D Finsky  : [1] 1.releasePackage: User=UserHandle{0} released=org.dmfs.tasks

perghaps : PackageManager: Package org.dmfs.tasks attempting to redeclare permission org.dmfs.permission.WRITE_TASKS already owned by org.dmfs.caldav.lib

Thanks! That actually should work. I'll have to ask on the Android developer mailing list. It works for most users. That might be an Android bug. Did you install CalDAV-Sync via Google Play?

No, I have buy caldav-Sync on Amazon app Shop.

it is not Ok. with tasks 1.1.2 on google play.

I see, but the version form Amazon should work just as well. I'll update the task app at Amazon soon. Maybe you try again then.

Is it because of Android 5 I have this problem.?

Well, the strict check has been introduced in Android 5, but nevertheless should it work.

this error saying it work not:
02-17 16:10:11.425 1540 1540 E Finsky : [1] PackageInstallerImpl.handleCommitCallback: Error -505 while installing org.dmfs.tasks: INSTALL_FAILED_DUPLICATE_PERMISSION: Package org.dmfs.tasks attempting to redeclare permission org.dmfs.permission.WRITE_TASKS already owned by org.dmfs.caldav.lib
There is a conflict between caldav_sync and tasks .

I know. But these versions work for thousands of users. The root of this evil is a general issue with Android permissions. A quick explanation:
When you install an app you agree to the permissions that the store presents you. The permissions an app needs are hard coded into an XML file.
Of course Android needs a definition of each permission that an app requests, otherwise it can't present that permission to the user (because the definition contains a human readable description).
If it can't present the permission to the user (because there is no permission definition), the user can not agree to the permission.
if the user can not agree, the permission is not granted (that's what you would expect).
The problem:
In our case the user in general installs CalDAV-Sync first and then the task app. If the task app (which defines the permission to read and write tasks) wasn't installed when CalDAV-Sync was installed the read/write task permissions are not granted to CalDAV-Sync, so it can't write tasks. You will have to uninstall and reinstall CalDAV-Sync to make this work. Which is very annoying, because you have to set up your account again.
The solution was to add the definition of the permissions to CalDAV-Sync as well. That way the permissions were known and granted when the user installed CalDAV-Sync. This worked fine until Android 5. Now it requires that apps that define the same permissions are signed by the same key. That's already annoyingly enough, but it seems to work for most of our users.
However, it looks like in some cases the same signature is not enough anymore.
So the root of this issue is permission management in Android. If Android would have an on-demand permission management like iOS we wouldn't have this issue, because there wouldn't be a reason do redefine the permissions in CalDAV-Sync.
The other "solution" would be to drop the permissions to read/write tasks, which is probably not a good idea, because it would allow any app to change tasks without knowledge of the user.

I had this issue with trying to install OpenTasks <IP_ADDRESS> from F-Droid with CalDav-Sync 0.4.16 from Play Store (I stopped using Google apps, and Google also locked me out of that account for changing IP addresses, is why it's an old version.) The order I installed them didn't seem to help.
I was able to install https://github.com/dmfs/opentasks/blob/master/releases/opentasks-<IP_ADDRESS>.apk .  I am guessing that the F-Droid version has a different key.

@scintill Yep, that's exactly the problem. We'll keep on publishing releases signed with our key in our github repo and we're planning to provide an F-Droid repo so you can get updates more easily.
That reminds me to push the <IP_ADDRESS> build :-|


How to automate lsp-code-actions

I'm trying to add a hook to have kak-lsp + gopls automatically update the imports section on save. It all works except I can't figure out a way to automate the final step of hitting 'Enter' on the 'Organize Imports' code-actions menu.
What is the intended way of automating this?
Thanks.

for this specific task you can pipe the buffer through goimports on save (instead of gofmt)

Yes. And I have done that in the past. I'm trying to fully utilize gopls at this time as I anticipate the goimports will be deprecated at some point. That is I am aware of that as a workaround but think it would still be good to have a means of doing this with kak-lsp.

Does lsp-formatting-sync work? I don't think code actions are meant to be scripted.

lsp-formatting-sync only does the formatting, the language-server spec has import management as a separate activity and the gopls authors made it separate to stick with the spec.
Code actions are interactive. Eg. the "Organize Imports" only shows up in the code-actions list if the imports need changing. I think this is why they are seen as non-scripting.
I'd still like to request a way to make them script-able so they can be automated anyways where it makes sense. Ideally it would just be some way to call it such that if it would just be a noop if the action wasn't available at that time.
I have a feeling this will be a popular request once goimports gets deprecated as a lot of people have become used to having imports management be paired with formatting on save.

It worth asking broader Kakoune community about automating menu selection in Kakoune, as it seems to be not a kak-lsp-specific question, and, unfortunately, my Kakoune-fu is not strong enough to answer it.
However, if it turns out to be impossible, we can make kak-lsp a little bit more flexible to support custom processing for code actions. At the moment kak-lsp server sends menu command directly to Kakoune. We can abstract it with something like lsp-show-code-actions, and then you can override this command in your config and process code actions as you wish (e.g. execute "Optimize imports" straight away without even showing menu if it's one and only available code action).

@eikenb So I too have this issue, and I'm working around it right now by issuing :gopls imports manually in my BufWritePre hook. Someone appears to have implemented support for invoking gopls subcommands directly as a kakoune command. That being said, I agree that it would be nice to be able to automate the menu selection.

You can now configure gopls to do imports formatting with the gofumpt = true setting.
https://github.com/golang/tools/blob/master/gopls/doc/settings.md#gofumpt-bool

I'm trying to take advantage of that bool, but I'm not having any luck.
I've tried to combine the docs about the feature here with the kak-lsp config docs here, and I've arrived at this:
set-option -add global lsp_server_configuration gopls.formatting.gofumpt=true

However, with that setting in effect, I see no change in behavior when I run :lsp-formatting-sync.
I also tried:
set-option -add global lsp_server_initialization_options gopls.formatting.gofumpt=true

No dice.
Has anyone already gotten this to work? Do you see something wrong with my approach?

Sorry, I haven't tried to get it working with kak yet. I still mainly use neovim for my day to day and it works there. I'm using the latest gopls (as of a few days ago) with this configuration...
local lspconfig = require("lspconfig")
lspconfig.gopls.setup {
  codelens = { generate = true, gc_details = true },
  experimentalWorkspaceModule = true,
  semanticTokens = true,
  experimentalPostfixCompletions = true,
  gofumpt = true,
}

I'll take a look at the gofumpt setting as soon as I get to it.
I have opened #498 to allow to define a custom function instead of the default menu. This is not fully fleshed out but it's easy to do.

@whereswaldon Setting values like formatting.gofumpt dynamically is currently not possible; I've opened #500 to improve the situation. For now you can use this in your kak-lsp.toml
[language.go.initialization_options]
"formatting.gofumpt" = true


React-Native Windows Support a Workaround

I using React-Native Windows and I faced some Issue after running the app for windows 10.
Picker class have .android and .ios in its file name so I got a bug.
my workaround I just copied the Picker.android.js and Picker.android.js.map from
basic/
theme/components/
and just remove .android from file name to be
Picker.js and Picker.js.map
and the app worked fine.
I hope it can help any one who supports windows

Button doesn't work in windows
https://github.com/GeekyAnts/NativeBase/blob/master/dist/src/basic/Button.js
in method line 52:
Ripple is not supported in windows
I tried to fix it but I can't do it

I solved Ripple problem:
I changed
_reactNative.TouchableNativeFeedback
this.props.androidRippleColor?
_reactNative.TouchableNativeFeedback.Ripple(this.props.androidRippleColor):
_reactNative.TouchableNativeFeedback.Ripple(_platform2.default.androidRippleColor)},

to
_reactNative.TouchableWithoutFeedback
background: this.props.androidRippleColor
                            ? this.props.androidRippleColor
                            : _platform2.default.androidRippleColor,

#1125


Switch to tag and release publishing

Fixes #13

FYI @adcreare.  I had to switch to tag/release because autopublish failed silently trying to publish the last version.  Most likely because this is an ESM module, but not entirely sure.  The logs didn't say much:
2023-06-01T13:24:27.857-04:00	2023-06-01T17:24:27.857Z autopublish:server event received

2023-06-01T13:24:27.857-04:00	2023-06-01T17:24:27.857Z autopublish:server marking message as received

2023-06-01T13:24:27.886-04:00	2023-06-01T17:24:27.886Z autopublish:server starting processing

2023-06-01T13:24:27.886-04:00	2023-06-01T17:24:27.886Z autopublish:handler get parameters

2023-06-01T13:24:28.013-04:00	2023-06-01T17:24:28.013Z autopublish:handler parameters loaded

2023-06-01T13:24:28.013-04:00	2023-06-01T17:24:28.013Z autopublish:handler Processing request

2023-06-01T13:24:28.014-04:00	2023-06-01T17:24:28.014Z autopublish:github Unable to find pull request number

2023-06-01T13:24:28.014-04:00	2023-06-01T17:24:28.014Z autopublish:handler did not meet the requirements of the condition - skipping

2023-06-01T13:24:29.772-04:00	2023-06-01T17:24:29.772Z autopublish:server event received

2023-06-01T13:24:29.772-04:00	2023-06-01T17:24:29.772Z autopublish:server marking message as received


Auto-generate options reference in README.md

I just put that together manually for now, roughly in the style of rustfmt, but it'd be far preferable to auto-generate that section.

Work happening here https://github.com/charliermarsh/ruff/pull/1015

@squiddy made this happen! It's awesome!


Error training Schnell

Successfully trained on Dev but on Schnell something weird happens:
"RuntimeError: CUDA error: unknown error CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1"
Readed that I need to add: --disable-cuda-malloc ?? or something like that, maybe?

Flux Schnell cannot be trained (for now) since it's a distilled model, the training dynamics are different from flux-dev.
You can check this out:
https://huggingface.co/ostris/OpenFLUX.1

Totally. You are right. I will try simpletuner too but maybe same fate. Thanks for the answer!

Training on schnell is now supported


Soulbound Enchantment - Stacks

Issue Description:
Soulbound Enchantment Bug with Item Stacks
What happens:
You can enchant a stack of cobble with soulbound, then using any other disenchant methods (other mods, etc) you can get a soulbound book from each individual cobble.
Turning one soulbound book into 64 soulbound books.
What you expected to happen:
Soulbound works on 1 item, not the entire stack.
Steps to reproduce:

Grab 64 Cobble or any other stack of items
Grab Soulbound Book
Put in Anvil
Take out 64 soulbound cobblestone
Separate and disenchant

Affected Versions (Do not use "latest"):

EnderIO: EnderIO-1.7.10-<IP_ADDRESS>1
EnderCore: Not Used (Didn't download it, don't see it, still loaded)
Minecraft: 1.7.10
Forge: .1614

Your most recent log file where the issue was present:
Logs don't show anything related.

Version 2.2.8 is very old - there won't be any patches for that.

Also, the enchanting is done by vanilla code. We have no influence here.