use css as styling file

how can i use css files instead of xaml files?

I don't think there will ever be support for loading css file.
I am not sure what you want to accomplish but Avalonia uses XAML markup language.
https://avaloniaui.net/docs/

Actually at some point there was some project that brought CSS to Avalonia, iv not seen it for a long time though now.
There is currently no plans for Avalonia to change to a different dialect. However if the community wants to build this kind of thing its a great idea.

https://github.com/warappa/XamlCSS

I don't think there will ever be support for loading css file.
I am not sure what you want to accomplish but Avalonia uses XAML markup language.
https://avaloniaui.net/docs/

In the design of Style, the design of XAML is very bad. It is highly redundant and difficult to read.

@sgf from your another comment:

the shorter the better,
the smaller the number of typing characters, the better,
and the smaller space in view of the same function, the better

Also it needs better reasoning than "smaller == better" and how it will work with bindings, templates and other features that don't exist in CSS. By adding CSS support it might end with the same situation of bloated syntax, but in other way.
Also many CSS features (or even CSS-preprocessor features) can be ported to the Avalonia. Like inner styles. For some of them we already have feature requests, for other you can create new.

@maxkatz6
It's easier to find employees that have CSS knowledge, and many teams already have people that are comfortable with CSS vs XML (and learning how XAML does it).

Bumping this after 5 years because even tho it is closed i still really see the value in this. I think if the community comes together to think about this well this would be a very good addition to the framework, for both readability, developer friendlyness and also makes it more accessible to webdevs.
My Idea for Avalonia Cascading Style Sheet files (.acss):
Instead of a direct usage of css where there are alot of nuances to catch, we make an adjusted version of css called acss that only implements the functionality needed for avalonia.
Most of the things would be the same but small things here and there might be more avalonia specific (for example selectors and property setters for keyframes)
The 2 solutions to getting this to work is either making a parser that converts this acss format into an xml style control (which imo is not the way to do this)
or
make adjustments in the framework so a StyleInclude can also be used on these acss files and they will be parsed themselves.
Some possible syntax and their xml counterparts
Lets say i have a simple login page that uses MVVM bindings for the text fields:
  <Grid Classes="login-container">
    <!-- Logo -->
    <Image Classes="logo" Source="logo.png" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,20,0,0"/>

    <!-- Login Form -->
    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Width="300">
      <TextBlock Classes="form-title" Text="Welcome Back" HorizontalAlignment="Center"/>

      <TextBox Classes="input-field" PlaceholderText="Username" Margin="0,10,0,0"/>
      <TextBox Classes="input-field" PlaceholderText="Password" Margin="0,10,0,0" PasswordChar="*"/>

      <Button Classes="primary-button" Content="Login" Margin="0,20,0,0"/>
      <Button Classes="secondary-button" Content="Forgot Password?" HorizontalAlignment="Center" Margin="0,10,0,0" />
    </StackPanel>
  </Grid>

i would style it like this:
/* Root container styling */
.login-container {
    background-color: #f5f5f5;
    padding: 20; /* Margin-like behavior */
    grid-row-definitions: Auto,*; /* Similar to grid-template-rows */
    grid-column-definitions: Auto; /* Single column */
    horizontal-alignment: Center;
    vertical-alignment: Center;
}

/* Logo styling */
.logo {
    max-width: 100; /* Limiting size without px units */
    max-height: Auto; /* Maintain aspect ratio */
    horizontal-alignment: Center;
    vertical-alignment: Top;
    margin: 0 0 20 0;
}

/* Title styling */
.form-title {
    font-size: 24; /* Points, as Avalonia interprets */
    font-weight: Bold;
    text-color: #333333;
    margin-bottom: 20; /* Space between the title and next element */
    horizontal-alignment: Center;
}

/* Input field styling */
.input-field {
    width: 300; /* Fixed width in points */
    height: Auto; /* Allow height to be intrinsic */
    padding: 10;
    border-brush: #CCCCCC;
    border-thickness: 1;
    corner-radius: 5;
    font-size: 16;
    background-color: #FFFFFF;
    text-color: #333333;
}

/* Primary button */
.primary-button {
    background-color: #0078D7;
    text-color: White;
    border-thickness: 0;
    padding: 10 20; /* Horizontal padding */
    corner-radius: 5;
    font-size: 16;
    horizontal-alignment: Stretch; /* Fully span the container width */
}

.primary-button:hover {
    background-color: #0053A4;
}

/* Secondary button */
.secondary-button {
    background-color: Transparent;
    text-color: #0078D7;
    border-thickness: 0;
    font-size: 14;
    text-decoration: Underline;
    horizontal-alignment: Center;
}

.secondary-button:hover {
    text-color: #0053A4;
}

Why This Makes Sense for Avalonia

No Absolute Units:

All dimensions (e.g., width, padding) are specified using values like 20 instead of 20px.
This reflects Avalonia's use of relative and absolute point-based dimensions for layout.

Alignment and Margins:

Avalonia prefers explicit properties like HorizontalAlignment, VerticalAlignment, and Margin for positioning and spacing.
Used these instead of position or flex equivalents.

No Percentages for Layout:

The layout is managed via Grid and StackPanel, where row/column definitions (Auto, *) handle dynamic sizing.
Buttons and elements stretch to fill their containers using HorizontalAlignment: Stretch.
Space for a possible css grid repeat option to get autogenerated rows or columns based on some kind of value and a repeat count

Hover and Interactive States:

Pseudo-classes like :hover map well to Avalonia's existing style triggers (e.g., Button:hover), making it intuitive for developers to define interactive states.

Intrinsic Sizing:

Elements like TextBox and Button adapt to their content by default (Height: Auto), and width is explicitly set where necessary.

###Keyframing
Keyframe animations can be a powerful addition to your proposed ACSS. Here's an example of how an animation might look:

