Add unit tests for all BP modes

BP unit tests cover only few BP modes, according to the CodeCov report.
Using Wiki manual about branch prediction model, TDD manual, and existing tests, you may easily add tests to cover all the BP types.

Do you have any progress?
There are new students and it may be better for them to use that task as a kick-off, while you may proceed with something more advanced.

Hi, I'm trying to make progress, but still I spent a lot of of time to deeply understand how simulator works. (It is my mistake, next time I will assign myself only if I approximately know what to do).
I'm going to add some test cases in unit_test.cpp to cover all lines in bpentry.h and now I'm anylizing how red lines can be tested.
So, I'm trying to finish this issue, but if you consider that it will be better if newcomers fix it, I will do what you suggest.
Thanks.

How does codecov works? I want to comment some lines in unit_tests.cpp to undertand what tests cover these exact lines. How can I do it?

Maybe, I can find a tutorial somewhere. I will look for it now by myself

CodeCov is a remote tool, it takes data from pull requests. You may open one to make your experiments.

Alternatively, you may put dummy couts to BPEntry code:
   std::cout << "Running " << __LINE__ << std:;endl;

How should I run unit_tests to see how they cover bpentry.h lines?
When I run unit-tests in simulator folder I see a lot of dump info and if I am not mistaken, it is all about cache.

I did only an experiment to check if my changes make any difference considering coverage. But codecov showed that there is no difference.
My changes are not harmful of course but they are useless as codecov says.
So, why did you merge my pull request?

An obvious idea is to test the predictor in the situation where target is a smaller value that current PC.
As I did in my changes. But maybe I did something wrong in following lines.
    bp->update( BPInterface( PC, true, target));
    CHECK( bp->is_taken(PC) );
    CHECK( bp->get_target(PC) == target);

Your test looks more what unit test should look like (comparing to the previous ones), as it tests simple functionality.
The only thing I would change is to move it closer to the beginning of the fie.

    bp->update( BPInterface( PC, true, target));
    CHECK( bp->is_taken(PC) );
    CHECK( bp->get_target(PC) == target);

Looks reasonable. If we see a taken branch, predict it is a taken and predict its target next time.

Obviously, for static mode, the branch will be predicted as not taken - and that should be asserted in your test case.

Do you mean "always taken"?

Yep

Nope, always taken is always taken

Oh, we do not have "always not taken" mode....

I added always not taken to static predictor

https://codecov.io/gh/MIPT-ILab/mipt-mips/src/cc7398da9f6a66d8f9a0655fc9fab4876cd4f51e/simulator/modules/fetch/bpu/bpentry.h
Now we can analyze report to see what is not covered:

Backward branch prediction
One bit branch prediction in case of target change (was predicted to one target, now goes to another)
Adaptive prediction mode

I think that we can test this case in a such simple way.

after first checks we change the target.
update prediction one more time.
check if predicted target is right.

TEST_CASE( "One bit predictor")
 58 {
 59     auto bp = BaseBP::create_bp( "saturating_one_bit", 128, 16);
 60
 61     Addr PC = 28;
 62     Addr target = 12;
 63
 64     bp->update( BPInterface( PC, true, target));
 65     CHECK( bp->is_taken(PC) );
 66     CHECK( bp->get_target(PC) == target);
 67
 68     target = 16;
 69     bp->update( BPInterface( PC, true, target));
 70     CHECK( bp->get_target(PC) == target);
 71 }

but unfortunately last check fails with 32 == 16
So, it means that branch wasn't taken, why?

That's how that prediction mode is implemented: if branch target changes, it resets the prediction completely:
https://github.com/MIPT-ILab/mipt-mips/blob/93aa34a8413e871e12d4f3e8babfcd0321516175/simulator/modules/fetch/bpu/bpentry.h#L80
For me, it looks like a bug — we should reset target, but not the bit prediction.

By the way, the 2-bit prediction has no similar bug.

Unfortunately, it doesn't work.
Even one simple test fails
TEST_CASE( "Adaptive two bit prediction")
161 {
162     auto bp = BaseBP::create_bp( "adaptive_two_levels", 128, 16);
163
164     Addr PC = 12;
165     Addr target = 28;
166
167     // Learn
168     bp->update( BPInterface( PC, true, target));
169     CHECK( bp->is_taken(PC) );
170     CHECK( bp->get_target(PC) == target);
171 }

Error dump
/home/yan/mipt-mips/simulator/modules/fetch/bpu/t/unit_test.cpp:169: FAILED:
CHECK( bp->is_taken(PC) )
with expansion:
  false

/home/yan/mipt-mips/simulator/modules/fetch/bpu/t/unit_test.cpp:170: FAILED:
  CHECK( bp->get_target(PC) == target )
with expansion:
  16 == 28

I don't really understand why it happens, maybe we should look deeply into the specific of adaptive predictor. But it seems to me that more advanced predictors must cope with the simplest test cases.

But it seems to me that more advanced predictors must cope with the simplest test cases.

No, it's not true.
More complicated predictors (and adaptive prediction is complicated) use more knowledge about history. The fact that a single branch was taken once is not enough for that predictor to assume it will be taken next time.
I advise you to think about our implementation as a 'black box' and investigate its behavior outside.
The description describes an example of the behavior. You formalize it to unit test, for instance.

https://codecov.io/gh/MIPT-ILab/mipt-mips/src/a0b1f8db6c1d9a4710a7f5750216ba1e5c106708/simulator/modules/fetch/bpu/bpentry.h
So now we do not cover only the corner case of target mismatch.
Please create a test case to cover it and finish your great job!

I added test case.
TEST_CASE( "Adaptive two bit prediction in case of changed target")
203 {
204     auto bp = BaseBP::create_bp( "adaptive_two_levels", 128, 16);
205
206     Addr PC = 28;
207     Addr target = 12;
208
209     // Learn in sequence 001001001
210     bp->update( BPInterface( PC, false, target));
211     bp->update( BPInterface( PC, false, target));
212     bp->update( BPInterface( PC, true, target));
213
214     bp->update( BPInterface( PC, false, target));
215     bp->update( BPInterface( PC, false, target));
216     bp->update( BPInterface( PC, true, target));
217
218     bp->update( BPInterface( PC, false, target));
219     bp->update( BPInterface( PC, false, target));
220     bp->update( BPInterface( PC, true, target));
221
222     //change the target
223     target = 16;
224     bp->update( BPInterface( PC, false, target));
225     bp->update( BPInterface( PC, false, target));
226     CHECK( bp->is_taken(PC) );
227     CHECK( bp->get_target(PC) == target);
228 }

CHECK( bp->istaken(PC)) is not essential here, but I put it to make sure that branch is taken.
But at the same time target is not updated, so I have the last check failed.
I don't know why this happens.

What does bp->get_target(PC) return?

12

224     bp->update( BPInterface( PC, false, target));
225     bp->update( BPInterface( PC, false, target));

If branch is not taken, then we do not care about its target (the next instruction is PC+4)

But after such a sequence predictor must assume, that next time the branch will be taken

So, the first check CHECK( bp->istaken(PC)) passes

I added all this lines
           bp->update( BPInterface( PC, false, target));
211     bp->update( BPInterface( PC, false, target));
212     bp->update( BPInterface( PC, true, target));
213
214     bp->update( BPInterface( PC, false, target));
215     bp->update( BPInterface( PC, false, target));
216     bp->update( BPInterface( PC, true, target));
217
218     bp->update( BPInterface( PC, false, target));
219     bp->update( BPInterface( PC, false, target));
220     bp->update( BPInterface( PC, true, target));

And all tests pass. I will do a pull request in 5 minutes.

Thank you for your contribution!
You may use your expertise in branch prediction for one of these issues
The most straightforward are #613 and #91, the most challenging are #36 (totally creative stuff, I do not even sure I understand what to do) and #614 (I barely understand)


Workaround context leaking

In some situations CFMLParser mixes content of analyzed files. That's why we need to create separate instance of CFMLParser for each file.

This one is interesting, can you possible provide a code sample of it leaking?

I couldn't pinpoint set of classes that are responsible for this problem. This bug appear every time I do full project analyse and it's repeatable every time.

I added a reset() method to CFMLParser (cfparser 2.6.7), and added it to CFLint.fireStartedProcessing()
Can you try that and see if it fixes the issue.

Below are errors that occurred when I've executed code analysis with yours modifications.
Error 1.
Console is now full of analysed code, e.g.
INFO:   var redirectURL = (sslRedirection)?'https://':'http://';
INFO: redirectURL = cgi.server_name;
INFO: redirectURL = cgi.original_request_uri;
INFO:   if(len(trim(cgi.original_query_string)) )     {
INFO: redirectURL = '?';
INFO: redirectURL = cgi.original_query_string;
INFO:
INFO:     };

Previous version wasn't so verbose.
Error 2.
After some time StackOverflowError occurs. Before changes, full code analyse, have always finished successfully.
ERROR: Exception in thread "main" java.lang.StackOverflowError
ERROR:  at cfml.parsing.cfscript.CFMember.Decompile(CFMember.java:30)
ERROR:  at cfml.parsing.cfscript.CFFullVarExpression.Decompile(CFFullVarExpression.java:64)
ERROR:  at cfml.parsing.cfscript.CFFunctionExpression.Decompile(CFFunctionExpression.java:50)
ERROR:  at cfml.parsing.cfscript.CFFullVarExpression.Decompile(CFFullVarExpression.java:64)
ERROR:  at cfml.parsing.cfscript.script.CFExpressionStatement.Decompile(CFExpressionStatement.java:17)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFForInStatement.Decompile(CFForInStatement.java:35)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFIfStatement.Decompile(CFIfStatement.java:35)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFIfStatement.Decompile(CFIfStatement.java:35)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFForInStatement.Decompile(CFForInStatement.java:35)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)
ERROR:  at cfml.parsing.cfscript.script.CFCompoundStatement.Decompile(CFCompoundStatement.java:54)

