Snapshotting logic does not provide an adequate className in a testing environment.

[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.

This was a previously #9492 however it does not actually provide a fix for the core problem which is that in testing environments we should be able to mount(<Component>) that are created from withStyles() and have snapshots be reliable without wrapping them.
Expected Behavior 🤔
Snapshots should create reliable labels for withStyles() used by both custom and defaut material-ui components like in the red portion of this Snapshot:

Current Behavior 😯
One can modify a custom component to have
withStyles(Styles, { generateClassName: (rule, styleSheet) => (`${styleSheet.options.classNamePrefix}-${rule.key}`)
})

However, this only modifies overwritten styles in material UI, default ones are actually not modified at all:

## Steps to Reproduce 🕹
This can't be easily reproduced in a sandbox environment.
Link:

Make a withStyles() that uses MUI components as well
Install a testing framework like jest
Run snapshots
Add a new test, and you will see how the snapshots will fail on prior ones because the ruleCounter increases.

Context 🔦
I would like to be able to mount() and call Jest's native .toMatchSnapshot() without worrying about the ruleCounter adding random numbers. It is not appropriate to wrap every object in a  as stated in the docs of https://material-ui.com/customization/css-in-js/#creategenerateclassname-options-class-name-generator because tests should mirror their native implementation.
Your Environment 🌎

Ma

Tech
Version

Material-UI
v3.9.1

React
16.5.2

Browser

TypeScript

etc.

Don't know if it can help @oliviertassinari
I actually use this mock
const styles = jest.requireActual('@material-ui/core/styles');
const theme = styles.createMuiTheme();

const withStyles = style => component => {
  const classes = typeof style === 'function' ? style(theme) : style;
  component.defaultProps = { ...component.defaultProps, classes };

  return component;
};

module.exports = { ...styles, withStyles };

This way I have snapshot like this one
exports[`[Component] Header should render correctly 1`] = `

    Title

`;

I prefer having the css properties instead of a classname to detect UI regressions.
With the v4 I now use this mock
import theme from '../../src/theme/muiTheme';

const styles = jest.requireActual('@material-ui/styles');

const makeStyles = style => props => {
  // Apply theme to classes
  const classes = typeof style === 'function' ? style(theme) : style;

  // Apply props to every key of each class, which is every key of classes
  const classesByProps = {};
  Object.keys(classes).forEach(classKey => {
    const classByProps = {};

    Object.keys(classes[classKey]).forEach(key => {
      classByProps[key] =
        typeof classes[classKey][key] === 'function' ? classes[classKey][key](props) : classes[classKey][key];
    });

    classesByProps[classKey] = classByProps;
  });

  return classesByProps;
};

module.exports = { ...styles, makeStyles };

@VincentLanglet Thanks, it helps.

@oliviertassinari No problem.
BTW, since this discussion https://github.com/mui-org/material-ui/issues/14797, considering this is the best way to write style
const useStyles = makeStyles(
  (theme) => ({
    option: (props) => ({
      backgroundColor: props.isRed ? 'red' : '',
    }),
  }),
);

Instead of
const useStyles = makeStyles(
  (theme) => ({
    option: ({
      backgroundColor: (props) => props.isRed ? 'red' : '',
    }),
  }),
);

Because of issue with the actual types definitions of StyleRule/CSSProperties, ...
I now use this (simpler) mock
import theme from '../../src/theme/muiTheme';

const styles = jest.requireActual('@material-ui/styles');

const makeStyles = style => props => {
  // Apply theme to classes
  const classes = typeof style === 'function' ? style(theme) : style;

  // Apply props to every class, which is every key of classes
  const classesByProps = {};
  Object.keys(classes).forEach(classKey => {
    classesByProps[classKey] = typeof classes[classKey] === 'function' ? classes[classKey](props) : classes[classKey];
  });

  return classesByProps;
};

module.exports = { ...styles, makeStyles };

Any progress on this issue?
@VincentLanglet can you point where should we put that mock and how to make it work?

@andrey-semin<EMAIL_ADDRESS>there is nothing more to do.

@VincentLanglet how would you import createMuiTheme inside your theme?
I'm getting the following error since i'm assuming '@material-ui/styles' is being mocked and the '@material-ui/core/styles' is importing '@material-ui/styles
`TypeError: (0 , _styles.withThemeCreator) is not a function
> 1 | import { createMuiTheme } from '@material-ui/core/styles';
    | ^
  2 |
  3 | const theme = createMuiTheme({});

  at Object.<anonymous> (node_modules/@material-ui/core/styles/withTheme.js:14:46)
  at Object.<anonymous> (node_modules/@material-ui/core/styles/index.js:116:41)
  at Object.<anonymous> (src/theme.js:1:1)`

@Kaustix I did not import createMuiTheme but import theme from '../../src/theme/muiTheme';
But if you want to import a non-mocked function, use jest.requireActual
Like I did for const styles = jest.requireActual('@material-ui/styles');

@VincentLanglet sorry don't think i explained very well.
I'm importing createMuiTheme inside my themes.js which is causing the issue so not sure how to fix the error.
// mock/styles.js
import theme from '../../../src/theme';

const styles = jest.requireActual('@material-ui/styles');

const makeStyles = style => (props) => {
  const classes = typeof style === 'function' ? style(theme) : style;

  const classesByProps = {};
  Object.keys(classes).forEach((classKey) => {
    classesByProps[classKey] = classKey;
  });

  return classesByProps;
};

// src/theme.js

import { createMuiTheme } from '@material-ui/core/styles';

const theme = createMuiTheme({{);
export default theme;

causes the error:
    TypeError: (0 , _styles.withThemeCreator) is not a function

    > 1 | import { createMuiTheme } from '@material-ui/core/styles';
        | ^
      2 |
      3 | const theme = createMuiTheme({
      4 |   overrides: {

      at Object.<anonymous> (node_modules/@material-ui/core/styles/withTheme.js:14:46)
      at Object.<anonymous> (node_modules/@material-ui/core/styles/index.js:116:41)
      at Object.<anonymous> (src/theme.js:1:1)

It's been month I didn't touch my project. This is what I had
//<EMAIL_ADDRESS>import theme from '../../src/theme/muiTheme';

const styles = jest.requireActual('@material-ui/styles');

const makeStyles = style => props => {
  // Apply theme to classes
  const classes = typeof style === 'function' ? style(theme) : style;

  // Apply props to every class, which is every key of classes
  const classesByProps = {};
  Object.keys(classes).forEach(classKey => {
    classesByProps[classKey] = typeof classes[classKey] === 'function' ? classes[classKey](props) : classes[classKey];
  });

  return classesByProps;
};

module.exports = { ...styles, makeStyles };

// src/theme/muiTheme.ts
import { amber, blueGrey, red } from '@material-ui/core/colors';
import createMuiTheme from '@material-ui/core/styles/createMuiTheme';

const theme = createMuiTheme({
  palette: {
    background: {
      default: blueGrey[50],
    },
    primary: red,
    secondary: amber,
  },
  spacing: 4,
});

export default theme;

I see you wrote '../../../src/theme'; and not '../../src/theme';.
What is the path of your mock ?
I mock @material-ui/styles.js, not @material-ui/core/styles.js. That can change a lot of thing.

@VincentLanglet  thank you so much!!
it was the import statement
import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
vs
import { createMuiTheme } from '@material-ui/core/styles';

since the latter was going after index.js which brought '@material-ui/styles'

I'm going to bump this.
This is one of the major cons of using material-ui. My team are currently building a design system based on @material-ui/styles, though we can't do proper snapshots.
I looked into styled-components-jest, where I believe most of the code could be adopted. That approach would require to export the store, in which the stylesheet is living.
Would that be a possibility?

@Thisen we will try to move the maintainance of the package to react-jss. We will work on making the migration is as easy as possible.

I'm totally agree with @Thisen, ideally we should have serializer for Jest, like jest-styled-components does. I guess the issue related to JSS, but not to Material-UI.
But as a temporal solution, I modified workaround from @VincentLanglet and mock makeStyles and withStyles from @material-ui/styles
as a result, a don't want to generate styles object and put it to classes and className, because it looks a bit strange when you have style object in className or classes.
//<EMAIL_ADDRESS>import theme from '../../muiTheme';

const styles = jest.requireActual('@material-ui/styles');

const makeStyles = (style, options) => () => {
  // Apply theme to classes
  const classes = typeof style === 'function' ? style(theme) : style;

  // Generate class name with correct component name without any index
  const classesByProps = {};
  Object.keys(classes).forEach((key) => {
    classesByProps[key] = options ? `${options.name}-${key}` : key;
  });

  return classesByProps;
};

const withStyles = (style, options) => {
  const useStyles = makeStyles(style, options);

  return (Component) => {
    const classes = useStyles();

    const MockComponent = (props) => (
      <Component classes={classes} {...props} />
    );

    MockComponent.displayName = (options && options.name) || Component.displayName;

    return MockComponent;
  };
};

module.exports = {
  ...styles,
  makeStyles,
  withStyles,
};

Don't forget to add name option as a second parameter to makeStyles/withStyles:
const useStyles = makeStyles((theme) => ({
  root: {
    backgroundColor: theme.palette.primary.main,
  },
}), { name: 'Button' });

export default withStyles((theme) => ({
  root: {
    backgroundColor: theme.palette.primary.main,
  },
}), { name: 'Button' })(MuiButton);

as mentioned by @Kaustix, we need to import createMuiTheme from '@material-ui/core/styles/createMuiTheme'

I took an approach where I mocked @testing-library/react to return all render results with StyleProvider and the generateClassName function that takes away the numerical suffixes
import { StylesProvider } from '@material-ui/styles'
import React from 'react'

const react = jest.requireActual('@testing-library/react')
const generateClassName = (rule, styleSheet) =>
  `${styleSheet.options.classNamePrefix}-${rule.key}`
const render = args => {
  return react.render(
    ,
  )
}

module.exports = { ...react, render }

Some random extra notes here
https://github.com/GMOD/jbrowse-components/pull/503

I am fine with using a custom generateClassName that does not include the numbers and I am already doing that.
That said, the ORDER of the class names is ALSO coming out different on CI vs on my Dev machine.
-

<button class="MuiButtonBase-root MuiButton-root LoginForm-btn MuiButton-contained MuiButton-containedSecondary" tabindex="0" type="button">Log In</button>orForgot Password
+

<button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedSecondary LoginForm-btn" tabindex="0" type="button">Log In</button>orForgot Password

Guys,
I'm using this as withStyles mock:
withStyles: style => component => {
      const classes = typeof style === 'function' ? style(theme) : style
      component.defaultProps = { ...component.defaultProps, classes }

      return component
    }

But I'm having a prop-types error since I'm using a className with object instead of string. Also, my style values are missing from the snapshots:
`

        V

  `

Warning: Failed prop type: Invalid prop `className` of type `object` supplied to `ForwardRef(Avatar)`, expected `string`.

I could manage to fix it by using JSON.stringify in my classes but the snapshot output is not nice:
withStyles: (style: any) => (component: any) => {
      const classes = typeof style === 'function' ? style(theme) : style
      Object.entries(classes).forEach(([className, classValue]) => {
        classes[className] = JSON.stringify(classValue)
      })
      component.defaultProps = { ...component.defaultProps, classes }

      return component
    }

`

        V

  `

What am I missing to get an snapshot like this?
exports[`[Component] Header should render correctly 1`] = `

    Title

`;

Any help would be appreciated, thanks in advance.

Just adding my opinion that this is a major time suck. Hours of Googling across multiple days. Trying and failing to find a solution to get consistent snapshots.
I finally find this and #9492 only to see it's been an issue for 3 years and it seems core devs think this is fine. I want my 3 days back.  Instead I now have to figure out which of the hacks on this page may minimize  additional time required.

@michaelpward  I'm sorry to hear that you such a frustrating experience. https://github.com/mui-org/material-ui/issues/9492#issuecomment-368205258 is an example implementation that should cover 90% of the use cases. What did you find lacking from this example?
The reason why we're hesitant to add documentation for this is that we

don't recommend it in the first place and don't want a guide to come off as an endorsement
can't know what each and everyone expects from their snapshot tests. As far as we can tell you don't get anything from knowing that a button is rendered as <button className="redAndBold" /> and not <button className="red bold" />. Both of these could render the exact same thing. So are you interested in classes or styles? If you're interested in styles then we recommend proper visual regression testing since we do rely to some extend on styles cascading. Serializing snapshots of each generic container and their styles implementation details is very likely to break between releases anyway.

Considering the number of upvotes and that nobody released a helper package is indicative that this is either already sufficiently solved by createGenerateClassName or low popularity of snapshot testing. This means that isn't a priority for us to address.

Guys,
I'm using this as withStyles mock:
withStyles: style => component => {
      const classes = typeof style === 'function' ? style(theme) : style
      component.defaultProps = { ...component.defaultProps, classes }

      return component
    }

But I'm having a prop-types error since I'm using a className with object instead of string. Also, my style values are missing from the snapshots:
`

        V

  `

Warning: Failed prop type: Invalid prop `className` of type `object` supplied to `ForwardRef(Avatar)`, expected `string`.

I could manage to fix it by using JSON.stringify in my classes but the snapshot output is not nice:
withStyles: (style: any) => (component: any) => {
      const classes = typeof style === 'function' ? style(theme) : style
      Object.entries(classes).forEach(([className, classValue]) => {
        classes[className] = JSON.stringify(classValue)
      })
      component.defaultProps = { ...component.defaultProps, classes }

      return component
    }

`

        V

  `

What am I missing to get an snapshot like this?
exports[`[Component] Header should render correctly 1`] = `

    Title

`;

Any help would be appreciated, thanks in advance.

I can get a pretty output if I use react-test-renderer:
import React from 'react';
import {create} from 'react-test-renderer';
const TestComponent = () => (

Adsfds

);
test('renders learn react link', () => {
const wrapper = create();
expect(wrapper.toJSON()).toMatchSnapshot();
});
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[renders learn react link 1] = `

    Adsfds

`;

@effortlesscoding your example doesn't include withStyles though? that is the main cause of the issue here

Hi devs, I'm having issues with the generated class names too. But I noticed that the difference of a new class name appears to be consistent, not a random generated each time you run a test. So I took a quick look to createGenerateClassName and saw that the suffix is
const suffix = `${rule.key}-${ruleCounter}`;

So I please correct me if I'm wrong @oliviertassinari:

The generated suffix is deterministic, based on changes in theme, rules of the generated class?
Can we say that the suffix in createGenerateClassNameHash() will be deterministic as well?

If that's the case, maybe having those diffs in the snapshots is not so bad 🤔

@hisapy I think that the suggestion by @VincentLanglet is the best so far on this thread. At this point, we have a working workaround, we should focus on improving the DX. Ideally, the problem would be handled by default. But if not possible, we would combine some code + documentation.

Thx! For the moment, if the generated suffix in the className is not random then I think I can live with it for a while 😄

In case anyone is interested in another approach, I managed to remove the incremental suffix using a snapshot serialiser.
First, I followed the solution proposed by @cmdcolin here. But it does not work fine with @material-ui v3. Actually, v3.9.4.
The problem lies in the StyleProvider component. Core components (Button, Icon, etc...) relies in the old withStyles, which do not have access to the context created by StylesProvider. So, only custom components using the new withStyles are going to make use the generatedClassName provided in context by StylesProvider. The rest stay as they are.
...stuff
<button
  aria-label="Delete"
  class="MuiButtonBase-root-8 MuiIconButton-root-2 CustomComponent-root"
  tabindex="0"
  type="button"
>
...more stuff

Based on how jest-styled-components manages the snapshots, I decided to take the same approach. Basically, I reused most of the code of the styled components serializer. Right below is the mentioned serializer.
const KEY = '_mui_cleaned_'

const getNodes = (node, nodes = []) => {
  if (typeof node === 'object') {
    nodes.push(node)
  }

  if (node.children) {
    Array.from(node.children).forEach(child => getNodes(child, nodes))
  }

  return nodes
}

const getClassNamesFromDOM = node => Array.from(node.classList)
const getClassNamesFromProps = node => {
  const classNameProp = node.props && (node.props.class || node.props.className)

  if (classNameProp) {
    return classNameProp.trim().split(/\s+/)
  }

  return []
}

const getClassNames = nodes =>
  nodes.reduce((classNames, node) => {
    let newClassNames = null

    if (global.Element && node instanceof global.Element) {
      newClassNames = getClassNamesFromDOM(node)
    } else {
      newClassNames = getClassNamesFromProps(node)
    }

    newClassNames.forEach(className => classNames.add(className))

    return classNames
  }, new Set())

const markNodes = nodes => nodes.forEach(node => (node[KEY] = true))

const removeIncrementalSuffix = (code, classNames) =>
  Array.from(classNames)
    .filter(className => className.match(/-\d+$/))
    .reduce(
      (acc, val) => acc.replace(val, val.slice(0, val.lastIndexOf('-'))),
      code
    )

expect.addSnapshotSerializer({
  test: function(val) {
    return (
      val &&
      !val[KEY] &&
      (val.$$typeof === Symbol.for('react.test.json') ||
        (global.Element && val instanceof global.Element))
    )
  },
  print: function(val, print) {
    const nodes = getNodes(val)
    const classNames = getClassNames(nodes)
    markNodes(nodes)
    return removeIncrementalSuffix(print(val), classNames)
  }
})

Now the snapshot looks like this:
...stuff
<button
  aria-label="Delete"
  class="MuiButtonBase-root MuiIconButton-root CustomComponent-root"
  tabindex="0"
  type="button"
>
...more stuff

Hope it helps. Buena suerte.

In case anyone is interested in another approach, I managed to remove the incremental suffix using a snapshot serialiser.
First, I followed the solution proposed by @cmdcolin here. But it does not work fine with @material-ui v3. Actually, v3.9.4.
The problem lies in the StyleProvider component. Core components (Button, Icon, etc...) relies in the old withStyles, which do not have access to the context created by StylesProvider. So, only custom components using the new withStyles are going to make use the generatedClassName provided in context by StylesProvider. The rest stay as they are.
...stuff
<button
  aria-label="Delete"
  class="MuiButtonBase-root-8 MuiIconButton-root-2 CustomButton-root"
  tabindex="0"
  type="button"
>
...more stuff

Based on how jest-styled-components manages the snapshots, I decided to take the same approach. Basically, I reused most of the code of the styled components serializer. Right below is the mentioned serializer.
const KEY = '_mui_cleaned_'

const getNodes = (node, nodes = []) => {
  if (typeof node === 'object') {
    nodes.push(node)
  }

  if (node.children) {
    Array.from(node.children).forEach(child => getNodes(child, nodes))
  }

  return nodes
}

const getClassNamesFromDOM = node => Array.from(node.classList)
const getClassNamesFromProps = node => {
  const classNameProp = node.props && (node.props.class || node.props.className)

  if (classNameProp) {
    return classNameProp.trim().split(/\s+/)
  }

  return []
}

const getClassNames = nodes =>
  nodes.reduce((classNames, node) => {
    let newClassNames = null

    if (global.Element && node instanceof global.Element) {
      newClassNames = getClassNamesFromDOM(node)
    } else {
      newClassNames = getClassNamesFromProps(node)
    }

    newClassNames.forEach(className => classNames.add(className))

    return classNames
  }, new Set())

const markNodes = nodes => nodes.forEach(node => (node[KEY] = true))

const removeIncrementalSuffix = (code, classNames) =>
  Array.from(classNames)
    .filter(className => className.match(/-\d+$/))
    .reduce(
      (acc, val) => acc.replace(val, val.slice(0, val.lastIndexOf('-'))),
      code
    )

expect.addSnapshotSerializer({
  test: function(val) {
    return (
      val &&
      !val[KEY] &&
      (val.$$typeof === Symbol.for('react.test.json') ||
        (global.Element && val instanceof global.Element))
    )
  },
  print: function(val, print) {
    const nodes = getNodes(val)
    const classNames = getClassNames(nodes)
    markNodes(nodes)
    return removeIncrementalSuffix(print(val), classNames)
  }
})

Now the snapshot looks like this:
...stuff
<button
  aria-label="Delete"
  class="MuiButtonBase-root MuiIconButton-root CustomButton-root"
  tabindex="0"
  type="button"
>
...more stuff

Hope it helps. Buena suerte.

Thanks for this. :+1:
Passing a string to replace only catches the first occurrence, however, so it fails if the serializer's input has multiple occurrences of the same MUI classname. i.e:


Keep getting this error message in my log, any suggestions?

TypeError: Cannot read properties of undefined (reading 'url')
at new EspresenseHomebridgePlatform (/var/lib/homebridge/node_modules/homebridge-espresense/src/platform.ts:34:24)

Some more error messages:
[ESPresense] Initializing ESPresense platform...
[20/06/2023, 17:38:11] TypeError: Cannot read properties of undefined (reading 'url')
at new EspresenseHomebridgePlatform (/var/lib/homebridge/node_modules/homebridge-espresense/src/platform.ts:34:24)
at /var/lib/homebridge/node_modules/homebridge/src/server.ts:474:40
at Array.forEach ()
at Server.loadPlatforms (/var/lib/homebridge/node_modules/homebridge/src/server.ts:401:27)
at Server.start (/var/lib/homebridge/node_modules/homebridge/src/server.ts:176:29)
[20/06/2023, 17:38:11] Got SIGTERM, shutting down Homebridge...
[20/06/2023, 17:38:11] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
at Bridge.Accessory.setupURI (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11)
at Server.setServerStatus (/var/lib/homebridge/node_modules/homebridge/src/server.ts:155:45)
at Server.teardown (/var/lib/homebridge/node_modules/homebridge/src/server.ts:199:10)
at signalHandler (/var/lib/homebridge/node_modules/homebridge/src/cli.ts:93:12)
at process.emit (node:events:513:28)
at process.emit (/var/lib/homebridge/node_modules/homebridge/node_modules/source-map-support/source-map-suppor

My current config:
{
"platforms": [
{
"name": "homebridge-espresense",
"platform": "ESPresense",
"mqtt": {
"url": "mqtt://192.168.X.XX:1883",
"options": {
"username": "XXXXXX",
"password": "XXXXXXX"
}
},
"roomSettings": [
{
"name": "Office",
"maxDistance": 2,
"absorption": 3.5,
"activeScan": true,
"timeout": 6000,
"devices": [
"apple:1005:9-8"
]
}
]
}
],
"plugins": [
"homebridge-espresense"
],
"platform": "ESPresense"
}

I think I had too much I copied over from the sample config.json.  I cleaned it up and removed the duplicated platforms and whatnot and it started to show up in HK.  Issue now is it is not correctly reporting status and also my logs are showing it is shutting off auto-scan, but I have it set to "true".

Hey @ShaunRoberts543, I'm running into the same error. Did you just remove the entire 'bridge' section of the config? Setup docs are severely lacking.
I have the following config but the error persists:
{
    "platforms": [
        {
            "name": "homebridge-espresense",
            "platform": "ESPresense",
            "mqtt": {
                "url": "mqtt://192.168.XXX.XXX:1883",
                "options": {}
            },
            "roomSettings": [
                {
                    "name": "Living Room",
                    "maxDistance": 2,
                    "absorption": 3.5,
                    "activeScan": true,
                    "timeout": 6000,
                    "devices": [
                        "apple:1007:xx-xx"
                    ]
                }
            ]
        }
    ],
    "plugins": [
        "homebridge-espresense"
    ],
    "platform": "ESPresense"
}


The repeat route name and path should throw an error!!!

i find that the same route name and path don't throw an error when compile them.
just like：
'/test': {
    name: 'test',
    component: testa
  },
  '/test-2': {
    name: 'test',
    component: testb
  },

if  preson a write a name same as b, and a don't find anything wrong,then a push to server.And then b's page will not work.
it's find in 0.7.13.

I edited your code and changed test by test-2 so it's valid js.
This is something that should be enabled on non-production mode only


Programmatic Confirmations / Modals

Not sure if my strategy is ideal, but maybe sharing what I have so far might be useful in having something like this in the UI
Usage:
const confirm = (sshkey: models.SSHKey) =>
  useConfirm().confirm(
    'Are you sure you want to delete this SSH Key?',
    'This action cannot be undone.  This will permanently delete this SSH key.',
    'Delete SSH Key', () => revoke(sshkey))

Component (this would go in app.vue similar to notifications):

<template>

</template>

Composable:
const confirming = ref<boolean>(false)

interface ConfirmParams {
  title: string
  message: string
  label: string
  action: Function
}

const params = ref<ConfirmParams>({
  title: 'Title',
  message: 'Description',
  label: 'Confirm',
  action: () => {},
})

export const useConfirm = () => {
  function confirm (title: string, message: string, label: string, action: Function) {
    params.value = { title, message, label, action }
    confirming.value = true
  }

  return {
    confirm,
    confirming,
    params,
  }
}

related to https://github.com/nuxtlabs/ui/issues/285

really diggin this look, similar to stripe:

usage
const confirm = (token: models.Token) =>
  useConfirm().confirm(
    'Delete Token',
    'This action cannot be undone.  This will permanently delete this token and invalidate any environments using it.',
    'Delete Token', () => revoke(token))

composable
interface ConfirmParams {
  title: string
  message: string
  label: string
  action: Function
}

const confirming = ref<boolean>(false)

const params = ref<ConfirmParams>({
  title: 'Title',
  message: 'Description',
  label: 'Confirm',
  action: () => {},
})

export const useConfirm = () => {
  function confirm (title: string, message: string, label: string, action: Function) {
    params.value = { title, message, label, action }
    confirming.value = true
  }

  return { confirm, confirming, params }
}

component for app.vue

<template>

        {{ params.title }}

        {{ params.message }}

      <template #footer>

           Cancel
           {{ params.label }}

      </template>

</template>

"headlessui" does not have multimodal support, when siblings it requires it to be parent and child, if placed global, closing the Confirm modal closes the others

You can already achieve this with VueUse useConfirmDialog, here is an example:
https://stackblitz.com/edit/github-tcbigg-wntk1z?file=app.vue

Hi,
Any update on this? Is this planned? The creation of UModal programmatically?
Thanks

This has been implemented in #1319.

I don't fully get, how useModal/UModal would help me here. How would I return a value from the modal?
I would like to have a programmatic method to show a yes/no dialog, e.g.
const confirmed = await YesNoDialog.show('Are you sure?', { /* more props */ })
if (!confirmed) {
  return
}
// ...

If this is possible with useModal, maybe it would be a good idea to add an example to the docs? Seems like a common use case...

I don't fully get, how useModal/UModal would help me here. How would I return a value from the modal?
I would like to have a programmatic method to show a yes/no dialog, e.g.
const confirmed = await YesNoDialog.show('Are you sure?', { /* more props */ })
if (!confirmed) {
  return
}
// ...

If this is possible with useModal, maybe it would be a good idea to add an example to the docs? Seems like a common use case...

an example

Many thanks!
Would you  mind showing what your ModalConfirm component looks like?

Many thanks!
Would you mind showing what your ModalConfirm component looks like?

<template>
  <UModal
    id="modalConfirm"
    :ui="{
      wrapper: 'relative z-50',
      inner: 'fixed inset-0 overflow-y-auto z-60',
    }"
  >

        {{ title }}

        {{ message }}

      <UInput
        v-show="inputResult"
        id="refInput" v-model="msj" :ui="{
          wrapper: 'relative z-[80]',
        }"
        size="xl"
        autofocus
        :type="inputResult?.type"
        :placeholder="inputResult?.placeholder"
      />

          <UButton :loading="pending" icon="i-carbon-checkmark" color="primary" variant="solid" @click="confirmOK" @touchstart="confirmOK">
            SI
          </UButton>
          Ò
          <UButton icon="i-carbon-close" color="red" variant="solid" @click="closeModal" @touchstart="closeModal">
            NO
          </UButton>

  </UModal>
</template>
`

Got it, many thanks!
Is there a way to handle the case if the modal is closed (without pressing yes or no) but e.g., pressing ESC?

@some-user123 The modal emits 2 events related to the closing: 'close' and  'close-prevented'. Close is emitted when the modal is closed, regardless of how it was closed. If you want to disable closing it with escape, you can use the prevent-close prop, this will make the modal emit the 'close-prevented' whenever a user tries to close the modal (it doesn't close it though).


Improve UI to make the app more native-look

Hi, I've just modified the UI mainly for the Settings window to make the app more macOS native. I included several updates together in this PR. let me know if you want to separate them so that you can adopt a part of my PR.
In this PR, I modified:

Fix a typo in the code (though it has no impact on the app).
Replace the term "Preferences" with "Settings."
Improve the autolayout in the storyboards for settings panes to make the panes more native.
Some terminology to use more Apple-favored expressions.

Use "Show" instead of "Display."
Use curly quotations instead of straight ones.
Use the title case instead of the sentence case for buttons.

In addition, I found the Japanese localization in the Donate settings pane inconsistent among donation types. However, since I could not find a way to fix it in the project, I just pointed it out here.
(Moreover, I personally feel the font size in this pane is too large, but as there are no guidelines for this kind of view, it's up to you.)

Thank you!


consider recommending anaconda/miniconda prompt for windows users

since git, nano and everything else can be installed with conda

Good idea but we need to test this on a Windows machine to make sure it works before we put this into the install instructions.


Info in both "Code" and "Wiki" tabs

There is some helpful information under the code tab that I keep thinking is in the wiki and cannot find because I never expect it in the code tab. Could we perhaps move that information (or at least duplicate it) into the wiki?

The code tab contains text from Readme.md. It is the front page of MetaMorpheus, and should contain only short, simple instructions, that make users want to try it. The wiki should go into details, when necessary. Please use these guidelines when making changes!

I agree, but feel that not all the simple instructions from the readme are covered by the wiki.


Rework repository for giscus

This PR reworks the whole repository for giscus.

:tada: This PR is included in version @giscus/react-v1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version @giscus/svelte-v1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version @giscus/vue-v1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


{{ROOT_URL}} (for registration) not getting replaced during build

all I have is this (in my ember-cli-config):
    'ember-service-worker': {  },

but in the output, I'm getting:
(function(){"use strict"
function n(n){e.push(n)}var e=[],r=[]
"serviceWorker"in navigator&&navigator.serviceWorker.register("{{ROOT_URL}}sw.js",{scope:"{{ROOT_URL}}"}).

this is reproducible running on my host machine:

here is my project if you guys ever decide to look https://gitlab.com/NullVoxPopuli/emberclear/tree/master/packages/frontend
;p

I'm also getting this.

Started some work on this here: https://github.com/DockYard/ember-service-worker/pull/130

Tried to upgrade the Ember from v3.4 to 3.5 today and received the same issue... Looking forward to see a fix

@stukalin how good are you at debugging rollup builds? https://github.com/DockYard/ember-service-worker/pull/130 :D

I have the same issue but in my case even replacing {{ROOT_URL}} with /' doesn't fix it. The sw.js` request still has the encoded form prepended to it:

I also just bumped into this when upgrading to 3.5.
@NullVoxPopuli Unfortunately, I'm very untalented when it comes to debugging rollup builds :(

Found it:
https://github.com/DockYard/ember-service-worker/blob/master/lib/service-worker-builder.js#L88
Needs to be changed to:
'/**/ember-service-worker/**/*.js'
Note the leading slash. Then it works!

@erkie thanks! in #132, I've made your change and it fixed my issue in emberclear.io .

Fixed in #132


Update traverse.js

Thanks! Would you mind adding a test for both of these that show that they're passed through?

Nevermind, I added the tests in 70549cf. Released as part of v1.16.1.


Issue Requires Approval to Open Case File

Hi @nicolemichael - Maybe we could add some clarity on what is actionable here? The document above illustrates current process, but I don't see any changes outlined.
If it is considered an issue that a new issue requires an approver, I think using the user adding themselves as approver may resolve it. In that case, the change would only be procedure, and not require any development.

@nicolemichael My recommendation is to close this issue. I think that the user approving their own will satisfy this requirement. If there are more changes / customizations required, then we'll need to determine what they are to make this actionable. Please feel free to close this, or add any additional requirements.


scan_al2s upgrade with new API

The OESS system is being decommissioned. AL2S AM need to work with its new Insight Console Virtual Network API.

[x] Replace oess.py with al2s_api.py for the new Insight Console VN API @zlion
[ ] Update arm.py as needed @xi-yang
[ ] Replace scan_oess.py with scan_al2s.py with updated options as needed @xi-yang

ETC: mid-November 2023

The arm.py and scan_al2s.py have been updated  but need netam.conf to run a full test.

The arm.py and scan_al2s.py have been updated but need netam.conf to run a full test.

Good progress. Feel free to make necessary changes to the netam.conf and then update the README instructions. I will give  it a try when ready.
Also feel free to clean up the old OESS related codes as we won't need OESS any more.

Removed OESS related stuff and updated the README. Please let me know if there is any question.

Issue:
Missing "vlan_range" fields in the model file for some interfaces.
Reason:
The vlan_range string returned from scanner could be like “2-5, 7, 10-11”, which caused an internal exception when calling _update_vlan_label() because it failed the VALIDATOR rules. As a result, no vlan_range fields were output in the model file.
Solution:
Force the vlan_range string fit with the VALIDATOR rule for vlan_range, i.e. “2-5, 7-7, 10-11” to pass the validation.


create alien macroinvertebrates checklist IPT repository

http://oefendata.inbo.be/ipt/manage/resource.do?r=alien-macroinvertebrates-checklist

The name of the occurrence dataset is (sadly?): alien-macroinvertebrate-occurrences (no plural), the website uses https://github.com/inbo/alien-macroinvertebrates (plural). I also prefer plural.
Is it an option to update the occurrence dataset shortname? Is it referenced in Boets et al.?

in the article --> The occurrence dataset is available at: http://data.inbo.be/ipt/resource?r=alien-macroinvertebrate-occurrences and on GBIF: http://doi.org/10.15468/xjtfoo.
I would not try to ask the editor to change the manuscript again... but I could change to http://oefendata.inbo.be/ipt/manage/resource?r=alien-macroinvertebrate-checklist if you prefer. (but i'm not really in favour of this, we can always change to what we want if we move to production)

No, let's keep it plural.


Wrong ordering of multiple outputs

note: using v0.9.0
I am using context variables for names of packages and outputs section to generate multiple packages.
Some of these packages depend on each other, and from reading the docs I needed to use pin_subpackage.
I try something like pin_subpackage(name, ...) where name is a context variable. The building order appears random and get error message like:
Error:   × Could not apply pin. The following subpackage is not available: PackageName { normalized: None, source: "some-pkg-a" }

Here is an example recipe that does not work:
context:
  name: some-pkg
  name_a: ${{ name }}-a
  version: 1.0.0
  build_number: 0

recipe:
  name: ${{ name }}
  version: ${{ version }}

source:
  path: ../

outputs:
  - package:
      name: ${{ name }}
      version: ${{ version }}
    build:
      noarch: python
      number: ${{ build_number }}
    requirements:
      host:
        - python >=3.10
        - pip
      run:
        - ${{ pin_subpackage(name_a, min_pin="x.x.x") }}
        - python >=3.10
  - package:
      name: ${{ name_a }}
      version: ${{ version }}
    build:
      noarch: python
      number: ${{ build_number }}
    requirements:
      host:
        - python >=3.10
        - pip
      run:
        - python >=3.10

Its a simplified version, where there's 2 packages, and 1 depends on the other.
Sometimes it builds in the right order, sometimes not. Expanding this out to more packages, it almost always fails.
However, making this small change: ${{ pin_subpackage(name_a, min_pin="x.x.x") }} -> ${{ pin_subpackage('some-pkg-a', min_pin="x.x.x") }} does appear to fix it.
I also had used something like ${{ pin_subpackage(name ~ "-a", ...) }} which also does not work for build order.

Other odd inputs like:

${{ pin_subpackage('' ~ 'some-pkg-a', min_pin="x.x.x") }}
${{ pin_subpackage('some-pkg-a' ~ '', min_pin="x.x.x") }}
${{ pin_subpackage('' ~ 'some-pkg-a' ~ '', min_pin="x.x.x") }}
${{ pin_subpackage('some-pkg' ~ '-a', min_pin="x.x.x") }}
${{ pin_subpackage('' ~ name_a, min_pin="x.x.x") }}
${{ pin_subpackage(name_a ~ '', min_pin="x.x.x") }}
${{ pin_subpackage('' ~ name_a ~ '', min_pin="x.x.x") }}

Do not appear to work as well.
Only ${{ pin_subpackage('some-pkg-a', min_pin="x.x.x") }} consistently works every time.

I think this is a similar issue as https://github.com/prefix-dev/rattler-build/issues/553 – the problem is that we don't take the run dependencies into account when ordering the outputs (since they aren't actually needed when building the package) but it later fails in the test stage.
I wonder if things improve if you add the dependency to the host & run section?
We should improve this as it seems like a common problem (either defer the running of the tests or just sort them in the order that makes more sense).

OK, now I also see that your issue is different with the pin_subpackage evaluation (which is clearly a bug) so we should totally add edges in the graph also for the run dependencies!

My issue does look similar to #553 .
For further background:

Initially had no tests, and no pin_subpackage, so build order didn't matter. Everything went smoothly.
Added tests, and then testing would fail due to not finding a built package.
Looked up documentation, and pin_subpackage seemed to be the thing that would fix build / test order.
Was using package name references like ${{ name }}-xyz for package names and dependencies, and attempted to replace via ${{ pin_subpackage(name ~ '-xyz', ...) }}. Now building would fail.
Tried finding examples, and mamba appeared to be the closest: https://github.com/prefix-dev/rattler-build/blob/main/examples/mamba/recipe.yaml

So tried to add to host/run/run_exports/etc as in the example, still building would fail.
Replaced with context variables (ie ${{ pin_subpackage(name_a, ...) }}), still fail.
Looked closer at the libmamba, noticed it only every used direct string (${{ pin_subpackage('libmamba', exact=True) }})
Replaced my context variables with direct strings (ie ${{ pin_subpackage('some-pkg-a', ...) }}), and now builds always worked and tests always passed


fix: flutter 3.16

Description

Type of Change

[ ] ✨ New feature (non-breaking change which adds functionality)
[X] 🛠 Bug fix (non-breaking change which fixes an issue)
[ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🧹 Code refactor
[ ] ✅ Build configuration change
[ ] 📝 Documentation
[ ] 🗑 Chore

This was a test to check if the ci would run


JS: add query js/exploitable-polynomial-redos

Regular expressions with superlinear time-complexity on contemporary regular expression engines are the cause of several CVEs. We already flag the exponential cases with js/redos, regardless of how the regular expression is used. This is fine as the exponential case is bad regardless of malicious users.
It is possible to identify a large class of regular expression terms that multiplies the time-complexity of the enclosing regular expression by a linear time factor, so one such term results in quadratic time-complexity, and two such terms results in cubic time-complexity. (The 11 Class A CVEs in https://github.com/github/codeql-javascript-team/issues/63 contain patterns that are flagged by PolynomialBackTrackingTerm!)
These superlinear polynomial cases are extremely common, and mostly benign in practice. So it will be too noisy to flag all of them in general, even though many can easily be rewritten to have a linear time complexity.
To flag only the interesting cases, this PR introduces a taint tracking query that requires remote flow to be matched with the expensive regular expression. Note that the alert location is the expensive regular expression term , and that the path is for the remote flow.
In practice, client-side ReDoS is uninteresting, so the query only considers HTTP::RequestInputAccess as a source. By default, NodeJS servers only allow 8KB of data outside the body of HTTP requests, so most sources in the query will be limited to a length of less than 8000 characters, which in practice translates to roughly 100ms evaluation time for a quadratic regular expression. This is not a lot, so I have set the severity of the query to warning.
There's still room for a few improvement in the query (for instance, handing of negated character classes), but that work starts encroaching on the js/redos query implementation, so that can be done later.
For a sneak-peek at the results, check out the link hidden at https://git.semmle.com/gist/esben/313a7bfdfc6a1f30383e6891a138a2a4.

The performance is again surprisingly good.
The comparison is for js/redos vs js/redos+js/polynomial-redos, so the additional taint-tracking seems to be for free.

The performance is again surprisingly good.

Those wall clock timings are clearly biased in favor of the second run. Could you try running with --dpm?

with dpm, now the timing barely favors the run with only js/redos, so it should be good enough to land IMO.
Ping @mchammer01 for docreview.
NB:

the QHelp Preview is broken for this PR
the content in the two <include> qhelp files has simply been moved out of ReDoS.qhelp.

Thank you @mchammer01. Except for the capitalisation comment, I have addressed all of your comments with minor fixes.

Doesn't look like the qhelp preview likes your inline regexp:
PolynomialReDoS.qhelp:48:21: The content of elements must consist of well-formed character data or markup.
Line 48: (/^\s+|(?<!\s)\s+$/g), or just by using the built-in trim

I get a build error when building the qhelp offline:
Error on line 48 column 21 of PolynomialReDoS.qhelp:
  SXXP0003: Error reported by XML parser: The content of elements must consist of
  well-formed character data or markup.

It seems to be caused by the < in this regexp:
(/^\s+|(?<!\s)\s+$/g), or just by using the built-in trim


Notes and Meter Types missing from deployed app

API calls to get list of notes and meter types are not being completed. However, the do work when the app is running locally.

Fixed with V0.0.1


N Lines with N offset Values with Single Output

Any solution for this.. ??

https://github.com/AngusJohnson/Clipper2/discussions/34


workflows: used more vebose esp32s3_devkitc

Change from esp32s3 to esp32s3_devkitc when targeting self-hosted runners. This more accurately describes the board connected, rather than just the chip type.

The HIL test that failed earlier today now completes successfully: https://github.com/golioth/golioth-firmware-sdk/actions/runs/6646121403/job/18059030920


objects in .obj downloaded from Windows Device Portal

How objects are being segmented in room scan .obj downloaded from Windows Device Portal? is it based on bounding volume of spatial mapping observer?

I'm looking into this for you with the team.

Thanks alot for cooperation.

@mattzmsft Was this ever resolved?


Fixed two lines in example script

Fixed two lines in example script "Can you provide example scripts for copying attributes used in testing?"

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks

Assigned to Georgia Huggins. Georgia, Can you review those proposed changes? Thanks

Assigned to Georgia Huggins. Georgia, Can you review those proposed changes? Thanks


wip: smol datatypes

Blocked on:

https://github.com/jorgecarleitao/arrow2/pull/1469
https://github.com/DataEngineeringLabs/arrow2-convert/pull/108
https://github.com/pola-rs/polars/pull/8295

Running the new extended memory_usage example:
Short EntityPath uses 78 bytes in RAM

--- 1 rows each containing 1 points (packed=false) ---
Arrow payload containing 1x Pos2 uses 2.9 kiB bytes in RAM
Arrow LogMsg containing 1x Pos2 uses 7.6 kiB-10.1 kiB bytes in RAM, and 794 B bytes encoded

--- 1 rows each containing 1 points (packed=true) ---
Arrow payload containing 1x Pos2 uses 2.5 kiB bytes in RAM
Arrow LogMsg containing 1x Pos2 uses 7.6 kiB-9.7 kiB bytes in RAM, and 746 B bytes encoded

--- 1 rows each containing 1000 points (packed=false) ---
Arrow payload containing 1000x Pos2 uses 10.3 kiB bytes in RAM
Arrow LogMsg containing 1000x Pos2 uses 15.4 kiB-17.5 kiB bytes in RAM, and 7.9 kiB bytes encoded

--- 1 rows each containing 1000 points (packed=true) ---
Arrow payload containing 1000x Pos2 uses 10.3 kiB bytes in RAM
Arrow LogMsg containing 1000x Pos2 uses 15.4 kiB-17.5 kiB bytes in RAM, and 7.8 kiB bytes encoded

--- 100000 rows each containing 1 points (packed=false) ---
Arrow payload containing 1x Pos2 uses 90.6 MiB bytes in RAM
Arrow LogMsg containing 1x Pos2 uses 4.8 MiB-95.8 MiB bytes in RAM, and 1.6 MiB bytes encoded

--- 100000 rows each containing 1 points (packed=true) ---
Arrow payload containing 1x Pos2 uses 54.0 MiB bytes in RAM
Arrow LogMsg containing 1x Pos2 uses 4.8 MiB-59.3 MiB bytes in RAM, and 1.6 MiB bytes encoded

--- 100000 rows each containing 1000 points (packed=false) ---
Arrow payload containing 1000x Pos2 uses 851 MiB bytes in RAM
Arrow LogMsg containing 1000x Pos2 uses 767 MiB-1.6 GiB bytes in RAM, and 683 MiB bytes encoded

--- 100000 rows each containing 1000 points (packed=true) ---
Arrow payload containing 1000x Pos2 uses 816 MiB bytes in RAM
Arrow LogMsg containing 1000x Pos2 uses 767 MiB-1.5 GiB bytes in RAM, and 683 MiB bytes encoded

Closing -- will get fixed automagically by #2354


App: phone object

During edit mode we should pull out a phone (it could be the webaverse card with a screen).

We have the model here: https://github.com/webaverse/assets/blob/master/card2.glb


bzlmod gazelle cannot produce a correct BUILD file for grpc.

What version of gazelle are you using?
0.40.0
What version of rules_go are you using?
0.50.1
What version of Bazel are you using?
8.0.0
Does this issue reproduce with the latest releases of all the above?
yes
What operating system and processor architecture are you using?
macos arm m2
What did you do?
Try to build my sample project https://github.com/gator1/rundoo with bazel.
Had a lot of trouble using WORKSPACE and decided to use all latest. I used bzlmod.
Cannot make gazelle generate the right BUILD file, it produced reference to io_bazel_rules_go which bazel cannot find the
repo.

my project rundoo was built with go build and works fine. It uses grpc where I think bazel/gazelle belmod has trouble with.
I follow this doc https://github.com/bazel-contrib/rules_go/blob/master/docs/go/core/bzlmod.md
BUILD file is
load("@gazelle//:def.bzl", "gazelle")

gazelle(name = "gazelle")

MODULE.bazel
bazel_dep(name = "gazelle", version = "0.40.0")
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "rules_proto_grpc", version = "5.0.1")

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")

# Download a suitable Go SDK.
go_sdk.download(version = "1.23.3")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(go_deps, "com_github_data_dog_go_sqlmock", "com_github_jarcoal_httpmock", "com_github_lib_pq", "com_github_stretchr_testify", "org_golang_google_grpc", "org_golang_google_protobuf")

.bazelrc
common --enable_bzlmod

.bazelversion
8.0.0

Passed bazel run //:gazelle with warning
bazel run //:gazelle
INFO: Analyzed target //:gazelle (2 packages loaded, 105 targets configured).
INFO: Found 1 target...
Target //:gazelle up-to-date:
  bazel-bin/gazelle-runner.bash
  bazel-bin/gazelle
INFO: Elapsed time: 0.380s, Critical Path: 0.03s
INFO: 1 process: 67 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/gazelle
gazelle: could not parse directive: app/registry //app/registry:go_default_library
        expected gazelle:resolve source-language [import-language] import-string label
gazelle: finding module path for import app/log: go: -d flag is deprecated. -d=true is a no-op
go: malformed module path "app/log": missing dot in first path element
gazelle: finding module path for import app/log: go: -d flag is deprecated. -d=true is a no-op
go: malformed module path "app/log": missing dot in first path element
gazelle: finding module path for import app/log: go: -d flag is deprecated. -d=true is a no-op
go: malformed module path "app/log": missing dot in first path element

failed bazel build ...
bazel build ...
WARNING: Target pattern parsing failed.
ERROR: Skipping '...': error loading package under directory '': error loading package 'api/v1': Unable to find package for @@[unknown repo 'rules_proto' requested from @@ (did you mean 'rules_go'?)]//proto:defs.bzl: The repository '@@[unknown repo 'rules_proto' requested from @@ (did you mean 'rules_go'?)]' could not be resolved: No repository visible as '@rules_proto' from main repository.
ERROR: error loading package under directory '': error loading package 'api/v1': Unable to find package for @@[unknown repo 'rules_proto' requested from @@ (did you mean 'rules_go'?)]//proto:defs.bzl: The repository '@@[unknown repo 'rules_proto' requested from @@ (did you mean 'rules_go'?)]' could not be resolved: No repository visible as '@rules_proto' from main repository.
INFO: Elapsed time: 0.132s
INFO: 0 processes.
ERROR: Build did NOT complete successfully

I pushed all the changes to https://github.com/gator1/rundoo. Please check its bzlmod branch, the main branch doesn't have bazel stuff.

### What did you expect to see?
bazel build ... works

### What did you see instead?

bazel build ...
WARNING: Target pattern parsing failed.
ERROR: Skipping '...': error loading package under directory '': error loading package 'log': Unable to find package for @@[unknown repo 'io_bazel_rules_go' requested from @@]//go:def.bzl: The repository '@@[unknown repo 'io_bazel_rules_go' requested from @@]' could not be resolved: No repository visible as '@io_bazel_rules_go' from main repository.
ERROR: error loading package under directory '': error loading package 'log': Unable to find package for @@[unknown repo 'io_bazel_rules_go' requested from @@]//go:def.bzl: The repository '@@[unknown repo 'io_bazel_rules_go' requested from @@]' could not be resolved: No repository visible as '@io_bazel_rules_go' from main repository.
INFO: Elapsed time: 0.125s
INFO: 0 processes.
ERROR: Build did NOT complete successfully

It generated
go_proto_library(
    name = "v1_go_proto",
    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
    importpath = "github.com/gator1/rundoo/api/v1",
    proto = ":v1_proto",
    visibility = ["//visibility:public"],
)

in BUILD.bazel under app/api/v1.
I don't understand the relationship between io_bazel_rules_go and rules_go
but I didn't have this problem when I tried WORKSPACE. WORKSPACE would have a few other issues.

forgot to mention: I also tried to add protobuf
bazel_dep(name = "gazelle", version = "0.40.0")
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "protobuf", version = "29.2")
bazel_dep(name = "rules_proto_grpc", version = "5.0.1")

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")

# Download a suitable Go SDK.
go_sdk.download(version = "1.23.3")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(go_deps, "com_github_data_dog_go_sqlmock", "com_github_jarcoal_httpmock", "com_github_lib_pq", "com_github_stretchr_testify", "org_golang_google_grpc", "org_golang_google_protobuf")

got the same result.

found this: https://fzakaria.com/2024/11/28/bazel-knowledge-protobuf-is-the-worst-when-it-should-be-the-best.html
Is there a workaround?


Instruction Naming of Ordered Indexed Segment Stores

In section 7.8.3. Vector Indexed Segment Loads and Stores, instruction names contain "x" to refer "Indexed", i.e., vluxseg<nf>ei<eew>.v. However, the name of "ordered indexed segment stores" is vsoseg<nf>ei<eew>.v. Is it a typo or intentional? Thanks.

Typo is fixed.


Disable PPE search in embed mode

Overview
Requested by OAR. This functionality was already behind a feature flag, so we added a helper to make sure the flag is always disabled in embed mode.
Connects #1354
Testing Instructions

Browse http://localhost:6543/ and verify that the text search is labeled "Search a Facility Name, OAR ID, or PPE Product Type" and the "Show only PPE..." checkbox is visible
Enable embeded mode for contributor 2 and host and browse the index.html below on localhost to test the embed. Verify that the search bar has no mention of ppe

<!doctype html>

        <meta charset="UTF-8"/>
        <title>OAR Embed Demo</title>

                My embedded map

item one

item b

item the third

Checklist

[x] fixup! commits have been squashed
[x] CI passes after rebase
[x] CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

Thanks for the review.


Add Layout & Title

advadvadfvadvadvadvasdad

adfafavdvdfadfd

adffeqffqfdfqdfdfadfdfdfddfffdfdfferf
qefqer
fqer
fq
erf
qer
qerf
qer
fqer
f

created a branch, created a file and made a commit, and opened a pull request


"Crângeni", "Balta Sărată", "Dorobanțu" and "Stejaru" are listed in the drop-down menu

Description:
"Crângeni", "Balta Sărată", "Dorobanțu" and "Stejaru" 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 "Crângeni" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Crângeni, TELEORMAN (Crângeni)" and "Comuna Crângeni, TELEORMAN".

Step 3
Type "Balta Sărată" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Balta Sărată, TELEORMAN (Crângeni)".

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 6
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 7
Type "Stejaru" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Stejaru, TELEORMAN (Crângeni)".


Protobuf bump

protoc-gen-go was updated, files needed to be regenerated
Also now runs full CI checks after code review is completed, this would've caught the AST being merged in with outdated protobuf files.

Thank you for taking care of the CI checks!


Single JS file?

Hi there,
would it be possible to compile the TypeScript files into a single js file (e.g. helium-js-min.js) for convenient inclusion into html directly?
Thanks!

Hi guess this Issue is going in the same direction: https://github.com/helium/helium-js/issues/253#issue-1042993583
Anyone willing to help compiling the ypeScript files into a single js file (e.g. helium-js-min.js) for convenient inclusion into html directly?

Bump…

bump


Revert "Team 3 maps main"

Reverting Team 3 maps main

I'm not sure if this will break other things but at least its working.


URDF to SDF conversion ignores links with small mass

Spin-off of https://github.com/ignitionrobotics/sdformat/issues/199 for visibility. Quoting from https://github.com/ignitionrobotics/sdformat/issues/199#issuecomment-612375956 :

Original comment by Kaelin (Bitbucket: Kaelin).
I happen to have run into a variant of this issue today and spent a while debugging it. In addition to the case of having not declared an inertia node in the XML at all, this also occurs if you have a mass value which is too small. A mass value of 0.00001 (1e-5) works fine, but if you decrease it to 0.000001 (1e-6), the link is silently omitted. This is pretty dangerous, since it is easy to gloss over an additional 0 when scanning for issues. I saw that having no mass was disallowed, so my natural inclination was to make it some very small number, and happened to hit too many zeroes.
An error in this case, even if massless links aren’t implemented, would be much appreciated.

The issue is due to the following line:

https://github.com/ignitionrobotics/sdformat/blob/sdformat12_12.4.0/src/parser_urdf.cc#L2644

it may not be immediatly clear why ``, but this come from the fact that the second argument of ignition::math::equal is not specified and by default it is 1e-6:

https://github.com/ignitionrobotics/ign-math/blob/ignition-math6_6.10.0/include/ignition/math/Helpers.hh#L557

Fixed by https://github.com/gazebosim/sdformat/pull/1238

Fixed by #1238

More specifically, https://github.com/gazebosim/sdformat/pull/1238 does not allow link mass with value of <= 0, without any epsilon values, https://github.com/gazebosim/sdformat/pull/1238/files#diff-2bc5ca23bcfc66fe173f513399bec8065b1cb4e607d741566517d7368e6bce0fR2670


List Item

Create the List Items in Figma

duplicate: https://github.com/swisspost/design-system/issues/1580


Nick: Watch blinds4life.in

Nick requests the watch of the watch_keyword blinds4life\.in. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

blinds4life\.in has been seen in 0 true positives, 1 false positive, and 0 NAAs.

Rejected by Nisse Engström in Charcoal HQ. Reason: 'The website displays the error mentioned so it looks like a real question.'


Strange error message from simp_arith

Prerequisites

[X] Put an X between the brackets on this line if you have done all of the following:

Check that your issue is not already filed.
Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.

Description
When I create a Lean file with the following contents:
theorem huh (x : Int) : x + 1 = 1 + x := by simp_arith

then I get the following error:
application type mismatch
   List.cons (Int.add x 1)
 argument has type
   Int
 but function has type
   Nat → List Nat → List Nat

Everything works fine for this version:
theorem huh (x : Nat) : x + 1 = 1 + x := by simp_arith

Context
This happened while looking for very easy examples of simp not making progress for FPIL.
Steps to Reproduce

Put the code above in a file
Read the error message

Expected behavior:
Either an error message related to simp_arith not making progress, or a successful proof, or a new proof state.
Actual behavior:
A confusing error message
Versions
Lean (version 4.2.0-rc1, commit a62d2fd49796, Release)
Linux localhost.localdomain 6.5.5-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Sep 24 15:52:44 UTC 2023 x86_64 GNU/Linux

Impact
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.

Don't have time to investigate, but here is a quick comment: simp_arith currently only supports Nat. It may be useful for someone investigating the issue.

I'm not sure if this is related, but #2021 is another bug where simp produces a term that the kernel rejects with a type mismatch error.


feat: deploy warp router for erc721

What
i add new feature to able to deploy warpRoute for erc721
New
Note
ERC721 contract should have totalSupply() if not it will failed because HypERC721Deployer.fetchMetadata() of hyperlane-token package require it
configuration
We need to add isERC721 to WarpRouteConfig base if you want to use erc721 as collateral
export const warpRouteConfig: WarpRouteConfig = {
  base: {
    // Chain name must be in the Hyperlane SDK or in the chains.ts config
    chainName: 'goerli',
    type: TokenType.collateral, //  TokenType.native or TokenType.collateral
    // If type is collateral, a token address is required:
    // address: '0x123...'
    // isERC721:  boolean

    // Optionally, specify owner, mailbox, and interchainGasPaymaster addresses
    // If not specified, the Permissionless Deployment artifacts or the SDK's defaults will be used
  },

Reference:
https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/2201

Thanks for the PR here! Fixed up and moved to #61


Valgrind error

I'm seeing Valgrind errors when importing Pandas.  This Python is built with --with-valgrind, which disables PyMalloc when running under valgrind.  The Pandas version was pulled from Github just now, but this issue happens with 0.10 also.
~$ valgrind python -c 'import sys'
==2832== Memcheck, a memory error detector
==2832== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==2832== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2832== Command: python -c import\ sys
==2832==
==2832==
==2832== HEAP SUMMARY:
==2832==     in use at exit: 864,491 bytes in 5,240 blocks
==2832==   total heap usage: 42,287 allocs, 37,047 frees, 9,519,928 bytes allocated
==2832==
==2832== LEAK SUMMARY:
==2832==    definitely lost: 0 bytes in 0 blocks
==2832==    indirectly lost: 0 bytes in 0 blocks
==2832==      possibly lost: 281,296 bytes in 1,031 blocks
==2832==    still reachable: 583,195 bytes in 4,209 blocks
==2832==         suppressed: 0 bytes in 0 blocks
==2832== Rerun with --leak-check=full to see details of leaked memory
==2832==
==2832== For counts of detected and suppressed errors, rerun with: -v
==2832== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 7)

~$ valgrind python -c 'import pandas'
==2981== Memcheck, a memory error detector
==2981== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==2981== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2981== Command: python -c import\ pandas
==2981==
==2981== Invalid read of size 4
==2981==    at 0x442ECF: long_new (longobject.c:3998)
==2981==    by 0x466262: type_call (typeobject.c:721)
==2981==    by 0x4189BC: PyObject_Call (abstract.c:2529)
==2981==    by 0x49715C: PyEval_EvalFrameEx (ceval.c:4239)
==2981==    by 0x49DD7A: PyEval_EvalCodeEx (ceval.c:3253)
==2981==    by 0x49B701: PyEval_EvalFrameEx (ceval.c:4117)
==2981==    by 0x49DD7A: PyEval_EvalCodeEx (ceval.c:3253)
==2981==    by 0x4FCA3E: function_call (funcobject.c:526)
==2981==    by 0x4189BC: PyObject_Call (abstract.c:2529)
==2981==    by 0x41FECE: instancemethod_call (classobject.c:2578)
==2981==    by 0x4189BC: PyObject_Call (abstract.c:2529)
==2981==    by 0x46CFF7: slot_tp_init (typeobject.c:5663)
==2981==  Address 0xc8f1764 is 68 bytes inside a block of size 69 alloc'd
==2981==    at 0x4C238B8: malloc (vg_replace_malloc.c:270)
==2981==    by 0x4501D3: PyObject_Malloc (obmalloc.c:943)
==2981==    by 0x457CA5: PyString_FromStringAndSize (stringobject.c:88)
==2981==    by 0xF2E6457: binascii_hexlify (binascii.c:1075)
==2981==    by 0x49C8C1: PyEval_EvalFrameEx (ceval.c:4021)
==2981==    by 0x49DD7A: PyEval_EvalCodeEx (ceval.c:3253)
==2981==    by 0x49B701: PyEval_EvalFrameEx (ceval.c:4117)
==2981==    by 0x49DD7A: PyEval_EvalCodeEx (ceval.c:3253)
==2981==    by 0x4FCA3E: function_call (funcobject.c:526)
==2981==    by 0x4189BC: PyObject_Call (abstract.c:2529)
==2981==    by 0x41FECE: instancemethod_call (classobject.c:2578)
==2981==    by 0x4189BC: PyObject_Call (abstract.c:2529)
==2981==
==2981==
==2981== HEAP SUMMARY:
==2981==     in use at exit: 10,613,864 bytes in 73,317 blocks
==2981==   total heap usage: 586,122 allocs, 512,805 frees, 90,175,227 bytes allocated
==2981==
==2981== LEAK SUMMARY:
==2981==    definitely lost: 245 bytes in 3 blocks
==2981==    indirectly lost: 0 bytes in 0 blocks
==2981==      possibly lost: 3,140,920 bytes in 24,857 blocks
==2981==    still reachable: 7,472,699 bytes in 48,457 blocks
==2981==         suppressed: 0 bytes in 0 blocks
==2981== Rerun with --leak-check=full to see details of leaked memory
==2981==
==2981== For counts of detected and suppressed errors, rerun with: -v
==2981== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 202 from 10)

~$ python -c 'import pandas; print pandas.version.version'
0.11.0.dev-14a04dd

If someone is interested in this, it would be good to look into on a more recent pandas version


On max zoom Bing imagery is not shown

Neither upscaled tiles nor warning that zoom is too great is shown

#52


SMS-EMOA possible

I am new at GA, but I want to implement SMS-EMOA. I have read it Is similar to NGSAII.
How can I implement it?

You can use existing implementations in pymoo as a template. Then, comprehending the algorithm first and coding it up is the way to go.


systemd service doesn't find executable

after installing with sudo make install on ubuntu, the binary installs into /usr/local/bin but the service path is on /usr/bin/zcfan
fixed it changing the location of the executable to /usr/local/bin/zcfan
please tell me if you need more info

Hmm, yes. I suppose we should templatise the systemd file.

Since it's a program typically used only from root (or systemd), I'd propose /usr/sbin as executable path location

That's probably true, I'm on a /usr merged distribution so don't think about this much. I'd rather avoid having to use some crappy templating system just for this, probably this can just be done through the makefile.


Can't set command line arguments

What I did:
Create file main.go (in a directory named example) containing:
package main

import (
    "fmt"
    "os"
)

func main() {
    fmt.Println(os.Args)
}

Run commands:
$ go build
$ dlv ./example bar
Type 'help' for list of commands.
(dlv) continue
[./example]
Stopped at: 0x0
=>    no source available
(dlv) Would you like to kill the process? [y/n]
[Hope I was of service hunting your bug!]

What I expected:
...
(dlv) continue
[./example bar]
...

Versions:
$ dlv -v
flag provided but not defined: -v
Delve version 0.5.0.beta
flags:
  -addr=localhost:0: Debugging server listen address.
  -log=false: Enable debugging server logging.
  -version=false: Print version number and exit.

Invoke with the path to a binary:
  dlv ./path/to/prog
or use the following commands:
  run - Build, run, and attach to program
  test - Build test binary, run and attach to it
  attach - Attach to running process
$ go version
go version go1.4.2 darwin/amd64
$ uname -a
Darwin silver.sethwklein.net 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

@sethwklein can you try against the latest version? This issue should be resolved.

Works for me.

How Can I do that setting command line arguments?
I use :Delve version: 0.10.0-alpha

@luweijie007 a comment on a closed and possibly unrelated bug report may not be an effective place to get help. Can you try asking in https://gitter.im/derekparker/delve ?

ok , I go to gitter. thanks your reply

@luweijie007 AFAICT passing arguments on the command line still works ok.
If you have a precompiled binary:
$ dlv exec ./executable argument1 argument2…

if you want delve to compile the program for you (like go build would):
$ dlv debug argument1 argument2…

argument1, argument2, &c. will be passed to the target.

This still does not work if the compiled binary has args of the form --
e.g
dlv exec ./hello server --config conf/config.toml
Usage:
dlv exec [./path/to/binary] [flags]
Global Flags:
--build-flags="": Build flags, to be passed to the compiler.
--headless[=false]: Run debug server only, in headless mode.
--init="": Init file, executed by the terminal client.
-l, --listen="localhost:0": Debugging server listen address.
--log[=false]: Enable debugging server logging.
Error: unknown flag: --config

@keshavab arguments are different than flags. For flags, please ensure you use this form:
dlv exec ./hello -- server --config conf/config.toml

Thanks @derekparker. That helped.
It's not documented or may be i did not find it. I can send a PR if its not there.

I could not find documentation on this feature as well. I created a PR to add to docs: https://github.com/derekparker/delve/pull/733


Provide more comprehensive exhaustiveness queries for Programs and matches.

Exhaustiveness describes the extent of a match in a directory tree. A Program (glob) is exhaustive if a match indicates that any path in the sub-tree must also match the pattern. Today, this is provided in the public API by Program::is_exhaustive.
Program::is_exhaustive returns a bool, but this should really be a trivalent logic type. Some patterns have indeterminate exhaustiveness in the absence of a specific candidate path due to alternatives. For example, {**/*.txt,foo/**} is indeterminate: it is nonexhaustive when matching the path bar/baz.txt but is exhaustive when matching the path foo. I plan to introduce a more appropriate type to represent this like the following:
#[derive(Clone, Copy, Debug, Eq, Hash PartialEq)]
pub enum When {
    Never,
    Sometimes,
    Always,
}

let glob = Glob::new(...).unwrap();
if glob.exhaustiveness().is_always() { ... }

Given a candidate path, it should be possible to definitively determine the exhaustiveness of a match, so a bool can be used in that context: the match is either exhaustive or not. This could be provided by Program::matched:
let candidate = CandidatePath::from(...);
let glob = Glob::new(...).unwrap();
if let Some(matched) = glob.matched(&candidate) {
    let text = matched.text(); // Gets the `MatchedText`. This is returned directly today.
    if matched.is_exhaustive() { ... }
}

Unfortunately, there are some big challenges in implementing this.

I don't believe there is a way to query a compiled regular expression for which branch of an alternative matched a given input. Barring that, it could be necessary to compile regular expressions for each branch of an alternative along with some way to pair them with components in the matched path. Yikes.
Exhaustiveness queries are still inaccurate and need improvement. There are many false negatives today (note that false positives are serious bugs). I've done a lot of experimental work on this outside of this repository, but nothing has landed here yet.
Despite the progress I've made on variance and exhaustiveness queries, they still don't support an indeterminate result (When::Sometimes) and I'm not yet sure how to accomplish that.

So why do this? :smile: Well, not only would it provide a more correct API (though I realize that the overwhelming majority of users don't care about these APIs), but it would also remove the need to partition patterns into exhaustive and nonexhaustive patterns in negations. In particular, the FileIterator::not combinator would no longer need to accept a sequence of patterns and could instead accept a single pattern. This could of course be an any combinator, so it would still be possible to use multiple patterns in a single not.
let glob = Glob::new(...).unwrap();
for entry in glob.walk(".").not(Glob::new(...).unwrap()) { ... }

This removes the need for not to handle building programs and emitting errors. More importantly, it also prevents poor performance caused by pathological inputs. Building both nonexhaustive and exhaustive patterns into an any combinator can cause a negation to consider all matches nonexhaustive and therefore read directory trees when it may not be necessary. I also plan to introduce additional combinators that would also benefit from this for the same reasons. For example, a not_except combinator:
let glob = Glob::new(...).unwrap();
for entry in glob
    .walk(".")
    .not_except(
        wax::any([..., ...]).unwrap(), // Negation.
        Glob::new(...).unwrap(), // Override. Allow this pattern despite the negation.
    )
{
    ...
}

I prefer these APIs, but they cannot efficiently filter without knowing about exhaustiveness. Given only a single pattern, these APIs would rely on exhaustiveness information in Program::matched rather than Program::exhaustiveness.

This is somewhat of a tangent, but I have a few more thoughts I wanted to write down about this and the changes it could allow.
In the examples from my comment above, not_except is a FileIterator combinator much like not but that also supports overrides. This is similar but distinct from any positive glob that initiates a walk and must be coupled with the filtering combinator, because filtering is monotonic (an override must prevent the filter from moving an entry from filtrate to residue, which is a one-way operation). not_except is a lot like gitignore, which also supports these sorts of overrides.
With better support of exhaustiveness queries and more generally accepting Programs in FileIterator, not_except may not be needed at all and instead an Except glob type can be used when needed. This further generalizes (simplifies) FileIterator combinators and provides a good target for supporting gitignore via a translation from gitignore expressions into an Except combinator under the hood. At time of writing, I plan to introduce a not_git_ignore combinator, but this wouldn't be necessary at all! Instead, Except could be constructed using functions with gitignore support and passed directly to not.
The Program trait would look something like this (some items and bounds omitted):
pub trait Program<'t>: ... {
    fn is_match<'p>(&self, candidate: impl Into<CandidatePath<'p>>) -> bool;
    fn matched<'p>(&self, candidate: &'p CandidatePath<'_>) -> Option<MatchedPath<'p>>;
    // This probably shouldn't be a member of `Program`, but is included here for illustration.
    fn residue<'p>(&self, candidate: &'p CandidatePath<'_>) -> Option<EntryResidue> {
        self.matched(candidate).map(|matched| {
            if matched.is_exhaustive() {
                EntryResidue::Tree
            }
            else {
                EntryResidue::File
            }
        })
    }
    fn exhaustiveness(&self) -> When;
}

impl<'p> MatchedPath<'p> {
    fn text(&self) -> &MatchedText<'p> { ... }
    fn is_exhaustive(&self) -> bool { ... }
}

The FileIterator trait would then look something like this (some items and bounds omitted). Note that not is called not_pattern instead here:
pub trait FileIterator: ... {
    type Entry: ...;
    type Residue: ...;

    fn not_pattern<'t>(self, program: impl Program<'t>) -> Not<'t, Self>; // All that is needed for nominal filters.
    fn not_hidden(self) -> NotHidden<Self>; // A (sometimes) non-nominal filter provided for convenience.
}

With this, the not_except example from my comment above becomes something more like this:
let glob = Glob::new(...).unwrap();
let except = wax::except(
   wax::any([..., ...]).unwrap(), // Negation.
   ..., // Override. Allow this pattern despite the negation.
).unwrap();
for entry in glob.walk(".").not_pattern(except) { ... }

Similarly, gitignore could be read, parsed, and built into an Except:
let glob = Glob::new(...).unwrap();
let except = gitignore::local_from_path(".").unwrap();
for entry in glob.walk(".").not_pattern(except) { ... }

Something more like what the ignore crate provides would look a bit like this:
let path = Path::new(".");
let except = gitignore::local_from_path(path).unwrap();
for entry in path
    .walk()
    .not_hidden()
    .not_pattern(except)
{
    ...
}

I like the shape of these APIs. In essence, it pushes the complexity of composing patterns out of FileIterator combinators and into glob combinators instead. 👍🏽
Lastly, something like this could be done today by always paying the cost of partitioning patterns in any. At time of writing, this is only done in FilterAny, which powers FileIterator::not and allows for much more reliable exhaustiveness queries when it counts. This still means that pathological patterns and constructions are possible (namely that alternatives in a Glob may have worse performance than individual patterns passed to and partitioned by an Any), but it at least enables these APIs at what I think is an acceptable cost (because Any and other glob combinators could implement Program::is_exhaustive more reliably).


Fix issue 14375 - static assert leads to __traits(allMembers) retuning an extra empty entry

The problem was that StaticAssert had an empty identifier instead of a null one, which is expected by allMember.
By the way is there a reason why Id::empty is empty string instead of NULL ?

Id::empty is used to avoid NULL check for the ident member access.
ident == NULL is used for the anonymous members which not yet semantic analysis finished. For example, an anonymous class creation new class (arguments) { ... } internally defines a ClassDeclaration with NULL ident, then it will be filled by the unique name in ClassDeclaration::semantic().

Thanks for the explanation!
I changed the commit accordingly to just exclude Id::empty.
Btw: Should I submit this against stable as well / instead ?

LGTM.

Btw: Should I submit this against stable as well / instead ?

Even so, we can cherry-pick the commit later into stable branch.

Auto-merge toggled on


Fix Xcode 13 beta 3 build issues

Fix #8401

Note the travis CI failure is dealt with separately in #8404

Merging without full CI since only CHANGELOGs changed.


[CS] Apply Doctrine CS 3.0

Changes from 2.0 -> 3.0:

Import all functions and constants in use
Remove useless comments
Use new with parenthesis
Unqualified class references in annotations

Excluded:

EarlyExit sniff: To be handled separately as is not just cosmetics.
ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName: Excluded for Annotation namespace - annotations do not work with use.

~I'll drop WIP label and dev-master dependency once Slevomat CS 4.4.5 with bugfixes is out, but feel free to review already.~

@Ocramius @Majkl578 Thanks for ping me. Gonna rebase and reconstruct #7046 with new CS version and excludes Sniffs.


TypeError: (getBuffer, getHeaders) is not a function

I'm using react, redux w/ typescript. In my component file here is the function where I'm trying to post my formed data with axios.
MyComponent.tsx
import React, { useState } from 'react';
import FormData from 'form-data';
import Axios from 'axios';

...

  const requestSubmit = () => {
    const form = new FormData();

    form.append('firstName', firstName);
    form.append('lastName', lastName);
    form.append('email', email);
    form.append('phone', phone);
    form.append('birthdate', birthdate);
    form.append('motivation', motivation);
    form.append('fileId', fileId);
    form.append('fileCert', fileCert);

    Axios.post('http://localhost:3001/request', form.getBuffer(), {
      headers: {
        ...form.getHeaders(),
      },
    })
      .then((res) => {
        console.log(res);
      }).catch((err) => {
        console.error(err);
      });
  };

...

Tested with form-data v3.0.0 and v4.0.0?
I tried editing all the class and types names directly in the npm module code because I thought it was a conflict with the JS FormData class but still was an issue.
Thanks in advance.

I'm having the same problem :c

I am also getting this error when using form-data in a React Native application.

I'm pretty sure it is because react native implements their own https://github.com/facebook/react-native/blob/main/Libraries/Network/FormData.js and that one keeps getting used.

I got this error too. Any idea how to solve this problem?


Routes correction

Fixed the routes, currently finalizing endpoint tests in insomnia.
DB Seeds properly

Looks great Andrew, thanks for your hard work!


[sival] Replace nonexistent bazel targets in HMAC and KMAC testplans

The old hmac_kat and hash_kat cryptotest targets had been split up. This PR updates these targets in the HMAC and KMAC testplans.
One thing to note is that looking at cSHAKE, it only has four test cases that are defined in sw/device/tests/kmac_mode_cshake_test.c. We don't have any large set of NIST KAT test vectors since I don't think they ever released any. We do have two examples that NIST has provided that we manually extracted from a PDF. They are currently in sw/device/tests/crypto/testvectors/cshake_hardcoded.hjson but are not used anywhere. Do we want to include these two hardcoded tests?
More broadly, do we want to include the hardcoded tests under sw/device/tests/crypto/testvectors for other algorithms as well as part of the sival tests? As best as I can tell, several of the hardcoded tests currently aren't being used.

Hi @milesdai, I think it is a good idea to include the hardcoded tests as well.


Update DMTanks-AeroRTG.netkan

increased version compatibility

so what did I do wrong?

so what did I do wrong?

Nothing, the validation is broken currently. See https://github.com/KSP-CKAN/CKAN/pull/2170 for updates.

#rebuild


[flutter_tools] use correct sdk path for analysis

Description
flutter analyze was unconditionally using the cached dart-sdk for analysis, and was not running with the built SDK during local engine. This broke when trying to update the analyzer for null safety, since it required us to wait for the dart change to roll into the framework first.

I should probably move that API into the cache so it can't be misued


Small fixes

Motivation for this change
Small fixes in order to make Repology happy :)
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

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

Success on aarch64-linux (full log)
Attempted: guile-reader, higan, libtap, pekwm
Partial log (click to expand)
copying path '/nix/store/snjh1f89aysrp9yqr1ms81wrvbpk4qrf-gtksourceview-2.10.5' from 'https://cache.nixos.org'...
copying path '/nix/store/d8clll8nkkysjfjpp693cd7r1c8kpc5f-libGLU-combined' from 'https://cache.nixos.org'...
copying path '/nix/store/cpcb4gw4raib6xa1wj09j69cryzf3dfc-openal-soft-1.18.2' from 'https://cache.nixos.org'...
copying path '/nix/store/8jm0jr8fa885v23pkf0pbx9krrkqjbr8-guile-2.2.3' from 'https://cache.nixos.org'...
copying path '/nix/store/h7kq6a2mm5lwf7x77vbl4y4k2bf3piz1-higan-106' from 'https://cache.nixos.org'...
copying path '/nix/store/4ir3091030iqwacs9asbfzdlfd188z3x-guile-reader-0.6.2' from 'https://cache.nixos.org'...
/nix/store/4ir3091030iqwacs9asbfzdlfd188z3x-guile-reader-0.6.2
/nix/store/h7kq6a2mm5lwf7x77vbl4y4k2bf3piz1-higan-106
/nix/store/3xwr0ppczdwryjdc3zpciffgyln3jfdi-libtap-1.12.0
/nix/store/qcw31in58kgwkfc0lsvlw1qmn792zylq-pekwm-0.1.17

Success on x86_64-linux (full log)
Attempted: guile-reader, higan, libtap, pekwm
Partial log (click to expand)
copying path '/nix/store/7bz7cbghx0sws74aqf9jbcn5mzncda9n-openal-soft-1.18.2' from 'https://cache.nixos.org'...
copying path '/nix/store/cvv9wkiw4yn4bh45vw609g00cdb20qyl-SDL-1.2.15' from 'https://cache.nixos.org'...
copying path '/nix/store/4w1fva01r7295085h2ba6wglvdpg5kyf-glu-9.0.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/x464qfk6ppyrjk99m0sfbpg65vxiwfzb-libGLU-combined' from 'https://cache.nixos.org'...
copying path '/nix/store/j68abc0gf4wgfa7ik9jrq94cwx4mbj6g-higan-106' from 'https://cache.nixos.org'...
copying path '/nix/store/av2mmcvzzw1kcjv50mxpb0g2a60l7kl1-guile-reader-0.6.2' from 'https://cache.nixos.org'...
/nix/store/av2mmcvzzw1kcjv50mxpb0g2a60l7kl1-guile-reader-0.6.2
/nix/store/j68abc0gf4wgfa7ik9jrq94cwx4mbj6g-higan-106
/nix/store/dw9f3kh1m0lqhrsy982r66bac96dqj0a-libtap-1.12.0
/nix/store/nidqhjchx5wnl4q1ivsbwp5p2xlzhp85-pekwm-0.1.17


2022-05-21 v. 0.7.2: updated Nokogiri

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 85.946%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
318

Relevant Lines:
370

💛  - Coveralls


Fix sample config port

Fixed sample_config.gcfg, otherwise users get this message:
2015/10/20 21:51:00 failed connecting to: localhost:8086
2015/10/20 21:51:00 error: Get http://localhost:8086:0/ping: dial tcp: too many colons in address localhost:8086:0
2015/10/20 21:51:00 Get http://localhost:8086:0/ping: dial tcp: too many colons in address localhost:8086:0

I'll review tomorrow and do the needful :-)
On Tue, Oct 20, 2015 at 9:58 PM, Lindsay Hill<EMAIL_ADDRESS>wrote:

Fixed sample_config.gcfg, otherwise users get this message:
2015/10/20 21:51:00 failed connecting to: localhost:8086
2015/10/20 21:51:00 error: Get http://localhost:8086:0/ping: dial tcp:
too many colons in address localhost:8086:0
2015/10/20 21:51:00 Get http://localhost:8086:0/ping: dial tcp: too many
colons in address localhost:8086:0
You can view, comment on, or merge this pull request online at:
https://github.com/paulstuart/influxsnmp/pull/5
Commit Summary

Fixed import warnings
Changed influx config to use separate host & port variables

File Changes

M main.go
https://github.com/paulstuart/influxsnmp/pull/5/files#diff-0 (4)
M sample_config.gcfg
https://github.com/paulstuart/influxsnmp/pull/5/files#diff-1 (6)

Patch Links:

https://github.com/paulstuart/influxsnmp/pull/5.patch
https://github.com/paulstuart/influxsnmp/pull/5.diff

—
Reply to this email directly or view it on GitHub
https://github.com/paulstuart/influxsnmp/pull/5.


make sure task names don't contain spaces

makes working with the output of fzctl harder for no need.

fixed in #29


Fixes to run AKS examples

Bicep version
0.4.451 (e14a1f9511)
Describe the bug
Found two bugs:

When deploying bicep/docs/examples/101/aks/main.bicep getting error MustDefineAtLeastOneSystemPool
When deploying bicep/docs/examples/101/aks-vmss-systemassigned-identity/main.bicep getting error AgentPoolK8sVersionNotSupported

To Reproduce
Execute the above main.bicep:s
Additional context
I'll fix them and makes a PR.

@buzzfrog Thanks!  I hit this issue when converting to quickstart, will use this to fix it there, too.

Just a note that we should close this once https://github.com/Azure/azure-quickstart-templates/pull/11121 is merged


utils/github/api: Smarter pagination in paginate_rest

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.

[x] Have you successfully run brew typecheck with your changes locally?
[x] Have you successfully run brew tests with your changes locally?

The API_MAX_PAGES value is 50, so for pages 1 to 50, the paginate_rest method was making an API call even if there was no data past, for example, page 8.
This made brew contributions --user=issyl0 take 11 minutes, since we made 50 API calls per repo even if it was unnecessary, burning down our API allowance.
Instead, stop looping if we detect that there's no data in result.
This probably needs more testing for other parts of Homebrew that rely on paginate_rest and the different shapes of data it outputs.

Before:
❯ time brew contributions --user=issyl0
issyl0 contributed 1233 times in all time.
brew contributions --user=issyl0  33.90s user 26.27s system 8% cpu 11:41.11 total

After:
❯ time brew contributions --user=issyl0
issyl0 contributed 1233 times in all time.
brew contributions --user=issyl0 22.12s user 14.58s system 47% cpu 1:16.95 total

Review period will end on 2023-02-23 at 17:57:07 UTC.

Review period skipped due to critical label.