#### Example 1: Button Hover Animation
```acss
/* Animation for button hover */
@keyframes button-hover-animation {
    0% {
        background-color: #0078D7;
        transform: scale(1);
    }
    50% {
        background-color: #0053A4;
        transform: scale(1.05);
    }
    100% {
        background-color: #0078D7;
        transform: scale(1);
    }
}

.primary-button:hover {
    animation: button-hover-animation 0.3s ease-in-out;
}

What i havent tought about yet
- How will bindings be effected by this?
- With the current code base, how hard would it be to add support for style sheets?
- How can this be implemented in a scalable way so that any newer controls, properties etc will automatically work in the acss format?

My question to you

Is there enough interest for something like this
Would it be hard to implement and if so, why?
Some other things i might not have tought about that could clash with avalonia features (maybe things like themes?)

Bumping this after 5 years because even tho it is closed i still really see the value in this. I think if the community comes together to think about this well this would be a very good addition to the framework, for both readability, developer friendlyness and also makes it more accessible to webdevs.
My Idea for Avalonia Cascading Style Sheet files (.acss):
Instead of a direct usage of css where there are alot of nuances to catch, we make an adjusted version of css called acss that only implements the functionality needed for avalonia.
Most of the things would be the same but small things here and there might be more avalonia specific (for example selectors and property setters for keyframes)
The 2 solutions to getting this to work is either making a parser that converts this acss format into an xml style control (which imo is not the way to do this)
or
make adjustments in the framework so a StyleInclude can also be used on these acss files and they will be parsed themselves.
Some possible syntax and their xml counterparts
Lets say i have a simple login page that uses MVVM bindings for the text fields:

  <Grid Classes="login-container">

    <!-- Logo -->

    <Image Classes="logo" Source="logo.png" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,20,0,0"/>

    <!-- Login Form -->

    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Width="300">

      <TextBlock Classes="form-title" Text="Welcome Back" HorizontalAlignment="Center"/>

      <TextBox Classes="input-field" PlaceholderText="Username" Margin="0,10,0,0"/>

      <TextBox Classes="input-field" PlaceholderText="Password" Margin="0,10,0,0" PasswordChar="*"/>

      <Button Classes="primary-button" Content="Login" Margin="0,20,0,0"/>

      <Button Classes="secondary-button" Content="Forgot Password?" HorizontalAlignment="Center" Margin="0,10,0,0" />

    </StackPanel>

  </Grid>

i would style it like this:

/* Root container styling */

.login-container {

    background-color: #f5f5f5;

    padding: 20; /* Margin-like behavior */

    grid-row-definitions: Auto,*; /* Similar to grid-template-rows */

    grid-column-definitions: Auto; /* Single column */

    horizontal-alignment: Center;

    vertical-alignment: Center;

}

/* Logo styling */

.logo {

    max-width: 100; /* Limiting size without px units */

    max-height: Auto; /* Maintain aspect ratio */

    horizontal-alignment: Center;

    vertical-alignment: Top;

    margin: 0 0 20 0;

}

/* Title styling */

.form-title {

    font-size: 24; /* Points, as Avalonia interprets */

    font-weight: Bold;

    text-color: #333333;

    margin-bottom: 20; /* Space between the title and next element */

    horizontal-alignment: Center;

}

/* Input field styling */

.input-field {

    width: 300; /* Fixed width in points */

    height: Auto; /* Allow height to be intrinsic */

    padding: 10;

    border-brush: #CCCCCC;

    border-thickness: 1;

    corner-radius: 5;

    font-size: 16;

    background-color: #FFFFFF;

    text-color: #333333;

}

/* Primary button */

.primary-button {

    background-color: #0078D7;

    text-color: White;

    border-thickness: 0;

    padding: 10 20; /* Horizontal padding */

    corner-radius: 5;

    font-size: 16;

    horizontal-alignment: Stretch; /* Fully span the container width */

}

.primary-button:hover {

    background-color: #0053A4;

}

/* Secondary button */

.secondary-button {

    background-color: Transparent;

    text-color: #0078D7;

    border-thickness: 0;

    font-size: 14;

    text-decoration: Underline;

    horizontal-alignment: Center;

}

.secondary-button:hover {

    text-color: #0053A4;

}

Why This Makes Sense for Avalonia

No Absolute Units:

All dimensions (e.g., width, padding) are specified using values like 20 instead of 20px.

This reflects Avalonia's use of relative and absolute point-based dimensions for layout.

Alignment and Margins:

Avalonia prefers explicit properties like HorizontalAlignment, VerticalAlignment, and Margin for positioning and spacing.

Used these instead of position or flex equivalents.

No Percentages for Layout:

The layout is managed via Grid and StackPanel, where row/column definitions (Auto, *) handle dynamic sizing.

Buttons and elements stretch to fill their containers using HorizontalAlignment: Stretch.

Space for a possible css grid repeat option to get autogenerated rows or columns based on some kind of value and a repeat count

Hover and Interactive States:

Pseudo-classes like :hover map well to Avalonia's existing style triggers (e.g., Button:hover), making it intuitive for developers to define interactive states.

Intrinsic Sizing:

Elements like TextBox and Button adapt to their content by default (Height: Auto), and width is explicitly set where necessary.

###Keyframing

/* Animation for button hover */

@keyframes button-hover-animation {

    0% {

        background-color: #0078D7;

        transform: scale(1);

    }

    50% {

        background-color: #0053A4;

        transform: scale(1.05);

    }

    100% {

        background-color: #0078D7;

        transform: scale(1);

    }

}

.primary-button:hover {

    animation: button-hover-animation 0.3s ease-in-out;

}

becomes

<Style Selector="Button.primary-button:hover">

    <Style.Animations>

        <Animation Duration="0:0:0.3" Easing="EaseInOut">

            <KeyFrame Cue="0%">

                <Setter Property="Background" Value="#0078D7"/>

                <Setter Property="RenderTransform" Value="ScaleTransform">

                    <ScaleTransform ScaleX="1" ScaleY="1"/>

                </Setter>

            </KeyFrame>

            <KeyFrame Cue="50%">

                <Setter Property="Background" Value="#0053A4"/>

                <Setter Property="RenderTransform" Value="ScaleTransform">

                    <ScaleTransform ScaleX="1.05" ScaleY="1.05"/>

                </Setter>

            </KeyFrame>

            <KeyFrame Cue="100%">

                <Setter Property="Background" Value="#0078D7"/>

                <Setter Property="RenderTransform" Value="ScaleTransform">

                    <ScaleTransform ScaleX="1" ScaleY="1"/>

                </Setter>

            </KeyFrame>

        </Animation>

    </Style.Animations>

</Style>

What i havent tought about yet

How will bindings be effected by this?

With the current code base, how hard would it be to add support for style sheets?

How can this be implemented in a scalable way so that any newer controls, properties etc will automatically work in the acss format?

My question to you

Is there enough interest for something like this

Would it be hard to implement and if so, why?

Some other things i might not have tought about that could clash with avalonia features (maybe things like themes?)

Another option:
Write a Roslyn (Incremental) Source Generator that would parse the [Avalonia CSS] .acss file and convert that into an Avalonia class style?
This way you (probably) won't need any changes to the Avalonia source, and it's all done at compile time. Thus it could be a 3rd party tool that can be developed and maintained outside of the main repo.
Happy to help write this if this is the route you'd like to look into?
PS: I haven't looked at the source in a couple years, I could be mistaken with any assumptions that I may have made above.

How exactly did u have that in mind? that the roslyn gen creates c# files that contain the style info instead of the xml? I rarely used Styles in code behind so im not sure what the code for that is like in the background. However about roslyn in general if thats a possibility that would also be a good option, but im curious about how maintainable that will be.
If you or someone else has some tips we could go on for that im also willing to go that route.
In principle all the source gen would do is create  the style classes? by tokenizing and parsing the acss file?
couple of things that would be quite important to note is that its important to think about capitalization in the syntax,
xml uses pascal case for attributes while css uses kebab or camel more often.

Or wait reading your reply again did u mean class styles as in the xml files containing a style?

Or wait reading your reply again did u mean class styles as in the xml files containing a style?
cuz then it would be possible to have some kind of placeholder inside of the xml that looks like this:
<CascadingStyle Source="path/to/acss" />
then the source gen would parse that tag, grab the attributes like the path it needs, generate the source from that acss and then convert it then paste it over where the placeholder is,

I am away on holiday at the moment, I can have a look at this as soon as I''m back (next Wednesday). What I'll do [while I'm away] is have a look through the Avalonia source; see if it's even possible to use a Source Generator to do this.

Or wait reading your reply again did u mean class styles as in the xml files containing a style?
cuz then it would be possible to have some kind of placeholder inside of the xml that looks like this:
<CascadingStyle Source="path/to/acss" />
then the source gen would parse that tag, grab the attributes like the path it needs, generate the source from that acss and then convert it then paste it over where the placeholder is,

I am away on holiday at the moment, I can have a look at this as soon as I''m back (next Wednesday). What I'll do [while I'm away] is have a look through the Avalonia source; see if it's even possible to use a Source Generator to do this.

Alright, im also gonna check it out, my main worry right now is wether or not an incremental source generator would even be able to read the acss as to my knowledge they are mostly meant for creating not parsing.
In the meantime im gonna write up a proper acss format so that the actual stylesheet implementation makes sense.

Reading up on source gens ive found that this might be a possibility:
public class MySourceGenerator : ISourceGenerator
{
    public void Initialize(GeneratorInitializationContext context)
    {
        // Initialization logic (e.g., checking if files are present)
    }

    public void Execute(GeneratorExecutionContext context)
    {
        // Loop through all the additional files (including those in the assets directory)
        foreach (var additionalFile in context.AdditionalFiles)
        {
            var filePath = additionalFile.Path;
            var fileContent = File.ReadAllText(filePath);

            // Process file content as needed
            Console.WriteLine($"Processing file: {filePath}");
            // You can parse or analyze the file content here
        }
    }
}

all that would be needed is that some kind of asset folder in the project exists and contains the styles and would be linked in csproj:
<ItemGroup>
  <AdditionalFiles Include="Assets\**\*" />
</ItemGroup>

this way it could just be as simple as creating a template for an avalonia project that has a folder like that built in (or let the user make it themselves) and any acss files in said folder will be part of the style generator, then its just roslyn reading it from there.

Reading up on source gens ive found that this might be a possibility:
public class MySourceGenerator : ISourceGenerator
{
    public void Initialize(GeneratorInitializationContext context)
    {
        // Initialization logic (e.g., checking if files are present)
    }

    public void Execute(GeneratorExecutionContext context)
    {
        // Loop through all the additional files (including those in the assets directory)
        foreach (var additionalFile in context.AdditionalFiles)
        {
            var filePath = additionalFile.Path;
            var fileContent = File.ReadAllText(filePath);

            // Process file content as needed
            Console.WriteLine($"Processing file: {filePath}");
            // You can parse or analyze the file content here
        }
    }
}

all that would be needed is that some kind of asset folder in the project exists and contains the styles and would be linked in csproj:
<ItemGroup>
  <AdditionalFiles Include="Assets\**\*" />
</ItemGroup>

this way it could just be as simple as creating a template for an avalonia project that has a folder like that built in (or let the user make it themselves) and any acss files in said folder will be part of the style generator, then its just roslyn reading it from there.

My only concern would be how to actually access the axaml file from the source gen tho?

Reading up on source gens ive found that this might be a possibility:
public class MySourceGenerator : ISourceGenerator
{
    public void Initialize(GeneratorInitializationContext context)
    {
        // Initialization logic (e.g., checking if files are present)
    }

    public void Execute(GeneratorExecutionContext context)
    {
        // Loop through all the additional files (including those in the assets directory)
        foreach (var additionalFile in context.AdditionalFiles)
        {
            var filePath = additionalFile.Path;
            var fileContent = File.ReadAllText(filePath);

            // Process file content as needed
            Console.WriteLine($"Processing file: {filePath}");
            // You can parse or analyze the file content here
        }
    }
}

all that would be needed is that some kind of asset folder in the project exists and contains the styles and would be linked in csproj:
<ItemGroup>
  <AdditionalFiles Include="Assets\**\*" />
</ItemGroup>

this way it could just be as simple as creating a template for an avalonia project that has a folder like that built in (or let the user make it themselves) and any acss files in said folder will be part of the style generator, then its just roslyn reading it from there.

My only concern would be how to actually access the axaml file from the source gen tho?

<ItemGroup>
  <AdditionalFiles Include="**\*.axaml" />
</ItemGroup>

Would work i guess, my concern is how to export the generated styles back into axaml

After looking at the source and how avalonia actually compiles the axaml files i dont think it will be possible (or atleast easy) to output the styles back into the xaml, so the only way would be to create the styling from c# after reading from the xaml where to get the files from and then somehow place them into the intialization of the window, but it seems that InitializeComponent() isnt virtual so we would have to actually add the code into the class probably

This is purely a proof-of-concept; what you see below is hard-coded within the source generator (as I don't have time to write a parser for a (custom) .css file. I simply picked the ButtonsPage from the ControlCatalog to show this PoC.
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Generators;

namespace ControlCatalog.Pages
{
    [CssGenerator]
    public partial class ButtonsPage : UserControl
    {
        private int repeatButtonClickCount = 0;

        public ButtonsPage()
        {
            InitializeComponent();
            this.Get<RepeatButton>("RepeatButton").Click += OnRepeatButtonClick;
        }

        private void InitializeComponent()
        {
            AvaloniaXamlLoader.Load(this);
        }

        public void OnRepeatButtonClick(object? sender, object args)
        {
            repeatButtonClickCount++;
            var textBlock = this.Get<TextBlock>("RepeatButtonTextBlock");
            textBlock.Text = $"Repeat Button: {repeatButtonClickCount}";
        }
    }
}

Source Generated code (this is simply hard-coded in the generator [as PoC])
Swapped out Gray for Lime
// <auto-generated/>

using System;
using System.Collections.Generic;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Media;
using Avalonia.Styling;

namespace ControlCatalog.Pages;

partial class ButtonsPage
{
    public override void EndInit()
    {
        var headerBorderStyle = new Style(x => x.OfType<Border>().Class("header-border"));
        headerBorderStyle.Setters.Add(new Setter(Border.BackgroundProperty, new SolidColorBrush(Colors.Lime, 0.5)));
        headerBorderStyle.Setters.Add(new Setter(Border.BorderBrushProperty, new SolidColorBrush(Colors.Lime)));
        headerBorderStyle.Setters.Add(new Setter(Border.BorderThicknessProperty, new Thickness(0.5)));
        headerBorderStyle.Setters.Add(new Setter(Border.CornerRadiusProperty, new CornerRadius(5.0, 5.0, 0.0, 0.0)));
        headerBorderStyle.Setters.Add(new Setter(Border.MaxWidthProperty, 450.0));
        headerBorderStyle.Setters.Add(new Setter(Decorator.PaddingProperty, new Thickness(10.0)));

        this.Styles.Add(headerBorderStyle);

        var headerTextStyle = new Style(x => x.OfType<TextBlock>().Class("header"));
        headerTextStyle.Setters.Add(new Setter(TextBlock.FontSizeProperty, 18.0));
        headerTextStyle.Setters.Add(new Setter(TextBlock.FontWeightProperty, FontWeight.Bold));

        this.Styles.Add(headerTextStyle);

        var thinBorderStyle = new Style(x => x.OfType<Border>().Class("thin"));
        thinBorderStyle.Setters.Add(new Setter(Border.BorderBrushProperty, new SolidColorBrush(Colors.Lime)));
        thinBorderStyle.Setters.Add(new Setter(Border.BorderThicknessProperty, new Thickness(0.5)));
        thinBorderStyle.Setters.Add(new Setter(Border.CornerRadiusProperty, new CornerRadius(0.0, 0.0, 5.0, 5.0)));
        thinBorderStyle.Setters.Add(new Setter(Control.MarginProperty, new Thickness(0.0, 0.0, 0.0, 15.0)));

        this.Styles.Add(thinBorderStyle);
    }
}

Commenting out the Style(s) in the .xaml file.
  <!--<UserControl.Styles >

    <Style Selector="Border.header-border">
      <Setter Property="Background">
        <Setter.Value>
          <SolidColorBrush Color="Gray" Opacity="0.5" />
        </Setter.Value>
      </Setter>
      <Setter Property="BorderBrush" Value="Gray" />
      <Setter Property="BorderThickness" Value="0.5" />
      <Setter Property="CornerRadius" Value="5,5,0,0" />
      <Setter Property="MaxWidth" Value="450" />
      <Setter Property="Padding" Value="10" />
    </Style>

    <Style Selector="TextBlock.header">
      <Setter Property="FontSize" Value="18" />
      <Setter Property="FontWeight" Value="Bold" />
    </Style>

    <Style Selector="Border.thin">
      <Setter Property="BorderBrush" Value="Gray" />
      <Setter Property="BorderThickness" Value="0.5" />
      <Setter Property="CornerRadius" Value="0,0,5,5" />
      <Setter Property="Margin" Value="0,0,0,15" />
    </Style>

  </UserControl.Styles>-->

Why EndInit()... Dunno was in a hurry, need to pack for a flight! 😆

Used the Roslyn Source Generator Template [from JetBrains (it's a bit messy)] to create the projects. But this is what I did in a few mins.
https://github.com/wdcossey/Avalonia/commit/9320583f7699bf2777008c11ab034859ffbadeed

Used the Roslyn Source Generator Template [from JetBrains (it's a bit messy)] to create the projects. But this is what I did in a few mins. wdcossey@9320583

Woah nice going! this is definetly already a good starting point and PoC, this is probably also the best way to do it in a Roslyn friendly way.
I think the way forward is actually easier than i tought, instead of adding the style into the axaml, we can just add a value to for example the CssGenerator Attribute as in [CssGenerator("SomestylesheetInsideofAdditionalFilesFolder.acss","Some other stylesheet etc.",...)
this way multiple stylesheets can be used, the view side of things only has to think about giving things the right classes where needed and the code behind will handle all of the styles.
assuming this happens once at initialization time the styles also shouldnt get in the way of any runtime changes.
My proposed plan:

Make a formal ACSS Spec covering all of the use cases that a regular style tag would (this would take the longest)
Create a new issue+PR  / New repo seperate from this one for this ACSS library
Create the parser and source generators needed for this project

After looking at the source and how avalonia actually compiles the axaml files i dont think it will be possible (or atleast easy) to output the styles back into the xaml

XAML compiler runs strictly after roslyn. We could add support for something like:
class MyStyles : Styles
{
      public MyStyles()
      {
            AvaloniaXamlLoader.LoadFromPrecompiledXaml(this, "<Styles>...</Styles>");
      }
}

where LoadFromPrecompiledXaml would only accept a string constant.
MyStyles will be compiler-visible since it's a pre-existing C# class from xaml compiler point of view.

After looking at the source and how avalonia actually compiles the axaml files i dont think it will be possible (or atleast easy) to output the styles back into the xaml

XAML compiler runs strictly after roslyn. We could add support for something like:
class MyStyles : Styles
{
      public MyStyles()
      {
            AvaloniaXamlLoader.LoadFromPrecompiledXaml(this, "<Styles>...</Styles>");
      }
}

where LoadFromPrecompiledXaml would only accept a string constant.
MyStyles will be compiler-visible since it's a pre-existing C# class from xaml compiler point of view.
For prototyping you can use runtime xaml loader.

Hmm, would we be able to load this xaml into the xaml of an already existing actual xaml file or would this work as if its a separate new xaml file?


Make PusherClient#trigger generic

This PR makes PusherClient#trigger generic and in order to be so, it requires JsonWriter implicitly for JSON serialization.

Thanks!


Show summary for non-restricted bugs

Instead of a per-query show_summary boolean, check whether each bug is
restricted to a particular group, and include the title in the nag email
if not.
This also means the summary won't be shown anymore for restricted bugs
in the RelMan "fixed without uplifts" status mail.
Closes mozilla/relman-auto-nag#68

Coverage remained the same at 47.427% when pulling 942a76ad4fb18f116a78efa38519985fb497a872 on jcristau:bug-summaries into 0a19c18ba94281c1b24f6930837ca724758660da on mozilla:master.

I don't remember enough the testsuite but is it possible to test that? (summary being correctly included or not)?

The current tests don't check this, I'll see if I can figure out a way to add that.

Coverage increased (+0.1%) to 47.539% when pulling 67f0ae65ac37b6ba80182fabcefce380a7ef5c2c on jcristau:bug-summaries into 0a19c18ba94281c1b24f6930837ca724758660da on mozilla:master.

Pushed an extra commit adding tests to check whether summary is included in emails.  Not sure about the way I'm mocking the "private" bug, there may be something better / less fragile.

works great, many thanks. Should be live tomorrow.


Make Key::SystemContractRegistry readable

CHANGELOG:

Key::SystemContractRegistry is now readable and can be queried via the RPC.

Closes #2601

bors merge


Make CI run on all PRs and fix build

We want to run build checks on all PRs.
Also fixes #2 and closes #3 because the build needs to run through.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause compatibility issues)
[x] DevOps change (fix or alteration in a build pipeline or config file)

This might require to #3 to be merged first.

Uhm what?
##[section]Starting: PublishPipelineArtifact
==============================================================================
Task         : Publish Pipeline Artifact
Description  : Publish Pipeline Artifact
Version      : 0.139.0
Author       : Microsoft Corporation
Help         : Publish a local directory or file as a named artifact for the current pipeline.
==============================================================================
##[error]Path not exist: /home/vsts/work/1/s/openvalidation-openapi-generator/target/ov-openapi-generator-cli.jar
##[section]Finishing: PublishPipelineArtifact

Uhm what?
##[section]Starting: PublishPipelineArtifact
==============================================================================
Task         : Publish Pipeline Artifact
Description  : Publish Pipeline Artifact
Version      : 0.139.0
Author       : Microsoft Corporation
Help         : Publish a local directory or file as a named artifact for the current pipeline.
==============================================================================
##[error]Path not exist: /home/vsts/work/1/s/openvalidation-openapi-generator/target/ov-openapi-generator-cli.jar
##[section]Finishing: PublishPipelineArtifact

Yeah, that's a legacy part of that pipeline. Removing it.

I think we should still check master branch in ci:
given master is at state A
and we have 2 PRs branching off it
master---pr1
master---pr2
pr1 works with master
pr2 works with master
pr1 gets merged
now master includes pr1 which breaks tests of pr2
pr2 also gets merged because CI was green from the "old" state (A) of master
now master would fail in CI but I don't think we would notice with this pr included?

That can't happen because changes on master invalidate the build.

Ok!


doc: Documentation issue in 'kconfig'

Describe the bug
CONFIG_BT_LONG_WQ_STACK_SIZE cannot be found in the documentation
Environment

Page: kconfig
Version: main
SHA-1: fc942ef7d30dea3a5b4e0d9644cc9f586385ecf0

It's a hidden Kconfig so AFAICT this is intended behavior https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/bluetooth/host/Kconfig#L15-L16
@jori-nordic @nordicjm

Wouldn't it be good to document invisible symbols as well? In some circumstances, you need to modify them.

Wouldn't it be good to document invisible symbols as well? In some circumstances, you need to modify them.

Probably very related to #67582


Unable to execute the generate.py script - You need to have sentencepiece installed to convert a slow tokenizer to a fast one.

Hi,
I first ran the command python generate.py --base_model 'budecosystem/genz-13b-v2'.
For this, I got the below error:
ValueError: The current device_map had weights offloaded to the disk. Please provide an offload_folder for them. Alternatively, make sure you have safetensors installed if the model you are using offers the weights in this format.
I googled and found some solution to add the last 2 lines (offload parameters).
offload_folder="offload",
offload_state_dict=True,
model = AutoModelForCausalLM.from_pretrained(
base_model,
load_in_8bit=load_8bit,
torch_dtype=torch.float16,
device_map="auto",
offload_folder="offload",
offload_state_dict=True,
)
After making this change and running the same command, I am getting below error.
python generate.py --base_model 'budecosystem/genz-13b-v2'
/Users/userid/Library/Python/3.9/lib/python/site-packages/urllib3/init.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
Loading checkpoint shards: 100%|
WARNING:root:Some parameters are on the meta device device because they were offloaded to the disk.
Traceback (most recent call last):
File "/Users/userid/BudEcosystem/GenZ/generate.py", line 107, in
fire.Fire(main)
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/fire/core.py", line 143, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/fire/core.py", line 477, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/fire/core.py", line 693, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/Users/userid/BudEcosystem/GenZ/generate.py", line 37, in main
tokenizer = AutoTokenizer.from_pretrained(base_model)
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/transformers/models/auto/tokenization_auto.py", line 862, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/transformers/tokenization_utils_base.py", line 2089, in from_pretrained
return cls._from_pretrained(
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/transformers/tokenization_utils_base.py", line 2311, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/transformers/models/llama/tokenization_llama_fast.py", line 124, in init
super().init(
File "/Users/userid/Library/Python/3.9/lib/python/site-packages/transformers/tokenization_utils_fast.py", line 120, in init
raise ValueError(
ValueError: Couldn't instantiate the backend tokenizer from one of:
(1) a tokenizers library serialization file,
(2) a slow tokenizer instance to convert or
(3) an equivalent slow tokenizer class to instantiate and convert.
You need to have sentencepiece installed to convert a slow tokenizer to a fast one.
Is this related to RAM/CPU of my MacBook? Can someone help please?
Regards,
Ganesh.

Finally got it running by downgrading gradio to 3.50
pip install gradio==3.50
https://github.com/tloen/alpaca-lora/issues/605
Thanks to above link.


Please keep the symbols server up to date with new releases.

Debugging open source code is much easier if the debug symbols are available in a convenient location. Looks like it happened once for this project:
http://www.symbolsource.org/Public/Metadata/NuGet/Project/AWSSDK
But hasn't since version <IP_ADDRESS>. Please consider adding publishing of symbols to your release process, so that end users don't have to compile their own sources for debugging.
If there's another location where symbols are available, please document it.

Closing for lack of activity


Static alloc for hybridblock

Description
(Brief description on what this PR is about)
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[ ] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

regression tests are already introduced in https://github.com/apache/incubator-mxnet/pull/11313/files#diff-962bd5bb7248659d7eb3be37ee8a4c6bR1288

This is a different PR. If you have any legitimate concerns on the code please specify them.
If you don't understand the code please let other people who do review it.

Sorry if I mixed it up. I tried to read the description, but it was not very helpful.

@marcoabreu I have been intensively using CachedOp with static memory allocation this week. I also read the code in the past week. Other than the small bug reported previously, I don't find problems and it works very well with me in my PR. https://github.com/apache/incubator-mxnet/pull/10451
I observe the memory allocation behavior and it works exactly as I expected.
What are you looking for? If you are looking for test code, my entire PR can serve as test code. If you are looking for review, I have been reading the code for the entire week. I don't think it's reasonable to block other people's work for no reason.

Hi Da, thanks for your comments. I'm sure that CachedOp is behaving as expected. The problems are described at https://github.com/apache/incubator-mxnet/pull/11318

I don't understand what the problem is. Because you veto, the PR should never be merged?
We should open the PR and get proper reviews and merge it. Blocking other people to review it isn't a way of solving the problem.

I was not the one who closed this PR, it was @tqchen. He was the one who dismissed my review and blocked other people from reviewing it. So why are you targeting this towards me?

just to be fair, I dismissed the your comment with specific comment that addresses your issue https://github.com/apache/incubator-mxnet/pull/11313/files#diff-962bd5bb7248659d7eb3be37ee8a4c6bR1288
I agree that maybe more time should have been given to do the reviews, and I might be a bit aggressive, but never the less, vetoing things without understand what is going on seems to be not so constructive


ValueError: Failed to load delegate from libedgetpu.so.1

Hey, I'm trying to run classify_image.py on a Coral USB Accelerator, but it throws the following error.
Traceback (most recent call last):
  File "classify_image.py", line 122, in <module>
    main()
  File "classify_image.py", line 99, in main
    interpreter = make_interpreter(args.model)
  File "classify_image.py", line 73, in make_interpreter
    {'device': device[0]} if device else {})
  File "/home/andyxu/.local/lib/python3.6/site-packages/tflite_runtime/interpreter.py", line 164, in load_delegate
    library, str(e)))
ValueError: Failed to load delegate from libedgetpu.so.1

Following all the steps verbatim here, I'm able to run in on the Windows 10 cmd. However, when set up everything on the same PC with Ubuntu WSL 2, I get the above error. I've tried everything mentioned in #4, and it appears that the libraries have been successfully installed. Any idea what the issue could be?

@Everthings Humn, I'm actually not sure if libedgetpu would works under WSL :/
Although it's possible that your linux user just doesn't have plugdev access, could you try this?
sudo usermod -aG plugdev $USER

Then reboot your device and try again.

@Namburger I've tried that before, but the problem remains.

@Namburger I'm also running into a few problems with running the edge-tpu on Windows 10. I opened a different issue in the examples-camera repo which can be found here.

@Everthings I see, I'll have to check if we have tested WSL with our library first, I'll keep you updated

Ok, good to know. Thanks!


Design Device security

Find technologist and create tasks for the implementation of device security.

We are archiving this repo.


Extend @override to overcome limitations of ECMAScript concerning overriding setters / getters

Original discussion found in #44
See https://phabricator.babeljs.io/T2449 and the limitation of the Javascript spec, which will not allow one to just override a getter or a setter of a given property of the base class but instead will discard any such getters and setters when missing.
In turn you will have to redeclare the getters and setters all over again, e.g.
class Base {
    get name() ...
    set name(v) ...
}

class Derived
{
     set name(v)...
}

Now, instantiating Derived will allow you to set the name property, but you cannot get the value back as there is no getter.
How about allowing one to
class Derived
{
   @override
    set name(v)...
}

were @override would then fill in the missing getter, or setter, accordingly?

@jayphelps as for the name of the new decorator, how about something more easy to remember and type, e.g. @getset?

Still a few things to flesh out though, what about integration with the existing other decorators, such as @readonly? Or does this not apply to getters and setters?

@silkentrance correct, @readonly doesn't work with getters and setters since it just sets descriptor. writable = true which getter/setter descriptors don't support.
Otherwise, any decorator that worked before should indeed still work with this hypothetical descriptor AFAIK. They can be chained, this descriptor would just merge the existing descriptor. Like some of the decorators, the order of them may matter though.
One thing I can think of is @nonconfigurable probably would be blown away.
class Base {
  get foo() {}
}

class Derived extends Base {
  @nonconfigurable
  @hypotheticalNewDecoratorThatMerges
  set foo() {}
}

Object.getOwnPropertyDescriptor(Derived.prototype, 'foo').configurable;
// true

Notice that configurable === true even though we we had used @nonconfigurable because the inherited descriptor had  configurable === true.
You'd need to use:
class Derived extends Base {
  @hypotheticalNewDecoratorThatMerges
  @nonconfigurable
  set foo() {}
}

@silkentrance IMO @getset is too ambiguous.

@jayphelps Aren't these decorators chained? Of course, babel 5.x gets it the wrong way and only babel 6.x applies them according to the specification. So the first example where the @nonconfigurable decorator comes first is the correct approach according to babel 6.x whereas the second would accommodate the behavior of babel 5.x.

https://gist.github.com/silkentrance/8133476645f9ce7bcf5b for a first stab at the impl

@silkentrance babel 6 does not officially support decorators yet https://phabricator.babeljs.io/T2645 perhaps you referring to the unofficial babel-plugin-transform-decorators-legacy ? In that case, yep, you're correct. You're also correct in regards to TypeScript's behavior. Both of which are correct as per spec.
Anyways, you're correct that I was backwards in every case except the non-compliant babel 5.

What was wrong with my original example?
function hypotheticalDecoratorThatMerges(target, key, descriptor) {
  if ('get' in descriptor || 'set' in descriptor) {
    const superKlass = Object.getPrototypeOf(target);
    const superDescriptor = Object.getOwnPropertyDescriptor(superKlass, key);
    // Merge the new descriptor in with the old one, which will
    // keep any existing get or set that we aren't overriding
    descriptor = { ...superDescriptor, ...descriptor };
  }

  return descriptor;
}

class Base {
  get foo() {
    return `hello ${this.value}`;
  }
}

class Derived extends Base {
  @hypotheticalDecoratorThatMerges
  set foo(value) {
    this.value = value;
  }
}

const derived = new Derived();
derived.foo = 'bar';
console.log(derived.foo);

REPL Example

@jayphelps Nothing is wrong with that example, I actually based the gist upon it. However, target can be either the class or the prototype (static vs. instance properties) so I felt that the decorator must differentiate between the two use cases.

hmmm if that's the case, this lib makes that mistake in all decorators that use target. But in my previous testing and now, it behavior seems correct? Can you verify?
Example in REPL

see above, just tested this with static and instance level props and it works just fine.

As for the name, how about @inheritprop or something along that line?

Yep, you're right it does blow away other descriptor options. I don't know why I thought it wouldn't. :dancers:
This seems to be correct: REPL
function hypotheticalDecoratorThatMerges(target, key, desc) {
  if ('get' in desc || 'set' in desc) {
    const superKlass = Object.getPrototypeOf(target);
    const superDesc = Object.getOwnPropertyDescriptor(superKlass, key);
    const { get, set } = desc;
    desc = {
      ...superDesc,
      get: get || superDesc.get,
      set: set || superDesc.set
    };
  }

  return desc;
}

function nonconfigurable(target, key, descriptor) {
  descriptor.configurable = false;
  return descriptor;
}

class Base {
  @nonconfigurable
  get foo() {
    return `hello ${this.value}`;
  }
}

class Derived extends Base {
  @hypotheticalDecoratorThatMerges
  set foo(value) {
    this.value = value;
  }
}

const derived = new Derived();
derived.foo = 'bar';
console.log(derived.foo);
// hello bar

const desc = Object.getOwnPropertyDescriptor(Derived.prototype, 'foo');
console.log(desc.configurable === false);
// true

Object.defineProperty(Derived.prototype, 'foo', {
  value: 'not going to work'
});
// Uncaught TypeError: Cannot redefine property: foo

@inheritprop still seems to ambiguous to me. It's not clear that you're merging the descriptor from the super prototype, and only if it's a get/set descriptor. I wonder if this behavior would in any way useful for the value descriptor type?
class Base {
  @nonconfigurable
  kickDog() {}
}

class Derived extends Base {
  @hypotheticalDecoratorThatMerges
  kickDog() {}
  // inherits configurable = false from super class
}

Nice! How about merge or just inherit? mergeDescriptor is awful long :grinning:

I struggle with super short names that are ambiguous. What happens when we want to add a decorator that also does merging but doesn't merge the descriptor, merges something else.
class Base {
  @merge
  foo = { first: 1 };
}
class Derived extends Base {
  @merge
  foo = { second: 2 };
}

const derived = new Derived();
const { first, second } = derived.foo;

That's probably a contrived example since I don't think such a decorator is really useful, but I like to keep this practice consistent even if I can't yet think of a real conflicting use case (that's kinda the point).
That said, I do make exceptions for obviously common conventions like autobind which is IMO very confusing if you aren't familiar with that convention, but expected if you are.
I might warm up to merge or inherit, but I haven't yet. I don't feel that the length of mergeDescriptor (or similar) is too long to outweigh the benefit it has of being immensely more self-descriptive to anyone coming into your code later.

No problem, I use very long and speaking names myself.


Practice Studio- Credential Assignment Launch

As a practice manager I should be able to launch Credential Assignment from my home screen.
AC: Given I am a practice manager , I should be able to see Credential Assignment quick link on my home page.
AC: Given I am a practice manager , clicking on Credential Assignment quick link, I should be Presented with the credential Assignment component.


improve types

Yes, I want to release a new patch!

make sure push the tag and leave a release note as well :) 👍

What about the version?
1.0.0-beta.0 OK?

we can go v1 if you are confident.

I will release 0.0.4-beta.0 👍

@bluebill1049 thanks!


Locate OmniSharp launch executable more robustly

This is a follow-up work item to PR #153. That change addressed a problem where searching for the OmniSharp launcher was failing on Linux because we assumed that the underlying system was case-insensitive. We had fixed it by simply changing the case of the executable that we searched for, but this is not necessarily robust against future OmniSharp changes.

BTW: 'fnd' is spelled wrong in that error message too.

thanks Gregg!


chore(dev): bump black pre-commit hook from 21.12b0 to 22.3.0

@behnazh thank you for the PR. Looking at the failing run I agree with you that the click package is the culprit.
There are two related problems with this scenario:

This morning Click shipped v8.1.0 which they say is a feature release (minor version update) which removes deprecated features — I would expect that to be a breaking change and therefore a major version update.
Black specifies its dependency of click like so: click>=8.0.0 which makes it vulnerable to picking up a breaking change and thus break itself.
Black fails because it attempts a from click import _unicodefun which is a private symbol by convention so that’s fragile anyway.

Welcome to version hell once more 🤓

Can you please also update this line:
https://github.com/jenstroeger/python-package-template/blob/1d7ab62da35cf2e211bd154832aa33293bde5cb5/.pre-commit-config.yaml#L40

Done.

@behnazh thank you for the PR. Looking at the failing run I agree with you that the click package is the culprit, but not alone.
There are three related problems with this scenario:
* This morning Click shipped [v8.1.0](https://github.com/pallets/click/releases/tag/8.1.0) which they say is a feature release (minor version update) which removes deprecated features — I would expect that to be a _breaking change_ and therefore a _major_ version update.

* Black specifies its dependency of click [like so](https://github.com/psf/black/blob/ae2c0758c9e61a385df9700dc9c231bf54887041/setup.py#L99): `click>=8.0.0` which makes it vulnerable to picking up a breaking change and thus break itself.

* Black fails because it attempts a `from click import _unicodefun` which is a private symbol by convention so that’s fragile anyway.

Welcome to version hell once more nerd_face

I'm not looking forward to it :wink:


hygiene task broke Travis CI build

As title, the files under build/tfs broke the Travis build. (gulp hygiene also failed locally)
$ gulp hygiene --silent
build/tfs/common/enqueue.js(7,1): Bad whitespace indentation
...
build/tfs/common/enqueue.js(124,1): Bad whitespace indentation
build/tfs/common/publish.js(7,1): Bad whitespace indentation
...
build/tfs/common/publish.js(274,1): Bad whitespace indentation

The command "gulp hygiene --silent" exited with 1.

I'm not sure if !build/tfs/** should be in eolFilter? or which types of files should be included in?
const eolFilter = [
	'**',
	'!ThirdPartyNotices.txt',
	'!LICENSE.txt',
	'!extensions/**/out/**',
	'!**/node_modules/**',
	'!**/fixtures/**',
	'!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot}',
	'!build/{lib,tslintRules}/**/*.js',
	'!build/monaco/**',     // why?
	'!build/win32/**',
	'!build/tfs/**',     // added line to pass the check
	'!build/**/*.sh',
	'!**/Dockerfile'
];

Fixed by @joaomoreno (https://github.com/Microsoft/vscode/commit/0a93ace1c79bd6515366f37ddaea620b51e2cf59)


Backspace adds space instead of deleting in the terminal

Lapce Version
Lapce Flatpak 0.2.8
System information
pop!_os 22.04 LTS
Describe the bug
When trying to delete something in the terminal (because of typo or so), the backspace acts like a space instead of backspace and delete the character/text.

seems to be fixed with newer version


python312Packages.hypothesmith: 0.3.1 -> 0.3.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python312Packages.hypothesmith is: Hypothesis strategies for generating Python programs, something like CSmith
meta.homepage for python312Packages.hypothesmith is: https://github.com/Zac-HD/hypothesmith
meta.changelog for python312Packages.hypothesmith is: https://github.com/Zac-HD/hypothesmith/blob/master/CHANGELOG.md
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.3.3 with grep in /nix/store/n2379zyd7q6pmjl0n43ji42cwy6iacrx-python3.12-hypothesmith-0.3.3
found 0.3.3 in filename of file in /nix/store/n2379zyd7q6pmjl0n43ji42cwy6iacrx-python3.12-hypothesmith-0.3.3

Rebuild report (if merged into master) (click to expand)

4 total rebuild path(s)

4 package rebuild(s)

First fifty rebuilds by attrpath
python311Packages.flake8-bugbear
python311Packages.hypothesmith
python312Packages.flake8-bugbear
python312Packages.hypothesmith

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/n2379zyd7q6pmjl0n43ji42cwy6iacrx-python3.12-hypothesmith-0.3.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python312Packages.hypothesmith https://github.com/r-ryantm/nixpkgs/archive/d8b44c07c7b01eb872575abd309f77f850d67b4d.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/d8b44c07c7b01eb872575abd309f77f850d67b4d#python312Packages.hypothesmith

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/n2379zyd7q6pmjl0n43ji42cwy6iacrx-python3.12-hypothesmith-0.3.3
ls -la /nix/store/n2379zyd7q6pmjl0n43ji42cwy6iacrx-python3.12-hypothesmith-0.3.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

4 packages failed to build:

python311Packages.flake8-bugbear
python311Packages.flake8-bugbear.dist
python312Packages.flake8-bugbear
python312Packages.flake8-bugbear.dist

4 packages built:

python311Packages.hypothesmith
python311Packages.hypothesmith.dist
python312Packages.hypothesmith
python312Packages.hypothesmith.dist

Maintainer pings

Already on staging-next.


Definition of user

Hi,
Please could you explain how you are identifying unique users. I have set up 2 test accounts in different groups, and signing in with different accounts in-app, in the store and in the OS seem to yield the default values only. Thanks.

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

ID: 06258b5b-b13f-74be-210d-69b75a520925
Version Independent ID: 62df4102-d658-4839-f6d8-41565deff355
Content: Run app experiments with A/B testing - UWP applications
Content Source: windows-apps-src/monetize/run-app-experiments-with-a-b-testing.md
Product: uwp
Technology: publish
GitHub Login: @hickeys
Microsoft Alias: hickeys

We are changing the way we track issues filed from our documentation pages: please see this blog post for more details. Right now, this issue is being closed but if you feel it is still valid and has not been addressed, please re-open it with any more available information. Please note that if your question is more general and not related to documentation, Microsoft Q&A is a great way to get questions answered.


Severity ignore case

This one will also merge the changes in Master into BugFixes.

looks good.

Thanks!


Move sections to another file?

To avoid conflicts and improve presentation, we should move each section for another file, for example:
sections/
  apps.md
  c.md
  css.md
  js.md

Especially if this list increase a lot.
Do you agree?

I believe this will be easier to update. But I never saw that approach before in another awesome list.

I like the idea, but I don't know if it would give the same awesome list feeling
let's innovate and test

hahahaha 😂, I'm just waiting a little longer to re-evaluat the need.


added optional window to avoid requiring 'jsdom' everytime

I added an optional options.window so I can now require('jsdom') and createWindow() before hand
kinda like that.
var posts = [ .... ]; // a large array of html content posts
var md = require('html-md');
var doc = require('jsdom').jsdom(null, null, {
          features: {
            FetchExternalResources: false
          },
          url: window ? window.document.baseURI : "file://" + (process.cwd())
        });
var win = doc.createWindow();

for (var i = 0; i < posts.length; i++) {
   posts[i].content = md(posts[i].content), {window: win});
}

I built and successfully tested locally, but didn't commit build files per your contribution guide
Thanks, great module btw.
closes issue#42

@akhoury, @toddself, I was wondering if there is any update on this as I'm keen to get this edge case fixed and behind us?

@neocotic I was not able to reproduce the heap issue that @toddself mentioned.
It's your call.

Sorry for taking so so very long to address this. I finally got around to doing the massive rewrite of this library that I wanted to. It's been renamed Europa and it's totally changed.
One key change that fixes this issue is that I've split up the project into several modules. europa is now only for browsers (and browser bundlers - e.g. browserify, webpack) and node-europa is now available for Node.js. This allows all Node.js-specific dependencies to be completely separated from that for the browser version. node-europa also contains the node-powered CLI.
I also bumped the dependency for jsdom to v11. While this means that node-europa requires Node.js version 6 or newer to be compatible with the same requirement on jsdom, it means no more contextify (yay! :fireworks:) This should be better for Windows users as well, who often had issues during the installation due to the somewhat complex external dependencies for contextify.
Most of all, if you want to install for browser or Node.js, now all you need is npm:
# For browser:
$ npm install --save europa
# For Node.js:
$ npm install --save node-europa

Both install quickly and have no confusing dependencies or external dependencies.
I'm closing this PR now as it's no longer valid. If you still use html-md, please give europa a shot and let me know how you get on.
Sorry again for the massive delay.


feat(alerting): Add support for placeholders in alerts of all types

Describe the feature request

MAINTAINER EDIT
Okay, I'm going to cheat a little and rebrand this feature request -- the purpose of this feature request will be to add support for the same placeholders that the custom alerting provider supports ([ENDPOINT_NAME], [ENDPOINT_GROUP], [ENDPOINT_URL]).

I just found not all notifications are born equal. For example Slack:

Teams:

There's no URL section for notifications sent to Slack.
Why do you personally want this feature to be implemented?
When a service dead. My first step is to check the service by hand in my browser to see if it is really dead. So I think it's important to add the URL in each notifications. Or at least there should be an option to configure it.
How long have you been using this project?
1 mo
Additional information
N/A

I mean, technically you could just specify the URL in the alert description.
To be honest, I wasn't even aware that Mattermost's alerting provider had the URL in the alert 🤣

  alerts:
    - type: telegram
      enabled: true
      send-on-resolved: true
      failure-threshold: 5
      description: "[ENDPOINT_URL]"

This config doesn't works for me

@Voolodimer That's normal -- what I meant is that at the endpoint level, you know what the URL is. It's in your configuration at endpoints[].url, so you could very well just include it in the description too:
endpoints:
- name: "..."
  url: "https://example.org"
  alerts:
    - type: telegram
      enabled: true
      send-on-resolved: true
      failure-threshold: 5
      description: "error at https://example.org"

As for [ENDPOINT_URL], it only works for the custom alerting provider.

@TwiN Thanks for the solution. But with this workaround we have to add it to each endpoints. I have over 100 endpoints with a default alerting configuration setup.

@TwiN, I can take this up and add URL to all alerting providers.

To be honest, I still think the description should be left without templating for 3 reasons:

You have to add this anyways on each of your endpoints:

  alerts:
    - type: <provider>

and it's not really that much more work to add an extra description:
  alerts:
    - type: <provider>
      description: "error at <url>"

Templating, while super useful when it comes to reducing the length of the configuration (and let's face it, the longer your configuration, the more easy it is to feel overwhelmed), makes it harder to search for real values. Yes, yes, this is a bit of a petty point, because the alert also contains the endpoint's name and group, and you could search for either of these, but being able to just copy the error and search for the string as-is in the configuration feels a little bit more intuitive to me. Not just that, but templating also encourages making things too generic, just like the example you gave that I re-used (error at <url>). It would be a lot more meaningful to customize your alert descriptions for each endpoint, thus maximizing the value of these alerts.
If [ENDPOINT_URL] is added, everything that the custom provider supports should also be added (except [ALERT_DESCRIPTION], I guess): [ENDPOINT_NAME], [ENDPOINT_GROUP] and [ALERT_TRIGGERED_OR_RESOLVED]. The latter is what causes an issue -- alerting.custom.placeholders.ALERT_TRIGGERED_OR_RESOLVED would need to be duplicated under alert and I don't know how I feel about that.

Anyways, I'm not 100% against it, but from my perspective, the benefits of adding this feature don't necessarily outweigh the risk. Ultimately, Gatus is a tool and how users make use of it is entirely up to them, hence why I'm not against it, but I still do try and steer Gatus in a direction that favors good practices.

@TwiN Thank you for explaining this. Actually because we have many nodes to monitor (100+). We use the following method to keep our config file smaller:
defaults: &default-alerts
  alerts:
    - type: email
    - type: telegram
    - type: slack

endpoints:
  - name: web
    group: xxx
    url: "https://example.com"
    # other options here...
    conditions: # ...
    <<: *default-alerts

It would be great if [ENDPOINT_URL] is usable as a variable in description in my case.

@gouku That's awesome, to be honest, I didn't think it would work out of the box 🤣
It would be a great addition to the README, if you're up to it.
But yeah, I'm fine with adding this, but only if the last point mentioned here can also be fulfilled.

Hello!
is there any update on this issue ?

@Voolodimer if you'd like this feature request to be prioritized, please react to the first message in the issue with 👍

Nice topic. Any updates on the placeholders topic?


Add Support as an extra tab

We should add an extra tab for support. This should load the Freshdesk Portal Knowledge Base, possibly as a web page integration. It should default to articles surrounding help with the app and reaching out to the support. Other categories like troubleshooting the miners should be accessible through the menu

@KevinWassermann94 Please can you share the url to embed?

@Andrewsopoku https://support.nebra.com/support/home

@Louisreed can you make some simple wireframe for this?

@marvinmarnold Sure thing

@marvinmarnold @Andrewsopoku @KevinWassermann94 Thoughts?

Thanks!
@KevinWassermann94 do you know how to make it default to articles about the app? Do we even have any yet?

@marvinmarnold @KevinWassermann94 is there a page on Freshdesk Portal Knowledge Base which is has "articles about the app", as requested in the acceptance criteria.

@Andrewsopoku We can get the documentation for the app set up today/ tomorrow

@Andrewsopoku You can link to here: https://support.nebra.com/support/solutions/24000003609
Content will be added to it, but link won't change

Closed by submission v1.0.4


Setting focus() on trumbowyg

Hola, haven't tried Trumbowyg extensively, but so far I like it.
I wanna set back the focus() after jquery $.post()
Tried on the .trumbowyg-editor and .trumbowyg-textarea elements like this $(".trumbowyg-editor").focus() with no luck.
Ah, and the $(".trumbowyg").trumbowyg('empty'); isn't working, at least from within my $.post done() function

Okay after changing .trumbowyg to #trumbowyg emptying the editor works now.
Aaaha, and after changing textarea from class to id I get the focus with
$('.trumbowyg-editor').focus();
Great :D

Just for clarification. It's not about id or class! Just used the wrong class, because trumbowyg is used for other elements. So changing class="trumbowyg" to e.g. class="rte" and everything works now as expected :+1: :)

good


Conditionally bundle gulp image_decoders-specific code in src/core/jbig2.js (PR 9729 follow-up)

This method/function was added only for the gulp image_decoders-builds, and is completely unused elsewhere (e.g. in the Firefox PDF Viewer).
While this only reduces the size of the built pdf.worker.js file by a little over 1 kB, it can't hurt to remove completely unused code from the "normal" builds.

/botio test

Unrelated to this patch, but from time to time I see this test should correctly render PDFs in parallel | in firefox failing.
Is it something we can fix or is it an intermittent we must live with ?

Is it something we can fix or is it an intermittent we must live with ?

I believe that it's a fairly recent intermittent failure, affecting only Firefox on Linux, and I thus suspect that https://bugzilla.mozilla.org/show_bug.cgi?id=1770088 is the culprit.

Thanks!


Add support for /proc/swaps

This code (both implementation and tests) is largely based on the existing mountinfo implementation.
Implementation of #244.

@mdlayher Does this look reasonable to you?


[Feature]: Use Open Build Service (OBS) to provide packages for many more popular GNU/Linux distributions

Suggestion Description
Currently ROCm packages are provided only for very few distributions. AMD should be using Open Build Service (OBS) to provide packages for many more popular GNU/Linux distributions and for much easier installation, and the packages are built from the single package specification for all the distributions.
Operating System
GNU/Linux
GPU
No response
ROCm Component
No response

@JLP Will check with internal team and let you know. Thanks!

@JLP Will check with internal team and let you know. Thanks!

If this can't be done, can you look into distributing the source RPM files for SUSE and RHEL? This would make community support on OBS and COPR much easier.

A good starting point would be the packaging the Fedora AI/ML SIG has done. It's been cleaned up and well-integrated for distribution tooling.

If this can't be done, can you look into distributing the source RPM files for SUSE and RHEL? This would make community support on OBS and COPR much easier.

I believe they're using CPack to produce both the official deb and rpm packages: https://github.com/ROCm/rocm-cmake/blob/a83c5075d85f1fd28d657a9277eb21c834d76f3f/docs/src/reference/ROCMCreatePackage.rst#L22


Disable ballerina pull integration test temporarily

Purpose
This PR will disable the ballerina pull integration test temporarily.

Closing this since the issue is fixed in master


Add some more file types.

This is probably not quite the right way to do this, but how can I get some new file types supported? I guess "support" is a bit ill-defined and may include 1. rendering a particular way in the UI (in simple descriptions, and also with specialized viewers) 2. permitting querying by file type. thanks!
And if we don't think the above matter, then what is the right type of blob data types like this?

Thanks! Merging..


wrapper.find variables are not updated by changes to the DOM

If you haven't found any duplicated issues, please report it with your environment!
Current behavior
const someDiv = wrapper.find('.some-class').at(0);
someDiv.simulate('keyPress', { charCode: 49 });
assert.isTrue(someDiv.hasClass('some-class__modifier'));

In enzyme 2.x this behaviour used to work, but after updating to enzyme 3.x it does not update the const. I guess this is to do with the new immutable behaviour of enzyme? Obviously we can't call .update() on the component because it is not the root. The current workaround is to simply do:
const someDiv = wrapper.find('.some-class').at(0);
someDiv.simulate('keyPress', { charCode: 49 });
const newDiv = wrapper.find('.some-class').at(0);

assert.isFalse(someDiv.hasClass('some-class__modifier'));
assert.isTrue(newDiv.hasClass('some-class__modifier'));

This test is arguably more explicit this way anyway, but I was wondering if anyone else had come across this same issue when upgrading to enzyme 3.x, and if so, how did they go about fixing it? Is it infeasible to have an update() call for child components?
Your environment
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.1.1",
"react-test-renderer": "16.2.0",
Version

library
version

Enzyme
3.3.0

React
16.2.0

Adapter

[x] enzyme-adapter-react-16
[ ] enzyme-adapter-react-15
[ ] enzyme-adapter-react-15.4
[ ] enzyme-adapter-react-14
[ ] enzyme-adapter-react-13
[ ] enzyme-adapter-react-helper
[ ] others ( )

This is exactly the solution; and it's an expected change in v3.


Push debian base images to ecr

Motivation
This handles the push of debian base images to ecr.
Have you read the [Contributing Guidelines on pull requests]
Yes
Test Plan
CI
Related PRs
None

/canary

:broken_heart: Test Failed - commit-workflow

/land


Multiple deployments: make sure all the TF config is passed onto the create deployment code

I am not sure what configuration is still missing, but at least the role boundary is.

Things that currently doesn't work with the multiple deployments feature:

Role Boundary (lambda_role_permissions_boundary )
VPN (lambda_attach_to_vpc )
Attach additional Policies (lambda_policy_json )


Reactor PLC not wanting to connect to Supervisor

Describe the bug
A clear and concise description of what the bug is.

The Reactor is about 5 chunks away from main base, but still should be within my player's chunk loading. I cannot directly force load this chunk, as I am on a server that limits doing so.
The Supervisor connects fine to the Coordinator.
However, the Supervisor will not connect or network with the PLC.
Supervisor Configuration:
https://i.imgur.com/0liVz2a.png
PLC configuration:
https://i.imgur.com/grFmp4j.png
The PLC in the log files state that it is "Timing out" and nothing else.
Edit: So it seems there is some kind of "Trusted Range" issue though the configuration states it is 0. Putting the Coordinator next to the PLC  now allows them to network.

Are you using a wireless modem or an ender modem? Wireless modems have a range affected by line of sight (i.e. walls reduce it), altitude, and weather. Ender modem have infinite & cross-dimensional range.

Oh yeah, that's definitely it.
I don't understand why they decided to make it that way, but it's definitely fixed now that I got everything upgraded to ender.


xxhdpi icon generated is of size 152X152 and not 144X144

Check the sizes here -
http://iconhandbook.co.uk/reference/chart/android/
Looks like one icon size is wrong and needs to be corrected.

Thanks. Fixed released now.


Feature/21 json mapping repository fix srp

related to https://github.com/EngineCodeDev/ec-commons/issues/21 - see description there.
all tests are passed

Generally I like the approach, some small comments added. Could you also add the save(...) method and serialising tests from feature/save-record-to-db?

no, because adding write method is in dedicated ticket: https://github.com/EngineCodeDev/weeds-plantcare-service/issues/26
This ticket is only for refactoring. Lest close it and then implement new method and new unit test related to it.


Support react 16.x

Hi,
Just found that React-Native 0.43 now depends on react 16.x (react@16.0.0-alpha.6), any plan for mobx-react to support react 16.x?
Thanks.

Afaik nothing should break with<EMAIL_ADDRESS>if you are interested, feel free to open a PR that bumps the dev and peer deps. If the testsuite succeeds we should be good to go :)

Hi, I've tried to upgrade to latest<EMAIL_ADDRESS>(FYI it's<EMAIL_ADDRESS>dependency) but failed due to lack of corresponding version for react-addons-test-utils, whose latest published version is<EMAIL_ADDRESS>So I end up with fixed versions:

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
Above code changes have been pushed to https://github.com/evisong/mobx-react/tree/issue_233_support_react_16
Unfortunately, npm run test:browser fails in the following test suites:
not ok 30 should be equal
  ---
    operator: equal
    expected: |-
      'child:3 - parent:3'
    actual: |-
      'child:3 - parent:2'
    at: Test.assert [as _assert] (file:///Users/evisong/dev/projects/evisong/evisong-mobx-react/test/browser/test_bundle.js:101803:17)
  ...
not ok 31 should be equal
  ---
    operator: equal
    expected: |-
      'child:5 - parent:5'
    actual: |-
      'child:3 - parent:2'
    at: Test.assert [as _assert] (file:///Users/evisong/dev/projects/evisong/evisong-mobx-react/test/browser/test_bundle.js:101803:17)
  ...
not ok 32 should be equal
  ---
    operator: equal
    expected: |-
      'child:7 - parent:7'
    actual: |-
      'child:3 - parent:2'
    at: Test.assert [as _assert] (file:///Users/evisong/dev/projects/evisong/evisong-mobx-react/test/browser/test_bundle.js:101803:17)
  ...
not ok 83 renderCount === 2
  ---
    operator: equal
    expected: 2
    actual:   1
    at: Test.assert [as _assert] (file:///Users/evisong/dev/projects/evisong/evisong-mobx-react/test/browser/test_bundle.js:101803:17)
  ...
not ok 84 renderCount === 3
  ---
    operator: equal
    expected: 3
    actual:   1
    at: Test.assert [as _assert] (file:///Users/evisong/dev/projects/evisong/evisong-mobx-react/test/browser/test_bundle.js:101803:17)
  ...
not ok 99 should be equal
  ---
    operator: equal
    expected: 'hello'
    actual:   'hi'
    at: Test.assert [as _assert] (file:///Users/evisong/dev/projects/evisong/evisong-mobx-react/test/browser/test_bundle.js:101803:17)
  ...
not ok 107 should be equal
  ---
    operator: equal
    expected: 3
    actual:   2
    at: Test.assert [as _assert] (file:///Users/evisong/dev/projects/evisong/evisong-mobx-react/test/browser/test_bundle.js:101803:17)
  ...

1..279
# tests 279
# pass  272
# fail  7

I guess those breaks are caused by React Fiber introduced in<EMAIL_ADDRESS>(https://github.com/acdlite/react-fiber-architecture), but I'm sure since it's still in alpha phase.
Do you suggest we wait for release version of<EMAIL_ADDRESS>or follow up as early as possible?
Thanks.

Afaik nothing should break with<EMAIL_ADDRESS>
Mobx-react will not work with React v16 without rewriting it to es6 classes or use standalone prop-types and create-react-class packages. Currently, with React v15.5.x, mobx-react is already polluting console with deprecation warnings.

Fixed in 4.1.6

Correction: fixed in 4.1.7


update Role based calls to new api version to support dataActions

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information

[x] The title of the PR is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[ ] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[ ] If applicable, the PR references the bug/issue that it fixes.
[ ] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[ ] I have read the contribution guidelines.
[ ] My spec meets the review criteria:

[ ] The spec conforms to the Swagger 2.0 specification.
[ ] The spec follows the guidelines described in the Swagger checklist document.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

Did a commit to Azure/azure-sdk-for-python:
https://github.com/Azure/azure-sdk-for-python/commit/abba98d954c8fdbca015dbb31bd5569da6e13186

Did a commit to Azure/azure-sdk-for-go:
https://github.com/Azure/azure-sdk-for-go/commit/daaa1ec076ef16fa1ba528db4290c9da610febdf

Did a commit to Azure/azure-sdk-for-python:
https://github.com/Azure/azure-sdk-for-python/commit/16477599f3622f683f6a6b50a101cd470ef7f378

Did a commit to Azure/azure-sdk-for-go:
https://github.com/Azure/azure-sdk-for-go/commit/5972911c65025b84a97634085d70e35dcc4ab9c0

Swagger to SDK encountered a Subprocess error: (Azure/azure-sdk-for-go)
Command: ['/usr/local/bin/autorest', '/tmp/tmp0j9huvcm/rest/specification/authorization/resource-manager/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmpb3is22rb']
Finished with return code 1
and output:
AutoRest code generation utility [version: 2.0.4244; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest

There is a new version of AutoRest available (2.0.4245).
 > You can install the newer version with with npm install -g autorest@latest

   Loading AutoRest core      '/tmp/.autorest/@microsoft.azure_autorest-core<EMAIL_ADDRESS>(2.0.4244)
ERROR: Syntax Error Encountered: Syntax error: can not read a block mapping entry; a multiline key may not be an implicit key
    - file:///tmp/tmp0j9huvcm/rest/specification/authorization/resource-manager/readme.md:181:4
[OperationAbortedException] Error occurred. Exiting.

Swagger to SDK encountered a Subprocess error: (Azure/azure-sdk-for-python)
Command: ['/usr/local/bin/autorest', '/tmp/tmphnqjrlbt/rest/specification/authorization/resource-manager/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmp20281fs2']
Finished with return code 1
and output:
AutoRest code generation utility [version: 2.0.4245; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/tmp/.autorest/@microsoft.azure_autorest-core<EMAIL_ADDRESS>(2.0.4245)
ERROR: Syntax Error Encountered: Syntax error: can not read a block mapping entry; a multiline key may not be an implicit key
    - file:///tmp/tmphnqjrlbt/rest/specification/authorization/resource-manager/readme.md:181:4
[OperationAbortedException] Error occurred. Exiting.

This commit was treated and no generation was made for Azure/azure-sdk-for-go

This commit was treated and no generation was made for Azure/azure-sdk-for-python

Since there are new operations, also adding @ravbhatnagar for review

On the other hand, we are moving away from current branch, please poke @marstr if you need help migrating the PR

Did a commit to Azure/azure-sdk-for-python:
https://github.com/Azure/azure-sdk-for-python/commit/0fafe0bf42bc54427e908250219bdfb78b2b884d

Did a commit to Azure/azure-sdk-for-go:
https://github.com/Azure/azure-sdk-for-go/commit/3299b1c356aafc70824a340b6b49c7d35bb5a6b2

Sorry @ravbhatnagar , I thought there were new operations, but that is not the case :)

This commit was treated and no generation was made for Azure/azure-sdk-for-python

This commit was treated and no generation was made for Azure/azure-sdk-for-go


Type annotation for named parameters

I'm now building my first Cloudflare Workers app, and the experience with Hono has been great so far!
During the development, I wish I could annotate types for named parameters. For example, if a named parameter is in the form of :param@number, c.req.param("param") evaluates to a value of type number. If no type is annotated (i.e., :param), its type should fall back to string. This is inspired by a similar feature of aspida.
With this syntax, users don't need to validate or convert number parameter on their own, so the code becomes simpler and less. Would it be possible to add this feature?
Below is a type-level PoC of my proposal (TS Playground link). I'm not familiar with the internal of Hono yet, so not sure about how easy/difficult it is to integrate this into your codebase.
type ExampleRoute = "/api/:author/:title@string/:price@number/:param@invalid";
declare const getterImpl: <
  Route extends string,
  Param extends EnumParams<Route>
>(
  param: Param
) => InferParamTypeFromRoute<Route, Param>;
const getter = <Param extends EnumParams<ExampleRoute>>(param: Param) =>
  getterImpl<ExampleRoute, Param>(param);

const author = getter("author"); // string
const title = getter("title"); // string
const price = getter("price"); // number
const param = getter("param"); // never
// @ts-expect-error
const nonExistent = getter("non-existent");

type InferParamTypeFromRoute<
  Route extends string,
  Param extends EnumParams<Route>
> = GetTypeFromObjectUnion<EnumParamTypes<SplitRoute<Route>>, Param>;

// EnumParams<"/:foo/:bar@number"> --> "foo" | "bar"
type EnumParams<Route extends string> = EnumParamTypes<
  SplitRoute<Route>
> extends infer T
  ? T extends T
    ? keyof T
    : never
  : never;

// GetTypeFromObjectUnion<{ foo: string } | { bar: number }, "bar"> --> number
type GetTypeFromObjectUnion<T, K extends string> = T extends T
  ? K extends keyof T
    ? T[K]
    : never
  : never;

// EnumParamTypes<[":foo", ":bar@number"]> --> { foo: string } | { bar: number }
type EnumParamTypes<Params extends string[]> = {
  [I in keyof Params]: Params[I] extends `:${infer Name}@${infer Type}`
    ? Record<Name, TypeNameToPrimitive<Type>>
    : Params[I] extends `:${infer Name}`
    ? Record<Name, string>
    : never;
}[number];

type TypeNameToPrimitive<T extends string> = T extends "string"
  ? string
  : T extends "number"
  ? number
  : never;

type SplitRoute<R extends string> = R extends `/${infer Head}/${infer Rest}`
  ? [Head, ...SplitRoute<`/${Rest}`>]
  : R extends `/${infer Root}`
  ? [Root]
  : [];

Uh, I noticed v1.3.0 was just released while I was writing this issue and it introduces #234. Need to cope with that...

Hi @yudai-nkt
Thank you for your proposal.
I think this feature is similar to RegExp routing.
app.get('/post/:date{[0-9]+}/:title{[a-z]+}', (c) => {
  const { date, title } = c.req.param()
  ...
})

It seems to be enough. What do you think about it?

Not really. In your example, :date{[0-9]+} only accepts numeric characters but the variable date is still of type string. On the other hand, the variable price in my example has a type number without converting it with Number(). I thought this is a handy way to handle named parameters that represent numbers.

I've understood completely. It's so convenient for capturing parameters.
Additionally, this feature can be used with RegExp routing like this:
app.get('/:author{[a-z]+}@string/posts/:id{[0-9]+}@number', (c) => {
  const author = c.req.param('author') // <-- to be string
  const id = c.req.param('id') // <-- to be number
  ...
})

Alright, we want to up this proposal. But can you implement it?
Just as you said, from v1.3.0, enabled getting named params at once.
app.get('/:author/posts/:id', (c) => {
  const { author, id } = c.req.param()
})

Please think about whether you can build it.

Okay, I'll take on that. I suppose I can have some time this weekend.

This is a very, very interesting feature!
However, I think it is difficult to determine the expected result.
I think that the following cases, which are limited to a narrow range by the regular expression, can be converted with Number(id) without hesitation.
app.get('/:author{[a-z]+}@string/posts/:id{[0-9]+}@number', (c) => {
  const author = c.req.param('author') // <-- to be string
  const id = c.req.param('id') // <-- to be number
  ...
})

But what happens in the following case where there is no regular expression restriction?
app.get('/posts/:id@number', (c) => { })

What should be the result of the following request?
app.request('http://host/posts/abc'); // "not found" or id => NaN ?
app.request('http://host/posts/1.2'); // id =>1.2 ?
app.request('http://host/posts/1e1'); // "not found" or id =>10 ?

I think that the user most wants to use "only accept an natural number in the routing and receive it as a number type from c.req.param".
If we want to get this result, we would need to do the following, which seems somewhat redundant.
app.get('/posts/:id{[0-9]+}@number', (c) => { })

And, the information given by UserAgent is not only the path, but also the query string.
While it is great to be able to type the components of a path, we still need to type the parameters that come from elsewhere.
app.get('/posts/:id{[0-9]+}@number', (c) => {
    const id:number = c.req.param('id'); // OK, it's great!
    const pageNumber:string = c.req.query('pageNumber'); // mmm...
    // or const pageNumber:number = parseInt(c.req.query('pageNumber'));
});

Maybe type the query parameter the same way?
I think it would be interesting to do the following.
app.get('/:username@string/posts?q=:q@string&offset=:offset@number', (c) => {
    const param: {
        username: string
        q?: string
        offset?: number
    }  = c.req.param();
});

Via defined class?
This is a very rough idea, but I think there is a way to implement the following.
It may not be possible 😇
declare global {
  interface HonoParameterTypeMap {
    "NaturalNumber": number;
  }
}

app.registerParameterType("NaturalNumber", {
    convert: (param: string) => parseInt(param),
    regExp: () => /[0-9]+/,
});

app.get('/posts/:id@NaturalNumber', (c) => {
    const id:number = c.req.param('id');
});

app.request('http://host/posts/abc'); // "not found" or id => NaN ?

I thought this should throw an error showing an informative message, but Number("abc") is NaN so it's not that simple.
On second thought, I now think my proposal was a bit immature. In the opening post, I said my proposal was inspired by a similar feature of another library, aspida. Aspida is a REST API client, which means it sends requests to existing API. So the type-safety gained by the :param@type syntax is helpful to prevent users from sending incorrect request to APIs they want to communicate with. They know what kind of requests are compatible with the API in advance.
In Hono, things are the way around. We build APIs with Hono that handles incoming requests not under the control of Hono users. So, the advantage explained above is not applicable here.
I suppose this issue can be closed for now until a more elaborated idea with enough consideration for edge-cases comes out. What do you think?

@yudai-nkt
I agree with you that Aspida defines types for client libraries and has a different purpose than Hono.
I think the difficulty with Hono is that it requires not only type definition on TypeScript, but also type conversion at runtime. I can't decide whether this issue should be closed or not, but I agree that it needs more elaborated consideration.

Hono [snip] requires [snip] type conversion at runtime.

Indeed. That exactly explains the problem.
I'm closing this as I can't come up with another solution with thorough consideration right now. In the meantime, I have several suggestions/questions that have occurred my mind during the development with Hono, so I'd be happy if I could contribute in those aspects!


Using Components as Templates does not work in hover text with MiniMessage

I am currently using MiniMessage for all my RGB message needs with a plugin I am developing, and so far I have been thoroughly impressed by its capabilities. However, the issue I'm running into occurs when using a Component object with the hover tag. For example, my plugin's chat prefix, correctly defined using MiniMessage color and formatting tags. It works in normal messages just fine. When I go to place it or any other Component in a hover using Template.of(), either the template shows as plaintext, or the hover (and click, when used) fails to show up/work at all. There are no error messages in the console and nothing in the logs. However, using a String (directly or with a template) works just fine.
Here's a simplified example of what I was doing when I found this bug:
Component prefix = MiniMessage.get().parse("<#FF0000>[Plugin]<reset>");
Component message = "<hover:show_text:'<prefix>'>This is a test message.", Template.of("prefix", prefix));
this.getServer().sendMessage(message).
The message will show up in chat just fine, but the hover will either say <prefix> or just not show up at all when mousing over the message. I believe the latter happens with more complex Components but I am not sure. Both have happened to me.
Conversely, when using a string, with no other changes, it works fine. The only thing that changes is the type of prefix:
String prefix = "<#FF0000>[Plugin]<reset>"; //this works
I am frankly baffled by this as based on HoverEvent.java it should work fine with Components, no?

Wrong repository lol


[US] NiceToHave - Add notifications when a user join/leave the channel

User Story
As a channel's user,
I want to see a notification when a user joins or leaves the channel,
so that I don't have to guess.
Expected Behavior / Acceptance criteria
/
Additional information
No response

Notifications can be tricky as we're still listening multiple rooms at the same time and would be weird to do it only on my activeChannel (then I don't know for other channel).

not required in the subject


Icon does not align properly inside an

When using an Icon component with the stackedLabel property as in the following, the icon is not inline with the rest of the Item content, but it's rendered on another line:
<Form>
  <Item stackedLabel>
    <Label> Time </Label>
    <Input />
    <Icon name='time' />
  </Item>
</Form>

Omitting stackedLabel or using inplaceLabel everything renders as expected.

any update on this ?


Add pod scenarios for custom application

Task:
This task is for providing a sample scenario for executing pod level chaos tests for a custom application ( acme-air app) deployed on the Openshift Container Platform.  Sample scenario will be added to the existing scenarios directory .

PR:   https://github.com/cloud-bulldozer/kraken/pull/62  (merged)


Code Generation

Hi,
I would like to know if did you use code generator or did you write from scratch?
Thanks

A code generator would be helpful, but no, direct translation.


Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours.

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours.
Originally posted by @github-actions[bot] in https://github.com/github/docs/issues/1530#issuecomment-732264809

#1541


Read and use MetaJSON & GeoJSON for page generation of Radschnellverbindungen Steckbriefe

Proposed changes
Read the RSV-data from json files.
Types of changes
What types of changes does your code introduce?

New feature (non-breaking change which adds functionality)

Checklist

[ ] Lint and unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)
[ ] Any dependent changes have been merged and published in downstream modules

Further comments

Related PR: https://github.com/FixMyBerlin/fixmy.rsv/pull/6

Before merging this, I would like to clarify how we provide the MetaJSON and GeoJSON files.