[theme] Custom Variant

[x] This is not a v0.x issue.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

I would love the ability to use a variant with any string and with that variant I could style the component using theme overrides. For example, let's say I have 4 types of buttons throughout my app and each button has a custom variant, inside theme I would simply use MuiButton with my custom variant names and style them as I please. The variant would act as an identifier and would give the theme more flexibility in styling the entire app and it would not tie me down to a preset list of variants.
Current Behavior 😯

Currently variants are limited and come with additional styling.
Context 🔦

Limits my ability to use theme to a greater extent and pushes me to style more locally than globally.

I'm not sure what you're asking for. It sounds like you can already do this via
import MuiButton from '@material-ui/core/Button';

function Button({ variant, ...muiButtonProps }) {
  if (variant === 'fancy') {
    return <MyButtonForVariantFancy />
  }
  return <MuiButton {...muiButtonProps} />
}

<Button variant="raised">Raised Material-UI</Button>
<Button variant="fancy">Fancy</Button/>

@philip-lf Could it be a duplicate of #13875 or #15454?

Thanks for your responses. @oliviertassinari , I don't believe they are the same.
Currently for Button I have these variants accessible to me:

Given two buttons, one with an outlined variant and the other without, the theme can target the button with the variant and style it specifically like this:
<Button  variant="outlined">
     Outlined Button
</Button>

<Button>
     Button
</Button>

const theme = createMuiTheme({
     overrides: {
          MuiButton: {
               root: {
                    backgroundColor: 'red'
               },
               outlined: {
                    backgroundColor: 'blue'
               }
          }
     }
})

The feature I would hope for is that a variant of any name can be applied and targeted through the theme. It would look something like this:
<Button  variant="customVariantName">
     Custom Button
</Button>

const theme = createMuiTheme({
     overrides: {
          MuiButton: {
               root: {
                    backgroundColor: 'red'
               },
               customVariantName: {
                    backgroundColor: 'blue'
               }
          }
     }
})

The variant would act as an identifier that could be accessed through the theme. So instead of applying unique styles to every component I would centralize my styles in one place.

@philip-lf Thank you for detailing the use case! It's definitely a problem we are interested in solving. It looks like a duplicate. In theory, if we solve the problem for the color prop, we can solve it too for the variant prop with little effort.

