Not Launching

VSCode Version:1.29.1 (User SetUp)
OS Version: Windows 1809

Steps to Reproduce:
typed code in cmd
gives following output without launching
am Command Prompt Microsoft Windows [Version 10.0.17763.134] (c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Varun>code
dns.js:246
this._handle = new ChannelWrap();
Error: EFILE
at new Resolver (dns.js:246:20)
at dns.js:377:25
at dns.js:431:3
at NativeModule.compile (bootstrap_node.js:606:7)
at NativeModule.require (bootstrap_node.js:550:18)
at net.js:45:13 at net.js:1730:3
at NativeModule.compile (bootstrap_node.js:606:7)
at NativeModule.require (bootstrap_node.js:550:18)
at internal/child_process.js:6:13
C:\Users\Varun>

Can you try code --verbose?

I tried
code .
from then its launching perfectly without any problem from desktop shortcut too

Yeah
After running
code .
No problem with vs code
Launching directly from desktop shortcut.
Whenever I face this problem I am doing this thing, helping me alot
Don't know why it's not launching directly from desktop shortcut sometimes

I don't really understand the problem, can you explain it some more? What happens when you try to use the desktop shortcut?

VSCode does not launch
just mouse cursor rotates in busy style few milli seconds

Can you try reinstalling?


Better scheduler errors

Previously we used our own RemoteException class to show errors when
using the threaded/multiprocessing schedulers. This provided suboptimal
tracebacks, which made debugging harder. We now do the following:

Synchronous scheduler: no change

Threaded scheduler: reraise the error in the main process with the
original traceback.

Multiprocessing scheduler: If tblib is installed, use it to
serialize the traceback, and then reraise the error in the main
process with the original traceback. If it's not installed, fallback
to the old RemoteException class.

A benefit of this approach is that now pdb plays nice with the threaded
scheduler, making debugging a lot easier.
Fixes #831, Fixes #2298

Example
def add(a, b):
    return a + b

dsk = {'a': 1,
       'b': 2,
       'c': (add, 'a', 'b'),
       'd': (add, 'c', 'e')}   # will raise TypeError

get(dsk, 'd')

Threaded scheduler
Before
(dask) jcrist dask $ python test.py
Traceback (most recent call last):
  File "test.py", line 15, in <module>
    get_threaded(dsk, 'd')
  File "/Users/jcrist/Code/dask/dask/threaded.py", line 76, in get
    **kwargs)
  File "/Users/jcrist/Code/dask/dask/async.py", line 525, in get_async
    raise(remote_exception(res, tb))
dask.async.TypeError: unsupported operand type(s) for +: 'int' and 'str'

Traceback
---------
  File "/Users/jcrist/Code/dask/dask/async.py", line 291, in execute_task
    result = _execute_task(task, data)
  File "/Users/jcrist/Code/dask/dask/async.py", line 272, in _execute_task
    return func(*args2)
  File "test.py", line 7, in add
    return a + b

After
(dask) jcrist dask $ python test.py
Traceback (most recent call last):
  File "test.py", line 15, in <module>
    get_threaded(dsk, 'd')
  File "/Users/jcrist/Code/dask/dask/threaded.py", line 81, in get
    pack_exception=pack_exception, **kwargs)
  File "/Users/jcrist/Code/dask/dask/async.py", line 522, in get_async
    raise_exception(exc, tb)
  File "/Users/jcrist/Code/dask/dask/compatibility.py", line 60, in reraise
    raise exc
  File "/Users/jcrist/Code/dask/dask/async.py", line 290, in execute_task
    result = _execute_task(task, data)
  File "/Users/jcrist/Code/dask/dask/async.py", line 271, in _execute_task
    return func(*args2)
  File "test.py", line 7, in add
    return a + b
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Note that now you can run with pdb, and drop into the failed function on error (where before you couldn't).
Multiprocessing Scheduler
Before
(dask) jcrist dask $ python test.py
Traceback (most recent call last):
  File "test.py", line 13, in <module>
    get_multiprocessing(dsk, 'd')
  File "/Users/jcrist/Code/dask/dask/multiprocessing.py", line 87, in get
    dumps=dumps, loads=loads, **kwargs)
  File "/Users/jcrist/Code/dask/dask/async.py", line 525, in get_async
    raise(remote_exception(res, tb))
dask.async.TypeError: unsupported operand type(s) for +: 'int' and 'str'

Traceback
---------
  File "/Users/jcrist/Code/dask/dask/async.py", line 291, in execute_task
    result = _execute_task(task, data)
  File "/Users/jcrist/Code/dask/dask/async.py", line 272, in _execute_task
    return func(*args2)
  File "test.py", line 5, in add
    return a + b

After (with tblib installed)
(dask) jcrist dask $ python test.py
Traceback (most recent call last):
  File "test.py", line 13, in <module>
    get_multiprocessing(dsk, 'd')
  File "/Users/jcrist/Code/dask/dask/multiprocessing.py", line 177, in get
    raise_exception=reraise, **kwargs)
  File "/Users/jcrist/Code/dask/dask/async.py", line 522, in get_async
    raise_exception(exc, tb)
  File "/Users/jcrist/Code/dask/dask/compatibility.py", line 59, in reraise
    raise exc.with_traceback(tb)
  File "/Users/jcrist/Code/dask/dask/async.py", line 290, in execute_task
    result = _execute_task(task, data)
  File "/Users/jcrist/Code/dask/dask/async.py", line 271, in _execute_task
    return func(*args2)
  File "test.py", line 5, in add
    return a + b
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Merging later today if no comment.


Combine keys

Hi,
is it possible to do something like:
Option_R (AltGr) + 1 = ~
or
Option_R (AltGr) + Q = \
So, basically what used to be a set of rules for standard Windows/Linux style keyboards.

Seems like a dupe of https://github.com/tekezo/Karabiner-Elements/issues/16?

Seems like it, will close.


CI editing of source code not intuitive

It's not obvious to non-insider benchmark developers that there is significant editing of source code by the CI.   This is done in order to run various benchmarks in parallel to speed up CI, which is very useful, but developers have to be sure that the CI knows how to edit their particular source code to make changes like my-ripsaw -> my-ripsaw-$UUID .   What is the complete set of changes that they have to expect to have the CI do?   what other entities have $UUID appended to them?   This could be documented in this existing CI documentation file.

same for benchmark-wrapper CI, and is the editing the same?


Keyboard navigation smoke test

Add keyboard navigation smoke test.
Check that Escape and Enter sets the correct edit mode, and verify that moving to another cell using the arrow keys updates the active cell.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.005%) to 42.51%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/book/bookTreeView.ts
2
38.21%

Totals

Change from base Build<PHONE_NUMBER>:
-0.005%

Covered Lines:
27559

Relevant Lines:
60570

💛  - Coveralls


chore: fixing coverage for karma using istanbul

Which problem is this PR solving?

Fixes #455

Short description of the changes
Fixing coverage tests with karma

Codecov Report

Merging #466 into master will increase coverage by 0.18%.
The diff coverage is n/a.


JSQLParser Version :4.4 RDBMS : mysql

Failing SQL Feature

Example: SELECT username FROM users WHERE username LIKE '%' ? '%' can't be parsed

Greetings,
your syntax is invalid (at least on any common RDBMS).
The following statements would achieve:
SELECT username
FROM users
WHERE username LIKE '%' || ? || '%'
;

SELECT username
FROM users
WHERE username LIKE Concat( '%', ?, '%' )
;

Closed, when no further question has been asked.


JFXListView MouseEvent does not work properly

If you click on a label in the Listview, the Eventhandler will not be executed properly.
import com.jfoenix.controls.JFXListView;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class ListViewTest extends Application{
public static void main(String[] args){
    launch(args);
}

public void start(Stage stage){

    JFXListView jfxList = new JFXListView();
    ListView javaList = new ListView();

    for (int i = 0; i < 10; i++) {
        jfxList.getItems().add(new Label("Label " + i ));
        javaList.getItems().add(new Label("Label " + i));
    }

    jfxList.setOnMouseClicked(event ->  System.out.println(jfxList.getSelectionModel().getSelectedItem()));

    javaList.setOnMouseClicked(event -> System.out.println(javaList.getSelectionModel().getSelectedItem()));

    BorderPane borderPane = new BorderPane();
    borderPane.setRight(javaList);
    borderPane.setLeft(jfxList);

    Scene scene = new Scene(borderPane);
    stage.setScene(scene);
    stage.show();

}

}
However the normal Fx ListView works fine.

Thank you very much!

I don't think that this fix is a correct one. After this change, datafx core gives error saying "datafx Can't find an action with id popup" (or any other label from the demo) since there is an annotation @ActionTrigger to each Label but there is no @ActionMethod annotation for them.
I was tackling this problem, and I tried to add @ActionMethod to each label to control the flow, then the list started to react only to double clicks. I changed SideMenuController  to a previous commit and everything got back to normal.


docs: add meilisearch-docsearch to resources

Pre-flight checklist

