Blazor memory

Add a section with details about how memory works in Blazor Server applications and how to investigate potential memory issues. Here is the content.
Blazor server memory model
Blazor server creates a new circuit per user session. Each user session corresponds to a single document being rendered in the browser, for example, multiple tabs create multiple sessions.
Blazor server maintains a constant connection to the browser that initiated the session (circuit from now on). When the connection is lost for some reason (user loses network connectivity, or abruptly closes the browser), Blazor has a recovery mechanism that places a limited number of circuits in a "disconnected" pool, giving clients a limited amount of time (by default 3 minutes) to reconnect and re-establish the session.
After that time, Blazor will release the circuit and discard the session. From that point on, the circuit is eligible to be garbage collected and it will be claimed when a collection for the generation it is in, is triggered. One important aspect to understand is that circuits have a long lifetime, which means that most of the objects rooted by the circuit will reach Gen 2, and as a result, you might not see those objects being released until a Gen 2 collection happens.
Understanding how to measure memory usage in general
There are a few prerequisites that we need to understand:

The app needs to be set to Release. Debug measurements are not relevant as the generated code is not representative of the code that will be used in production.
The app needs to run without a debugger attached (Run without debugging or CTRL+F5) as this might also affect the behavior of the app and spoil the results.
You need to understand the different types of memory to understand how much memory it is actually in use by .NET. Generally people look at the Task manager, which typically offers an upper bound of the actual memory in use. There are several helpful articles about this:

https://github.com/Maoni0/mem-doc/blob/master/doc/.NETMemoryPerformanceAnalysis.md

Specially interesting is the section on memory fundamentals

https://devblogs.microsoft.com/dotnet/work-flow-of-diagnosing-memory-performance-issues-part-0/
https://devblogs.microsoft.com/dotnet/work-flow-of-diagnosing-memory-performance-issues-part-1/
https://devblogs.microsoft.com/dotnet/work-flow-of-diagnosing-memory-performance-issues-part-2/

Memory usage applied to Blazor
We compute the memory used by blazor as follows:

Active circuits * PerCircuitMemory + DisconnectedCircuits * PerCircuitMemory

The ammount of memory a circuit uses is largely dependent on how the app is written, and it is an app concern. The number is the number of concurrent clients that have an active session, so you can think of MaxMemory / PerCircuitMemory = MaxActiveCircuits.
For a memory leak to happen in Blazor, the following things need to be true:

The memory must be allocated by the framework, not the app (if you allocate a 1GB array in your app, it is your apps problem).
The memory must not be actively being used (if you have MaxActiveCircuits running, it is a scale issue, not a memory leak) which means the circuit is not active and has been evicted from the disconnected circuits cache.
A garbage collection for the generation the circuit is in has run but has not been able to claim the circuit.

And the reason it has not been able to is because another object in the framework is holding a strong reference to it.

In any other cases, there is no memory leak. If the circuit is active (connected or disconnected) is still in use.
If a GC for the generation the circuit is in does not run, the memory won't be released (the GC does not need it).
If a GC for that generation runs and frees the circuit, you need to validate the memory against the GC stats, not the process, as .NET might decide to keep the virtual memory around.
If the memory is not freed, you need to find a circuit that is not either active or disconnected and that is being rooted by another object in the framework. In any other case, it is an app issue.
Things that you can do to reduce memory usage

Limit the total amount of memory used by the .NET process.

See https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector for details.

Reduce the number of disconnected circuits.
Reduce the time a circuit is allowed to be in the disconnected state.

Configure the GC in workstation mode instead of server (this will more aggressively collect).

Additional things to look for/do

Capture a memory dump of the process when it is taking that much memory and see what objects are taking the most memory and where are those rooted from (who holds a reference to them).
.NET in Server mode, will not release the memory to the OS immediately unless it needs to do so. There are settings you can put in the csproj file t control this behavior.
Server GC assumes that your app is the only one running on the system and can use all the resources, if your system has 50GB, the GC will try to use those 50GB before it triggers a Gen 2 collection.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 9b20b470-161a-8723-b66d-c0c1804874f0
Version Independent ID: 2712f7a2-90e7-0012-f7d9-f3a7e7e345d7
Content: Host and deploy ASP.NET Core Blazor Server
Content Source: aspnetcore/blazor/host-and-deploy/server.md
Product: aspnet-core
Technology: aspnetcore-hostdeploy
GitHub Login: @guardrex
Microsoft Alias: riande

/cc: @guardrex
In addition to that, for future reference, there is an experimental tool that I built. dotnet blazor-server-memory-analyzer that analyzes the memory of a running Blazor Server app or memory dump and display useful report information, like the number of circuits in memory, the number of components on each circuit, and for each circuit, an approximate of the memory the circuits use.

@javiercn ...

In addition to that, for future reference, there is an experimental tool that I built.

Should I open an on-hold tracking issue to get back to you sometime next year and ask if it's no longer experimental and eligible for doc coverage, or do you just want to let me know if/when you feel that the experimental tool should be covered (no doc tracking issue)?

Should I open an on-hold tracking issue to get back to you sometime next year and ask if it's no longer experimental and eligible for doc coverage, or do you just want to let me know if/when you feel that the experimental tool should be covered (no doc tracking issue)?

Sounds good.

Nothing official. Tool is here https://github.com/javiercn/BlazorDumpAnalysisTool


Use my own stubs