Interesting.  I don't know what causes the additional logging.  I will take a look at that, but you can merge the PR if you like.  Thanks for contributing.

Thank you. I'll merge my change shortly.

Thanks.


fix: use node image as base to ensure version range

Description
This PR fixes the current CI error on release: https://github.com/asyncapi/server-api/runs/5158849217?check_suite_focus=true.
The issue behind it is that alpine version got both nodejs and npm updated, so the specified version (14.18.1-r0) is no longer available.
In order to avoid the same problem in the future, we could either install both nodejs and npm packages without version modifier (not sure which version it will be installed if they keep updating it), use a fixed repository for installing those versions or rather, (the solution I chose) stick with node Docker image instead of alpine but with the alpine version tag:  14-alpine3.14, so we ensure any node version installed would be 14.x.x.
Btw, I added fix: prefix to force a release because the previous one failed when publishing the Docker image to Docker hub.

@smoya Thanks for PR! I understand you tested the image on your machine?

❯ docker build --no-cache --tag asyncapi/server-api .
[+] Building 153.4s (16/16) FINISHED
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 37B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 34B                                                                                0.0s
 => [internal] load metadata for docker.io/library/node:14-alpine3.14                                                                                2.1s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                0.0s
 => CACHED [base 1/2] FROM docker.io/library/node:14-alpine3.14@sha256:8c93166ecea91d8384d9f1768ceaca1cd8bc22c1eb13005cecfb491588bd8169                                      0.0s
 => [internal] load build context                                                                                0.0s
 => => transferring context: 4.60kB                                                                                0.0s
 => [base 2/2] RUN apk add --update   nghttp2                                                                                1.2s
 => [build 1/4] WORKDIR /app                                                                                0.0s
 => [build 2/4] COPY . .                                                                                0.1s
 => [build 3/4] RUN rm package-lock.json; npm install                                                                                93.3s
 => [build 4/4] RUN npm run build:prod                                                                                12.5s
 => [release 2/5] COPY --from=build /app/dist ./dist                                                                                0.0s
 => [release 3/5] COPY --from=build /app/package* ./                                                                                0.4s
 => [release 4/5] RUN npm ci --only=production                                                                                29.5s
 => [release 5/5] COPY openapi.yaml ./                                                                                0.0s
 => exporting to image                                                                                10.3s
 => => exporting layers                                                                                10.3s
 => => writing image sha256:1ce56098b22c6149a662de7d0e0f9aaca1910f615794d40eca5d082d35999576                                                                                0.0s
 => => naming to docker.io/asyncapi/server-api                                                                                0.0s

And
❯ curlie -X POST 'localhost/v1/validate' -H "Content-Type: application/json" -d '{"asyncapi":{"asyncapi":"2.2.0","info":{"title":"Account Service","version":"1.0.0","description":"This service is in charge of processing user signups"},"channels":{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/UserSignedUp"}}}},"components":{"messages":{"UserSignedUp":{"payload":{"type":"object","properties":{"displayName":{"type":"string","description":"Name of the user"},"email":{"type":"string","format":"email","description":"Email of the user"}}}}}}}}'
HTTP/1.1 204 No Content
X-Powered-By: Express
Vary: Origin
Date: Mon, 14 Feb 2022 12:33:42 GMT
Connection: keep-alive
Keep-Alive: timeout=5

/rtm


Not callable with python -m

Just adding a if __name__ == "__main__" section should fix this so we can do python -m asaman.

I will update the codebase for this.

I guess I should just close this, people can just use the command line asaman tool as required.

As far as I can tell, there is no need to python -m asaman since you can just directly call the asaman command. Not sure I understand the problem this change is trying to solve.

It's very common place to be able to call commands with python -m. black, flake8, mypy, isort, and pytest all support this.
It's nice because you know you're running something inside your Python virtual environment and not accidentally pulling in anything that's just in $PATH. There's also some Python packages that are only callable via the module, such as build. I think supporting both is handy.


10.50 support

nobody seems to be talking about this

i can test!

nobody seems to be talking about this

Someone needs to get the functions offsets

nobody seems to be talking about this

Someone needs to get the functions offsets

i can try help with that
unfortunately i cant solder and i dont have any flashers/dumpers
if theres anything in software i can do then please tell me

So does it work on 11.5

So does it work on 11.5

No moron, should not have updated


JS Bug with hidden folders in 0.7.5 (dialog box not showing)

Hi
some users noticed that "Show folder size" didn't work with them
A console debug showed a JS error
TypeError: y is undefined
plugins/show_folder_size/assets/main.min.js?s=1591806853:42
Pointing to :
class="name '.concat(y.virtual...   ==> where error is thrown
and
y = a.env.mailboxes[c]      ==> where y is defined (line 41 just before)
I guessed it had to do with hidden folders
On closer inspection it seems to be related to this : the error occurs when a folder is hidden (or not marked as "subscribed" in the imap account)
On a test account, if I go to Settings->Folders and hide the folder :

Then the error occurs
If I toggle to show the folder, the error disappears and the dialog box shows

Ok. I am able to reproduce with a unsubscribed mailbox.

Fixed with https://github.com/jfcherng-roundcube/plugin-show-folder-size/commit/ed97a2c6040da562c18e3b7080ab419cb45b87ad. 0.7.6 has been released.

Great ! Thanks a lot !
BTW, are you interested in fr_FR localization file ?

BTW, are you interested in fr_FR localization file ?

Why not :smile:

Here you are, if it can help :
<?php

$labels = [];

$labels['show_folder_size (plugin name)'] = 'Taille des dossiers';

// UI button
$labels['show_folder_size'] = 'Taille des dossiers';

// popup dialog
$labels['folder_size'] = 'Taille des dossiers';
$labels['name'] = 'Nom';
$labels['size'] = 'Taille';
$labels['cumulative_size'] = 'Taille (Cumulative)';

$labels = [];
$labels['show_folder_size (plugin name)'] = 'Taille des dossiers';
// UI button
$labels['show_folder_size'] = 'Taille des dossiers';
// popup dialog
$labels['folder_size'] = 'Taille des dossiers';
$labels['name'] = 'Nom';
$labels['size'] = 'Taille';
$labels['cumulative_size'] = 'Taille (Cumulative)';

Here you are, if it can help :

Great. Thanks. 0.7.7 has been released.


Fix circular dependency between velox_dwio_common<->velox_dwio_common…

…_compression
velox_dwio_common does not need a dependency on velox_dwio_common_compression. The dependency on the latter should be added to the client library that needs them.

