Feature: refactor decoding code and provide decoding plugin

New Pull Request Checklist

[x] I have read and understood the CONTRIBUTING guide

[x] I have read the Documentation

[x] I have searched for a similar pull request in the project and found none

[x] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

[x] I have added the required tests to prove the fix/feature I am adding

[ ] I have updated the documentation (if necessary): need further discussion about this feature and I will write some tutorials about this

[x] I have run the tests and they pass

[x] I have run the lint and it passes (pod lib lint)

This merge request fixes / reffers to the following issues: ...
Pull Request Description
This PR is about one possible implementation to let SDWebImage support user provided decoder plugins. Since our project is become more and more heavy and the decoding code is growing. We face more issues about decoding or new image format support(HEIF APNG WebP). We sometimes do not have enough time to maintain these. So maybe we can open our decoding procedure to the user, who will provide their own decoder/encoder to support more and more image format.
To achieve this, I find a solution (can be discussed) that we can use an protocol called SDWebImageCoder to defination the decoding/encoding methods we used entirely in our project. User can provide any instance that implement the protocol and set it on SDImageCache or SDWebImageDownloader to replace our implementation. If you do not provide it or some decoding method do not implement, we will use the default decoder to call the method instead (will call your implementation only when you implement it).The defination of the protocol is under this description.
Then, we should refactory all our current decoding code to obey this. I seperate the code into 3 main decoder: SDWebImageImageIOCoder (support PNG, JPEG, TIFF), SDWebImageGIFCoder (support GIF) and SDWebImageWebPCoder (support WebP and Animated WebP). Thanks to that protocol, we can combain and use these as a plugin to build the abstract decoder SDWebImageDecoder. It just need to dispatch the method call to actual sub-coder depends on image format. And due to this, we can even seperate the decoding code to another cocoapods or write some simple bridges to use some third-party professional decoder.
And not only images, you can even add some decrypt and encrypt feature as you like because of that protocol is open for entire procedure from NSData to UIImage. There is also a example below to tell you how to build an decoder by yourself with the built-in plugins or even third-party decoder plugins in the future. (Remember, dispatch and just do what you can)
After that, we should also keep the original UIImage+GIF, UIImage+MultiFormat, UIImage+WebP public APIs. These categories just need to call the related coder to get the image. So finally I passed all the tests and keep the refactory code behaves the same as previous version.
Moreover, I added 4 more tests about check custom decoder/encoder and an new feature about WebP encoding(which can encode an UIImage to WebP and even _UIAnimatedImage to Animated WebP NSData to save to disk). So that it can be used if you have an UIImage not downloaded from SDWebImage and want to use the benefit of SDImageCache.
Please notes that this may be an future feature and need more discussion. So will not be merged now. I will keep this and any idea about this feature or a better solution is welcome.

The defination of SDWebImageCoder
// The is the image coder protocol to provide custom image decoding/encoding
// All the method are called inside a dispatch queue and do not block main thread
@protocol SDWebImageCoder <NSObject>

@optional
/**
 Decode the image data to image.

 @param data The image data to be decoded
 @param format The recognized image format
 @return The decoded image from data
 */
- (nullable UIImage *)decodedImageWithData:(nullable NSData *)data format:(SDImageFormat)format;

/**
 Incremental(Progressive) decode the image data to image.

 @param data The image data has been downloaded so far
 @param format The recognized image format
 @param finished Whether the download has finished
 @warning because incremental decoding need keep the data inside, we will alloc a new instance for each download operation to avoid conflicts
 @return The decoded image from data
 */
- (nullable UIImage *)incrementalDecodedImageWithData:(nullable NSData *)data format:(SDImageFormat)format finished:(BOOL)finished;

/**
 Decompress the image with original image and image data

 @param image The original image to be decompressed
 @param data The pointer to original image data. The pointer itself is nonnull but image data can be null. This data will set to cache if needed. If you do not need to modify data at the sametime, ignore this param.
 @param format The recognized image format
 @param shouldScaleDown return YES if `SDWebImageScaleDownLargeImages` was set, otherwise return NO
 @return The decompressed image
 */
- (nullable UIImage *)decompressedImageWithImage:(nullable UIImage *)image data:(NSData * _Nullable * _Nonnull)data format:(SDImageFormat)format shouldScaleDown:(BOOL)shouldScaleDown;