I am interested in creating custom variant in Typography. It seems to be working, however there are errors in console.
Theme:
const theme = createMuiTheme({
 MuiTypography: {
   question: {
        fontSize: '14px',
        fontWeight: 'bold',
      }
 }
}

Code:
<Typography variant="question" > text </Typography>

Just works!
But with error in console: 🤕
checkPropTypes.js:19 Warning: Failed prop type: Invalid prop `variant` of value `question` supplied to `ForwardRef(Typography)`, expected one of ["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline","srOnly","inherit"].
    in ForwardRef(Typography) (created by WithStyles(ForwardRef(Typography)))
    in WithStyles(ForwardRef(Typography)) (created by FormLayoutDemo)
    in div (created by ForwardRef(Grid))

So the only change required is to not to threat this as an error?

@romanr Thanks for experimenting around with. People using TypeScript will also have an issue with the accepted values. I think that we can soften the static prop types to accept more values. The challenge is to keep the default values documented, while ideally have a dynamic check that the variant you are trying to use is defined.

Typescript — yes it would be lovely to able to use this without compiler errors.

This would be extremely helpful for creating Typography variants, our team wants to create more semantically named variants like sectionTitle, mutedHint, graphLegend etc. that we manage in the theme definition.

To add to that -- it's also just a bit nicer not to need to rely on variants involving older HTML element entities such as hx when you run out of sizes -- they are not entirely intuitive for things other than Headers (as the prefix involves). I currently have to resort to this as we designed around body1, body2 and caption which does not encompass enough variation for our designs 😢

MaterialUI has been a pleasure to work with but I'm surprised about the lack of support for custom colors/variants. I see this is bookmarked for v5 but the Oct. 2020 due date is some time away. Are there any updates / plans to support this in v4?

Wondering how you change the textColor of a button in variant reverse, as it is referred as "Label" , in the muiButton class.
Tried this, but for the outlined variant, the text color remains white and doesn't turned into the same color as the border
overrides: {
		MuiButton: {
			root: {
				backgroundColor: defaultTheme.buttons.backgroundColor,
			},
			label: {
				color: defaultTheme.colors.textColors.button.main,
				textTransform: "uppercase",
			},
			outlined: {
				borderColor: defaultTheme.buttons.backgroundColor,
				borderWidth: 3,
				color: defaultTheme.buttons.backgroundColor, <-- this doesn't change the color of the text in the button
				backgroundColor: defaultTheme.colors.whiteColor,
			},
		},
	},

Hi @oliviertassinari when do you think we can have this feature ? I really appreciate your hard work !

I'd love to see this sooner as well. Any chance to release this in some sort of beta?

This will surely help to extend components with lot of flexibility.

With this feature and style System expands to all components (and not just Box), this will be for me the best UI Toolkit ever.

<Typography variant="question" > text </Typography>

@roma @oliviertassinari
In My case, this is not working can you please check this.
https://codesandbox.io/s/material-demo-cw4in?file=/demo.tsx

@mehuljariwala you shouldn't expect this to work yet, I don't think. That's what this issue is open to ask for, and the most recent PR to attempt to fix it - #20203 - was closed without being merged.

Any updates about this "feature"? (this looks so simple to achieve if you think about the other possibilities that the theme provides, yet... I know about the static thing...)

I tried to override the Variant type in the createTypography but it didn't work.
I want to define a custom variant for semantics.
I'm not sure what the problem is because I was able to override createPalette diffto.

My approach can be unsafe, but the code below works at least to add custom Variant type. If you see a hidden danger in this approach, please let me know--I just started using TS...
declare module '@material-ui/core/styles/createTypography' {
  export interface Theme {
    noDecoLink?: NoDecoLink;
  }
  export interface ThemeOptions {
    noDecoLink?: NoDecoLink;
  }
  export type CustomVariant =
    | 'h1' // From to this point, defined in the vanilla Variant
    | 'h2' // let me know if I do not need this vanilla portion...
    | 'h3'
    | 'h4'
    | 'h5'
    | 'h6'
    | 'subtitle1'
    | 'subtitle2'
    | 'body1'
    | 'body2'
    | 'caption'
    | 'button'
    | 'overline'
    | 'subtitle1'
    | 'subtitle2'
    | 'body1'
    | 'caption'
    | 'button'
    | 'overline' // up to this point, defined as vanilla Variant
    | 'root' // newly added variant
    | 'tab'; // end of newly added variant

  // below is simple copy and paste from the createTypography.d.ts
  export interface Typography
    extends Record<CustomVariant, TypographyStyle>,
      FontStyle,
      TypographyUtils {}

  export interface TypographyOptions
    extends Partial<
      Record<CustomVariant, TypographyStyleOptions> & FontStyleOptions
    > {}
}

@WongyuChoi
Unfortunately, this unsafe and won't work because this allows you to add custom variants but when you try to use this variant, you will get a type error after all. You still need to redefine TypographyTypeMap, but this is not possible, as far as I understand.

@romanr Thanks for experimenting around with it. People using TypeScript will also have an issue with the accepted values. I think that we can soften the static prop types to accept more values. The challenge is to keep the default values documented, while ideally have a dynamic check to make sure the variant you are trying to use is defined.

Having strict prop types by default is one of the awesome features of MUI. It enables auto completion in the editor and provides a really nice development experience.

@oliviertassinari any estimated release date for it?

Would be great if custom button variants worked like typography...
function makeTypography (baseTheme: Theme): MyTypography {
  return {
    ...baseTheme.typography,
    myRedText: {
      color: red,
    }
  }
}

function makeMyTheme(theme: Theme) {
  return {
    ...theme,
    typography: makeTypography(theme),
  }
}

I am interested in creating custom variant in Typography. It seems to be working, however there are errors in console.
Theme:
const theme = createMuiTheme({
 MuiTypography: {
   question: {
        fontSize: '14px',
        fontWeight: 'bold',
      }
 }
}

Code:
<Typography variant="question" > text </Typography>

Just works!
But with error in console:
checkPropTypes.js:19 Warning: Failed prop type: Invalid prop `variant` of value `question` supplied to `ForwardRef(Typography)`, expected one of ["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline","srOnly","inherit"].
    in ForwardRef(Typography) (created by WithStyles(ForwardRef(Typography)))
    in WithStyles(ForwardRef(Typography)) (created by FormLayoutDemo)
    in div (created by ForwardRef(Grid))

So the only change required is to not to threat this as an error?

Have you tried to delete <React.StrictMode> from your index.js?

At least in v5 I've been able to get around this issue by using variants in my components theme:
import { createMuiTheme } from '@material-ui/core/styles';

const theme = createMuiTheme({
  components: {
    MuiButton: {
      variants: [
        {
          props: { variant: 'twitter' },
          style: {
            backgroundColor: '#00acee',
            color: '#FFFFFF',
            "&:hover": {
              backgroundColor: "#007cad",
            },
          },
        },
        {
          props: { variant: 'facebook' },
          style: {
            backgroundColor: '#3b5998',
            color: '#FFFFFF',
            "&:hover": {
              backgroundColor: "#314c85",
            },
          },
        },
      ],
    },
  },
});

export default theme

Then use the button like so:
<Grid item>
    <Button variant="facebook" startIcon={<FacebookIcon />}>Facebook</Button>
</Grid>
<Grid item>
    <Button variant="twitter" startIcon={<TwitterIcon />}>Twitter</Button>
</Grid>

I was hoping to be able to do this with the color prop as well in v5, but have not been able to get it to work. 13875 was the closest issue I found to being able to customize the color prop. I would ideally like to be able to do:
const theme = createMuiTheme({
  palette: {
    twitter: {
      main: '#00acee'
    },
    facebook: {
      main: '#3b5998'
    }
  }
})

in my theme then:
<Grid item>
    <Button color="facebook" startIcon={<FacebookIcon />}>Facebook</Button>
</Grid>
<Grid item>
    <Button color="twitter" startIcon={<TwitterIcon />}>Twitter</Button>
</Grid>

As of v5 I havent been able to get something that prevents the prop error saying color "facebook" isnt ["primary", "secondary", "Etc...]

@kcarra Thanks for trying it out! We plan to continue pushing in this direction for v5:

This issue is still open to explore how we can extend the support of theme.components.X.variants to any prop, as you did with the <Button variant="">.
For a direct mapping between the color and the theme's palette, bypassing theme.components.X.variants, #13875 is the issue to follow.

@oliviertassinari I'm wondering if this issue can be closed then. As far as creating custom variants this seems to be working as expected in V5 using variants in your theme

If someone wants to avoid the typescript warnings in V4:
<Button variant={'twitter' as any} ... >...</Button>

If someone wants to avoid the typescript warnings in V4:
<Button variant={'twitter' as any} ... >...</Button>

I want to add custom variant in version 4. I have created my application with typescript.
For the following example variant is successfully added and working fine but i receive the typescript prediction errors
const FancyButton = withStyles ({
root: {........},
contained: {..............},
containedPrimary: {........................},
customVariant: {
backgroundColor: "red",
}
})(Button);
Click // example is working fine but typescript prediction errors show on compile time.
How i solve typescript prediction

How i solve typescript prediction

@Ravindersingh1526 you need to add these new variants with TypeScript module augmentation, please see https://next.material-ui.com/customization/theme-components/#adding-new-component-variants for an example.

As this API is already available, I am closing this issue. You can take a look on how it can be done on this guide.


Proposed fix for Issue #81 (deprecated constructor always throws an exception)

Proposed fix for Issue #81:

Drops OgnlContext(Map values) constructor that always fails with an
Exception.
Additional comments for remaining two constructors.
Changed constructor to ensure _values Map can no longer be null.
Added comments to setValues(Map value) and getValues() for clarity.
Added @Override annotations to Map interface methods.

Hello OGNL Team.
This PR should address the concern raised in the issue with a little low-risk cleanup added as well.
Other than dropping the deprecated constructor, this PR also ensures the context's values Map cannot be initialized to null (given the usage in the rest of the class, allowing a null values Map does not seem to make sense).  That could impact someone who intentionally set the values to null, but preventing this in 3.2.x seems worth that small risk (and the JavaDoc comments indicate null parameters will be set to defaults - except for MemberAccess which cannot be null).
Let me know what you think.

Struts build passed with a SNAPSHOT version, I will wait a bit before pushing a new release


fix: use Nan::Utf8String instead of v8::String::Utf8Value (fixes #37)

It looks like using Nan::Utf8String instead of v8::String::Utf8Value like we did on node-serialport/#1843 will fix #37 (and hopefully not break anything in the process).
node_modules\diskusage\src\main.cpp(26): error C2440: '<function-style-cast>': cannot convert from 'v8::Local<v8::Value>' to 'v8::String::Utf8Value' [C:\Users\User\Documents\tmp\node_modules\diskusage\build\diskusage.vcxproj]
  c:\users\User\documents\tmp\node_modules\diskusage\src\main.cpp(26): note: No constructor could take the source type, or constructor overload resolution was ambiguous

Tested and works back to Node v0.10.48, thanks!


Chore/updates

Summary of Changes

Disable scss_lint
Convert to CircleCI 2.0 for blazing fast tests

Before:

After: (albeit I disabled the whole ruby gems jank)

Merging can be performed automatically with one approved review.


only HTML snippets

Hi,
I am only able to use HTML snippets, there is not typescript like a-component snippets available to me for some reason...
VS Code version 1.9.1
Angular2 snippets version 2.0.3

the snippets work when they are in a file of that extension.
so typescript snippets only work when in a saved file with foo.ts


[Java] FuryPooledObjectFactory getFury refactor, remove redundant recursive call

What do these changes do?
Before this refactor, when pooled fury cache not present:

double check cache present
put in cache
recursive call get function

In order to avoid recursive call, we could return cached obj or newly added cache object
thus rename addCache to getOrAddCache

LGTM, thanks for taking time to optimize this, @mof-dev-3
The code style check has some failure, could you fix this?

You can use mvn spotless:apply && mvn checkstyle:check to check code style

You can use mvn spotless:apply && mvn checkstyle:check to check code style

Done.


Warnings removed.

'characters' is deprecated: Please use String or Substring directly

Codecov Report

Merging #13 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master    #13   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           3      3
  Lines          87     87
=====================================
  Hits           87     87

Impacted Files
Coverage Δ

SwiftCop/Trial.swift
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Carbon copy (with minor tweaks) review process from ASP.NET Core.

Lifting the review process from ASP.NET Core over to .NET Aspire. We can evolve from here.
Microsoft Reviewers: Open in CodeFlow

@davidfowl or @ReubenBond approval please :)


Assist Microphone - Failed to start add-on

Hello
I installed the Assist Microphone to utilize my Jabra Speak 410 to test out the new updates.
However when I go to start the add-on I get the below error.
I have rebooted the device that Home Assistant is on a few times without success.
Is it possible to resolve this?
Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:138
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: October 12, 2023 at 9:32:03 PM (9 occurrences)
Last logged: 8:44:14 AM

Failed to to call /addons/47701997_assist_microphone/start - Image 47701997/amd64-addon-assist_microphone:1.2.1 does not exist for addon_47701997_assist_microphone

My Config Page is below.

It looks like the add-on may have failed to build. I just pushed an update, so let me know if you see this again after upgrading.

The update allowed the add-on to start
Thank you!

Just realized, after starting the add-on, it isn't being auto discovered by Wyoming under the Integration page.

Here are the logs for when I try to start Assist Microphone
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service assist_microphone: starting
s6-rc: info: service assist_microphone successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2023-10-13 15:12:36.056092304 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '131'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056198306 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '136'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056222613 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '139'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056247128 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '140'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056273755 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '134'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056591107 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '628'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056624336 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '623'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056650084 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '629'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056672730 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '620'. It is not used by any node and should be removed from the model.
2023-10-13 15:12:36.056697392 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '625'. It is not used by any node and should be removed from the model.
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
ERROR:__main__:Unexpected error
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/homeassistant_satellite/__main__.py", line 200, in main
    async for _timestamp, event_type, event_data in stream(
  File "/usr/local/lib/python3.11/dist-packages/homeassistant_satellite/remote.py", line 28, in stream
    async with session.ws_connect(url) as websocket:
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 779, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected

I've heard several reports of problems with the Jabra mics. The HA team is looking into it, but it may be necessary to try a different mic.


Remove async_trait

Note that native async traits don't support dynamic dispatch because they are not object safe (https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html#dynamic-dispatch), so most of our traits can probably not be converted yet.

I think we can close this issue.


Move model_builder content into functions

Just like in the other test_for_... modules, test_for_annotation.py should have the content of it's model_builder moved into separate functions for clarity.

I can do that if you want?


Remove deprecated table classes

Description
Remove deprecated table classes from HTML5 stylesheets.
Motivation and Context
The table styles have been deprecated since 2.3, time to remove
Type of Changes

New feature (non-breaking change which adds functionality)

Release notes.

Per https://github.com/dita-ot/dita-ot/pull/4358#pullrequestreview-1819108199


occasional crash on scenario loading in D3d9client

I had an occasional crash in void Scene::SetupInternalCamera(D3DXMATRIX *mNew, VECTOR3 *gpos, double apr, double asp)
at first timestep
I suggest to add a test on camera.vnear on the following line in OVP\D3D9client\scene.cpp
// Something is very wrong... abort...
if (Camera.hObj_proxy == NULL || Camera.vProxy == NULL ) return;
and change it to
// Something is very wrong... abort...
if (Camera.hObj_proxy == NULL || Camera.vProxy == NULL || Camera.vNear == NULL) return;

Good catch, I will check it a bit and make a PR once tested.


nixos/qemu: Support System Management Mode

Description of changes
Depends #207039.

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Needs a rebase.

I will rebase this shortly, @baloo do we have an idea of what's going on with SMM BTW? I feel like this is bugged/broken but still compelled to fix it and make it work properly I guess?

I'm not sure I'll have time to debug that right now, but I'd be happy to take a look when I have some more.

Superseded.


Install script should ask for which shell it installs fzf

Category

[x] fzf binary
[x] Etc.

OS

[x] Mac OS X

Shell

[x] bash
[x] zsh
[x] fish

Hi!
I'm mainly using fzf on my mac and installed it with homebrew. After upgrading, I run /usr/local/opt/fzf/install. But the install script always generates files for all shells, so I need to do a manual clean-up every time I update fzf... Is it feasible to ask for which shells it should install itself?

Probably. What is your main shell? The install script does 4 things:

Add fzf/bin directory to $PATH
Add man page directory to $MANPATH
Set up fuzzy completion
Set up key bindings (CTRL-T, CTRL-R, and ALT-C)

The first two things are already handled by homebrew, the latter two are just two lines loading script files from fzf. For bash, this is it:
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.bash" 2> /dev/null

# Key bindings
# ------------
source "/usr/local/opt/fzf/shell/key-bindings.bash"

So you can consider manually adding those lines to your .bashrc (or equivalent lines to .zshrc) if you don't like the clutter install script creates.


Not working on IOS

Hi, I just tried your plugin and it works fine on android using Ionic, but apparently, when I try to get the frequency on iOS, the AddEventListener does not trigger, what can be the issue ?
Thanks :).

Hi, @dajxr8 I am also facing the same issue. Have you got the solution?

@moust Would you have any idea why we're having this issue with the latest versions?


APPS 191: Added default values for Share's AIMS environment variables

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

What about minimal values? Can you update that as well?


"Dragomirești", "Borniș", "Hlăpești", "Mastacăn", "Unghi" and "Vad" are listed in the drop-down menu

Description:
"Drăgănești", "Borniș", "Hlăpești", "Mastacăn", "Unghi" and "Vad" are listed in the drop-down menu alongside its corresponding county and commune, according to the law
Precondition:
The website is up an running.

Step 1
Type "Dragomirești" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Dragomirești, NEAMȚ (Dragomirești)" and "Comuna Dragomirești, NEAMȚ".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Type "Borniș" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Borniș, NEAMȚ (Dragomirești)".

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 5
Type "Hlăpești" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Hlăpești, NEAMȚ (Dragomirești)".

Step 6
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 7
Type "Mastacăn" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Mastacăn, NEAMȚ (Dragomirești)".

Step 8
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 9
Type "Unghi" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Unghi, NEAMȚ (Dragomirești)".

Step 10
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 11
Type "Vad" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Vad, NEAMȚ (Dragomirești)".


Editor lacks with crazy amounts of decorations

I use the Rainbow-brackets extension that adds a colourful decoration per bracket-pair. When typing in large files that causes the editor to stall from time to time. This is what I did for the attached profile

install rainbow brackets
open vscode.d.ts
start profiling
spend some time to write jsdoc comments
from time to time you'll notice the editor taking a pause, the profile hints to _deltaDecorationsImpl

Two things we should consider

As with other decorations (find, diagnostics, occurrences) we should maybe cap the number of decorations
The profile shows warning about detaDecorations being not optimised by too often optimised.

CPU-20161117T110434.cpuprofile.zip

It also has to do with batching calls. The rainbow brackets extension does a this.textEditor.setDecorations(key, value); for every decoration/range. If the ranges of same decorations are concatenated to reduce calls, it is much faster.
From my tests:
Batched: 7.501ms
Non-batched: 34.828ms

We need to add a maximum decoration count in the extension host side (similar to how we cut off errors...)

This has been improved substantially with the interval tree reimplementation of decorations, so closing for now...


Meta: Refine labels for Issues/PRs

What is your suggestion?
Pulling out a discussion on a merged PR (#3539), for visibility.

Discussion w/ @joelostblom

Just a note if you wonder why I added an additional label to this PR @dangotbanned . We try to always have one of the labels listed here on each PR: https://github.com/vega/altair/blob/main/.github/release.yml. GitHub then organize each PR into its corresponding section of the release notes automatically when creating the release via GitHub's interface. I don't have a strong opinion about labels not listed there, so feel free to add more to that list if there are some additional labels/sections you think would be useful.
I looked into automating the addition of a label to each PR via a GitHub action based on the conventional commit type mentioned in the PR title, but there was no such action so I just check through the closed PRs every now and then and label the ones that are missing one of the four labels our release notes are based on.

Originally posted by @joelostblom in https://github.com/vega/altair/issues/3539#issuecomment-2294449707

No worries @joelostblom
I won't be able to test right now, but main/.github/release.yml looks like you can map multiple labels to each title?
E.g. this had the dependencies label, which could fall under maintenance.
If that can work, I think that would be worth doing as there are other labels that wouldnt be picked up currently

Originally posted by @dangotbanned in https://github.com/vega/altair/issues/3539#issuecomment-2294466310

Yup, we can map additional labels just like you said. Another option would be to remove the labels we haven't used much in the past like dependencies and usability. I don't really have a preference since I mostly use the four other labels, but if you believe that these additional labels are useful, then I'm happy for them to be added.

Originally posted by @joelostblom in https://github.com/vega/altair/issues/3539#issuecomment-2294632285

Current labels
Labels in bold have a group in release notes.
I've added the position the group appears in https://github.com/vega/altair/blob/main/.github/release.yml

bug (2)
dependencies
documentation (4)
duplicate
enhancement (1)
good first issue
help wanted
maintenance (3)
needs-info
question
usability
v6
vega-lite-related

Other projects
I may add to this later, but using polars as an example since they seem to have the CI workflow that @joelostblom was interested in
polars
Result

https://github.com/pola-rs/polars/releases

Config

https://github.com/pola-rs/polars/blob/main/.github/release-drafter-python.yml
https://github.com/pola-rs/polars/blob/main/.github/workflows/pr-labeler.yml
~~https://github.com/pola-rs/polars/blob/main/.github/workflows/release-drafter.yml~~
https://github.com/pola-rs/polars/blob/main/.github/pr-title-checker-config.json

Edit
I linked the wrong release-drafter.
This one has the autolabeler @joelostblom mentioned

https://github.com/pola-rs/polars/blob/main/.github/release-drafter.yml

@joelostblom two labels I think could be helpful relating to https://github.com/vega/altair/discussions/3548#discussioncomment-10407366
New labels
breaking
To signal a PR will require a MAJOR version bump
deprecation
To signal a PR will require a MINOR version bump.
This won't be the only reason for a MINOR version, but it is the most obvious.
Also, it is likely something we'd want displayed in its own category in the release notes.
Examples
I think https://github.com/pola-rs/polars/releases/tag/py-1.0.0 is a good pattern to follow, in terms of prioritising the order of these new labels in release notes.
Although I've been doing some work lately on performance improvements in #3547, I don't think we need a category for it like polars.
It is certainly nice to have, but performance is a much higher priority for them than altair.

I've just added the new breaking, deprecation labels.
@joelostblom am I understanding this correctly, that we just need to add a category for each of these before - title: Enhancements?
https://github.com/vega/altair/blob/712680b2965eede4c40d93f52d3f963c5d181587/.github/release.yml#L1-L5

Was thinking about this as a new label during https://github.com/vega/altair/pull/3536#issuecomment-2367591832
blocking
This wouldn't appear as a category in the release notes, but I think would be helpful when coordinating a new release.
When someone opens as discussion like https://github.com/vega/altair/discussions/3478 they could clearly see issues/PRs that must be resolved prior to the next release

Yup, that should be all that is needed. You can see a few more options and examples in the GitHub docs in case it's helpful.

Yup, that should be all that is needed. You can see a few more options and examples in the GitHub docs in case it's helpful.

Thanks, I'll try to take a look soon


use pathutils for paths

https://nim-lang.org/docs/compiler/pathutils.html seems really great (see also https://forum.nim-lang.org/t/7190) and I would link to think how to use it to manage all paths that nimib needs (src, docs, templates, static assets)

what should I keep track when using nimib?

the source full path of the file that contains the document (the one that cointains the call to nbInit).
the directory where the output doc will be put and the corresponding filename (more than one if I am in multidoc context)
the directory where to find templates for html (if not taken from memory)
the directory of static assets relative to where the document will go (in order to put the correct link in html).
will I need a directory where to find a configuration?
directory for other more dynamic "context" files (e.g. a json that will contain common navigation context)?
keep track of where other files produced in code (e.g. images or other text files) are kept (this is relative to current directory but this also can be changed)

some reminders since I keep looking for the same stuff again and again.
the following two can be derived using system.currentSourcePath (or system.instantiationInfo(fullPaths=true).filename, not sure if there is a difference):

curSrcDir: AbsoluteDir
curSrcFile: AbsoluteFile

this is easy with os.getCurrentDir:

curDir: AbsoluteDir

how to find current project dir (is that defined the one with the nimble file or that should be nimbleDir)?
there is macros.getProjectPath but I am only able to make it work at compiletime, not sure why.
it seems it is very little used and not much tested:

search in Nim repo https://github.com/nim-lang/Nim/search?q=getProjectPath&type=issues
search in github using nim keyword https://github.com/search?q=getProjectPath+nim&type=code

done in https://github.com/pietroppeter/nimib/commit/6719c02e19a3dfa72120c00a21aa58bbff064a11

done in https://github.com/pietroppeter/nimib/commit/6719c02e19a3dfa72120c00a21aa58bbff064a11


Further gprel sym+offset fixes

The previous logic for whether to allow gp addressing for symbol+offset
seems incomplete. I tested this C with vec declared in different ways:
extern VECTOR vec;
void Test(SVECTOR* v) {
    vec.vx = v->vx;
    vec.vy = v->vy;
    vec.vz = v->vz;
}

and results for gcc 2.7.2.SN<IP_ADDRESS>2 + aspsx 2.56 are:
C variable type                    | gp used?        | asm declaration
-----------------------------------+-----------------+---------------------------
extern                             | never           | .extern vec, 16
func static initialized            | always          | .sdata; vec.2: .word 1,2,3
func static uninitialized          | always          | .lcomm vec.2,16
global static initialized          | always          | .sdata; vec: .word 1,2,3
global static uninitialized        | always          | .lcomm vec,16
global initialized                 | always          | .sdata; vec: .word 1,2,3
global uninitialized               | only w/o offset | .comm vec,16
global uninitialized w/-fno-common | always          | .sdata; vec: .space 16

so it seems only symbols declared with .comm shouldn't be allowed to use
offset in older aspsx.

Ok, so there's a distinction between .comm and .lcomm. I'll have a look at this tomorrow and add some new tests based on my findings, thanks for raising this.


Remote errors are not properly propagated to clients

When one of our location returns an error, GraphQL::Stitching::Client doesn't propagate that error and raises no implicit conversion of nil into Array (TypeError) instead at this line:
https://github.com/gmac/graphql-stitching-ruby/blob/1be32f0dbd73bcaba5a4af7e7a5cdcd502298365/lib/graphql/stitching/executor/boundary_source.rb#L38
This is because that extract_errors!(origin_sets_by_operation, errors) is returning nil.
Looking at the implementation,
https://github.com/gmac/graphql-stitching-ruby/blob/1be32f0dbd73bcaba5a4af7e7a5cdcd502298365/lib/graphql/stitching/executor/boundary_source.rb#L162-L164
This flatten! is the crux.  It can return nil, in case the operation did not modify errors_result.

Thanks for the report, good find!

Thank you!


Pass value, not object, to onPress in updateIsActiveIndex

This caused issues in my onPress handlers that were expecting the value of the button, not the button object.

Until this merge done I'm doing using typeof
        if (typeof form.data === 'object') {
            setForm({
                ...form,
                data: form.data.value
            })
        }


Forbid sending messages to stopped conversations

If a conversation has finished, don't allow users to keep sending messages to each other

@Beyzary, what priority do you think this should have?

@kolayne p-medium

Want #17 to be fixed before this


OOM gms policy maps core dynamite

Summary
I receive crashed report analytics from googleplay everyday cause from out of memory for mapview I use for driver app and long running
here crashed log
crashed.txt
Reproducible sample code
<MapView
          initialCamera={initialCamera}
          ref={mapRef}
          showsCompass={false}
          onPanDrag={() => {
            cancelAnimationFrame(animationIdRef.current);
          }}
          paddingAdjustmentBehavior="never"
          style={mapStyle}
          provider={PROVIDER_GOOGLE}
          scrollDuringRotateOrZoomEnabled={false}
          onTouchEnd={() => {
            delayFollowUserLocationUntil.current = Date.now() + 5000;
          }}
          customMapStyle={customMap}>
          <ArrowMarker onLocationChange={onLocationChange} />
        </MapView>
      </Center>

Steps to reproduce
long running map view keep open using internet if you stay in cold weather can not repoduce (I think)
Expected result
expect not consume hight ram for long running
Actual result
for long running map will cause the app crashed
React Native Maps Version
1.14.0
What platforms are you seeing the problem on?
Android
React Native Version
0.73.6
What version of Expo are you using?
SDK 48
Device(s)
Galaxy S10 5G,Reno10 5G,Galaxy Note10+,Galaxy A55 5G,Model:Galaxy S22 Ultra
Additional information
I use expo 50 (in  selected expo version does not has 50)

@chanphiromsok this can't be accepted as a bug report since there is no way for us to reproduce what you're describing, specifically for OOM issues, you should run an android memory profiler and understand how memory usage change / grow with time, android offers amazing tools for that, check out:
https://developer.android.com/studio/profile/memory-profiler
you need to understand your app's memory footprint and what is causing the memory leak, once you identify it please submit a bug report with sample project and share your findings.

I am having the same issue running in an emulator.
"react-native": "0.73.1",
"react-native-maps": "1.9.1"

I am having the same issue. Currently I am running my app in an android emulator.
"react-native": "0.73.1",
"react-native-maps": "1.9.1",

I am having the same issue. Currently I am running my app in an android emulator.
"react-native": "0.73.1", "react-native-maps": "1.9.1",

I have found issue that my app is running foreground service for broadcast location and process is alive everytime I close and open the app the MainActivity and ScreenFragment cause memory leak so that when the user open the map screen it will cause app crashed but unfortunately I can not resolve it yet because I using react-native-screens


Allow addressing Registers by their number (e.g. x0)

Currently it is only possible to use a register by it's ABI-name. I think it would be nice, to be able to also use a register by it's number instead of it's name.
This is something I can implement and create a PR for it. But I wanted to ask if this is something you would be interested in having in this project before putting work into it.

There are a few things that make it a little trickier than it might seem, as there are some mechanisms, like register allocation, that can only reason about the ABI names. It would probably be a good idea to do change that logic to reason on x0 etc as that would help us avoid the confusion wrt fp and s0 both being the same as x8. I'd be happy to move to xk being the source of truth regarding identity, as long as we would still be able to pretty-print the ABI name in the IR, as that helps us reason about the logic. We would probably want to let the user specify what register should be printed in the assembly in case of ambiguity.

Thinking about it a bit more, I don't know of a good way to get roundtrippung to work wrt printing and parsing. We don't want to print the indices in the IR, as that would add a lot of noise, but without that I'm not sure how to recover the ABI name. What would you like this for? Is it for inspecting the IR when printed, or for reasoning about iR? Because there might be different solutions depending on the use-case you have in mind.

The main use-case I had in mind was actually being able to have for example x0 instead of zero in my assembly code, as I sometimes write x0 etc. and when I go to run the code and it doesn't work it takes some time to change it.
I definitely think that changing the logic to work with the register number would be the way to go. For printing I actually prefer the ABI names almost always, maybe a command-line flag could be useful to select whether to print the name or the number, or maybe, as an optional parameter for reg.dump and mem.dump to select what format to use.

Thanks for showing interest and offering to contribute @superenginegit!
I'm not 100% sure on what's the best way quite yet, but maybe a preprocessor pass during parsing to canonicalize register names could be an option?

I would say that a preprocessor pass would be a good way to go about this. I can't really think of another way that would work as well.

I think it would be really interesting to see what happens when the register is represented with a more complex structure that more accurately identifies it than just the string that we use currently. There are a few restrictions:

it has to be immutable
all register representations with the same bits in the binary encoding should be equal and have the same hash
it has to support registers outside of the current binary encodings (we use j0, j1, ... for extra registers)

Maybe something like this could work?
@dataclass(frozen=True)
class RISCVRegister:
  index: int
  name_hint: str = field(default="", hash=False)

class RISCVRegisterType(Data[RISCVRegister], TypeAttribute, ABC):
  ...

@irdl_attr_definition
class IntRegisterType(RISCVRegisterType):
    name = "riscv.reg"

x0 = IntRegisterType(0)
zero = IntRegisterType(0, "zero")
fp = IntRegisterType(0, "fp")
s0 = IntRegisterType(0, "s0")
j0 = IntRegisterType(-1, "j0")
f0 = FloatRegisterType(0)
ft0 = FloatRegisterType(0, "ft0")

If you have the time, could you try this out, and see what happens? Hopefully it would still preserve most of our logic for canonicalization and register allocation, while allowing for writing "x0" when that's more convenient.

@superenginegit, excuse my colleague, he thought this was an issue on another project of ours. I guess a good place to put the canonicalization would be around line 30 here: https://github.com/AntonLydike/riscemu/blob/f9e92d626e2f1ea8f3ef6deb49a95c31765984eb/riscemu/parser.py#L23-L33
And I probably wouldn't bother with creating a custom class for representing register names.

Thanks, I'll get started then.


Swapped socket.io for native WebSocket + node/ws

Tests need fixing

Otherwise looks fine, as soon as the checks pass I'll approve

Codecov Report

Merging #98 into version1 will decrease coverage by 0.33%.
The diff coverage is 88%.

@@             Coverage Diff              @@
##           version1      #98      +/-   ##
============================================
- Coverage     93.72%   93.38%   -0.34%
============================================
  Files            23       24       +1
  Lines           223      242      +19
  Branches         29       30       +1
============================================
+ Hits            209      226      +17
- Misses           13       15       +2
  Partials          1        1

Impacted Files
Coverage Δ

src/malcolm/malcolmReduxMiddleware.js
100% <100%> (ø)
:arrow_up:

src/malcolm/malcolmSocket.js
100% <100%> (ø)

src/malcolm/malcolmSocketHandler.js
88% <75%> (-5.75%)
:arrow_down:

Continue to review full report at Codecov.

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


Exposé API for fetching MIME type for given extension

That would be really helpful for setting content-type header to proper values when you deal with something more than just JSON, HTML, and plain text.

Thank you for raising this. I am currently cleaning up the API and also noted that I only ever put 3 MIME types in the enum for SETTING it. (You can always set the header manually if you need other mime types though).
The function you are looking for is already present and called: setContentTypeFromPath. It sets the mime type header based on the path in the request and is used in the hello2 example.

@renerocksai yes, but it uses request path, and I am setting it to value that may differ from the request path extension. I want to be able to provide my own extension/filename. My current code for that is:
pub fn setContentTypeFromFilename(self: *const Self, filename: []const u8) !void {
    var ext = std.fs.path.extension(filename);

    if (ext.len > 1) {
        var e = ext[1..];
        var obj = zap.http_mimetype_find(@constCast(e.ptr), e.len);

        if (zap.fio2str(obj)) |mime_str| {
            try self.req.setHeader("content-type", mime_str);
        }
    }
}

So what you're saying is that you want this function to be merged into zap?
I can certainly do that.

I just put this into zap's Request struct and tested it via the hello example:
    /// Tries to determine the content type by filename extension, and sets it.
    /// If the extension cannot be determined, NoExtensionInFilename error is
    /// returned.
    pub fn setContentTypeFromFilename(self: *const Self, filename: []const u8) !void {
        const ext = std.fs.path.extension(filename);

        if (ext.len > 1) {
            var e = ext[1..];
            var obj = fio.http_mimetype_find(@constCast(e.ptr), e.len);

            if (util.fio2str(obj)) |mime_str| {
                try self.setHeader("content-type", mime_str);
            }
        } else {
            return error.NoExtensionInFilename;
        }
    }

I'll probably create a breaking (API cleanup) release very soon; your function will be in there :relaxed:


upgrade from version 9 to 10 with respect to the new structure

Hi @dcblogdev, what would be the steps to upgrade to the version of structure from v9 to v10 or to keep the structure of version 9 as there are several modules with several files, (is there a way to keep the previous structure preferably v9).
in documentation I have not found anything related  https://laravelmodules.com/docs/v10/introduction ,
v9 capture

v10 capture

or is it only possible by setting up the above configuration or is additional configuration required?

I have 10 laravel applications using version 9 laravel-modules and I am interested in upgrading to version 10, 3 of them the clients are asking me to upgrade to laravel 10 and I also need to upgrade the modules package.

you won't have to change the modules at all, just the composer version, possibly the config with recent changes. The config structure only applies for making new modules.
You're existing modules should work as is, the only caveat is if you're planning on using vite centrally then you would need to update the vite configs for each module.
You can move the folder structures around as needed, if you use an IDE like PhpStorm it will update namespaces for you if you move files into different directories, as I say its not needed to change

@dcblogdev has said it all.

The changes will not affect your old modules, only newly created modules.

However, if you like the new structure, kindly move and rename the necessary files and folders, and remember to update the namespace accordingly!

You may want to delete the entire stubs and the config/modules.php and then run the vendor:publish command to publish the recent files after upgrading. Make sure to compare the changes (using git for instance).

Thanks to the 2, but I prefer the previous structure is cleaner in concept of access, although the new one is not bad either. (Although now I will have to do a little more configurations config to maintain previous structure hehehe), "It would be good if you could put in documentation an update section on the new structure explaining how little you can keep the previous version for old projects."


Don't know what to do

Help me fix this issue and I really don't know python guide me through it .
Thanks ayways

Your issue hasn't changed (#347).  You have an old version of the bot.

Resolved, probably worth closing this now.


import reverse shadow issue

from django_hosts import reverse
imports deprecated module django_hosts.reverse instead of most important and actually desired django_hosts.resolvers.reverse function, basically module effectively shadows the import currently in django_hosts.__init__.py, namely from django_hosts.resolvers import reverse.
Considering the fact that django_hosts.reverse module will be removed in the next version anyways, nothing needs to be done. This issue is opened simply to record that from django_hosts import reverse will not work as desired until next release.

Damn, you're right, I hadn't realized that, one of the things I seem to forget the details of Python's import system. Hmm, I guess I better release the new version sooner ;)

Fixed in 1.2.


V3 Line 604 - Calling wrong function for lnk files?

In version 3 of AddShortcuts.ps1, on line 604:
$lnks += getAllValidExtsForDrive -path $res -drive $drive -prefix "$($profiledir)\Desktop\" -extension ".lnk"

Should be
$lnks += getAllValidLNKSForDrive -path $res -drive $drive -prefix "$($profiledir)\Desktop\"

using getAllValidExtsForDrive does not check for the target object's existence

Fair point.  Long time since we've really used mapped drives etc in our environment so I guess I overlooked this.
Cheers for the feedback


Default to site.url

Not sure what you think about the spec changes, but I gave it a try :)
Close #81.

Looks good to me!

@parkr anything more for me to do before merge? anything I can help with to get this in a release?

I guess one thing is that the "Prefix" section in the README should be updated.
Current text:

If site.baseurl is set, its value is used as a prefix for the redirect url automatically. This is useful for scenarios where a site isn't available from the domain root, so the redirects point to the correct path.

Note: If you are hosting your Jekyll site on GitHub Pages, the prefix is set to the pages domain name i.e. http://example.github.io/project or a custom CNAME.

Suggestion:

If site.url is set, its value is used as a prefix for the redirect url automatically. This is useful for scenarios where a site isn't available from the domain root, so the redirects point to the correct path. If site.url is not set, site.baseurl is used.

Note: If you are hosting your Jekyll site on GitHub Pages, and site.url is not set, the prefix is set to the pages domain name i.e. http://example.github.io/project or a custom CNAME.

@parkr sorry for the delay, I've tried address your concern
I see that you assigned this to yourself... I hope I'm not too late... :)

@parkr rebased with master

I would really like to see this merged. Is there a hack for this in the meantime?

@dentarg Sorry for the delay.
There are conflicts that prevent me from merging. Would you mind rebasing against current master once more? **@**mention me once this branch has been updated :+1:

@pathawks we are now update to date once again :)

LGTM.

LGTM

LGTM. Still.

Forgot about Jekyllbot. Will update the history manually. Thanks again @dentarg!


Fix minor typos in Azure Spot VMs

@kerolloz : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Looks good; thanks for this update @kerolloz.


adding main

Branch 1.1 is to understand how pull request works, i will now add local, output and variable in branch 1.2 and merge it.


AgoraRtmClient

I am trying to make an agora live stream and this error is ocure
Unhandled Exception: login failed errorCode:5
AgoraRtmClient.login (package:agora_rtm/src/agora_rtm_client.dart:229:7)

sorry for the late reply, have you double-checked the appid and token?


Release 2.12.0

Also test on vanilla Kubernetes clusters as part of the release process
Switch from alpha to stable maturity

Checklist

[X] Commits are signed with Developer Certificate of Origin (DCO)
[x] Test that the bundle is deployable and functional on OpenShift instance
[x] Test that the bundle is deployable and functional on a vanilla Kubernetes cluster

/lgtm

Release complete: https://github.com/k8s-operatorhub/community-operators/pull/3501


Exposing messageBubbleExtraVerticalSpace on flow layout

to work around boundingRectWithSize being slightly off for different fonts issue.
This value is exposed because the right choice could depend on your choice of messageBubble font. If you find that your chat text is for example magically cut off or has too much space, adjust this value until you find the right visual fit. While it's not the right solution, the default magix number of 2.0f is only appropriate for the default font, each font seems to be calculated slightly off in its own way.

Hello everyone!
I'm sorry to inform the community that I'm officially deprecating this project. 😢 Please read my blog post for details:
http://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/
Thus, I'm closing all issues and pull requests and making the necessary updates to formally deprecate the library. I'm sorry if this is unexpected or disappointing. Please know that this was an extremely difficult decision to make. I'd like to thank everyone here for contributing and making this project so great. It was a fun 4 years. 😊
Thanks for understanding,
— jsq


ember cli-rails as dependency rather than a devDependency?

Wondering why
heroku config:set NPM_CONFIG_PRODUCTION=false
Would there be an issue separating devDependencies from Dependencies and treating ember-cli-rails as a normal dependency (and leaving the heroku flag at true)? In general there could be a few devDependencies that need not be included in the prod build.

Unfortunately, this was a workaround to ensure that npm installed node_modules/ember-cli/bin/ember, so that the EmberCLI process had access to the executable.
This code hasn't changed in almost a year, which is eons in JS-time.
Do you know if newer versions of NPM require a similar workaround?

@stripedpumpkin you are correct, bower should be declared as a dependencies value, not a devDependencies value in the root level package.json.
The original suggestion stems from a misunderstanding of how NPM managed local executables.
I'm closing this for now, and will follow it up with a change to the documentation.
THANK YOU!

@stripedpumpkin related: https://github.com/thoughtbot/ember-cli-rails/pull/507


Error while reopening repo in a container on Mac

Hi,
my current setup:

mac os (intel based)
vs code installed
docker installed
vs code remote extensions installed

I hope that anyone can help me in this. I followed the steps to clone and re open this repo as a container and i got the following error in vs code:
[6294 ms] Start: Run: docker inspect --type container dc629ce7ee7b
[6414 ms] Error: Command failed: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/Users/ivanrulik/CODE/ros2_dev_container,target=/workspaces/ros2_dev_container,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=/Users/ivanrulik/CODE/ros2_dev_container -l devcontainer.config_file=/Users/ivanrulik/CODE/ros2_dev_container/.devcontainer/devcontainer.json -e DISPLAY=1 -e WAYLAND_DISPLAY= -e XDG_RUNTIME_DIR= -e PULSE_SERVER= -e LIBGL_ALWAYS_SOFTWARE=1 --network=host --cap-add=SYS_PTRACE --security-opt=seccomp:unconfined --security-opt=apparmor:unconfined --volume=/tmp/.X11-unix:/tmp/.X11-unix --volume=/mnt/wslg:/mnt/wslg --ipc=host --entrypoint /bin/sh vsc-ros2_dev_container-df507b15657988327cf272376c66a73783fb93c2df810e2fe3f884c937eeedc7 -c echo Container started
[6415 ms] trap "exit 0" 15
[6415 ms] exec "$@"
[6415 ms] while sleep 1 & wait $!; do :; done -
[6415 ms]     at Tse (/Users/ivanrulik/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1946:3264)
[6415 ms]     at rO (/Users/ivanrulik/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1946:3200)
[6415 ms]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[6416 ms]     at async Xse (/Users/ivanrulik/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1961:2626)
[6416 ms]     at async vh (/Users/ivanrulik/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1961:3741)
[6416 ms]     at async gae (/Users/ivanrulik/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:2092:10213)
[6416 ms]     at async mae (/Users/ivanrulik/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:2092:9954)
[6422 ms] Exit code 1

In the docker extension of vs code I saw that the ros2_worksapce image was build and that a container is stopped. When I try to run the container I get this error message:
2023-05-13 10:31:41.694 [info] Error: Error response from daemon: Mounts denied:
The path /mnt/wslg is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/desktop/mac for more info.
Error: failed to start containers: dc629ce7ee7b7b9bdc7a9ce2aa2dbdba4590472c79073fc0257f0a5e68b126e6

Any advice or help on this matter is greatly apreciated as I do like this repo to develop my ros projects

It seems like the error got fixed when I commented out this line ("--volume=/mnt/wslg:/mnt/wslg",)  from thid file /.devcontainer/devcontainer.json


Sending long params in http body

I should send the webservice long parameters:
gameId: 123123
But getting the error with 400:
error = "Bad Request";
exception = "org.springframework.http.converter.HttpMessageNotReadableException";
message = "Could not read JSON: Can not deserialize instance of long out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@376b10a1; line: 1, column: 1]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of long out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@376b10a1; line: 1, column: 1]"
How to solve this problem? Thx
code is below:
let URL = IConstant.BASE_URL + self.prefix_removeGame
let parameters : [ String : AnyObject] = [ "gameId": removeGameRequest.gameId ]
Alamofire.request(.POST, URL, parameters: parameters, headers: LoginManager.getBasicAuth(), encoding: .JSON)
.validate().responseJSON { (response) -> Void in
            LoadingView.hideLoadingView(self.view)

            switch response.result {
            case .Success:
                self.mCouponResponse?.betHolders?.removeAtIndex(index)
                self.activeCouponTV.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)

                self.fillView()
                break

            case .Failure:
                if (response.response?.statusCode == 401) {
                    self.showErrorAlert("Need to login again")
                } else {
                    self.showErrorAlert(Utils.getErrorMessage(response.data))
                }

                break
            }

            debugPrint(response.response?.statusCode)
    }

Without more detail about what you've tried and the specifications of you backend service, it's hard to say where the issue is here. To get a broader audience for you question, use StackOverflow and tag Alamofire while providing as much context and detail you can about your backend service.
Asking Questions
We don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on Stack Overflow instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.


Support long-running execution

Certain use cases of Dagger require supporting long-running execution: running a DAG that will never terminate. This is different from today, where dagger up is expected to terminate, and might be force-terminated and return an error after a timeout period.
How do we support long-running execution without breaking support for regular, short-running execution? How do we allow both execution modes to co-exist, in a way that makes sense to the developer and the end-user?

@samalba Technically core.#Start still requires setting a maximum timelimit on how long you will wait for the process before forcibly stopping it, but that can be set to arbitrarily high numbers and the underlying implementation has no inherent limit on how long to wait. So I'll close this, when we need to add support for a use case that requires literally indefinite waiting (i.e. https://github.com/dagger/dagger/issues/1258) then it will be trivial and won't require a dedicated issue like this.


fixed start a campaign heading

fixed #152

Proposed Changes

Check List (Check all the applicable boxes)

[ ] Bug(s) fixed
[ ] Enhancement done
[ ] New Feature(s) added
[ ] Documentation changed
[ ] All new and existing tests passed.
[ ] My code follows the code style of this project.

Screenshots (if any)

Additional Information

looks good, thank you for your contributions!


how can i cancel(settle) the promise of running page ?

I want cancel or abort a running page, but the when promise cannot cancel.
Is there some way to abort the running promise with no exception like Cannot call reject() after the promise has already been resolved or rejected?
how about change the promise lib to bluebird, which is more popular, better api and performance.
thx!

What do you mean by cancel?
If you don't want resolve to be called by your success event listener, a common way to prevent double resolving or rejecting is by overwriting resolve or reject with an empty function, like Function.prototype.
phantom.run(function (resolve, reject) {
    page.open("http://www.google.com", function () {
        resolve(text);
    });
    // oops, I don't want this anymore
    resolve = Function.prototype;
    reject(new Error("I'm outta here!"));
})

Does this solve your issue?

how about change the promise lib to bluebird, which is more popular, better api and performance.

With the next major version, phridge will just use the global Promise object. Then you can use your own library.

"next major" sounds great~
the cancel i want:
javascript
when.promise(function(resolve, reject){
if(somecase){
cancel();         //thenA and thenB block will not be entered
}
}).then(function(){//then A
}).then(function(){//then B
})

thanks again~

That's basically what reject() does.

Sorry， my code is not express my mean.
cancel i want is cancel or abort a running promise from external:
javasscript
var promiseRef = when.promise(function(resolve, reject){
//some code
}).then(function(){//then A
//some code
}).then(function(){//then B
//some code
})
setTimeout(function(){
promiseRef.cancel()
}, 1000)

But as you said, most scene, `reject()` is ok
thanks agagin

phridge 2.0.0 shipped today with native promises


Hello Microverse Project

My first project using linters

Thanks Ramoun for the boosting my confidence, I've noted down your note, will take care in future.

Thanks Ramoun for  boosting my confidence, I've noted down your note, will take care in future.


MiqExpression - quote even values with backslashes properly

Previously, a filter like field includes value would only escape apostrophes in the value
for values like Windows paths (ie r'foo\bar'), this would generate illegal ruby code, leading to unexcpeted $end on eval.
Since Object#inspect should always generate properly escaped ruby code, using that one.
https://bugzilla.redhat.com/show_bug.cgi?id=1204548

@miq-bot add_label WIP

Added WIP - this probably needs a test or two.

@himdel Please fix Travis failures

@Fryguy Please review, now that Travis is Green!
@himdel Is this still a WIP?

@chessbyte sorry, not anymore, removing WIP.. unless somebody finds something wrong, that is

@miq-bot remove_label WIP


Using dcos-launch@4a2515f git hash version

Summary: recent dcos-launch HEAD broke on-prem installation due to a missing docker dependency. We're going to the previous commit. Additionally, preflight logs are added to Jenkins archives to help debug such problems in the future.
Related JIRA: DCOS_OSS-4007

The system test job seems to fail.

I would've waited for the system test anyway ;)

I've updated the Pipfile. Re-running the SI tests


Safe Preallocation for (most) Vec<T>

Overview - Safe Preallocation
Currently, Zebra doesn't preallocate Vectors when deserializing, since blind preallocations present a DOS vector. Instead, it relies on maximum block and transaction size to limit allocations. This is inefficient.
We can mitigate the DOS potential and allow for preallocation as follows:

Define a new trait SafeAllocate, defining the maximum length a Vec<T: SafeAllocate> can sensibly reach for each implementing type
Create a specialized ZcashDeserialize implementation for SafeAllocaters.

pub trait SafeAllocate {
    const fn max_allocation() -> usize;
}

impl<T: ZcashDeserialize + SafeAllocate> ZcashDeserialize for Vec<T> {
    fn zcash_deserialize<R: io::Read>(mut reader: R) -> Result<Self, SerializationError> {
        let len = reader.read_compactsize()?;
        if len > T::max_allocation() {
            return Err(SerializationError::Parse(("Vector longer than max_allocation")));
        }
        let mut vec = Vec::with_capacity(len);
        for _ in 0..len {
            vec.push(T::zcash_deserialize(&mut reader)?);
        }
        Ok(vec)
    }
}

This allows us to pre-allocate for certain types without presenting a DOS vector, while retaining the flexibilty to use the current (lazy) allocation strategy for types that defy safe blind allocation.
Note that deserialization using this method is guaranteed to fail during the deserialization of the first malicious vector. However, Block messages contain nested Vec<T> types, and it is possible for a Byzantine message to cause improper allocations at each level of nesting before being discovered. This is why the potential spike for a Block message is much higher than for other message types.
Potential SafeAllocation Implementors

Arc<Transaction> - Suggested allocation limit: 49_000. A Zcash block is capped at 2MB. Since transparent Txs are the smallest allowable transactions, and each transparent Tx requires at least one Input with a minimum serialized size of 41 bytes, an upper bound the length of a Vec<Arc<Transaction>> is 2MB / 41 Bytes < 49_000. Note that std::mem::size_of::<Arc<T>>() is 8, so the maximum memory wasted by a Byzantine Vec<Arc<Transaction>> is 49_000 * 8 Bytes < 400KB.

transparent::Input - Suggested allocation limit: 49_000. A Zcash block is capped at 2MB. Each Input has a minimum serialized size of 41 bytes, so an upper bound the length of a Vec<transparent::Input> is 2MB / 41 Bytes < 49_000. With Inputs taking less than 80 bytes on the stack (36 for the Outpoint, 26 for the Script, and 4 for the sequence), the maximum memory wasted by a Byzantine Vec<transparent::Input> is 49_000 * 80 Bytes < 4MB.

transparent::Output - Suggested allocation limit: 225_000. A Zcash block is capped at 2MB. Outputs have a minimum serialized size of 9 bytes, so an upper bound the length of a Vec<Arc<transparent::Output>> is 2MB / 9 Bytes < 225_000. With Outputs taking less than 40 bytes on the stack (call it 10 for the value, 26 for the Script, for a total of 36 ), the maximum memory wasted by a Byzantine Vec<Arc<transparent::Output>> is 225_000 * 40 Bytes = 9MB.

MetaAddr - Suggested allocation  limit: 1000. No fancy math required, since this limit is in the Addr message specification. Estimate a MetaAddr at a generous 100 bytes of stack space and you get max memory waste = 1000 * 100B = 100KB.

block::Hash - Suggested allocation limit: 65536. We derive this limit as MAX_MESSAGE_SIZE / 32 = 2 * 1024 _ 1024 / 32. Since a block hash takes 32 bytes on the stack, the max waste here is MAX_MESSAGE_SIZE.

InventoryHash - Suggested allocation  limit: 50,000. This limit is the listed in the Inv message spec. Maximum waste: 50,000 * 32 B = 1.6 MB.

block::CountedHeader - Suggested allocation limit: 2000. This limit is in the Headers message spec. Per the most recent spec, each Zcash header is less than 2kb. Maximum waste: 2000 * 2000 Bytes < 4MB

u8 - Suggested allocation limit: MAX_MESSAGE_SIZE. Since a u8 takes 1 byte on the stack, the maximum waste here is MAX_MESSAGE_SIZE = 2MB.

Example attacks
Using all of these numbers, we calculate the total improper allocation caused by the worst-case instance of each Zcash Message as follows:

Version: N.A.
Verack: N.A.
Ping: N.A.
Pong: N.A.
Reject: N.A.
GetAddr: N.A.
Addr: contains 1 Vec<MetaAddr> => 100KB (see above)
Get locks: contains 1 Vec<block::Hash> => MAX_MESSAGE_SIZE (2MB)
Inv: contains 1 Vec<InventoryHash> => 1.6 MB (see above)
GetHeaders: contains 1 Vec<block::Hash> => MAX_MESSAGE_SIZE (2MB)
Headers: contains 1 Vec<block::CountedHeader> => 4MB
GetData: contains 1 Vec<InventoryHash> => 1.6 MB (see above)
Block: The worst case block contains 1 Vec<Arc<Transaction>, 1 Vec<transparent::Output>, and 1 malicious Script(Vec<u8>) => 400KB + 9MB + 2MB = 11.4 MB.

Note that a dishonest vector is discovered during its own deserialization, so a malicious Vec<transparent::Input> would be discovered before the malicious Vec<transparent::Output> was allocated for. Since Outputs can waste more memory than Inputs, a smart attacker will choose to make only his Vec<transparent::Output> malicious.

Tx: N.A.
NotFound: contains 1 Vec<InventoryHash> => 1.6 MB (see above)
Mempool: N.A.
FilterLoad: contains 1 Filter(Vec<u8>) => 2MB
FilterAdd: contains 1 Vec<u8> => 2MB
FilterClear: N.A.

Alternatives
Do nothing. This is a fine option, since Zebra's networking stack is already fast!
Summary and Recommendations
With the SafeAllocate trait, we can allow preallocation for many Vector types without risking DOS attacks.
In the worst case, a malicious message can cause a short-lived spike in memory usage. The size of this spike depends on the max_allocation defined in SafeAllocate and the depth of nested Vec<T: SafeAllocate> types. Calculations of the maximum spike caused by each message type are included above. Based on these calculations, I recommend implementing SafeAllocate for all types listed in the "Potential SafeAllocate Implementors" section, with the possible exception of transparent::Input and transparent::Output.
If this recommendation is adopted , the worst case memory spike that a malicious peer can cause will be roughly 4MB, or roughly double that peer connection's usual memory consumption.
If transparent::Inputs and transparent::Outputs are included, the worst case spike rises to 11.5MB, or about six times a peer connection's usual memory consumption.

Hi @preston-evans98, thanks for this suggestion, and working through these calculations.
In general, we've been working on the assumption that parsed data structures are slightly larger than their serialized equivalents. But I don't think we realised that malicious blocks could take up 6 times as much memory when deserialized.
Here's some further analysis of this issue:
Rust Vec over-allocation
Currently, Vec allocations can be up to 2x larger than their current length. That yields an overall 12x memory usage, or 24MB per 2MB malicious block.
https://github.com/rust-lang/rust/blob/ff6ee2a70218543f410e557f390e246131847572/library/alloc/src/raw_vec.rs#L415
Although:

Vec does not guarantee any particular growth strategy when reallocating when full

https://doc.rust-lang.org/std/vec/struct.Vec.html#guarantees
Preallocation would limit the maximum memory usage to 12MB per block.
Validation Pipeline Memory Usage
One of the reasons that Zebra is fast is that it processes many blocks in parallel. So memory usage issues can be quite serious. Zebra achieves this parallelism using a block validation pipeline: it deserialises blocks, then passes them through a number of validation stages. The underlying Arc<Block> data isn't dropped until after the block fails validation.
Inbound Block Gossip Service
The limit on this service is 600 blocks, which is far too high. We'll reduce that to 10 in #1881.
Sync Service
In general, a malicious node can place 500/50 = 10 malicious blocks in the sync pipeline due to request fanout. See #1881 for details.
Checkpoint Validation
The checkpoint verifier stores a queue of blocks, while awaiting the blocks at previous heights. To increase the cost of filling this queue, we check block difficulty in #1882.
Full Block Validation
It's hard to exploit full block validation, because it checks block difficulty before doing any other checks.

Overall, I think this is a good change, but we should think about our test strategy.
If any of these new limits are too low, they might end up rejecting large blocks that other nodes accept. (Rejecting other large messages isn't as much of an issue, because most large messages aren't consensus-critical.)
So let's think about a test strategy that:

constructs the smallest possible value of each type
runs a proptest to confirm it's the smallest
make sure the limit is correct for the smallest possible value

We can't really run proptests to find the largest possible blocks, because large proptests are very slow.


a11y: make table content associated with table label

Description
make table content associated with table label
Task Item
Refs #2026

With this change, the Narrator reads out each row at once, but does not allow navigation between cell via table or arrows.
Users via Assisted Technology should be able to examine each cell, with relevant information included.
Please check out this link for an example of expected behavior: https://www.w3.org/TR/wai-aria-practices/examples/grid/dataGrids.html When using Narrator in Edge, the user is able to navigate to each cell, learn what row and column they are focused on, and also hear the name of the column to indicate what data is reading out.
Here is some extra information: https://whatsock.com/training/matrices/
(3.2.2: Grid Role)

If you have any questions on this, please let me know and I am happy to help :)