Cc: @czentgr I sent you an invite to the repo so I can tag you as reviewer. (related to #6760)

Fixes issue https://github.com/facebookincubator/velox/issues/6128


single dataset pipelines automate update of published index

need a reduced index of published dataset ids that will replace the combined curation export, it should be updated by sparcron probably, needed to simplify sds viewer

The reason these get stuck is because hasUriPublished is not populated without rerunning the export without fetching once publication is complete.

Probably the easiest way to get the ground truth is to pull that list from Pennsieve

Yes, adding the discover api as a third source that we check to trigger export is the full solution.


Pacbot Installer Validation

Implemented Validations for System RAM and Storage .

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


DSD-138: link mdx story

Fixes DSD-138
This PR does the following:

Changes Link story from .tsx to .mdx

Front End Review:

[ ] View the example in Storybook

@bigfishdesign13 I updated the documentation and this should be ready for review now.

Updated. I'll add other reviewers.

What is the difference between the "default" and "action" linktypes?


Use Fractal

https://fractal.thephpleague.com/

This ended up being too complicated to monkey-wrench in and make work flexibly.


Add Route method to tree

As you can see in the examples, this allows users to group common parts of a router.
The indentation is nice for visual grouping, and it can help reduce re-typing the common prefix.

This is very cool! Epic, thanks for the contribution!

This is very cool! Epic, thanks for the contribution!


Peg the usd to the price of houses in atherton that are well designed and peg it to the price of houses in garðabær

Across from kopavogur

In 2016 this meant a home in atherton that cost at least 2.5 million.

https://en.m.wikipedia.org/wiki/Atherton,_California

https://www.paristopten.com/most-expensive-arrondissements-in-paris/


Started from v0.5.0 the most of my glyphs (~90%) are not generated!

Started from v0.5.0 the most of my glyphs (~90%) are not generated correctly.
Working on Windows (7, 8, Server 2008, ...) with node engine.
I found that the resulting font size was reduced by ~25% and changelog file points to new feature:
** * Simplify source SVG files with SVGO (node engine only).**
Is there any option to disable this feature via grunt config option?
Say
webfont: {
    icons: {
        src: 'icons/*.svg',
        dest: 'build/fonts',
        options: {
            simplify: false
            ...
        }
    }
}

It’s not related with SVGO and you even don’t use node engine. It’s kind of magic removal and making both engines closer to each other.

@sapegin,
So could you confirm breaking support for Windows users?

You just should not use the word “correctly” instead of “differently”. I don’t see any bug or something in you description.


WIP: Add static type system

This adds an implementation of Darts type system, beginning with subtype queries, to the local model for macros.
The basic idea is that:

We want to subtype checks to be efficient ( => no roundtrips to the macro executor). For interface types, this requires knowing all transitive supertypes (which can be a recursive structure and is generally pretty large, so we don't want to transfer that in every message).

So, we split types into ResolvedTypes (fully resolved) and type descriptions (lightweight, serializable).
todo: There needs to be an (necessarily asynchronous) API to turn type descriptions into resolved types.

Given that we know everything about ResolvedTypes, we can do common type tasks on them (subtype queries, type algebra/substitutions, flattening, normalization, ...).
A type system implementation needs to have a reference to some predefined types taking a special role. For instance, some types are in a subtype relationship if the special type Null is in a subtype relationship with one of the types. This requires the ResolvedType for Null to be available to the type system implementation.

This approach has it as a parameter on StaticTypeSystem, with the intention of these types being resolved by querying the executor.

This obviously still needs a lot of work to integrate it into the CFE/analyzer (and also tests!), but I wanted to open a draft PR already to get some feedback on the general direction and API.

Thanks Simon! A great start.
One procedural note, those of us on the Dart team working on macros are very geographically distributed, so we usually only chat synchronously a few times per week. That means coherent feedback can take a while to form, I will aim to discuss with the group tomorrow, Tuesday, to make sure we are giving you the best guidance here :)
With that in mind, some initial thoughts from me.
I think most/all of this should go in dart_model: anything that can be useful with just the model and no other deps probably belongs there.
An important note, one hard problem that we want to solve in dart_model is compatibility across different language versions, including of course versions that we don't know about yet. In particular, we want that macros usually continue to work with no code changes against new SDK versions. We expect to support both incremental and breaking changes to the data model, so for example we allow "unknown" and will be able to add new types of things when it isn't breaking; but the wire format will be versioned so that if we need to switch to an entirely incompatible model we can do that. Having the type computation in the same package seems like a reasonable way to go for all this, but we'll have to think about it :)
Re: sync and async, with the query API the expectations about how a macro interacts with the host changes a bit: rather than a back and forth conversation in which the macro learns more about the code, we would prefer a small number of queries, maybe even a single query and response; this should be more efficient and means most macro code can then be synchronous. So rather than "here is a type, please resolve it" we are looking at "here is a model, please resolve it" or more likely in the initial query you already specify which types you want to come back already resolved.
In this setup I think the code of StaticTypeSystem ends up being a feature of Model; i.e. a Model is something that can be fully resolved, and if it is, you can ask it any questions about types synchronously. If not you can make an API call to resolve it.
So I think all the methods that manipulate resolved types end up using a Model for context. Possibly it gets passed around everywhere. Since the idea is that macros mostly get one Model that they process, maybe it could be Zone-global for convenience.
With this setup, I wonder if it's possible to unify the resolved and unresolved types? It's okay if an unresolved type fails with a runtime error "you should be running on a resolved model", because macros will generally know in advance that they need a resolved model and can just always ask for one.
Re: the overhead of repeating core type information, that's okay for now, we can optimize in lots of ways, in particular note that Model is intended to be diffable/composable so we can always subtract the repeated part from what we send and add it back later.
There is another type of "unresolved" to worry about which is "the host can't resolve this yet". For example inspection is very limited in phase 1. We might want to be able to encode a type which we know the name of but it's not resolved yet, e.g. we know it's called "int" in this source file, but imports were not resolved yet so we don't know yet if it's dart:core#int, it's more like ?package:my_package/foo.dart#int. Probably there's nothing concrete to do on that right now, but something to bear in mind to add as we build this out.
Disclaimer: from those working on macros, including yourself, I am probably least familiar with the details of representing Dart types, since others have done it at least once (Konstantin on the analyzer, Johnni on the CFE, Jake in  package:macros). So if I say something that doesn't seem to make sense, it probably doesn't ;) and of course if anything is unclear, happy to elaborate.
Thanks :)

So, we discussed :)
Generally we like the direction, we are going to need serializable classes that can describe types for use in other places, having code on top of those to do computations about types makes sense, answering questions client-side instead of doing an RPC will be faster and fits better with the general idea of dart_model.
The analyzer and CFE currently implement this logic independently, and adding a third implementation obviously increases complexity. A good outcome would be if we end up with a unified set of test cases covering all three. It's okay for macros to have an "experimental/untested" implementation for a while as we work towards that.
We do need to dig a big into the question of whether we should have parallel resolved/unresolved types of whether they can/should be unified, as I mentioned in my previous comment.
Thanks :)

Thanks for the detailed responses!

I think most/all of this should go in dart_model: anything that can be useful with just the model and no other deps probably belongs there.

A problem is that resolving subtypes (if we end up doing it client-side, which IMO makes sense) requires an initial RPC call to query special types in the hierarchy. For instance, we need access to the resolved FutureOr class at the moment because some subtype rules are if ..., then S is a subtype of T iff S is a subtype of Future<T>. Implementing this requires the ability to instantiate these special types synchronously, so we need all the information in place first.
We could hardcode knowledge about these types in package:dart_model, but that feels a little fragile to me. If that helps keeping the implementation in one place, it could be worth it though.
Integrating them into Model would probably solve this.

Having the type computation in the same package seems like a reasonable way to go for all this, but we'll have to think about it :)

I don't think the type implementation stands in the way of backwards/forwards compatibility w.r.t. the protocol. We can't answer subtype queries involving types we don't understand obviously, but there's nothing fundamentally incompatible with unknown types.

So rather than "here is a type, please resolve it" we are looking at "here is a model, please resolve it" or more likely in the initial query you already specify which types you want to come back already resolved.

I see, that makes sense :+1: Are there design docs or anything to read on the kind of queries currently envisioned? I see that there's a query resolving a single class (which I guess should then also resolve its thisType in the type hierarchy), will that then be expanded to include libraries/multiple independent classes?

With this setup, I wonder if it's possible to unify the resolved and unresolved types? It's okay if an unresolved type fails with a runtime error "you should be running on a resolved model", because macros will generally know in advance that they need a resolved model and can just always ask for one.

Interface types are the only thing where it makes a considerable difference (all other types are either singletons or structural by definition, so there's no difference), so I think we can unify these representation.
It might be interesting to have this distinction in the type level (e.g. class ResolvedType implements UnresolvedType), but runtime errors are probably fine too (or we could have an bool get isUnresolved; property on types).

There is another type of "unresolved" to worry about which is "the host can't resolve this yet". For example inspection is very limited in phase 1.

IMO type analysis is not that useful in phase 1 either way, so there's a question of whether we want to deal with ambiguous/unresolved information either way or just outright reject type queries.

With this setup, I wonder if it's possible to unify the resolved and unresolved types?

I'm now using a representation that can be converted from and to the serialized protocol without any loss of information, but is still distinct from it. It has two main benefits:

Using a resolved representation for type parameters. Given their recursive nature (<T extends List<T>>), the serialized form has to introduce a level of indirection TypeParameter(id: 0, bound: NamedType(name: List, instantiation: [TypeParameterType(id: 0)])). Dealing with this mapping of available identifiers to type parameters everywhere is super annoying because we have to pass that context around whenever we deal with any types. Dart objects can have cyclic references, and using them greatly simplifies things.
We're able to express known types as sealed subtypes, which allows pattern matching over them - this is not as important as the first point but it makes the subtype check implementation much more readable, almost matching the mathematical definition in the language spec.

Importantly though, this representation has a direct mapping from and to the serialized type representation. To express type hierarchies, I've introduced a separate TypeHierarchyEntry definition on Model. When querying a model, it is supposed to return entries for all classes resolved in a model (as well as their transitive superclasses). That way, the type system implementation can use the type hierarchy to implement subtype checks without having to encode this information in static types directly (which would not make them 1:1 mappable to their serialized form).

Thanks Simon :) sorry I missed replying a few days ago.
Re: queries, we plan to develop that code soon, currently we are spending a bit of time on the binary JSON format to make sure that when we build out the query code it actually works with the wire format we want :)
Re: sealed subtypes and pattern matching, I think we actually need to avoid that--because adding a new subtype would break existing code. More generally, class hierarchies are fragile and so hard to evolve, basing everything on the generated JSON extension types should force that we don't get into that territory.
Which brings us squarely back to the circular references problem :) ... from the point of view of a macro, there is only one Model, and it gets some part of it based on what it decides to query. So I think there should be a workable path where the model used to resolve types is a global variable; actually probably Zone scoped for things like running multiple macros in parallel.
How does that sound?

I think it should be possible for macros to compose types they have gotten from the model into new types, and then use these types for queries in the model's type system. For instance, in package:drift_dev (currently based on analyzer + build_runner), I'm creating RecordType instances from an SQL schema and I'm then verifying that another RecordType instance I've received from analyzing source code is a subtype of that.
I think it should be possible to do the same thing with macros: The second RecordType would be queried and part of the model, but my macro has to create the first one and then compare them with the type system.
This means that there will be types that reference the model without being a part of it. Since records and function types are purely structural and don't have an identity on them, using the existing schema classes for them is not a problem. However, (at least to me) it seems to break apart with type parameters:

Which brings us squarely back to the circular references problem :) ... from the point of view of a macro, there is only one Model, and it gets some part of it based on what it decides to query

The problem is that we have to synthesize new intermediate types to answer subtype queries. In particular, looking at the positional function types and named function types rules from the language spec, the way we check the subtype relationship between function types is to create new function types pretending to have the same type parameters. That then allows comparing the individual parts (return types, arguments) making up the function type. However, this requires generating new type parameters! These are necessarily independent from the model, which is tricky to do with ids being passed around as the client would then have to mutate its model to allocate identifiers for these intermediate type parameters.

Re: sealed subtypes and pattern matching, I think we actually need to avoid that--because adding a new subtype would break existing code

Well there's a private _UnknownType subclass, similarly to the unknown type in the union enum in generated code. So as long as we're not removing types (which would be breaking with the generated code as well), I don't see how this representation is harder to evolve.
Maybe I'm lacking vision wrt. to the one Model approach - if you have ideas on how we'd solve the problem of introducing new types derived from the model without being part of it, I can explore these approaches too.

