Update style guide

Update style guide to promote the use of non-gendered pronouns ie the use of they in preference to him/her.

Sorted in https://github.com/pythoninchemistry/intro_python_chemists/commit/ec5d5256d48839048f6dcdedf5d7b2767963a802


[SPARK-32431][SQL] Check duplicate nested columns in read from in-built datasources

What changes were proposed in this pull request?
When spark.sql.caseSensitive is false (by default), check that there are not duplicate column names on the same level (top level or nested levels) in reading from in-built datasources Parquet, ORC, Avro and JSON. If such duplicate columns exist, throw the exception:
org.apache.spark.sql.AnalysisException: Found duplicate column(s) in the data schema:

Why are the changes needed?
To make handling of duplicate nested columns is similar to handling of duplicate top-level columns i. e. output the same error when spark.sql.caseSensitive is false:
org.apache.spark.sql.AnalysisException: Found duplicate column(s) in the data schema: `camelcase`

Checking of top-level duplicates was introduced by https://github.com/apache/spark/pull/17758.
Does this PR introduce any user-facing change?
Yes. For the example from SPARK-32431:
ORC:
java.io.IOException: Error reading file: file:/private/var/folders/p3/dfs6mf655d7fnjrsjvldh0tc0000gn/T/spark-c02c2f9a-0cdc-4859-94fc-b9c809ca58b1/part-00001-63e8c3f0-7131-4ec9-be02-30b3fdd276f4-c000.snappy.orc
	at org.apache.orc.impl.RecordReaderImpl.nextBatch(RecordReaderImpl.java:1329)
	at org.apache.orc.mapreduce.OrcMapreduceRecordReader.ensureBatch(OrcMapreduceRecordReader.java:78)
...
Caused by: java.io.EOFException: Read past end of RLE integer from compressed stream Stream for column 3 kind DATA position: 6 length: 6 range: 0 offset: 12 limit: 12 range 0 = 0 to 6 uncompressed: 3 to 3
	at org.apache.orc.impl.RunLengthIntegerReaderV2.readValues(RunLengthIntegerReaderV2.java:61)
	at org.apache.orc.impl.RunLengthIntegerReaderV2.next(RunLengthIntegerReaderV2.java:323)

JSON:
+------------+
|StructColumn|
+------------+
|        [,,]|
+------------+

Parquet:
+------------+
|StructColumn|
+------------+
|     [0,, 1]|
+------------+

Avro:
+------------+
|StructColumn|
+------------+
|        [,,]|
+------------+

After the changes, Parquet, ORC, JSON and Avro output the same error:
Found duplicate column(s) in the data schema: `camelcase`;
org.apache.spark.sql.AnalysisException: Found duplicate column(s) in the data schema: `camelcase`;
	at org.apache.spark.sql.util.SchemaUtils$.checkColumnNameDuplication(SchemaUtils.scala:112)
	at org.apache.spark.sql.util.SchemaUtils$.checkSchemaColumnNameDuplication(SchemaUtils.scala:51)
	at org.apache.spark.sql.util.SchemaUtils$.checkSchemaColumnNameDuplication(SchemaUtils.scala:67)

How was this patch tested?
Run modified test suites:
$ build/sbt "sql/test:testOnly org.apache.spark.sql.FileBasedDataSourceSuite"
$ build/sbt "avro/test:testOnly org.apache.spark.sql.avro.*"

and added new UT to SchemaUtilsSuite.

Test build #126539 has started for PR 29234 at commit cc971f4.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31159/
Test PASSed.

Test build #126539 has finished for PR 29234 at commit cc971f4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126539/
Test PASSed.

Test build #126654 has started for PR 29234 at commit d0764d2.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31275/
Test PASSed.

Test build #126654 has finished for PR 29234 at commit d0764d2.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126654/
Test FAILed.

Test build #126667 has started for PR 29234 at commit 8906732.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31288/
Test PASSed.

Test build #126667 has finished for PR 29234 at commit 8906732.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126667/
Test PASSed.

Test build #126701 has started for PR 29234 at commit e66b03c.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31323/
Test PASSed.

Test build #126701 has finished for PR 29234 at commit e66b03c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126701/
Test PASSed.

Test build #126726 has started for PR 29234 at commit bd03de5.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31349/
Test PASSed.

Test build #126726 has finished for PR 29234 at commit bd03de5.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
abstract class AvroSuite extends QueryTest with SharedSparkSession with NestedDataSourceSuiteBase
trait NestedDataSourceSuiteBase extends QueryTest with SharedSparkSession

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126726/
Test PASSed.

Test build #126765 has started for PR 29234 at commit ae7268c.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31388/
Test PASSed.

Test build #126769 has started for PR 29234 at commit 9d72467.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31391/
Test PASSed.

Test build #126765 has finished for PR 29234 at commit ae7268c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126765/
Test PASSed.

Test build #126769 has finished for PR 29234 at commit 9d72467.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126769/
Test PASSed.

Test build #126788 has started for PR 29234 at commit 918c77c.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/31410/
Test PASSed.

Test build #126788 has finished for PR 29234 at commit 918c77c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126788/
Test PASSed.

@HyukjinKwon @cloud-fan Could you review this PR.

thanks, merging to master!


Update to Phaser 2.4.8

First of all thanks for externs!
Could you update to fresh version of Phaser (2.4.8)?

No problem. I'll update when I get a moment.

Thanks a lot!


Fix broken links to Docker docs

Teamcity is blocked on these. It's a shame that the new versions of
the linked pages are more complicated than the old ones.

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/f049577e50178dcf4b407d5d66e4fd4ab5693438/


Support for textDocument/selectionRange API

I recently moved to VSCode from IntelliJ, mostly because of ElixirLS, one feature I really miss however is the intelligent extend/shrink selection of text. VSCode has an API available for language servers to use to achieve the same thing. The JSON extension can be used as an implementation example.
I would love to contribute to the extension by adding this feature if I could be pointed in the right direction? Or would adding this feature be a herculean task?