[x] I have read the Contributing Guidelines on pull requests.
[ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
[ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Provide a search alternative to built-in Algolia search.
Test Plan

Test links

Deploy preview: https://deploy-preview-9594--docusaurus-2.netlify.app/community/resources/#search
Live preview: https://tauri.app/
Related issues/PRs

meilisearch has deprecated their official frontend repo and suggests meilisearch-docsearch.

thanks 👍


Add Faculty of Computer and Information Technology (CIT)

@malqerm I am sorry, I have to close this request without merging, because you requested to add a non-existent domain to this repository:
$ host just.cit.edu.jo
Host just.cit.edu.jo not found: 3(NXDOMAIN)

I would recommend to add just.edu.jo to the repository, and the corresponding filename is lib/domains/jo/edu/just.txt. Is it what you intended to do?
Please ensure you are familiar with this repository rules located at the bottom of this page and submit a new request with correct information. Thank you for the understanding!

My university is giving emails for the students with the following format:
<EMAIL_ADDRESS>Where cit is the faculty name: CIT => Computer and Information Technology
And for the staff, with the following format:
<EMAIL_ADDRESS>So, that's why I want to add the @cit.just.edu.jo domain.
Is there a way to add this ?

My university is giving emails for the students with the following format:
<EMAIL_ADDRESS>Where cit is the faculty name: CIT => Computer and Information Technology
And for the staff, with the following format:
<EMAIL_ADDRESS>So, that's why I want to add the @cit.just.edu.jo domain.
Is there a way to add this @philipto ?


Schematic workflow failed

While creating new using ng
I got below error
"Package install failed, see above."
then I uninstalled node_modules in my local folder and I again ran
ng new ..
I got below error
"Schematic workflow failed "
Can anybody guide what went wrong in this case. Thanks in advance.
@patrickoliveras @angular-cli

I am not sure if this will work for you, but it might be worth a try:

Open a new terminal window and verify your current node version: node -v. is compatible Node 8.9 or higher, together with NPM 5.5.1 or higher
Delete your node_modules/ folder
Delete your package-lock.json file
run npm cache verify
run npm install again

I removed my previous solution as I somehow got hung up on the uninstalled node_modules part and presented a solution that probably wouldn't have been relevant. Here is an alternate solution that might work for you...

Open a new terminal and run node -v and then npm -v to make sure you are running compatible versions: "Node 8.9 or higher, together with NPM 5.5.1 or higher"
Uninstall your current Global Angular cli npm uninstall -g @angular/cli
Run npm cache verify
Re-Install Angular CLI npm install -g @angular/cli@latest
Close your terminal window (just because).
Open a new terminal window, browse to where you want your new project and try the 'ng new` command again.

I agree with @ryanmccormick that something seems off with your installation. Please follow up with the results... close this issue if you're successful and if not, please try to provide some additional information.
Thanks!

Closing as no feedback was provided.
If the problem persists, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

thank you @ryanmccormick


Support for Promise API

Are there any plans to add support for async/await Promise-style API calls?
Currently, I'm doing something like this const info = await promisify(spreadsheetInstance.getInfo)() but it'd be nice not to have to toss the wrapper on top.

I made something like this:
(function(m) {
  m.exports = {};

  const ts = require('../utils/time');
  const GoogleSpreadsheet = require('google-spreadsheet');

  const GoogleSpreadsheetService = function({
    sensitive,
    logger
  }) {
    let retr = {};

    const spreadsheetId = process.env.spreadsheetId || sensitive.dataStore.googleSpreadsheet;

    const googleDoc = new GoogleSpreadsheet(spreadsheetId);

    retr.setupConnection = () => {
      return new Promise((resolve, reject) => {
        googleDoc.useServiceAccountAuth(sensitive.google, function (connErr) {
          if (connErr) {
            logger.error(`[${ts.getTimeStamp()}]: GoogleSpreadsheetService:: Failed to connect to spreadsheet. spreadsheetId: ${spreadsheetId}`);
            reject(connErr);
            return;
          }
          resolve({ success: true });
        });
      });
    };

    retr.getInfo = () => {
      return new Promise((resolve, reject) => {
        const getInfoCb = (err, spreadsheetInfo) => {
          if (err) {
            reject(err);
            return;
          }

          resolve({ ...spreadsheetInfo });
        }

        googleDoc.getInfo(getInfoCb);
      });
    };

    retr.getSheetByName = (sheetName) => {
      return new Promise((resolve, reject) => {
        if (!sheetName) {
          reject("No name provided");
        }

        const getInfoCb = (err, spreadsheetInfo) => {
          if (err) {
            reject(err);
            return;
          }

          spreadsheetInfo.worksheets.forEach((worksheet) => {
            if (worksheet.title === sheetName) {
              resolve({ ...worksheet });
            }
          })
          reject(`No worksheet by name '${sheetName}'.`);
        }

        googleDoc.getInfo(getInfoCb);
      });
    };

    retr.addSheet = (sheetName) => {
      return new Promise((resolve, reject) => {
        if (!sheetName) {
          reject({ error: "No name provided", errorCode: 1 });
        }

        retr.getSheetByName(sheetName).then((sheet) => {
          resolve({
            error: "Sheet with that name already exists.",
            errorCode: 2,
            sheet
          });
        }).catch(() => {
          const addSheetCb = (err, spreadsheetInfo) => {
            if (err) {
              reject({
                error: "Unable to add sheet",
                apiError: err,
                errorCode: 3,
              });
              return;
            }
            resolve({
              message: "Sheet created",
              successCode: 1,
              sheet: spreadsheetInfo
            });
          }

          googleDoc.addWorksheet({
            title: sheetName,
            headers: ['your', 'columns', 'here'],
            colCount: 16
          }, addSheetCb);
        })

      });
    };

    retr.addRow = (sheetId, data) => {
      return new Promise((resolve, reject) => {
        if (!sheetId) {
          reject("No sheet id provided");
        }

        const addRowCb = (err, spreadsheetRow) => {
          if (err) {
            reject(err);
            return;
          }
          resolve({ ...spreadsheetRow });
        }

        googleDoc.addRow(sheetId, data, addRowCb);
      });
    };

    return retr;
  };

  m.exports = GoogleSpreadsheetService;
})(module);

Wow, that's quite the snippet of code. How exactly does it work?
Do you save that to a file somewhere and import that file instead of the google sheets npm package?
Also, is this exhaustive, i.e. does it cover every method exposed by the package? Based on the docs, it seems like there ought to be a lot more methods than just these.
As I mentioned in this issue https://github.com/theoephraim/node-google-spreadsheet/issues/249 I'd like to use this library with TypeScript, so this sort of dynamic munging of the library code might not play nicely with the compiler, but I'll definitely give it a shot.
Also, as a suggestion, if you want to cut down on the complexity of this snippet you could probably just wrap the calls in promisify and still do this re-exposing of the APIs.

I just ripped it out of a service that I wrote for a personal project.
It's not a stateless service, initially it connects to the spreadsheet.
Then I just wrote wrapper functions for each of the functions that I used.
In each of my functions, I made it return a promise, in the callback I made it either reject or resolve the promise.
You could do something like this:
    const GoogleSpreadsheet = require('../services/googleSpreadsheet');
    const googleSpreadsheet = GoogleSpreadsheet({ sensitive });
    const googleSpreadsheetSetupPromise = googleSpreadsheet.setupConnection();

      googleSpreadsheetSetupPromise.then(() => {
            googleSpreadsheet.addRow(1, {
              "column1": "somedata",
              "column2": "someotherdata",
            }).then(() => {
              console.log("finished");
            }).catch((addError) => {
              logger.error("error: ", addError);
            });
      }).catch(() => {
        console.error("Unable to connect to spreadsheet");
      });

Here's where I used it in my project:
Usage: https://github.com/Slyke/Weather-Logger/blob/master/src/controllers/DataRecorder.js#L19
Service: https://github.com/Slyke/Weather-Logger/blob/master/src/services/googleSpreadsheet.js

  const util = require('util');
  const auth = {
    client_email: xxxxx,
    private_key: xxxxxxxx
  };
  const spreadsheet_id = xxx;
  const GoogleSpreadsheet = require('google-spreadsheet');
  const doc = new GoogleSpreadsheet(spreadsheet_id );
  await util.promisify(doc.useServiceAccountAuth)(auth);
  const info = await util.promisify(doc.getInfo)();

I've just a published a new version of this module which is a complete rewrite using Google's V4 Sheets API (v3 is being deprecated on March 3, 2020).
Docs available here - https://theoephraim.github.io/node-google-spreadsheet
The new version is totally promise based. TBH I never liked using raw promises (.then/.catch) but with the addition of async/await, now it's great :)
Thanks! 😄


csv-tui: init at 1.1

Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] 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
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 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

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

I'm confused why the formatting is not satisfied here. I ran first nixpkgs-fmt then nixfmt, both didn't solve it.

I'm confused why the formatting is still not satisfied here. I ran first nixpkgs-fmt then nixfmt with both being insufficient.

Result of nixpkgs-review pr 334839 run on x86_64-darwin 1

1 package built:

csv-tui

If I remember correctly you need to add yourself as maintainer in a different commit.

If I remember correctly you need to add yourself as maintainer in a different commit.

Thanks, i missed that.

Result of nixpkgs-review pr 334839 run on x86_64-darwin 1

1 package built:

csv-tui

Additionally, I had to look through the source code to figure out what the keybinds were, so I don't think it's ready for general use yet.

Additionally, I had to look through the source code to figure out what the keybinds were, so I don't think it's ready for general use yet.

All keybinds are annotated in the program itself except the arrow keys. I think it's actually very easy to use.

Result of nixpkgs-review pr 334839 run on x86_64-darwin 1

1 package built:

csv-tui


Add experimental Tooltip, Number Input & Tile

Changelog
New

Adds Experimental tooltip, number input & tile to website

Changed

Component status page

@asudoh Do you know why the javascript isn't running for the first experimental tooltip example? 🤔

looks good!
one issue: the hit target seems to shrink to fit the size of the icon, which means non-square/circular icons have a smaller click area.
example:

it would be nice to make sure the hit target is always square so it can be as big as possible!
adding more padding around it to make the hit target extra-big would be awesome too, but i don't know how many problems that might cause with spacing…

@lovemecomputer Good thought - I think this issue is in our vanilla repo (CSS), is it correct?

@lovemecomputer this PR is just bringing in the tooltip that's currently in carbon-components. The actual styles for that live in that repo. 😄

Ok looks like tooltip isn't showing because it's not inside the .carbon-demo-experimental div. Going to think through if there's an easy fix for this.

ah yeah thanks ofc :)

Going to merge this in. Created a new issue regarding tooltip. #309


Clean up decoding

Currently the decoding of webauthn replies by the client is all done through https://github.com/github/webauthn-json, in https://github.com/tweag/haskell-fido2/blob/master/fido/Crypto/Fido2/Protocol.hs#L355-L366. The specific JSON format is notably dependent on the JavaScript library used, see #13.
We should clean this up by:

Introducing a data type for a webauthn reply closely mirroring the JavaScript one returned by navigator.credentials.{create,get}.
Creating a webauthn-json-specific function for turning its JSON-encoding into such a data type
Redoing the parsing functions around https://github.com/tweag/haskell-fido2/blob/master/fido/Crypto/Fido2/Protocol.hs#L503-L579, which are currently mixing many different ways of decoding parts