I think it should be possible for macros to compose types they have gotten from the model into new types, and then use these types for queries in the model's type system. For instance, in package:drift_dev (currently based on analyzer + build_runner), I'm creating RecordType instances from an SQL schema and I'm then verifying that another RecordType instance I've received from analyzing source code is a subtype of that. I think it should be possible to do the same thing with macros: The second RecordType would be queried and part of the model, but my macro has to create the first one and then compare them with the type system.
This means that there will be types that reference the model without being a part of it. Since records and function types are purely structural and don't have an identity on them, using the existing schema classes for them is not a problem. However, (at least to me) it seems to break apart with type parameters:

Which brings us squarely back to the circular references problem :) ... from the point of view of a macro, there is only one Model, and it gets some part of it based on what it decides to query

The problem is that we have to synthesize new intermediate types to answer subtype queries. In particular, looking at the positional function types and named function types rules from the language spec, the way we check the subtype relationship between function types is to create new function types pretending to have the same type parameters. That then allows comparing the individual parts (return types, arguments) making up the function type. However, this requires generating new type parameters! These are necessarily independent from the model, which is tricky to do with ids being passed around as the client would then have to mutate its model to allocate identifiers for these intermediate type parameters.

That does complicate things a bit :)
One way to do it would be to create a new temporary Model which is the base model + additions on top. Since it's a Map underneath this should be easy to do, the temporary Map returns values if it has them or delegates to the base model. Then you can throw away the temporary model when done. A stack of scopes/models and a runScoped(Model, void Function()) method might do this nicely.
I am not going to claim that that's a good design, but I think it would work? :)

Re: sealed subtypes and pattern matching, I think we actually need to avoid that--because adding a new subtype would break existing code

Well there's a private _UnknownType subclass, similarly to the unknown type in the union enum in generated code. So as long as we're not removing types (which would be breaking with the generated code as well), I don't see how this representation is harder to evolve.

Ah, I missed the _UnknownType part, perhaps that is sufficient, thanks.
I'm still wary of introducing too much on top of the raw (extension) types. It's perfectly fine to experiment with though. One other consideration is how CPU time is needed to instantiate everything--since the extension types are "free". There can however be a tradeoff in the other direction where once instantiated the not-extension types are more performant.

Maybe I'm lacking vision wrt. to the one Model approach - if you have ideas on how we'd solve the problem of introducing new types derived from the model without being part of it, I can explore these approaches too.

One idea above :)
I guess the overall vision can be described as "build in the simplest way possible but no simpler", we are still figuring out exactly where that boundary is :) ... I guess important considerations are:

ease of use for macro authors, which tends to push to more complexity
maintainability (for the SDK / dart_model) as the language changes, which I think most pushes for simplicity
performance, which might push in either direction :)

I'm still wary of introducing too much on top of the raw (extension) types. It's perfectly fine to experiment with though

That's fair - I've kept them for now and implemented the analyzer part of the type hierarchy in the model. The translation is pretty straightforward with the current representation.

since the extension types are "free".

Re performance, my intuition is that this will depend on the types are used - especially when doing lots of subtype checks the representation based on classes should be much faster since we don't have to extract the shape of the type from the map every time.
At the moment, the API usage for macro authors is this:
final typeSystem = StaticTypeSystem(model.types);
// Direct schema representation from the type hierarchy
final rawTargetClass = StaticTypeDesc.namedTypeDesc(model.types.named[request.target.name]!.self);
// Converted to resolved representation for type system
final targetClass = StaticType(rawTargetClass);
assert(
  // Assert that the resolved class type we're running against is a subtype
  // of Object.
  typeSystem.isSubtype(
    targetClass,
    InterfaceType(name: InterfaceType.objectName, instantiation: const []),
  ),
);

The syntactic conversion overhead is not great, but I think with a Model in the Zone it could look like this:
final targetType = modelType(request.target); // directly return resolved representation
assert(typeSystem().isSubtype(targetClass, InterfaceType(...)))

Does that roughly match your expectations on how types should work in macros? If the general design looks acceptable, I'll finish with more tests and the CFE implementation.

I'm still wary of introducing too much on top of the raw (extension) types. It's perfectly fine to experiment with though

That's fair - I've kept them for now and implemented the analyzer part of the type hierarchy in the model. The translation is pretty straightforward with the current representation.

since the extension types are "free".

Re performance, my intuition is that this will depend on the types are used - especially when doing lots of subtype checks the representation based on classes should be much faster since we don't have to extract the shape of the type from the map every time.

Yes, could be.

At the moment, the API usage for macro authors is this:
final typeSystem = StaticTypeSystem(model.types);
// Direct schema representation from the type hierarchy
final rawTargetClass = StaticTypeDesc.namedTypeDesc(model.types.named[request.target.name]!.self);
// Converted to resolved representation for type system
final targetClass = StaticType(rawTargetClass);
assert(
  // Assert that the resolved class type we're running against is a subtype
  // of Object.
  typeSystem.isSubtype(
    targetClass,
    // We can create new type instances in user code:
    InterfaceType(name: InterfaceType.objectName, instantiation: const []),
  ),
);

The syntactic conversion overhead is not great, but I think with a Model in the Zone it could look like this:
final targetType = modelType(request.target); // directly return resolved representation
assert(typeSystem().isSubtype(targetClass, InterfaceType(...)))

Does that roughly match your expectations on how types should work in macros? If the general design looks acceptable, I'll finish with more tests and the CFE implementation.

Much like that, yes; but since we can get to modelType and typeSystem from anywhere we could also do that inside extension methods, so:
request.target.isSubtype(InterfaceType(...))

should also be possible?
I didn't look in detail at the code yet, please let me know when you think it's ready for careful review / which parts, happy to take a look.
I'm not quite sure what you mean by "CFE implementation"?

I agree with the isSubtype extension, it's very neat!

I didn't look in detail at the code yet, please let me know when you think it's ready for careful review / which parts, happy to take a look.

To get the representation exactly right we'll need a way to represent nullable fields in the model, but I think the structure of how this would represent types and the type hierarchy is already there, so getting feedback on the schema changes would be helpful.
Then dart_model/lib/src/type.dart contains the wrappers introduced to represent types without requiring an additional context of which type parameters are in scope. The rest builds ontop of these wrappers, so if anything stands out in there that would be helpful feedback too.
Then finally the subtype check in src/type_system.dart is also implemented, but it's a pretty boring translation of the spec so I think only perhaps the parts of how types are looked up from the hierarchy (_lookupNamed and _constructSuperTypes) are worth looking at for an initial review.

I'm not quite sure what you mean by "CFE implementation"?

I meant to say that I've added support for including the type hierarchy in _analyzer_macros already, but not in _cfe_macros.

I took a careful look today, this all looks good to me: questions about the exact best API to present, performance and so on I think we can best answer by landing this and iterating, particularly as we build out queries and some first example macros.
If you'd prefer to land without a CFE implementation yet then I suggest a small tweak to the golden files test so it notices if there is e.g. .json.analyzer and .json.cfe for cases where there are two different goldens.
Thanks :)

If you'd prefer to land without a CFE implementation yet then I suggest a small tweak to the golden files test so it notices if there is e.g. .json.analyzer and .json.cfe for cases where there are two different goldens.

I've added a CFE implementation as well. I'm not too familiar with CFE internals so there might be some more efficient ways, but it appears to work with the golden file (the only difference is that the analyzer has a way to represent type parameters without a bound, in Kernel there's an implicit extends Object?). So the goldens are slightly different for now.

Looking forward to experimenting with this, thanks.
FYI
I'm working on a few changes to how the extension types generation works: first to switch from "read schema, generate code" to defining the types separately (in Dart) and generating both schema and code; this should make it a bit easier to extend. Then I'm working on integrating the new JsonBufferBuilder end to end, which involves introducing the idea of a "current model" discussed on this PR. And finally there are a few pending missing features that should be added to the JSON generation: "enums", and from this PR I noticed it would be nice if we have a way to add custom factory constructors / methods.
I mention in case you were planning on extending the JSON generation for better nullability support, if so please wait as that change will certainly clash with mine :)

Now merged :) https://github.com/dart-lang/macros/pull/55


update time displayed is 1 hour off

Update time displayed is one hour in front of actual time.

fix is in main branch and limited verification suggests problem is resolved. Will leave open until further testing proves problem is resolved.


Export to pdf work abnormally

[x] The Plugin is up to date
[x] Obsidian is up to date

Describe the bug
When I print to pdf, line number disappear, line highlight disappear, wrap Failure
To Reproduce
Just export to pdf
Screenshots

pdf show

Occurs on

[x] Windows
[ ] macOS
[ ] Linux
[ ] Android
[ ] iOS

special language might not support in obsidian


Create layer thumbnails

Layers need a thumbnail that optimally updates automatically.

Implemented in render engine, now its up to you guys


Input TextField: caret doesn't appear on focus until textfield contains a character

package;

import openfl.display.Sprite;
import openfl.text.TextField;
import openfl.text.TextFieldType;

class Main extends Sprite
{
	public function new()
	{
		super();

		var textField = new TextField();
		textField.type = TextFieldType.INPUT;
		textField.x = textField.y = 10;
		addChild(textField);
	}
}

In Flash,  clicking the TextField to give it focus makes a blinking caret appear. stage.focus = textField; has the same effect.
In Neko Legacy, the clicking behavior matches, but setting the focus programatically doesn't work at all.
In Neko Next and HTML5, neither method makes a caret appear - it only does until the textfield  contains at least one character. Setting the focus programatically works though (able to input text immediately).
Tested with Haxe 3.2.0, OpenFL 3.3.3 and Lime 2.6.2.

This should be fixed
https://github.com/openfl/openfl/commit/f49508560ac3d30d2b806459739d48cf455ef80a


(Machine Learning)Machine Learning Regression Evaluation Metrics