I got what you mean. For now, we are using microsoft fabric UI to implement this grid. I did not find a way to access each cell. I left an issue on their github repository to see if they can fix this issue.


ORTCDemo: focus state for "connect" button is not obvious enough

https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/ortcdemo/
Changes from transparent background to white, which is very similar.
It looks like the styles are busted as no top margin (owl removal probably) and the hover state is blue.

@dstorey @sarvaje This demo is external, namely, it's from https://ortcdemo.azurewebsites.net.

We have access to that server. Don't know where the code is but we can modify the templates directly if needed. Erik should know more and @sarvaje should have access to it via the azure portal.

Yep, I have access to the server so I can change the css directly. @dstorey is it good just to change the current focus style for the hover style (the blue color)

@sarvaje it should probably have something similar to the edgeCore focus styles, as if use same as hover it would be obvious that they're different. Maybe @melanierichards can chime in.


Add detection metrics

This PR adds the detection metrics from the MOT Challenge. There are some differences between this implementation and the original implementation. I have outlined them here:
https://docs.google.com/document/d/1UTR4G8va_fe-KsNZhrQJNE5w_7F9fPBVy9G4dKWrBfk/preview

I forgot to mention, the command that I used to compute detection metrics for the MOT17Det benchmark is:
python scripts/run_mot_challenge.py \
  --METRICS Det \
  --BENCHMARK MOT17Det \
  --REQUIRE_UNIQUE_IDS False \
  --MIN_VIS 0.5 \
  --DROP_OTHER_CLASSES True \
  --DROP_EXTRA_TIMESTEPS True

