Android/Spring codebase unification

This is a long-term improvement initiatives to have a common code base. The Android cobedase is a slightly modified version due to the use of BufferedImage in this codebase.

Findings is that, Card::open(BufferedImage bufferedImage) may not be part of the Card method and can be removed. The outer system (either Android or Desktop) already has the byte[] array after the outer system invoke its QR scanning.
As for BufferedImage Card::asQRCode() method is only  used in unit tests. In mosip-idpass-print,  the  method String Card::asQRCodeSVG() is the one that is really used.
In summary, my current findings is that:

idpass-lite-java consumes image input as byte[]
idpass-lite-java produces an image output in SVG format.

Findings is that, Card::open(BufferedImage bufferedImage) may not be part of the Card method and can be removed. The outer system (either Android or Desktop) already has the byte[] array after the outer system invoke its QR scanning.
As for BufferedImage Card::asQRCode() method is only  used in unit tests. In mosip-idpass-print,  the  method String Card::asQRCodeSVG() is the one that is really used.
In summary, my current findings is that:

idpass-lite-java consumes image input as byte[]
idpass-lite-java produces an image output in SVG format.

Update notes:

Removing BufferedImage was a straight-forward. What was not straight-forward was the encounter of Android protobuf-lite not supporting reflection. Therefore, I added merge_CardDetails inside libidpasslite.so
How to have a common 1 jar that works both for Android and Spring Boot? As I recall, Android project explicitly and manually put libidpasslite.so under jniLibs folder and this means I should not bundle it in the jar. Furthermore, the idpasslite.dll and libidpasslite.so comes with the jar which Android does not need.

Update notes:

Removing BufferedImage was a straight-forward. What was not straight-forward was the encounter of Android protobuf-lite not supporting reflection. Therefore, I added merge_CardDetails inside libidpasslite.so
How to have a common 1 jar that works both for Android and Spring Boot? As I recall, Android project explicitly and manually put libidpasslite.so under jniLibs folder and this means I should not bundle it in the jar. Furthermore, the idpasslite.dll and libidpasslite.so comes with the jar which Android does not need.

Fixed at https://github.com/idpass/idpass-lite-java/commit/13a74ef688999df78047436ca5caf5b7f2545fcb

Fixed at https://github.com/idpass/idpass-lite-java/commit/13a74ef688999df78047436ca5caf5b7f2545fcb


Address 404 in README

Alaska Airlines Pull Request
Fixes: #52
Summary:
PR fixes 404 issues with links in the README
Type of change:
Please delete options that are not relevant.

[ ] New capability
[x] Revision of an existing capability
[ ] Infrastructure change (automation, etc.)
[ ] Other (please elaborate)

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Orion Design System Team

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


chore: bdd-gh-1585219428 to 0.0.1

chore: Promote bdd-gh-1585219428 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


boost::beast::ssl_stream::async_handshake() doesn't accept cti::use_continuable

@Naios
boost::beast::ssl_stream<boost::beast::tcp_stream>* stream;
const auto f = stream->async_handshake(boost::asio::ssl::stream_base::client, boost::asio::use_future); // compiles
const auto g = stream->async_handshake(boost::asio::ssl::stream_base::client, cti::use_continuable); // error
---
error: no matching function for call to 'boost::beast::ssl_stream<boost::beast::basic_stream<boost::asio::ip::tcp, boost::asio::any_io_executor, boost::beast::unlimited_rate_policy> >::async_handshake(boost::asio::ssl::stream_base::handshake_type, const cti::use_continuable_t<>&)'
  143 |    const auto g = stream->async_handshake(boost::asio::ssl::stream_base::client, cti::use_continuable);

it works fine with other boost & beast APIs.
Commit Hash
6bffb44d2bcca4989945e4d76ce8d35cf8cdcebd (4.1.0 release)

OS: CentOS7
Compiler and version:  gcc (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)
boost 1.77.0 release