Yeah, there is no standard schema for the payload. The result of navigator.credentials.{create,get} is not directly serializable into JSON because it has arrays with binary data.
The haskell library webauthn encodes the whole payload into CBOR, which forced the client-side code to include a CBOR library. Perhaps that was caused by misreading how the spec suggests using CBOR.
For the format let's pick a format that is easy to create in the browsers. There is native support for base64 encoding with atob/btoa.


chore: skip formatting for long tables

The tables take up quite a bit of space and contain less important config, so:

Add --stylua: ignore to skip formatting for blocks of tables. See.
Add a comment explaining what it does and why it is used.

Thanks for your contribution but not seeing a clear win here. Others in the community please pipe up if you want this.

i don't think this has any benfit at all the formatting was better before

Thanks @jpx40 that's my impression too. @nhld thank you for your contribution but I'm closing this for now. Feel free to do this in your own fork!


ci(lint): add "exp" to PR title lint

Issue #, if available:
Description of changes:

Previously we added exp to release-please.yaml in #323, but lint-pr-title has its own configuration for custom types.

Not doing this causes issue (seen here) with PR titles using exp

Testing done:

N/A

[x] I've reviewed the guidance in CONTRIBUTING.md

License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Skipping CI / e2e-tests since this change is only to an unrelated GitHub workflow file.


Problem configuring UART Hal for Bootloader hook (IDFGH-6989)

Environment

Development Kit: ESP32-DevKitC
Kit version (DevKitC): v4
Module or chip used: ESP32-WROOM-32D
IDF version: v4.4
Build System: idf.py
Compiler version: 8.4.0
Operating System: Linux|macOS
Using an IDE?: No
Power Supply: USB

Problem Description
Hello Espressif team,
We are developing a bootloader hook for product to receive serial messages, but we are having some trouble using the UART Hal library to make use of it. Right now, we are trying to make this work on the bootloader_hooks example. However, we having some trouble understanding the library and with CMake. We already included PRIV_REQUIRES hal to the my_boot_hooks CMake file, but some include functions are still not been found. Would be possible for you to provide us a simple example of how to initialize and communicate using the UART Hal for this hook?

Have you tried using rom functions?

Hi @mauriciofarina,
As @negativekelvin said, it is possible to use ROM functions within the bootloader, that's the simplest solution:
#include "esp_log.h"
#include "esp_rom_uart.h"

void bootloader_after_init(void) {
    uint8_t str[16];
    ESP_LOGI("HOOK", "This hook is called AFTER bootloader initialization");
    /* Receive 16 bytes from the UART */
    esp_rom_uart_rx_string(str, sizeof(str));
    esp_rom_printf("String received: %s\n", str);
}

If you add such behavior to the bootloader_before_init hook, keep in mind that the watchdog has not been disabled/configured yet, so you would get such error:
entry 0x400806a8
I (66) HOOK: This hook is called BEFORE bootloader initialization
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7176
load:0x40078000,len:15148
ho 0 tail 12 room 4
load:0x40080400,len:3900
0x40080400: _init at ??:?

If for some reasons you don't want to use ROM functions, you can still use ll functions:
#include "esp_log.h"
#include "hal/uart_ll.h"
#include "esp_rom_uart.h"

#ifndef MIN
#define MIN(a,b) ((a) > (b) ? (b) : (a));
#endif