There are several new flags here: MIN_VIS sets the minimum visibility for the ground-truth, REQUIRE_UNIQUE_IDS disables the assertion that track IDs are unique (only required for "Det" challenges), DROP_OTHER_CLASSES removes predictions with class ID > 1 and DROP_EXTRA_TIMESTEPS disables the assertion that frame IDs <= sequence length (ignoring any predictions in extra frames).

Hello Jack,
in your branch: https://github.com/jvlmdr/TrackEval/tree/detection-merge
I get the following error message:
"run_mot_challenge.py: error: unrecognized arguments: --REQUIRE_UNIQUE_IDS False"
Would omitting this flag effect the results?
Thank you.

Hey! My mistake. I forgot that I inverted the sense of this flag from --REQUIRE_UNIQUE_IDS False to --IGNORE_TRACK_IDS True.


Features are incorrectly detected, resulting in load errors on some older kernels

Hello,
I work with CO-RE C eBPFs using Aya on older systems and I came across an interesting bug.
While minimizing vmlinux.h to the very strict minimum necessary for my eBPFs, my eBPFs failed to load with an Argument too long (E2BIG) error on Debian 10 (Linux 4.19.0-24-amd64), and on this distribution/kernel only (everything was ok on Ubuntu 18 or anything more modern)
If you look at the source code of the bpf syscall, it checks its arguments early with bpf_check_uarg_tail_zero(). If the union bpf_attr given to the BPF syscall is bigger than the one known to the kernel and the extra-bytes aren't 0, -E2BIG is returned. This is to prevent userspace from relying on features that aren't yet provided by the kernel.
When looking at Aya's source code, I realized that this is exactly the problem I am facing.
On one side, Aya evaluates which features are available here. Especially, it assumes that BTF are available if the call to bpf(BPF_BTF_LOAD) succeeded. When loading the eBPF, it will fill the prog_btf_fd field of the struct attr if that check returned true.
And here's the issue: on Linux 4.19, bpf(BPF_BTF_LOAD) was already implemented but prog_btf_fd wasn't in union bpf_attr yet. Therefore, when loading the eBPF, aya first checks if BTF are supported, then loads the BTF, and finally sets prog_btf_fd to the returned file descriptor (see here). This is wrong, and where the bug originates.
A quick and easy fix would be to strengthen the check for BTF availability by also checking for bpf(BPF_PROG_LOAD) on top of the existing bpf(BPF_BTF_LOAD), but that doesn't fix the underlying issue.
Instead, aya should be much more strict about which fields of struct btf_attr it relies on. Especially, it shouldn't assume that if a field is available for one operation then another related field should also be available for another operation, nor should it assume that if a feature is detected/available then all related fields are also available unless they have all been tested. Note that as stated earlier, modern fields on older kernels aren't ignored, they make the syscall fail.
NOTE: I am working with a version a bit older than the main branch, but by looking at the source code it seems the bug is still there. If I'm wrong, I'm very sorry :D

