Flight work with Adapterman (Workerman)

Is your feature request related to a problem? Please describe.
I'm trying that this framework work with Adapterman, but only work the first URL.
I'm using the Techempower benchmark to test the frameworks with  the async event driven Workerman, that it's working with similar frameworks.
Describe the solution you'd like
I want that work when we bootstrap the app only 1 time, not only for Adapterman but for any platform (swoole, php-runtime,...).
Also I can help to have better performance when it's used like a persistent app.
I write here because one user send me a issue to Adapterman: https://github.com/joanhey/AdapterMan/issues/87
Describe alternatives you've considered
As work the first URL call, and only fail the next URL calls, it seems that it's not cleared the routes or other property of the framework.
Additional context
As you run also the Techempower benchmark, i'll send you the files to reproduce.
Actually
flight-workerman: Adapterman v0.6.1 OK
flight-workerman: Workerman[server.php] start in DEBUG mode
flight-workerman: ------------------------------------------- WORKERMAN --------------------------------------------
flight-workerman: Workerman version:4.2.1          PHP version:8.3.14           Event-Loop:\Workerman\Events\Event
flight-workerman: -------------------------------------------- WORKERS ---------------------------------------------
flight-workerman: proto   user            worker               listen                 processes    status
flight-workerman: tcp     root            AdapterMan-Flight    http://<IP_ADDRESS>:8080    32            [OK]
flight-workerman: --------------------------------------------------------------------------------------------------
flight-workerman: Press Ctrl+C to stop. Start success.
flight-workerman: Verifying framework URLs
--------------------------------------------------------------------------------
VERIFYING DB
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/db:
Accessing URL http://tfb-server:8080/db:
--------------------------------------------------------------------------------
VERIFYING QUERY COUNT FOR http://tfb-server:8080/db
--------------------------------------------------------------------------------
New configuration template added to /home/ubuntu/.siege
Run siege -C to view the current settings in that file
** SIEGE 4.0.7
** Preparing 512 concurrent users for battle.
The server is now under siege...
Transactions:                    512 hits
Availability:                 100.00 %
Elapsed time:                   0.24 secs
Data transferred:               0.00 MB
Response time:                  0.15 secs
Transaction rate:            2133.33 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                  317.13
Successful transactions:         512
Failed transactions:               0
Longest transaction:            0.22
Shortest transaction:           0.02

   PASS for http://tfb-server:8080/db
     Executed queries: 520/512
   PASS for http://tfb-server:8080/db
     Rows read: 511/512
--------------------------------------------------------------------------------
VERIFYING JSON
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/json:
   FAIL for http://tfb-server:8080/json
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
{'Content-Type': 'text/html;charset=utf-8', 'Server': 'workerman', 'Date': 'Mon, 16 Dec 2024 11:54:50 GMT', 'Content-Length': '0'}
--------------------------------------------------------------------------------
VERIFYING QUERY
--------------------------------------------------------------------------------
...

The files that I use:
index.php
<?php
require_once 'vendor/autoload.php';

error_reporting(-1);

Flight::register('db', PDO::class, [ 'mysql:host=tfb-database;port=3306;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', [ \PDO::ATTR_PERSISTENT => TRUE ] ]);

// JSON test
Flight::route('/json', function() {
	Flight::json(['message' => 'Hello, World!']);
});

// Plaintext test
Flight::route('/plaintext', function() {
	Flight::response()
		->header('Content-Type', 'text/plain')
		->write('Hello, World!')
		->send();
});

// DB test
Flight::route('/db', function() {
	$id = mt_rand(1, 10000);
	$db = Flight::db();
	$stmt = $db->prepare('SELECT * FROM World WHERE id = ?');
    $stmt->execute([ $id ]);
    $world = $stmt->fetch();
    // Cast fields to int so they don't get wrapped with quotes
	$world = [
		'id' => (int) $world['id'],
		'randomNumber' => (int) $world['randomNumber']
	];
	Flight::json($world);
});

// DB multiple test
Flight::route('/db-multiple', function () {
	$queries = Flight::request()->query['queries'];
    if (is_numeric($queries)) {
        $queries = max(1, min($queries, 500));
    } else {
        $queries = 1;
    }

	$db = Flight::db();
	$stmt = $db->prepare('SELECT * FROM World WHERE id = ?');
    $worlds = [];
    for ($i = 0; $i < $queries; ++$i) {
		$random_id = mt_rand(1, 10000);
        $stmt->execute([ $random_id ]);
        $world = $stmt->fetch();
        // Cast fields to int so they don't get wrapped with quotes
        $world = [
			'id' => (int) $world['id'],
			'randomNumber' => (int) $world['randomNumber']
		];
        $worlds[] = $world;
    }
    Flight::json($worlds);
});

// DB Update Test
Flight::route('/updates', function () {
    $queries = Flight::request()->query['queries'];
    if (is_numeric($queries)) {
        $queries = max(1, min($queries, 500));
    } else {
        $queries = 1;
    }

	$db = Flight::db();

    $select_stmt = $db->prepare('SELECT id FROM World WHERE id = ?');
    $update_stmt = $db->prepare('UPDATE World SET randomNumber = ? WHERE id = ?');

    $worlds = [];
    for ($i = 0; $i < $queries; ++$i) {
        $id = mt_rand(1, 10000);
        $random_number = mt_rand(1, 10000);
        $select_stmt->execute([$id]);
        $world = $select_stmt->fetch();
		$world = [
			'id' => (int) $world['id'],
			'randomNumber' => $random_number
		];

        $update_stmt->execute([ $random_number, (int) $world['id'] ]);

        $worlds[] = $world;
    }

	Flight::json($worlds);
});

// Fortunes Test
Flight::route('/fortunes', function() {
	$db = Flight::db();
    $fortunes = $db->query('SELECT * FROM Fortune')->fetchAll(PDO::FETCH_KEY_PAIR);

    $fortunes[0] = 'Additional fortune added at request time.';
    asort($fortunes);

    Flight::render('fortunes.php', [ 'fortunes' => $fortunes ]);
});

//Flight::start() ;

// Workerman
function run()
{
    ob_start();
    Flight::start();
    header(HeaderDate::$date); // To pass the bench, nginx auto add it
    return ob_get_clean();
}

server.php
<?php
require_once __DIR__.'/vendor/autoload.php';

use Adapterman\Adapterman;
use Workerman\Lib\Timer;
use Workerman\Worker;

Adapterman::init();

$http_worker        = new Worker('http://<IP_ADDRESS>:8080');
$http_worker->count = (int) shell_exec('nproc') * 4;
$http_worker->name  = 'AdapterMan-Flight';

$http_worker->onWorkerStart = static function () {
    HeaderDate::init();
    require __DIR__.'/index.php';
};

$http_worker->onMessage = static function ($connection) {

    $connection->send(run());
};

Worker::runAll();

class HeaderDate
{
    const NAME = 'Date: ';

    /**
     * Date header
     *
     * @var string
     */
    public static $date;

    public static function init(): void
    {
        self::$date = self::NAME.gmdate('D, d M Y H:i:s').' GMT';
        Timer::add(1, static function () {
            self::$date = self::NAME.gmdate('D, d M Y H:i:s').' GMT';
        });
    }
}

flight-workerman.dockerfile
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
    apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql  > /dev/null