void bootloader_after_init(void) {
    ESP_LOGI("HOOK", "This hook is called AFTER bootloader initialization");
    uint32_t total = 0;
    uint8_t buf[8] = { 0 };
    /* Keep one free byte to keep the ending \0 byte */
    const uint32_t torcv = sizeof(buf) - 1;

    while (total < torcv) {
        /* Check if we've received bytes on UART0 */
        uint32_t len = uart_ll_get_rxfifo_len(UART_LL_GET_HW(0));
        if (len == 0)
            continue;
        len = MIN(len, torcv - total);
        uart_ll_read_rxfifo(UART_LL_GET_HW(0), buf + total, len);
        total += len;
    }
    esp_rom_printf("Received %d chars, %s\n", total, buf);

I haven't initialized the UART here as it has already been initalized (by ROM and/or bootloader), but if you want to reconfigure it or initialize it yourself, you can call the following functions:
void bootloader_after_init(void) {
    ESP_LOGI("HOOK", "This hook is called AFTER bootloader initialization");
    uart_ll_set_sclk(UART_LL_GET_HW(0), UART_SCLK_APB);
    // Set default baud: 115200, use APB clock.
    const uint32_t baud_def = 115200;
    uart_ll_set_baudrate(UART_LL_GET_HW(0), baud_def);
    // Set UART mode.
    uart_ll_set_mode(UART_LL_GET_HW(0), UART_MODE_UART);
    // Disable UART parity
    uart_ll_set_parity(UART_LL_GET_HW(0), UART_PARITY_DISABLE);
    // 8-bit word
    uart_ll_set_data_bit_num(UART_LL_GET_HW(0), UART_DATA_8_BITS);
    // 1-bit stop bit
    uart_ll_set_stop_bits(UART_LL_GET_HW(0), UART_STOP_BITS_1);
    // Set tx idle
    uart_ll_set_tx_idle_num(UART_LL_GET_HW(0), 0);
    // Disable hw-flow control
    uart_ll_set_hw_flow_ctrl(UART_LL_GET_HW(0), UART_HW_FLOWCTRL_DISABLE, 100);
}

Hello Everyone!
Thank you for your help @negativekelvin and @o-marshmallow!
I got able to access the serial ports using both methods. However, to access uart 1 it was also needed to configure the gpio pins for it:

#define UART    1
#define UART_TX 17
#define UART_RX 16

static void init_boot_serial(void) {

    esp_rom_gpio_connect_out_signal(UART_TX, UART_PERIPH_SIGNAL(UART, SOC_UART_TX_PIN_IDX), 0, 0);
    esp_rom_gpio_connect_in_signal(UART_RX, UART_PERIPH_SIGNAL(UART, SOC_UART_RX_PIN_IDX), 0);

    uart_ll_set_sclk(UART_LL_GET_HW(UART), UART_SCLK_APB);
    uart_ll_set_baudrate(UART_LL_GET_HW(UART), 115200);
    uart_ll_set_mode(UART_LL_GET_HW(UART), UART_MODE_UART);
    uart_ll_set_parity(UART_LL_GET_HW(UART), UART_PARITY_DISABLE);
    uart_ll_set_data_bit_num(UART_LL_GET_HW(UART), UART_DATA_8_BITS);
    uart_ll_set_stop_bits(UART_LL_GET_HW(UART), UART_STOP_BITS_1);
    uart_ll_set_tx_idle_num(UART_LL_GET_HW(UART), 0);
    uart_ll_set_hw_flow_ctrl(UART_LL_GET_HW(UART), UART_HW_FLOWCTRL_DISABLE, 100);
}

Is this implementation correct or there is a better/proper way of doing this?

Hi @mauriciofarina ,
I am glad to hear it is working for you! Initializing the UART1 doesn't surprise me, the bootloader and the ROM code don't use it by default, so they shouldn't initialize it.
That's the proper way to do, this is exactly how the UART initialization is done in the HAL layer.


Save page as draft

I have strange bug when i save page as draft she appear in my website.

Which theme do you use?

Does this happen when you're using the Pages List plugin or when the theme
implements its own menu list?
On Jan 18, 2017 07:51, "Edi"<EMAIL_ADDRESS>wrote:

Which theme do you use?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dignajar/bludit/issues/383#issuecomment-273338788,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKLvqNK9I3xWW1YQzUischwALiqxQEJks5rTVPugaJpZM4LlWBk
.


The program crashes when changing the model to GPT-4

It wil run then crash when sending a message.
"KeyError: 'Could not automatically map gpt-4 to a tokeniser. Please use tiktok.get_encoding to explicitly get the tokeniser you expect.'"

Added fix for this issue on this fork: https://github.com/james-rowe/ChatGPTerminator


Refactor #[pyproto] Result types

Fixes #798
I reworked #[pyproto] result types to use the IntoPyCallbackOutput trait. This led to a couple of nice improvements:

Return values can now be PyResult<T> or just T (the PyResult wrapping is now optional, previously was required).
It was easy to solve #798 without some hack.

Following up will be two new PRs which come easily from this:

Enable return value from __next__ / __anext__
Allow skipping return type completely when it is -> ()

Also the overall code is simpler, which is nice.

Thanks!
Looks quite reasonable change for me.
Please merge this PR at your own time.

👍 I will also rebase the two new PRs now.


Enable C++ Unit Testing and Coverage

@soneryaldiz @parijatm I figured out how to enable googletest-based unit tests.
You just need to build with:
pip install -e .[test] --no-build-isolation --install-option='-DBUILD_TESTING=ON'

The tests weren't building before because we deleted some functions referenced in the tests.
They are working now. To run the unit tests, try:
tests/test_PnR

I started to add a test just for the KeepOrdering method.
It is in PlaceRouteHierFlow/placer/unit_tests.cpp.

@soneryaldiz @854768750 Here is a unit test the has only four cells but still causes the same kind of infinite loop.
This test is a simplified version for the failing test (infinite loop) in #1026
See instructions above on how to run it.

This is the test:
TEST(SeqPairTest, KeepOrdering) {
    spdlog::set_level(spdlog::level::debug);
    SeqPair sp;

    std::vector<int> posPair = {0,1,2,3};
    std::vector<int> negPair = {0,1,2,3};

    sp.posPair = posPair;
    sp.negPair = negPair;

    sp.PrintSeqPair();

    design d;

    std::vector<int> counterparts = {1,0,-1,-1};

    for (const auto& counterpart : counterparts) {
      design::block b;
      b.counterpart = counterpart;
      std::vector<design::block> blocks;
      blocks.push_back(b);
      d.Blocks.push_back(blocks);
    }

    std::vector<std::pair<int,int> > v_orderings =  {
      {0, 3},
      {1, 3},
      {3, 2}
    };

    std::vector<std::pair<int,int> > h_orderings =  {
      {0, 1}
    };

    for (const auto& ordering : v_orderings) {
      d.Ordering_Constraints.push_back(make_pair(ordering, placerDB::V));
    }
    for (const auto& ordering : h_orderings) {
      d.Ordering_Constraints.push_back(make_pair(ordering, placerDB::H));
    }

    sp.KeepOrdering(d);

};

I'm not really sure what we are trying to do here and what the counterparts are. @854768750 Can you explain that to us? What is the purpose of the KeepOrdering method?

@stevenmburns My understanding is: KeepOrdering method is used to enforce the ordering constraint in the sequence pair. When a perturbation of sequence pairs violates ordering, this routine permutes the indices to enforce ordering.
This can be done constructively, since we only perturb one or two indices in a sequence pair at a time.
For example when blocks A has to be above B, then the index of A in: positive seq < index(B) and negative seq > index(B). This can easily be enforced during the perturbation KeepOrdering routine can be removed.
When two blocks are part of a symmetric pair, each one is other's counterpart.

For KeepOrderingShort, as we have v_ordering
{0, 2},
      {2, 1}
```,
0 and 1 cannot be counterpart.
It would be `counterparts = {-1,-1,-1}`

@854768750 We can't have infinite loops even if the constraints are wrong.
What is your argument that the do { } while () loop in KeepOrdering is going to terminate?
My example is just a pruned down version of Soner's testcase on the other PR.
You can uses this unit test facility to try other cases.

It terminates when all constraints are satisfied.

A constructive approach sounds more promising and could possibly detect infeasible scenarios. @854768750 , are you planning to prototype this for #1026 ?

I had a failure of test_cmp_slow in CI. It runs locally but it is slow. Do we want to remove this from the CI?
----------------------------------------- generated xml file: /home/smburns/DARPA/ALIGN-public/junit.xml -----------------------------------------
============================================================== slowest 10 durations ==============================================================
272.58s call     tests/pdk/finfet_pdk/test_placer.py::test_cmp_slow
36.89s call     tests/pdk/finfet_pdk/test_placer.py::test_cmp_fast
24.36s call     tests/pdk/finfet_pdk/test_placer.py::test_hang_3
1.53s teardown tests/pdk/finfet_pdk/test_placer.py::test_cmp_slow
0.93s call     tests/pdk/finfet_pdk/test_placer.py::test_hang_1
0.88s call     tests/pdk/finfet_pdk/test_placer.py::test_hang_2
0.07s teardown tests/pdk/finfet_pdk/test_placer.py::test_hang_3
0.00s teardown tests/pdk/finfet_pdk/test_placer.py::test_hang_2
0.00s setup    tests/pdk/finfet_pdk/test_placer.py::test_cmp_fast
0.00s setup    tests/pdk/finfet_pdk/test_placer.py::test_place_cmp_2

Let me take a quick look.

@stevenmburns , I prefer to keep these tests for now as this has been a problematic area and the related code will likely to be refactored soon.

Instead of skipping the test, could we do a fast build for checkin instead of doing a developer build?

@soneryaldiz Why do we every have the log level set to debug for CI?

@soneryaldiz It never occurred to me that debug level would be set in a CI run. The reason for the long run time was the debug level stuff I had added to KeepOrdering. I removed those.

This is what we have now for durations:
----------------------------------------- generated xml file: /home/smburns/DARPA/ALIGN-public/junit.xml -----------------------------------------
============================================================== slowest 10 durations ==============================================================
17.66s call     tests/pdk/finfet_pdk/test_placer.py::test_cmp_fast
17.11s call     tests/pdk/finfet_pdk/test_placer.py::test_cmp_slow
5.81s call     tests/pdk/finfet_pdk/test_placer.py::test_hang_3
0.90s call     tests/pdk/finfet_pdk/test_placer.py::test_hang_1
0.67s call     tests/pdk/finfet_pdk/test_placer.py::test_hang_2
0.00s setup    tests/pdk/finfet_pdk/test_placer.py::test_cmp_slow
0.00s setup    tests/pdk/finfet_pdk/test_placer.py::test_cmp_fast
0.00s setup    tests/pdk/finfet_pdk/test_placer.py::test_hang_1
0.00s setup    tests/pdk/finfet_pdk/test_placer.py::test_hang_2
0.00s setup    tests/pdk/finfet_pdk/test_placer.py::test_hang_3

Results (25.69s):
       5 passed
      13 skipped

What is probably further slowing things down is that parallel threads are writing to the same log file: #755

@soneryaldiz This should be ready to merge.

@soneryaldiz @parijatm @854768750 @Lastdayends @srini229 To use the resurrected C++ unit test facility, we need to compile using the following command sequence:
pip install -e .[test] --no-build-isolation
pip install -v --no-build-isolation -e . --no-deps --install-option='--build-type=Release' --install-option='-DBUILD_TESTING=ON'

(You can replace Release with Debug or RelWithDebInfo. This is also in README.md now.)
Then the unit tests are collected and put into an executable in tests/test_PnR.
You can just run this, but pytest also discovers it and runs it when you run pytest in the ALIGN-public directory.

Yes. This test case has a valid solution. It may need another seqpair ordering method to solve this.
------------------ Original ------------------
From: "Steve @.>;
Date: 2022年3月18日(星期五) 上午9:17
To: @.>;
Cc: @.>; @.>;
Subject: Re: [ALIGN-analoglayout/ALIGN-public] Enable C++ Unit Testing and Coverage (PR #1027)
@854768750 I pretty sure the following test case (currently disabled) represents a valid configuration:
TEST(SeqPairTest, DISABLED_KeepOrdering) {     auto save_level = spdlog::get_level();     spdlog::set_level(spdlog::level::trace);     SeqPair sp;     std::vector<int> posPair = {0,1,2,3};     std::vector<int> negPair = {0,1,2,3};     sp.posPair = posPair;     sp.negPair = negPair;     sp.PrintSeqPair();     design d;     /*      *           0   |   1      *               3      *               2      */     std::vector<int> counterparts = {1,0,-1,-1};          for (const auto& counterpart : counterparts) {       design::block b;       b.counterpart = counterpart;       std::vector<design::block> blocks;       blocks.push_back(b);       d.Blocks.push_back(blocks);     }     std::vector<std::pair<int,int> > v_orderings =  {       {0, 3},       {1, 3},       {3, 2}     };     std::vector<std::pair<int,int> > h_orderings =  {       {0, 1}     };     for (const auto& ordering : v_orderings) {       d.Ordering_Constraints.push_back(make_pair(ordering, placerDB::V));     }     for (const auto& ordering : h_orderings) {       d.Ordering_Constraints.push_back(make_pair(ordering, placerDB::H));     }     sp.KeepOrdering(d);     spdlog::set_level(save_level); };
The block 0 and 1 have a Symmetric block constraint and a horizontal ordering constraint.
There are vertical ordering constraints between 0,1 and 3, and between 3 and 2.
Depending on the starting permuation for negPir, the current algorithm will go into an infinite loop.
You can check this by removing the "DISABLED_" prefix from the test name.
We are going to check this PR in. You would open a new PR to work on fixing this error.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: @.***>

It seems that you can run currently disabled tests using the following command:
tests/test_PnR --gtest_also_run_disabled_tests


Finish changing versioning scheme

This change was removed from #57, so as to make that PR more a refactoring. The changes here accomplish two things:
First, allows us to change the specificity of how we pin versions in typeshed while ensuring that users who install without pinning versions still get the latest stub.
Second, incrementing the fourth position helps disambiguate "upstream version" from "types version", reducing user confusion. See my comment
here: https://github.com/typeshed-internal/stub_uploader/pull/57#discussion_r956395229
We can wait longer if we're suspicious of #57, but there have been a half dozen stub uploads since then. Please let me know if there are any tests I could add that would be worthwhile.

I don't have permissions on this repo to merge, so one of you two would need to do it :-)
We test that all of the asserts hold when incrementing all currently existing package versions here: https://github.com/typeshed-internal/stub_uploader/blob/4588d577d7d1af180d2f0794437d1c1e78afeac3/tests/test_integration.py#L37
I also just added:
diff --git a/stub_uploader/get_version.py b/stub_uploader/get_version.py
index 9c5bfd1..c2c4bd7 100644
--- a/stub_uploader/get_version.py
+++ b/stub_uploader/get_version.py
@@ -139,4 +139,5 @@ def determine_incremented_version(metadata: Metadata) -> str:
     version = compute_incremented_version(
         metadata.version_spec, published_stub_versions
     )
+    print(f"{metadata.stub_distribution:<40}\t{str(version):<12} {str(metadata.version_spec):<10} {max(published_stub_versions)}")
     return str(version)

and ran pytest -s -k test_version_increment and the results all look expected to me


New Rule: no-callback-literal

What does everyone think of a rule that more strictly enforce the callback pattern? This will help people avoid the common mistake of calling back with an error message instead of an error object, which can lead to all sorts of weird bugs.
There is already this similar rule in ESLint:
http://eslint.org/docs/rules/no-throw-literal
Here is how it will work:
Allowed
callback(null)
callback()
callback(undefined)
callback(null, data)
callback(err)
callback(someRandomVariable)
callback(new Error("error!~"))

Not allowed
callback(true)
callback("there was an error")
callback(1)

Of course we can figure out if we should include cb and next as well as callback in the list of allowed function names.

There is currently at least one open question:
Should we allow callback(false)?

Thankfully some time ago, Node.js added documentation around this: https://nodejs.org/dist/latest-v6.x/docs/api/errors.html#errors_node_js_style_callbacks Sadly reading through the whole page, the only things that are truly implicated is that it must be either null or an Error object, though I'm not sure how quickly that doc was written to take into account edge cases.

I support this change.

I kind of let this die. Let me me revisit the PR with the suggested changes and we can hopefully move forward!

Just an update on this rule. The PR is all ready in eslint-plugin-standard: https://github.com/xjamundx/eslint-plugin-standard/pull/15 We can merge when we're ready to do a standard v9 beta release.

I actually think this might bite a little bit,  but,  I still agree with it on principle.

Ecosystem impact is moderate (4%).
# tests 287
# pass  276
# fail  11

It turns out that several of these were in code that wrote myself, so after fixing those up, the new impact is better:
# tests 287
# pass  280
# fail  7

A good 3-4 of them are actually strings being passed to a callback instead of an Error object. A couple instances were cb(0) which is, I assume, a shorthand for cb(null). And the rest are legit uses, usually for a callback that returns a boolean for a use case like fs.exists, but those ought to be rewritten to use an error IMO. It's confusing for a callback to take a boolean as the first argument.

This will be part of the standard v10 beta.

@feross I'm totally okey with that rule et al. But just tried the v10 beta, but it seems there something wrong in the impl. I'll post an issue to show for what i'm talking about.
Otherwise :tada: for v10! Ten versions and still didn't have impact on my code :) hm, maybe once around v3-v4, don't remember. :)

What about
return cb(...sameArray);

why it'is error?

@dutchenkoOleg, probably because you must pass err (or real error object) or null. I believe it is configured that way.

The lack of callback(...args) support is a bit lame.

FWIW the pull-stream family of modules have you end streams early without erroring with cb(true) which this rule classes as invalid.

👍
On May 10, 2018 12:24 AM, "Feross Aboukhadijeh"<EMAIL_ADDRESS>wrote:
Hey everyone, just letting you all know that I'm considering removing this
rule in standard v12. You can follow this issue for updates:
standard/eslint-plugin-standard#27
https://github.com/standard/eslint-plugin-standard/issues/27
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/standard/standard/issues/623#issuecomment-387974740,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPBf3RTH-ttFxG_JhdqUMOyl7g16RJtks5tw-szgaJpZM4J8-hb
.


Support for Transform: 'AWS::LanguageExtensions'

Linter does not honor the Transform reference at the begining of the template:
Transform: 'AWS::LanguageExtensions'
i.e., if using the function !FindInMap with a default value (4th value) then we get an error:
E1011: FindInMap is a list with 3 values for Resources/..
See AWS Cloudformation documentation regarding FindInMap function enhanements:
I'm using CloudFormation Linter v0.25.2

This plugin is an integration into the cli tool cfn-lint.  Support is integrated into cfn-lint you will need to update to take advantage of the LanguageExtensions.  The newest version of the plugin should alert you when you are using an outdated version of cfn-lint.


💡 [FEATURE] - Adding subtle scroll animations.

Idea Contribution

[X] I have read all the feature request issues.
[X] I'm interested in working on this issue
[X] I'm part of GSSOC organization

Explain feature request
We can enhance this website by adding scroll animations throughout. This will display the content with a subtle animation effect as users scroll through the site.
Kindly assign this issue to me under GSSOC'24 so that I can start working on it.
Explain your solution
No response
Any alternative approaches/features
No response
Additional Context
No response

Scroll to top feeature?

Scroll to top feeature?

No, @jfmartinz, the content on the webpage will fade in as the user scrolls through the site.
I'll be using the ScrollReveal library from JavaScript to animate elements as they come into view.

Okay, sure. Use seperate js adn make it descriptive


feat: ensure all SignatureAlgorithm.EthereumPersonalSign signatures comply with EIP-712

What is the feature you would like to implement?
See https://eips.ethereum.org/EIPS/eip-712
Why is this feature important?
Wallets should render Farcaster-related signature requests in a nice, clear way

see doc for more details: https://www.notion.so/farcasterxyz/EIP-712-for-Verified-Addresses-80a0a638119a41bfb638d08a62d04201

Implemented by https://github.com/farcasterxyz/hub/pull/188 and https://github.com/farcasterxyz/hub/pull/218


added path argument to mock sim

added --path argument to main.py so that users can specify the pathname of flight data used in the mock simulation. By default, the path is scripts/imu_data/InterestLaunch-9-28.csv.

No I disagree with renaming the csv file. Just use  to autocomplete your path. However, I am in favour of moving the csv file to something like launch_data/ instead of in scripts/ which doesn't make much sense tbh.

I agree with making a launch_data folder for the flight logs. should the arg require launch_data/name though? or just name?

created launch_data folder, and changed the csv's to be lowercase and snake case. I looked into not needing to type launch_data/, but there would need to be quite a bit more code and other libraries added to have tab autocomplete work as if you were actually in the launch_data folder.

I didn't mean have tab auto complete work, I mean you just type python main.py -m -p "interest_launch.csv" rather than python main.py -m -p "launch_data/interest_launch.csv" or whatever

I mean you just type python main.py -m -p "interest_launch.csv" rather than python main.py -m -p "launch_data/interest_launch.csv" or whatever

no we shouldn't do dark magic to get that working. Tab autocomplete works for me though, I don't have to specify the full path. It probably depends on what shell you use. E.g. If you use zsh as a shell, one can just type python main.py -m -p l/in and press Tab and it will correct the path for me.


Refactor - extract duplicate code into function

Extracted duplicate code block into a new "GetOCRLanguage" method.

I've had a couple of users comment that Text Grab crashes. In all of these cases the user has multiple English languages. One example the user had en-UK and en-US. These two languages some how conflicted causing a crash.
I'd like to use this refactor of this GetOCRLanguage as an opportunity to recreate and fix this issue.
related to #63 and #31

@lcorb from my tests this PR fixes the issue you described, but also does some refactoring, so I was going to accept this PR instead of #63. Could you verify that this PR does fix the issue on your end?


Documentation Error - Defined Names

https://www.npmjs.com/package/xlsx-populate#defined-names
Defined names are particularly useful if you are populating data into a known template. Then you do NOT need to know the exact location.
The last sentence is missing the word NOT  and consequenlty contradicts the previous sentence without it.

Fixed. Thanks.


Added error prop

closes #127

User of the Editor can now pass an error prop that will update the error state of the fixed editor.

@AbhayVAshokan _a. Please review.

@karthiknmenon _a. Please review the UI changes. Let me know if the error message needs to be repositioned.

@karthiknmenon _a. Please review. I compared the error message with neetoUI input and they both match.

@karthiknmenon please provide an update on this PR. It has been open for quite some while now.


[QUESTION] How would one go about adding custom submixes?

How would I add a custom voice filter / submix with a command or a function or something
RegisterCommand("audiofiltertest", function(source,args)
	local testSubmix = CreateAudioSubmix('howdoidodis')
	SetAudioSubmixEffectRadioFx(testSubmix, 1)
	SetAudioSubmixEffectParamInt(testSubmix, 1, GetHashKey('default'), 1)
	SetAudioSubmixEffectParamFloat(testSubmix, 1, GetHashKey('freq_low'), 300.0)
	SetAudioSubmixEffectParamFloat(testSubmix, 1, GetHashKey('freq_hi'), 6000.0)
	AddAudioSubmixOutput(testSubmix, 1)
	MumbleSetSubmixForServerId(source, testSubmix)
end, false)

This code does absolutely nothing and I have no idea as to what I am doing wrong (the submix is copied from your phone submix). I have tried to go through the way you implemented submixes for the rp-radio resource but nothing I have tried works. I have also tried to hijack your toggleVoice function to no avail.
Would be awesome if you could help me implement this, so I could add custom items like a megaphone or a voice changer item.

Can you see if testSubmix is even returning a value?

print(testSubmix) returns 30

		radioEffectId = CreateAudioSubmix("Radio")         SetAudioSubmixEffectRadioFx(radioEffectId, 0)         SetAudioSubmixEffectParamInt(radioEffectId, 0, GetHashKey("default"), 1)         SetAudioSubmixEffectParamFloat(radioEffectId, 0, GetHashKey("freq_low"), 389.0)         SetAudioSubmixEffectParamFloat(radioEffectId, 0, GetHashKey("freq_hi"), 3248.0) 		--SetAudioSubmixEffectParamFloat(radioEffectId, 0, GetHashKey("fudge"), 0.0) 		--SetAudioSubmixEffectParamFloat(radioEffectId, 0, GetHashKey("rm_mod_freq"), 0.0) 		SetAudioSubmixEffectParamFloat(radioEffectId, 0, GetHashKey("rm_mix"), 0.16) 		--SetAudioSubmixEffectParamFloat(radioEffectId, 0, GetHashKey("o_freq_lo"), 348.0) 		--SetAudioSubmixEffectParamFloat(radioEffectId, 0, GetHashKey("o_freq_hi"), 4900.0)         AddAudioSubmixOutput(radioEffectId, 0)
I use this on our server it made a slight difference to the voices not being so radioish but more clear the ones i commented out breaks audio completely for us voices go static and so on... of you/someone come up with a good preset let me know or know what the different submixes mean.


Add web.archive.org to the blacklist

I've added myself and it works, but this is a commonly used site and it should be added, as well as other "Web archiving" services.

Maybe, but I don't want to maintain a list of web archiving sites.


mcap ros1 message play back in rust

Duplicate rosbag play features, eventually --clock.
The md5sum is needed, but mcaps don't store it, this python can get it from the message definition so need a rust version:
https://github.com/lucasw/mcap_tools/blob/main/mcap_tools/scripts/msg_def_md5.py
https://github.com/lucasw/ros_one2z/issues/4
A python implementation of mcap playback: https://github.com/lucasw/ros_one2z/blob/main/one2z/scripts/ros1_play_mcap.py
https://github.com/Carter12s/roslibrust/pull/194

ROS_PACKAGE_PATH=`rospack find std_msgs`:`rospack find geometry_msgs`:`rospack find sensor_msgs`:`rospack find std_srvs` cargo build --features ros1 --release -p roslibrust

test
ROS_PACKAGE_PATH=`rospack find std_msgs`:`rospack find geometry_msgs`:`rospack find sensor_msgs`:`rospack find std_srvs` cargo build --features ros1_test --release test_msg_def_to_md5

This is apparently the md5sum of nothing, I'm getting it for two different strings but they must not be making in, maybe due to size limits?
d41d8cd98f00b204e9800998ecf8427e

This is working with https://github.com/lucasw/roslibrust/commit/04bb108823f42e97352c0c71dc441cbaa928c0ad in this roslibrust branch https://github.com/lucasw/roslibrust/commits/subscribe_any/

Next feature is to be able to play back multiple mcaps properly interleaved.
First load all of them and get the start times of the first messages, and take the earliest time of those.
Then tokio spawn a player for each of them with that earliest message time and a wallclock start time (could be slightly in the future to allow everything to initialize), each will independently publish and sleep in order to keep in time relative to the start time, but don't need to talk to each other (there will be duplicate publishers across them, but they'll all have their own node handles).  Then wait for all to complete before looping or exiting.
A more advanced version of that would have each receive message clock time via a channel, and the main thread sends that to each and can pause or jump forward or change the rate of playback.

Broadcast the wall start time with tokio broadcast https://docs.rs/tokio/latest/tokio/sync/broadcast/index.html

Play/pause mostly works, but the timing is off when resuming sometimes- maybe need to future date the playback a little and not play back anything until it's time?

Need to aggregate tf_static messages into one message as in ros1_play_mcap.py- it would be easier if mcap convert did that (mcap_record could as well), but can't depend on that so need to handle it on playback.
Every tf_static TFMessage in an mcap needs to be added to a mutable vector, and the tf_static publisher needs to be set to latch.
(How is latching handled in other cases for mcap, where would the information be stored?  How is it handled in bags?)


Navigate back after renaming Chat Room

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/16768
Tests

Open a Room chat
Click on the Header
Go to Settings
Change the room name
Click save
Confirm the name has been changed and you are navigated back to the previous page

[x] Verify that no errors appear in the JS console

Offline tests
None
QA Steps
Same as tests

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

@rushatgabhane @neil-marcellini One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

Removing C+, as it is a very simple fix

I think we decided that we want both the room name and the notification frequency to be push-to-page inputs. When you tap on room name, you get pushed to a new page where you are auto-focused. Saving this new page then returns back to the overview page.
Cc @JmillsExpensify @trjExpensify

Gotcha! Refactoring this, then! WIP for now

Ok sounds good. It might be cool to have an illustration, animation, or branding on the "pushed" pages because they feel really empty to me.

Hey @neil-marcellini! I'm going on parental leave! If you are interested, feel free to take over this one. Most of the migration is done (although I'm just now realizing I've done class components 🤦 ). Otherwise, I'll be back in a month! 😁

Thanks, yeah I'll take it over. Congrats @Gonals!!

Super late but I wanted to confirm that yes, this is indeed the plan.

I think we decided that we want both the room name and the notification frequency to be push-to-page inputs. When you tap on room name, you get pushed to a new page where you are auto-focused. Saving this new page then returns back to the overview page.

Does this require C+ review? Asking since I was assigned on the linked issue.

@aimane-chnaif I'm going to leave that up to the assigned internal reviewer. I'll let them know that you're available to review.

@neil-marcellini @parasharrajat One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@neil-marcellini @aimane-chnaif One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

Yeah thanks for your review @aimane-chnaif! I haven't had time to get to this but I will as soon as I can. I'll notify you when I'm ready for another review.

@aimane-chnaif I'm not able to reproduce either of the issues you described after merging main. If it's still a problem please include detailed reproduction steps.
Also, is it a new problem or does it also exist on main?

I thought maybe the problem was the keyboard not opening. I tried forwarding a ref to the RoomNameInput and focusing it onEntryTransitionEnd, but I couldn't get the ref to work, it was always null.
Here's the changes I tried on the RoomNamePage if you want to play around with it. Anyways, I want to make sure I understand the problem before I dig deeper.

Forward ref focus attempt
import React, {useCallback, useRef} from 'react';
import {withOnyx} from 'react-native-onyx';
import PropTypes from 'prop-types';
import {View} from 'react-native';
import CONST from '../../../CONST';
import ScreenWrapper from '../../../components/ScreenWrapper';
import HeaderWithCloseButton from '../../../components/HeaderWithCloseButton';
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize';
import Form from '../../../components/Form';
import ONYXKEYS from '../../../ONYXKEYS';
import styles from '../../../styles/styles';
import Navigation from '../../../libs/Navigation/Navigation';
import compose from '../../../libs/compose';
import * as ErrorUtils from '../../../libs/ErrorUtils';
import * as ValidationUtils from '../../../libs/ValidationUtils';
import withReportOrNotFound from '../../home/report/withReportOrNotFound';
import reportPropTypes from '../../reportPropTypes';
import ROUTES from '../../../ROUTES';
import * as Report from '../../../libs/actions/Report';
import RoomNameInput from '../../../components/RoomNameInput';

const propTypes = {
    ...withLocalizePropTypes,

    /** The room report for which the name is being edited */
    report: reportPropTypes.isRequired,

    /** All reports shared with the user */
    reports: PropTypes.objectOf(reportPropTypes),
};
const defaultProps = {
    reports: {},
};

const RoomNamePage = (props) => {
    const report = props.report;
    const reports = props.reports;
    const translate = props.translate;
    const nameInputRef = useRef(null);

    const validate = useCallback((values) => {
        console.log('debug validate nameInputRef =', nameInputRef);
        const errors = {};

        // We should skip validation hence we return an empty errors and we skip Form submission on the onSubmit method
        if (values.roomName === report.reportName) {
            return errors;
        }

        if (!values.roomName || values.roomName === CONST.POLICY.ROOM_PREFIX) {
            // We error if the user doesn't enter a room name or left blank
            ErrorUtils.addErrorMessage(errors, 'roomName', translate('newRoomPage.pleaseEnterRoomName'));
        } else if (!ValidationUtils.isValidRoomName(values.roomName)) {
            // We error if the room name has invalid characters
            ErrorUtils.addErrorMessage(errors, 'roomName', translate('newRoomPage.roomNameInvalidError'));
        } else if (ValidationUtils.isReservedRoomName(values.roomName)) {
            // Certain names are reserved for default rooms and should not be used for policy rooms.
            ErrorUtils.addErrorMessage(errors, 'roomName', translate('newRoomPage.roomNameReservedError', {reservedName: values.roomName}));
        } else if (ValidationUtils.isExistingRoomName(values.roomName, reports, report.policyID)) {
            // The room name can't be set to one that already exists on the policy
            ErrorUtils.addErrorMessage(errors, 'roomName', translate('newRoomPage.roomAlreadyExistsError'));
        }

        return errors;
    }, [report, reports, translate]);

    return (
        <ScreenWrapper
            includeSafeAreaPaddingBottom={false}
            onEntryTransitionEnd={() => {
                console.log('debug nameInputRef =', nameInputRef);
                if (!nameInputRef.current) {
                    return;
                }
                nameInputRef.current.focus();
            }}
        >
            <HeaderWithCloseButton
                title={translate('newRoomPage.roomName')}
                shouldShowBackButton
                onBackButtonPress={() => Navigation.drawerGoBack(ROUTES.getReportSettingsRoute(report.reportID))}
                onCloseButtonPress={() => Navigation.dismissModal(true)}
            />
            <Form
                style={[styles.flexGrow1, styles.ph5]}
                formID={ONYXKEYS.FORMS.ROOM_NAME_FORM}
                onSubmit={values => Report.updatePolicyRoomNameAndNavigate(report, values.roomName)}
                validate={validate}
                submitButtonText={translate('common.save')}
                enabledWhenOffline
            >
                <View style={styles.mb4}>
                    <RoomNameInput
                        inputID="roomName"
                        defaultValue={report.reportName}
                        ref={nameInputRef}
                    />
                </View>
            </Form>
        </ScreenWrapper>
    );
};

RoomNamePage.propTypes = propTypes;
RoomNamePage.defaultProps = defaultProps;
RoomNamePage.displayName = 'RoomNamePage';

export default compose(
    withLocalize,
    withReportOrNotFound,
    withOnyx({
        reports: {
            key: ONYXKEYS.COLLECTION.REPORT,
        },
    }),
)(RoomNamePage);

@neil-marcellini it's easily reproducible. Please check #admins room settings

Ah yes, thanks for explaining!

🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.16-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Prometheus services issue

Hi Cris,,
Prometheus services stopped after few mins of start up. i see starting up replaying WAL prompt and services stopped after some time. May i help get fix this issue? Thanks
Originally posted by @Dinesvl in https://github.com/NetApp/harvest/issues/18#issuecomment-1375261767

hi @Dinesvl what version of Harvest are you using and how did you install it? Can you share your Prometheus log file?


Python custom clean actions are not executed when the "dryrun" flag -n is set

Hi,
First, thanks a lot for this great package. I'll love it!! I'm currently using doit for automization of my data analysis tasks.
I just noticed a small issue, that I think it might be unintended.
When I write a custom clean action of a target there is a parameter "dryrun" passed to the action (nicely illustrated in clean_targets implementation task.py source)
Anyway, if doit clean -n  <taskname> is executed the clean action is not called at all.
dodo.py
import os

def create_file(filename):
    with open(filename,'w+') as fp:
        fp.write('Hello World\n')

def my_cleaner(filename, dryrun):
    msg = "remove '{}'...".format(filename)
    if dryrun:
        msg = "would " + msg
    print(msg)
    if not dryrun and os.path.exists(filename):
        os.remove(filename)

def task_hello():
    """ creates a "Hello World" file """

    filename = 'test.txt'

    task = {
        "actions" : [(create_file,(filename,))],
        "targets" : [filename],
        "clean"   : [(my_cleaner,(filename,))],
        "uptodate": [True],
    }

    return task

and than in the console
>>> doit hello
.  hello
>>> doit clean -n hello
hello - executing 'Python: function my_cleaner'

however I would expect the following:
>>> doit clean -n hello
hello - executing 'Python: function my_cleaner'
would remove 'test.txt'...

Is this documented anywhere or you just took from the code?
Looking at my code it seems that indeed it tries to support your use-case.
But actually on dry-run your custom clean functions a re not used at all. see [1]
So now the problem is that, if we always call the clean action I suspect most people do not use the dryrun param, so their clean would be executed even on dryrun :sweat:
So I suggest the fix would be that if a function does not take a dryrun parameter we keep the current behaviour. And always call the clean action if dryrun is present and hope the custom clean action handles the dryrun parameter correctly.
What do you think?
[1] https://github.com/pydoit/doit/blob/62335b05473193303d6ecb5524d65bf1a5a50d7e/doit/task.py#L486


Instructions on how to run the tests

We're testing all the bindings with each new commit on hiredis master.
I need help to run the tests and there are no instructions on the readme file on how to do so.

Not a committer, but for what it's worth, this is done with npm test.

 I'd never seen that before. But is seems, to me, unnecessary.
You don't need to install node-gyp either. From a clean checkout, install submodules, then run npm install in the directory, followed by npm test.

I'll give it a shot.

any help needed here? Please reopen then.


Return ATT_Error_Response on rejected write request

cc @wescande

I think it makes more sense if GATT client also raises ATT_Error instead of ProtocolError?

I think it makes more sense if GATT client also raises ATT_Error instead of ProtocolError?

ATT_Error is a subclass of ProtocolError, with the namespace set to att, so it would be perfectly fine to have the client raise ATT_Error.


Change Config Value for TiFlash

What problem does this PR solve?
Issue Number: close https://github.com/tikv/tikv/issues/13997
Problem Summary:
What is changed and how it works?
Change the config value for TiFlash
Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

 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.

/run-pull-unit-test

/run-all-tests

/run-all-tests


re-redo the API

Feel there's a few too many imports; could also do auto detection of the arg type that's passed into done():
var merry = require('merry')

var notFound = merry.notFound
var listen = merry.listen
var error = merry.error

var env = merry.Env({ PORT: 8080 })
var app = merry()

app.router([
  [ '/', function (req, res, ctx, done) {
    done(null, 'hello world')
  }],
  [ '/error', function (req, res, ctx, done) {
    done(error(500, 'server error!'))
  }],
  ['/api', {
    get: function (req, res, ctx, done) {
      done(null, 'hello very explicit GET')
    }
  }],
  [ '/404', notFound() ]
])

listen(env.PORT, app.start())

cc/ @nicknikolov thoughts?

Yes to both things I think. Not streaming res string anymore?

haha yeah well, that still happens under the hood :D - making it a thing
users don't have to care about tho (:
On Mon, Dec 19, 2016 at 11:11 AM Nick Nikolov<EMAIL_ADDRESS>wrote:

Yes to both things I think. Not streaming res string anymore?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/yoshuawuyts/merry/issues/17#issuecomment-267927715,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACWler7lbIhm-dlMSJTTph-fWtkF68r-ks5rJlhkgaJpZM4LQIwM
.

👍🏻👍🏻👍🏻
--
Nick Nikolov
@nicknikolov
On Mon, Dec 19, 2016, at 12:54, Yoshua Wuyts wrote:

haha yeah well, that still happens under the hood :D - making
it a thing
users don't have to care about tho (:

On Mon, Dec 19, 2016 at 11:11 AM Nick Nikolov
<EMAIL_ADDRESS>wrote:

Yes to both things I think. Not streaming res string anymore?

—

You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub

https://github.com/yoshuawuyts/merry/issues/17#issuecomment-267927715
,
or mute the thread

https://github.com/notifications/unsubscribe-auth/ACWler7lbIhm-dlMSJTTph-fWtkF68r-ks5rJlhkgaJpZM4LQIwM
.

— You are receiving this because you were mentioned. Reply to this
email directly, view it on GitHub[1], or mute the thread[2].

Links:

https://github.com/yoshuawuyts/merry/issues/17#issuecomment-267957685
https://github.com/notifications/unsubscribe-auth/ABX6pOEHlEdE1vijgJnagjfpwUSQ-6mLks5rJn6ZgaJpZM4LQIwM

done! - v3


Add support for SQS event sources

Lambda added support for SQS event sources today: https://aws.amazon.com/blogs/aws/aws-lambda-adds-amazon-simple-queue-service-to-supported-event-sources/.
We should add this to the aws-serverless library as an available event source.

See https://github.com/pulumi/pulumi-aws-serverless/pull/17.

Fixed with https://github.com/pulumi/pulumi-aws-serverless/pull/17


rambox: add gtk2 dependency

Motivation for this change
Fix Rambox after https://github.com/NixOS/nixpkgs/pull/42769
Closes https://github.com/NixOS/nixpkgs/issues/43297
Things done

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

[x] 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"
[x] 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)
[x] Fits CONTRIBUTING.md.

If we want to fix this globally, we should probably add this to https://github.com/NixOS/nixpkgs/blob/629c9011b4e1f2192b19cb06b572a9fa3775a95c/pkgs/development/tools/electron/default.nix#L50. But updating electron to support gtk3 would probably be better.

@jtojnar Done, thanks!

@GrahamcOfBorg build rambox electron

Success on x86_64-linux (full log)
Attempted: electron
The following builds were skipped because they don't evaluate on x86_64-linux: rambox
Partial log (click to expand)
  inflating: /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2/lib/electron/locales/el.pak
shrinking RPATHs of ELF executables and libraries in /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2
shrinking /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2/lib/electron/libffmpeg.so
shrinking /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2/lib/electron/libnode.so
shrinking /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2/lib/electron/electron
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2/lib  /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2/bin
patching script interpreter paths in /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2
checking for references to /tmp/nix-build-electron-1.8.2.drv-0 in /nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2...
/nix/store/gqqffzmwfvg356xgvpwd50c037nc21l2-electron-1.8.2

Success on x86_64-darwin (full log)
Attempted: electron
The following builds were skipped because they don't evaluate on x86_64-darwin: rambox
Partial log (click to expand)

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

these paths will be fetched (33.16 MiB download, 115.18 MiB unpacked):
  /nix/store/hfpc484f4f7cfkrkinpap2d194r2fcva-electron-1.8.2
copying path '/nix/store/hfpc484f4f7cfkrkinpap2d194r2fcva-electron-1.8.2' from 'https://cache.nixos.org'...
/nix/store/hfpc484f4f7cfkrkinpap2d194r2fcva-electron-1.8.2

Success on aarch64-linux (full log)
Attempted: electron
The following builds were skipped because they don't evaluate on aarch64-linux: rambox
Partial log (click to expand)
  inflating: /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2/lib/electron/locales/cs.pak
shrinking RPATHs of ELF executables and libraries in /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2
shrinking /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2/lib/electron/libnode.so
shrinking /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2/lib/electron/libffmpeg.so
shrinking /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2/lib/electron/electron
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2/lib  /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2/bin
patching script interpreter paths in /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2
checking for references to /build in /nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2...
/nix/store/8kmi3qy84qh39ji495lkbvnbj7ddyn9r-electron-1.8.2


@babel/preset-react should be in package.json dependencies

 | [vite-plugin-markdown] Cannot find module '@babel/preset-react'
 | Require stack:
 | -<EMAIL_ADDRESS> | -<EMAIL_ADDRESS> | -<EMAIL_ADDRESS> | -<EMAIL_ADDRESS> | -<EMAIL_ADDRESS> | - /my-repo/packages/apps/my-app/config/vite.config.ts
 | - /my-repo/node_modules/vite/dist/node/chunks/dep-a8e37fae.js
 | file: /my-repo/packages/apps/my-app/src/assets/my-file.md

Thanks for your feedback! It's an intentional design to avoid installing it unnecessarily for non-React use-cases.

@hmsk Thank you for your reply.

It's an intentional design to avoid installing it unnecessarily for non-React use-cases.

I see, but I think this should be explained in Setup section of README.md and a working version should be specified in somewhere. Otherwise, this package may someday break with the latest version @babel/preset-react.
If you are concerned about unnecessary dependencies being installed for non-React use-cases, I think it's better to separate the npm package and specify it in each package.json.
Can you reopen this issue?

Thanks for giving your opinion.


QCBM Tutorial

Title:
Quantum Circuit Born Machines
Summary:
Introduces the ideas of Quantum Circuit Born Machines (QCBMs) along with its gradient-based training.  Applies QCBM to learn bars and stripes and two peaks dataset.
Relevant references:
Differentiable Learning of Quantum Circuit Born Machine
Possible Drawbacks:
Related GitHub Issues:

If you are writing a demonstration, please answer these questions to facilitate the marketing process.

GOALS — Why are we working on this now?: The purpose is to use PennyLane to implement a popular algorithm in unsupervised generative modelling based on the paper "Differentiable Learning of Quantum Circuit Born Machine".

AUDIENCE — Who is this for?: The demo provides a gentle introduction to QCBMs, making it suitable for beginners. It also targets individuals interested in generative modelling with quantum algorithms.

KEYWORDS — What words should be included in the marketing post?: QCBM, QML, MMD, Gradient-based Optimization

Which of the following types of documentation is most similar to your file?
(more details here)

[ ] Tutorial
[x] Demo
[ ] How-to

Hello! Good job here @Gopal-Dahale !
Is it ready for us to review?
We are short of time during these next two weeks but we will get to it as soon as we can 💪

@KetpuntoG Yes it is ready for review.

I will talk to our designer to create the thumbnail. Do you have any suggestions on how it should look like?

Maybe a quantum circuit outputting a probability distribution. something similar to the quantum gan thumbnail. This is just a suggestion. I think PennyLane's design team is already well-versed and creative 😅.

Great job! Once I update the thumbnail, it's ready to publish 😄
I'll talk to Marketing to see if we can find a slot for mid-May. Congratulations on your contribution! 🚀

Thank you @KetpuntoG. @KetpuntoG and @alvaro-at-xanadu there are a few conversations which are yet to be resolved. Can you take a look at them? I have left some comments.

I spoke with marketing and the demo will be released in mid-May, thanks!

@alvaro-at-xanadu what do you think?


Error building after deleting a file: can't copy ' doesn't exist or not a regular file

I noticed recently that in ament_python packages, when building with --symlink-install, if I delete a file that was symlinked in the build folder, then on the subsequent build I get the error: can't copy 'build/<deleted-file> doesn't exist or not a regular file. Maybe it has to do with https://github.com/colcon/colcon-core/pull/592?
to reproduce:

colcon build --symlink-install --packages-select package
Delete file that was included in the data_files of setup.py
colcon build --symlink-install --packages-select package
Get: can't copy 'build/<deleted-file> doesn't exist or not a regular file

The workaround is simply to delete the build folder and try again but it would be nice if that wasn't necessary. Maybe you could delete automatically orphaned symlinks?

On my phone currently so can't check in detail, but as far as I remember:

I mean deleting from the sources, e.g. from 'launch' folder
yes still referenced because the data files use a wildcard e.g. 'launch/*.launch.py'

Alright, I see it now.
Here's the source of the error: https://github.com/pypa/setuptools/blob/f91fa3d9fc7262e0467e4b2f84fe463f8f8d23cf/setuptools/_distutils/file_util.py#L108-L110
It's pretty much the first thing that setuptools' copy function checks, and I don't see a way around it there. I think we might be able to modify the process that populates the "staged" package and explicitly remove dangling symlinks that match a data_files wildcard like this, but it might be tricky.
Either way, there will still be a dead symlink left in the install base. Same would happen with CMake.


openamp: select DEV_SIMPLE_ADDRENV when openamp opened

Summary
openamp: select DEV_SIMPLE_ADDRENV when openamp opened
Impact
OPENAMP select DEV_SIMPLE_ADDRENV
Testing

@GUIDINGLI is it too rigid to always select DEV_SIMPLE_ADDRENV which make it's impossible to implement the more advanced addrenv.


WIP: Use Polly to mock HTTP requests in tests

tl;dr: I've introduced Polly as a replacement for Nock as I
believe it will lead to more readable and authentic tests. A few things:

This is a proof of concept – I've only added it to
CollectiblesController to start out with.
All I've done is replace Nock requests with Polly requests. Ideally,
we wouldn't need to mock anything manually at all and let Polly do its
thing. Unfortunately, some HTTP requests that we are mocking no longer
work, so we have to keep mocking for now. That can be refactored in a
future commit.
In the future, we should investigate using Ganache instead of hitting
mainnet and exposing our Infura project ID in tests.

Currently there are a couple of problems with our tests as it relates to
network requests:

We do not prevent network requests from being made. There are
some tests which use Nock to mock requests, but not all requests are
being mocked, and we are unaware which ones are actually going
through.
Nock, although a popular package, is rather cumbersome to use, and
makes tests difficult to understand and follow.

To address these problems, this commit replaces Nock with Polly. Polly
is a package developed by Netflix that intercepts all HTTP requests and
automatically captures snapshots (recordings) of these requests as they
are being made. These recordings are then used in successive test runs.
You can also manually mock requests if you want more manual control.
Why introduce another package? Why is Nock not sufficient?
There are a few problems with Nock that make it difficult to work with:

Mocks take up space in your test, so you will probably find yourself
extending a collection of mocks you've assembled at the top of the
file. Once you have enough, who knows which mocks serve which tests?

Once you've added a mock to your test, that mock stays forever. If
the API changes in the future, or stops working altogether, you will
never know until you remove that mock.

If you turn nock.disableNetConnect() on, and you haven't mocked a
request, it will throw a NetConnectNotAllowedError. This works
in most cases, but what happens if you have a try/catch block
around the request you're making and you are swallowing the error?
Then your test may fail for no apparent reason. And how do you know
which request you need to mock? Nock has a way to peek behind the
curtain and log the requests that are being made by running
DEBUG=nock.* yarn jest ..., but this output is seriously difficult
to read:
2022-03-23T03:50:09.033Z nock.scope:api.opensea.io query matching skipped
2022-03-23T03:50:09.033Z nock.scope:api.opensea.io matching [https://api.opensea.io:443/api/v1/asset/0x495f947276749Ce646f68AC8c248420045cb7b5e/40815311521795738946686668571398122012172359753720345430028676522525371400193](https://api.opensea.io/api/v1/asset/0x495f947276749Ce646f68AC8c248420045cb7b5e/40815311521795738946686668571398122012172359753720345430028676522525371400193) to GET
[https://api.opensea.io:443/api/v1/asset_contract/0x2aEa4Add166EBf38b63d09a75dE1a7b94Aa24163](https://api.opensea.io/api/v1/asset_contract/0x2aEa4Add166EBf38b63d09a75dE1a7b94Aa24163): false
2022-03-23T03:50:09.033Z nock.scope:api.opensea.io attempting match {"protocol":"https:","slashes":true,"auth":null,"host":"api.opensea.io:443","port":443,"hostname":"api.opensea.io","hash":null,"search":null,"query":null,"pathname":"/api/v1/asset/0x495f947276749Ce646f68AC8c248420045cb7b5e/40815311521795738946686668571398122012172359753720345430028676522525371400193","path":"/api/v1/asset/0x495f947276749Ce646f68AC8c248420045cb7b5e/40815311521795738946686668571398122012172359753720345430028676522525371400193","href":"[https://api.opensea.io/api/v1/asset/0x495f947276749Ce646f68AC8c248420045cb7b5e/40815311521795738946686668571398122012172359753720345430028676522525371400193","method":"GET","headers":{"accept":["*/*"],"user-agent":["node-fetch/1.0](https://api.opensea.io/api/v1/asset/0x495f947276749Ce646f68AC8c248420045cb7b5e/40815311521795738946686668571398122012172359753720345430028676522525371400193%22,%22method%22:%22GET%22,%22headers%22:%7B%22accept%22:[%22*/*%22],%22user-agent%22:[%22node-fetch/1.0) (+[https://github.com/bitinn/node-fetch)"],"accept-encoding":["gzip,deflate"],"connection":["close"]},"proto":"https](https://github.com/bitinn/node-fetch)%22],%22accept-encoding%22:[%22gzip,deflate%22],%22connection%22:[%22close%22]%7D,%22proto%22:%22https)"}, body = ""

Polly removes all of these problems:

Because Polly records request snapshots, you don't usually have to
worry about mocking requests manually. These recordings are kept in
files which are categorized by the tests which made the requests.

Because Polly actually hits the API you're mocking, you can work with
real data. You can instruct Polly to expire these recordings after a
designated timeframe to guarantee that your code doesn't break if
the API ceases to work in the way you expect.

Polly will also print a message when a request is made that it
doesn't recognize without needing to run an extra command:
Errored ➞ POST https://mainnet.infura.io/v3/ad3a368836ff4596becc3be8e2f137ac PollyError: [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.
    {
      "url": "https://mainnet.infura.io/v3/ad3a368836ff4596becc3be8e2f137ac",
      "method": "POST",
      "headers": {
        "content-type": "application/json",
        "connection": "keep-alive",
        "host": "mainnet.infura.io",
        "user-agent": "Mozilla/5.0 (Darwin x64) node.js/12.22.6 v8/7.8.279.23-node.56",
        "content-length": "201"
      },
      "body": "{\"jsonrpc\":\"2.0\",\"id\":30,\"method\":\"eth_call\",\"params\":[{\"to\":\"0x18E8E76aeB9E2d9FA2A2b88DD9CF3C8ED45c3660\",\"data\":\"0x0e89341c0000000000000000000000000000000000000000000000000000000000000024\"},\"latest\"]}",
      "recordingName": "CollectiblesController/updateCollectibleFavoriteStatus/should keep the favorite status as false after updating metadata",
      "id": "53192eab94ddedfb300b625b1cb79843",
...

What about Nock Back? Doesn't this do the same thing?
It's true that Nock contains a feature to capture requests called Nock
Back. However, this is cumbersome, too:

You have to wrap your test in a nockBack call.
You have to name your recording files.
You have to call nockDone() in your test.

There is a package called jest-nock-back that fixes these issues and
makes using Nock Back very easy. However, it isn't maintained (last
release was 3 years ago) and is likely incompatible with the newest
version of Jest.
What about requests that irreversibly change data?
Some requests make irreversible changes to resources, such as
transferring a token from one account to another.
To handle these types of requests, Polly still lets you manually mock
requests just like Nock. We've configured Polly to not record a request
it doesn't recognize by default, so in this case you'll get a message
when running the test that makes such a request. From there you can make
a decision about how you'd like to mock this request — whether you want
Polly to record the request or whether you'd like to manually mock it.
That said, if the request in question involves a blockchain network,
instead of mocking the request, we might investigate whether it's
possible to use Ganache to perform the irreversible action rather than
actually hitting mainnet or some other network.
What are the tradeoffs for Polly vs. Nock?

Because Polly automatically creates request mocks and these mocks are
no longer contained in tests, developers will need to be educated
about Polly (Polly is not as popular as Nock) and remember that it
exists whenever updating tests.
If a recording is no longer needed or needs to be updated, the
associated file holding the recorded information about the request
needs to be deleted. Finding this file is not a great experience.
Nock has virtually zero initialization code. Polly's initialization
code is surprisingly complicated (although that is largely hidden, so
no one should have to mess with it).

I've made a couple of changes to this PR (notably a script to look for outdated recordings/snapshots) which means that we could conceivably use Nock Back instead of Polly. I'll try some more things out tomorrow.

Okay, so it sounds like the next step here is to try to make some changes to the structure of these tests. That should mitigate some of the pain points with Nock I mentioned.
I would also like to see if I can modify Nock so that when there is a request made that you haven't mocked yet, it will output information about that request in a similar way that Polly does. That should make working with Nock easier as it will be easy to understand which request was made and how exactly you can mock that request.

I ran into more issues with Nock today and wanted to write them down. I was trying to write some tests in the extension and was trying to figure out why, despite my attempts to mock requests to Infura, Nock was producing an error indicating that a request was made but it couldn't find a mock matching the request. I eventually realized a few things:

Every time you say .get or .post you're adding an interceptor. Once a request is made, if that request matches an interceptor, that interceptor is removed from a list. That means that if two requests are made with identical request bodies, then you need to say .post twice. You can get around this by calling .persist, but then you have to call nock.cleanAll() in an afterEach or something to clear the "persisted" nocks.
The error message that Nock produces is really confusing. It'll say "Nock: No match for request  Got instead ". Which is the expected and which is the actual? Eventually, after staring at it for a bit, I realized the first is the actual and the second is the expected, but even so, the second request didn't contain a request body, even though I'd specified an expected request body in my test.
In cases where you have a try/catch around a request and you don't throw the error appropriately, you won't get a proper error message when running the test. You can get around this by assigning the Nock mock to scope and then calling scope.done() at the end of the test, except that what happens if the test throws an error before scope.done()? So you have to end up commenting out some things in your test that would cause the error so that scope.done() is run appropriately. Really awkward.

More Nock fun today. It appears that if you call nock.cleanAll() in an afterEach (which is necessary if you're using the .persist() option for a nock) and you have tests which add nocks, and your implementation makes multiple requests, then only the first test that has nocks will work; the rest won't. For instance:
describe('Test case', () => {
  afterEach(() => {
    nock.cleanAll();
  });

  it('does something', () => {
    // this will work
    nock('http://google.com')
      .post('/foo')
      .reply(200);

    callFunctionUnderTest();
  });

  it('does something else', () => {
    // this won't
    nock('http://google.com')
      .post('/foo')
      .reply(200);

    callFunctionUnderTest();
  });
});

Maybe the solution here is not to use .persist(), ever. That's fine, but people now need to learn this, and that nock.cleanAll() is a footgun.