Thanks for the detailed write-up! Would you be willing to contribute a fix? We've recently improved support for testing on multiple kernel versions, so if you write a test you'll be able to ensure it works (at least locally; not all the tests currently pass on older kernels so we only test on 6.1 in CI). cargo xtask integration-test vm --help should get you started.

A friend of mine, @roblabla, is willing to contribute a fix. We are using a workaround so it's low priority for us, not sure when the fix will land.


Unable to reach /constraint tab

Hello Team,
I have tried all ways your have mentioned in docs & earlier issues, but still getting :
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Not sure what am missing...
Tried with docker approach, local build & run and k8s approach.

Hi,
This error is from the browser, right? What do you see on the container's logs?

Hello @ralgozino
Container logs shows:
[2021-02-03 11:19:19,411] INFO in app: KUBERNETES_SERVICE_HOST found, assuming to be running inside Kubernetes cluster
[2021-02-03 11:19:19,612] ERROR in app: Exception on /constraints/ [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app.py", line 36, in decorated_function
    return f(*args, **kwargs)
  File "./app.py", line 180, in get_constraints
    title="Constraints")
  File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 140, in render_template
    ctx.app,
  File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.6/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/app/templates/constraints.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/app/templates/base.html", line 47, in top-level template code
    {% block content %}{% endblock %}
  File "/app/templates/constraints.html", line 134, in block "content"
    {% for k,v in constraint.spec.parameters.items() %}