Proposed title of article
Machine learning regression evaluation metrics
Proposed article introduction
We can determine the performance of a regression model  by  the error rate of the predictions the model makes. We can also measure the performance by knowing how well the regression line fit the dataset. Choosing a proper metric is crucial while evaluating regression models.
In this article we are going to discuss the regression evaluation metrics. we are also going to discuss the advantages and disadvantages of each one of them. Finally we will discuss what a good regression model is.
Key takeaways

Regression evaluation metrics.
Advantages and disadvantages of each discussed metric.
Understand what a good regression model is.

Article quality
The available articles explain these metrics in a shallow way. Some discuss only the popular metrics. This article will be more in-depth and will be covering all the metrics.
References
N/A

Can you list the metrics?


Manually set DNS and ENDPOINT

First off, great work!
Could it be possible to manually set DNS and ENDPOINT address for those cases when you would like your IP Endpoint to be set to your public IP, which is not always available in those scenarios where a LoadBalancer isn't installed? So that it's easier to configure a VPN solution from outside your home.
Ive found that the DNS which is provided by the cluster works well, but my GLI.NET travel router does not like the dns name for dns resolving, wireguard-system.svc.cluster.local.
Proposed changes:
apiversion: vpn.example.com/v1alpha1
kind: Wireguard
metadata:
  name: "wireguard-example-server"
spec:
  mtu: "1380"
  serviceType: "NodePort"
  endpoint: "<IP_ADDRESS>"
  dns: "<IP_ADDRESS>, <IP_ADDRESS>"

This is my current solution:
# <IP_ADDRESS> is my Node IP address
kubectl get wireguardpeer travel-router --template={{.status.config}} -n wireguard-system | bash | sed -e "s/<IP_ADDRESS>/$(curl -s icanhazip.com)/g" | sed 's/, wireguard-system.svc.cluster.local//g' | qrencode -t ansiutf8

Hi, This feature is now available; it's not yet officially released but you can try it by
kubectl apply -f https://raw.githubusercontent.com/jodevsa/wireguard-operator/main/release.yaml
example of usage:
apiversion: vpn.example.com/v1alpha1
kind: Wireguard
metadata:
  name: "wireguard-example-server"
spec:
  mtu: "1380"
  serviceType: "NodePort"
  hostname: "<IP_ADDRESS>"
  dns: "<IP_ADDRESS>, <IP_ADDRESS>"

great to hear that. let me know if you need anything else :)


Crash on swipe

For iOS 11 the app crashes due to a bad table view reference. There are at least three forks that result this issue.
Here and here and here are examples.

@yepher Did you find any fixes?

Yea, several of the forks on this repo fix the issue.


Add an api to check if a type is exactly another type

We have the isSubtypeOf api today but there are cases where you want something more like isExactly.
The specific use case I ran into is for autoListenable. I want to be able to find the widget class for a state class. The way I want to do that is to walk up the super hierarchy until I find the State class, and then grab the type argument from that.
class MyState extends State<MyWidget> {}

Today I just ended up doing a String name check.

We have something like this in the analyzer for InterfaceType. I believe CFE has something like this as well.

This is exists now


Floating-point models

Can tensorflow Lite for Microcontrollers run fp models or just quantized ones? if so, are there examples to run fp models?

@peter197321
tensorflow Lite for Microcontrollers run just quantized, as this is not a bug or feature request please open this issue at StackOverflow for any further queries.


Deprecation warning always_run

always_run is deprecated. Use check_mode = no instead..
TASK [ansible-os-hardening :Get user accounts | DTAG SEC Req 3.21-4 ] ***************
[DEPRECATION WARNING]: always_run is deprecated. Use check_mode = no instead..
This feature will be removed in version 2.4. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.

Fixed in #106


SR v4 Servo Board

Resolves #59

If you're working on a hardware backend, I think it would be best suited to a separate PR (huge PRs are not too enjoyable to manage/review).

Ok. I'll refactor the hardware out into a separate PR.

Removed Hardware implementation @kierdavis Ready for review.


fixed swapped parameter descriptions for x509

Fixes #12382

This pull request is ready to merge

Merged to master. Many thanks!
Unfortunately, the fix does not apply cleanly to 1_1_1-stable.
@noocsharp, could you please make a separate PR for 1_1_1-stable?

This was marked CLA: trivial in the commit. And I agree it is.


Inconsistent L7 Network Policy blocking result

Bug report
I have an httpbin pod in the default namespace that contains an HTTP server listening on port 80. I expose that server through a  k8s service (named httpbin) listening on port 8000 and with targetport 80. Then, I have two HTTP clients, one, named multitool-default, running in a pod in the default namespace and the other, named multitool-testing, running in a pod in a namespace called testing. All HTTP GET requests work correctly. Summary of the set-up:
$> kubectl get pods -n default
NAME                                 READY   STATUS    RESTARTS   AGE
httpbin-66cdbdb6c5-rttnp             1/1     Running   0          44h
multitool-default-59667bd7cb-7rnd4   1/1     Running   0          45h
$> kubectl get pods -n testing
NAME                                 READY   STATUS    RESTARTS   AGE
multitool-testing-556bb5bb55-x4wt8   1/1     Running   0          4d8h
$> kubectl get service -n default
NAME         TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
httpbin      ClusterIP   <IP_ADDRESS>   <none>        8000/TCP   44h
kubernetes   ClusterIP   <IP_ADDRESS>      <none>        443/TCP    70d

Now, I apply the following cnp:
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
description: "L7 policy to restrict access to specific HTTP call"
metadata:
  name: "rule1"
spec:
  endpointSelector:
    matchLabels:
      app: httpbin
  ingress:
  - fromEndpoints:
    - matchLabels:
        app: multitool-default
    toPorts:
    - ports:
      - port: "80"
        protocol: TCP
      rules:
        http:
        - method: "GET"
          path: "/status/202"

When using the multitool-default client, things behave as expected:
$> kubectl exec -ti multitool-default-59667bd7cb-7rnd4 -n default -- curl -X GET -I http://httpbin.default.svc.cluster.local:8000/status/202
HTTP/1.1 202 Accepted
server: envoy
date: Fri, 16 Oct 2020 07:28:22 GMT
content-type: text/html; charset=utf-8
access-control-allow-origin: *
access-control-allow-credentials: true
content-length: 0
x-envoy-upstream-service-time: 6

$> kubectl exec -ti multitool-default-59667bd7cb-7rnd4 -n default -- curl -X GET -I http://httpbin.default.svc.cluster.local:8000/status/201
HTTP/1.1 403 Forbidden
content-length: 15
content-type: text/plain
date: Fri, 16 Oct 2020 07:28:27 GMT
server: envoy

$> k exec -ti multitool-default-59667bd7cb-7rnd4 -n default -- curl -X GET http://httpbin.default.svc.cluster.local:8000/status/201
Access denied

When using the multitool-testing, all traffic towards httpbin should be blocked, and that is what actually happens but instead of getting a quick "Access denied", it hangs forever (until a curl timeout).  Therefore, it seems that if the client is in the same namespace as the server, I see a HTTP 403 response, whereas if it is in a different namespace, the client gets no response.
If I check cilium monitor -v --type l7, I can see the requests of the multitool-default but I don't see the ones from multitool-testing.
Is this an expected behavior?  Thanks!
General Information

Cilium version (run cilium version) ==> 1.8.3
Kernel version (run uname -a) ==> 5.3.18-24.15-default
Orchestration system version in use (e.g. kubectl version, Mesos, ...) ==> Kubernetes 1.18

httpbin server was fetched from ==> https://raw.githubusercontent.com/istio/istio/release-1.7/samples/httpbin/httpbin.yaml
client is using the multitool image ==> praqma/network-multitool
How to reproduce the issue
1 - kubectl apply -f  https://raw.githubusercontent.com/istio/istio/release-1.7/samples/httpbin/httpbin.yaml
2 - Deploy a pod using an image that contains curl in the default namespace and in another namespace
3 - Apply the cnp described above changing the fromEndpoints/matchLabels to match the one of your client
4 - Curl a forbidden url with both clients and see that the result is different

@manuelbuil thanks for opening the GH issue, can you give more information about your environment? Is it running istio?

cc @jrajahalme

@manuelbuil thanks for opening the GH issue, can you give more information about your environment? Is it running istio?

 Therefore, it seems that if the client is in the same namespace as the server, I see a HTTP 403 response, whereas if it is in a different namespace, the client gets no response.

The L7 rules (and the overall CNP) is applicable only in the default namespace. Hence, you would see the denied HTTP response only for pod traffic that's allowed by the CNP in the default namespace.


Cannot use rtc_clk_apb_freq_get() function in esp-idf project (IDFGH-5218)

Hello. I have setup esp-idf project using vscode for programming ESP32 devices. I am working on neopixel driver which requires me to know APB clock frequecncy. After doing a quick internet search, I have found that I can find APB clock by calling a function rtc_clk_apb_freq_get();
I have included a header file
#include "driver/rmt.h"
I am trying the following code:
#include <stdio.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_spi_flash.h"

#include "driver/rmt.h"

void app_main(void)
{
    printf("Hello world!\n");
    uint32_t apb_freq;
    apb_freq = rtc_clk_apb_freq_get();
}

The error I am getting:
../main/hello_world_main.c:21:16: error: implicit declaration of function 'rtc_clk_apb_freq_get' [-Werror=implicit-function-declaration]
     apb_freq = rtc_clk_apb_freq_get();
                ^~~~~~~~~~~~~~~~~~~~
../main/hello_world_main.c:20:14: warning: variable 'apb_freq' set but not used [-Wunused-but-set-variable]
     uint32_t apb_freq;
              ^~~~~~~~