/**
 Encode the image to image data

 @param image The image to be encoded
 @param format The image format to encode, you should note `SDImageFormatUndefined` format is also  possible
 @return The encoded image data
 */
- (nullable NSData *)encodedDataWithImage:(nullable UIImage *)image format:(SDImageFormat)format;

@end

The demo to build an decoding plugin with other plugins:
- (UIImage *)decodedImageWithData:(NSData *)data format:(SDImageFormat)format {
    if (!data) {
        return nil;
    }

    UIImage *image;
    switch (format) {
        case SDImageFormatWebP:
#ifdef SD_WEBP
            image = [[SDWebImageWebPCoder sharedCoder] decodedImageWithData:data format:SDImageFormatWebP];
#endif
            break;
        case SDImageFormatGIF:
            image = [[SDWebImageGIFCoder sharedCoder] decodedImageWithData:data format:SDImageFormatGIF];
            break;
        default:
            image = [[SDWebImageImageIOCoder sharedCoder] decodedImageWithData:data format:format];
            break;
    }

    return image;
}

F....ing build still fails :) I will take another swing to fix it.

@bpoplauschi Don't worry. We have more extra time to fix the test. I changed back that propertiesOfData to reduce complexity. For most case, EXIF metadata is used with that image orientation and UIImage contains this one. So we can currently use that instead of preserve all the EXIF metadata.
Moreover, for progressive decoder, it decode using inner context(such as CGImageSource, WebPIDecoder) and should not share between different decode progress. Since we can add a extra context arg to let user provide this.But I think it's really ugly and too more complexity since you should manage your instance with different context and save different state.
So I choose to just add a new progressiveCoder property for each SDWebImageDownloadOperation. And grab the currently responsed coder class, to create a operation-based new instance. This is what I do in previous implementation. If you have any other idea about this, we can discuss here. 😄

@dreampiggy Another suggestion: I think we can rename some of the protocol methods for a bit of clarity:

canDecodeData: rename to canDecodeFromData:
canEncodeImageFormat: rename to canEncodeToFormat:
canIncrementalDecodeData: rename to canIncrementallyDecodeFromData:
incrementalDecodedImageWithData:finished: rename to incrementallyDecodedImageWithData:finished

Just let me know if you agree and I can take care of the renaming.

@dreampiggy regarding this PR, once we agree that is ready, I will go ahead and squash your branch into a single commit so it doesn't mess our history that much (right now we have 33 commits :) and counting).
Also, I think we can include it into 4.2.0 version, that is why I haven't worked on any other ticket, so we apply everything on top of this refactor.

@bpoplauschi The renaming looks good(well, more Objective-C style). Also also, could you please  help me to also change some doc comments about methods since I think some of them may be misunderstanding or contain grammar mistakes :D

@dreampiggy sure thing I will

@dreampiggy quick question: why does SDWebImageImageIOCoder canDecodeFromData return NO for GIF, but canIncrementallyDecodeFromData returns YES for GIF. Is this ok?

@bpoplauschi Because previous version our progressive decoding also available for GIF(Image IO is natively support GIF). It will decode the first frame for GIF. You can check 4.x version to check.
I think we not drop the GIF normal decoding, we just grab the first frame because we need FLAnimateImage to maintain the animating...If you think this code is strange, maybe we should 'copy' that incremental decoding code from ImageIO coder to GIF coder? Or try to merge the single GIF coder into ImageIO coder.

@dreampiggy @skyline75489 see https://github.com/dreampiggy/SDWebImage/pull/3, I made a PR to @dreampiggy 's branch so things are easier to see.