jinja2.exceptions.UndefinedError: 'list object' has no attribute 'items'
<IP_ADDRESS> - - [03/Feb/2021:11:19:19 +0000] "GET /constraints/ HTTP/1.1" 500 290 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36" "<IP_ADDRESS>"
[pid: 14|app: 0|req: 153/616] <IP_ADDRESS> () {70 vars in 1723 bytes} [Wed Feb  3 11:19:19 2021] GET /constraints/ => generated 290 bytes in 204 msecs (HTTP/1.1 500) 2 headers in 99 bytes (1 switches on core 0)

I tried using image tags - v0.4.1 and 0.3rc1

What gatekeeper version are you running?
Are your constraints working? It seems that one of them has a list as the parameters when we expect a map (dictionary). I'm not sure this is supported by Gatekeeper.
Any chance of sharing with us your constraints definitions so we can try to reproduce the error?

Gatekeeper version: openpolicyagent/gatekeeper:v3.2.2
Constraints are working perfect, able to see logs + datadog metrics
I have some constraints picked from: https://github.com/open-policy-agent/gatekeeper/tree/master/demo/agilebank
Those are doing basic things and didn't modify much. Couldn't find map reference.

ohh, I got your point.
one constraint has:
parameters:
    - cpu
    - memory

and other constraints have:
parameters:
    tags:
    - latest