COPY deploy/conf/* /etc/php/8.3/fpm/

WORKDIR /flight
COPY . .

ENV FLIGHT_DIR="/flight/src"

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

RUN apt-get install -y php-pear php8.3-dev libevent-dev php8.3-xml > /dev/null
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini

RUN composer require joanhey/adapterman:^0.6
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet

RUN sed -i "s|Flight::start() ;|//Flight::start() ;|g" index.php

RUN chmod -R 777 /flight

EXPOSE 8080

CMD php -c deploy/conf/cli-php.ini \
    server.php start

It'll be easier for you to find the problem. As the bench don't report any error, only empty response.
I'm at your disposition for any extra info or help.
Thank you.

Hey @joanhey long time no see :)
So one thing that may be worth noting is I'm pretty sure that the techempower benchmarks are using Flight v2 and the framework is now at Flight v3. Have you tried with v3 of the framework with any luck?

Hi @n0nag0n :hand:
I'll update the benchmark to use Flight v3, I only needed to change the plaintext code.
And later we'll compare the results from both versions.
Flight v3 with Adapterman:
flight-workerman: Adapterman v0.6.1 OK
flight-workerman: Workerman[server.php] start in DEBUG mode
flight-workerman: ------------------------------------------- WORKERMAN --------------------------------------------
flight-workerman: Workerman version:4.2.1          PHP version:8.3.14           Event-Loop:\Workerman\Events\Event
flight-workerman: -------------------------------------------- WORKERS ---------------------------------------------
flight-workerman: proto   user            worker               listen                 processes    status
flight-workerman: tcp     root            AdapterMan-Flight    http://<IP_ADDRESS>:8080    32            [OK]
flight-workerman: --------------------------------------------------------------------------------------------------
flight-workerman: Press Ctrl+C to stop. Start success.
flight-workerman: Verifying framework URLs
--------------------------------------------------------------------------------
VERIFYING DB
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/db:
   FAIL for http://tfb-server:8080/db
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
{'Content-Type': 'text/html;charset=utf-8', 'Server': 'workerman', 'Date': 'Wed, 18 Dec 2024 10:55:47 GMT', 'Content-Length': '0'}
--------------------------------------------------------------------------------
VERIFYING JSON
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/json:
Accessing URL http://tfb-server:8080/json:
   PASS for http://tfb-server:8080/json
--------------------------------------------------------------------------------
VERIFYING QUERY
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/db-multiple?queries=2:
Accessing URL http://tfb-server:8080/db-multiple?queries=2:
Accessing URL http://tfb-server:8080/db-multiple?queries=0:
Accessing URL http://tfb-server:8080/db-multiple?queries=0:
Accessing URL http://tfb-server:8080/db-multiple?queries=foo:
Accessing URL http://tfb-server:8080/db-multiple?queries=501:
Accessing URL http://tfb-server:8080/db-multiple?queries=501:
Accessing URL http://tfb-server:8080/db-multiple?queries=:
Accessing URL http://tfb-server:8080/db-multiple?queries=:
--------------------------------------------------------------------------------
VERIFYING QUERY COUNT FOR http://tfb-server:8080/db-multiple?queries=20
--------------------------------------------------------------------------------
New configuration template added to /home/ubuntu/.siege
Run siege -C to view the current settings in that file
** SIEGE 4.0.7
** Preparing 512 concurrent users for battle.
The server is now under siege...
Transactions:                    512 hits
Availability:                 100.00 %
Elapsed time:                   0.40 secs
Data transferred:               0.02 MB
Response time:                  0.22 secs
Transaction rate:            1280.00 trans/sec
Throughput:                     0.04 MB/sec
Concurrency:                  287.55
Successful transactions:         512
Failed transactions:               0
Longest transaction:            0.37
Shortest transaction:           0.04

   FAIL for http://tfb-server:8080/db-multiple?queries=2
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=2
     Invalid Content-Type header, found "text/html;charset=utf-8", did not match "^application/json(; ?charset=(UTF|utf)-8)?$".
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=0
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=0
     Invalid Content-Type header, found "text/html;charset=utf-8", did not match "^application/json(; ?charset=(UTF|utf)-8)?$".
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=foo
     Empty response given for stringy `queries` parameter foo
     Suggestion: modify your /queries route to handle this case (this will be a failure in future rounds, please fix)
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=501
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=501
     Invalid Content-Type header, found "text/html;charset=utf-8", did not match "^application/json(; ?charset=(UTF|utf)-8)?$".
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=20
     Only 7107 executed queries in the database out of roughly 10240 expected.
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/db-multiple?queries=20
     Only 7000 rows read in the database out of roughly 10240 expected.
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
{'Content-Type': 'text/html;charset=utf-8', 'Server': 'workerman', 'Date': 'Wed, 18 Dec 2024 10:56:03 GMT', 'Content-Length': '0'}
--------------------------------------------------------------------------------
VERIFYING UPDATE
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/updates?queries=2:
Accessing URL http://tfb-server:8080/updates?queries=2:
Accessing URL http://tfb-server:8080/updates?queries=0:
Accessing URL http://tfb-server:8080/updates?queries=0:
Accessing URL http://tfb-server:8080/updates?queries=foo:
Accessing URL http://tfb-server:8080/updates?queries=501:
Accessing URL http://tfb-server:8080/updates?queries=501:
Accessing URL http://tfb-server:8080/updates?queries=:
--------------------------------------------------------------------------------
VERIFYING QUERY COUNT FOR http://tfb-server:8080/updates?queries=20
--------------------------------------------------------------------------------
** SIEGE 4.0.7
** Preparing 512 concurrent users for battle.
The server is now under siege...
Transactions:                    512 hits
Availability:                 100.00 %
Elapsed time:                   0.30 secs
Data transferred:               0.00 MB
Response time:                  0.17 secs
Transaction rate:            1706.67 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                  287.33
Successful transactions:         512
Failed transactions:               0
Longest transaction:            0.28
Shortest transaction:           0.00

   FAIL for http://tfb-server:8080/updates?queries=2
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=2
     Invalid Content-Type header, found "text/html;charset=utf-8", did not match "^application/json(; ?charset=(UTF|utf)-8)?$".
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=0
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=0
     Invalid Content-Type header, found "text/html;charset=utf-8", did not match "^application/json(; ?charset=(UTF|utf)-8)?$".
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=foo
     Empty response given for stringy `queries` parameter foo
     Suggestion: modify your /queries route to handle this case (this will be a failure in future rounds, please fix)
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=501
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=501
     Invalid Content-Type header, found "text/html;charset=utf-8", did not match "^application/json(; ?charset=(UTF|utf)-8)?$".
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=501
     No items were updated in the database.
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=
     Empty response given for stringy `queries` parameter
     Suggestion: modify your /queries route to handle this case (this will be a failure in future rounds, please fix)
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=20
     Only 5271 executed queries in the database out of roughly 20480 expected.
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=20
     Only 5133 rows read in the database out of roughly 10240 expected.
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
   FAIL for http://tfb-server:8080/updates?queries=20
     Only 59 rows updated in the database out of roughly 10240 expected.
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
{'Content-Type': 'text/html;charset=utf-8', 'Server': 'workerman', 'Date': 'Wed, 18 Dec 2024 10:56:12 GMT', 'Content-Length': '0'}
--------------------------------------------------------------------------------
VERIFYING FORTUNE
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/fortunes:
   FAIL for http://tfb-server:8080/fortunes
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
{'Content-Type': 'text/html;charset=utf-8', 'Server': 'workerman', 'Date': 'Wed, 18 Dec 2024 10:56:13 GMT', 'Content-Length': '0'}
--------------------------------------------------------------------------------
VERIFYING PLAINTEXT
--------------------------------------------------------------------------------
Accessing URL http://tfb-server:8080/plaintext:
   FAIL for http://tfb-server:8080/plaintext
     Empty response
     See https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#specific-test-requirements
{'Content-Type': 'text/html;charset=utf-8', 'Server': 'workerman', 'Date': 'Wed, 18 Dec 2024 10:56:13 GMT', 'Content-Length': '0'}
Auditing /FrameworkBenchmarks/frameworks/PHP/flight:
No problems to report
wrk: Build time: 1s
techempower/mysql:latest: Build time: 1s
flight-workerman: Build time: 1m 57s
flight-workerman: Time starting database: 13s
flight-workerman: Time until accepting requests: 0s
flight-workerman: Verify time: 25s
flight-workerman: Failed verify!
flight-workerman: Total test time: 2m 37s
tfb: Total time building so far: 1m 59s
tfb: Total time verifying so far: 25s
tfb: Total execution time so far: 2m 40s
================================================================================
Verification Summary
--------------------------------------------------------------------------------
| flight-workerman
|       db            : FAIL
|       json          : PASS
|       query         : FAIL
|       update        : FAIL
|       fortune       : FAIL
|       plaintext     : FAIL
================================================================================

It's very similar to v2.
As don't show any error, I tried the bench in debug mode with manual calls from the browser, but also no errors.
Only send a 200 OK empty, after the first call.

The good think of use Request - Response is that it can be used with only one initial bootstrap and have faster runtime as persistent app.
It seems that in some step is not cleared the routes or request.

Ahh ok, I think I know what's going on. Flight really was built for only "regular" PHP event handling. In another discussion I did get it to work with Swoole with some customizations and some of these customizations might make sense to you. I've never worked with workerman, but I assume the same rule applies to Workerman as it does to Swoole.
https://github.com/flightphp/core/discussions/519#discussioncomment-8228424
Basically, you need to handle the headers by hand and deregister/register the request and response objects as they are static in the framework.
I have another project for the flightphp org to get async working with swoole and I have it all working, but there is a memory leak somewhere and eventually the swoole server has to be restarted as it runs out of memory. I'm not sure where the leak is as it's basically impossible to track variable sizes in swoole servers without xdebug or any type of friendly debug.
Hopefully this points you in a direction. I know you want Adapterman out of the box, and maybe it still can, but it looks like it may need a little help.

Remember to separate the code that is configuration, and never change, with a new Request that create the router.

I found an interesting information when i asked Perplexity AI, here is its answer :
In analyzing the FlightPHP core source code and its potential issues with FrankenPHP's worker mode, several areas could lead to buggy behavior, especially concerning shared data across requests:
Potential Issues in FlightPHP with Worker Mode
Static State Management:
FlightPHP relies on static methods and properties, such as Flight::set() and Flight::get(), which can lead to shared state across requests if not properly reset between requests1. In a worker mode, where the application remains in memory, this could result in data from one request being inadvertently shared with another.
Request/Response Objects:
FlightPHP uses static methods to manage request and response objects (Flight::request() and Flight::response()). If these objects are not re-initialized for each request, data from previous requests might persist, leading to incorrect responses or data leakage between users1.
Session Handling:
If sessions are not managed correctly, especially when using a shared in-memory approach, session data might be improperly shared or corrupted across different user sessions.
Mitigation Strategies
Reset Static Data: Ensure that any static data or state is reset at the beginning of each request. This can be done by explicitly clearing or reinitializing stateful components.
Isolate Request/Response Lifecycle: Recreate request and response objects for each new request to avoid data leakage.
Use Middleware for Cleanup: Implement middleware that resets or cleans up any global or static state after each request is processed.
By addressing these areas, you can mitigate the risk of shared data issues when using FlightPHP with FrankenPHP's worker mode.

Some of that problems don't affect in Adapterman.
Adapterman use forks, and each is independent. In reality we use the same PHP superglobals ($_GET, $_POST, ...) without problems. But still the framework need a new Request in each request.
Swoole and FrankenPHP (Worker mode) use threads, and all global variables and static properties are shared. So they need a more careful code to encapsulate the Resquest - Response to avoid conflicts.

The only change is here:  https://github.com/flightphp/core/blob/master/flight/Engine.php#L475-L481
public function _start(): void
    {
        $dispatched = false;
        $self = $this;
        $request = $this->request();
        $response = $this->response();
        $router = $this->router();

The $request and $response need a newInstance().
The framework will be as fast as before, because the first time create a new instance, but subsequent calls return the instanced Request and Response.

Another problem with persistent applications is to avoid exit(), as this will close the master CLI app.
It's better to use an ExitException().

Sorry I haven't gotten to this til now. I appreciate your help with figuring this out! I have seen the same problems and I would need to alter the core, without breaking past functionality to get it working correctly. I'll pin this in the todo list to see if I can get it working sometime soon cause I would be interested to get this working with some type of async handler.


Thrift-3067

Implemented Changes related Thirft Jira Issue :3067

Build failed for non-related issues. Will be reopening.

@bufferoverflow
Could you revert (undo) part of the commit corresponding to third commit of this pull request ?
This (d1aa53086c286bda716b7414eb04042999bb070a) breaks Travis build by inserting non-code to YAML.
By the way, the second one (711e6081fa8d31ffce3d6c431e0cd6c3dad9f050) only breaks the style of existing code.
It would be nice if this change is removed too.

Should I  fix these changes and create a new pull request?
Arijit
On Mon, Apr 27, 2015 at 3:22 AM, Aki Sukegawa<EMAIL_ADDRESS>wrote:

@bufferoverflow https://github.com/bufferoverflow
Could you revert (undo) part of the commit corresponding to third commit
of this pull request ?
This (d1aa530
https://github.com/apache/thrift/commit/d1aa53086c286bda716b7414eb04042999bb070a)
breaks Travis build by inserting non-code to YAML.
By the way, the second one (711e608
https://github.com/apache/thrift/commit/711e6081fa8d31ffce3d6c431e0cd6c3dad9f050)
only breaks the style of existing code.
It would be nice if this change is removed too.
—
Reply to this email directly or view it on GitHub
https://github.com/apache/thrift/pull/444#issuecomment-96528996.


Suggestion: Toolbox doesn't need a title bar

The toolbox can be simpler, just a simple drop-down with items aligned to the left and no title.
Just a suggestion, so it feels more like normal unity.

I appreciate your suggestion.
I put the title there deliberately. If someone needs help with the tools, I don't want them to be confused about where they are coming from. The title helps in that regard. I also plan to add more things there in the future. It won't be just a dropdown, but rather an actual toolbox. Therefore I will keep the title for now.
I will experiment with the left alignment and see if things look better that way.


lnd: remove deprecated endpoints sendpayment and sendtoroute

The endpoints sendpayment and sendtoroute have been deprecated more than 3 years(#4147), and now should be safe to remove them,
https://github.com/lightningnetwork/lnd/blob/e02fd39ce6f38fec635325bf6bb5138b92fdfcfe/lnrpc/lightning.proto#L265-L267
https://github.com/lightningnetwork/lnd/blob/e02fd39ce6f38fec635325bf6bb5138b92fdfcfe/lnrpc/lightning.proto#L284-L286
To properly remove them:

update the test framework by removing SendToRoute and replace all the old calls with the newer SendToRouteV2.
remove the endpoints, which includes rpcserver.go, lightning.proto and other unit test files.

Hey, I would like to work on it. Can you help me get started, I am kinda new to Go.

@sidkhuntia check the contribution guidelines.

@yyforyongyu  also need to remove SendToRouteSync and SendPaymentSync?

@daviogg yep

@mohamedawnallah Thank you for taking a detailed look at this issue🙏

unsure how to replace alice.RPC.SendToRoute() with alice.RPC.SendToRouteV2(sendReq). The former returns SendToRouteClient

You can view SendToRouteV2 as a combination of two calls, stream := SendToRoute() and stream.Send(req), and there's no need to assert updates in ReceiveSendToRouteUpdate anymore.

How I'm gonna address this issue (apart from the previous question):

This is really a nice breakup of the task! Feel free to implement it, and, just to be extra safe, I think we can aim at finishing it in 0.19.0, and give a notice about the incoming removal in 0.18 first.

Thank you, @yyforyongyu, for unblocking me regarding the removal of ReceiveSendToRouteUpdate. I've just submitted #8348 for this issue, which addresses the removal of those deprecated endpoints and updates the release notes in preparation for the 0.19.0 release. I would appreciate any feedback. Thanks! 🙏


Typo's and missing documentation for the time API.

1. SDK version（SDK 版本）
V2.112
2. In what kind of operation problems appear, and how to reproduce the problem ?（什么样的操作步骤问题会出现，是否是稳定复现，如何复现问题？）
Time API.
The time API seems weird and not correctly documented:

time.h#L15 TIME_GetIime should be TIME_GetTime
The time returned seems to have an offset of 946684800 from epoch, so it returns the time in seconds from 1/1/2000 12:00AM UTC. Maybe this info could be added to the documentation.
time.h#L16 TIME_GetRtcTIme should be TIME_GetRtcTime
The time from time(NULL) appears to be in seconds from epoch, but in the local time zone.
Usually, in the C standard, it's should not locally adjusted, but in the UTC time zone.

Thanks!
That's right the TIME_GetTime return seconds from  2000-1-1 00:00:00 UTC.
And time(NULL) return seconds from 1970-1-1 00:00:00 CST(China Standard Time UTC+8:00), it will be changed  to UTC the next version

I made some update here: https://github.com/Ai-Thinker-Open/GPRS_C_SDK/blob/master/demo/time/src/demo_time.c


[Assert] Create "Null consistent" matcher

Create an implement of the Hamcrest Matcher, that would check if actual value and specified value either both consistently null, or both consistently not null.
Matches when actual == null == expected == null
=====
Related to: #29

Aborted. The whole functionality might be simulated by a factory method that would return #nullValue matcher or #notNullValue matcher, depending on the specified argument.


fix: missing serial number on cart

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Bugfix

Needs QA check

@kodadot/qa-guild please review

Context

[x] Closes #9777

Did your issue had any of the "$" label on it?

[x] My DOT address: Payout

Screenshot 📸

[x] My fix has changed UI

Copilot Summary
copilot:summary
copilot:poem

Thanks!
pay 30 usd

😍 Perfect, I’ve sent the payout
💵 $30 @ 11.46 USD/DOT ~ 2.618 $DOT
🧗 16SjUbGKSdjCdWTy3NNT3JxbRVGGqD4mwkHpc6BD9U2Rp29Z
🔗 0x09da612dab726691b492724d8452adacd7950abc7a7a7b8ddd163866803aa22c
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


enable other tests

several of the tests have been disabled:
autocomplete,
progress reporting,
node, and
plot-actions.
i think all but autocomplete can just be turned on.
autocomplete maybe be the real problem here, as it starts too many languages at once.
break it into separate tests for each language.

https://github.com/twosigma/beaker-notebook/pull/4617/commits/bfd8f3f754af801ab58dea5dd4a0873a152e0d55

https://github.com/twosigma/beaker-notebook/pull/4623


Replace ONCE with Cargo links key

This would fix #275. We use the links key in cortex-m already here.
As far as I can tell this should serve the same purpose as the old __ONCE__ symbol, and is supported in c-m-rt's MSRV.

r? @jonas-schievink
(rust_highfive has picked a reviewer for you, use r? to override)

:+1: to adding links, all rt and peripheral crates should have that. When I added it to cortex-m though I left the static in place, since that's still needed to prevent linking with older versions. If we don't do that we effectively lose the duplicate detection between newer and older cmrt versions.

In cortex-m, the static you're talking about is CORE_PERIPHERALS: bool, right? Don't we need that static irregardless of linkage, so at most we could have removed the no_mangle?
The issue here is that because the static is zero sized, disassemblers mix it up with whatever other statics end up at the same address.
Nevertheless you're totally right and removing the static in the same release as adding the links key does stop duplicate detection between versions which is a pain. Any other ideas for fixing the debug issue? Making the static non-zero-sized seems undesirable.

Ah, I see, yeah. That static has another purpose and need to be kept. I don't immediately see how to fix this debugging issue other than fixing the debug tooling (which arguably is the "proper" fix).

@jonas-schievink I've updated to keep ONCE (though added a comment about this) and still add the links key, which I guess i the best we can do for now.

I guess we should release this ASAP then?

I don't think we'll want to remove ONCE for at least one or two minor/major releases, so there's probably no specific rush, but we probably do want a new c-m-rt patch release soonish.

Yes, a patch release to get "links" out into the field.

Sure, it's worth doing eventually, but there's no rush since it won't make any difference until there's two releases using it (which could then be detected attempting to link together).

Maybe I'm a bit over-cautious  but I'm wary about any new problems which could occur with the links approach in our context and just haven't been detected yet. AFAIK links has only/mostly been used for sys crates so far.


Deleting old releases

I was backing up my cluster for an update this evening and noticed the backup was taking quite a while.  It turns out this is because of the database for blobstore, which is storing files for (many) releases that I'll never want to use again.  It's around 30GB after a couple of weeks because your tool encourages me to deploy constantly. :wink:
I know that I could iterate through the old releases, getting their environment which contains a blob url, which I could use to delete the row in Postgres or over blobstore's API, but I'm wondering: is there a clean way to delete a release and all its associated data by ID?

@lmars is working on this. The first PR is up at #2448.

Great!  I'll do it manually for now then.


How about the quality of grasp poses annotatation for each object using a pretrained model RAGT-3/3?

Hi, it is a nice work. I am interested in it. I want to know the  the quality of grasp poses annotatation for each object using a pretrained model RAGT-3/3. Is there domain gap between the sence in your dataset generated by the scene description and the RAGT-3/3 dataset? I used the RAGT-3/3 pretrain model to test on a random scene picture, the results were not so good! Would you please give some details on this pipeline? Thanks!

Hi @andyoung009,

I want to know the the quality of grasp poses annotatation for each object using a pretrained model RAGT-3/3

Before generating grasp poses of a specific object in the scene, we mask out the object first and then use the masked image to generate grasp poses (specified in Section III-A of our paper). Therefore, the generated grasp poses by a pretrained RAGT-3/3 model are usually acceptable. To further improve the quality of generated grasp poses, we employ a grasp evaluation procedure, which is described in Section III-B of our paper.

Is there domain gap between the sence in your dataset generated by the scene description and the (NBMOD) dataset?

The objects generated in Grasp-Anything and real objects in the NBMOD may possess some domain gap. In fact, because of this, we have to evaluate whether our data could be useful in actual robotic experiments or not. There is a hypothesis in our experiment section: "Since our dataset is generated by the foundation models, will it work on real robot experiments?" We demonstrate that policy that is trained on Grasp-Anything can result in meaningful grasp operations in real robot experiments.
I hope my answers are helpful. Thank you for your interest in our work, and looking forward to addressing any further questions you may have.
Best regards,
An Vuong

Thank you very much!

mask out the object first and then use the masked image to generate grasp poses (specified in Section III-A of our paper)

How can the masked image  generate acceptable grasp poses? Is there any other constraints before the grasp evaluation procedure described in Section III-B of your paper?  I just use the  the pretrained RAGT-3/3 model for some common scene pictures, the results seems not so good.
Thank you.

Hi @andyoung009,
The masked image focuses on the visual information of the target object; therefore, intuitively, generated grasp poses from masked images will attach more to the target object than directly from the images. Of course, while it is not explicitly possible to evaluate the quality of grasp poses, we do study whether our synthetic dataset is useful or not, particularly in real robot experiments.
Thank you for your interests. I hope my explanations are helpful and look forward to your respones.
Best regards,
An Vuong

Closed due to inactivity,


Setup Cannot Find - graphql file

./Artemis-Generate --input "$PROJECT_DIR"/star.graphql --output "$PROJECT_DIR"/Models
I add the above common in my build phases, add added star.graphql file to my project.
but the following error is produced, on Xcode 11.4 project
Artemis-Generate[60233:3725847] Fatal error: No path to the schema file was specified: file

Hey @stunjiturner! First note is that it looks like something changed with the internal implementation of function builders sometime between around Xcode 11.1 that broke Artemis (or, at least, made type ambiguities that made it not compile without explicit generic type declarations, which makes the library much more difficult to use). I just got it back up and running using a snapshot of the master branch of Swift, so you'll need that snapshot (or wait for the next version of Xcode/likely Swift 5.3 or later once function builders can been officially added) to play with the library.
I did double check the codegen part of the library, though, and it should still be working with Xcode 11.4 / the Swift toolchain that shipped with it (though the sample project I had doesn't compile without a bunch of ugly explicit type definitions on the prod toolchain).
This is what my 'Run Script' build phase looks like (though yours likely looks the same):

The specific error you posted is for if the --input argument isn't included (which it looks like it should be). Just in case - note that $PROJECT_DIR is the directory for where your .xcodeproj file is located, in case your star.graphql file is actually located inside the default project name source folder instead.
I'll try out a fresh install of the library on another machine and see if I just have some other build configuration I'm forgetting about as well.


[libmt32emu] update to 2.5.0

Describe the pull request

What does your PR fix? Fixes  #17069

Which triplets are supported/not supported? Have you updated the CI baseline? All

Does your PR follow the maintainer guide? Yes

This time I got new kinds of pipeline errors :D I request a pipeline rerun :)

/azp run

LGTM, thanks for your PR @autoantwort.

This time I got new kinds of pipeline errors :D I request a pipeline rerun :)

And tunnel creator


Add docs on Working Groups to the napari.org docs

Description

napari has multiple working groups as reflected on the community calendar, zulip, and when reporting in community meetings. The existing groups and the work they do isn't currently documented. This also makes it unclear what community members would need to do to join or start their own working group.
This PR adds a page to https://napari.org/community about working groups based on the discussion at #3468. It was mostly written by @LCObus; I'm just here to help!
I still need help with:

[ ] How to add this new page to community/index.md so it appears in the navigation.

Type of change

[x] This change requires a documentation update

References

Closes #3468
How has this been tested?

[ ] example: the test suite for my feature covers cases x, y, and z
[ ] example: all tests pass with my change

Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[ ] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] If I included new strings, I have used trans. to make them localizable.
For more information see our translations guide.

Thanks in advance for the review! 🌻

@DragaDoncila and I unraveled how the current navigation appears to be made for other pages. The previous commit is my best attempt at mimicking it, so please let me know if there's a way you all would prefer this to be handled.

@DragaDoncila and I unraveled how the current navigation appears to be made for other pages.

Yeah it was kind of odd to me that we include content from the community files into files in the developers folder, when those sections are separate on the website anyway? @GenevieveBuckley do you know why this is?

Looks great - I've left a couple comments - the main one is about the "charters" for the individual WGs - i think if we've got some examples we should add those.
We can merge this first, but it might be nice to get those pages ready too? We could start with one for the documentation working group? Thoughts @GenevieveBuckley (we could add that to this PR too)

Uh, no thank you.
Taking the opportunity to formalize our existing process should not also mean taking the opportunity to introduce way more red tape. I don't even know what "charter" means here, and we already have a reasonably successful working group in progress (which should mean it already has everything it needs to run successfully). I'm guessing we've already written whatever it is you'd care about here in the minutes of the first 1-2 meetings. Please don't introduce more process just for the sake of it.

Taking the opportunity to formalize our existing process should not also mean taking the opportunity to introduce way more red tape. I don't even know what "charter" means here, and we already have a reasonably successful working group in progress (which should mean it already has everything it needs to run successfully). I'm guessing we've already written whatever it is you'd care about here in the minutes of the first 1-2 meetings. Please don't introduce more process just for the sake of it.

Then maybe we should just drop the reference to the charter from this PR for now or make it sound very optional. We can always revisit and add in later, but I think it's a bit funny to ask for something from new WGs that we don't have from existing ones. Thoughts?

I agree that adding more red tape and unnecessary process is not the goal or the yearning here. @GenevieveBuckley I will note that as a use case, I wasn't present when the docs working group was started, and as someone interested in joining i didn't know how to go about it (or what it included); i had the in of asking justin but i didnt know where to find the things that had been established in the 1-2 meetings.
I also believe we decided to adjust the term "charter" to "guidelines", and that much of what the docs group had built is aligned with the community sourced recommendations for inclusion in the guidelines. My hope is this slight upfront organization supports inclusion and allows new folks to understand what they're getting into if they join a working group.

Maybe @LCObus we can add a template "charter/ guidelines" to this PR? Could go at bottom of this page or on a new page. That way new WGs have something to reference and existing ones can go back and make one when time is write if they so choose, but we don't need to ask more from our existing WG leads who are already doing a lot!!

Maybe @LCObus we can add a template "charter/ guidelines" to this PR? Could go at bottom of this page or on a new page. That way new WGs have something to reference and existing ones can go back and make one when time is write if they so choose, but we don't need to ask more from our existing WG leads who are already doing a lot!!

yes yes, that was the goal (i think @isabela-pf is working on one?) I do think a one pager with agreed upon items listed in a final PR is valuable to both existing and future WGs, and part of the core value prop here- definition, focus, and inclusion. i believe @neuromusic was updating the docs WG one pager to align (and to its credit it had basically everything the guidelines had recommended, but i dont want to assume all existing groups had the same).
but yes to a template!

Thanks to everyone for giving this a review! I think I've caught all the above feedback, so unless more comes up I also agree this is ready to be merged.


Add LoadArgs.allow_missing_imports for multi-module AOT

The INTERP module loader was failing when multi-module support is on
and dependant modules are not found; this enforced AOT compiler
integrations to prepare dependant modules while it wasn't necessary.
This new option allows integrated AOT compilers to work as if the
multi-module support wasn't turned on.
This option is also turned on in the AOT compiler CLI, just in case
if WASM_ENABLE_MULTI_MODULE is turned on there one day.

So, you're hoping a multi-aot feature which means linking happens when aot loader loading files. But current status is WAMRC requires all dependencies. I agree that your requirement is more nature. And it should be the default behaviour. Not an option.

So, you're hoping a multi-aot feature which means linking happens when aot loader loading files. But current status is WAMRC requires all dependencies. I agree that your requirement is more nature. And even more it should be the default behaviour. Not an option.

I have removed the option as you suggested and made it the default behavior.

Plus, Since I am not quite familiar with current implementation, may I ask why WAMRC needs to enable "multi-module" feature? In my imagination, people should use wamrc(w/o multi-module feature) to generate AOTs one by one for main module and its dependencies. And AOT loader(w/ multi-module feature) could load them like a ld.linux.

Yes, we don't need to enable "multi-module" for WAMRC. Actually we have integrated the compiler code directly into the same package as the runtime, our compiler and runtime share the same macro control. So we have to ensure that the compiler does not encounter failures when the "multi-module" feature is enabled.

Yes, we don't need to enable "multi-module" for WAMRC

If so, original wasm_loader will not cause any trouble in your project. The question will be, why change? Because all modification disable original show error and quit action when couldn't matching import requirements.
BTW, you might want to change the PR title. Now the PR is about something else.

thanks for @wenyongh. I kindly understand the situation here. The project needs to -DWAMR_BUILD_MULTI_MODULE=1 when compiling WAMRC but actually don't want show error and quit, which is in #if WASM_ENABLE_MULTI_MODULE !=0 ... #endif block, to bother WAMRC compilation. Please correct me if I am wrong.
I guess it becomes another problem: under other non-aot running mode, like interpreter and jit, when enabling MULTI_MODULE feature, what kind of behavior the loader should be if can't match any import requirement?
There is be an instantiation check check_linked_symbol() in wasm_runtime.c. It could be our insurance. But it only cover function and global. Please add check for memory, table and tag.  #if WASM_ENABLE_WAMR_COMPILER == 0 will protect WAMRC from linking failures.

thanks for @wenyongh. I kindly understand the situation here. The project needs to -DWAMR_BUILD_MULTI_MODULE=1 when compiling WAMRC but actually don't want show error and quit, which is in #if WASM_ENABLE_MULTI_MODULE !=0 ... #endif block, to bother WAMRC compilation. Please correct me if I am wrong.

In our project, we don't directly use WAMRC, instead we integrated the compiler code into the runtime. And yes, we need -DWAMR_BUILD_MULTI_MODULE=1 and we perfer not to show errors and quit when dependent modules are not found.

I guess it becomes another problem: under other non-aot running mode, like interpreter and jit, when enabling MULTI_MODULE feature, what kind of behavior the loader should be if can't match any import requirement?

So I think using the LoadArgs.allow_missing_imports option is the most appropriate in this case. Without this option, there might be issues in non-aot mode.

thanks for @wenyongh. I kindly understand the situation here. The project needs to -DWAMR_BUILD_MULTI_MODULE=1 when compiling WAMRC but actually don't want show error and quit, which is in #if WASM_ENABLE_MULTI_MODULE !=0 ... #endif block, to bother WAMRC compilation. Please correct me if I am wrong.

In our project, we don't directly use WAMRC, instead we integrated the compiler code into the runtime. And yes, we need -DWAMR_BUILD_MULTI_MODULE=1 and we perfer not to show errors and quit when dependent modules are not found.

i suspect such a usage is simply unsupported.
i'm not sure if it should be supported either.
is this the only change you need for your "integrated compiler" use case?

thanks for @wenyongh. I kindly understand the situation here. The project needs to -DWAMR_BUILD_MULTI_MODULE=1 when compiling WAMRC but actually don't want show error and quit, which is in #if WASM_ENABLE_MULTI_MODULE !=0 ... #endif block, to bother WAMRC compilation. Please correct me if I am wrong.

In our project, we don't directly use WAMRC, instead we integrated the compiler code into the runtime. And yes, we need -DWAMR_BUILD_MULTI_MODULE=1 and we perfer not to show errors and quit when dependent modules are not found.

i suspect such a usage is simply unsupported. i'm not sure if it should be supported either. is this the only change you need for your "integrated compiler" use case?

Yes, the commit with the LoadArgs.allow_missing_imports option is the only change addresses our immediate needs.

IIUC, for some reason, in your project, WAMRC and IWASM are compiled in a same set of compilation options. It is different with what we did in wamr repo. (Maybe both executables share one library of WAMR?)

i'm interested in why.
if we want to support such a configuration, i guess we need a sample to run on the ci.

Maybe both executables share one library of WAMR?

We are developing a Postgres extension that statically links the WAMR compiler and IWASM code together. Our extension provides a PG function for AOT compilation and also includes a runtime for execution.
If you are interested, I can add you to our Gitee repository. It is currently a pre-open source project.

statically links the WAMR compiler and IWASM code together.

Never saw that coming. 🤔.
Even so, we can still use check_linked_symbol() to do instanation phase check to make sure every necessary symbols are all set before execution.

@lum1n0us Thanks, I've commit the changes for check_linked_symbol(). However, the tests are currently failing. I'm investigating on it, and any help you can provide would be greatly appreciated.

@lum1n0us Thanks, I've commit the changes for check_linked_symbol(). However, the tests are currently failing. I'm investigating on it, and any help you can provide would be greatly appreciated.

@XeniaLu I did some test on this and created a patch based on your PR:
https://github.com/wenyongh/wasm-micro-runtime/pull/932
It basically works, which reports linking error in wasm instantiation when the import global/table/memory/tag isn't builtin and isn't linked in multi-module mode. I removed unnecessary WASM_ENABLE_WAMRC_COMPILER macro controls in wasm_runtime.c since the aot compiler doesn't run into the file, and also modified several patch files for spec tests since the check is a little stricter than before. Maybe you can check whether it fits your requirement?

@XeniaLu I did some test on this and created a patch based on your PR: wenyongh#932 It basically works, which reports linking error in wasm instantiation when the import global/table/memory/tag isn't builtin and isn't linked in multi-module mode. I removed unnecessary WASM_ENABLE_WAMRC_COMPILER macro controls in wasm_runtime.c since the aot compiler doesn't run into the file, and also modified several patch files for spec tests since the check is a little stricter than before. Maybe you can check whether it fits your requirement?

@wenyongh Super thanks for the patch. It works perfectly for our needs. I have cherry-picked your patch into this PR.


Feature: Optional specificity for schema mappings

Summary of the Problem:
There currently doesn't appear to be a way to designate properties on different types of nodes but with the same name as different RDF schema types.
I think this would be a common use-case, so please let me know if I've missed the proper way to solve this problem or other workarounds.
Description:
For example, if you have a title property in two different nodes, you can’t specify a mapping specific to the node, only the property name across all nodes.
So the following would be impossible, since there is no more specificity that can be made when defining mappings for the second argument in addSchemaToMapping(<mapping reference node>, <neo4j element>, <rdf element>):

Neo4j Schema Element
Element Type
Schema.org Element

Person
label
http://schema.org/Person

title
property
https://schema.org/jobTitle

------------
-------------
-------------

Movie
label
http://schema.org/Movie

title
property
http://schema.org/name

Workaround # 1:
A potential, but impractical solution would be to disambiguate the Neo4j schema properties in the LPG graph, to look like:

Neo4j Schema Element
Element Type
Schema.org Element

Person
label
http://schema.org/Person

person.title
property
https://schema.org/jobTitle

------------
-------------
-------------

Movie
label
http://schema.org/Movie

movie.title
property
http://schema.org/name

Then you can have separate mappings for each one, but that means many of the properties we store on nodes in the LPG need prefixes to namespace them which makes non-RDF querying much more verbose.
Workaround # 2:
There is an option to use classes as nodes instead of as labels which may help.
However, my intention was hoping to avoid direct coupling of the RDF neosemantics naming conventions in my graph by using the nice schema mapping features.
Proposed Solution
An optional argument to the addMappingToSchema could limit the mapping to only be applied to a Node or Relationship type, like so:
addSchemaToMapping(<mapping reference node>, <neo4j element>, <rdf element>, <applicable labels>)

To minimize the impact on existing users, the new label-scoped mappings could be stored separately from the existing mappings and would take precedence over un-scoped mappings when determining the RDF schema element to use.
And thank you! I really appreciate this useful library and all of the wonderful features that are already available.

Hi @dshunfen , thanks for your comment!
You're right, in its current version there is no way of defining label-specific property mappings.
I did a number of simplifying assumptions when designing the mapping feature in an attempt not to over-engineer it before hearing from people using it.
One of these assumptions was to think that people apply naming conventions for properties similar to what you describe as workaround 1, that is using customerName or customerTitle as property names for nodes labelled as Customer rather than just name or title. But I understand that it is not always the case and sometimes generic property names are used for good reason.
I like your proposed solution. Watch this space for updates.
Cheers,
JB.


added AccessControl

Test need to be done

btw where can I change the @solidstate/spec?
I would like  to add describeBehaviorOfAccessControl

That package is located in the spec directory of this repository.

please add describeBehaviorOfAccessControl to @solidstate/spec

please add describeBehaviorOfAccessControl to @solidstate/spec

I don't think I have access to your branch.  You can add it by importing it into spec/access/index.ts.

Love that this is seeing progress, going to be watching this

I will review again soon.  Not much time at the moment.  It appears to be nearly finished, though.

@iam-dev Merge conflict fixed, pull changes.

please check and merge

+1 for having this support for the access control functions!

Please forgive the delay, will get back to this as soon as I can.

+1 Looking forward to seeing it in the next version

Any update on when this will be merged or is there still work that needs to be done?

Once again, I apologize for the delay.  I've made some changes, and I believe this is almost ready to merge.
One outstanding question: why shouldn't grantRole revert if a user already has a role, and why shouldn't revokeRoke revert if a user doesn't have a role?  I'd like to make one of two changes:

Revert if either of these functions is called but has no effect.
Add a bool return argument to these functions to indicate whether the call had an effect.

Any opinions?  I will merge once this is decided.

OpenZeppelin's implementation doesn't revert on those things, so I guess that's just how it was ported. I'm wondering why they made the decision not to revert if it wouldn't do anything. Maybe there's an edge case I'm not seeing. Returning a bool would still give feedback but not be a "breaking" change compared to OpenZeppelin. So maybe change 2 would be my vote.

Yeah, the PR matches the original OZ implementation, but the same question could also be asked there.  AccessControl isn't based on an EIP, so it's okay to make improvements.
Thought of a third option which I'm leaning towards - see my edited comment above.

For both grantRole and revokeRole checks can be performed ahead of time if a bool or revert is desirable. I like the third option or leaving it as is.

Implemented option 3.


Add websockets icon

For Python agent plugin

Waiting for agent side PR

23k icon seems too large, could you try to compress it to ~10k?

Sure I'll do that later. Btw is this icon too wide?

I compressed it to 12k


iOS put content behind safe area

Using nativescript + angular I have layout like this:
    <StackLayout backgroundColor="green">
        <StackLayout backgroundColor="red" height="300">
            <Image [src]="someUrl"></Image>
        </StackLayout>
    </StackLayout>

On android it allows me to achieve the desired result:

As you may see, image falls behind the status bar and it's good in my case.
Meanwhile on iOS the same layout is rendered differently:

My question is how can I achieve same look on iOS, as it's on android? So that image falls behind status bar.

@DanielRitvas the idea of the safe area is to prevent any app context (content) to be shown in this areas  - this way the content wont be hidded and unaccessible behind the notch.
Quote from  the official Apple documentation here:
Adhere to the safe area and layout margins defined by UIKit. These layout guides ensure appropriate insetting based on the device and context. The safe area also prevents content from underlapping the status bar, navigation bar, toolbar, and tab bar. Standard system-provided views automatically adopt a safe area layout guide.

So that said you can't use the safe area to shown your content - think of the area os a must margin - you can apply background but the content will be spanned there.
See more about the safe are in NativeScript here


Firewalld backend forward port even for non-local-targeting traffic

Reproduce of the problem:
Start a container with port forwarding using firewalld backend.
$ sudo NETAVARK_FW=firewalld podman run -p 12345:12345 --rm -it alpine
 ...
# ip a
 ...
 ... <IP_ADDRESS>/16 ...
 ...
# python3 -m http.server 12345
 ...

Firewalld state:
$ sudo firewall-cmd --info-policy=netavark_portfwd
netavark_portfwd (active)
  priority: -1
  target: CONTINUE
  ingress-zones: ANY
  egress-zones: ANY
  services:
  ports:
  protocols:
  masquerade: no
  forward-ports:
	port=12345:proto=tcp:toport=12345:toaddr=<IP_ADDRESS>
  source-ports:
  icmp-blocks:
  rich rules:

In another container
$ sudo NETAVARK_FW=firewalld podman run --rm -it alpine
 ...
# curl <IP_ADDRESS>:12345
 ... (reply from python, listing contents in /)
# curl <IP_ADDRESS>:12345
 curl: (7) Failed to connect to <IP_ADDRESS> port 12345 after 3108 ms: Couldn't connect to server
# curl <IP_ADDRESS>:12345
 ... (reply from python, listing contents in /)

It is unexpected to me that <IP_ADDRESS>:12345 would be successful, as traffic to <IP_ADDRESS>:12345 should be masqueraded to real <IP_ADDRESS> and result in Failed to connect as cloudflared should not have a python http.server running in /.

Reason:
Generated nft rule from firewalld:
	chain nat_PREROUTING {
		type nat hook prerouting priority dstnat + 10; policy accept;
		jump nat_PREROUTING_POLICIES
	}
	chain nat_PREROUTING_POLICIES {
...
		jump nat_PRE_policy_netavark_portfwd
...
	}
	chain nat_PRE_policy_netavark_portfwd {
...
		jump nat_PRE_policy_netavark_portfwd_allow
...
	}
	chain nat_PRE_policy_netavark_portfwd_allow {
		meta nfproto ipv4 tcp dport 12345 dnat ip to <IP_ADDRESS>:12345
	}

This makes the dnat rule apply to every traffic that hit prerouting chain without checking fib information.
Consider the container is running with -p 443:443 and the machine running the container is a router, every traffic to anyip:443 would be forwarded to the container, which is bad. (This is the exact reason why https://github.com/containers/netavark/issues/881 exist as I wanted to limit the address forwarded from, which did not work since the issue) I thought that forwarding even for non-local-targeting traffic is somewhat designed but after swiched back to iptables backend I realized that this might be a bug.

Behavior when iptables backend is used (rules are transleted by iptables-nft)
...
		fib daddr type local counter packets 50672 bytes 4178234 jump NETAVARK-HOSTPORT-DNAT
...

we have the fib daddr type local check here.

This might be hard to fix I guess, as I can't think of a way to match fib in firewalld rules for now, maybe some cooperation with firewalld is needed.

Definitely a firewalld bug. I'm working through some bugs with the firewalld team as part of the process of getting https://github.com/containers/netavark/pull/885 merged but have not noticed this one yet - I'll add it to the list.
Until #885 merges (which will be after the bugs are addressed enough that our tests start passing), I do not recommend using the firewalld driver.

it was mentioned here: https://github.com/containers/netavark/discussions/859
Looks like I forgot to ping you there.


Policy Server SBOM is empty

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
I've looked into the SBOM generated by latest release (1.18.0) and there's no relevant data in there, it's basically empty.
Expected Behavior
The SBOM should include all the information about the dependencies and tools used to build the artifact.
Steps To Reproduce
There are two ways to get the SBOM. The first one is from the 1.18.0 release page, download the attestation-<platform>.tar.gz file, unpack it and look at the contents of the SBOM file.
The second one is by using the slsactl CLI tool created by the Rancher Security team:
slsactl download sbom ghcr.io/kubewarden/policy-server:v1.18.0

Compare the output produced by the previous command with the following ones:
slsactl download sbom ghcr.io/kubewarden/kubewarden-controller:v1.18.0
slsactl download sbom ghcr.io/kubewarden/audit-scanner:v1.18.0

Environment
Kubewarden 1.18.0 release

Anything else?
There's definitely something wrong with the SBOM generation for Policy Server, maybe this is related with Rust or with the usage of cross-rs... :thinking:
The SBOMs of kubewarden-controller and audit-scanner are good

The default Docker Buildx backend for sbom generation is syft, which currently fails to identify any package on that image and don't seem to be able to do composition analysis for the Rust executable:
syft ghcr.io/kubewarden/policy-server:v1.18.0 --scope=all-layers
 ✔ Loaded image                                                       ghcr.io/kubewarden/policy-server:v1.18.0
 ✔ Parsed image                        sha256:e348d2e67de2de6509f4f2787a96234caed896b37c273c6132bc3877bf41db1b
 ✔ Cataloged contents                         edf561b8f457e89ed2adeae9e4447184d4344b2080a10088f38c9e53049e2ea4
   ├── ✔ Packages                        [0 packages]
   └── ✔ Executables                     [1 executables]
No packages discovered

Which results in an empty SBOM.


Update deployment-on-heroku.rst

This sets the Heroku buildpack for the app you have created with Cookiecutter without creating a new Heroku app on the command line.

Description

Checklist:

[ ] I've made sure that tests/test_cookiecutter_generation.py is updated accordingly (especially if adding or updating a template option)
[ ] I've updated the documentation or confirm that my change doesn't require any updates

Rationale

At this point of the deployment, the user shouldn't have an app on Heroku yet, hence why we need to call heroku create. if you have already an app, then you can adjust the guide, but I think we should assume that nothing exists and hence the command is correct.
Let me know if I missed something...


Implement Parse for meta item types

The various meta item types have been missing Parse implementations.
This makes parsing the argument to Rust's proc macros difficult.
This patch provides Parse implementation for:

Meta
MetaList
MetaNameValue
NestedMeta

A first step towards the goals stated in #359.

@dtolnay This change should stand on its own. I wanted to get a PR up for review before continuing the work.


Remove null byte after home directory on Windows

This works around https://github.com/apple/swift-corelibs-foundation/issues/5041, which caused a null byte to be incorrectly added after the user name's home directory, causing, among others, directory iteration to recurse indefinitely, always adding another level of the user's name.

@swift-ci Please test


local mock not work according by the user manual

the user manual describe the usage about mock like this：
<dubbo:service interface="com.foo.BarService" mock="true" />

or
<dubbo:service interface="com.foo.BarService" mock="com.foo.BarServiceMock" />

but, this config is not work, the correct way is insteading <dubbo:service with <dubbo:reference,
just like this:
<dubbo:reference interface="com.foo.BarService" mock="true" />

or
<dubbo:reference interface="com.foo.BarService" mock="com.foo.BarServiceMock" />

I think should edit the user manual like above;

I have already reproduced this issue on my machine, and Dubbo team will fix this in the official user manual document:

http://dubbo.apache.org/books/dubbo-user-book/demos/local-mock.html
http://dubbo.apache.org/books/dubbo-user-book-en/demos/local-mock.html

Thanks a lot for your feedback ^_^

@diecui1202 Finished.

This has been fixed by https://github.com/apache/incubator-dubbo-docs/pull/12


set read-only to all non co-master replicas

Hi,
In our configuration we have mult-dc co-masters and only those can have RW traffic all other replicas can serve as RO replicas. Is there a way to cause orchestrator to set all non co-master replicas to be read-only, or is that something I need to set manually ?
BR

@tapuhi this sounds like either job for your puppet or for some scripting.
To let you know how we do this:

ALL servers are configured with read_only=1 in my.cnf (some snowflakes exists for dev/testing machines)
A server only gets to be read_only=0 if promoted as master by orchestrator.

You can easily check which are all the co-masters via:
curl -s http://path.to.orchestrator/api/all-instances | jq -r '.[] | select(.IsCoMaster==true) | .Key.Hostname'

and likewise who are all the non-co-masters:
curl -s http://path.to.orchestrator/api/all-instances | jq -r '.[] | select(.IsCoMaster==false) | .Key.Hostname'


updated the assignment.md

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
What did you learn from the changes you have made?
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
How were these changes tested?
A reference to a related issue in your repository (if applicable)
@mentions of the person or team responsible for reviewing proposed changes (At least 2 people)
@dtxe
Checklist

[x] I can confirm that my changes are working as intended

uoft-dsi-c3-homework-20240426

not sure if it matters or not, how come answer to this question:
Fifth word of the fifth fictional Space Wars series
is "Past" when content of the file is
"Space Wars: Future Legends and Past Legacies"
According to me it should be "and"


feat(rules): added the ability to create rules for seasons & episodes

This PR contains most changes for release 1.5.0

:tada: This PR is included in version 1.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fix ExpandArgs to not expand % before opening brackets

Fixes https://github.com/neomake/neomake/issues/1069.

Closing as per https://github.com/neomake/neomake/issues/1069#issuecomment-284161157.


🦺[Tech Debt]  Apply unused script

Goal
Use a Build Phase script to identify unused code in the code base
Definition of Done

[ ] Pick a method 2:  https://iosexample.com/a-tool-to-detect-unused-code/
[ ] Pick a method 1: https://medium.com/@gabriel_lewis/how-to-easily-find-unused-swift-code-in-xcode-159631961acf
[ ] Branch develop/techdebt/XXXX-122
[ ] Submit a PR

Fixed in #145


T-SRS-TOO-003: VOI cutter: "switch to 2D" button should not be checkable

The button text is orange when it says "switch to 2D", and white when it's "switch to 3D". This is strange behaviour resulting from the fact the button is checkable.

Sorry, i don't understand. It does not seem weird to me. Are you saying that the button should not be checkable?

A checkable button means you are activating/disactivating an option, or a state. In our case this would mean we are "activating/disactivating" 3D mode, but the text doesn't say it this way and even if it did it would be strange because we don't activate 3D mode, we switch to it.
Even more important though: why do we even have this button when we can use the view buttons to do the switch ? BTW using those buttons doesn't have the same effect (the Cut Volume button is not disactivated) which is non consistent.


fairy finite memory cake

v1.25.1
?- length([_|_],_).
   true
;  ... .

?- length([_=|_],_).
uncaught exception: error(resource_error(finite_memory),length/2)
?-

Parsing miss causes failure driven loop inside length/2, hence eventual
resource_error...
?- L=[=|].
L = [_A=_B|dummy].
Will look into it.
On Wed, Mar 30, 2022 at 7:06 AM flexoron @.***> wrote:

v1.25.1
?- length([|],_).
true
;  ... .
?- length([=|],_).
uncaught exception: error(resource_error(finite_memory),length/2)
?-
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/510, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEUA3LD5RTNNDSB7L53VCNWD5ANCNFSM5R7U7QSA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Deadlock when rotating app

Steps to reproduce
Create a camera view and rotate the device several times.
Expected behaviour
The preview should rotate with the app.
Actual behaviour
Eventually the preview layer gets locked in RCTCamera.m -layoutSubviews and the main thread becomes locked. I've attached a screenshot of the stack trace. I was able to solve the problem by changing layoutSubviews but it seems like a hack:
- (void)layoutSubviews
{
  [super layoutSubviews];
    dispatch_async(dispatch_get_main_queue(), ^{
        self.manager.previewLayer.frame = self.bounds;
        [self setBackgroundColor:[UIColor blackColor]];
        [self.layer insertSublayer:self.manager.previewLayer atIndex:0];
    });

}

### Environment
- **Node.js version**: 6.8.0
- **React Native version**: 0.35
- **React Native platform + platform version**: iOS 9.3.5
### react-native-camera
Version: master

I think you should have to use orientation i.e
Values: Camera.constants.Orientation.auto or "auto" (default), Camera.constants.Orientation.landscapeLeft or "landscapeLeft", Camera.constants.Orientation.landscapeRight or "landscapeRight", Camera.constants.Orientation.portrait or "portrait", Camera.constants.Orientation.portraitUpsideDown or "portraitUpsideDown"

I haven't changed any of the values so it is set on the default (auto)  and as such should rotate with the rest of the app. It works sometimes but eventually locks up and freezes the app.

I have a stacktrace which may help:
java.lang.RuntimeException·getParameters failed (empty parameters)
Raw
Camera.java:-2android.hardware.Camera.native_getParameters
Camera.java:1996android.hardware.Camera.getParameters
RCTCamera.java:332com.lwansbrough.RCTCamera.RCTCamera.adjustPreviewLayout
RCTCamera.java:169com.lwansbrough.RCTCamera.RCTCamera.setActualDeviceOrientation
RCTCameraView.java:122com.lwansbrough.RCTCamera.RCTCameraView.setActualDeviceOrientation
RCTCameraView.java:16com.lwansbrough.RCTCamera.RCTCameraView.access$100
RCTCameraView.java:34com.lwansbrough.RCTCamera.RCTCameraView$1.onOrientationChanged
OrientationEventListener.java:403android.view.OrientationEventListener$SensorEventListenerImpl.onSensorChanged
SystemSensorManager.java:583android.hardware.SystemSensorManager$SensorEventQueue.dispatchSensorEvent
MessageQueue.java:-2android.os.MessageQueue.nativePollOnce
MessageQueue.java:323android.os.MessageQueue.next
Looper.java:143android.os.Looper.loop
ActivityThread.java:7229android.app.ActivityThread.main
Method.java:-2java.lang.reflect.Method.invoke
ZygoteInit.java:1230com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
ZygoteInit.java:1120com.android.internal.os.ZygoteInit.main

@johnryan Should I open a 2nd issue? I didn't see "ios" in the issue title. It's the exact same thing on Android - a deadlock when orientation flips.

Ah ok, could be related then, I assumed it was a native iOS issue

+1, was anybody able to solve this? this bug makes the component pretty much unusable.. thanks

Hello, this is still a common issue for us and reproducible. The fix of the forks above seems to help though. Is there a PR for this?

If there is no PR, I can create one if you want.

Send a pr please

See https://github.com/react-native-community/react-native-camera/pull/1194 :)

@sibelius or @jgfidelis, this issue can it is being closed?


Remote container default search paths

Environment data

Language Server version: Pylance language server 2021.6.3 (pyright e66600b2)
OS and version: macOS Big Sur 11.4
Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.6 64-bit Remote Containers 0.183.0

Expected behaviour
When installing requirements into the python environment in the remote container, the default search path for Pylance will pick it up and use it for source analysis.
Actual behaviour
Imports were not found even after pip install had run.
Logs
Code Snippet / Additional information
Adding this to the settings resolved the issue.  It would be good to see this as default behaviour, or at least offer it as a possibility in the quick fix text
"python.analysis.extraPaths": [
  "/home/vscode/.local/lib/*/site-packages/"
]