Which suggests that the function is not recognised.
Can someone suggest me what is the issue and how to solve it? Are there any other methods of finding out your APB clock frequency?
I am writing my driver code in platformio, but I am not sure whether this command is only available for esp-idf.
Any advice is appreciated.

#include "soc/rtc.h"
Eventually you are going to end up back at rmt_get_counter_clock
Please remember to close your issues when answered

Okay I see now. It is starting to make more sense. In my program, I have the following:
    uint32_t counter_clk_hz = 0;

    // this emulates the rmt_get_counter_clock() function from ESP-IDF 3.4
    if (RMT_LL_HW_BASE->conf_ch[config.channel].conf1.ref_always_on == RMT_BASECLK_REF)
    {
        uint32_t div_cnt = RMT_LL_HW_BASE->conf_ch[config.channel].conf0.div_cnt;
        uint32_t div = div_cnt == 0 ? 256 : div_cnt;
        counter_clk_hz = REF_CLK_FREQ / (div);
    }
    else
    {
        uint32_t div_cnt = RMT_LL_HW_BASE->conf_ch[config.channel].conf0.div_cnt;
        uint32_t div = div_cnt == 0 ? 256 : div_cnt;
        counter_clk_hz = APB_CLK_FREQ / (div);
    }

Can this code be further simplified by using rmt_get_counter_clock() ?

Yes, using rmt_get_counter_clock can solve the problem.


Endpoints

Completely composed work in 3 weeks.
All branches are connected.
Same commit as main branch

Not need to save it to main branch


Fixed major pagination bugs, added total counts

Added total task counts for all items and fixed a major bug with pagination that was resulting in only a portion of the assignments being synced.

Those who use, please test and let me know if you have issues! I fixed a MAJOR bug with pagination (as opposed to paginating responses, we were instead overwriting and taking only the last response). Thanks!


@anyone => Retire categories2

In preparation for the launch of the new TAGP page, this just takes care of some housekeeping and kills some abandoned code.

Bye bye! 👍


feat: vscodeの拡張を管理する

Walkthrough
The recent update introduces a new feature for managing Visual Studio Code extensions through an installation script. This enhancement includes the creation of a script named my_vscode_extensions.sh, which automates the installation of specified VS Code extensions. Additionally, the primary installation script, install.sh, has been updated to execute this new script under certain conditions, streamlining the setup process for users.
Changes

File(s)
Change Summary

install.sh
Added logic for managing VS Code extensions

vscode/my_vscode_extensions.sh
New script to automate the installation of VS Code extensions

🐇✨
In the realm of code, where ideas intertwine,
A rabbit hopped forth, with a plan so divine.
"Let's manage extensions, in a way so grand,
A script to install them, across the land."
With a flick and a hop, the task was done,
Now setting up VS Code is much more fun!
🎉📦

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

X
Mastodon
Reddit
LinkedIn

Tips
Chat
There are 3 ways to chat with CodeRabbit:

Review comments: Directly reply to a review comment made by CodeRabbit.
Generate unit-tests for this file.

Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:

@coderabbitai generate unit tests for this file.
@coderabbitai modularize this function.

PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:

@coderabbitai generate interesting stats about this repository from git and render them as a table.
@coderabbitai show all the console.log statements in this repository.
@coderabbitai read src/utils.ts and generate unit tests.
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)

@coderabbitai pause to pause the reviews on a PR.
@coderabbitai resume to resume the paused reviews.
@coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
@coderabbitai resolve resolve all the CodeRabbit review comments.
@coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)

You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
The JSON schema for the configuration file is available here.
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community
Join our Discord Community to get help, request features, and share feedback.

2 is done.


fixes DOM parsing of unique, non-exclusive, same-type marks