will correct it and see how it works :)

great, let us know how it goes :)

So, it turns out that on the demo files you linked, there's a constraint that doesn't have a spec defined. We weren't handling correctly that case.
I've pushed a fix to handle the absence of the spec field.
Could you please try using the unstable docker image tag instead of v0.4.1? Let me know if this version works for you.

Sure, will do :-)

You are Awesome! :)
So when I changed one of the constraint
From
parameters:
      - cpu
      - memory

To
parameters:
    limits:
      - cpu
      - memory

It worked 👍
Am not sure about the change you introduced in unstable version, but the scenario of handling missing spec makes sense.
When I reverted back to v0.4.1, its working fine too.

Great to hear that! Thanks for the feedback


add support for dict outputs (select the first value)

Description
Add simple (and naive) for dictionary output of modules. Similar to how tupless were dealt with, I just select the first value of the dict. Only made changes to BaseModel. I'm not yet super familiar with the code so there might be some other modification needed.
Testing Done
It works with my model which has module dict outputs (for ZeroIntervention and LoreftIntervention). Didn't do extensive testing as this felt quite straightforward.
Checklist:

[ ] My PR title strictly follows the format: [Your Priority] Your Title
[ ] I have attached the testing log above
[ ] I provide enough comments to my code
[ ] I have changed documentations
[ ] I have added tests for my changes