It would be great if we could her/his own Wordpress stubs, e.g. via some option/setting.
Basically https://github.com/humanmade/psalm-plugin-wordpress/blob/master/Plugin.php#L96 just needs to check if some file x exists and use those stubs instead of the ones hardcoded.
OR:
if psalm config is specified, check the psalm config file for
That way one could easily add stubs for other plugins too
(which then we could also custom hooks args from https://github.com/humanmade/psalm-plugin-wordpress/issues/12#issuecomment-1003797361)

@joehoyle rebased https://github.com/humanmade/psalm-plugin-wordpress/pull/24 to fix the merge conflicts. Please merge it as this is actually what fixes this issue


Add theming options

Dark theme and light theme needs to be integrated

I am a GSSOC 2021 participant and would like to work on this project. Do we have any groups for discussions related to this?

We'll soon be starting it. Thanks for asking .

can you please assign me this?

@Mustafiz04 Please Look at it Without Dark theme

Please Look at it With Dark theme

One Thing I faced some Issue (I don't know what happened I never change any server code ):  Due to this I am unable to log in Till now the dark theme works well with Auth page and Home page, as the rest of the pages are empty I am not able to add that functionality in those pages (we can add later once all pages are ready )
So Can I make a Pull request so that you and the team can review it?

Make a PR. But before I wanted to make sure you used the Theme.js file to implement the dark theme is it? And where do you think on keeping the button to switch the dark theme?

Make a PR. But before I wanted to make sure you used the Theme.js file to implement the dark theme is it? And where do you think on keeping the button to switch the dark theme?

No, I didn't use Theme.js and There is a reason behind that since I used context API to tell the application what is the current theme and sadly we can't use useContext hook inside our Theme.js I tried that but not able to get the theme status in Theme.js So I created my own Context of a theme called 'newTheme' and used in the application anyway I will made a PR and have a look at the file structure and code and let me know if it fine.

Make a PR. But before I wanted to make sure you used the Theme.js file to implement the dark theme is it? And where do you think on keeping the button to switch the dark theme?

No, I didn't use Theme.js and There is a reason behind that since I used context API to tell the application what is the current theme and sadly we can't use useContext hook inside our Theme.js I tried that but not able to get the theme status in Theme.js So I created my own Context of a theme called 'newTheme' and used in the application anyway I will made a PR and have a look at the file structure and code and let me know if it fine.

See the file structure and I added two folders hooks and providers

Make a PR. But before I wanted to make sure you used the Theme.js file to implement the dark theme is it? And where do you think on keeping the button to switch the dark theme?

No, I didn't use Theme.js and There is a reason behind that since I used context API to tell the application what is the current theme and sadly we can't use useContext hook inside our Theme.js I tried that but not able to get the theme status in Theme.js So I created my own Context of a theme called 'newTheme' and used in the application anyway I will made a PR and have a look at the file structure and code and let me know if it fine.  And Regarding the button to switch the Theme did you notice the small moon and sun icon

Let me know if can make a PR?

Make it. We'll see if it gonna be merged or not. Nice job Btw. Loved the dark theme colors you have picked. I guess you have reversed teh hue. Isn't it?

Make it. We'll see if it gonna be merged or not. Nice job Btw. Loved the dark theme colors you have picked. I guess you have reversed teh hue. Isn't it?

Check out this #58 Pull request It has two conflicts tell me what should I  do ?

@ADRE9 Check this out Done with Dark theme :

@ADRE9 You can close this issue since it is resolved.


Move dht tests from js-ipfs-api to interface-ipfs-core

Needs https://github.com/ipfs/interface-ipfs-core/pull/36

Needs:

[ ] https://github.com/ipfs/interface-ipfs-core/pull/36#issuecomment-247822522

interface-ipfs-core 0.18.3 released

current status in CI:
Message:
    Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
Stack:
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

Seems linting in interface-ipfs-core runs in different env than the tests for js-ipfs-api.

all right :) thank you @VictorBjelkholm


Doesnt save settings(L5)

Hi, for some reason it wont save changes. Here is my code
use anlutro\LaravelSettings\SettingStore as Setting;

class SettingsRepository extends BaseRepository
{
    function __construct( Setting $setting )
    {
        $this->setting = $setting;
    }

    public function findAll()
    {
        return $this->setting->all();
    }

    public function save()
    {
        $this->setting->save();
    }
}

Looks correct to me. My best guess is that your save method never gets called. Put a die('debug') in there if you want to make sure.

I got it working passing request data
    public function save( $request )
    {
        $this->setting->set( $request->except('_token') );
        $this->setting->save();
    }


crd installation + test

We had broken RBAC rules in one of the previous PRs and didn't notice because cluster-driver-registrar continued running and we didn't have tests for it's expected behavior.
This PR adds such a test and also updates the CRD installation.

deployment and e2e works on my test system


Include only H3 in table of contents

Summary
In the API docs, the generated table of contents includes all header of the level of 3 or more. However, it shows them flat, all on the same level, which is confusing.
This PR changes that so only headers of level exactly 3 are included.
Before (note this.isNot):

After:

The generated docs with this change: https://robinpokorny.github.io/jest/docs/expect.html#content
Test plan
—

Codecov Report

Merging #3132 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3132   +/-   ##
=======================================
  Coverage   69.31%   69.31%
=======================================
  Files         157      157
  Lines        5560     5560
  Branches        3        3
=======================================
  Hits         3854     3854
  Misses       1705     1705
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21d9043...c6096ca. Read the comment docs.


Cannot uninstall sample plugin CliCmd (call_cli_cmd)

Command
cf uninstall-plugin CliCmd
What occurred
Uninstalling plugin CliCmd...
panic: runtime error: index out of range
goroutine 865 [running]:
panic(0xbd15c0, 0xc04200c030)
/usr/local/go/src/runtime/panic.go:500 +0x1af
code.cloudfoundry.org/cli/plugin/rpc.(*CliRpcCmd).CallCoreCommand(0xc04214d200, 0x0, 0x0, 0x0, 0xc042396030, 0x0, 0x0)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/plugin/rpc/cli_rpc_server.go:179 +0x4f3
reflect.Value.call(0xc04249be00, 0xc04213e048, 0x13, 0xcb85a3, 0x4, 0xc042235ed0, 0x3, 0x3, 0x0, 0x0, ...)
/usr/local/go/src/reflect/value.go:434 +0x5cf
reflect.Value.Call(0xc04249be00, 0xc04213e048, 0x13, 0xc042235ed0, 0x3, 0x3, 0xc0425e6e40, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:302 +0xab
net/rpc.(*service).call(0xc0421eb0c0, 0xc0421eae40, 0xc0423f8030, 0xc0425fe200, 0xc042200c80, 0xb84340, 0xc042203da0, 0x197, 0xb63c40, 0xc042396030, ...)
/usr/local/go/src/net/rpc/server.go:383 +0x14f
created by net/rpc.(*Server).ServeCodec
/usr/local/go/src/net/rpc/server.go:477 +0x428
PLUGIN ERROR: Error from CliCommand:  read tcp <IP_ADDRESS>:56984-><IP_ADDRESS>:56980: wsarecv: An existing connection was forcibly closed by the remote host.
---------- Command output from the plugin ----------
----------              FIN               -----------
What you expected to occur
Uninstalling plugin CliCmd...
OK
CLI Version
6.25.0+787326d.2017-02-28
CC API Endpoint Version
API endpoint:   https://api.run.pivotal.io
API version:    2.78.0
CF Trace
Platform & Shell Details
Windows 101 64-bit
Any other relevant information

Thanks for reporting this. This plugin seems to have never uninstalled well.
We have removed it and updated the documentation to point to the plugin that should work.
Cheers,
Dies Koper
CF CLI PM


need to support azure firewall multiple public address deployment

Azure released this new feature to add more than 1 public ip addresses to azure firewall.
It's beneficial to the incoming and outgoing traffic management.
https://docs.microsoft.com/en-us/azure/firewall/deploy-multi-public-ip-powershell
Here is the powershell cli which can achieve this.
$rgName = "resourceGroupName"
$vnet = Get-AzVirtualNetwork   -Name "vnet"
-ResourceGroupName $rgName
$pip1 = New-AzPublicIpAddress   -Name "AzFwPublicIp1"
-ResourceGroupName "rg"   -Sku "Standard"
-Location "centralus" `
-AllocationMethod Static
$pip2 = New-AzPublicIpAddress   -Name "AzFwPublicIp2"
-ResourceGroupName "rg"   -Sku "Standard"
-Location "centralus" `
-AllocationMethod Static
New-AzFirewall   -Name "azFw"
-ResourceGroupName $rgName   -Location centralus
-VirtualNetwork $vnet `
-PublicIpAddress @($pip1, $pip2)

@chriseizus thanks for reaching out - I am tagging the right team to take a look at this @nickzhums

Add "Service Attention" label for service team to double confirm swagger is ready for the new feature and submit a request to release a new SDK version including it. thanks.


Android - Ensure host config options are respected

Need to go through and make sure that all host config settings are correctly applied to a card.

Duplicate of #1125


[FEATURE] Allow tenant selection when creating Dashboard Objects

Is your feature request related to a problem?
The Dashboard Object spec provides a nice way to inject index patterns/visualizations/dashboards, but it seems like it's only able to provide these resources to the global tenant.
What solution would you like?
Specifying the tenant to target for the Dashboard Object. Possibly other resources?
E.g.
resource "opensearch_dashboard_object" "test_index_pattern_v7" {
  body = <<EOF
[
  {
    "_id": "index-pattern:cloudwatch",
    "_type": "doc",
    "_source": {
      "type": "index-pattern",
      "index-pattern": {
        "title": "cloudwatch-*",
        "timeFieldName": "timestamp"
      }
    }
  }
]
EOF
  security_tenant = "my_tenant"  # Add this.
}

What alternatives have you considered?
It seems like you can generally specify tenancy in direct API calls by doing something like providing security_tenant=<something> as a URL parameter. For now probably going to invoke the API directly to copy dashboard objects around, but it would be nice if security_tenant was an option on the resource, or the provider instantiation, or something.
Do you have any additional context?
Sorry if I'm missing something!

Similar to:

https://github.com/opensearch-project/terraform-provider-opensearch/issues/104

@peterzhuamazon It looks like https://github.com/opensearch-project/terraform-provider-opensearch/issues/104 does cover this request. Happy to have this be closed and follow that, instead.


User Creation double-quotes names with @ symbol

# titan.yml

users:
  - name<EMAIL_ADDRESS>
This creates the user with extra quotes,

Name
Created
Login_name

and in order to log in as this user, need to do something like
<EMAIL_ADDRESS>

do we need to remove the double quotes from the name? , in order to log in as the user ?
@dexhorthy

Oof yeah this looks like a bug. This should've been ported to ResourceName but it wasn't.
https://github.com/Titan-Systems/titan/blob/main/titan/resources/user.py#L37-L42
You can get around it by specifying login_name. I'll get it fixed in the next release

confirmed this is fixed in 0.8.1 - thanks!


chore: Update max delay for NodeClaim lifecycle controller

Fixes #N/A
Description
Updated max delay in Nodeclaim lifecycle counter
How was this change tested?
make presubmit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/lgtm
/approve

Pull Request Test Coverage Report for Build<PHONE_NUMBER>8
Details

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage remained the same at 80.876%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/controllers/nodeclaim/lifecycle/controller.go
0
1
0.0%

Files with Coverage Reduction
New Missed Lines
%

pkg/test/expectations/expectations.go
2
94.73%

Totals

Change from base Build<PHONE_NUMBER>0:
0.0%

Covered Lines:
8479

Relevant Lines:
10484

💛  - Coveralls


Enabling Interactive mode if no arguments specified

@vkareh  PTAL

/ok-to-test

This change makes me think that maybe we should always default to interactive mode unless all required fields are passed in the CLI. What do you think?

@vkareh done please chk now

/test lint

/lgtm


Data Balance UX

Description

Checklist

[ ] I have added screenshots above for all UI changes.
[ ] I have added e2e tests for all UI changes.
[ ] Documentation was updated if it was needed.

Codecov Report

Merging #5 (afbc5e3) into main (a33d2ac) will decrease coverage by 14.33%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main       #5       +/-   ##
===========================================
- Coverage   89.91%   75.58%   -14.34%
===========================================
  Files          89       10       -79
  Lines        3839      258     -3581
===========================================
- Hits         3452      195     -3257
+ Misses        387       63      -324

Flag
Coverage Δ

unittests
75.58% <ø> (-14.34%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

erroranalysis/erroranalysis/version.py

...ponsibleai/responsibleai/rai_insights/constants.py

...bleai/responsibleai/_managers/explainer_manager.py

raiutils/raiutils/common/retries.py

raiutils/raiutils/models/__init__.py

...sibleai/responsibleai/_tools/shared/base_result.py

raiutils/raiutils/webservice/__init__.py

erroranalysis/erroranalysis/_internal/constants.py

raiutils/raiutils/dataset/__init__.py

...ponsibleai/responsibleai/_managers/base_manager.py

... and 69 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a33d2ac...afbc5e3. Read the comment docs.


working with not anaconda, pure python+pip env

could you tell me work with pure python and pip environment

Hi,
This should work provided you have at least python 3.5, if you encounter any issues let us know


change to kubernetes Environment page response empty

@tangxusc Can you give some more details on what you are trying to do and what version of Rancher you are running?

my step:
1.docker run -d --restart=always -v /rancher/db:/var/lib/mysql --name rancher-server -p 8888:8080  rancher/server
2.Manage Environments-->Add Environment(Environment Template is kubernetes)
3.Switch to new Environment
4.Browser does not display content
------------------rancher version--------------------
Rancher 	v1.4.2
Cattle 	v0.176.10
User Interface 	v1.4.9
Rancher CLI 	v0.4.1
Rancher Compose 	v0.12.2

I restart rancher, the page can be displayed

I modified the language settings for Chinese, there is no page content
I will change the language into English, the page will appear content

This was a broken translation in Chinese in some version and resolved in current releases.


didn't process the occlusion loss?

Hi, I have been trying to train fastflownet. After reference to the IRR-PWC, I found occlusion wasn't considered in fastflownet model, So I'd like to ask: if I want to use occlusion loss, how can occlusion be added to model part?

For each decoder, you can change the output channels from 2 to 3, with one channel to estimate occlusion. Also, for the input of each decoder, you should add the occlusion map together with optical flow for coarse-to-fine estimation.


Add credential-Entity for better testing, encapsulation and persistence stuff

It would be fine to have an entity-Object for the credential stuff. Brings the following benefits:

Encapsulation of User and Password-Data
Better testing experience
TypeHinting in services
Database and schema-creation by doctrine and possibility to user other DBs like postgres, mongo, sqlite, etc.

I think there are many other benefits.
The properties could be:

hash
usernamePlainText
username
passwordPlaintext
password
commentPlainText
comment
email (https://github.com/MichaelThessel/pwx/issues/28)
expiresAt

Where the plaintext properties won't be persisted.
Then you can pipe this entity easy through encrypting and decrypting services.
Here is an old and informative example with the use of annotations and CLI:
http://ahoj.io/silex-doctrine2-orm

Sounds good to me. Feel free to go ahead with it. I'm using Doctrine ORM for pretty much all my custom PHP projects. It seemed overkill for PWX at the time but I don't think it would hurt to add it. I definitely see the testing benefits.

I'm working on this issue in the fork: https://github.com/rabbl/pwx/tree/issue_32
Until now I added the Doctrine-ORM-Service-Provider
The config in app.php got some more parameter
Added Credentials Entitiy and EntityRepository.
To not confuse, the name of the table is: entity_credentials_table
The following commands are working:
app/console orm:schema-tool:create
app/console orm:schema-tool:update --force
app/console orm:schema-tool:drop --force

Some comments:

Some comments:

Doctrine supports Event Listeners. Instead of having 2 attributes for each attribute in the entity you could use the postLoad and preUpdate event listeners to de/encrypt the data. That way you wouldn't need the plainText entities. Alternatively you could use the getter and setter functions for that.
We don't need an id and hash attribute. Hash as primary key should be fine.
Till we add the email functionality no need to add an attribute for it. Better not to have lose ends.
Same for the oneTimeView
We don't need the expired attribute. Entities get deleted automatically when they are expired. Code. That said that functionality is not super pretty. Currently the entities get cleaned on each request. I didn't want to have people run cron for PWX entity cleanup. Might be good to add a cron option in the future. Unless you run a really high volume install it shouldn't be a big deal.

Alternatively you could use the getter and setter functions for that, don't actually do that. That would require an additional local cache. Otherwise you would need to de/encrypt every time.

In https://github.com/rabbl/pwx/commit/e9f8aa2eb6b2e79731034c50c1a5f2e5d4b8a4e6 I made the proposed entity changes.
The SQL to create the table is almost the same by now.
CREATE TABLE entity_credentials_table (
    hash VARCHAR(10) DEFAULT '' NOT NULL,
    username LONGTEXT NOT NULL,
    password LONGTEXT NOT NULL,
    comment TEXT NOT NULL,
    expiresAt DATETIME NOT NULL,
    PRIMARY KEY(hash)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;

That looks good so far. Just one comment.
Don't suffix the table name with _table. I usually don't add the @table annotation at all and leave it to Doctrine to name the tables. It will give the table the same name as the class name.

Once we got the Doctrine ORM fully in place, we can remove the install folder with the example SQL and update the documentation to use the Doctrine command line client to create the table.

I merged the pull request. I had to do some changes. Some of the patterns were not 100% correct. Those are the changes I did 3803ae1985d3d02e8cf70395ed220f0ccfa06f0c. The main change is that I removed the encryption service again. I went with an abstract class that inherits from an encryption class instead. This class takes care of the encryption of entities automatically.


Refactor operators and add MKLDNN

Description
This is to add refactored operators and MKLDNN.
Checklist
Essentials

[ ] Passed code style checking (make lint)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[ ] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
[ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

@marcoabreu the requests have been fixed. can you approve it?

All comments have been resolved and pass the CI test.
Thanks, @zheng-da :)
@szha , @cjolivier01 , @marcoabreu please help take a reveiw again and merge the PR :)

Arguments for merging this PR despite the disabled cpp tests:

Python (and other language) tests passes. The frontend tests are the primary indicator for code quality. This suggests the code is in decent shape.
cpp tests hasn't been run in CI for a year and we have been just fine.
The cpp tests are failing in arcane ways that know one knows how to fix. Even their creator @cjolivier01
We need this to get in soon so that people can try it before 1.2 release. This is far better way of catching bugs than the cpp tests.

There's only two out of 10-or-15-or-so tests that are disabled.
I am fine with the merge from the point of the cpp tests, although it's possible there is something wrong, it's not clear if it's the test or the main code, so I agree with @piiswrong that if it's really broken, we will find out soon enough after it is merged.
Both tests are disabled for the same behavior.

To me, it really sounds like there are quite a decent number of known issues but for whatever reason, there's a push to get this merged. Honestely, I'm afraid of this being PR being merged and disabled tests and features being forgotten and thus increasing technical debt, which in the end is going to harm our users. Especially if we are aware that for example operator tuning is broken on Windows, it's IMO not the right thing to just disable the test or the entire feature in the default CMake config. If a user wants to test the feature, it will hang for them and we will probably have forgotten about it.

" features being forgotten"?  what features?

Operator Tuning was never supported on Windows and has nothing to do with this PR.

Where is it stated that operator tuning is not supported on Windows? Do users get a proper error message? Also, I don't see why we should not support a certain feature on a platform if there is no platform dependency.
According to http://jenkins.mxnet-ci.amazon-ml.com/blue/rest/organizations/jenkins/pipelines/incubator-mxnet/branches/master/runs/384/nodes/433/steps/768/log/?start=0 we are in fact successfully running operator tuning on Windows.
Example output:
test_operator_gpu.test_conv ... [04:50:06] c:\jenkins_slave\workspace\build-gpu@3\src\operator\nn\cudnn\./cudnn_algoreg-inl.h:107: Running performance tests to find the best convolution algorithm, this can take a while... (setting env variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
[04:50:06] C:/jenkins_slave/workspace/build-gpu@3/src/operator/nn/convolution.cu:70: This convolution is not supported by cudnn, MXNET convolution is applied.
[04:50:06] C:/jenkins_slave/workspace/build-gpu@3/src/operator/nn/convolution.cu:70: This convolution is not supported by cudnn, MXNET convolution is applied.
ok

It is related to this PR to some degree since it disables a test.

What you're showing there is CUDNN tuning, which is something different.

The cpp unit tests aren;t run ever on Windows. In fact, they can;t be built on Windows at this time due to no static linking/dllexport issues, etc.
While I was refactoring the cpp unit tests, I noticed that it wasn;t turned off like it should be, so I fixed that.  The disabling of the test was not done because of any changes in this PR.

Okay, thanks for elaborating. I think we should address this at a later point in time I dependently of this PR.

I did bisect. This patch caused MXNet.jl testing failure.
(Ref https://travis-ci.org/dmlc/MXNet.jl/jobs/345129890#L1486)
The failed case here:
https://github.com/dmlc/MXNet.jl/blob/4038704f1f8bd733bc2aab5205068dddbbf122a2/test/unittest/symbolic-node.jl#L140

I built the python one.
In [6]: mx.sym.Convolution(attr={'a': 42})

and got similar error message.
This PR prevent user from attaching arbirary attr dictionary.
Is this change intended?

I guess the reason is that NNVM handles operator arguments differently?
@piiswrong @szha I see mx.sym.Convolution has an argument called attr, but attr doesn't exist in ConvolutionParam and isn't listed in the document. How was this argument handled originally?

Could somebody please elaborate why that package is hosted in another
repository and thus not part of our PR validation chain?

@marcoabreu
About the reason of hosting Julia code in another repository,
Julia's package manager is built on top of git, and it requires some specific structure in the cloned dir.
For example, we have MXNet.jl, we cloned it as MXNet and it should have following dir structure:
MXNet/     # the pkg name
  |- src/
  |    |- MXNet.jl   # this file is the pkg entry point, should named as same as pkg name
  |    |- other.jl ... etc
  |- test/
  |    |- runtests.jl  # test cases entry point

Due the git cannot checkout a subdir as svn does, the only choice is to put Julia binding as a single repo.

and thus not part of our PR validation chain?

I tried to ping developer several times on both GitHub and Slack, but did not get progress.
See:

https://github.com/apache/incubator-mxnet/pull/8727
https://github.com/apache/incubator-mxnet/pull/8175

I finished the patch already, but I do not have any permission to trigger new Jenkins script via PR (https://github.com/apache/incubator-mxnet/pull/8175#issuecomment-336340005).
I beg for help.

I have commented under #8175. Let's keep this PR clean from that conversation.


Source Extension Connection Error

Source information
YakshaScans 1.4.36
Source language
English
Steps to reproduce
Website is working but Extension is not connecting. Connection error.

Expected behavior
Should show the manga lists..
Actual behavior
Showing Java.exception........Connection Error!
Mihon/Tachiyomi version
Yokai v<IP_ADDRESS>
Android version
Android 12
Other details
Yes I checked on other version of Tachiyomi, Mihon, Aniyomi etc... The extension worked the same.
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version 0.15.3.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

Sounds like an issue with your ISP. Can you try with another network (mobile/wifi) or a VPN?


Support for Self Hosted Plausible

Is your feature request related to a problem? Please describe.
I'm hosting my own Plausible server, I don't see how I can integrate that?
Describe the solution you'd like
An optional parameter with domain
Describe alternatives you've considered
I tried to update my config to this, but that didn't seem to work
plausibleAnalytics: {
  plausibleDataDomain: '<domain in plausible>', // e.g. tailwind-nextjs-starter-blog.vercel.app
  plausibleSrc: 'https://<my domain>/js/script.js',
},

I think it depends on the pliny module.
Have you tried by setting the dataApi prop? https://github.com/timlrx/pliny/blob/b91eb82057989d428496cf8e94accf70564b175b/packages/pliny/src/analytics/Plausible.tsx#L4

I think it depends on the pliny module. Have you tried by setting the dataApi prop? https://github.com/timlrx/pliny/blob/b91eb82057989d428496cf8e94accf70564b175b/packages/pliny/src/analytics/Plausible.tsx#L5 Its possible to proxy the domain: https://github.com/timlrx/pliny/blob/b91eb82057989d428496cf8e94accf70564b175b/packages/pliny/src/analytics/Plausible.tsx#L11

Thanks, it even seems to be this simple:
plausibleAnalytics: {
  plausibleDataDomain: '<domain in plausible>', // e.g. tailwind-nextjs-starter-blog.vercel.app
  src: 'https://<my domain>/js/script.js',
},


Add the .gitignore file

Codecov Report

Merging #222 (0af2983) into main (c2eca16) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #222   +/-   ##
=======================================
  Coverage   98.07%   98.07%
=======================================
  Files          98       98
  Lines       11545    11545
  Branches     3036     3036
=======================================
  Hits        11323    11323
  Misses         85       85
  Partials      137      137

@daiyip mind help reviewing?

@D-X-Y Checked it in for you, as it requires copybara changes.

Nice, thanks!


Max amount transactions are not reported as updated transactions when mined

What is the bug?
When sending a transaction that involves all the available funds in a given seed, the SDK does not report back when the transaction is mined on the updated transactions event.
Reproducing steps

fund a wallet with some amount X (multiple notes)
sync the seed on additional device for control
send max amount (X - fee)  to someone
wait for transaction to be mined on second wallet
verify that transaction is handled in originating device.

Expected: SDK should notify client if the transaction being updated
Result: transaction is still pending on originating device while it's properly  handled on second device.
Additional context
works fine when the transaction is Max amount - fee - 1 zatoshi.

That's so odd that the amount impacts notification. What do you think the root issue is here? Is there any chance of this occurring at the Rust level--and therefore on other platforms--or is this an issue with a notification not being triggered in a way that's specific to Swift?

yes, it's odd. I'm creating a test with darksidewalletd to reproduce this in an abstract client agnostic way.

It appears that the problem could be transactions that have no change output. Max Amount are the most common of the kind but given a note of  (X + Fee) Zec and a user sending X Zec to from that wallet should also produce this error

Haven't looked into this yet, but I'm almost certain it has the same root cause as https://github.com/zcash/librustzcash/issues/356 - assumptions being made about how the output-shuffling logic works for Sapling, that don't hold up in the case of no change.

I think https://github.com/zcash/librustzcash/issues/356#issuecomment-805513550 is at least a factor in this issue, if not the entire cause. This issue does not make clear under what recipient address types the issue occurs; if it is only occurring for sends to transparent addresses, that suggests it is exactly the linked problem.

@pacu could you see if https://github.com/zcash/librustzcash/pull/359 changes anything for you?

@str4d I checked out that branch and tested it with the same results.

Just to summarize: This issue was had multiple causes. Some for z->t transactions and some for z->z.

z->t transactions were fixed by https://github.com/zcash/librustzcash/pull/359
z->z transactions were fixed by https://github.com/zcash/librustzcash/pull/360

This issue now appears to be fully resolved.


Zooming Causes Markdown Previews to be Reloaded

Steps to Reproduce:

Open the markdown preview
Zoom in or out

Bug
The preview page is reloaded.
The cause is this line in htmlPreviewPart:
	    this._modelChangeSubscription = this.model.onDidChangeContent(() => {
					if (this.model) {
						this.webview.contents = this.model.getLinesContent();
					}
				});

I don't know why onDidChangeContent is fired while zooming. We may be able to workaround the issue but it does seem odd that onDidChangeContent is being fired here

Root cause is in the markdown preview. It updates on vscode.workspace.onDidChangeConfiguration


Link to NuGet packages

If someone is reading documentation about a class, namespace or assembly it would be great if the corresponding NuGet package is linked if available.

⚠ Idea migrated from UserVoice
Created By: Saqib Javed
Created On: 2017/08/17 12:48:40 +0000
Votes at Migration: 1
Supporters at Migration: 1

Duplicate of #72


Don't change region_rect when setting texture

StyleBoxTexture's set_texture() was setting region_rect to (0, 0, 0, 0) if there was no texture and to (0, 0, texture, size) if there was texture, which was modifying the property and resulted in needlessly saved region in every resource (I didn't test, but I think it would also cause issues if you change the texture size). I made the behavior implicit, i.e. the full texture will be automatically used if region is 0, without modifying the property. This is effectively the same as the old behavior, just prevents property noise.

Related to #71913.

Not really. This behavior existed before and the PR does not affect that issue.

As mentioned on RC, this would make it harder to edit the region and the 9-patch mode out of the box.

I also think that the solution for https://github.com/godotengine/godot/issues/71913 is dropping the override completely, so this PR would only negatively affect current users of the region property, such as depicted above.

Weird, because NinePatchRect doesn't seem to have this problem.

Heh, well

I mean, if nine patch does this already, then your PR should be okay, but we need to do the same thing here. Also the bit that changes the check is not longer needed after https://github.com/godotengine/godot/pull/72124.

Needs rebase after #72124.

Thanks!


Change Password?

I changed the password on my GNUsocial account and there doesn't seem to be a way to change login credentials without removing the account and then adding the same account.
As a user I am worried about losing all my data if I do that.

Hello @DetroitLibertyPenguin
Since some time ago AndStatus account management screen has "LOG OUT" button at the bottom of the screen.
Please use it to have a chance to retype your credentials.


Add more feeds to DailyBuilds.md

#9170

@danroth27 please confirm your previously-failing tests work with this new configuration

Why do we need this many feeds now?

@davidfowl root cause is the lock contention we and our partners ran into when everything was pushing to a single blob store. (Our partners are considering breaking up the core-setup store as well.)
Good news is this is temporary. Will be moving to entirely new feeds…


Dev storageimportexport microsoft.import export 2016 11 01

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[ ] I commit to follow the Breaking Change Policy of “no breaking changes
[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

[ ] Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

Adding new API(s)
Adding a new API version
Adding a new service

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in stable version
[ ] Removing properties in stable version
[ ] Removing API version(s) in stable version
[ ] Updating API in stable version with Breaking Change Validation errors
[ ] Updating API(s) in preview over 1 year

Please follow the link to find more details on PR review process.

/azp run automation - sdk

/azp run automation - sdk

Can one of the admins verify this patch?

Hi @nivats , as identified in the automated checks there are breaking changes, Please follow Azure Breaking changes approval request form as defined.

/azp run automation - sdk

/azp run automation - sdk

@nivats , As identified in the automated checks there are breaking changes, Please follow Azure Breaking changes approval request form as defined at breaking change process.

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

I have added new version of api swagger along with examples and have reverted changes from swagger and examples of previous version of API

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

property to take microsoft managed or customer managed keys is added. Signing off from arm side.


Synchronously importing wasm modules in the main chunk

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Currently when a wasm module is imported like:
import { foo } from './foo.wasm';
// ...

then wepack will report "Sync WebAssembly compilation is not yet implemented"
If the current behavior is a bug, please provide the steps to reproduce.
$ cat foo.wat
(module
  (type (;0;) (func))
  (func (;0;) (type 0)
    nop)
  (memory (;0;) 17)
  (export "memory" (memory 0))
  (export "foo" (func 0)))
$ wat2wasm foo.wat -o foo.wasm
$ cat index.js
import { foo } from './foo.wasm';
$ yarn run webpack index.js
yarn run v1.3.2
warning package.json: No license field
$ /home/alex/code/wasm-bindgen/js-hello-world/node_modules/.bin/webpack index.js
Hash: 64205dfbff78f2176ada
Version: webpack 4.0.1
Time: 64ms
Built at: 2018-2-27 19:15:17
Entrypoint main =
   [0] ./foo.wasm 17.5 KiB {0} [built]
   [1] ./index.js 34 bytes {0} [built]

WARNING in configuration
The 'mode' option has not been set. Set 'mode' option to 'development' or 'production' to enable defaults for this environment.

ERROR in chunk main [entry]
[name].js
Sync WebAssembly compilation is not yet implemented
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What is the expected behavior?
Both import('./foo.wasm') and import { foo } from './foo.wasm'; to work. It looks like this is intentionally unimplemented though, so I was wondering if it'd be good to have a tracking issue for this feature? Or maybe such an issue already exists!
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Yes, it is not implemented currently. But it is very much in the cards IIUC

I've updated the issue title to specifically refer to the main check as @sendilkumarn points out that synchronous imports are supported in non-main chunks!

is this fixed, i was able to build a dist/main.js following these steps.

I just bumped into this.
It'd be absolutely terrific if this issue was given some consideration and especially some priority, because getting a WASM module to work in a larger system has proven... incredibly frustrating thusfar.

@jjpe A lot of issue and plan, sorry, feel free to send a PR

The priority should be on the WebAssembly<>JavaScript Module integration specificiation. Synchronously loading the wasm module is complicated and not consider at the moment.

What is the status on this?

any news on this?

Adding my vote for this.  It is a real pain to get around.

So has it been fixed? How do we fix it?

/cc @sendilkumarn

In case anyone finds this in the future and doesn't want to upgrade to Webpack 5, the solution I used is to just define an entry point that asynchronously loads the actual entry point. This makes the initial chunk ~empty and introduces another roundtrip for the initial page load, but if you're using webassembly in the initial page load anyway, there's no difference between doing this and asynchronously loading the wasm file.
Example of entry point: https://github.com/MaxBittker/sandspiel/blob/master/js/bootstrap.js

In case anyone finds this in the future and doesn't want to upgrade to Webpack 5, the solution I used is to just define an entry point that asynchronously loads the actual entry point. This makes the initial chunk ~empty and introduces another roundtrip for the initial page load, but if you're using webassembly in the initial page load anyway, there's no difference between doing this and asynchronously loading the wasm file from a main chunk.
Webpack entry point: https://github.com/MaxBittker/sandspiel/blob/master/webpack.config.js#L11
Example of entry point: https://github.com/MaxBittker/sandspiel/blob/master/js/bootstrap.js
Which allows synchronous-style wasm importing: https://github.com/MaxBittker/sandspiel/blob/master/js/index.js#L2

I do confirm it does the job for me.


metrics(ticdc): correct some grafana metric descriptions

What problem does this PR solve?

Issue Number: ref #5039
What is changed and how it works?

Correct some metric descriptions in Grafana template.

Check List
Tests

No code

Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
None

/merge


Suggestion: implement Bash-style && and || control operators for chaining commands based on success / failure - short-circuiting Boolean execution-flow control operators

Bash-style && and || control operators would be handy additions to the language.
For instance, instead of writing (the examples are contrived, but hopefully illustrate the point):
# If command A succeeds, execute command B too.
csc /nologo file.cs
if (0 -eq $LASTEXITCODE) { git commit -m 'ok' }

# if command A fails, execute command B.
csc /nologo file.cs
if (0 -ne $LASTEXITCODE) { git commit -m 'failed'  }

one might be able to write:
# If command A succeeds, execute command B too.
csc /nologo file.cs && git commit -m 'ok'

# if command A fails, execute command B.
csc /nologo file.cs || git commit -m 'failed'

The examples use external utilities, but these operators would be equally handy for PowerShell-native commands (where $? rather than $LASTEXITCODE would have to be examined).

There was talk about adding && and || in 2009, but it seemingly never made the top of the list. Notably, @jpsnover  himself said:

&& and || were on the list of things to implement (still are) but did not pop up as the next most useful thing to add.

There is a feature request on windowsserver.uservoice.com that seems to be languishing.

There are several other questions on Stack Overflow asking for this feature and I've tried to summarize the state of affairs in this answer.

I believe the proper term for && and || is "short-circuit operator".

@i-give-up: While short-circuiting is an important aspect of these operators' behavior, both Bash and POSIX call them control operators.
If you wanted to get as descriptive as possible, I guess you could call them short-circuiting Boolean execution-flow control operators.
So as to make this issue more easily discoverable, I've appended that term to the issue's title.

Short circuit operators are such a fundamental part of the daily shell use at the command line  and it is a massive burden to work without them. And the -and/-or operators are not a replacement since they simply output the boolean result of the operation making them useless for interactive use.

I dont understand what the -and operator actually does (and presumably the -or as well).
It's simply baffling to have the following code and see "True" come out when you run it
function Foo { return $True }
function Bar { return Foo -and $False }
Write-Host "Bar: $(Bar)"

The OPs stackoverflow really shows everything that is fubared about this design.

@stofte: PowerShell has 2 personalities (fundamental syntax forms): argument mode (like a shell) and expression mode (like a programming language) - see Get-Help about_Parsing.
-and and -or  belong to the expression-mode world and operate on (often inferred) Boolean values.
They have no equivalent in argument mode, and that's the crux of the problem.
Your example,  Foo -and $False is parsed in argument mode, because the statement's first token is a command. Therefore, you're passing tokens -and and -$False as arguments (parameter values) to function Foo - where, in you're case, they're ignored and the output is simply $True.
If you want to use a command (argument mode) as part of an expression (expression mode; e.g., with -and), you must enclose it in parentheses:
return (Foo) -and $False

@mklement0  Thanks for the explanation. It's still not entirely clear how argument modes relates and interacts with outcome vs output parsing/interpretation however.
PS is probably the most confusing language I've come across in my years. It seems to assemble a hodge-podge of ideas in order to be everything for everyone (anyway, ranting over!)

@stofte  You pass parameters to functions via the - character so any - characters after the function are going to be assumed to be parameters. So Foo -and $false is really trying to pass -and as the parameter name with $false as the value but since Foo doesn't define any parameters, it just ignores it.
Let's change your script a bit to add parameters and see how it works.
function Foo
{
    Param($and)
    Write-Host "And = $and"

    return $True

}
function Bar { Foo -and $False }
Write-Host "Bar: $(Bar)"

Now, Foo will accept the parameter and pass $false into the function. However, it still returns $true since that is what the function outputs.
So for PowerShell to know if it shouldn't be trying to pass -and as a parameter, you need to use parenthesis to control order of operations. (Foo) -and $false now will run Foo first, then evaluate the remaining statement $true -and -$false.
BTW, PowerShell ISE and Visual Studio Code is smart enough to tell you all of this via Intellisense. It knows that the -and operator can't be used in your original code and won't give it as an option. I highly recommend using Intellisense to make sure keywords are usable in the right context.
Now for why functions are using - to pass parameters is because the idea behind PowerShell is to create command-line applications through functions instead of having to compile an application. So a Function mimics much of the command-line experience to make it happen.

I can't believe I still have to start up cmd for this functionality, my bash using colleagues are making fun of me

I've been thinking about this a bit.
A thought I have is that if && and || only look at $LASTEXITCODE it makes them pretty specific -- two new operators that only work in the context of native commands. And without good knowledge of that fact, something like
csc.exe /nologo program.cs

Foo && Bar

could prove very confusing, since it either uses the $LASTEXITCODE value, in which case Bar being executed depends on the success of the csc.exe line. OR, if just assumes that a non-native command succeeds (or whatever) that is just as confusing.
So I was thinking about something more like JavaScript's (please, hear me out...) short circuit operator implementation. That way you could do:
> $null && "Hello"

> "Hi" && "Aloha"
Aloha

> $false || "Howdy"
Howdy

> 107 || 32
107

Specifically, Foo && Bar evaluates Foo and if the result coerces to $false, it returns that (pre-coercion) value, otherwise it returns the result of Bar. With Foo || Bar, Foo is evaluated and if the result coerces to $true it returns that (pre-coercion) result, otherwise we evaluate and return the result of Bar. The operators would have equal precedence and be left-associative, so you can chain them like so:
> "" || "Hello" && "Goodbye"
Goodbye

That last thing is pretty confusing, but would be useful for chains of only one operator (Step1 && Step2 && Step3, Try1 || Failover1 || Failover2) and I see no particular reason not to support a mixed chain.
Notice that this also gives us a null-coalescing functionality like so ($x = $v || "default"). With a mixed chain you'd even get a (rather confusing) ternary operator: $condition && $ifTrue || $ifFalse.
However, the problem is that this wouldn't scratch the itch of wanting a way to chain native commands. So, again, we could make it so these operators look at $LASTEXITCODE for native command arguments. I think that's a bit complex, but unfortunately it still makes more sense than the other options to me.
Anyway, please let me know your thoughts on this -- I'm just spitballing ideas here, with no particular investment (although I'm always in favour of consistency). After some initial thoughts/comments here, I'd like to write up an RFC with a more concrete proposal and then implement a prototype.

So I was thinking about something more like JavaScript's (please, hear me out...) short circuit operator implementation

I still think we need to use $LASTEXITCODE. For example, when I do npm run build && npm run deploy. npm run build can emit some text even when it fails, and I want to prevent npm run deploy from running after a failed build.

Yes, but exclusively $LASTEXITCODE? Or in the way I describe at end where non-native commands work by falsey/truthy-ness and native commands use $LASTEXITCODE?
My concern with exclusively using $LASTEXITCODE is as I say above: if you run a native command and then use && later, like:
npm run build

DoSomething && DoAnotherThing

what should && do?

Please note that && and || in Bash are control(-only) operators:

they only decide what commands get executed in principle, based on the commands' exit codes
but do not interfere with the commands' output streams
and what the commands do or do not output (send to the output streams) is irrelevant for the determination of execution success.

#!/bin/bash
echo one && echo two  # prints *both* 'one' and 'two'

In other words: It's a way of conditionally chaining commands with their usual output behavior, if they get to execute.
By analogy, in PowerShell their detection of successful execution should be based on:

$LASTEXITCODE -eq 0 for external utilities (native commands)

$? -eq $True for PowerShell commands (cmdlets / functions / scripts)

&& and || primary belong to the realm of commands (something called by a name, with arguments parsed in argument mode) and has limited applicability to expressions:
"a" && "b"  # should output *both*  'a' and 'b'

In a simple expression such as "a", there's nothing that can fail, so use of && makes little sense.
What's worse, because && / || only act on execution success, even falsy expressions are "true" from their perspective, because it isn't their value (output) that matters:
$False && "hi"  # !! should output *both*  'False' and 'hi' - both expressions "ran" without error

So, one way to bypass potential confusion is to restrict use of && and || to pipelines only; in other words: all operands must be either simple commands or pipelines.
There are several problems with this approach, however:

Pipelines can start with an expression, which could be confusing. E.g.,
'foo' | Write-Output && ... would be allowed, but 'foo'  && ... would not.

Arguably, using an expression as the RHS of && and || would be useful; e.g.,
Get-ChildItem -ea Ignore -Name *.log || 'log1.log'

More generally, wrapping commands in expressions can be useful; e.g.,
(Get-ChildItem -ea ignore *.log).LastWriteTime || [datetime] 0

There are pure expressions that can fail, generating a statement-terminating error in the case of (implicitly) calling a .NET framework method that throws an exception; e.g.:

[int]::parse('hi')
$div = 0; 1 / $div

If we do allow expressions, the problems are:

Sowing confusion among users that come from the C# / JavaScript, ... world who are used to && and || having the semantics of what -and and -or do in PowerShell (such languages have no counterpart to what Bash's && and || do).

Similarly, pointless constructs such as 1 && 2 are enabled (applying the operators to expressions that never fail); the example is equivalent to 1; 2, i.e., simple serial execution.

$? currently also reflects expression success, which wipes out the $? value from any wrapped command, which happens with something as simple as enclosing a command in (...); e.g.,
Get-Item NoSuchFile; $? outputs $False whereas
(Get-Item NoSuchFile); $? outputs $True
The current $? behavior is summarized here, with clarifications by @BrucePay here.

This severely limits $?'s usefulness in general, but especially in the context of implementing && and ||

The solution would be to make only commands (outside conditionals) set $?, not expressions, with the exception of a .NET operation causing a statement-terminating error, such as [int]::Parse('hi').

Yes I see what you mean.
In my mind then, && and || must always write the result of an evaluation to the relevant stream as you  say and proceed based on the value of $? (assuming that always accords with $LASTEXITCODE in the case of native commands, and if not, we check $LASTEXITCODE -eq 0 in those cases).
I'm motivated by @stofte's sentiment earlier:

PS is probably the most confusing language I've come across in my years. It seems to assemble a hodge-podge of ideas in order to be everything for everyone

PowerShell contains a lot of concepts that Bash doesn't, and for && and || to be worthy first-class language-level operators, they need to find holistic application in the language. Since commands can be native or non-native and expressions can have side effects, it still makes sense to use control operators with all of them (to some extent).
To that end, I think that allowing && and || only in pipelines or only with native commands is not the way to go.
Instead I think && and || should be usable wherever ; is usable, but where <x>;<y> evaluates <x> and then <y>, <x> && <y> evaluates <x> and if $? is true evaluates <y>, while <x> || <y> evaluates <x> and if $? is false evaluates <y>. && and ||  should be success-conditional sequencing operators.
That leaves us with the issue of how the $? value is set. But I feel like it makes sense to implement && and || with respect to $? and then make sure that $? has a straightforward meaning and contract as a separate issue.

@rjmholt Lexically, && and || are statement separators and therefore should work with any simple statements including expressions.
They should operate off of $? and there is no need to check $LASTEXITCODE since this is taken care of automatically (i.e. if a native command exits with a non-zero exit code, then $? will be false.). For example:
PS[1] (140) > true.exe ; $?
True
PS[1] (141) > false.exe ; $?
False

And expressions do set $?:
PS[1] (135) > 1/1 ; $?
1
True
PS[1] (136) > 1/0 ; $?
Attempted to divide by zero.
At line:1 char:1
+ 1/0 ; $?
+ ~~~
    + CategoryInfo          : NotSpecified: (:) [], RuntimeException
    + FullyQualifiedErrorId : RuntimeException

False

so they will work fine with && and ||.
One difference between ; and && is that the flow control operators should throw an IncompleteParse exception if the RHS is missing so we can handle the interactive experience. And the code will have to be formatted multiline like:
command1 &&
    command2 &&
        command3

as is the case with pipelines (which is prompting much discussion in #3020)
We might also spend a little bit of time thinking about exceptions to see if they should be involved in any way...

@BrucePay ok, that's what I was imagining should be the case.
Can you expand on the exceptions part?
I'm personally not sure whether it's better to have:
throw "Bad" || CleanupThings

continue to CleanupThings (especially since throw sets $? = $false), or if we consider exceptions to not be caught by control operators.
The problem I see with the first case is that if || continues after an exception, we either rethrow the exception at the end of the statement sequence (which is probably not helpful at that stage), or we absorb the exception, which means statement control implicitly catches all exceptions and users won't get warned about possibly bad failures.
But in the second case, || works fine unless you throw an exception, at which point it no longer "executes the RHS after the LHS fails". So any sequence of statements that could fail or throw an exception would have to use || inside a try/catch block.

Good point about $? already reflecting $LASTEXITCODE -eq 0 immediately after calling a "native" command (I wish we'd stop calling them that, given that there's nothing native about, say, calling node - something like external programs seems more apt).

And expressions do set $?:

Indeed they do, and that they do so is unhelpful, as I've tried to argue.
Given a statement such as:
(Get-Content nosuchfile) -notmatch '^\s*#' || ...

Don't you think users are more likely to expect the || act on Get-Content's success rather than the wrapping expression's "success", which has little meaning other than when involving a .NET exception?

@rjmholt:
This comment by @BrucePay tells me that Throw terminates the current thread of execution, which in your example would not give the the RHS of || a chance to execute.
Interactively, you can verify this as follows, using ; instead of the (not-yet-extant) ||:
PS> Throw "bad"; 'after'

In the example above, 'after' never gets to execute, because the entire command line is terminated (which can be conceived of as an ad-hoc script).
We still don't have an official term for the kind of error Throw generates (see https://github.com/PowerShell/PowerShell/issues/3798#issuecomment-383783407), but for now I'm calling them fatal errors.
My vote is for not changing this behavior, i.e., for && and || only to act on non-fatal errors (which by default are non-terminating errors and statement-terminating errors).

@rjmholt:
Yes:

1 / 0 is a statement-terminating error, which is why "Hello", as the next statement, still executes.

throw "Bad" is a script-terminating error (fatal error), which means that the current thread of execution is terminated by default, so "Hello" never gets to execute.

On the other hand, try / catch (and also trap) can trap either kind of error (but not non-terminating ones such as Get-Item /NoSuch).
I've tried to document the bewildering complexity and inconsistency of PowerShell's current error handling in this doc issue.

In a technology-debt-free world, 1 / 0 would ideally be a script-terminating error as well, but changing this behavior now would be a massively breaking change.
By contrast, what we can do - given that $? is currently virtually useless with non-statement-error-throwing expressions - is:

Nothing needs to change with respect to statement-terminating errors, be they generated by a command or by an exception produced by an operator or direct .NET method call: The statement as a whole is terminated and $? is set to $False.

Otherwise - if there are no errors or only non-terminating errors:

Make expressions not set $?,

... which then allows the overall expression to reflect an embedded command's success .

In other words: unless a statement-terminating error occurs, an expression by itself wouldn't even touch $?.

With $? relegated to the world of commands, the question then becomes how to handle multiple commands embedded in an expression:
Assuming we don't want to go as far as to provide the success status of all commands involved (analogous to Bash's automatic $PIPESTATUS array variable):
The precedent set by the pipeline is to have $? reflect $False if any command involved generated a non-terminating error.
In other words: unlike in Bash, it is not the last command's status that is reflected. E.g.:
Get-Item /, /NoSuch | % { 'hi' }; $?
hi
...       # error output
False     # A reflection of Get-Item's non-terminating error.

Therefore I suggest exhibiting analogous behavior in the case of multiple commands being embedded in an expression.

This proposal seems to resolve mostly around native commands, where failure is indicated by a non-zero exit code vs cmdlets, where failure is indicated through an exception. As some have pointed out, I believe there is bad potential here for inconsistency. If I run ls || "hi" it shouldn't work any different than Get-ChildItem || "hi", otherwise external programs become less "integrated" into PowerShell, not more, and I believe seemless integration of native commands should be an important goal in PS.
I would like to understand the actual use case of this proposal a bit more as it seems related to #3415 (see https://github.com/PowerShell/PowerShell/issues/3996#issuecomment-384775097). I.e. in what scenerio is this operator needed and what problem does it actually solve.
As seen in the OP it is really just a shorter one-line syntax for something that can already be done with an if statement. As such it seems like the primary use case for this is in the REPL, because I believe in scripts it is more readable if you write out the if (or try/catch with linked proposal) and not put multiple commands in one line. But in the REPL, I wonder why you wouldn't just run the commands manually and only run the second if the first failed.
I think the more readable alternative to chaining native commands with && is having the proposed set -e equivalent, which would just allow $CommandErrorActionPreference='Stop' to turn any non-zero exit code into an exception, with the possibility to catch it (the equivalent to ||) with a normal try/catch (like it works for cmdlets, so it's consistent).  In a world where we had this capability, would you still want && and || as much?  It's handy, and as a user of other shells as well, in my muscle memory.
PowerShell tries to differentiate itself on its interactive experience, and having to type out a try/catch block doesn't feel as one-liner interactive as just chaining things with an operator. And with PSCore being cross-platform, there's more binary interaction experience to handle than ever, and we want to minimise friction for new users who want to do things like apt update && apt upgrade.
@saschanaz also makes a good point that try/catch is much harder to compose than the left-to-right operator execution.
I share exactly your concern about inconsistency between native utilities and PowerShell commands being exacerbated, but I think that's why we need to discuss this feature carefully. If we make the rule for && and || simple and base it on existing concepts (like that && proceeds when $? is true and || proceeds when $? is false -- and neither catch a fatal/pipeline-terminating error), then all we have to do is make sure those existing concepts work and make sense (i.e. make sense of PowerShell's error handling -- no small task, but easier than having to do that while also explaining complicated workaround rules for these operators).
In terms of set -e, I think having an explicit, composable operator is still desired. Even though you can use set -e in an interactive context, it relies on an implicit state in execution. So it's arguably harder to read (especially for the uninitiated) and also harder to analyse. The other problem is that it doesn't provide || functionality. I think set -e is also useful, but in my mind it's more designed to indicate fast-fail behaviour in larger scripts, rather than for chaining one-liners.

If we make the rule for && and || simple and base it on existing concepts (like that && proceeds when $? is true and || proceeds when $? is false -- and neither catch a fatal/pipeline-terminating error), then all we have to do is make sure those existing concepts work and make sense (i.e. make sense of PowerShell's error handling -- no small task, but easier than having to do that while also explaining complicated workaround rules for these operators).

Okay, so just to be clear, || and && would only be effective for cmdlets if $ErrorActionPreference -ne 'Stop' and for external commands if $CommandErrorActionPreference -ne 'Stop'. Otherwise there would be an exception just like if you didn't use those operators.
I think this makes sense because in an REPL context $ErrorActionPreference is usually Continue, whereas in a script where you might want to set it to Stop you also would want the readability of having one command per line, so the operators are not as appropiate. 👍

@felixfbecker You make a very good point about $[Command]ErrorActionPreference = 'Stop' but I think your proposed behaviour is probably the right one. Others may want to add their insights there. But it makes sense to me that setting those variables means throwing a fatal error, which means there's no continuing over ||.
Because of the parser's "modes", an operator like -and won't work after a command due to ambiguity (DoSomething -or CleanUp makes -or look like a parameter passing CleanUp as a bareword string). It's theoretically possible to implement, but it would break a number of things, is less efficient and would be a lot of work, so is pretty squarely ruled out. The other thing is that -and and -or already have functionality, so changing that would be a breaking change, which again is ruled out by the PowerShell breaking change contract.
My inclination is that && and || have good recognition and have been on the list of things to add in that verbatim form for some time. But there's no reason to rule out alternatives. They just can't start with -.

This proposal seems to resolve mostly around native commands, where failure is indicated by a non-zero exit code

No, the proposal is to apply the operators equally to PowerShell commands and external programs, based on $? (though the operators are patterned after POSIX-like shells).

vs cmdlets, where failure is indicated through an exception

While .NET exceptions underlie PowerShell's error handling, it's not useful to discuss it in those terms - they are an implementation detail.
In fact, cmdlets (as opposed to advanced functions) never create fatal errors, they only create two kinds of errors:

non-terminating: the statement that the error-reporting cmdlet is part of keeps executing, if there are more input objects to process.

statement-terminating: the statement the error-reporting cmdlet is part of is terminated, but execution continues with the next statement.

Script-terminating errors (fatal-by-default errors) can only arise in two situations:

$ErrorActionPreference = 'Stop'

-ErrorAction Stop, but, confusingly, only when encountering non-terminating errors.

In short: by default, the typical case is for execution to continue, either intra-statement (non-terminating error), or with the next statement (statement-terminating).

I think the more readable alternative to chaining native commands with && is having the proposed set -e equivalent

set -e and && / || are separate features, each useful in their own right, and problematic in combination (see below)
In POSIX-like shells, users often forgo set -e and its complex rules in favor of explicit error handling with ||.

The other thing is that -and and -or already have functionality

Indeed, they do; furthermore, -and and -or belong to the world of expressions, based on return values / outputs - and that obviously shouldn't change.
&& and || belong to the world of commands - be they cmdlets or external programs - and they act on success vs. failure via $?, without interfering with outputs.
This distinction is somewhat tricky, given that && / || have  the same semantics as PS's -and / -or  in C-inspired "real" programming languages, but it's just one of the challenges that comes with PS's hybrid nature, and we just need to make sure that the difference is well-documented.

$CommandErrorActionPreference='Stop'

The word Command in your proposed variable name is problematic, because command is PowerShell's umbrella term for anything invoked by name / filesystem path - whether PowerShell-internal or external.
Thus, $ExternalErrorActionPreference makes more sense to me, to highlight that the preference refers to external programs ("native" is a confusing term, and I suggest we avoid it).
I'll use this name in the remainder of this comment.

I believe in scripts it is more readable if you write out the if (or try/catch with linked proposal)

To me, && and || are concise and expressive constructs that beat the "noise" of if statements and try / catch handlers - on the command line as well as in scripts.

Okay, so just to be clear, || and && would only be effective for cmdlets if $ErrorActionPreference -ne 'Stop' and for external commands if $CommandErrorActionPreference -ne 'Stop'. Otherwise there would be an exception just like if you didn't use those operators.

&& and || should operate on $? only - the combination with $ExternalErrorActionPreference needs to be discussed separately (see below).

as stated, cmdlet errors continue execution by default - intra-statement with non-terminating errors, next-statement with statement-terminating errors.

That leaves the question: how should && and || act in the presence of $ExternalErrorActionPreference = 'Stop'?
As I've argued at https://github.com/PowerShell/PowerShell/issues/3996#issuecomment-384775097, it's worth borrowing one exception from the set -e exceptions in POSIX-like shells:
Any command (statement) except the last in a && / || chain should not trigger a fatal error while $ExternalErrorActionPreference = 'Stop' is in effect, given that the use of && and || clearly signals an anticipation of potential failure.

@mklement0 I think we are almost entirely agreeing with you here. I definitely appreciate your ability to dissect a problem too. I'm not sure I share your fully taxonomised conceptual model of PowerShell's semantics, but I think we are generally on the same wavelength. (The concern about being native-command-only I think was because that was floated earlier in the thread).
The only part I'm not sure about is the $ExternalErrorActionPreference = 'Stop' behaviour. On one hand, you make a good point that bash does it and our inspiration for these operators is bash. But on the other hand, it also makes sense that $ExternalErrorActionPreference = 'Stop' means if any external command has an error, we stop. Having to explain to users that "well, actually, if you use || we keep going even though you specified Stop" is one of those things I don't look forward to, but it might be a matter of naming the variable. As often, the UNIX world gets away with it because set -e doesn't promise much in the name.
On the name of the variable:

Thus, $ExternalErrorActionPreference makes more sense to me, to highlight that the preference refers to external programs ("native" is a confusing term, and I suggest we avoid it).
I'll use this name in the remainder of this comment.

For better or worse, PowerShell refers to external utilities as "native" everywhere I've seen. I think the horse has bolted on that vocabulary and trying to change it will just result in two competing terms that confuse more people.

@rjmholt:
Thanks; I'm glad we're mostly in agreement.

I'm not sure I share your fully taxonomised conceptual model of PowerShell's semantics

Please tell me where you disagree; it'll help future conversations.

if you use || we keep going even though you specified Stop" is one of those things I don't look forward to

I do get the appeal of avoiding exceptions in general, but this particular one makes sense to me.
To recap: The sole reason to use || is to deal with anticipated failures.
To borrow my example from https://github.com/PowerShell/PowerShell/issues/3996#issuecomment-384775097:
# Get files from /dir1, if available, otherwise from /dir2
$files = ls /dir1 2>$null || ls /dir2

The use of || here signals an anticipation of a failure of the 1st command.
You can think of || as an ad hoc override of any $ExternalErrorActionPreference = 'Stop', similar to overriding $ErrorActionPreference = 'Stop' with, say, -ErrorAction Ignore.
However, $ExternalErrorActionPreference = 'Stop' would kick in if the 2nd ls command failed, since its failure is not anticipated.
By contrast, with &&, the case is less clear-cut: in POSIX-like shells, it is often used to prevent execution of subsequent commands if earlier ones failed.
So if the intent is simply to prevent follow-on failures, an exception is perhaps not needed, and $ExternalErrorActionPreference = 'Stop' could treat a failure as fatal even if it is the first && operand - but that would need to be overruled if a || is present later.
In POSIX-like shells && is granted the same exception as ||, and perhaps modifying that exception to only apply to || is too confusing (and perhaps even impractical to implement - I can't speak to that), both in itself and for users coming from POSIX-like shells.
I'm not sure what the right answer is.

If we make no exception:
Effectively, we're then forcing users to choose between use of $ExternalErrorActionPreference = 'Stop'  and &&/|| use, because having to locally try / catch potential failures negates the concision and expressiveness of &&/||:
# Need try / catch to guard against $ExternalErrorActionPreference = 'Stop'
$files = try { ls /dir1 2>$null } catch {} || ls /dir2

This could be somewhat mitigated by a yet-to-be-introduced new syntax that provides the analog of
-ErrorAction to external-program invocations.
It is tricky to come up with the right syntax, however, since it would either have to be a meta-parameter similar to --% or perhaps a modified version of the & operator, and keeping it concise risks its being arcane:
$files = &(i) ls /dir1 2>$null || ls /dir2  # &(i) is the hypothetical analog to -ErrorAction Ignore

As for the term "native":
At the end of the day, what matters is that people know what a term stands for.
And human language in general is full of misnomers that no one thinks twice about, if they've been around long enough.
So I don't think this is the most important issue, but please bear with me:

For better or worse, PowerShell refers to external utilities as "native" everywhere I've seen.

Naming should be as precise as possible when it comes to code elements.

"Native" is an established term, but it's not really used in the official documentation, as far as I can tell, so the documentation could lead the way here (e.g., about_Parsing currently refers to "executable programs" in the context of discussing --%).

In the specific case at hand, the term "external program" (perhaps "utility" is too "Unix-y") or more broadly "external" to refer to functionality outside of PowerShell avoids the ambiguity of "native" while still being concise and "self-documenting", so even those used to the term "native" should be able to infer its meaning.
(And perhaps some day "external" will become the predominantly used term - a guy can dream, can't he?)

@SteveL-MSFT Since there won't be a 6.3 - consider it for 7?

@mikemaccana I've renamed the 6.3-Consider milestone to 7.0-Consider

Seems to be related information https://community.dynamics.com/nav/b/stefanodemiliani/archive/2018/02/28/running-microsoft-dynamics-nav-tasks-in-parallel-with-powershell (parallel / sequential commands execution).

@vladimiry Thanks, but this issue is about a concise, success-conditional idiom for sequencing commands; by contrast, your link is (primarily) about unconditional parallel execution via PowerShell workflows, which aren't supported in PowerShell Core.

Please see https://github.com/PowerShell/PowerShell-RFC/pull/192

in powershell ver 5.1 are still not present, which version of Powershell include these operators?

@Raffaello If you checked the PR that closed this you'd have seen it was added in for 7.0.0-preview5 - so it is in Powershell since the GA of v7.0.0


Use Bocho in swift-ast

Codecov Report

Merging #36 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master     #36   +/-   ##
======================================
  Coverage    96.3%   96.3%
======================================
  Files         144     144
  Lines        9035    9035
  Branches      699     699
======================================
  Hits         8701    8701
  Misses        333     333
  Partials        1       1


clean up python folder and init code path

This is much cleaner and hopefully easier to understand.

thanks 👍


[Feature] [Question]Hide outer layer of sunburst chart

What problem does this feature solve?
I need to create a sunburst chart that shows a large amount of data. Because the data that needs to be shown is too large, the outer layer of the chart looks overlapping each other and made it disorganized as shown below.

What does the proposed API look like?
Is there a way to create a sunburst chart similar to this example by using echarts?  At first, we only show the parents (inner layer). As we click the parent, then the children will be shown.

I dont think there is out of the box support for this but you can implement it yourself using onclick event.
Here is an example.


DG: Include Appendix Effort

https://nus-cs2103-ay2425s1.github.io/website/admin/tp-deliverables.html#deliverable-developer-guide-dg