We were running into a bug where typing into a document with marks that are non-exclusive (e.g. you can have multiple of the same kind, provided they're unique) would wipe out all but one of the marks. The same was/is true of paste.
Demo of the bug here:
https://glitch.com/edit/#!/ethereal-trout?path=index.js:16:0
https://ethereal-trout.glitch.me/
I think this fix is straightforward (added a test) but there may be nuance to MarkType.isInSet vs. Mark.isInSet in this context that i'm not familiar with.

Thank you!

No problem! Let me know when you've tagged this for release.

Out as 1.7.1


Feature Request: Istio VirtualServices

Currently I am able to sync DNS records from Istio Gateways which is great, much appreciated!
It would be great if External DNS could sync hostnames from VirtualServices too though.  It would make the organization for me better.  Let me explain via example:
Currently I have a common chart to deploy istio gateways, and a few other istio related things.  This chart is called my-istio-common, I have VirtualServices setup in my Services / Application charts e.g. my-service-a, my-service-b.
I'm currently doing routing in my-service-a, my-service-b by authority / hostname, and the hostname is specific to the service.  So it ends up that I need to update my-istio-common to get the dns record to sync and then setup everything else hostname related in  my-service-a, my-service-b.  I'd rather only but service related hostname on VirtualService and just have a wildcard on the Gateway.  It would keep things a lot cleaner, and follow the Kubernetes pattern(s) better.

+1
Kiali Console show warning message: More than one Gateway for the same host port combination - because im controlling DNS records with resource Gateway and not VirtualService.

There is a known issue in istio which doesn't allow having multiple gateways pointing to the same domain but using different certificates. Because of that limitation, when using multiple domains, private and public gateways, the only option is to have a global gateway per domain and use wildcard on that domain (*.example.com).
Additional complexity is when the domain is used to host other services (not routed to k8s and istio). For example:
service1.example.com, service2.example.com is going to the ingressgateay
service3.example.com is going to somewhere else.
In this case we can't set wildcard on our DNS using external-dns and because external-dns knows about the Gateway resources only we can't manage those DNS entries via external-dns.
An option would be to use virtualservice to determine the required DNS entry/entries instead of using the gateway(s).

I'm currently unable to use external-dns because I set one VirtualService per application, not a gateway (which is a single one for all). This feature would be much appreciated.

I've also run into a situation where on deploy of the chart we need to chart a dyn record and extra level up so doing so via Gateway is ugly, I'll explain.
We currently deploy versions of myapp, lets say to prod.example.com, this work fine with gateways b/c we use a wildcard so *.prod.example.com resolves.  So when I deploy different versions: v1-myapp.prod.example.com, v2-myapp.prod.example.com both resolve, but I actually also need to create *.v1-myapp.prod.example.com and *.v2-myapp.prod.example.com these records get created in prod.example.com dns zone.  This is currently working great with using Service type Load Balancer.
But with Istio the Gateway is shared so it lives in an istio chart, where the application lives in myapp chart.  B/c the name v1-myapp isn't known when istio chart is deployed this gets ugly.  If I wanted to fix I would need to deploy the istio chart everytime I deploy the service, further that chart would have to get the output of all the current hosts (creating dns entries for) and then append the host to it.  This would be super ugly.  Support for VirtualServices would solve this issue and allow me to use Istio over Service LB

I am currently working on this feature to have external-dns resolving hostnames from Istio virtualservice, which has been set up as one VirtualService per application.
I would like to know if anyone else is already looking into this. Cheers

@olusinae not looking into this but very much needing this functionality - glad to see it's being worked on!

/remove-lifecycle stale


Async set-like commands interface

There is one async c memcached client library, thanks for it.
Internally all command use omcache_io. But there is no async interface for set commands.
Do you plan to add such functions?

I'm not sure what would be a good, generic C interface for asynchronous operations so async mechanisms are currently left to the users to implement.  It's possible to do it using omcache_command and omcache_io similar to how the Python client does it.
Also, in case you're not interested in command statuses and just want to push updates to the servers (and potentially wait for operations to complete or fail without distinguishing between the results) it's possible to just use the plain command api (omcache_set and friends) with a zero timeout and later on call omcache_io to make sure all commands were sent.  This is what https://github.com/ohmu/pgmemcache/ does by default.

Ok, I will do.
For google indexing for people, who searches async memcached c++ interface.
struct protocol_binary_set_request_body_s {
  uint32_t flags;
  uint32_t expiration;
} __attribute__((packed));

static int async_omc_set_cmd(omcache_t *mc, protocol_binary_command opcode,
                             const unsigned char *key, size_t key_len,
                             const unsigned char *value, size_t value_len,

                             protocol_binary_set_request_body_s* expiration_and_flags,

                             uint64_t cas,

                             omcache_req_t *requests,
                             size_t *req_count,
                             omcache_value_t *values,
                             size_t *value_count,

                             int32_t timeout_msec)
{
  if (req_count == NULL || *req_count == 0)
    return OMCACHE_INVALID;

  memset(requests, 0, sizeof(*requests) * *req_count);
  if (values && value_count)
    memset(values, 0, sizeof(*values) * *value_count);

  size_t extra_len = sizeof(protocol_binary_set_request_body_s);
  if (opcode == PROTOCOL_BINARY_CMD_APPEND || opcode == PROTOCOL_BINARY_CMD_APPENDQ ||
      opcode == PROTOCOL_BINARY_CMD_PREPEND || opcode == PROTOCOL_BINARY_CMD_PREPENDQ)
    extra_len = 0;

  omcache_req_t& req = requests[0];
  req.server_index = -1;
  req.header.opcode = opcode;
  req.header.extlen = extra_len;
  req.header.keylen = htobe16(key_len);
  req.header.bodylen = htobe32(key_len + value_len + extra_len);
  req.header.cas = htobe64(cas);
  req.extra = expiration_and_flags;
  req.key = key;
  req.data = value;

  return omcache_command(mc, requests, req_count, values, value_count, timeout_msec);
}

int async_omcache_add(omcache_t *mc,
                      const unsigned char *key, size_t key_len,
                      const unsigned char *value, size_t value_len,

                      protocol_binary_set_request_body_s* expiration_and_flags,

                      omcache_req_t *requests,
                      size_t *req_count,
                      omcache_value_t *values,
                      size_t *value_count,

                      int32_t timeout_msec)
{
  return async_omc_set_cmd(mc, QCMD(PROTOCOL_BINARY_CMD_ADD),
                           key, key_len, value, value_len,
                           expiration_and_flags, 0,

                           requests,
                           req_count,
                           values,
                           value_count,

                           timeout_msec);
}

int async_omcache_delete(omcache_t *mc,
                         const unsigned char *key, size_t key_len,

                         omcache_req_t *requests,
                         size_t *req_count,
                         omcache_value_t *values,
                         size_t *value_count,
                         int32_t timeout_msec)
{
  if (req_count == NULL || *req_count == 0)
    return OMCACHE_INVALID;

  memset(requests, 0, sizeof(*requests) * *req_count);
  if (values && value_count)
    memset(values, 0, sizeof(*values) * *value_count);

  omcache_req_t *req = &requests[0];
  req->server_index = -1;
  req->header.opcode = QCMD(PROTOCOL_BINARY_CMD_DELETE);
  req->header.keylen = htobe16(key_len);
  req->header.bodylen = htobe32(key_len);
  req->key = key;
  return omcache_command(mc, requests, req_count, values, value_count, timeout_msec);
}


proposal: io/io add a new API to copy io.reader

Proposal Details
Sometimes I need a same io.reader, I don't want to create twice or use io.teeReader to read full data to memory. Maybe add a new API to copy io.reader will be convenient.

Related Issues

proposal: io: CopyReader to the io package #64274 (closed)

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

It seems a little different, I don't want to read all data to memory to avoid overload. The method in https://github.com/golang/go/issues/64274 buffer seems will be bigger, finally bigger than memory with the reader call Read().

By definition, io.Readers are single use only. I don't see how this is feasible.


Error logging for invalid appengine-web.xml file type

Adds more logging for #1076

:+1: LGTM

@aslo, can you approve the pr please if you are ok with it? merging is currently blocked.


[BUG]: Can not see UI Flow data in the Power BI dashboard and Power Platform Admin App

Describe the bug
Can not connect any data of Ui flows at the Power BI dashboard and Power Platform admin view apps
'Admin\Sync Template v2 (UI Flow Runs)' flow history status have been succeeded but when I choose edit mode, flow have an issue.
Component (please tell us which flow or app you are experiencing issues with):

Solution [e.g. Core, Nurture] : Core
Version [e.g. 1.29] : 1.71
App or Flow [e.g. Sync Template (v2)] : Sync Template (v2) (UI Flow Runs)

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Additional context
and i can't see anything audit logs Part, too. is it bug or did i miss something when i installed CoE Starter kit?
please give me some advice.
FYI, my region is South Korea, Central.

For the Audit Log, you will need to have set up the Audit Log solution - did you complete that? https://docs.microsoft.com/en-us/power-platform/guidance/coe/setup-auditlog - if you are still experiencing issues, please raise a separate issue for that.
For the UI flow issue, can you confirm you have environments where UI flows have been created and your user has System Administrator access to those environments?

For the Audit Log, you will need to have set up the Audit Log solution - did you complete that? https://docs.microsoft.com/en-us/power-platform/guidance/coe/setup-auditlog - if you are still experiencing issues, please raise a separate issue for that.

https://user-images.githubusercontent.com/76484790/103504525-06728d00-4e9b-11eb-851b-4619fa7003aa.mp4
I have set up the Audit Log Solution but it didn't work. why this happened?

For the UI flow issue, can you confirm you have environments where UI flows have been created and your user has System Administrator access to those environments?

yes. my user is System Administrator access to those environments but it happened again. can u explain it?

For the Audit Log, you will need to have set up the Audit Log solution - did you complete that? https://docs.microsoft.com/en-us/power-platform/guidance/coe/setup-auditlog - if you are still experiencing issues, please raise a separate issue for that.

https://user-images.githubusercontent.com/76484790/103504525-06728d00-4e9b-11eb-851b-4619fa7003aa.mp4
I have set up the Audit Log Solution but it didn't work. why this happened?

For the UI flow issue, can you confirm you have environments where UI flows have been created and your user has System Administrator access to those environments?

yes. my user is System Administrator access to those environments but it happened again. can u explain it?

Let's please cover 1 issue per GitHub issue, that makes it easier to track and for others to read. This on will cover the issue with the UI flows as described in the title.
Can you confirm you have environments where UI flows have been created and your user has System Administrator access to those environments?

Let's please cover 1 issue per GitHub issue, that makes it easier to track and for others to read. This on will cover the issue with the UI flows as described in the title.
Can you confirm you have environments where UI flows have been created and your user has System Administrator access to those environments?

Hello. Checking in again.
Can you confirm you have environments where UI flows have been created and your user has System Administrator access to those environments?

Hello. Checking in again.
Can you confirm you have environments where UI flows have been created and your user has System Administrator access to those environments?

Closing out issues with no action items for our team.


window.physicalSize return zero, and a ugly way to avoid it

Steps to Reproduce
I want to show an animated splash page when app startup .It works in debug mode, but not works in release mode. Because window.physicalSize return a zero size in release mode when app start. Returns zero even with MediaQuery when you use it as soon as app startup.
The code is below

main.dart

void main() {
   SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
    DeviceOrientation.portraitDown,
  ]);
   runApp(MyApp());
   if (Platform.isAndroid) {
      // Set overlay style status bar. It must run after MyApp(), because MaterialApp may override it.
      SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
      SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
    }
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: Models.buildProviders(),
      child: MaterialApp(
        routes: Routers.buildRouers(),
        home: SplashPage(),
        theme: ThemeData.light().copyWith(
          primaryColor: MyColors.app_main,
          accentColor: MyColors.app_main,
          indicatorColor: Colors.grey[100],
          backgroundColor: Colors.white,
          textTheme: TextTheme(button: TextStyle(fontSize: 14,)),
          appBarTheme: AppBarTheme(
            color: Colors.white,
            elevation: 0,
            textTheme: TextTheme(
              title: TextStyle(color: Colors.grey[900], fontSize: 18),
              button: TextStyle(color: Colors.white),
            ),
            iconTheme: IconThemeData(color: Colors.grey[500], size: 10),
            actionsIconTheme: IconThemeData(size: 14),
            brightness: Brightness.light,
          ),
        ),
      ),
    );
  }
}

splash_page.dart

class SplashPage extends StatefulWidget {
  @override
  _SplashPageState createState() {
    Logger.debug("SplashScreen createState");
    return new _SplashPageState();
  }
}

class _SplashPageState extends State<SplashPage> with SingleTickerProviderStateMixin {
  TimerUtil _timerUtil;
  SequenceAnimation animation;
  AnimationController controller;

  double screenWidth, screenHeight;
  int _count = 3;

  @override
  void initState() {
    Logger.debug("_SplashPageState initState");
    super.initState();

    screenWidth = window.physicalSize.width / window.devicePixelRatio;
    screenHeight = window.physicalSize.height / window.devicePixelRatio;

    Logger.debug("width:$screenWidth, height:$screenHeight");

    controller = new AnimationController(vsync: this, duration: Duration(seconds: 3));

    animation = SequenceAnimationBuilder()
        .addAnimatable(tag: 'scale_width', animatable: Tween<double>(begin: screenWidth, end: 90.0), from: Duration.zero, to: Duration(milliseconds: 1200), curve: Curves.easeInToLinear)
        .addAnimatable(tag: 'scale_height', animatable: Tween<double>(begin: screenHeight, end: 90.0), from: Duration.zero, to: Duration(milliseconds: 1200), curve: Curves.easeIn)
        .addAnimatable(tag: 'scale_icon', animatable: Tween<double>(begin: 1.0, end: 0.7), from: Duration.zero, to: Duration(milliseconds: 1200), curve: Curves.linear)
        .addAnimatable(tag: 'move_top', animatable: Tween<double>(begin: 0, end: 110), from: Duration(milliseconds: 1200), to: Duration(milliseconds: 2800), curve: Curves.decelerate)
        .addAnimatable(tag: 'bg_opacity', animatable: Tween<double>(begin: 0, end: 1.0), from: Duration(milliseconds: 1200), to: Duration(milliseconds: 2800), curve: Curves.decelerate)
        .addAnimatable(tag: 'text_move', animatable: Tween<double>(begin: 0, end: 50), from: Duration(milliseconds: 2800), to: Duration(milliseconds: 3500), curve: Curves.decelerate)
        .addAnimatable(tag: 'text_opacity', animatable: Tween<double>(begin: 0, end: 1.0), from: Duration(milliseconds: 2800), to: Duration(milliseconds: 3500), curve: Curves.decelerate)
        .addAnimatable(tag: 'button_move', animatable: Tween<double>(begin: 0, end: 50), from: Duration(milliseconds: 3000), to: Duration(milliseconds: 4000), curve: Curves.decelerate)
        .addAnimatable(tag: 'button_opacity', animatable: Tween<double>(begin: 0, end: 1.0), from: Duration(milliseconds: 3000), to: Duration(milliseconds: 4000), curve: Curves.decelerate)
        .animate(controller);
    controller.forward(); //
    _doCountDown();
  }

  void _doCountDown() {
    _timerUtil = new TimerUtil(mTotalTime: 7 * 1000);
    _timerUtil.setOnTimerTickCallback((int tick) {
      int _tick = tick ~/ 1000;
      if (_tick!=_count) {
        setState(() {
          _count = _tick;
        });
      }
      if (_tick == 0) {
        _goMain();
      }
    });
    _timerUtil.startCountDown();
  }

  void _goMain() {
    Tadsuite.navigateTo(context, Routers.mainPage, replace: true);
  }