LGTM, pinging @frankaging: have you ever used modules which output dicts? Hasn't come up for me but this fix seems reasonable.

LGTM! Later, we might want to further remove the assumption of intervening on the first element by creating field in the config to provide the intervening keyword.

@leogagnon Thanks!


Render GitHub emojis

See trumail's description in the pic below.

Thanks for the report. I've seen this before but honestly have no idea how to handle it other than just having a giant (imperformant) string replacer with a mapping. Will need to think on it

It's not very imperformant to replace the strings, there are libraries to do so (I only know in JS, so that won't help you there), but slack for example does this client side for every message, it won't add much overhead. As far as I know 👍

Good points! I did some research and I think there's some paths forward. From a high level, my thinking is:

Create a regex for matching the aliases (basically :thetext:)
Embed a DB for ROOM with this data - https://github.com/github/gemoji/blob/master/db/emoji.json. This keeps all this data from sitting in memory all the time unnecessarily.
On alias regex matches in titles, query the DB for those aliases. Can do them in a blocking fashion since we're off the main thread. If I concatMapEager the graphql response -> CatchUpItem mapping, these can be done concurrently and quickly

I previously added similar feature to OctoDroid GitHub app and found emoji-java library. It has a EmojiParser.parseToUnicode method for converting these aliases and it works very well. You might want to try using it.

Yeah I saw that. The particular appeal of a ROOM db to me was to just query as needed on matches rather than keep the entire mapping in memory. That library seems to read all of them up front from a json blob and keep them around

I think that reading it to memory is the fastest way 2017? Most phones have 2GB+ RAM and the emoji mapping shouldn't be more than a couple KB? 🤔

I've been messing around with this a bit WIP.
Initially I thought I could use emojis.json as a general emoji markdown file, so that if there are ever other services that have emoji markdown, this would work for those as well. However, from what I can tell github doesn't support skin tones, so this file might not have been as general as I was hoping.

That branch looks really good, and I think your implementation is quite clever. I'm not teeeerribly worried about supporting this in other services for now, can always revisit and consider leveraging something more general like https://github.com/vdurmont/emoji-java does if need be.

Sidenote - wonder how slack handles this. I know a few people on their team, will ask. My guess is it's all in-house as part of their markdown pipeline, but maybe they've got some pointers


Add support for true Calls & Call inlining

Adding support for proper calls
Currently, the AST Call node is only used for "fake" calls like rotate. However, in general it would be nice to support real functions and calls.
Add inling
In v1.0, we supported function inlining, up to a certain threshold. This feature should be ported over.
Adding Tests:
In v1.0, Commit 97c1679397 added a threshold to the inlining of Call nodes, i.e., functions are only inlined if their return statement has a depth smaller than N nodes.

There exist no tests yet that check if that threshold really works.

Also, there must be an additional check added that makes sure that the called function is fully inlined, that is, there are not other statements in the program except a Return statement. Because otherwise replacing only the function call by the return expression in the called function would lead to an invalid result.

Closing this issue as it concerns the legacy version of HECO (pre-MLIR)


MapEffect - blocking onCameraMove and CameraPositionState.moving events

When using MapEffect with the clustering library camera events seem to be blocked.
LaunchedEffect(cameraPositionState.isMoving) {
  // Not happening
}

I get that the clustering library may be swallowing the event.  This should still work right?
MapEffect(annotations) { map ->
  map.setOnCameraMoveListener {  // no event here either }
  ...
  // setup clustering as in docs
}

Debugging more, I think the following does work
MapEffect(annotations) { map ->
  map.setOnCameraMoveListener {  // no event here either }
  ...
  // setup clustering as in docs
}

If looking for changes to the cameraPositionState not working is an intended consequence as noted in the docs when using the MapEffect, this ticket can be closed.


Link to .NET SDK3 reference goes to API browser home page

Currently points to https://docs.microsoft.com/en-us/dotnet/api/?view=botbuilder-<IP_ADDRESS>
The views currently available are https://docs.microsoft.com/en-us/dotnet/api/?view=botbuilder-dotnet-stable
https://docs.microsoft.com/en-us/dotnet/api/?view=botbuilder-dotnet-preview, both of which appear to be for the V4 SDK.

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

ID: a35d1244-e389-9ee3-8eb8-18610bc81d56
Version Independent ID: d41d1c45-fed6-80f0-189a-2c5c051dbb25
Content: Manage bot using Bot Builder tools - Bot Service
Content Source: articles/bot-builder-tools.md
Product: bot-framework
GitHub Login: @ivorb
Microsoft Alias: v-ivorb

@fowl2 , this page relates to the v4 SDK. The CLI tools do support the v3 SDK.
Where on the page is this particular link? What is the link text?

@fowl2 , Yes, the navigation/TOC link to the .NET SDK v3 is broken, and we're looking into it.

Fixed.