can you provide the logs from "Python Language Server" output window with trace enabled?
https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue
did you select the correct python interpreter or just using the default?

can you provide the logs from "Python Language Server" output window with trace enabled?
https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue

Will do so, I didn't think it would provide much, as it seems very clear that the combination of remote container forcing pip install into the user-local location was just resulting in the pips being installed in a location not scanned by pylanbce by default, as I thought was confirmed by the workaround of adding it manually.

did you select the correct python interpreter or just using the default?

Given I'm using the remote containers plugin to build a container in which to run python for this, it selects the correct python interpreter by default.  So yes, it is default, and it is also correct ;-)

Open window for python project.
Reopen in container.
Imports not found.
Open terminal (opens bash in remote container)

vscode ➜ /workspaces/es-logger (master ✗) $ pip install stevedore
Defaulting to user installation because normal site-packages is not writeable
Collecting stevedore
  Downloading stevedore-3.3.0-py3-none-any.whl (49 kB)
     |████████████████████████████████| 49 kB 594 kB/s
Collecting pbr!=2.1.0,>=2.0.0
  Downloading pbr-5.6.0-py2.py3-none-any.whl (111 kB)
     |████████████████████████████████| 111 kB 5.3 MB/s
Installing collected packages: pbr, stevedore
Successfully installed pbr-5.6.0 stevedore-3.3.0
vscode ➜ /workspaces/es-logger (master ✗) $