  @override
  Widget build(BuildContext context) {

    Logger.debug("_SplashPageState build");
    return AnimatedBuilder(
      animation: controller,
      builder: (context, child) {
        return Container(
          color: Color(0xffffffff),
          child: Stack(
            fit: StackFit.loose,
            alignment: AlignmentDirectional.topCenter,
            overflow: Overflow.clip,
            children: <Widget>[
              Positioned(
                top: (screenHeight / 2 - screenWidth / 2 - 100),
                left: 0,
                right: 0,
                height: screenWidth,
                child: Opacity(
                  opacity: animation['bg_opacity'].value,
                  child: Image.asset(
                    'assets/imgs/logo_bg_white.png',
                    fit: BoxFit.cover,
                  ),
                ),
              ),
              Positioned(
                top: (screenHeight - animation['scale_height'].value) / 2 - animation['move_top'].value,
                child: Container(
                  alignment: AlignmentDirectional.center,
                  decoration: BoxDecoration(color: MyColors.app_main, borderRadius: BorderRadius.circular(15)),
                  width: animation['scale_width'].value,
                  height: animation['scale_height'].value,
                  child: Transform.scale(
                    scale: animation['scale_icon'].value,
                    child: Image.asset(
                      'assets/imgs/launch_image.png',
                      fit: BoxFit.none,
                    ),
                  ),
                ),
              ),
              Positioned(
                top: (screenHeight / 2 +20 - animation['text_move'].value),
                child: Opacity(
                  opacity: animation['text_opacity'].value,
                  child: Text(
                    "The Title Text",
                    style: TextStyle(color: Color(0xff999999), fontSize: 22, fontWeight: FontWeight.w100, decoration: TextDecoration.none),
                  ),
                ),
              ),
              Positioned(
                bottom: (100 + animation['button_move'].value),
                child: Opacity(
                  opacity: animation['button_opacity'].value,
                  child: FlatButton(
                    color: Colors.blueGrey[50],
                    highlightColor: Colors.blueGrey,
                    splashColor: Colors.blueGrey[100],
                    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
                    padding: EdgeInsets.only(left:25, top: 8, right:20, bottom: 10),
                    child: Row(
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: <Widget>[
                      Text("Go Now", style: TextStyle(color: Colors.blueGrey[300], fontSize: 14, fontWeight: FontWeight.w100, decoration: TextDecoration.none),),
                      Text(" "+_count.toString(), style: TextStyle(color: Colors.blueGrey[100], fontSize: 14,),),
                    ],),
                    onPressed: (){
                      _goMain();
                    },
                  ),
                ),
              ),
            ],
          ),
        );
      }
    );
  }

  @override
  void dispose() {
    if (_timerUtil != null) _timerUtil.cancel();
    controller.dispose();
    super.dispose();
  }
}

this is my environment

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [Version 10.0.17134.706], locale zh-CN)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.4)
[√] VS Code (version 1.36.0)
[√] Connected device (3 available)

• No issues found!

However, found a ugly way
Make a delay when app startup.
The code below
void main() {
    Future.delayed(Duration(milliseconds: 200)).then((val) {
     SystemChrome.setPreferredOrientations([
     DeviceOrientation.portraitUp,
     DeviceOrientation.portraitDown,
    ]);
    runApp(MyApp());
    if (Platform.isAndroid) {
      // Set overlay style status bar. It must run after MyApp(), because MaterialApp may override it.
      SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
      SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
    }
  }, onError: (error) {});
}

The point
Many times, the app needs access screen size as soon as it startup, and it's bad to return a zero when use window.physicalSize. Even if let the program slow down a little, wait a second is OK, always this to run correctly.
And, MediaQuery is a bad idea. Sometimes we must initialize AnimationController in initState method with a device size, but MediaQuery cant work without a context.
My English level is not good, you have to spend more time in the text, Sorry.

@yn-tadpole I would advise you to post the issue to https://github.com/dart-lang/sdk/issues as well, window.physicalSize is a part of dart:ui library. Please then post a link here.

Hi @yn-tadpole,
Can you please confirm if you still experience this issue on latest Flutter Stable version ?
Thanks.

Sorry, this item has not been tested recently.

@yn-tadpole, Can you please test this whenever you get a chance and see if it still persists?

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

@markusaksli-nc Hi, can you please reopen this issue, I have exactly the same problem happening on current dev branch. It happens only on Android in release mode.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, 1.22.0-9.0.pre, on Mac OS X 10.15.6 19G2021, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.1)
[✓] VS Code (version 1.44.2)

Thank you for clarifying. Reproducible on the latest master 1.22.0-10.0.pre.121.

flutter doctor -v
[√] Flutter (Channel master, 1.22.0-10.0.pre.121, on Microsoft Windows [Version 10.0.19041.450], locale en-US)
    • Flutter version 1.22.0-10.0.pre.121 at C:\Development\flutter_master
    • Framework revision 6c1a29e54c (6 hours ago), 2020-09-09 20:05:05 -0400
    • Engine revision 564367b297
    • Dart version 2.10.0 (build 2.10.0-107.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at C:\Users\marku\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.5)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.6.30320.27
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.0)
    • Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (6 available)
    • SM G950F (mobile)           • ce12171c51cc001c03 • android-arm64  • Android 9 (API 28)
    • sdk gphone x86 arm (mobile) • emulator-5554      • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)           • windows            • windows-x64    • Microsoft Windows [Version 10.0.19041.450]
    • Web Server (web)            • web-server         • web-javascript • Flutter Tools
    • Chrome (web)                • chrome             • web-javascript • Google Chrome 85.0.4183.102
    • Edge (web)                  • edge               • web-javascript • Microsoft Edge 85.0.564.44

• No issues found!

Minimal reproducible code sample
import 'dart:ui';

import 'package:flutter/material.dart';

void main() {
  print(window.physicalSize.toString());
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Sample',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Sample'),
        ),
        body: Container(),
      ),
    );
  }
}

flutter run
I/flutter (31099): Size(1080.0, 2220.0)

flutter run --release
I/flutter (31336): Size(0.0, 0.0)

At startup, the size of the application window may not be known before Dart code runs. If this value is observed early in the application lifecycle, it may report Size.zero.
flutter doc


[docs] Adding link to "InnerSource principles"

The text "InnerSource principles" didn't link anywhere meaningful.
Not sure if the link https://innersourcecommons.org/resources/books/adoptinginnersource/ that I added is what you would like to link to, so please feel free to replace this with a different link.

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

Yeah, this was an easy one. :)
However I didn't promote promote the new book actually (which would have been https://innersourcecommons.gitbook.io/innersource-patterns/) but rather one of the older books which I was hoping would explain the InnerSource principles, as that was the anchor for the link that you had in the docs.
Just elaborating on this in case you misunderstood where the link was pointing to.

My fault, i thought the link would go to the new patterns book. The link to "Adopting InnerSource" makes more sense here, thanks again and have a good start into 2021

My fault, i thought the link would go to the new patterns book. The link to "Adopting InnerSource" makes more sense here, thanks again and have a good start into 2021


Test cases for model code

This PR covers following:

[x] Update model code, use simple conditions
[ ] Use factories to create test records
[ ] Update test cases for models

Changes are still in progress, raising PR to know the comments or any suggestions on the changes.
Thanks

Hi @swatijadhav I am super happy to see this.  You probably didn't notice that this is not the master branch so it would actually be better to open the PR here: https://github.com/helpyio/helpy . Thank you so much for contributing :)

sure @scott Thanks :)

Raised PR at master branch of helpy app https://github.com/helpyio/helpy/pull/707


Add client ReadLongCharacteristic for Linux

Implemented readlongcharacteristic in linux/gatt/client.go for reading characteristic values larger than the MTU.

Looks good 👍 , but one last thing:
Please use gofmt to automatically format your code. Currently it is missing some whitespaces after commas in function parameters.

Thanks. Is this better?


Emote sounds YML cleanup, add missing sounds

Why / Balance
cleanup good and missing sounds added is also good
fixes mothroach having human gasps
#27569
removes most of the copypaste
Technical details
Gave EmoteSoundsPrototype a ParentDataField and AbstractDataField
Media
Before:

After:

Requirements

[X] I have read and I am following the Pull Request Guidelines. I understand that not doing so may get my pr closed at maintainer’s discretion
[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes
none

added media

b


actix-web v4.0.1

I'm not sure if this is desired or not. And, I'm sure as a Rust developer, you probably have a far greater understanding of the changes that should have been made to list.rs than I do. Especially given that I have zero experience in Rust. But I figured I would give this upgrade a try.
If it all looks good, feel free to merge it!
If not, feel free to make changes, if you're planning on upgrade this repo to v4.0.1 of actix-web.
I've already found this repo to be immensely helpful, and having it on the latest and greatest definitely goes a long way!

:smiling_face_with_tear:


Handle "not logged in" from the device instance in an async manner

Make the check for being logged in from the device instance asynchronous and with a timeout. It is actually okay if a particular device does not initialize. It will always be done from the app instance as well.
This is important because there might be new devices available. The app instance gets all devices from the cloud. Hence, it can retrieve additional devices if available. It will also update capabilities (dimmer enabled, lock enabled) and set the state (on, off, dimmer).

It is nice that the Crownstone system allows for dynamic updates of the available devices without user interaction. However, the Homey does not support that. The user has to manually go and add new devices to the overview.


Spam in logs "Failed to get attributes via JS..."

After upgrading to Selenide 5.2.7, users see the following spam in logs.
Tests work correctly.
Aug 02, 2019 4:04:59 PM com.codeborne.selenide.impl.Describe appendAttributes
WARNING: Failed to get attributes via JS: org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document...

Fixed by https://github.com/selenide/selenide/commit/63d2c0f1c3e4e4dc20a776c9da831883ff2e23b1