@bpoplauschi In fact. Since our ImageIO coder also just create the first frame through 'UIImage imageWithData]'. I think merge the GIF coder to ImageIO coder is better...(If you'd like, I can do this)

@dreampiggy I understand, but I would keep the 2 decoders separate, for clarity and the option to change our GIF decoding internally again without affecting the interface.

@dreampiggy travis still fails, I will try to switch the testing to XCode 9, see if it's better. Those are random fails we get now, which is super odd because they always worked fine.
Nevertheless, this is not the subject of this PR.
Let us focus on the getting this refactoring ready and merged.
I will take some time today to review everything again, test a bit and squash into a single commit. If I don't find anything, I will merge it into master.
After that, we can re-evaluate all the other work planned for 4.2.0.
In your opinion @dreampiggy, are there missing pieces from this PR?

Ok, I am merging this in. Actually I will merge manually so I can squash everything into one commit ( @dreampiggy you are still the author of that commit).
We will work our way from there.

Strange, I did all the steps from command line, even made sure the merge commit has all the right info but this PR still looks open - let's just close it - IT IS MERGED :)

@bpoplauschi OK. I can check the changes more carefully later.(Good effeciency)
And attention, because I add image orientation(#2034) detector during this refactored Image IO coder. And also that progressive WebP decoder(#1987). So that some PRs marked for 4.2.0 can be close. I need a little more time to check and close them.

Sure @dreampiggy we will take the time and review everything for 4.2.0. I'm glad this refactoring is finally merged, so even if we have issues we will then have to fix it as opposed to pushing it to a future version :)

Good - now it's merged, not sure why it was delayed :) I didn't do anything

@bpoplauschi Seems force push to my fork branch with your squashed commit solve the strange PR status 😅 .


Update tmr-meeting-recording-change.md

Changed Skype for Business Connector to Microsoft Teams

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@cichur PR has been copyedited and is ready for final review, could you please check and merge? Thanks!

Hi @JohanFreelancer9
I've shared this with our SME and am awaiting his response. We are reviewing your changes. Thank you for your feedback.

Hi @JohanFreelancer9
I've shared your edits with the SMEs. They are discussing your suggested changes. In the meantime, I've published a few modifications to the article based on your suggested changes, such as adding the note.  - Cindy

@cichur - Thank you Cindy, sounds good.


I can't focus on ion-input

I am using ionic v4 and angular v8.
I want to put the focus on ion-input text after an action is launched, but this does not work, the code I have is as follows:
@Effect()   productAdd$ = this.actions$     .pipe(      ofType(PRODUCT_ADD, PRODUCT_EDIT),       map(() => {         return new FocusAction('product-form.name');       })     );
in the template:
<ion-input type="text" [ngrxFormControlState]="(formState$ | async).controls.name" [ngrxEnableFocusTracking]="true">     </ion-input>
But only validation fire and the ion-input not be focused. Thanks.

My apologies for never replying. I hope you have solved this yourself by now. Feel free to open a new issue if you are still facing problems.


(techdocs): Missing .vale.ini

It looks like vale does not find a config file whenever it runs.
Propose to fix by looking for the file in the source repo. Maybe also fall back to a default config file.

@misund currently we require every repo to provide its own .vale.ini file.
@coopnorge/engineering do we want the image to fall back to a default .vale.ini?

We will continue to require a .vale.ini file in repos using this image.


NetBox 4.x

NetBox version
v4.x
Topology Views version
v3.x
Feature type
New functionality
Proposed functionality
Hi, is possible to update it, that this plugin can be installed and is supporting the latest NetBox version 4.x?
Use case
We installing the latest NetBox and will use your plugin in it.
External dependencies
Thanks.

Use the beta releases for now.


Ensuring /cached and /worker entrypoints are recognized by TypeScript

I remembered that I stumbled on this same issue with Voby, and after some major headaches the solution was that there just was no reasonable way to provide types for submodules, the only way to do it is by abusing the "typesVersions" property. This is maybe something that should get addressed in TS v5.
In any case this PR closes #194.
I'm reusing the types for the default export for the worker export, since I don't see more specific ones for that, if /worker exports a different interface then different types should be generated I guess.

it's up, thanks 👍


Ticks not completing if there is no delta for a system simulation

If you have a simulation that uses nested components, or system simulation components, then there are situations where the tick never finishes. If a component preceeding the system component updates, but produces no change in inpur for the system component then the system component and anything downstream should trim off the to update stack and the tick should end. However currently the system component is getting trimmed, but the componenents downstream are not. There remains incomplete updates in the to update stack and the tick never ends.
This can be replicated by the following:
- type: tickit.devices.source.Source
  name: source
  inputs: {}
  value: 10.0

- type: examples.adapters.system_simulation_adapter_config.NestedAmplifierWithAdapter
  name: nested-amp
  inputs:
    input_1:
      component: source
      port: value
  components:
    - type: examples.devices.amplifier.Amplifier
      name: amp
      inputs:
        initial_signal:
          component: external
          port: input_1
      initial_amplification: 2
  expose:
    output_1:
      component: amp
      port: amplified_signal

- type: tickit.devices.sink.Sink
  name: external_sink
  inputs:
    sink_1:
      component: nested-amp
      port: output_1

if you add a callback to the source call_at=SimTime(time +<PHONE_NUMBER>)

Fixed by #180


[QUESTION] Disconnect an user

Hi,
I want to disconnect an user (via an interface). Therefore, I'm using the following code :
$email =<EMAIL_ADDRESS>$currentEmail = $auth -> getEmail();

$admin = $auth -> admin();
$admin -> logInAsUserByEmail($email);
$auth -> logOutEverywhere();
$admin -> logInAsUserByEmail($currentEmail);

But the user still getting deconnected, even when I'm using $admin -> logInAsUserByEmail($currentEmail); after the log out. So I just want to know what I'm doing wrong.
Thanks for your help !

What are you trying to do exactly? Saying you want to “disconnect” a user, do you refer to the global logout on all devices?
So you’re logged in as user A (perhaps your admin account), and then want to temporarily sign in as user B<EMAIL_ADDRESS>to log them out on all devices. Afterwards, you want to sign back in to the first account, user A. Is this what you’re trying to do?
What’s the problem? What’s going wrong with that process? Is the wrong user logged out? Or are both logged out?

Yes, that's what I am trying to do and both users are logged out. In fact, I'm trying to create an user editing interface, where the admin can edit some users properties (eg. name, roles, ...).
After everything is edited, I need to log out the edited user, otherwise he is not going to see the changes immediatly.

Well, an important point to consider is that your users will see the effects of the remote logout just as early or as late as they would see any other changes to their account (e.g. roles).
Both actions are propagated to other sessions by the same mechanism, which is controlled by the $sessionResyncInterval parameter of the Auth constructor, as outlined in the documentation. So, after all, you might not even need the global logout, just a local one using $auth->logOut().
We don’t know of any problems with calling the two methods
$auth->logOutEverywhere();
$auth->admin()->logInAsUserById($myId);

in that order in direct succession. Just make sure that you call these before any actual HTML content is output, i.e. before the HTTP headers are sent to the user. That being said, calling
$auth->admin()->logInAsUserById($myId);

alone should still be enough.
Does that help?

Oh okay, I understand. That's fine for me, thanks for your help !


分辨率超过1920X1080就会出现这个问题

C:\Users\ai>adb connect <IP_ADDRESS>:5555
already connected to <IP_ADDRESS>:5555
C:\Users\ai>scrcpy
INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy
D:\scrcpy-win64-v1.16\scrcpy-server: 1...pped. 3.3 MB/s (33622 bytes in 0.010s)
[server] INFO: Device: OnePlus HD1910 (Android 7.1.2)
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2570)
at com.genymobile.scrcpy.ScreenEncoder.encode(ScreenEncoder.java:108)
at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncode
r.java:89)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:5
5)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:76)
at com.genymobile.scrcpy.Server.main(Server.java:225)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:262)
INFO: Renderer: direct3d
INFO: Initial texture: 2560x1080
WARN: Device disconnected
Press any key to continue...
分辨率超过1920X1080就会出现这个问题；       好像是
android代码中出现Android.os.NetworkOnMainThreadException的错误提示
原因：不允许在主线程中进行网络访问
解决办法：将网络访问的操作单独放到一个线程中new Thread(){
@Override
public void run()
{
//把网络访问的代码放在这里
}
}.start();
我也不懂，我用的是逍遥模拟器测试的，分辨率调的2560X1080就报错
调1920X1080就没有问题，我希望彻底解决这个问题，而不是降低分辨率来解决，谢谢