Imports still not resolved.
Add /home/vscode/.local/lib/*/site-packages/ to "python.analysis.extraPaths"
Imports now resolved.

Pylancelanguageser.log

Pylance doesn't support * in extraPaths. See: #973
You shouldn't need to put site-packages into extraPaths; are you activating the interpreter that those paths are tied to?

Pylance doesn't support * in extraPaths. See: #973

Hmmm, I'll take another look.

You shouldn't need to put site-packages into extraPaths; are you activating the interpreter that those paths are tied to?

This is all done automatically by the reopening in a container.  Prior to the switch to Pylance this just worked, which is very frustrating.
I'll take a look, I wonder is it just a delay in Pylance re-scanning.

I'd check the bottom left to see which interpreter is being used. This should have affected any analysis, as they all rely on knowing the interpreter to then get paths.

I'd check the bottom left to see which interpreter is being used. This should have affected any analysis, as they all rely on knowing the interpreter to then get paths.

Yes, I am looking at that.  The point about using a remote container, is that the container is built with a default python, and then that is supposed to be used for these dev tasks.  This is indeed happening, the terminal and the language server all appear to be executing using the default python in the container.  The problem is that the language server is not reacting when packages are installed.  Having removed the additional search path, and then retesting by reloading the window after a pip install of a missing module, I can confirm it is simply that pylance is never refreshing state when the pip freeze of the environment changes.

The problem is that the language server is not reacting when packages are installed. Having removed the additional search path, and then retesting by reloading the window after a pip install of a missing module, I can confirm it is simply that pylance is never refreshing state when new pip packages are installed.

Ah, that is a known bug, yes. See #923.
Note that there's a "restart language server" command you can use in the meantime to restart without fully reloading the editor.

Ah, that is a known bug, yes. See #923.
Note that there's a "restart language server" command you can use in the meantime to restart without fully reloading the editor.

Great, thanks for the fast attention.  I guess adding the extra path must have made the language server restart and given the appearance of working.
I’ll make sure to add the pip install into the container builds to avoid in future.  Thanks again!


[SelectableText] Add support for Changing style of selected text

Use case

I am trying to change the text style of the selected part of the text (SelectableText) to increase readability by changing the contrast of the colors. As you can see on the following image, the contrast between yellow and white is not pleasant to eye. I'd like to be able to change the white color to black only on the selected part of the text.

Proposal

Be able to change the text style of only the selected part of the text, like the following:

In the above image, the text was initially blue but it was changed to white when selected

Hi @bdlukaa, Thanks for filing the issue.  Recently flutter introduced a new Text Selection Theme used to specify the properties of selected text in TextField and SelectableText widgets.
ThemeData(
  textSelectionTheme: TextSelectionThemeData(
    cursorColor: Colors.red,
    selectionColor: Colors.green,
    selectionHandleColor: Colors.blue,
  )
)

Please refer this doc for more info: https://docs.google.com/document/d/1sCe7Y_lhREljtn6m0Uu_EycbS82zRvWnNtkfEwFX9W0/edit
This is also documented on the official docs https://docs.flutter.dev/release/breaking-changes/text-selection-theme

minimal code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData.dark(),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Theme(
        data: ThemeData(
            textSelectionTheme: const TextSelectionThemeData(
          cursorColor: Colors.red,
          selectionColor: Colors.green,
          selectionHandleColor: Colors.blue,
        )),
        child: ListView(
          children: const [
            SelectableText(
              'Hello World ! This is a test of the SelectableText widget. ',
              style: TextStyle(fontSize: 20, color: Colors.white),
            )
          ],
        ),
      ),
    );
  }
}

output

Closing as this is neither a bug nor a feature request.

@maheshmnj I still believe this is a valid request because there isn't a property to change the text style (mainy the color) of the selected text. The image above isn't what I said.
For example, the initial text color is white, but I want to change only the selected text color to black, like the following image:

Initially
After Selected

In the image above, the selected text color is white, but the rest of the color is like before.
Currently, there isn't a property to change the text style of only the selected text, only to change the background color, cursor color and the handles color.

@bdlukaa sorry I should have mentioned it the style property of SelectableText should be used to change the style of the text.
This is the snippet for the above code sample.
SelectableText(
              'Hello World ! This is a test of the SelectableText widget. ',
              style: TextStyle(fontSize: 20, color: Colors.red),
            )

@maheshmnj but there isn't a way to change the style of the selected part of the text. style on SelectableText changes the style whole text

Oh, I see gotcha, That looks like a valid feature request. Thanks for the clarification.
SelectableText should support changing the style of the selectedText, Currently SelectableText.style property applies to both   Selected and unselected Text.

Oh, I see gotcha, That looks like a valid feature request. Thanks for the clarification.
SelectableText should support changing the style of the selectedText, Currently SelectableText.style property applies to both   Selected and unselected Text.

CC @justinmc

/cc @chunhtai

Looks like, we can add something like selectionTextStyle to TextSelectionThemeData

+1
Which workaround could be made on this?

@reiko-dev You could work around this by overriding TextEditingController.buildTextSpan.
I agree with @chunhtai about the full solution: Add selectionTextStyle to TextSelectionThemeData, then modify TextEditingController.buildTextSpan to use that style for the selected part of the text.
CC @Renzo-Olivares @camsim99 I think you guys have both dealt with trying to merge TextSpan trees recently.  Do we have any easy generic way of doing that or does this need something custom separate from deltas and spell check?

CC @Renzo-Olivares @camsim99 I think you guys have both dealt with trying to merge TextSpan trees recently. Do we have any easy generic way of doing that or does this need something custom separate from deltas and spell check?

Yes, I currently am doing that for spell check, since text needs to be styled depending on whether or not it is misspelled. My solution for that is currently tied to spell check specific logic, but I would be interested in generalizing it to address this issue because it is certainly achievable and overall better practice!

@reiko-dev You could work around this by overriding TextEditingController.buildTextSpan.
I agree with @chunhtai about the full solution: Add selectionTextStyle to TextSelectionThemeData, then modify TextEditingController.buildTextSpan to use that style for the selected part of the text.
CC @Renzo-Olivares @camsim99 I think you guys have both dealt with trying to merge TextSpan trees recently. Do we have any easy generic way of doing that or does this need something custom separate from deltas and spell check?

Thanks @justinmc i'll try that

@justinmc I think right now because the composing region is not active when there is an active selection and vice versa, this may be a simple merge.
Is what we do for composingStyle.
    final TextStyle composingStyle = style?.merge(const TextStyle(decoration: TextDecoration.underline))
        ?? const TextStyle(decoration: TextDecoration.underline);
    return TextSpan(
      style: style,
      children: <TextSpan>[
        TextSpan(text: value.composing.textBefore(value.text)),
        TextSpan(
          style: composingStyle,
          text: value.composing.textInside(value.text),
        ),
        TextSpan(text: value.composing.textAfter(value.text)),
      ],
    );

For selectionStyle something similar can be done.
    final TextStyle selectedTextStyle = style?.merge(selectionTextStyle)
        ?? selectionTextStyle;

    return TextSpan(
      style: style,
      children: <TextSpan>[
        TextSpan(text: value.selection.textBefore(value.text)),
        TextSpan(
          style: composingStyle,
          text: value.selection.textInside(value.text),
        ),
        TextSpan(text: value.selection.textAfter(value.text)),
      ],
    );

With some case to do either merge depending on if the composing region is active or not.

any update guys?

Any updates on this?

Any updates on this?

@Renzo-Olivares @hangyujin Any possibility of changing selection style with your work on SelectionArea and SelectableText?

I support this. In a Text widget there is a property called "selectionColor" which doesn't even do anything because you can't select the text. In SelectableText widget however, there is no "selectionColor". Specifying the color in Theme.of(context).textSelectionTheme. selectionColor does not help in making it dynamic.
I think both of the following properties should be added to the SelectableText widget to allow dynamic and convenience changes:

Color? selectionColor
Color? selectedTextColor

@Vextrov you can make a Text widget selectable by wrapping it with a SelectionArea widget, then you can utilize the selectionColor property. WRT to SelectableText you can wrap it with a DefaultSelectionStyle widget and set the selectionColor that way. This is the color the selection highlight is painted in, which is different than the text style of the selected text that this issue is requesting to configure.
@justinmc I don't think we had any plans for this, but it sounds like a reasonable feature to add. Right now SelectionArea doesn't directly affect any of its Selectables TextStyles, that is up to the selectable widget itself at the moment.


Help text for tres_namf, tres_naml, tres_nams, & tres_namt

tres_namf #558
tres_naml #559
tres_nams #560
tres_namt #561

Excellent. I'm running around today but I'll try to get this in. Hit my
email with your mailing address to get your sticker.
On Sat, Aug 29, 2015, 6:06 PM Casey Miller<EMAIL_ADDRESS>wrote:

tres_namf #558
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/issues/558
tres_naml #559
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/issues/559
tres_nams #560
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/issues/560
tres_namt #561
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/issues/561
You can view, comment on, or merge this pull request online at:
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/pull/1006
Commit Summary

Help text for tres_namf, tres_naml, tres_nams, & tres_namt

File Changes

M calaccess_raw/models/campaign.py
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/pull/1006/files#diff-0
(33)

Patch Links:

https://github.com/california-civic-data-coalition/django-calaccess-raw-data/pull/1006.patch
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/pull/1006.diff
—
Reply to this email directly or view it on GitHub
https://github.com/california-civic-data-coalition/django-calaccess-raw-data/pull/1006
.


Wip/bewest/separate concerns

Build on @cjo20's work a bit, and cleaning things up a little.

$ oref0
  Usage:
oref0 <cmd>

Valid commands:
  oref0 env - print information about environment.
  oref0 pebble
  oref0 iftt-notify
  oref0 get-profile
  oref0 calculate-iob
  oref0 determine-basal
  oref0 help - this message


Documentation

Document all properties
Document all functions
Integrate iron-component-page to create a Polymer-styled documentation page.
Further documentation updates to the README.md file.
Separate CSS into a new file in order to ease local development.

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


rewrite and pass tests

I noticed data mixed with Map and List are not well handled. So I rewrote in a functional style to make it work. Thanks to the tests I fixed lots of bugs in my code.
Still some concerns I worried:

parseInt is not in code, so List.splice() is by now calling with Strings
I removed your TODO about withMutations, not sure if that matters
my code is in functional style, may have tail recursion problems before ES6

Well good news is my code passed the tests.

I added a new commit. Hope it fix these problems.

Looks good :+1:


Research if we can distribute the prebuilt .ipa/.app

Currently, we're building the iOS AutomatorServer (AutomatorServer/ios) at every patrol drive, which adds some overhead (usually a few up to 10-20 seconds). In the ideal case, we should get rid of this and just download prebuilt .ipa or .app (I always forget which one is for what).
To keep in mind:

simulator binaries need to be distributed as x86_64 and arm64e
physical iOS devices require the binary to be signed

Current problem: GitHub Actions don't support running macOS VMs on Apple Silicon, so we can only build x86_64 artifact for a simulator, which when run on a simulator on Apple Silicon mac, only shows black screen and/or crashes (just random, unpredictable behavior).

Idea
We could just distribute unsigned .app, and then tell our users to codesign it manually. If we give good instructions, it should be a quite painless process.
Maybe with a tool like codesign?

Appium apparently doesn't codesign their binaries:

https://github.com/appium/WebDriverAgent/blob/master/.github/workflows/publish.js.yml


v0.9.0: {{#get "tags" ...}} stopped returning url and count.posts

Issue Summary
This code worked well on the ghost v0.8.0:
{{#get "tags" limit="all" fields="name,url" include="count.posts" order="count.posts desc"}}
  {{#foreach tags}}

        {{name}}
        {{count.posts}}

  {{/foreach}}
{{/get}}

Now it returns only tag names. I've read the summary of valid fields, which seems to not include urls anymore, but url is still included in the list of attributes. Also, count.posts should work as explicitly mentioned in the corresponding section.
Technical details:

Ghost Version: 0.9.0
Node Version: 4.4.3
Database: sqlite

Hey @uqee Sorry to hear you're having trouble.
{{url}} is a separate template helper. Tag doesn't have a url field. So you can simplify this fields="name,url" to fields=name.
I can confirm there is a bug. The url template helper does no longer return the tag url, because this https://github.com/TryGhost/Ghost/blob/master/core/server/data/schema/checks.js#L6 is no longer true, because the api layer only returns the requested fields (in this case name).

Thanks for the reply @kirrg001 !
I confirm that {{url}} works if fields="name,slug,description,parent" is used. Okay, hopefully, it's not a huge overhead, but what about count.posts?

@uqee i can confirm there is another bug for count.posts. A quick fix for you is not defining fields at all, then you should receive the count.

Yep, seems to work fine. Thanks for your help!

The url for a tag page is based on the slug, so if you don't fetch that from the API, the url helper you are using cannot function.
It is also not possible to fetch any joined data if you restrict the data returned via fields. This is expected for now. Supplying fields is only for very particular cases where you really only need a limited set of data (e.g. our internal search in the admin panel).


typo causes failure

If you use the first sample *.yml, it will fail due to a typo in the version of lychee-action.

Oh, that's a little embarrassing. Thanks for fixing that @robertlugg. 🤗


Update ecosystem-app-monitoring-solutions.md

Corrected VMware product names.

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

@suzizuber
Thanks for approving the PR. For future PRs, please note that a #sign-off comment is the best way to signal to the review team that a PR is ready to merge.


WIP - do not merge - test rhatdan/storage@runroot

https://github.com/containers/storage/pull/467
Signed-off-by: Valentin Rothberg<EMAIL_ADDRESS>

Since the patch in storage was merged, closing this PR.


Weight changes

Lily did some nerfs today that need to be ported to this repository

These changes are called 1.75

This is currently being worked on by @LappySheep  and both the lib and the worker will be updated once it's ready.

#8 has been accepted. Sorry for the wait, was busy with exams.