I notice that the deduction for async_handshake is different than that for, say, async_connect
    template<class HandshakeHandler>
    BOOST_ASIO_INITFN_RESULT_TYPE(HandshakeHandler, void(boost::system::error_code))
    async_handshake(handshake_type type,
        BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler)```

vs.

template <typename Protocol, typename Executor, typename Iterator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
Iterator)) IteratorConnectHandler>
inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
void (boost::system::error_code, Iterator))
async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler)

Thank your for your report. I was able to reproduce this issue. I'm not entirely sure yet, what is causing this.

I found the reason for this issue:
Since boost:::asio 1.72 or asio (standalone) 1.16 the async_result trait used for creating the promise type does not require a fixed type anymore. Before that we had to return a fixed type independent of the promise initiation. This makes it possible to return a non-allocating continuable that depends on the promise Initiation.
See
template <typename Signature, typename Matcher>
class async_result<cti::use_continuable_t<Matcher>, Signature> {
public:
#if defined(CTI_DETAIL_ASIO_HAS_EXPLICIT_RET_TYPE_INTEGRATION)
  using return_type = typename cti::detail::asio::initiate_make_continuable<
      Signature>::erased_return_type;
#endif

The async_handshake method uses BOOST_ASIO_INITFN_RESULT_TYPE for deducing the promise type. As far as I know this should be replaced with BOOST_ASIO_INITFN_AUTO_RESULT_TYPE to auto-deduce the result. Asio only keeps the old explicit define for backwards compatibility: https://github.com/boostorg/asio/search?q=BOOST_ASIO_INITFN_RESULT_TYPE .
I would suggest that you ask boostorg/beast whether the can auto-replace BOOST_ASIO_INITFN_RESULT_TYPE by BOOST_ASIO_INITFN_AUTO_RESULT_TYPE or if there is a reason the are still using the old define.
If this is not possible I might consider implementing an akternative token.
As workaround you can temporarily define CTI_DETAIL_ASIO_HAS_EXPLICIT_RET_TYPE_INTEGRATION which enables the asyn_result<>::return_type, but this leads to performance disadvantages.

For reference see:
https://github.com/Naios/continuable/blob/b51be39e7126c397cec9d13fefdfa3cbbe8291f0/include/continuable/external/asio.hpp#L149-L175

I am having seemingly the same issue, both with async_connect and (ssl) async_handshake.
I am prone to ask the beast guys if you need me to do it but isn't that possible that you do it instead as you probably know better how tell them propery ?


chore: Reorganize tests to prevent future name collision

Similar to example targets (see #123) integration test targets need to have a unique name across the workspace. As a precaution I reorganized the tests a little bit:

The integration tests in flow-test have now more specific names.
There is only a single integration test in the root folder and I don't think that we will add more. IMO it's not worth keeping this folder, so I transformed the single test into a normal lib test.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+3.3%) to 52.028%

Totals

Change from base Build<PHONE_NUMBER>:
3.3%

Covered Lines:
590

Relevant Lines:
1134

💛  - Coveralls


domd: u-boot: fix rswitch GWCA issue

Add patch that disables GWCA in rswitch_remove to avoid several issues that can be occurred after u-boot transfers control to Linux.

Thank you, @LKomaryanskiy
Acked-by: Volodymyr Babchuk<EMAIL_ADDRESS>


Update CI python versions, remove 3.7

/cc https://devguide.python.org/versions/#versions
/cc https://github.com/octodns/octodns/pull/1018

setup-py failure is unrelated, yet another google gcloud library versions incompatible with each other problem.


Support ability to disconnect from backend manually

Following up on the conversation on #131, I'm using keyv from a one-off script and the Node.js process hangs because there's an open socket.
I'm having to (partly) work around this by doing the following:
    const redis = (this.keyv.opts.store as KeyvRedis).redis;
    redis?.disconnect();

... which isn't ideal because my code is now Redis-aware and would still break when we support additional backends.
@jaredwray mentioned there's some interest in implementing Keyv.disconnect(), which would cause the underlying backend to disconnect from the server. That would solve this problem.

@gnarea - really love the idea of supporting this feature. The goal for this is to update all storage adapters to support this and make it easier to handle.
Would it be ok if we did it as async?

Excellent! Thanks @jaredwray! Yeah, async would be absolutely fine -- even ideal if the underlying adapter's disconnection method is async already.

@gnarea  - This is currently being tracked in a pull request by @alphmth here: https://github.com/jaredwray/keyv/pull/307

We have merged this pull request and will be handling a release this week. 🚀

This is fantastic! Thank you so much!


consensus-logic: Remove redundant messaging

Description
This PR removes the cycle between FCM worker and CSM worker by having CSM send NewState message to FCM via watch channel instead as ForkChoiceMessage::NewState via mpsc channel.

Type of Change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
[x] Refactor
[ ] New or updated tests

Checklist

[ ] I have performed a self-review of my code.
[ ] I have commented my code where necessary.
[ ] I have updated the documentation if needed.
[ ] My changes do not introduce new warnings.
[ ] I have added tests that prove my changes are effective or that my feature works.
[ ] New and existing tests pass with my changes.

Related Issues

I had thought about this not being able to act on the updated state immediately. But given how fcm works now, it should be perfectly fine to act on it lazily. Because, what it is doing with the updated states is to update the finalized tip on the tracker. And thus, we can be lazy about that since updating finalized tip is not an expensive task. Also, as I had expected, all the functional tests are passing, so this should be fine(except for the tight loop).

@bewakes So let's say that the chain tip that the FCM thinks is best is on a branch that is now stale since the CSM just finalized a different fork.  Then we get an RPC call requesting the best block, what happens?  We'd return a block that we now know is invalid.

@delbonis, that's a good point that if the rpc is serving the blocks from fcm then we'd be on the stale tip/fork. However, we are serving blocks from the database(L2 provider to be precise) instead of FCM and in future we will have a caching layer for L2 database so fetching blocks from db should not be a problem.
I am not saying being lazy on updating fcm state is the best solution, but this keeps things simpler. Sending new state as a FCM message also seems to be a redundant messaging because we already have StatusRx for receiving new state and I think that everything that seeks the latest state should get the data from one place i.e. StatusRx.
One other way without having new state as fcm message and without being lazy that I can think of is somehow interleaving the blocking calls(one for fcm message and the other for state update from StatusRx) like how tokio::select is used. I am not exactly sure about any clever ideas on how this can be done. Do you have any?

Are you proposing running the revalidation logic in the RPC handler to account for this so that the incorrect state is never observed?

No, that doesn't sound like a good approach. I just think being lazy might be okay here.

@bewakes

However, we are serving blocks from the database(L2 provider to be precise) instead of FCM and in future we will have a caching layer for L2 database so fetching blocks from db should not be a problem.

We use the FCM to determine what the tip is and so which blocks to fetch.  This makes no difference.

One other way without having new state as fcm message and without being lazy that I can think of is somehow interleaving the blocking calls(one for fcm message and the other for state update from StatusRx) like how tokio::select is used. I am not exactly sure about any clever ideas on how this can be done. Do you have any?

We probably need to rework how the signalling here works instead of just using a channel.  Perhaps something with semaphores?

No, that doesn't sound like a good approach. I just think being lazy might be okay here.

I presented that hypothetical to illustrate how it's not okay.  It also means that we'll have to ensure that the tests still pass when encountering this broken behavior.  That scenario we specifically will need to have a test for.  We'll also have to explain to users in our documentation how occasionally the RPC endpoints just return incorrect results because we didn't feel like implementing it correctly.
We are not longer under the time pressure we were when working towards devnet, we can afford to take some time to implement a correct solution.

Apologies for changing the PRs and branches. But closing this PR in favor of https://github.com/alpenlabs/strata/pull/457 as the target has changed from releases/0.1.0 to main.


refactor(pop-network): remove coretime use case from testnet

Closes https://github.com/r0gue-io/pop-node/issues/54
Removes XCM use cases for contracts from testnet runtime.

lgtm. Just needs a cargo fmt


Update validator dependency to 0.17.0

I tried to update validator to 0.17, but struggled because of using a struct with unnamed fields.
I guess it would be possible with a struct containing named fields.
Since I am new to rust, I also opened an issue in the validator repository repository to ask whether this is actually possible without using a struct with named fields only:
https://github.com/Keats/validator/issues/298

Fixed in the next book release, thanks!


Add option of installing apptainer using unprivileged script

This extends the install-apptainer instructions to include the option of installing it locally using the unprivileged installation script.

The CI check failures are not related to this PR.

CI failures unrelated, merging


adap_kl_ctrl boolean is not used

Hello,
Thanks for this implementation, is it possible that your kl adaptation is always on ?
https://github.com/lvwerra/trl/blob/750f5fd5329bb81c79b00243c4c8923ac14981d5/trl/ppo.py#L92
Best,
Thibaud

Yes, that is true - well spotted! I'll add it as a TODO.


[Modal] Fix concurrency issue

What was going on with the issue?
The resolution order of the two onExited callbacks was different between Firefox and Chrome.
That's not an issue on his own, but it starts to be one when having X before Y prevents Y from beeing called. That was what going on.
The fix
In order to avoid that issue, we put all the callback on a single Transition instance, not two that can resolve in a nondeterministic order.
Closes #6363.

[x] PR has tests / docs demo, and is linted.
[x] Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
[x] Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Sweet, it's even increasing the coverage.


Feature Request: add arguments like -disable-launch-delay.

When using nudgeMajorUpgradeEventLaunchDelay or  nudgeMinerUpdateEventLaunchDelay , Nudge cannot be displayed on the command line.
It would be nice to have a command that ignores the delay at startup in order to check the display content and operation.
I also feel that it is an advantage that it is possible to verify without having to delete sofa-macos_data_feed.json or com.github.macadmins.Nudge.plist.

-disable-random-delay it already exists and is in the changelog.

@erikng I think the ask here is to ignore the EventLaunchDelay keys (the ones that keeps Nudge quiet for the first X days after a release before it starts activating).

@erikng
Adding -disable-random-delay argument did not Ignore EventLaunchDelay.

/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge -disable-random-delay

"Device within nudgeMinorUpdateEventLaunchDelay - Current Date: 2024-08-13 23:06:19 +0000, Respected Date: 2024-11-15 00:00:00 +0000"

I want to ignore cases where the display date of the Nudge event is on a future date.
@kevinmcox
That's right. Thanks for the follow-up.

I would recommend using the "-simulate-date" key then. Nudge is doing the right thing here per your config. If you want to see what it would look like at a later date, you can use that key.
The cli option is not really designed to override any and all keys and I'm not personally interested in making it do that.

I see. I had not thought of that idea.
It certainly seems like it could be solved that way. If you have a viable means of doing so, this issue can be closed. Thank you.


python37Packages.netcdf4: 1.5.4 -> 1.5.5

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python37Packages.netcdf4 is: "Interface to netCDF library (versions 3 and 4)"
meta.homepage for python37Packages.netcdf4 is: "https://pypi.python.org/pypi/netCDF4"
meta.changelog for python37Packages.netcdf4 is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 1.5.5 with grep in /nix/store/wlcwp89ym8zckhbz9839x0j90j6z970r-python3.7-netCDF4-1.5.5

directory tree listing: https://gist.github.com/835e250c9565509535bef697792d4389

du listing: https://gist.github.com/bfef0a96d6b5e174de52e2b8354df561

Rebuild report (if merged into master) (click to expand)

62 total rebuild path(s)

17 package rebuild(s)

15 x86_64-linux rebuild(s)
15 i686-linux rebuild(s)
15 x86_64-darwin rebuild(s)
17 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
python37Packages.arviz
python37Packages.boltztrap2
python37Packages.h5netcdf
python37Packages.netcdf4
python37Packages.pygmt
python37Packages.pymc3
python37Packages.wrf-python
python38Packages.boltztrap2
python38Packages.h5netcdf
python38Packages.netcdf4
python38Packages.pygmt
python38Packages.wrf-python
python39Packages.boltztrap2
python39Packages.h5netcdf
python39Packages.netcdf4
python39Packages.pygmt
python39Packages.wrf-python

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/wlcwp89ym8zckhbz9839x0j90j6z970r-python3.7-netCDF4-1.5.5 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python37Packages.netcdf4 https://github.com/r-ryantm/nixpkgs/archive/d3dcff9761e9c8a847b402bb951ea134fd9f2c08.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/wlcwp89ym8zckhbz9839x0j90j6z970r-python3.7-netCDF4-1.5.5
ls -la /nix/store/wlcwp89ym8zckhbz9839x0j90j6z970r-python3.7-netCDF4-1.5.5/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review 1

5 packages failed to build:

python37Packages.arviz
python37Packages.h5netcdf
python37Packages.pymc3
python38Packages.h5netcdf
python39Packages.h5netcdf

10 packages built:

python37Packages.boltztrap2
python37Packages.netcdf4
python37Packages.pygmt
python37Packages.wrf-python
python38Packages.boltztrap2
python38Packages.netcdf4
python38Packages.pygmt
python38Packages.wrf-python
python39Packages.boltztrap2
python39Packages.netcdf4

Maintainer pings

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

2 packages marked as broken and skipped:

python37Packages.arviz
python37Packages.pymc3

5 packages failed to build:

python37Packages.h5netcdf
python37Packages.pygmt
python38Packages.h5netcdf
python38Packages.pygmt
python39Packages.h5netcdf

8 packages built:

python37Packages.boltztrap2
python37Packages.netcdf4
python37Packages.wrf-python
python38Packages.boltztrap2
python38Packages.netcdf4
python38Packages.wrf-python
python39Packages.boltztrap2
python39Packages.netcdf4

Result of nixpkgs-review pr 106151 run on x86_64-linux 1

2 packages marked as broken and skipped:

python37Packages.arviz
python37Packages.pymc3

13 packages built:

python37Packages.boltztrap2
python37Packages.h5netcdf
python37Packages.netcdf4
python37Packages.pygmt
python37Packages.wrf-python
python38Packages.boltztrap2
python38Packages.h5netcdf
python38Packages.netcdf4
python38Packages.pygmt
python38Packages.wrf-python
python39Packages.boltztrap2
python39Packages.h5netcdf
python39Packages.netcdf4

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

2 packages marked as broken and skipped:

python37Packages.arviz
python37Packages.pymc3

2 packages failed to build:

python37Packages.pygmt
python38Packages.pygmt

11 packages built:

python37Packages.boltztrap2
python37Packages.h5netcdf
python37Packages.netcdf4
python37Packages.wrf-python
python38Packages.boltztrap2
python38Packages.h5netcdf
python38Packages.netcdf4
python38Packages.wrf-python
python39Packages.boltztrap2
python39Packages.h5netcdf
python39Packages.netcdf4


Add --- to the end of snapshots

(requires some thought / discussion)
This would allow us te handle ending newlines.
We'd need to do some work

to check newlines
to handle the transition when some files won't have these ending items, to only check those that do

(...possibly work we should do before we merge this?)

I think it needs addressing but I'm not convinced that this is the right way to do it.

No prob ofc

We have the same problem with leading whitespace too.

Right — just tbc, if we have delimiters at the start & end, then it becomes possible to check for the number of newlines. IIUC, we previously gave up and just .trim everything because we didn't have a delimiter at the end.
(Note that this PR doesn't check newlines, it just adds the delimiters so that we can later check them...)

I'm thinking the right solution here would be that if

more than one trailing newline exist
or other trailing spaces
or any leading spaces

We add a unicode character to mark the beginning or end of it.  I was thinking of inserting ␄ at the end and ␁ at the beginning or something similar.  The diffing tool already also adds special unicode characters to indicate some significant whitespace to clarify what's going on.

more than one trailing newline exist

How about discriminating between zero and one trailing newline?

To ensure we're on the same page — at least for file snapshots — I think this is only a problem because of tools which change ending newlines (for example lots of repos have lints which enforce exactly one ending newline). Otherwise, we can just put the value after the header and we're done. Or am I missing something?
If that's the case, why do we need to handle the beginning?

So to be specific on the challenge: the leading whitespace is a problem in inline cases because of whitespace removal for indentation handling.  If the leading whitespace is meaningful you lose the meaning in the assertions.  The trailing one has similar challenges, but the newline specific case is indeed just for file snapshots due to editor settings.

the leading whitespace is a problem in inline cases because of whitespace removal for indentation handling

I would claim newlines in inline snapshots are a very tractable problem: https://github.com/mitsuhiko/insta/issues/457#issue-2169522883 — inline snapshots are either short and contain zero newlines, or long and always have exactly one newline trimmed at the start & end...
(I agree indentation isn't possible to control like this, though also that's a less frequent issue)


Login with username and password using MSAL with .netcore webapi by accessing cosmosDB

Hello guys
I was working of the issue of login with local account usign Azure ADB2C with cosmosDB, now finally i did it using .net core web api using resource token. So here is the some description what i have done to get this to work
We had need of login with username and password or local account using Azure ADB2C with cosmosDB, but we had need of accessing cosmosDB using resource token, without directly using db name and key, because of security reason, we wanted to allow authenticated user to access specific document from cosmosDB which has permission for accessing it, so we created the web api which get the access token to authenticate the user and this token was generated with login with username and password using MSAL and it also return the userid of logged in user and we use this user id to create the permission using the instance of DocumentClient and after creating permission it returns the resource token at client side and then using this resource token we create the new connection with cosmosDB which allows us to perform the all operations in the cosmosDB.
But one thing here which we need to notice is that, when we create the collection, we need to specify the partition key and this partition key need to use in the object which are going to save in the document of cosmosDB, otherwise it will deny authorise resource token to access the cosmosDB.
Here i am attaching some files, which you can check what i have done and in this attachment, you will find two file, so controller file is server side file which is using for webAPI and another one is client side file.
ClientServerFiles.zip

@riturajpandey thanks for sharing this.
Yes, in-case ResourceToken demands a partition validation then patitioned (unlimited) collection needs to be created. Here is sample code for partitioned collection creation
   DocumentCollection collection = new DocumentCollection()     {         Id = "<Name>",         PartitionKey = new PartitionKeyDefinition()         {             Paths = new Collection<string>() { "/<PropertyName>" },         },     };     var collectionResponse = await client.CreateDocumentCollectionIfNotExistsAsync(db.Resource.SelfLink, collection);
DocumentDb Studio has nice UI to validate the same. Selecting the collection shows details on right panel and it should contain the highlighted part (note userId is the property name users for this collection)


[BEAM-9646] Add Google Cloud vision integration transform

This PR adds a set of PTransforms integrating Beam with Google Cloud AI Vision API.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Run CommunityMetrics PreCommit

R: @Ardagan
Please take a look or offload it to someone else :)

R: @tysonjh @kennknowles

retest this please

@tysonjh Pinging for review

Run Java PreCommit

Run Java PreCommit

Run Python PreCommit

Thanks for the review @tysonjh !  Let's hope the upcoming 'fixit' will help.

@tysonjh Is the way of applying a default param I used OK with you?

@tysonjh thanks for your vigilance, I'll merge this after you give the final LGTM :)

@tysonjh Pinging just in case

🎉


vNext task Artifactory Nuget Restore warning invalid UTF-8

Describe the bug
In Azure DevOps Server 2019 build pipeline, we use task "Artifactory Nuget v2.10.0" from jFrog. During the nuget package restore, a warning message is displayed for some packages that have UTF-16 encoding.
To Reproduce
Run build including nuget package restore of "Microsoft.Web.Infrastructure.1.0.0"
Expected behavior
No warning message, package dependencies are not skipped
Versions

JFrog CLI version: 1.39.0
JFrog CLI operating system: Windows 2008 server
Artifactory Version:  6.18.1

Build log of task "Artifactory Nuget restore"
[Section]Starting: Artifactory NuGet restore
Task         : Artifactory Nuget
Description  : Restore and push NuGet packages from and to Artifactory while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
Version      : 2.10.0
Author       : JFrog
Help         : More Information
Running jfrog-cli from C:\AGENT_tool_jfrog\current\jfrog.exe.
JFrog CLI version: 1.39.0
The following version/s 3.3.0,4.0.0,4.1.0 were found on the build agent
Found tool in cache: NuGet 4.1.0 x64
...
Restoring NuGet package Microsoft.Web.Infrastructure.1.0.0.
...
GET https://server/artifactory/api/nuget/nuget/Packages(Id='Microsoft.Web.Infrastructure',Version='1.0.0')
...
Added package 'Microsoft.Web.Infrastructure.1.0.0' to folder 'C:\AGENT\1234\s\APP_DEV\Src\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to folder 'C:\AGENT\1234\s\APP_DEV\Src\packages' from source 'https://server/artifactory/api/nuget/nuget/'
...
Installed:
26 package(s) to packages.config projects
[Warn] Package: microsoft.web.infrastructure:1.0.0 couldn't be parsed due to: XML syntax error on line 1: invalid UTF-8 . Skipping the package dependency.
Collecting environment variables...
[Info] Collected environment variables for APP/20200101.1.
##[section]Finishing: Artifactory NuGet restore
Question
Does anybody know a UTF-16 package with dependencies (can be UTF-8 depencies, but the nuget package itself should be UTF-16. This will allow us to test the dependencies. Thank you.

I opened a similar bug for the same exact package over on the GitHub project for the JFrog Azure DevOps Server extension repository: https://github.com/jfrog/jfrog-azure-devops-extension/issues/464

Hi @fourpastmidnight and @kw80
Thanks for reporting this issue.
This PR - https://github.com/jfrog/build-info-go/pull/226 should fix it.
I will update this thread once the next release will be out.

Awesome, thanks for resolving this quickly. I just had our Azure DevOps Server admin updatè the plugin yesterday, so I still need to test a build using the updated task. I'll report back here soon.

Hi @fourpastmidnight,
It will be included in the next ADO JFrog Extension version.

@fourpastmidnight
https://github.com/jfrog/jfrog-azure-devops-extension/releases/tag/2.9.2 is Released!
Looking forward to your feedback on it.


Yii 2.0.8 can not get user data when attribute without 'require'

What steps will reproduce the problem?
In the beginning, i use 2.0.6, the id was set auto-increase in MySQL, so I can see the Model Class, which is generated by gii, id is not setted 'require'. In the form, I can set id directly, if save, the model will update its id.
What is the expected result?
When i use composer update, the Yii version goes from 2.0.6 to 2.0.7, 2.0.8. But one day, i test my website, I find that I cannot update my id.
What do you get instead?
I hope, in the Model class, without set require, the attribute can be updated from the form.
Additional info
Thank you.

Q
A

Yii version
2.0.8

PHP version
5.6.15

Operating system
Windows 7, and Linux Deepin 15.2 64bit

I hope, in the Model class, without set require, the attribute can be updated from the form.

Yes. You can use safe instead of require.

Thank you very much. I find the problem in my situation as follows,
I add new item in MySQL as can be null. but the new Item can not be setted in the yii2, so i add required for the new item in rules function. But i want to reset id isolated, it failure. So I debug, find that the error is new item null. I change the required to safe, it works well. Thank you.


Is there any way to run this without a dependency on pcst_fast?

I can't seem to get pcst_fast installed on a windows machine, is there a way to run this package without the dependency?

When I was working on this, we could not build wheels on windows, so pcst_fast only works on unix machines. OmicsIntegrator2 only has plugins for pcst_fast as a backend, so sadly, there isn't a way to run it on DOS (as of early 2019)

@sgosline I have a prototype Docker image for Omics Integrator 2 that I'm using to run it on Windows.  I haven't pushed it to Docker Hub, but I can if this is still relevant for you.

Interesting, I think I might have done this on my own at some point, just never pushed the changes. I'm still going to check out your docker branch, as it's a valuable use case for me.

The Dockerfile is in a different repo on a branch that is being shuffled around this week.  I can point to the more stable location after merging or give you the temporary location if you want it now.


Duplicate init code?

In src/cpu.js:
Line 220 and 253, there are the same code with the same functionality.
    this.reg32 = new Uint32Array(this.reg32s.buffer);
    this.reg16s = new Int16Array(this.reg32s.buffer);
    this.reg16 = new Uint16Array(this.reg32s.buffer);
    this.reg8s = new Int8Array(this.reg32s.buffer);
    this.reg8 = new Uint8Array(this.reg32s.buffer);

Good call! Would you mind making a pull request to delete one of the blocks?

Sure. Pull request sent.

Thanks!


Weather app v0.14: use weather condition code for icon selection

If weather code is available. use weather condition code for icon selection else use textual representation as before.
See
#1049 (comment)

Brilliant - thanks!


chore: stop mergning into branch release-1.16

We do not mantain the version 1.16 and to keep this branch clean this stop merging stuff into that.
Closes #1239
Signed-off-by: Jonathan Gonzalez V<EMAIL_ADDRESS>

/ok-to-merge


Router: Break up developer guide into multiple chapters

The router chapter is huge. This issues begins the discussion of how to better organize the router developer guide into beginner/advanced sections.
Proposed topics for beginner chapter

[x] Initial Setup (Base HREF, Imports, *.routes.ts files)
[x] Basic Configuration
[x] Child route configuration
[x] Router Outlet
[x] Router Links
[x] Active Router Links / Options
[x] Route Data
[x] Route Params getting/setting
[x] Query Params getting/setting
[x] Fragment getting/setting
[x] Basic Redirect from empty path route
[x] Imperative Navigation
[x] Absolute/Relative Navigation
[x] CanActivate Guard - Admin feature area
[x] Lazy Loading
[x] Location Strategy
[x] Catch-all routes (Handling 404s)
[x] Data Resolve
[x] CanDeactivate Guard
[x] Animating Route Transitions

Proposed topics for advanced chapter. The advanced chapter would have more of a cookbook approach with more focus on code samples.

[ ] Route Tree traversal (Getting info from a parent route)
[x] CanLoad Guard
[x] CanActivateChild Guard
[x] Component-Less Routes
[ ] Secondary Routes
[ ] Secondary Router Links
[ ] Relative/Absolute Redirects
[ ] Subscribing to Events (Errors, Loading Indicators)
[ ] Router Outlet Events
[ ] Debugging (Enable tracing)

cc: @wardbell @Foxandxss @DeborahK @bennadel @vsavkin

FYI, on the Dart side, we've broken down the Router guide into sections; e.g.: the main router page leads to milestone pages, like this one for milestone 1. Each milestone page has a dropdown to help navigation (since the side nav has a limit on the depth of entries). We'll likely rework the guide again at some point soon. I like your topic breakdown above!
cc @kwalrath


chore: defaults

This PR contains a:

[ ] bugfix
[ ] new feature
[x] code refactor
[ ] test update
[ ] typo fix
[x] metadata update

Motivation / Use-Case
Add webpack defaults
Breaking Changes
No
Additional Info
No

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@ae39c24). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master       #6   +/-   ##
=========================================
  Coverage          ?   79.48%
=========================================
  Files             ?        2
  Lines             ?       39
  Branches          ?        7
=========================================
  Hits              ?       31
  Misses            ?        8
  Partials          ?        0

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 ae39c24...e6ee42e. Read the comment docs.


Devices become unstable after short period

Describe the bug （描述一下问题）
A fresh restart of HASS seems to cause my 3 heat pumps that are connected to function correctly for a brief period. After some time my logs become flooded with errors/warnings, and the reported temperatures become out of date.
Screenshots / Logs / Pcap File（屏幕截图/日志/抓包文件）
My log is flooded with thousands of entries similar to the following:
2021-09-02 02:04:15 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:04:30 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:04:45 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:05:00 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:05:16 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:05:31 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:05:46 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:06:01 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:06:16 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:06:31 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:06:46 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:07:01 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:07:16 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:07:31 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:07:46 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:08:01 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:08:16 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:08:31 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:08:46 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:09:01 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:09:16 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:09:31 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:09:47 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 1.45
2021-09-02 02:10:01 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:10:16 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:10:31 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:10:46 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:11:01 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:11:16 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:11:31 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:11:46 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:12:01 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:12:16 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:12:31 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:12:36 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:12:46 ERROR (SyncWorker_1) [msmart.lan] Send <IP_ADDRESS>:33694 -> <IP_ADDRESS>:6444 retries: 1 time:<PHONE_NUMBER>7109985 Error: [Errno 32] Broken pipe
2021-09-02 02:12:46 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:12:48 ERROR (SyncWorker_1) [msmart.lan] Connect Error: <IP_ADDRESS>:6444 timed out
2021-09-02 02:12:48 ERROR (SyncWorker_1) [msmart.lan] Sokcet is None: <IP_ADDRESS>:6444
2021-09-02 02:12:48 ERROR (SyncWorker_1) [msmart.security] unexpected data length
2021-09-02 02:12:49 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 3.05
2021-09-02 02:13:01 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:13:01 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:13:16 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.02
2021-09-02 02:13:17 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 1.49
2021-09-02 02:13:31 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:13:32 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 1.72
2021-09-02 02:13:46 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:13:51 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:14:01 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:14:06 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:14:16 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:14:21 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:14:31 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:14:36 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:14:46 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:14:51 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.0
2021-09-02 02:15:01 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:15:06 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:15:16 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:15:21 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:15:31 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:15:36 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:15:46 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:15:51 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:16:01 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:16:06 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:16:16 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:16:21 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:16:31 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.01
2021-09-02 02:16:36 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:16:46 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:16:51 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:17:01 WARNING (SyncWorker_3) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:17:06 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:17:16 WARNING (SyncWorker_2) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:17:21 WARNING (SyncWorker_1) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01
2021-09-02 02:17:31 WARNING (SyncWorker_4) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 0.0
2021-09-02 02:17:36 WARNING (SyncWorker_0) [msmart.device] Got Null from <IP_ADDRESS>:6444 Version: 3 Count: 0 Time(s): 5.01

Versions (版本信息)

Home Assistant version: 2021.9.0
Midea msmart version: https://github.com/mac-zhou/midea-ac-py/commit/37d64c86a2b5c759c592909a307fd682d5a7a721

yes, this's a bug.
New version has been released.
Please feedback after upgrading.

It's still present even after upgrading to .35

add to configs file and restart hass , then show me the new log
logger:
  default: info
  logs:
    custom_components.midea_ac: debug
    msmart: debug

2021-09-03 09:51:55 DEBUG (SyncWorker_1) [msmart.command] Finalize request data: aa20ac00000000000003418100ff03ff0002000000000000000000000000371223
2021-09-03 09:51:55 DEBUG (SyncWorker_1) [msmart.device] pkt_builder: <IP_ADDRESS>:6444 len: 104 data: 5a5a0111680020000000000006373309030915145d720000001000000000000000000000000000006b000a76e27eed2c3647e57d8602df8b5d83c3d3bf05b1f7b20afd3884fc5234fabd9611a01068eac9c4735497482542368cff782a8bc175329735f69eeac8c7
2021-09-03 09:51:55 DEBUG (SyncWorker_1) [msmart.lan] Attempting new connection to <IP_ADDRESS>:6444
2021-09-03 09:51:56 DEBUG (SyncWorker_1) [msmart.lan] Socket <IP_ADDRESS>:58880 -> <IP_ADDRESS>:6444 retries: 0 time: 0.0 tcp_key: None
2021-09-03 09:51:56 DEBUG (SyncWorker_1) [msmart.lan] Sending <IP_ADDRESS>:58880 -> <IP_ADDRESS>:6444 retries: 0 time: 0.0 message: 5a5a0111680020000000000006373309030915145d720000001000000000000000000000000000006b000a76e27eed2c3647e57d8602df8b5d83c3d3bf05b1f7b20afd3884fc5234fabd9611a01068eac9c4735497482542368cff782a8bc175329735f69eeac8c7

2021-09-03 09:51:55 DEBUG (SyncWorker_1) [msmart.command] Finalize request data: aa20ac00000000000003418100ff03ff0002000000000000000000000000371223
2021-09-03 09:51:55 DEBUG (SyncWorker_1) [msmart.device] pkt_builder: <IP_ADDRESS>:6444 len: 104 data: 5a5a0111680020000000000006373309030915145d720000001000000000000000000000000000006b000a76e27eed2c3647e57d8602df8b5d83c3d3bf05b1f7b20afd3884fc5234fabd9611a01068eac9c4735497482542368cff782a8bc175329735f69eeac8c7
2021-09-03 09:51:55 DEBUG (SyncWorker_1) [msmart.lan] Attempting new connection to <IP_ADDRESS>:6444
2021-09-03 09:51:56 DEBUG (SyncWorker_1) [msmart.lan] Socket <IP_ADDRESS>:58880 -> <IP_ADDRESS>:6444 retries: 0 time: 0.0 tcp_key: None
2021-09-03 09:51:56 DEBUG (SyncWorker_1) [msmart.lan] Sending <IP_ADDRESS>:58880 -> <IP_ADDRESS>:6444 retries: 0 time: 0.0 message: 5a5a0111680020000000000006373309030915145d720000001000000000000000000000000000006b000a76e27eed2c3647e57d8602df8b5d83c3d3bf05b1f7b20afd3884fc5234fabd9611a01068eac9c4735497482542368cff782a8bc175329735f69eeac8c7

it looks work fine. more logs please.

Let me wait some time, I think I first saw the error message an hour after restarting HA.

I'm sorry, I cannot reproduce it anymore. Could be that I haven't restarted my HA server before and it was an error from the previous version?

I'm sorry, I cannot reproduce it anymore. Could be that I haven't restarted my HA server before and it was an error from the previous version?

last version have a bug, but about V3 device, your device is V2.
You can continue to observe.

Logger: msmart.device
Source: /usr/local/lib/python3.9/site-packages/msmart/device.py:215
First occurred: 12:58:43 PM (10 occurrences)
Last logged: 1:00:57 PM
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 3.01
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.01
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.03
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.0
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.02
Logger: msmart.lan
Source: /usr/local/lib/python3.9/site-packages/msmart/lan.py:61
First occurred: 12:58:43 PM (10 occurrences)
Last logged: 1:00:57 PM
Sokcet is None: <IP_ADDRESS>:6444
Logger: msmart.lan
Source: /usr/local/lib/python3.9/site-packages/msmart/lan.py:43
First occurred: 12:58:43 PM (10 occurrences)
Last logged: 1:00:57 PM
Connect Error: <IP_ADDRESS>:6444 timed out

Logger: msmart.device
Source: /usr/local/lib/python3.9/site-packages/msmart/device.py:215
First occurred: 12:58:43 PM (10 occurrences)
Last logged: 1:00:57 PM
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 3.01
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.01
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.03
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.0
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 2.02
Logger: msmart.lan
Source: /usr/local/lib/python3.9/site-packages/msmart/lan.py:61
First occurred: 12:58:43 PM (10 occurrences)
Last logged: 1:00:57 PM
Sokcet is None: <IP_ADDRESS>:6444
Logger: msmart.lan
Source: /usr/local/lib/python3.9/site-packages/msmart/lan.py:43
First occurred: 12:58:43 PM (10 occurrences)
Last logged: 1:00:57 PM
Connect Error: <IP_ADDRESS>:6444 timed out

give me file home-assistant.log please

There you go: https://bit.ly/3kSF9xX

There you go: https://bit.ly/3kSF9xX

main problem is: Connect Error: <IP_ADDRESS>:6444 timed out.
lasted about 2 minutes.
The main reason is that the port cannot be connected in 2 Second.
you can change timeout to 4 in file  /usr/local/lib/python3.9/site-packages/msmart/lan.py on line 36.
then restart HASS, See if it will happen again.

I'm not sure how can I reach that folder on HassOS (on a NUC).

I'm not sure how can I reach that folder on HassOS (on a NUC).

join  telegram group，then contact me for remote support

Any update in this? I am still suffering from the same issue on latest version.

I'm having this issue and changed the timeout from 2 to 4 and it still continues:
Got Null from <IP_ADDRESS>:6444 Version: 2 Count: 0 Spend time: 9.01

Here are some observations I've noticed

The devices don't handle multiple connections well. e.g. If you're using the app alongside this integration you might have connection issues. Or running multiple HA instances.
If the cloud connection is blocked, the device will eventually reboot due to a watchdog
I've had devices randomly drop off the WiFi. When this happens the logs get flooded with connect errors.
Lastly, there are occasional timeouts during normal operation. Not ideal, but a fact of life for now.

Here are some observations I've noticed

The devices don't handle multiple connections well. e.g. If you're using the app alongside this integration you might have connection issues. Or running multiple HA instances.

This is probably my issue. I need the Carrier app for schedules and home assistant for graphs and other automation.


is modbus ascii will be supported?

thanks you very much, i just wonder whether  the modbus ascii will be support?

Hi shuzhongling,
what device are you using that speaks modbus ASCII ? It shouldn't be hard to implement, I just don't have any ASCII device lying around to play with and I haven't really seen that many in the field...

Closing this for inactivity. Feel free to reopen if needed.


No support for adding shutdown script

https://cloud.google.com/compute/docs/shutdownscript documents the process for adding a shutdown script. This will be very useful for us when dealing with pre-empted nodes. The functionality would be the same as startup script. I have it working locally so will put a PR up if this issue gets backing

Looks like I missed a trick here and templates are what should be used. Sorry for the noise.


IntelliSense is not reactive with sympy

Environment data

Language Server version: 2023.12.1
OS and version: macOS Sonoma 14.2
Python version: 3.12.0
Conda version 23.10.0
Sympy version: 1.12

Code Snippet
from sympy import Symbol

x = Symbol("x")

Expected behavior
Hovering over the the variable x should show that x is a Symbol in no-time, or auto-completion should appear instantly when typing anywhere in the code above.
Actual behavior
It takes about 5 seconds to show the type information when hover with the cursor on x, and about 12 seconds to show any auto-completion.
The problem is using Symbol from sympy as all the other features seems to not run any delay. For example, the code below does not halt IntelliSense:
import sympy as sym

x = sym.var("x")

Logs
pylance-sympy-trace.log

Sympy perf was recently mentioned in https://github.com/microsoft/pyright/issues/7130. Eric was looking for someone to provide a concrete example, so I'll transfer this issue over to Pyright.


Terminix was renamed to Tilix.

Terminix was renamed to Tilix because of legal issues.
Changed the Directories to the new tilix directories.
Maybe nord-terminix should be renamed to nord-tilix as well.
See: https://github.com/gnunn1/tilix

I know, I've been part of the discussion thread for a new name 😄
I'll change the name of the repository and all related sources as soon as I've got some time for it 👍

🚢 Shipped in release version 🏷 0.3.0.

Nice! Thanks.


[for discussion] PMULL is sometimes slow on ARM64, let us not rely on it?

On some ARM platforms, PMULL is slow.
In theory, PMULL has a throughout of one instruction per cycle with a latency of 4 or 5 cycles on some platforms like the A53 or 4 cycles on  the A72. That's better than the portable approach which might compile to the following...
  eor x0, x0, x0, lsl 1
  eor x0, x0, x0, lsl 2
  eor x0, x0, x0, lsl 4
  eor x0, x0, x0, lsl 8
  eor x0, x0, x0, lsl 16
  eor x0, x0, x0, lsl 32

I would expect this sequence to havre a latency of 6 cycles... However, a pure latency analysis might be misleading here.
Which is better, six calls to eor or a single call to PMULL?
Matthew Wilson reports better on results on Amazon's Graviton 2 with the eor sequence.
Let us benchmark it on my Ampere server.
For each file, the first line is master, the second line is this PR. The number of instructions is up, but the number of cycles is also down...

jsonexamples/apache_builds.json
stage 1 instructions:     395648 cycles:     510917 (49.27 %) ins/cycles: 0.77 mis. branches:        441 (cycles/mis.branch 1156.32) cache accesses:      41387 (failure       2008)
 stage 1 runs at 4.01 cycles per input byte.
stage 1 instructions:     401613 cycles:     501762 (49.08 %) ins/cycles: 0.80 mis. branches:        446 (cycles/mis.branch 1123.77) cache accesses:      41412 (failure       2007)
 stage 1 runs at 3.94 cycles per input byte.

jsonexamples/canada.json
stage 1 instructions:    7769448 cycles:    9298402 (38.66 %) ins/cycles: 0.84 mis. branches:      11425 (cycles/mis.branch 813.81) cache accesses:     868509 (failure      35204)
 stage 1 runs at 4.13 cycles per input byte.
stage 1 instructions:    7874965 cycles:    9159878 (38.30 %) ins/cycles: 0.86 mis. branches:      11175 (cycles/mis.branch 819.61) cache accesses:     865310 (failure      35205)
 stage 1 runs at 4.07 cycles per input byte.

jsonexamples/citm_catalog.json
stage 1 instructions:    5103759 cycles:    6689623 (60.86 %) ins/cycles: 0.76 mis. branches:        478 (cycles/mis.branch 13977.48) cache accesses:     493554 (failure      27019)
 stage 1 runs at 3.87 cycles per input byte.
stage 1 instructions:    5184199 cycles:    6533712 (60.86 %) ins/cycles: 0.79 mis. branches:        470 (cycles/mis.branch 13886.74) cache accesses:     493180 (failure      27015)
 stage 1 runs at 3.78 cycles per input byte.

jsonexamples/github_events.json
stage 1 instructions:     190518 cycles:     256389 (52.20 %) ins/cycles: 0.74 mis. branches:        275 (cycles/mis.branch 930.19) cache accesses:      19379 (failure       1037)
 stage 1 runs at 3.94 cycles per input byte.
stage 1 instructions:     193558 cycles:     251020 (53.51 %) ins/cycles: 0.77 mis. branches:        275 (cycles/mis.branch 910.86) cache accesses:      19295 (failure       1035)
 stage 1 runs at 3.85 cycles per input byte.

jsonexamples/gsoc-2018.json
stage 1 instructions:    7972527 cycles:   12035523 (60.80 %) ins/cycles: 0.66 mis. branches:       9923 (cycles/mis.branch 1212.88) cache accesses:     685984 (failure      52030)
 stage 1 runs at 3.62 cycles per input byte.
stage 1 instructions:    8128519 cycles:   11768620 (60.24 %) ins/cycles: 0.69 mis. branches:       9913 (cycles/mis.branch 1187.18) cache accesses:     673626 (failure      52032)
 stage 1 runs at 3.54 cycles per input byte.

jsonexamples/instruments.json
stage 1 instructions:     700908 cycles:     888843 (50.97 %) ins/cycles: 0.79 mis. branches:        805 (cycles/mis.branch 1103.68) cache accesses:      74402 (failure       3464)
 stage 1 runs at 4.03 cycles per input byte.
stage 1 instructions:     711235 cycles:     872224 (50.28 %) ins/cycles: 0.82 mis. branches:        796 (cycles/mis.branch 1094.82) cache accesses:      74378 (failure       3462)
 stage 1 runs at 3.96 cycles per input byte.

jsonexamples/marine_ik.json
stage 1 instructions:   11516659 cycles:   12726226 (37.59 %) ins/cycles: 0.90 mis. branches:      13214 (cycles/mis.branch 963.05) cache accesses:    1259831 (failure      46653)
 stage 1 runs at 4.27 cycles per input byte.
stage 1 instructions:   11656508 cycles:   12547133 (37.30 %) ins/cycles: 0.93 mis. branches:      13133 (cycles/mis.branch 955.34) cache accesses:    1257140 (failure      46655)
 stage 1 runs at 4.21 cycles per input byte.

jsonexamples/mesh.json
stage 1 instructions:    2689276 cycles:    3043827 (36.55 %) ins/cycles: 0.88 mis. branches:       1270 (cycles/mis.branch 2395.83) cache accesses:     280843 (failure      11327)
 stage 1 runs at 4.21 cycles per input byte.
stage 1 instructions:    2723195 cycles:    2983616 (36.32 %) ins/cycles: 0.91 mis. branches:       1274 (cycles/mis.branch 2341.80) cache accesses:     280656 (failure      11328)
 stage 1 runs at 4.12 cycles per input byte.

jsonexamples/mesh.pretty.json
stage 1 instructions:    4859696 cycles:    6138626 (50.72 %) ins/cycles: 0.79 mis. branches:         51 (cycles/mis.branch 118277.97) cache accesses:     480123 (failure      24672)
 stage 1 runs at 3.89 cycles per input byte.
stage 1 instructions:    4933635 cycles:    6009036 (49.95 %) ins/cycles: 0.82 mis. branches:         49 (cycles/mis.branch 121887.15) cache accesses:     480120 (failure      24672)
 stage 1 runs at 3.81 cycles per input byte.

jsonexamples/numbers.json
stage 1 instructions:     480679 cycles:     608430 (39.07 %) ins/cycles: 0.79 mis. branches:        604 (cycles/mis.branch 1006.23) cache accesses:      51214 (failure       2366)
 stage 1 runs at 4.05 cycles per input byte.
stage 1 instructions:     487715 cycles:     597699 (38.90 %) ins/cycles: 0.82 mis. branches:        602 (cycles/mis.branch 992.52) cache accesses:      51268 (failure       2365)
 stage 1 runs at 3.98 cycles per input byte.

jsonexamples/random.json
stage 1 instructions:    2641941 cycles:    3645776 (53.45 %) ins/cycles: 0.72 mis. branches:       3843 (cycles/mis.branch 948.48) cache accesses:     351207 (failure       8000)
 stage 1 runs at 7.14 cycles per input byte.
stage 1 instructions:    2634994 cycles:    3575589 (52.90 %) ins/cycles: 0.74 mis. branches:       3868 (cycles/mis.branch 924.18) cache accesses:     330869 (failure       8001)
 stage 1 runs at 7.00 cycles per input byte.

jsonexamples/twitterescaped.json
stage 1 instructions:    1672345 cycles:    2243466 (31.81 %) ins/cycles: 0.75 mis. branches:       4397 (cycles/mis.branch 510.18) cache accesses:     173627 (failure       8809)
 stage 1 runs at 3.99 cycles per input byte.
stage 1 instructions:    1698707 cycles:    2203133 (31.43 %) ins/cycles: 0.77 mis. branches:       4414 (cycles/mis.branch 499.03) cache accesses:     171580 (failure       8811)
 stage 1 runs at 3.92 cycles per input byte.

jsonexamples/twitter.json
stage 1 instructions:    2242376 cycles:    3166166 (57.19 %) ins/cycles: 0.71 mis. branches:       3307 (cycles/mis.branch 957.23) cache accesses:     257814 (failure       9896)
 stage 1 runs at 5.01 cycles per input byte.
stage 1 instructions:    2258274 cycles:    3098090 (57.01 %) ins/cycles: 0.73 mis. branches:       3374 (cycles/mis.branch 918.00) cache accesses:     248873 (failure       9901)
 stage 1 runs at 4.91 cycles per input byte.

jsonexamples/update-center.json
stage 1 instructions:    1686066 cycles:    2190297 (43.27 %) ins/cycles: 0.77 mis. branches:       4264 (cycles/mis.branch 513.63) cache accesses:     184461 (failure       8364)
 stage 1 runs at 4.11 cycles per input byte.
stage 1 instructions:    1710943 cycles:    2153359 (42.49 %) ins/cycles: 0.79 mis. branches:       4263 (cycles/mis.branch 505.03) cache accesses:     183427 (failure       8367)
 stage 1 runs at 4.04 cycles per input byte.

I am going to merge this for now. We can revisit it later.

It is a surprise to me that the eor sequence is faster than PMULL, so here is why:
When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out in between other vector code, so effectively the extra cycles of the sequence do not matter because the GPR units are idle otherwise and the critical path is on the FP side.
Also the PMULL requires two extra fmovs: GPR->FP (3 cycles in N1, 5 cycles in A72 ) and FP->GPR (2 cycles on N1 and 5 cycles on A72.)
Simplified diff:
-       mvni    v28.4s, 0
-       fmov    d5, x4
-       bic     v22.8b, v22.8b, v5.8b
-       pmull   v12.1q, v28.1d, v22.1d
-       fmov    x7, d12
-       eor     x7, x28, x7

+       eor     x6, x4, x4, lsl 1
+       eor     x6, x6, x6, lsl 2
+       eor     x6, x6, x6, lsl 4
+       eor     x6, x6, x6, lsl 8
+       eor     x6, x6, x6, lsl 16
+       eor     x6, x28, x6, lsl 32
+       eor     x4, x4, x6

On m6g with the patch I see: (max of 3 runs)
Min:  0.000594613 bytes read: 631515 Gigabytes/second: 1.06206
and before the patch: (max of 3 runs)
Min:  0.00060354 bytes read: 631515 Gigabytes/second: 1.04635
So the change looks good to me.

@sebpop I will add a comment in the code echoing your analysis. It sure sounds good!


Performance tune Settings app for startup

Description of the new feature / enhancement
Settings app is slow to boot which also affects OOBE and Quick launch.
Scenario when this would be used?
Quick Launch / instant starting on lower spec machines
Supporting information
No response

Ahead of time with WinAppSDK should help here

Given that the latest release (v0.85.0) uses Windows App SDK v1.6 which supports native AOT, solving this issue must be easier now.


ams1-ib.adnxs.com

I´ve found this to be a source of video ads which eats away cpu time, but i don´t know from which source it is being added.
Otherwise would it be possible to add it to your liste, please?
It´s used on the web.de freemail pages

I have a ton of adnxs domains in my list, so I'm happy to add this one too. Added in https://github.com/lightswitch05/hosts/commit/3a5c1e6c1163b103f13e3e721fa8dce26b9b4cca

Awesome, thanks a lot

Thanks Hubert and Daniel! @raziel-  @lightswitch05


fix response typo

@dush1729: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

I didn't realize that this pull request was made against master (and not main) so I cherry picked there: https://github.com/apollographql/apollo-android/commit/1be608f71ae96988669f03cde9219c2bda3dfc95.
I'll remove master shortly to avoid this in the future.


Print running shell commands when verbose is enabled

Hi,
I think --verbose should print out the executed command (I did it quite by mistake for git commands and it was quite informative) and also their outputs (that's how I saw the --no-hardlinks issue).
I'm sure there are other interesting areas to be verbose about but those were the pain points I had.
Thankfully ruby allows to edit gem's source code which is of great help but shouldn't be needed in most situations IMHO.
Thanks.

Yeah, this would be super helpful.

I took a moment to gather some information for anyone who would like to work on this...
If you run this abomination of a command on the latest master branch:
git grep '`' | grep '.rb:' | grep -v spec/ | grep -vE ': *#' | grep -vE ': *[^"]*"[^"]*`' | grep -vE '```' | grep -vE 'rubygems_gem_installer.rb|^lib/bundler/dsl.rb:|^lib/bundler/cli.rb:|^lib/bundler/vendor/' | grep -vE ':You should probably|: *I ran the command' | grep -vE ': *[^%]*%\([^)]*`'