Hi :wave:,
The Language Server Protocol version of that is textDocument/selectionRange (docs are at https://microsoft.github.io/language-server-protocol/specification#textDocument_selectionRange, and original discussion was at https://github.com/Microsoft/language-server-protocol/issues/613)
We would gladly merge well-written support for selectionRange. I wouldn't call this feature herculean, but it is a sizeable amount of work. For the syntax analysis the textDocument/foldingRange PR https://github.com/elixir-lsp/elixir-ls/pull/492 would be useful to look at.
I transferred this to the elixir-ls repo since it fits better there (and re-named the title).

@aarongraham Are you currently working on this? If not, I'd be interested in picking it up (it's a feature I want!).
@axelson - are you still open to a PR on this if I can pull it together (an 'if', as I don't really have the elixir chops)?

Hey @crispinb, I am not currently working on this no, life changed for me in a way that I have very little free time for coding outside of work now. I spent a decent amount of time thinking about how to achieve this early last year though. First I tried using ElixirSense.Core.Normalized.Tokenizer.tokenize(), however quickly realized that just getting the tokens was not enough, for the feature to work properly you need access to the whole syntax tree, or at least you need to know which tokens 'surround' the current cursor, as you basically want to highlight tokens as you walk up the tree. I remember struggling a lot with trying to figure out exactly where (line and character) tokens ended, this might be easier now with some of the additions that landed in Elixir 1.13 or using Sourcerer.
As a side note I recently switched to Neovim and now use tree-sitter alongside ElixirLS. The incremental selection offered in nvim-treesitter works great, even better than it did in IntelliJ in my opinion, and has support for basically every language.
Good luck if you decide to have a go adding the feature, I'll definitely keep an eye out and be interested in seeing what you come up with.

Thanks @aarongraham  - if I was writing a standalone VSCode extension, I'd consider tree-sitter because the api looks nice. As it is, I guess it wouldn't be a good fit for elixir-ls because of the required binary. And in any case part of my motivation  is to deepen my Elixir understanding.
I spent a bit of time this week reading up on the Elixir AST and looking through some relevant codebases, and came to about the same conclusion - ie. that this is essentially an exercise in walking up the AST, with ElixirSense probably useful for filling in holes resulting from the AST's lossiness. Thanks for the Sourcerer pointer.

Selection ranges provider added in https://github.com/elixir-lsp/elixir-ls/pull/1060. This turned out to be pretty big one. I tried 3 different approaches to that in the last years and none was satisfactory. Trying several different approaches at once and combining results as in folding ranges provider turned ot to work reasonably well. I'm going to release it in v0.20


Add @recast-navigation/playcanvas package

Hey @isaac-mason just checking if you need anything more from me on this. Happy to jump in to help move things forward :D

Hey @marklundin, I think this branch is just about ready to merge and get out there!
It would be great if you could take a look at the standalone playcanvas example I added, as well as take a look at changes I made to @recast-navigation/playcanvas. I'm not deeply familiar with playcanvas so let me know if I should revert/amend any of the changes I made.
You can see the standalone playcanvas example I added here: https://github.com/isaac-mason/recast-navigation-js/pull/438/files#diff-6eb676771678639035973890d1cfb6f747c48365ce2f343f6500725f77be662a
The main changes I made to @recast-navigation/playcanvas are:

removing the need to pass a graphics device to the generator helpers eg pcToSoloNavMesh
moving common debug draw utils into the core library
prettier blast and small refactors


Force fullscreen presentation for flex tool modals

The new iOS 13 modal card style is awkward when presented from the flex window. Let's keep the presentation fullscreen which is the default for previous iOS versions.

What do you find awkward about it?
I think it's convenient to be able to dismiss FLEX without needing to go to the top of the navigation stack, and without needing to use a "Done" button on every single screen. I've also seen a few requests for being able to dismiss and reveal FLEX without "losing your place" so to speak; I think the card style could fit into this nicely. I was considering mimicking it on earlier versions of iOS even, but I would love to hear other ideas

There's a pushback/dim animation of the clear FLEXExplorerViewController which looks pretty off to me, but I'm fine to keep it for the utility.

Example of the animation:
https://gfycat.com/afraidrecentchimneyswift


Addresses in history display only near 6pm to 8pm

Hello,
Traccar3.2
I just install a new traccar server (because I thought that the old one had a problem, and don't find any way to resolve); but the problem is still persistent.
When I choose a device inside history, I only have the address display for about 2/3 hours beginning at near 6PM each day, and so no address near 8pm  !!!
I double-check the wrapper log; don't understand all ;(
Don't know what to do now.
Thanks.
Igor

What reverse geocoder provider are you using?

Hum, I don't know, I don't do any parameters than the install !

By default it's configured to use Google service which has a usage limit. You might be reaching that limit.

Ok, how/what can I do tu update this google service?
OR
What may I do on the devices parameters to lower this service ?

There is no full free service. There is either free Google service or you can host your own Nominatim or Gisgraphy.

I found hosting own Nominatim to be the best bet. Use CentOS (Its Easier)


Authentication example is doesn't work

Bug Report
Version
Clean Tonic pulled from github master branch, at commit 4e0d2fc.
Platform
WSL 1 on WIndows 10. (4.4.0-19041-Microsoft #488-Microsoft x86_64 GNU/Linux)
Crates
Tonic itself, although I think it might be because Tower has changed.
Description
I tried
cd examples
 cargo run --bin authentication-client

And it crashes:
thread 'main' panicked at 'buffer full; poll_ready must be called first', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tower-0.4.8/src/buffer/service.rs:146:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Thanks for noticing!
I did some digging and this is most likely because we don't propagate backpressure here, which leads to the client pancking since it contains a tower::buffer::Buffer. The fix is the replace that line with self.inner.poll_ready(cx). I'll do that this week unless someone snatches it.


Update docker images and documentation to not use nvidia-docker by default.

nvidia-docker is not used anymore by the nvidia-docker project.  Rather nvidia-docker2 should be used:
$ docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi

@caisq, could you please look into updating our examples?

dupe of #14714

It has been 14 days with no activity and this issue has an assignee.Please update the label and/or status accordingly.

Nagging Assignee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 178 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 193 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 208 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 223 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 238 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 253 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 268 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 283 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @caisq: It has been 298 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

This issue has been fixed.


Make mouse scroll change FOV (zoom) instead of moving camera "lookat"

It would be nice to have a setting to make mouse scroll events change the FOV (what "zoom" actually should mean) instead of moving camera "lookat" point along the camera axis.
My major issue with current behavior is that the camera "lookat" point is used as a pivot point around which camera rotations are made, thus moving it makes rotations decenter the camera making looking around a plot harder.

That's a good point! Maybe we should just change that ;)
If you want to get your hands dirty, it should be very easy to change from setting the position, to setting cam.fov in here: https://github.com/JuliaPlots/AbstractPlotting.jl/blob/master/src/camera/camera3d.jl#L235

Thanks @SimonDanisch , actually by looking into what you pointed me I discovered I could use AbstractPlotting.cam3d_cad!(scene) to get an effect that can be used instead of FOV change: move the camera closer or farther to the "lookat", but keeping that "lookat".

To follow up on @cdsousa's point, you can currently make this work by updating the type of camera used in the scene by calling AbstractPlotting.cam3d_cad!(scene) after creating the scene.
Reading a bit more, it looks like there's some way to specify the camera type when constructing the scene? I couldn't quite figure it out though.
(For what it's worth, i also found the current "turntable" style camera quite surprising for mesh(). Would it make sense to just change the default camera type for mesh(), specifically?)


Returned ServiceFactory objects are not checked for validity

When the framework creates a service object via a service factory, the returned service object is only checked to be non-null and non-empty. It is not checked if the returned interface map contains interface pointers for all registered object classes.

I do not think this is a valid issue. I found the following code in ServiceReferenceBasePrivate::GetServiceFromFactory
for (auto clazz : classes) {
      if (smap->find(clazz) == smap->end() &&
          clazz != "org.cppmicroservices.factory") {
        std::string message(
          "ServiceFactory produced an object that did not implement: " + clazz);
        registration->bundle->coreCtx->listeners.SendFrameworkEvent(
          FrameworkEvent(
            FrameworkEvent::Type::FRAMEWORK_WARNING,
            MakeBundle(bundle->shared_from_this()),
            message,
            std::make_exception_ptr(std::logic_error(message.c_str()))));
        return nullptr;
      }
    }

I will write up a test case to verify.

confirmed this issue is invalid with the following test
TEST(ServiceFactoryTest, TestWithInvalidReturnValue)
{
FrameworkFactory factory;
auto framework = factory.NewFramework();
framework.Start();
auto context = framework.GetBundleContext();
auto sf = std::make_shared();
EXPECT_CALL(*sf, GetService(testing::, testing::)).Times(testing::AtLeast(1)).WillRepeatedly(testing::Invoke([](const Bundle & bundle, const ServiceRegistrationBase & reg) {
// return an InterfaceMap with insufficient interfaces
std::shared_ptr implPtr = std::make_shared();
return MakeInterfaceMap(implPtr);
}));
EXPECT_CALL(*sf, UngetService(testing::, testing::, testing::_)).Times(0);
ServiceRegistration<ITestServiceA, ITestServiceB> reg1 =
context.RegisterService<ITestServiceA, ITestServiceB>(ToFactory(sf), { { Constants::SERVICE_SCOPE, Any(Constants::SCOPE_PROTOTYPE) } });
auto sref1 = context.GetServiceReference();
ASSERT_TRUE((bool)sref1);
FrameworkEvent lastEvent;
context.AddFrameworkListener([&lastEvent](const cppmicroservices::FrameworkEvent& evt) {
lastEvent = evt;
});
ASSERT_EQ(context.GetService(sref1), nullptr);
ASSERT_EQ(lastEvent.GetType(), FrameworkEvent::FRAMEWORK_WARNING);
auto sref2 = context.GetServiceReference();
ASSERT_TRUE((bool)sref2);
ASSERT_EQ(context.GetService(sref2), nullptr);
ASSERT_EQ(lastEvent.GetType(), FrameworkEvent::FRAMEWORK_WARNING);
}
I can't add the testpoint as I wrote it because it depends on googlemock which is not in the "thirdparty" folder.
Closing this issue with 2 new issues created

issue#327 - Add GoogleMock to the "thirdparty" folder
issue#328Add a test point to validate the return value from ServiceFactory::GetService call


Add sort of Pop-up Window to the Script Editor for showing Documentation about functions and classes when writing

i think The Script Editor should take his share after all this years and updates,
making documentation on seperated screen is something take you back to the 90s
where u should have your books near to you to Start fliping pages(Scrolling in Godot Case)
the first time i started my journey on the Script Editor in Godot after years of Android Devlopment With Android Studio,
it felt almost BLIND
consider add some type of Pop-up Window near to the Auto-Completion Pop-up Window when scripting, where it can be shown when user pressed a Short-Cut(Ctrl+Q in Android Studio case) Containig Selected Method or Class Documentation instead of making it in seperated Screen
I Believe it Gonna Increase the Progress and the Productivity of Godot Users
also it gonna make WAY MORE EASY for BEGINNERS
from Android Studio :

Screencast from 2023-05-14 18-16-40.webm

Duplicate of https://github.com/godotengine/godot-proposals/issues/1393.


Feature/add sprite loop and frame delay

hi @jnthas i added ability to have each sprite have its own frame delay and loop delay. let me know what you think.
no rush to review or merge, i just wanna let you know i was able to add it. im running my updates on my own fork. thanks
frame delay: delay time in ms for frame animation
loop delay: delay time in ms before starting the animation again.
delay: if no frame delay or loop delay is specified, then this is the default value
here is a sample json and video.
https://github.com/jnthas/cw-cf-0x07/assets/10041871/48977168-95ce-42c8-b0e1-e6f1a27c5c2c
mario-1.json

That's cool. This will improve a lot the theme dynamic. I will review in a couple of weeks. Sorry, I'm on vacation didn't bring the laptop with me.

That's cool. This will improve a lot the theme dynamic. I will review in a couple of weeks. Sorry, I'm on vacation didn't bring the laptop with me.

btw, here are some of my custom clockfaces, feel free to use them if you want: https://github.com/robegamesios/clock-club/tree/main/shared
yeah no rush, enjoy your vacay!


docs(rate-limiting-advanced) disallow cluster strategy in DB-less or …

Summary

In DB-less and hybrid modes, the cluster config strategy is not supported. From <IP_ADDRESS> onwards, Kong disallows the plugin enablement if cluster strategy is set with DB-less or hybrid mode.
Reason

Provide detailed doc.
Ticket

FTI-4154

I moved your branch to point to Gateway 3.0.


[RFC] Search Relevancy - from A Schema Perspective

Search Relevancy - A Schema Perspective
This document will present the key concepts of the following concerns:

Gain understanding for leading industry search relevancy patterns
Review and understand how Google's modern search engine utilizes schema to optimize search
Discuss the required building blocks for search relevancy framework

Introduction
Once reviewing the world's most popular and industry leading search engine that is a part of our every day activities - Google Search Engine, Its apparent that the search is being conducted with many additional notions in addition to the basic 'phrase' one is querying for.
Let us review these notions to get a better understanding of how google enables its search to be both relevant an accurate:
Entities
Google describes an entity, or named entity, as a single, well-defined thing or concept. Google Search works in three stages, and not all pages make it through each stage.

Crawling: Google downloads text, images, and videos from pages it found on the internet with automated programs called crawlers.
Indexing: Google analyzes the text, images, and video files on the page, and stores the information in the Google index, which is a large database.
Serving search results: When a user searches on Google, Google returns information that's relevant to the user's query.

When a user enters a query, google search the index for matching pages and return the results that are the highest quality and most relevant to the user.
Relevancy is determined by hundreds of factors, which could include information such as the user's location, language, and device (desktop or phone).
For example:
_searching for "bicycle repair shops" would show different results to a user in Paris than it would to a user in Hong Kong._

Entities compose our everyday world and also our spoken language. We talk about entities and think in terms of things and entities. To reflect this google (and many other companies) have turned to seek assistance from the knowledge base domain.
Common Entities
One of the core mechanisms they will use is entity recognition. If google understands that a query contains the same entities as another they have seen before with little in the way of qualifiers, then that would be an indication that the result sets may be identical or highly similar.
Standardization of the domain knowledge
- https://schema.org/docs/schemas.html
Schema.org is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond.
Schema.org vocabulary can be used with many different encodings, these vocabularies cover entities, relationships between entities and actions. It can easily be extended through a well-documented extension model. Over 10 million sites use Schema.org to markup their web pages and email messages.
Many applications from Google, Microsoft, Pinterest, Yandex and others already use these vocabularies to power rich, extensible experiences.
Schema.org was founded by Google, Microsoft, Yahoo and Yandex, Schema.org vocabularies are developed by an open community process
Schema.org is defined as two hierarchies:

One for textual property values
One for the things that they describe.

The main schema.org hierarchy is a collection of types (or "classes"), each of which has one or more parent types.
- https://www.wikidata.org/wiki/Wikidata:Database_reports/EntitySchema_directory
Wikidata is a free and open knowledge base that can be read and edited by both humans and machines.
Wikidata acts as central storage for the structured data of its Wikimedia sister projects including Wikipedia, Wikivoyage, Wiktionary, Wikisource, and others.
The focus of Wikidata is structured data. Structured data refers to data that has been organized and is stored in a defined way, often with the intention to encode meaning and preserve the relationships between different data points within a dataset.
The Wikidata repository consists mainly of items, each one having a label, a description and any number of aliases. Statements describe detailed characteristics of an Item and consist of a property and a value.
RankBrain -
RankBrain is a system developed by Google - by which Google can better understand the likely user intent of a search query.
It was rolled out in the spring of 2015.
RankBrain, at its core, can be thought of as a pre-screening system. When a query is entered into Google, the search algorithm matches the query against your intent in an effort to surface the best content, in the best format(s).
Depending on the keyword, RankBrain will increase or decrease the importance of backlinks, content freshness, content length, domain authority etc.
Then, it looks at how Google searchers interact with the new search results. If users like the new algorithm better, it stays. If not, RankBrain rolls back the old algorithm.
Before RankBrain, Google would scan pages to see if they contained the exact keyword someone searched for.
Because these keywords were sometimes brand new, Google had no clue what the searcher actually wanted. So they guessed.
For example, let’s say you searched for “the grey console developed by Sony”. Google would look for pages that contained the terms “grey”, “console”, “developed” and “Sony” it would often not result in the anticipated manner the customer was intending to.
RankBrain workd By matching never-before-seen keywords to keywords that Google HAS seen before.
For example, Google RankBrain may have noticed that lots of people search for “grey console developed by Nintendo”.
And they’ve learned that people who search for “grey console developed by Nintendo” want to see a set of results about gaming consoles.
So when someone searches for “the grey console developed by Sony”, RankBrain brings up similar results to the keyword it already knows (“grey console developed by Nintendo”).
So it shows results about consoles. In this case, the PlayStation.
Ranking Search Results Based on Entity Metrics
Ranking Search Results Based On Entity Metrics is the title of a Google patent they were granted in 2015.
According to the patent, the ranking of entities for search involves considering Few factors:

Relatedness:  Relatedness is determined based on the co-occurrence entities. In practice - if two entities are referenced frequently on the web (for example, “Donald Trump” and “President”) you get something like: president of the united states...
This is due to the fact that they exist frequently enough together and on authoritative enough properties to return as a single result.

This same process connects other entities with the term when we pluralize it: 'presidents of the united states'.
Each of these people is an entity. These entities are associated with the entity “President” and thus, when the query is plural– we see all of them at once.
Google uses metric in the next fashion: the more valuable an entity is (determined by things including links, reviews, mentions, and relevance), the lower the value of the category or topic it’s competing in, the higher its notability - it is similar to the TF/IDF concept.

Contribution. Contribution is determined by external signals (e.g., links, reviews) and is basically a measure of an entity’s contribution to a topic. A review from a well-established and respected food critic would add to this metric more than Dave’s rant on Yelp about the price because their entity contribution in the space is higher.

Prizes. The prize metric is exactly what it sounds like, a measure of the various relevant prizes an (Person for that matter) entity has received. These could be a Nobel Prize, an Oscar, or a U.S. Search Award. The type of prize determines its weight and the larger the prize the higher the value attached to the entity in question.

For Example : lets assume a search  for [best actresses].
Google will run the query through these process in this order:

Determine the relatedness of other entities and assign values.
Determine the notability of those entities and assign a value to each.
Determine the contribution metrics of these entities and assign a value.
Determine any prizes awarded to the entities and assign a value.
Determine the applicable weights each should have based on the query type
Determine a final score for each possible entity.

This chain of evaluations allow for a composite scoring system to give accurate results for a large variety of use-cases.
Question Answering Using Entity References in Unstructured Data
Since it's equally important to have a capability to do a relevant and accurate search in an unstructured data as-well, google used the following techniques to address that:

In a document containing unstructured content - an entity extraction process is taking place to predict the assumed structures in that specific data.
Each extracted entity is assigned a unique identifier. Determining the most likely entity being requested by a searcher can be completed by establishing which entity appears the most times in the top K results.
Consult with an Entity database that helps saving process time for top results each time a query is run. That database exists for storing entities and their relations.
Entities are ranked by a quality score that may include freshness, previous selections by users, incoming links, and possibly outgoing links.

When a query for an entity is conducted, the relevance of other entities is determined for the result .

Context inference - for multiple entities with the same name. For example, there is Philadelphia the city, the cream cheese, and the movie. If asking a “where” question its referring to the city, “who acted in” would be the movie, and “what’s goes good with” would be the food.

With these techniques, Google’s capabilities around learning about entities and their relationships becomes significantly stronger.
Related Entities
The 'entities database' also stores relationships for each entity. These relationships are weighted according to some formula according to former search requests and their commonality in the data itself.
These entities/relations concept allow for:

The ability to calculate the probability of meeting the user’s likely intent with far greater accuracy.
The ability to predict and evolve an entity over time using past knowledge and well-defined schematic structures.

Google's 'entities database' AKA Knowledge-Graph is actually a massive database of public information, it collects information considered public domain and the properties of each entity (people with birthdays, siblings, parents, occupations, etc.).
Using the Entity Category association
Determining the categories a query belongs with may include generating a score based on:

Whether the query includes terms associated with the category
How of the entities inside the query, associate with the category.

When calculating the correct search categories which best describe the search intention, a scoring metrics must be selected and revised according to search results feedback.
Once categories are selected - the centroid of that category can be used as reference for inferring entities and links that may be relevant for the results.
Semantic Search
BERT
In 2019 BERT (Bidirectional Encoder Representations from Transformers) was introduced by Google. This AI engine focuses on further understanding intent and conversation search context.
BERT allows users to more easily find valuable and accurate information. Semantic search has also evolved in large part to the rise of voice search.
--- TODO --- add relevant references for usage of BERT

Basic Building Block for Better search results
In Opensearch we are in a constant effort to improve the relevancy and accuracy of the search results.
It is especially important due to the fact that a vast amount of the engine's users are storing unstructured data for a variety of domains & use-cases.
Our goal is to allow each and every search to be the closest to the customer's intent - and doing so will require to address the concepts mentioned in this paper.

Support and Maintain a high Level Schema Structure
A modern search engine must be capable of maintaining the customer's (domain-related) schema structure. It makes no difference if the data was un-structured to begin with - Everyone expects the search result to be the most relevant.
Steps for Adding Schema related search relevancy capabilities:

Adding the Simple Schema to opensearch will allow explicitly preserving the customer's domain knowledge. It will be also very valuable if during the data ingestion phase - the engine can already perform some structure related tasks.

Enable code / template / Index generation from the Domain Specific Schema - this will allow additional explicit capability for customers to write domain related code that will help them develop their applications seamlessly

Using the industry standard GraphQL API and SDL will grant our users to easily integrate with many open-source GraphQL compliant tools and simplify development process.

Using a schema allows developers to build the ingestion process using domain related vocabulary and easily define business rules with their language of choice.

PPL and SQL language used today in opensearch will significantly use the schematic knowledge of the data to simplify the construction and validation of queries.

Creating a Domain Knowledge Graph containing the relationships between the domain entities will allow calculation of score that is based on the schema relationships that appear in the search.

represent the schema with the entities and the relationships inside a unified logical layer that can be queried and  evolve according to how the data/business evolves
allow constructions of ready-made reports and dashboards that are purely described using the business vocabulary.
simplify machine learning graph based techniques to organize the unstructured data and give better search predictions based on relations and entities.

Explainability -  In recent years, AI has increasingly found its way from research labs into applications: from the recommendation systems used by online retailers to image recognition on social networks, and mainly the recently discussed search engine.

As we work with AI and rely on AI for more and more decision-making processes that influence our daily actions, issues around user understanding of such processes have garnered attention.
One of our main goals at opensearch is for the search engineers and customers to understand and trust the search algorithm ( which has AI incorporated inside) - increasing user satisfaction and enabling transparency of AI related decision-making.
We believe that search explainability is a first class citizen that deserves our full attention. Every search should have a clear and concise way of explaining itself to the user (whether its a search engineer or a customer).
This is why our goal will be the integration of the explainability notion to every part and section in the search engine's decision making steps.
It equally important to understanding how/why search results came for a given query in addition to the actual results evaluation .

Closing this issue - this is a proposal that will be realized in the simple schema repository https://github.com/opensearch-project/simple-schema


S390x support in farmhash

We had raised an issue in google/farmhash master earlier for big endian. However due to restructuring in the code via latest commits, the support for s390x needs to be explicitly added.
 filename: farmhash/src/farmhash.h
#endif
- #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+ #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__s390x__)
 #include <sys/endian.h>

Fixed. Thanks!


sap cp xsuaa integration (draft)

Notes:
The following solution will use the AppRouter as the single entry point for all emobility modules (dashboard, rest server, etc.).
All calls from the web app (dashboard) to the rest server will pass via AppRouter.
This reason of this approach is because we haven't succeeded to use 2 passports in the AuthService.ts class. If we find a way to do that, we can discuss about using direct calls to the rest server (but what about cross origin then?).
(see Visio diagram in archi folder)
Other ideas:

maintain the ev-server using always the emobility token but in a different header than "Authorization". Have an intermediate processing in AppRouter side, during the login phase, to login using a technical user but transfer in the payload the user id which logged in via xsuaa in the web app. This call will return the emobility token of the end user back. Subsequent calls to the rest server will be made directly from the webapp using the emobility token in custom header. This solution implies using technical user/pass in 2 env vars in the approuter deployed app.
investigate using 2 passports in ev-server
Question: is the cross origin protection activated ?
Question: is the csrf protection activated ?

Other details:

added new AdvancedConfiguration.ts to provide a parameter to clearly distinguish between built-in login and xsuaa login (this will enable us to hide the classical login route "/login")
because of AppRouter, the rest server will receive the header "Authorization: " which will be validated in AuthService. In addition the web app (which will store the emobility token in its local storage) will send the emobility token in a second header named "emobilitytoken".
the principle of xsuaa is to hide the jwt token from the browser application. The web application will only receive a JSESSIONID which the browser will send to the approuter and the approuter will inject the Authorization:
when the web app is launched, it will check if it has a emobility token in its local storage. If not, it will go to the "login" web page and make an automatic call to "/loginxsuaa" server route. The server will send back the emobility token.
for the subsequent calls, the web app will send the emobility token in the special header, and the server will read it and use it.
must discuss about the end-user onboarding process. For the moment, during login xsuaa, if the user is not found in the database, he will get a error (user not found).

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Calin Crecea seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@mocotrah Maybe I'm wrong but every dev for the SAP standard should be done in the SAP internal repository, right?
Let me know.

Since we have driven the SSO integration with SAP IdP, I've asked @mocotrah to push the code here for review to ensure it's done in a pluggable fashion for usage in different landscape and different IdPs.

If it's to do IDP integration in a world wide standard way, that's ok otherwise NO.
And this is not prio for the time being (none of our customer requested it yet I think.)

ok I have an idea, I can detect the presence of xsuaa service. I'll take a look and get back to you.

Since we have driven the SSO integration with SAP IdP, I've asked @mocotrah to push the code here for review to ensure it's done in a pluggable fashion for usage in different landscape and different IdPs.

If it's to do IDP integration in a world wide standard way, that's ok otherwise NO.
And this is not prio for the time being (none of our customer requested it yet I think.)

The authentification mechanism can differ (SAML, Oauth, ...), but in the end we get a token (JWT most of the time) and the code to deal with it shall be generic given a small part that might be needed to cope with IdP specificity.


Improve documentation.

I am Japanese and I am using DeepL to create documents while translating, so if there is any wrong English, I would like to fix it.
I would also like to correct any other information that should be added to the document or if there is a better way to write it.

I would love to improve your documentation, just let me know which docs you would want me to look at

Thanks for the comment!
Please take a look at the README.md in this repository for easy usage instructions.
By the way, I've published the great demo page you fixed on GitHub Pages.
I've created issue #6 and would like to add a documentation page to the demo page. I'd love to hear your ideas if you'd like to share them.

Hi Yuki!
I think the README.md have been updated and is quite decent now. Would you like me to add the same to the demo page? I should be able to implement a navbar with a documentation page on the demo site.

Hi Rupsnigdha!
Thanks for replying. I'm glad.
I think Readme.md is pretty decent too.
You're right, I want to add the same stuff to the demo screen.
I'd like to add the same thing to the demo screen, because I think it would be more user-friendly to be able to refer to the documentation directly on the demo site.


⚠ Tachidesk Server has degraded performance

In a6d5786, Tachidesk Server (https://tachidesk.culturecloud.gq) experienced degraded performance:

HTTP code: 525
Response time: 22841 ms

Resolved: Tachidesk Server performance has improved in 327d7b1.


WINDOWS_INSERT_DEF does not behave as documented

scons-users thread: https://pairlist4.pair.net/pipermail/scons-users/2021-July/008576.html
The manpage (using generated file from original SCons/Tool/mslink.xml) makes this claim:

When this is set to true, a library build of a Windows shared library (.dll file) will also build a corresponding .def file at the same time, if a .def file is not already listed as a build target. The default is 0 (do not build a .def file).

but there is no indication that code actually intended to build the module-definition file. Instead if the construction var evaluases true, a .def filename is generated from the library name, and added to the source list.  A different routine looks for a .def file in the source list and turns it into the appropriate commandline option.
Tagging this as a documentation problem as there doesn't look like there was ever any intent to try to generate the file, just to include it. Reviewers may of course feel free to disagree.

For reference, this ithe cmake feature that tries to generate the file, that would clearly require significant development work: https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html

So cmake uses an external executable to extract this info from the object files.
Source here: https://github.com/Kitware/CMake/blob/209daa20b2bd2ee2a76e70af58e895647f7e284f/Source/bindexplib.cxx
Whose logic was originally copied from cern root..
  provided by the CERN ROOT Data Analysis Framework project (root.cern.ch).
  Permission has been granted by Pere Mato<EMAIL_ADDRESS>to distribute
  this derived work under the CMake license.```

Dp we want to track a feature request to generate the .def file (I'm inclined to say no)?


Network issues since 1.4.12-1

Description
I have a server running Debian Buster. I have two (Docker) containers. First is an nginx container which accepts connections via port 465. Second calls on the command line openssl s_client -connect example.com:465 (where example.com is the domain or IP pointing to the server). The openssl command runs into a timeout.
The issue only occurs if both containers run on the same host. If I run the openssl command on the host itself, it works. If I run the openssl command inside a container on a different server, I can also connect to the nginx container properly.
Steps to reproduce the issue

Start a container which accepts connections on port 465
Start a debian container and bash into it
Run openssl s_client -connect example.com:465 inside the debian container (where example.com is the domain name or IP of your server running both containers)

Describe the results you received and expected
I expect the proper output from openssl.
What version of containerd are you using?
1.4.13
Any other relevant information
The issue occurs for version 1.4.13-1 and 1.4.12-1. When I downgrade to 1.4.11-1, it works as expected.
Show configuration if it is related to CRI plugin.
No response

You should open an issue in https://github.com/moby/moby as containerd has no network functionality by default. I don't see any commands listed above but the version numbers and the mentions of Docker provide the assumption you are using the Docker client+engine, which is the codebase providing you networking capabilities built on top of containerd (and runc).
The changelog of a small handful of commits for 1.4.12 are all changes in code not even used by Docker (Docker has its own pull logic/implementation) so it's difficult to come up with a reason why the containerd version matters here.

Thanks for your reply. I have the following packages installed:

docker-ce: 5:20.10.12~3-0~debian-buster
docker-ce-cli: 5:20.10.12~3-0~debian-buster
containerd.io: 1.4.11-1

I cannot say if it is really a network error. I might be on a false track here. I don't know the internals of containerd.io. But as soon as I upgrade to a higher version of containerd.io, I get the described error. So I assumed the issue is inside this package.

What version of runc is in each containerd.io package?

There is no update for a long time. I am going to close it. Please feel free to reopen it. Thanks


Keybase menu covered up by web inspector

I clicked on the Keybase menu extra (OS X) and half of it was covered up by the web inspector. I had to quit and relaunch Keybase to fix it.

Keybase GUI Version: 1.0.16-20160715110019+f0caa34

Also an issue in Version 1.0.16-20160803190018+268b023 (Mac OS X 10..11.6)


TypeError: Cannot read properties of undefined (reading 'insertErrors') thrown when processing errors

Is this a client library issue or a product issue?
A client library issue.

Did someone already solve this?
No.

Do you have a support contract?
No.

Environment details

OS: Ubuntu
Node.js version: 18.17.1
npm version: 9.6.7
@google-cloud/bigquery version: 7.2.0

Steps to reproduce

Use createInputStream to create an input stream.
Send rows through the stream until an TypeError: Cannot read properties of undefined (reading 'insertErrors') occurs.

Do you have some scenario that this happens ? Would be nice to add some tests to the  PR #1273

I didn't dig into it too much to be honest. It seems to happen the most when we have multiple services all inserting to the same table at the same time and is hard to reproduce from just a single machine.

Here is the stack trace that we see in the logs:
TypeError: Cannot read properties of undefined (reading 'insertErrors')
    at /usr/src/app/node_modules/@google-cloud/bigquery/build/src/rowQueue.js:121:43
    at onAuthenticated (/usr/src/app/node_modules/@google-cloud/common/build/src/util.js:396:25)
    at prepareRequest (/usr/src/app/node_modules/@google-cloud/common/build/src/util.js:452:28)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

I also see: request to https://www.googleapis.com/oauth2/v4/token failed, reason: Client network socket disconnected before secure TLS connection was established on nearby lines, so maybe that's the root error that fails to provide a resp object as expected?


Schema attribute

We've discussed the schema attribute, and determined that it is less than necessary, but I think we should revisit the topic, as it may actually end up being handy.

no longer in consideration


insomnia: 5.14.9 -> 5.15.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/insomnia/versions.
These checks were done:

built on NixOS
Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
found 5.15.0 with grep in /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0
directory tree listing: https://gist.github.com/cb32b3e7392a6724e0a30657b52b3f26

cc @markus1189 for review

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: insomnia
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

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

No attempt on aarch64-linux (full log)
The following builds were skipped because they don't evaluate on aarch64-linux: insomnia
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

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

Success on x86_64-linux (full log)
Attempted: insomnia
Partial log (click to expand)
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0
shrinking /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0/share/insomnia/insomnia
shrinking /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0/lib/libffmpeg.so
shrinking /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0/lib/libnode.so
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0/lib  /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0/bin
patching script interpreter paths in /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0
checking for references to /tmp/nix-build-insomnia-5.15.0.drv-0 in /nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0...
/nix/store/x52qaj81hs0q30360p9cr4zp0wq1cjcp-insomnia-5.15.0

LGTM


How to close the agent without closing the application

I want to close the agent without closing the application. I have tried to close all the bootservices so that it would not create spans and send segments. But the agent still intercepts the classes. So what should I do to close the agent without closing the application.

You can't. That is the JVM requirement.


Improve Dutch spelling

Fixes some typo's and other mistakes in the prompts for the Dutch language.

@alexkramer98 Thanks for the improvements! What do you think of the feedback?

Hi @frenck and @synesthesiam, thanks for the review.
I commited all the requested changes, except for one, about which I replied to @frenck's suggestion.


fixes issue 56

(https://github.com/SeriousM/WPFLocalizationExtension/issues/56)

prevents lock on Dispatcher when accessing CurrentCulture from Background-Thread

thanks!

How should I provide the demo to reproduce these issues?

Using https://gist.github.com or other online storage services.

Ok, here you go: https://drive.google.com/open?id=0B5ILrljVcMRhUlNnYmN6WVFPdjQ
The zip contains a simple solution with a commandline app showing up both issues. I hope you may be able to build some unit tests from this.


Deactivate does not get called on push

Steps to Reproduce

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

main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(App());
}

class App extends StatefulWidget {
  const App({Key key}) : super(key: key);

  @override
  AppState createState() => AppState();
}

class AppState extends State<App> {
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'App',
      initialRoute: A.routeName,
      onUnknownRoute: (RouteSettings settings) {
        return _buildNotFoundSceneRoute(settings);
      },
      onGenerateRoute: (RouteSettings settings) {
        switch (settings.name) {
          case A.routeName:
            return MaterialPageRoute(
              builder: (BuildContext context) {
                return SafeArea(
                  child: Container(
                    child: A(),
                    color: Colors.white,
                  ),
                );
              },
              settings: RouteSettings(name: A.routeName),
            );
          case B.routeName:
            return MaterialPageRoute(
              builder: (BuildContext context) {
                return SafeArea(
                  child: Container(
                    child: B(),
                    color: Colors.white,
                  ),
                );
              },
              settings: RouteSettings(name: B.routeName),
            );
          default:
            return _buildNotFoundSceneRoute(settings);
        }
      },
    );
  }

  PageRoute _buildNotFoundSceneRoute(RouteSettings settings) {
    return MaterialPageRoute(
      builder: (BuildContext context) {
        return SafeArea(
          top: false,
          bottom: false,
          child: Material(
            type: MaterialType.card,
            child: Center(
              child: Text(
                'Content not found: ${settings.name}',
                style: TextStyle(
                  fontFamily: 'Sensation',
                  fontSize: 18.0,
                  decoration: TextDecoration.none,
                  color: Colors.red,
                ),
              ),
            ),
          ),
        );
      },
      settings: RouteSettings(name: '/not-found'),
    );
  }
}

class A extends StatefulWidget {
  static const String routeName = '/';

  @override
  _AState createState() => _AState();
}

class _AState extends State<A> {
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        RaisedButton(
          child: Text('Push B on A'),
          onPressed: () {
            Navigator.of(context).pushNamed(B.routeName);
          },
        ),
        RaisedButton(
          child: Text('Replace A with B'),
          onPressed: () {
            Navigator.of(context).pushReplacementNamed(B.routeName);
          },
        ),
        if (ModalRoute.of(context).canPop)
          RaisedButton(
            child: Text('Back to B'),
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
      ],
    );
  }

  @override
  void deactivate() {
    print('A deactivated');
    super.deactivate();
  }

  @override
  void dispose() {
    print('A disposed');
    super.dispose();
  }
}

class B extends StatefulWidget {
  static const String routeName = '/b';

  @override
  _BState createState() => _BState();
}

class _BState extends State<B> {
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        RaisedButton(
          child: Text('Push A on B'),
          onPressed: () {
            Navigator.of(context).pushNamed(A.routeName);
          },
        ),
        RaisedButton(
          child: Text('Replace B with A'),
          onPressed: () {
            Navigator.of(context).pushReplacementNamed(A.routeName);
          },
        ),
        if (ModalRoute.of(context).canPop)
          RaisedButton(
            child: Text('Back to A'),
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
      ],
    );
  }

  @override
  void deactivate() {
    print('B deactivated');
    super.deactivate();
  }

  @override
  void dispose() {
    print('B disposed');
    super.dispose();
  }
}

Run the app, based on the code above, click on Push B on A which is supposed to call the deactivate method of A
Expected results: Expect to print 'A deactivated'
Actual results: nothing printed

[✓] Flutter (Channel master, v1.14.7-pre.58, on Mac OS X 10.15.2 19C57, locale en-US)
• Flutter version 1.14.7-pre.58 at ~/dev/src/flutter
• Framework revision 83d4d63a71 (5 days ago), 2020-01-30 18:10:36 -0800
• Engine revision e5209202fb
• Dart version 2.8.0 (build 2.8.0-dev.6.0 162d6c5634)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at ~/dev/src/android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = ~/dev/src/android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C505
• CocoaPods version 1.8.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.41.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1
[✓] Connected device (3 available)
• Tewshi’s iPhone • 6fe9acfdbee6d2defb8769d328547267f0f • ios            • iOS 13.3
• Chrome          • chrome                                   • web-javascript • Google Chrome 79.0.3945.130
• Web Server      • web-server                               • web-javascript • Flutter Tools
• No issues found!

Hi @tewshi
deactivate doesn't get called when using Navigator.push or Navigator.pushNamed.
You can use Navigator.pushReplacement or Navigator.pop to call deactivate
Closing, as this isn't an issue with Flutter itself. If you disagree please write in the comments
and I will reopen it.
Thank you.

this is an issue, because it has changed, deactivate is usually called when you push on a route and when you pop back to it, and also when you pushReplacement deactivate is called just before dispose.
but what it currently does now is no different from dispose, only called when you remove the route.
How I noticed was that, I had a timer, which I pause when I push a new route, and resume when I pop back, but this no longer works because of this change in deactivate
is there an alternative way to do this? if we can no longer use deactivate this way.

Hi @tewshi
I believe @helinanever  is correct
the doc  states
The framework calls this method whenever it removes this State object from the tree.
I believe push does not remove the state from the widget, while pushReplacement does remove from the tree;
does this answer the issue?
thank you

@iapicca
I’m not saying @helinanever is wrong though, I’m saying there’s been a change, and it has greatly affected two of my apps.
You can try an earlier version of master, maybe mid Jan and you’ll see that deactivate is always called when a widget is no longer in view, either by a push, pop or replacement.
But it’s fine if this is the new behavior, I’ll find a way to fix what I did with it.
If deactivate is only called when the state object is removed from the tree then why do we have dispose?

Hi @tewshi
quoting the docs
https://api.flutter.dev/flutter/widgets/State/deactivate.html
In some cases, the framework will reinsert the State object into another part of the tree (e.g., if the subtree containing this State object is grafted from one location in the tree to another).
while https://api.flutter.dev/flutter/widgets/NavigatorState/dispose.html
The framework calls this method when this State object will never build again.
does this answer your question?
thank you

it's okay if this is how it works now, like I said, there was a change.
I guess I'll have to use the Future that's returned from push to handle this issue from here.

Hi @tewshi
I'm glad that you found a solution to solve the issue
thank you for letting me know

Hi @tewshi
I'm in total agree with you. This behavior changes really mess my projects that depends on deactivate method.
In v 1.12.13 when I place a deactivate in A then I push route to B. When I pop B or press back, deactivate in A would be called. Now that behavior is changed.

Exactly what I was trying to explain in my previous messages @jordan-maulana

Hi @helinanever , I think @tewshi has a very valid question and I don't think it was answered before closing this issue.
I stumbled into this post because I am having the same question right now so I would like to ask if again. Is there a method that gets called when a stateful widget is not visible anymore?
This used to be the deactivate method, is there something replacing that now?
Thanks!

Hi @adriana-elizondo
please note the answers above [1, 2, 3]
this code sample represent the different behaviour
does this solve the issue for you?
Thank you

Hi @iapicca, thanks for your answer.
I found a workaround for my specific situation, but if someone is still having this issue:
In the code sample you are using pushReplacement, which will indeed call the "deactivate" method, but the question was for push without replacing the current widget in the stack.
Also, it prints deactivate on initState, not sure if that was the intention?
Thank you! :)

same problem😂

Hi @adriana-elizondo
thanks for catching my bad copy paste
I used in the code sample a list view builder, but
unfortunately due to this issue
since the elements are disposed
I cannot double-check if deactivate works properly.
I'll keep the issue open for now, hoping to be able to check when the issue linked is solved
Thank you

@iapicca , In your example, using push does not trigger the deactivate of the previous page. Is there a function  on the previous page that can be execute when pushing & also can be execute when back to the page。 just like activated and deactivated in other framework

I am also facing similar issue due to the change in the deactivate function. I am unable to understand the change and now after the change whats the difference between the deactivate and dispose. As per the definition of deactivate in the link , it must be called whenever it is removed from the tree and when it resumes. Since, we do not have any callback function(in flutter) when the route resumes and 'deactivate' function was only the way to catch it, can some one explain how to do that now?
For example. PageA navigates to PageB using push method and now when we click back button or call pop function, PageA is resumed and there is no callback function in PageAto deal with the pop and no I cannot useawait here because of the app setup.
Is there a bug in deactivate function or an intentional change ?

@Mhsanjib you can use routeObserver

#58485 resolvent

Yes, what's going on here?!  Ten months ago you would call deactivate with every push to another route.
This screenshot includes four more lines (highlighted with red arrows) that would be printed when the little bit of code below pushed on to the 'Second Page.'  Run this code now and those four lines don't appear?!
Not good.
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  MyApp() : super() {
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   MyApp being created. Constructor called.");
  }
  @override
  Widget build(BuildContext context) {
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   MyApp build() called!");
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Home Page'),
    );
  }
}

/// High-level variable. Identifies the widget. New key? New widget!
Key _key = UniqueKey();

class MyHomePage extends StatefulWidget {
  // constructor
  MyHomePage({Key key, this.title}) : super(key: key) {
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   MyHomePage StatefulWidget being created. Constructor called.");
  }
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  // constructor
  _MyHomePageState() : super() {
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   _MyHomePageState being created. Constructor called.");
  }
  int _counter = 0;

  void initState() {
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _MyHomePageState initState() called.");
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _MyHomePageState build() called!");
    return _FirstPage(
      key: _key,
      title: "${widget.title} counter pressed: $_counter",
      state: this,
    );
  }
}

class _FirstPage extends StatefulWidget {
  // constructor
  _FirstPage({Key key, @required this.title, this.state}) : super(key: key) {
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   FirstPage StatefulWidget being created. Constructor called.");
  }
  final String title;
  final _MyHomePageState state;

  @override
  State createState() => _FirstPageState();
}

class _FirstPageState extends State<_FirstPage> {
  // constructor
  _FirstPageState() : super() {
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   _FirstPageState being created. Constructor called.");
  }
  int counter = 0;
  _MyHomePageState state;

  void initState() {
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _FirstPageState initState() called.");
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _FirstPageState build() called!");
    if (widget.state == null && state == null) {
      // the first instance of that state object.
      state = context.findAncestorStateOfType<_MyHomePageState>();
    } else {
      state ??= widget.state;
    }
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          print(
              ">>>>>>>>>>>>>>>>>>>>>>>>>   First page Button is pressed. setState() called.");
          setState(() {
            counter++;
          });
        },
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ),
      persistentFooterButtons: <Widget>[
        RaisedButton(
          child: Text(
            'Home Page Counter',
          ),
          onPressed: () {
            print(
                ">>>>>>>>>>>>>>>>>>>>>>>>>   'Home Page Counter' button pressed. HomePage setState() called.");
            state?.setState(() {
              state._counter++;
            });
          },
        ),
        RaisedButton(
          child: Text(
            'Second Page',
          ),
          onPressed: () {
            print(">>>>>>>>>>>>>>>>>>>>>>>>>   'Second Page' button pressed.");
            Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (BuildContext context) => _SecondPage(
                        title: "You're on the Second Page", homeState: state)));
          },
        ),
      ],
    );
  }

  void deactivate() {
    super.deactivate();
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _FirstPageState deactiviated.");
  }

  void dispose() {
    super.dispose();
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   _FirstPageState disposed. Counter was $counter");
  }
}

class _SecondPage extends StatefulWidget {
  _SecondPage({Key key, @required this.title, @required this.homeState})
      : super(key: key) {
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   SecondPage StatefulWidget being created. Constructor called.");
  }
  final String title;
  final _MyHomePageState homeState;

  @override
  _SecondPageState createState() => _SecondPageState();
}

class _SecondPageState extends State<_SecondPage> {
  _SecondPageState() : super() {
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   _SecondPageState being created. Constructor called.");
  }
  int _counter = 0;

  void initState() {
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _SecondPageState initState() called.");
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _SecondPageState build() called!");
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text("You're on this second page."),
            const Text('You have pushed the button this many times:'),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          print(
              ">>>>>>>>>>>>>>>>>>>>>>>>>   Second page Button is pressed. setState() called.");
          setState(() {
            _counter++;
          });
        },
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ),
      persistentFooterButtons: <Widget>[
        RaisedButton(
          child: Text(
            'New Key',
          ),
          onPressed: () {
            print(">>>>>>>>>>>>>>>>>>>>>>>>>   'New Key' button pressed. HomePage setState() called.");
            widget.homeState.setState(() {
              _key = UniqueKey();
            });
          },
        ),
        RaisedButton(
          child: Text(
            'Home Page Counter',
          ),
          onPressed: () {
            print(
                ">>>>>>>>>>>>>>>>>>>>>>>>>   'Home Page Counter' button pressed. HomePage setState() called.");
            widget.homeState.setState(() {
              widget.homeState._counter++;
            });
          },
        ),
        RaisedButton(
          child: Text(
            'First Page',
          ),
          onPressed: () {
            print(">>>>>>>>>>>>>>>>>>>>>>>>>   'First Page' button pressed.");
            Navigator.pop(context);
          },
        ),
      ],
    );
  }

  void deactivate() {
    super.deactivate();
    print(">>>>>>>>>>>>>>>>>>>>>>>>>   _SecondPageState deactiviated.");
  }

  void dispose() {
    super.dispose();
    print(
        ">>>>>>>>>>>>>>>>>>>>>>>>>   _SecondPageState disposed. Counter was $_counter");
  }
}

Reference: StatefulWidget's Key & State

In the end what was the best practice to handle this? Route Observer is a pretty inelegant solution for such simple task, deactivate was perfect for this and workarounds like using PushReplacment are not always a wanted behavior.
For example if someone navigates using back button deactivate was run and I can pause a socket or make a small clean up, but when I navigate through my main menu (which uses pushNamed) there is no elegant way to handle it.

any solutions now?just like viewWillAppear() and viewWillDisappear()hook method in iOS,the Route Observer is a little bit complex and deactivate's still not working

What I finally used then was the Future returned by push() or pushNamed()
so, if I want to do something after a pushed component is popped I'll attach a callback like this:
...

Navigator.of(context).push(ComponentA()).then((data) {
    print('ComponentA deactivated');
});

...

NB: the above is much like a pseudo-code, to express how it was done;

What I finally used then was the Future returned by push() or pushNamed()
so, if I want to do something after a pushed component is popped I'll attach a callback like this:
...

Navigator.of(context).push(ComponentA()).then((data) {
    print('ComponentA deactivated');
});

...

NB: the above is much like a pseudo-code, to express how it was done;

That still doesn't solve the problem if you have like ten pages(as in my case) to choose between to navigate to I don't think it'd be quite inelegant to attach a then function to every Nav.push in the screen

What I finally used then was the Future returned by push() or pushNamed()
so, if I want to do something after a pushed component is popped I'll attach a callback like this:
...

Navigator.of(context).push(ComponentA()).then((data) {
    print('ComponentA deactivated');
});

...

NB: the above is much like a pseudo-code, to express how it was done;

That still doesn't solve the problem if you have like ten pages(as in my case) to choose between to navigate to I don't think it'd be quite inelegant to attach a then function to every Nav.push in the screen

What I finally used then was the Future returned by push() or pushNamed()
so, if I want to do something after a pushed component is popped I'll attach a callback like this:
...

Navigator.of(context).push(ComponentA()).then((data) {
    print('ComponentA deactivated');
});

...

NB: the above is much like a pseudo-code, to express how it was done;

That still doesn't solve the problem if you have like ten pages(as in my case) to choose between to navigate to I don't think it'd be quite inelegant to attach a then function to every Nav.push in the screen

I agree. Its not practical to sift through all of the Nav push calls and add more code.  Deactivate was the only hook to know when navigation took place.

What I finally used then was the Future returned by push() or pushNamed()
so, if I want to do something after a pushed component is popped I'll attach a callback like this:
...

Navigator.of(context).push(ComponentA()).then((data) {
    print('ComponentA deactivated');
});

...

NB: the above is much like a pseudo-code, to express how it was done;

That still doesn't solve the problem if you have like ten pages(as in my case) to choose between to navigate to I don't think it'd be quite inelegant to attach a then function to every Nav.push in the screen

I agree. Its not practical to sift through all of the Nav push calls and add more code.  Deactivate was the only hook to know when navigation took place.

it all depends on how large your app is, for an app with a few screens, it wouldn't be much of a problem, I only wrote my own workaround for this issue.
So, sometimes, even if the app has so many screens, you may not need to use the deactivate on all screen push

it all depends on how large your app is, for an app with a few screens, it wouldn't be much of a problem, I only wrote my own workaround for this issue.
So, sometimes, even if the app has so many screens, you may not need to use the deactivate on all screen push

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

main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(App());
}

class App extends StatefulWidget {
  const App({Key key}) : super(key: key);

  @override
  AppState createState() => AppState();
}

class AppState extends State<App> {
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'App',
      initialRoute: A.routeName,
      onUnknownRoute: (RouteSettings settings) {
        return _buildNotFoundSceneRoute(settings);
      },
      onGenerateRoute: (RouteSettings settings) {
        switch (settings.name) {
          case A.routeName:
            return MaterialPageRoute(
              builder: (BuildContext context) {
                return SafeArea(
                  child: Container(
                    child: A(),
                    color: Colors.white,
                  ),
                );
              },
              settings: RouteSettings(name: A.routeName),
            );
          case B.routeName:
            return MaterialPageRoute(
              builder: (BuildContext context) {
                return SafeArea(
                  child: Container(
                    child: B(),
                    color: Colors.white,
                  ),
                );
              },
              settings: RouteSettings(name: B.routeName),
            );
          default:
            return _buildNotFoundSceneRoute(settings);
        }
      },
    );
  }

  PageRoute _buildNotFoundSceneRoute(RouteSettings settings) {
    return MaterialPageRoute(
      builder: (BuildContext context) {
        return SafeArea(
          top: false,
          bottom: false,
          child: Material(
            type: MaterialType.card,
            child: Center(
              child: Text(
                'Content not found: ${settings.name}',
                style: TextStyle(
                  fontFamily: 'Sensation',
                  fontSize: 18.0,
                  decoration: TextDecoration.none,
                  color: Colors.red,
                ),
              ),
            ),
          ),
        );
      },
      settings: RouteSettings(name: '/not-found'),
    );
  }
}

class A extends StatefulWidget {
  static const String routeName = '/';

  @override
  _AState createState() => _AState();
}

class _AState extends State<A> {
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        RaisedButton(
          child: Text('Push B on A'),
          onPressed: () {
            Navigator.of(context).pushNamed(B.routeName);
          },
        ),
        RaisedButton(
          child: Text('Replace A with B'),
          onPressed: () {
            Navigator.of(context).pushReplacementNamed(B.routeName);
          },
        ),
        if (ModalRoute.of(context).canPop)
          RaisedButton(
            child: Text('Back to B'),
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
      ],
    );
  }

  @override
  void deactivate() {
    print('A deactivated');
    super.deactivate();
  }

  @override
  void dispose() {
    print('A disposed');
    super.dispose();
  }
}

class B extends StatefulWidget {
  static const String routeName = '/b';

  @override
  _BState createState() => _BState();
}

class _BState extends State<B> {
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        RaisedButton(
          child: Text('Push A on B'),
          onPressed: () {
            Navigator.of(context).pushNamed(A.routeName);
          },
        ),
        RaisedButton(
          child: Text('Replace B with A'),
          onPressed: () {
            Navigator.of(context).pushReplacementNamed(A.routeName);
          },
        ),
        if (ModalRoute.of(context).canPop)
          RaisedButton(
            child: Text('Back to A'),
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
      ],
    );
  }

  @override
  void deactivate() {
    print('B deactivated');
    super.deactivate();
  }

  @override
  void dispose() {
    print('B disposed');
    super.dispose();
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.6 at /Users/tahatesser/Code/flutter_stable
    • Framework revision 9b2d32b605 (12 days ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.19.0

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

[✓] Flutter (Channel master, 1.26.0-18.0.pre.156, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.26.0-18.0.pre.156 at /Users/tahatesser/Code/flutter_master
    • Framework revision 45508985b1 (8 hours ago), 2021-02-02 22:46:04 -0500
    • Engine revision 2c144c3eeb
    • Dart version 2.12.0 (build 2.12.0-282.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.19.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.1 20C69 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 88.0.4324.96

• No issues found!

Any workarounds for this issue? As I needed to clean up socketio connections on page change. It does not make sense if the connection is retained after I pushed another page on top of it in the stack. But it also does not make sense if I use pushReplacementNamed since I need the back button to work correctly to go back to previous page.
RouteObserver seem overkill for this, I won't shy away from it if I really need to use this, but am looking for an elegant workaround to this.

@TahaTesser
if @superbaymax1201 report is verified

Widget A->Widget B (Widget B call Navigator.pop()) Widget B->Widget A
in flutter 1.12.13+hotfix.9 will call A Widget deactive method;
in flutter 1.22.4 won't call A Widget deactive method ;
in different versions have different behaviors ，why?
How will it be implemented in future versions?

wouldn't make it a regression?

So long since this issue created and now there is no any solution from flutter development team.
It's very nessary and useful for developer to know the change of page state, when become visible, when become unvisible, but not.
Before flutter2.0, deactivate method will call when page become visible or unvisible. Update to flutter2.0, it didn't work ! ! !
Why there are not methods like onVisible and onUnvisible, developer need.

This is still an issue and in my opinion really bad state handling to not have a Resume and Pause behavior like in Android.

It should bug the architects behinds the navigator lifecycle.

Note that you can use RouteObserver to detect when a page became visible or not. But I agree that it will be better if this was directly inside the widget lifecycle

So long since this issue created and now there is no any solution from flutter development team.
It's very nessary and useful for developer to know the change of page state, when become visible, when become unvisible, but not.
Before flutter2.0(test in v1.12.13), deactivate method will call when page become visible or unvisible. Update to flutter2.0(test in v2.2.3), it didn't work ! ! !
Why there are not methods like onVisible and onUnvisible, developer need.

@benIsCome
Note that you can use RouteObserver to detect when a page became visible or not. But I agree that it will be better if this was directly inside the widget lifecycle

As the doc reads, deactivate is called when the widget is removed from the tree or reinserted to a different part of the widget tree.

The framework calls this method whenever it removes this State object from the tree. In some cases, the framework will reinsert the State object into another part of the tree (e.g., if the subtree containing this State object is grafted from one location in the tree to another due to the use of a GlobalKey).

Pushing a new Route would still have both the routes in the widget tree, so it is intended that deactivate won't be called.

flutter doctor -v
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      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> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
    Navigator.of(context)
        .push(MaterialPageRoute(builder: (context) => const NewScreen()));
  }

  @override
  void deactivate() {
    // TODO: implement deactivate
    print('Home Page deactivated');
    super.deactivate();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}

class NewScreen extends StatefulWidget {
  const NewScreen({Key? key}) : super(key: key);

  @override
  _NewScreenState createState() => _NewScreenState();
}

class _NewScreenState extends State<NewScreen> {
  @override
  void deactivate() {
    // TODO: implement deactivate
    print('New Screen deactivated');

    super.deactivate();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Second AppBar'),
      ),
      body: const Center(
        child: Text('Second Scren'),
      ),
    );
  }
}

logs for the above code sample
Launching lib[/main.dart]() on Chrome in debug mode...
lib/main.dart:1
This app is linked to the debug service: ws://<IP_ADDRESS>:56923[/55P3j1A9hwI]()%3D[/ws]()
Debug service listening on ws://<IP_ADDRESS>:56923[/55P3j1A9hwI]()=[/ws]()
💪 Running with sound null safety 💪
Connecting to VM Service at ws://<IP_ADDRESS>:56923[/55P3j1A9hwI]()=[/ws]()
New Screen deactivated

Seeing the above comments It feels like this behavior has changed over the years, But the present behavior seems consistent with the documentation and is working as intended.

As the doc reads, deactivate is called when the widget is removed from the tree or reinserted to a different part of the widget tree.

The framework calls this method whenever it removes this State object from the tree. In some cases, the framework will reinsert the State object into another part of the tree (e.g., if the subtree containing this State object is grafted from one location in the tree to another due to the use of a GlobalKey).

Pushing a new Route would still have both the routes in the widget tree, so it is intended that deactivate won't be called for any of the widgets.

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      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> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
    Navigator.of(context)
        .push(MaterialPageRoute(builder: (context) => const NewScreen()));
  }

  @override
  void deactivate() {
    // TODO: implement deactivate
    print('Home Page deactivated');
    super.deactivate();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}

class NewScreen extends StatefulWidget {
  const NewScreen({Key? key}) : super(key: key);

  @override
  _NewScreenState createState() => _NewScreenState();
}

class _NewScreenState extends State<NewScreen> {
  @override
  void deactivate() {
    // TODO: implement deactivate
    print('New Screen deactivated');

    super.deactivate();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Second AppBar'),
      ),
      body: const Center(
        child: Text('Second Scren'),
      ),
    );
  }
}

logs for the above code sample when Push and Pop is performed.
Launching lib[/main.dart]() on Chrome in debug mode...
lib/main.dart:1
This app is linked to the debug service: ws://<IP_ADDRESS>:56923[/55P3j1A9hwI]()%3D[/ws]()
Debug service listening on ws://<IP_ADDRESS>:56923[/55P3j1A9hwI]()=[/ws]()
💪 Running with sound null safety 💪
Connecting to VM Service at ws://<IP_ADDRESS>:56923[/55P3j1A9hwI]()=[/ws]()
New Screen deactivated

Seeing the above comments I realize that this behavior has changed over the years, But the present behavior seems consistent with the documentation and is working as intended.

cc: @chunhtai

Feels like RouteObserver is the way forward here.

One way I recently fix this is:
is set mainState to false
MaterialPageRoute(
     maintainState: maintainState,
     builder: (context) => page,
   );

/// By default, when a modal route is replaced by another, the previous route
/// remains in memory. To free all the resources when this is not necessary, set
/// [maintainState] to false.

This is currently working as expected (https://github.com/flutter/flutter/issues/50147#issuecomment-1033773923 explains this pretty well). I am going to close this as there are no further actions we plan to take from this.


update minimal python version

Btw, with this change we can start using new syntax sugar for type annotations introduced in python 3.9:
For example:
list[str] instead of typing.List[str]


Doesn't work with nyx

Please explain the issue, it's not clear with the title.
the issue will be closed after 24 hours if no response from the author


Added mac ADB installation and possible error fix

With the changes made the error
C:\ : The term 'C:' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\
+ ~~~
    + CategoryInfo          : ObjectNotFound: (C::String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

will be fixed(Most probably)

And also it's a neglectable error it doesn't mess anything with the RAB files or installation