In English please :)

at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#exception

android代码中出现Android.os.NetworkOnMainThreadException的错误提示

Probably not related to scrcpy.

I’m very sorry, I don’t speak English. I dare not use translation software to communicate with you. I am afraid that the translation is not accurate. I sincerely hope that you can solve this problem. It feels like a problem with scrvpy-server.jar.
ERROR: Exception on thread Thread[main,5,main]          Do not allow network access in the main thread
Separate network access operations into a thread，Please take a closer look thanks you

分辨率超过1920X1080就会出现这个问题

This problem happens when resolution is over 1920x1080

我用的是逍遥模拟器测试的，分辨率调的2560X1080就报错
调1920X1080就没有问题，我希望彻底解决这个问题，而不是降低分辨率来解决，谢谢

I used an emulator for testing, it reports errors when resolution is 2560x1080.
This is no issue when resolution is 1920x1080. I hope you can fix this problem, not workaround by lowering resolution, thanks.

android代码中出现Android.os.NetworkOnMainThreadException的错误提示

Probably not related to scrcpy.

I guess OP randomly googled this problem and this is one of the results.

ERROR: Exception on thread Thread[main,5,main] Do not allow network access in the main thread

NetworkOnMainThreadException is a well known exception when there is I/O on the main thread from an Android app and Strict mode is enabled.
Scrcpy server is not an Android app, there is no "UI" on the Android side, so I/O on the main thread is ok.
On all devices where I tested, this is never a problem on scrcpy. Do you really got NetworkOnMainThreadException in scrcpy? I doubt this is the case.