You get the instances where backticks are used:
lib/bundler.rb:        `sudo -p "#{prompt}" #{str}`
lib/bundler/build_metadata.rb:        return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
lib/bundler/build_metadata.rb:          `git ls-tree --abbrev=8 HEAD bundler`.split(/\s/).fetch(2, "").strip.freeze
lib/bundler/cli/doctor.rb:      output = `/usr/bin/otool -L "#{path}"`.chomp
lib/bundler/cli/doctor.rb:      output = `/usr/bin/ldd "#{path}"`.chomp
lib/bundler/cli/gem.rb:      git_author_name = git_installed ? `git config user.name`.chomp : ""
lib/bundler/cli/gem.rb:      github_username = git_installed ? `git config github.user`.chomp : ""
lib/bundler/cli/gem.rb:      git_user_email = git_installed ? `git config user.email`.chomp : ""
lib/bundler/cli/gem.rb:          `git init`
lib/bundler/cli/gem.rb:          `git add .`
lib/bundler/env.rb:      `#{script} --version`.chomp
lib/bundler/env.rb:      `chruby-exec -- chruby --version`.
lib/bundler/source/git/git_proxy.rb:            capture_and_filter_stderr(uri) { `git #{command}` }

You'll note that excluding the uses in following files, all of them involve git:
lib/bundler.rb
lib/bundler/cli/doctor.rb
lib/bundler/env.rb