I don’t have a good idea. I hope you can read the ideas I wrote. Hello, programmers. Can you develop an Android app and an ipad version? Because the screen projection delay of scrcpy is really small, which is better than that of Android.  The screen is fast, and it also supports reverse operation. In this way, I can cast my mobile phone to the tablet computer and to the Android TV. This way, I will not be used to synchronize the files between the tablet computer and the mobile phone, and use the tablet computer to operate the mobile office.  It will not be stuck because the performance of the tablet is not enough, because the program runs in the mobile phone, the implementation method, the mobile phone is connected to the wireless router, the mobile phone uses the usb cable to turn on the adb wireless connection, and then starts the tablet to connect to the mobile phone to realize Android screen projection  If you cast screen to ipad, when you turn on the full screen mode, ipad becomes Android system, maybe I said it is messy, thank you

I don’t have a good idea. I hope you can read the ideas I wrote. Hello, programmers. Can you develop an Android app and an ipad version? Because the screen projection delay of scrcpy is really small, which is better than that of Android.  The screen is fast, and it also supports reverse operation. In this way, I can cast my mobile phone to the tablet computer and to the Android TV. This way, I will not be used to synchronize the files between the tablet computer and the mobile phone, and use the tablet computer to operate the mobile office.  It will not be stuck because the performance of the tablet is not enough, because the program runs in the mobile phone, the implementation method, the mobile phone is connected to the wireless router, the mobile phone uses the usb cable to turn on the adb wireless connection, and then starts the tablet to connect to the mobile phone to realize Android screen projection  If you cast screen to ipad, when you turn on the full screen mode, ipad becomes Android system, maybe I said it is messy, thank you

Then start the tablet and connect the mobile phone to realize the Android screen projection. If the screen is projected to the ipad, when the full screen mode is turned on, the ipad becomes an Android system. Maybe I said it is messy, thank you.

Then start the tablet and connect the mobile phone to realize the Android screen projection. If the screen is projected to the ipad, when the full screen mode is turned on, the ipad becomes an Android system. Maybe I said it is messy, thank you.


replace leveldb.ErrNotFound with shed.ErrNotFound

This pull request addresses issue #1742.

This change is

@mrsimicsak I see that this PR now replaces leveldb altogether with badger. This is a wider change and discussing it in PRs will be quite slow. We already had one unsuccessful attempt to switch to badger about a year ago. Some of the implementation details vary and it would take a significant time to test that everything is nice and snug. This is a bit more difficult with external contributors since you don't have access to our infrastructure and internal tooling/testing methodologies. Ideally, this sort of change should be done internally, so that we can apply our experience in test driving this and measuring the improvements.

@acud This PR is only intended to make the errors generic, not replace leveldb with BadgerDB. It appears that some of my commits on my development version inadvertently ended up attached to this PR.
I apologize for the confusion, I'm new to github and PRs, and still learning.

Thanks @mrsimicsak. Since the PR is stale I'm closing it. We are looking into doing significant changes to our storage abstractions, and so this change would be taken into mind when we do so.


Logo / icon design proposition

Hello ,
I designed a new logo for your application HERE , so let me know if you want any changes.
Thank you.

Thanks for your contribute, you can create a pull request.


Focus is lost after downloading w/o Debug mode or DEBUG statements

Focus seems to remain on Progress window (after it's closed / hidden) when Debug mode is disabled (or Debug mode is enabled but no DEBUGs in project) and a download is performed.

It's unclear why this is happening; however, a theory is that it has something to do with main thread's loop communication thread monitoring loop.  That loop is processing the message queue though, so it doesn't really make sense.  Need to narrow it down.
A fix is to force focus back to main form after download.  This may need to change to forcing focus back to last-active edit control (in case the edit control that was active was split from the main app window.  Need to test.

Fixed in v2.5.3 by setting focus to last active edit control if debug wasn't in operation.


Bump client version

Mate, can you upload the new version to curse/wago?
Thanks

Hey, sorry but I totally forgot to tag the release, which should automatically push a new version to curse.


MM-31391: Add max connection idle timeout to config - Cloud

Documentation for: https://github.com/mattermost/mattermost-server/pull/16792
Updated:

Self-Managed Admin Guide > Configure Mattermost > Configuration Settings > Environment > Database

Added new config called "Maximum Connection Idle Timeout"

@cwarnermm This one has conflicts that need to be resolved.


Call State's method when widget reappears in viewport

Saying, I have a SliverList widget with SliverChildBuilderDelegate, which produces a card with custom image widget inside of it for each index. By custom image widget I mean widget that is kind of NetworkImage, but with support for custom caching technology. It's similar to cached_network_image.
So, the problem I'm trying to solve is that when some image fails to load and user scrolls it out from the screen, I need to retry loading this image when user for example scrolls back to it or in general when this image appears in viewport again.
Is it possible to e.g. re-call image loading function in some of the State's lifecycle methods or in delegate's builder? Or which technique should I use in this case?

Created question on StackOverflow

The widget will be recreated entirely when it goes outside the screen (plus a little buffer for accessibility). So the callback you're looking for is basically "initState".


Mock Up Initiators Configuration Template for Review

Come up with a preliminary mock up of what the Initiators Configuration file might look like, including a few hypothetical examples that leverage the planned main features for 24.2.
This will be reviewed shortly (late April -- tentative meeting scheduled for 4/26)

The following architecture diagram describes the system elements and the workflow for how initiators work:


Fix all the tests

What does this PR do?

Removes use of String.include as it was causing test failures.
My suspcion is that this is due to an issue with the PhantomJS
test runner not supporting this specific string function. It may have
worked in browser but was failing in the testing environment.

Restores pin/unpin functions that were removed in a merge.
As the tests for pinning features still existed, I assume the feature
is still in the application. The functions are restored and the tests
now pass.

Screenshot
Related Issue

I'll use this PR to also fix the travis environment; as long as travis is failing consider this PR pending.


MINOR: Update upgrade documentation for 3.7.1

@showuon this one is really tiny and straightforward, can you have a look?


SAA-1016 remove future attendances when ending allocations on recieptof activities changed event.

Codecov Report
Patch coverage: 100.00% and project coverage change: +0.02% :tada:

Comparison is base (65d3233) 84.79% compared to head (9aae3ab) 84.81%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #503      +/-   ##
============================================
+ Coverage     84.79%   84.81%   +0.02%
- Complexity     2340     2344       +4
============================================
  Files           295      295
  Lines          8600     8615      +15
  Branches        540      542       +2
============================================
+ Hits           7292     7307      +15
  Misses         1040     1040
  Partials        268      268

Files Changed
Coverage Δ

...e/events/handlers/ActivitiesChangedEventHandler.kt
94.64% <100.00%> (+1.95%)
:arrow_up:

... and 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Style/ClassEqualityComparison ignores AllowedMethods

Expected behavior
Rubocop should not ignore settings in AllowedMethods for Style/ClassEqualityComparison. I think I configured it correctly in .rubocop.yml, but if I made a mistake then sorry for the noise.
Actual behavior
I set AllowedMethods to include == but it looks like RuboCop ignores that settings and keep complaining about the same offense I want to ignore.
/tmp/rubocop $ rubocop --only Style/ClassEqualityComparison --debug -f simple
For /tmp/rubocop: configuration from /tmp/rubocop/.rubocop.yml
Default configuration from /usr/lib64/ruby/gems/3.1.0/gems/rubocop-1.52.0/config/default.yml
Scanning /tmp/rubocop/test.rb
Loading cache from /home/arpad/.cache/rubocop_cache/b446cca981d8019a5b960236f5d9f52857607a4c/70e37c62e63f44962d6ae11027b6808747bb3bff/a89a5c8ae04809310731d497861eb10987076240
== test.rb ==
C:  6: 31: Style/ClassEqualityComparison: Use instance_of? instead of comparing classes.

1 file inspected, 1 offense detected

Steps to reproduce the problem
Create a simple .rubocop.yml (enabling or disabling NewCops doesn't matter, I left it there to suppress unrelated warnings):
---
AllCops:
  NewCops: enable

Style/ClassEqualityComparison:
  AllowedMethods:
    - "=="

And a short test code, name it test.rb.
class_name = ARGV.first
s = 'Hello world'

puts "Yes it's a string" if s.class.to_s == class_name

It is a valid Ruby code (doesn't have a lot of meaning but valid), and you can execute it safely with existing or non-existing class names.
/tmp/rubocop $ ruby test.rb Integer
/tmp/rubocop $ ruby test.rb String
Yes it's a string
/tmp/rubocop $ ruby test.rb FooBar

Execute the following command to run RuboCop.
$ rubocop --only Style/ClassEqualityComparison --debug -f simple

RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler.
If you see extension cop versions (e.g. rubocop-performance, rubocop-rspec, and others)
output by rubocop -V, include them as well. Here's an example:
$ rubocop -V
1.52.0 (using Parser <IP_ADDRESS>, rubocop-ast 1.29.0, running on ruby 3.1.4) [x86_64-linux]

I did a very short and small investigation. I found that here the def_node is nil, so the allowed_method?(...) never reached:
https://github.com/rubocop/rubocop/blob/e216c9baf40e37dbe701524f214d36eb8f264010/lib/rubocop/cop/style/class_equality_comparison.rb#L87-L92
The "contents" in node.each_ancestor() looks similar to the test code I provided but I never touched RuboCops internals so I am not sure what am I seeing there (tokenizer output?). But the node.each_ancestor( :def, :defs ) is an empty.
[s(:if,
  s(:send,
    s(:send,
      s(:send,
        s(:lvar, :s), :class), :to_s), :==,
    s(:lvar, :class_name)),
  s(:send, nil, :puts,
    s(:str, "Yes it's a string")), nil),
 s(:begin,
  s(:lvasgn, :class_name,
    s(:send,
      s(:const, nil, :ARGV), :first)),
  s(:lvasgn, :s,
    s(:str, "Hello world")),
  s(:if,
    s(:send,
      s(:send,
        s(:send,
          s(:lvar, :s), :class), :to_s), :==,
      s(:lvar, :class_name)),
    s(:send, nil, :puts,
      s(:str, "Yes it's a string")), nil))]

The cop's AllowedMethods examples are mis-documented for how to use it. I opened #11917 to fix it.

Thanks for the answer. If I understand this correctly then with this cop you cannot allow to match an object class to a String. So if I receive that String during run-time then my only choice is to disable this cop, is it correct?

I think that case can be solved by using Module.const_get:
 class_name = ARGV.first
 s = 'Hello world'

-puts "Yes it's a string" if s.class.to_s == class_name
+puts "Yes it's a string" if s.instance_of?(Module.const_get(class_name))

In this case, RuboCop's static analysis can't recognize the variable type, so it doesn't support autocorrection, so you'll have to correct it by handcraft.

Those are not the exactly same.
$ ruby test.rb String
Yes it's a string
$ ruby test.rb FooBar
$ ruby test_with_module_const.rb String
Yes it's a string
$ ruby test_with_module_const.rb FooBar
test_with_module_const.rb:4:in `<main>': uninitialized constant Module::FooBar (NameError)

puts "Yes it's a string" if s.instance_of?( Module.const_get( class_name ) )

My real code can receive strings which doesn't contain a real class name. Yes, I can put it into a begin ... rescue ... end in this case(how fast is that BTW?) but for the sake readability it is easier just to disable this cop.

Yeah, If you don't like it, you can use rubocop:disable and etc.


Map Format Family

Implements packing and unpacking of map
Various fixes

array packing
byte utilities for transfer'ing real values from bytes

Updates tests

adds fixmap testing
fixes array stuff

Updates README
Add helper subroutine print_messagepack(obj) that prints out a messagepack object to stdout

Identified need to change mp_arr_type::value to mp_arr_type::values to better match the map type


Regular spikes in frame rendering time

Details
Regular spikes in frame rendering time during continuous rendering using LeafRenderObjectWidget, RenderBox and a Ticker. The spikes happen even if nothing is actually drawn on the canvas.
The spike visible in the profiler:

Exported timeline:
3.zip
Simplified example main.dart:
https://gist.github.com/vendik/f9a257d64769348d7a023330802347cd
Simplified example project:
test_game.zip

Target Platform: Android
Target OS version/browser: Android 11 (also happens on Android 12)
Devices: OnePlus 6 (also happens on Samsung S21)
Logs

Logs

No issues found! (ran in 1.6s)

[âˆš] Flutter (Channel stable, 3.3.8, on Microsoft Windows [Version 6.3.9600], locale en-GB)
    â€¢ Flutter version 3.3.8 on channel stable at C:\Users\Admin\flutter
    â€¢ Upstream repository https://github.com/flutter/flutter.git
    â€¢ Framework revision 52b3dc25f6 (6 weeks ago), 2022-11-09 12:09:26 +0800
    â€¢ Engine revision 857bd6b74c
    â€¢ Dart version 2.18.4
    â€¢ DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at C:\Users\Admin\AppData\Local\Android\sdk
    • Platform android-31, build-tools 32.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

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

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[√] IntelliJ IDEA Community Edition (version 2019.2)
    • IntelliJ at C:\Users\Admin\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2019.2.3
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] Connected device (3 available)
    • ONEPLUS A6003 (mobile) • 7d061cf2 • android-arm64  • Android 11 (API 30)
    • Windows (desktop)      • windows  • windows-x64    • Microsoft Windows [Version 6.3.9600]
    • Chrome (web)           • chrome   • web-javascript • Google Chrome 108.0.5359.125

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Thanks for the report. I see same behavior upon running the code in --profile mode wherein, saw spikes in performance overlay as below:

 stable, master flutter doctor -v
[✓] Flutter (Channel stable, 3.3.10, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
    • Flutter version 3.3.10 on channel stable at
      /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (15 hours ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[!] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! Flutter recommends a minimum Xcode version of 13.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.2

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

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

[✓] Connected device (5 available)
    • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
    • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
      ios            • iOS 14.4.1 18D61
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 98.0.4758.80

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

[!] Flutter (Channel master, 3.7.0-13.0.pre.51, on macOS 12.2.1 21D62
    darwin-x64, locale en-GB)
    • Flutter version 3.7.0-13.0.pre.51 on channel master at
      /Users/dhs/documents/fluttersdk/flutter
    ! Warning: `flutter` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
      your current Flutter SDK checkout at
      /Users/dhs/documents/fluttersdk/flutter. Consider adding
      /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
      Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
      of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6441a7dc62 (3 hours ago), 2022-12-22 20:38:18 -0500
    • Engine revision 12badb5459
    • Dart version 3.0.0 (build 3.0.0-60.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[!] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! Flutter recommends a minimum Xcode version of 13.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.2

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

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

[✓] Connected device (5 available)
    • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
    • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
      ios            • iOS 14.4.1 18D61
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 98.0.4758.80

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.


Git: Support sync cancellation #59047 Issue Fix

Git: Support sync cancellation #59047 Issue Fix

This would be way too intrusive for most users. I've added a setting for it. Thanks! :beers:


Add "round trip" feedback / make sure its clear where an endpoint can be consumed.

Right now, after uploading a model using sclblpy it is not always clear to users how they can subsequently "consume" the model. We should provide more feedback here. Options are:

Printing a link to the admin
Querying the server in the background and showing the ID / link of the task when done
Add links to endpoints() function

https://stackoverflow.com/questions/44078888/clickable-html-links-in-python-3-6-shell

Fixed in cca1bd2