Perhaps it's worth adding a git helper class, and have that show the commands it runs when you use --verbose?
The commands in the files that don't use git are:
lib/bundler.rb:        `sudo -p "#{prompt}" #{str}`
lib/bundler/cli/doctor.rb:      output = `/usr/bin/otool -L "#{path}"`.chomp
lib/bundler/cli/doctor.rb:      output = `/usr/bin/ldd "#{path}"`.chomp
lib/bundler/env.rb:      `#{script} --version`.chomp
lib/bundler/env.rb:      `chruby-exec -- chruby --version`

lib/bundler/env.rb are afaict only used for gathering bundler env output. (but that's definitely worth verifying.)
the sudo one includes a message saying it's using sudo, and is used in various places -- it may make sense to have this include the command with --verbose.
otool/ldd I'm not sure about.

Perhaps a Bundler::Tools class, or something like that, would be worthwhile? This would make it easier to avoid duplicated code when implementing helpers like this.
It could have e.g.:
Bundler::Tools.git(command)
Bundler::Tools.sudo(command)
Bundler::Tools.which(executable)

and some potential ones I'm less sure of:
mkdir_p(path, options={})
rm_rf(path)

and have the preexisting Bunder.sudo/Bundler.which/Bundler.mkdir_p/Bundler.rm_rf just call the ones under the new class, until they can be deprecated and removed.


i tried to get license key first time i got success message

i have setup this license system for the first time and when i tried to get license key first time i got success message although my data was fake but when i tried this again then i got failed message

resolved


Support YAML 1.2 and later

Initially reported as https://github.com/docker/compose-cli/issues/1621
compose-go can't load a yaml file using Yaml 1.2 directive
%YAML 1.2
---
...

require go-yaml/yaml#298
expected to be fixed in gopkg.in/yaml.v3

fixed by migration to go-yaml/v3


Enter comment to reset Data Mart

After changing the financial dimension sequence, it is required to reset the Data Mart in order to see the changes in the reports.
Would be great to add this to the documentation. Thank you

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

ID: 1e429cac-5092-03ec-71e4-425af9623908
Version Independent ID: b88220bd-7b7c-2f9b-1eb2-212d7b9a3448
Content: Financial dimension configuration - Finance & Operations | Dynamics 365
Content Source: articles/fin-ops-core/dev-itpro/financial/financial-dimension-configuration-integration.md
Service: dynamics-365-cross-app
Product: ****
Technology: ****
GitHub Login: @RyanCCarlson2
Microsoft Alias: rcarlson

@gersp, thank you for providing this feedback.
@RyanCCarlson2, please review the feedback and update the content as needed.

Got it. Agree with the suggested comment. I'll review with the engineer to verify any other


Recalculate Sticky top when dynamically injected

It doesn't appear the the top css style attribute is recalculated correctly when you dynamically inject (lazy load for example) a React component that contains a StickyContainer/Sticky.
For example if i have a sticky navigation and a item within the page that is also sticky the item in the page has its top css style value offset to account for the header so it appears below it and is not overlapped. When a sticky item in the page is dynamically injected this top css value is set to 0 so the header will overlap the item as you scroll down the page.

I have a similar issue where react-sticky is not recalculating the padding on the div it places before the sticky element.  On my home page the top header is 50 px and react-sticky correctly calculates a padding of 50px.  When I go to the next page where my header is 95px, react-sticky thinks it's still only 50px and the content begins underneath the header and you can't see it.

@navgarcha any solution you have?

Here's my workaround:
class StickyContainerWorkaround extends PureComponent {
    componentDidMount () {
        window.scrollBy(0, 1);
        window.scrollBy(0, -1);
    }

    render () {
        return (
            <StickyContainer>
                {this.props.children}
            </StickyContainer>
        );
    }
}

Not perfect but i guess it's better than manipulating scroll :/
export let style
.
.
.
render() {
    if(Object.getOwnPropertyNames({...this.props.style}).length !== 0) {
      style = {...this.props.style}
    }
    return (
      <div className="sidebar" style={style}>
        <ProfileCard />
      </div>
    )
  }

@kubilaysalih not sure I follow. Is this another workaround?
What's the idea behind making a copy of an object (style) only if its not empty?

@pzatrick if you log style object, you can see that it become empty object after lazy load. I'm just manipulating it from become an empty object.

I've noticed some quirkiness when the y position of an element change, but I'm not quite sure what problem this is talking about specifically. I'm going to close this since it's a year old, if we can get a reproduction going on https://codepen.io/ or https://codesandbox.io/ then I'm happy to reopen!


Chrome Warning

What happened?
When I use CesiumJS 1.103 to implement a Web 3D application, Chrome prints many  warnings like: [Violation] ‘requestAnimationFrame’ handler took 584ms; [Violation] Added non-passive event listener to a scroll-blocking ‘mousewheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive. See Passive event listeners - Chrome Platform Status 267;[Violation] ‘message’ handler took 213ms.
Reproduction steps
1.use CesiumJS to implement a Web 3D application
2.Browse in Chrome
3.Open the dev-tools
...
Sandcastle example
No response
Environment
Browser: Chrome Version 126.0.6478.126 (Official Build) (64-bit)
CesiumJS Version: 1.103
Operating System: Ubuntu 22.04 LTS

Hi @mumua666, I'm not able to reproduce this warning.
Would you be able to include a Sandcastle example that replicates the issue? That would help us give us more context to determine the issue. Thanks!

Ok, Maybe I can send you my working project, which is implemented by Vue2 + CesiumJS1.103. Here the source code. By the way, this is a commercial project, and please keep in mind not leaking the source code. Many thanks.
------------------ 原始邮件 ------------------
发件人:                                                                                "CesiumGS/cesium"                                                                                @.>;
发送时间: 2024年7月10日(星期三) 晚上11:23
@.>;
<EMAIL_ADDRESS>主题: Re: [CesiumGS/cesium] Chrome Warning (Issue #12076)
Hi @mumua666, I'm not able to reproduce this warning.
Would you be able to include a Sandcastle example that replicates the issue? That would help us give us more context to determine the issue. Thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>
木木
@.***
深圳大学
学生
从QQ邮箱发来的超大附件
WuyiMine.zip (472.33M, 2024年08月10日 03:06 到期)进入下载页面：https://mail.qq.com/cgi-bin/ftnExs_download?k=71636234cf9c4ad18030adf24231021c48175257560405011d535403511c550a02014f000557511e0656040d57025507525a0004643d3064451a0b790d5f551d4a0a123459&t=exs_ftn_download&code=0cb4d103

Hi @mumua666, could you create a minimal code example using Sandcastle?


Run non-perf sensitive tests on Cirrus

Moves some of the easy fixes from #27917 to cirrus
This will:

Enable running devicelab tests on Cirrus
Move 10 tests from devicelab to Cirrus - let's keep techdebt there so it continues to update the dashboard.
Use a new Windows image that has Java and the Android SDK available
Run more tests on Windows than we were in the devicelab
Run the tests pre and post merge.

I'm going to skip running some of the tests on Windows that we're not already running on Windows.  There's some issue with running gradlew on the Windows image.  I added a todo and filed an issue here to track: https://github.com/flutter/flutter/issues/29017

@fkorotkov I'm occasionally seeing the mac machines again give me issues over JWT stuff here - could hte time be getting out of sync again?

@dnfield it should sync time before the build. Do you mind to add a debug log somewhere so we can make sure it's the time issue?

It didn't reproduce.  I'll add a debug log in another PR.

Dashboard redness is incorrect - it's reporting Cirrus as red when it's really green.  I'll land this once the other checks pass to get a fresh run through.

This PR makes us use more than 4 OSX instances per pull request, which seems to be a problem if someone is opening a PR as a first time contributor.  @fkorotkov is there a way we can add an only_if for that case to not run the new tests?  Or is there some option to bump up the number of simultaneous instances?

See for example https://cirrus-ci.com/build/5106365071622144 which came from https://github.com/flutter/flutter/pull/29127

There is CIRRUS_USER_COLLABORATOR environment variable but I simply removed the limits. These limits are from the times prior to proper concurrency limits. You can re-trigger the build now.


Documentation: minor fixes

Codecov Report

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

@@           Coverage Diff            @@
##             master    #786   +/-   ##
========================================
  Coverage      93.2%   93.2%
  Complexity      385     385
========================================
  Files             2       2
  Lines          5697    5697
  Branches       1481    1481
========================================
  Hits           5310    5310
  Misses          186     186
  Partials        201     201

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 623c07c...25fa885. Read the comment docs.

@deining This is great, thank you for the contribution!!


Resolve Python 3 compatibility issues

Most of the Python 2 to 3 code translation changes were automated with the 2to3 tool.

@rst0git Thanks for finding and making these changes, Radostin.  By any chance, have you tried out other tutorials than the basic one, to see if they work with your changes?  I have only tried the basic one in my limited testing so far, but would be very glad if someone verified that the others worked with Python3, too.

Hello Andy, I have tried all tutorials with these changes on Fedora 34 (without Python 2) and everything works. The only issue I found was that I have missed to update the shebang line in the mycontroller.py example. This pull request should fix it https://github.com/jafingerhut/tutorials/pull/2.


Spaces added to prompt on shell launch (PowerShell/pwsh)

Environment
Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0
Windows Terminal Version: 1.4.3141.0

https://github.com/justjanne/powerline-go

Steps to reproduce
Add the following to your PowerShell $PROFILE (adjust the path to the powerline-go exectuable to your local environment)
Function global:prompt {
    $pwd = $ExecutionContext.SessionState.Path.CurrentLocation
    $startInfo = New-Object System.Diagnostics.ProcessStartInfo
    $startInfo.FileName = "$ENV:OneDriveConsumer\Util\powerline-go.exe"
    $startInfo.Arguments = "-shell bare"
    $startInfo.Environment["TERM"] = "xterm-256color"
    $startInfo.CreateNoWindow = $true
    $startInfo.StandardOutputEncoding = [System.Text.Encoding]::UTF8
    $startInfo.RedirectStandardOutput = $true
    $startInfo.UseShellExecute = $false
    $startInfo.WorkingDirectory = $pwd
    $process = New-Object System.Diagnostics.Process
    $process.StartInfo = $startInfo
    $process.Start() | Out-Null
    $standardOut = $process.StandardOutput.ReadToEnd()
    $process.WaitForExit()
    $standardOut
}

Start a PowerShell (classic) or PowerShell terminal window via Windows Terminal. The first time the prompt function is called there are spaces inserted between the different prompt parts. Pressing Enter makes these disappear and the prompt works fine.
If I use the same profile without Windows Terminal launching PowerShell.exe directly it works fine. So I suspect this is related to Windows Terminal.
Here's an animated GIF that shows what is going on:

Expected behavior
I expect to see the prompt formatted correctly as follows:

Actual behavior
This is what the prompt looks like when the PowerShell is first started:

This might sound crazy, but if you highlight that first prompt line, the one with the spaces, then dismiss the selection, does it re-render correctly?

It looks like you've customized your powershell profile somewhat? I can't reproduce this, but I am not using -NoLogo or have otherwise suppressed the startup banner. 🤔

Yeah, this only happens with -NoLogo. Interesting!
@zadjii-msft this is coming out of conpty with additional \e[1C in it, but only on the first-ever print to the screen. Everything else comes out fine.
First run
␛[38;5;250m␛[48;5;240m␛[H␣REDMOND\duhowett␛[38;5;240m␛[48;5;238m␛[1C␛[38;5;250m␛[1Cdhowett-sl␛[38;5;238m␛[48;5;31m␛[1C␛[38;5;15m␛[1C~␛[38;5;31m␛[48;5;236m␛[1C␛[38;5;15m␛[1C$␛[38;5;236m␛[49m␛[1C␛[1C␛

After Clear
␛[38;5;250m␛[48;5;240m␣REDMOND\duhowett␣␛[38;5;240m␛[48;5;238m␣␛[38;5;250mdhowett-sl␣␛[38;5;238m␛[48;5;31m␣␛[38;5;15m~␣␛[38;5;31m␛[48;5;236m␣␛[38;5;15m$␣␛[38;5;236m␛[49m␣␛[m

well that's batty. Thanks for investigating! @DHowett any chance you've got a oneliner repro for me that I can turn into a test? (if not that's cool too, this is probably enough to work off of)

Nah, it's even easier!
test_8341.ps1
"`e[38;5;250m`e[48;5;240m REDMOND\duhowett `e[38;5;240m`e[48;5;238m `e[38;5;250mdhowett-sl `e[38;5;238m`e[48;5;31m `e[38;5;15m~ `e[38;5;31m`e[48;5;236m `e[38;5;15m$ `e[38;5;236m`e[49m `e[m"
sleep 100

wt nt pwsh -c test_8341.ps1

Just so long as it's the first thing printed to the screen. I used the powershell core escape escape, so it won't work in Windows PowerShell (sorry)

I've been off-line for a while but thanks for the looking into this :-)

hmm.. Have the same thing happening to me with Windows terminal Version: 1.4.3243.0 but with Ubuntu wsl after following this guide [https://docs.microsoft.com/sv-se/windows/terminal/tutorials/powerline-setup] .
Works fine with wsl.exe.
Resizing the window or open any file and close it will fix the stripes.

hmm.. Have the same thing happening to me with Windows terminal Version: 1.4.3243.0 but with Ubuntu wsl after following this guide [https://docs.microsoft.com/sv-se/windows/terminal/tutorials/powerline-setup] .
Works fine with wsl.exe.
Resizing the window or open any file and close it will fix the stripes.

My Windows Terminal was updated yesterday and this started happening for me. Even though I always use up to date versions of everything (or did so until 2 months ago), this never happened before.
Any update on this?

I can confirm that this happens with the -NoLogo option, and only on the first prompt:

As a workaround, I've added a cls to my PS profile, which had no impact on launch time:
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt Paradox
Clear-Host

How strange! Would you be willing to try and capture this with the debug tap?

Wait, I forgot that we already had a repro for this. You can ignore that request!

@DHowett if you need any assistance in reproducing, or more information on it, count on me! I'm interested in helping in any way I can ;)

ah, I have the same problem. But it perfoms normally before, just becomes like this when I accidentally change the cmd profile. Then my wsl looks like this.

My Windows Terminal was updated yesterday and this started happening for me. Even though I always use up to date versions of everything (or did so until 2 months ago), this never happened before.
Any update on this?

Maybe because of the update? Me too. It jumps out recently.

It happens only start up, and has nothing to do with the logo, I think.

If there's anything before prompt, it works fine, even print some space before the prompt.

I am also affected.

Also, when split the window, it will look like this:

Same issue for me. I'm using powerline-shell in Ubuntu. This issue only occurs in Windows Terminal and not in any other terminal.

I can confirm that this happens with the -NoLogo option, and only on the first prompt:

As a workaround, I've added a cls to my PS profile, which had no impact on launch time:
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt Paradox
Clear-Host

I just did the equivalent in my .bashrc for Ubuntu by putting a clear; at the bottom and this does "fix" the issue! So thanks for that. At least there's a workaround. It's a minor issue I know but it was annoying me lol

Oh wow thanks for the link. Happy to see WSL progressing into a stand-alone app!

Just to be complete, this also happens when I open the Ubnutu / WSL2 / Bash shell in Terminal.

This problem still happens in Windows Terminal 1.12.3472.0

HA! We finally have a root cause for this. I ran into a different issue, where the "version update" notification was losing the background color around the edged, and it all started to fall into place.

If we are painting the first frame or any frame after you clear the entire screen, as an optimization[^1] we don't send a bunch of space characters. We neglected to check whether those space characters were meaningful (had background colors, underlines, other attributes...)
Proximal area of failure:
https://github.com/microsoft/terminal/blob/27de97bf9325d02c6e5bf13e005e2c805ac963a3/src/renderer/vt/paint.cpp#L448-L462
I wonder if we can use this function to help:
https://github.com/microsoft/terminal/blob/27de97bf9325d02c6e5bf13e005e2c805ac963a3/src/buffer/out/TextAttribute.hpp#L135-L137
[^1] The ConPTY API tries very hard to pretend that it is not translating a buffer of 120x30 cells into VT . . . so it lies, cheats and steals sometimes. The buffer contains 3900 empty spaces on startup, so we try not to send them to apps.

It's testable!
I am not certain the right way to fix it, but it's fixable too. The test passes as of https://github.com/microsoft/terminal/commit/c9e206997106eeecbaa287d9f41e4ccdd6f835e1, but the attribute math is not correct (to which I suspect @j4james will attest)

@OldWorldOrdr Nah, that's more like, well, one of these: https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+line+drawing
There's a few of those, so it's hard to point the finger at just one.


statics this

// 'this' is undefined for statics

import stampit from 'stampit';
import test from 'tape';

const Q = stampit({
    staticProperties: {
        myName: () => this.myId, // TypeError: Cannot read property 'myId' of undefined
        myId: 'Q'
    }
});

test('staticProperties', (assert) => {
    let actual = Q.myName();
    let expected = 'Q';
    assert.equal(actual, expected);

    assert.end();
});

Did you intentionally use an arrow function in that example?

Oh! The fat arrow. :) I didn't notice.
Hey @pdavidow
Change the line to be
        myName() { return this.myId },

and it will just work.

@FredyC I've done the same. Powerful features are easy to abuse.

This should be documented.

@pdavidow  It is documented:

An arrow function expression has a shorter syntax compared to function expressions and lexically binds the this value

MDN
Scoping of this is a feature of the language.


access issues for static web pages.

Does this occur consistently?
Repro steps:

Action: staticWebApps.activate
Error type: string
Error Message: Timed out waiting for authentication provider to register
Version: 0.11.4
OS: win32
OS Release: 10.0.19044
Product: Visual Studio Code
Product Version: 1.68.1
Language: en

Please provide repro steps.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


chore: Migrate FileUtilsTest.kt, NdkConfiguratorUtilsTest.kt and AgpConfiguratorUtilsTest.kt to AssertJ

Summary:

Issue: #45596
Changelog:

[INTERNAL] [CHANGED] - Migrated to AssertJ within files FileUtilsTest.kt, NdkConfiguratorUtilsTest.kt and AgpConfiguratorUtilsTest.kt
Test Plan:

Run ./gradlew -p packages/gradle-plugin test

Hi, @cortinico, it's done.

@henriquecicero can you please sign our CLA otherwise we won't be able to accept your contribution

@cortinico, I did it just now.

@cortinico, thanks for the suggestions.


Use kahan summation algorithm for sum aggregation

Currently sum aggregations on numeric columns of type REAL or DOUBLE PRECISION uses a straight forward x + y operation (Double::sum).
SELECT sum(real_column) FROM tbl

There would be the Kahan summation algorithm  which could be implemented to significantly reduce the numeric error of the sum aggregation.
Elasticsearch contains a implementation of kahan summation which could be integrated into CrateDB.

Hi :)
I am not sure how i should tackle that issue, wheather I should implement it here, as you suggested or in SumDouble? Or maybe in both places?
I was running SumAggregationTest::testDouble test and it turns out that both SumAggregation::reduce and SumDouble::apply is run (SumAggregation::reduce is first) during that test. I've also made an experiment i have altered result of SumAggregation::reduce and later SumDouble::apply and it turns out that both values are affecting the result of the test.
Any suggestions?

Done via https://github.com/crate/crate/pull/10674
Thank you @Wiewiogr


Bug fix for Gnav Multi Sign-in

Attempting to sign-in to the Adobe Account from the multi sign-in dropdown was not correctly logging in to IMS.
Bacom Test URLs:

Before: https://main--bacom--adobecom.hlx.page/drafts/rclayton/multi-cloud-signin?martech=off
After: https://main--bacom--adobecom.hlx.page/drafts/rclayton/multi-cloud-signin?milolibs=rclayton-multi-nav-signin&martech=off

Milo Test URLs:

Before: https://main--milo--adobecom.hlx.page/drafts/rclayton/multi-cloud-signin?martech=off
After: https://rclayton-multi-nav-signin--milo--adobecom.hlx.page/drafts/rclayton/multi-cloud-signin?martech=off

@auniverseaway Is this the correct experience when coming from Milo?

Looks like we're still getting the extra spacing from .has-menu.

I left this on purpose. I noticed that removing it reintroduced the CLS issue.
CLS after login won't be avoidable to have it be the right size. Keep in mind: Google never logs in, you won't get dinged for this CLS.

I left this on purpose. I noticed that removing it reintroduced the CLS issue.

CLS after login won't be avoidable to have it be the right size. Keep in mind: Google never logs in, you won't get dinged for this CLS.

Gotcha. Thanks! Pushed an update. The spacing issue should be fixed now.


ToSingleInstance dependencies

Are dependencies injected into the object that is created while using ToSingleInstance() kind of injection?
Having
Container.Bind<MyClass>().ToSingleInstance(new MyClass(myparams));

Will MyClass instance get it's field dependencies?

Also, ToSingleInstance is not mentioned in the documentation.
Is it still supported? What should I use instead?

No, Zenject only injects into objects that it creates itself.  So when it's provided with an instance, it doesn't inject on that.  If you want to force-inject on it though, you can do that by calling _container.Inject(myObject).
Oh you're right, ToSingleInstance isn't documented.  I'll fix that, thanks
I prefer to use ToInstance instead of ToSingleInstance most of the time but ToSingleInstance can still be useful in some cases.  You need it if you want to bind an instance but also use it as ToSingle<> for other interfaces.  For example:
Container.Bind<IFoo>().ToSingleInstance(new Foo());
Container.Bind<IBar>().ToSingle<Foo>();
Container.Bind<Foo>().ToSingle();

I had to use ToSingleInstance because I had some parameters that I needed to pass in from Editor.
I tried doing Container.Resolve() but that didn't work.
I'll try with Container.Inject(MyObject), thanks

@AAverin if you want to construct it yourself you can still use ToInstance(new foo(params)) right ?

@svermeulen documentation of ToSingleInstance would be great ;)

@Extrawurst I need my object to be a Singleton and be available in multiple classes around the project, so I'm doing ToSingleInstnace(new Foo(params)).

@AAverin the documentation for ToInstance says In this case the given instance will be used for every dependency with the given type ... sounds like a singleton to me

@AAverin Yeah, it sounds like using ToInstance would work fine in your case.  The difference is kinda subtle.  Another difference is that you can do the following
Container.Bind<IFoo>().ToInstance(new Foo());
Container.Bind<IFoo>().ToInstance(new Foo2());
Container.Bind<IFoo>().ToInstance(new Foo3());

And then have a class that takes all of them as a list like this:
public class Bar
{
    public Bar(List<IFoo> foos)
    {
    }
}

So really ToInstance doesn't necessarily result in a singleton.  On the other hand ToSingleInstance will always require that there only be one unique instance, and also allows for binding to multiple interfaces using ToSingle<> as I mentioned above.
Although, even in the case where you want to bind to multiple interfaces you can still do that just by re-using the instance like this:
var foo = new Foo();
Container.Bind<IFoo>().ToInstance(foo);
Container.Bind<IBar>().ToInstance(foo);

So ToSingleInstance really isn't all that useful but does serve some purposes in some rare edge cases.  I personally always use ToInstance.  ToInstance is also nice because DiContainer has a convenience method that doesn't require generic arguments (_container.BindInstance(foo)).
There is also ToSingleMethod which works similarly.  That method will only be called once and the result will be re-used for every dependency that it is bound to (whereas ToMethod will be called each time).

Ok added both ToSingleInstance and ToSingleMethod to the documentation page


MAINT: stats.yulesimon: fix kurtosis

Reference issue
Closes gh-20648
What does this implement/fix?
Fixes a typo in the the yulesimon implementation of the kurtosis. Removed its exemption from generic kurtosis test that is sensitive to the bug. Changed the test to filter warnings rather than exempt distributions.
Additional information
The parameters chosen for the zipf distribution plot does not produce a great plot - basically just a point mass. This doesn't (/can't) make it any worse, though, and I'd rather not do a deep dive to fix that right now. (Better parameters cause warnings elsewhere.)

Thanks @mdhaber !


Add json output to diff command.

Description
Add machine-readable json output to the diff command, together with a silent mode to suppress other stdout signals.
Builds on the pubspecOverridesSupport branch.
Type of Change

[x] 🚀 New feature (non-breaking change)
[ ] 🛠 Bug fix (non-breaking change)
[ ] ⚠ Breaking change (feature or bug fix which breaks existing behaviors/APIs)
[ ] 🏗 Code refactor
[ ] ⚙ Build configuration change
[ ] 📝 Documentation
[ ] 🧹 Chore / Housekeeping

To be rebased on #151.

Closing in favor of #152. LMK if I should reopen and rebase on #151.


Create shorthand syntax for optional url parameters

Given a default parameter value of null
you can currently do this:
$stateProvider.state('search', {
      url: '/search/{id}',
      params: {
        id: {
          value: null
        }
      }
    });

or this:
$stateProvider.state('search', {
      url: '/search/{id}',
      params: {
        id: null
      }
    });

But how about something like this?
$stateProvider.state('search', {
      url: '/search/{id?}',
    });

or this
$stateProvider.state('search', {
      url: '/search/{id?:date}',
    });

@nateabele @eddiemonge @wesleycho  what do you think?

url: '/search/{id?}' I think is fine.
url: '/search/{id?:date}' Does this mean an optional param named id of type date? This syntax might be a bit more confusing but not terribly so

Yeah, that makes sense. I think if we're doing /{id?}, we also have to do {id?:date} (unless that's what you already meant).

Hey, what about only defining the parameters in the params property? I'm currently dealing with a project that involves dozens of url parameters, and having to define them in the string is ugly in my opinion. Would be nice to only have them in the params property, but I have no idea if that is possible/too hard to implement.
$stateProvider.state('search', {
      url: '/search',
      params: {
        id: null
      }
    });

@micopiira there isn't anything that prevents you from doing that, but there also isn't anything that enforces that either.