Cannot get support fragment manager from ThemedReactContext

Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.4
CPU: x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Memory: 87.25 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 9.2/9C40b - /usr/bin/xcodebuild
npmPackages:
react: ^16.5.0 => 16.5.0
react-native: ^0.57.1 => 0.57.1
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
I'm writing a custom native android library that exposes a support fragment  for display. I created a simple view manager on the android side of react in which I return a placeholder layout (just a frame layout inside a parent linear layout to replace with the fragment layout later) in createViewInstance and later intend to add the library fragment inside receiveCommand on user action from the react side. However in order to add the fragment to the container I cannot get the support fragment manager from the ThemedReactContext obj that I capture in createViewInstance. Doing themedReactContextObj.getCurrentActivity() yields the deprecated android.app.FragmentManager. How do I get android.support.v4.app.FragmentManager instead in my view manager? Any help is appreciated.
Reproducible Demo
Here's the code I'm working with based off a few solutions on SO & blogs on getting native fragments to display. It works if I use a android.app.Fragment to display instead of android.support.v4.app.Fragment:
package com.awesome.awesomelib

import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;

import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.uimanager.SimpleViewManager;
import com.facebook.react.uimanager.ThemedReactContext;
import com.awesome.awesomelib.AwesomeFragment;

import java.util.Map;

public class AwesomeViewManager extends SimpleViewManager<View> {

    public static final String REACT_CLASS = "RCTAwesomeView";
    public static final int REACT_COMMAND_CREATE = 1;

    private ThemedReactContext mContext = null;

    @Override
    public String getName() {
        return REACT_CLASS;
    }

    @Override
    protected View createViewInstance(ThemedReactContext reactContext) {

        mContext = reactContext;

        LinearLayout layout = (LinearLayout) LayoutInflater.from(reactContext).inflate(R.layout.ll_awesomeview_container, null);
        return layout;
    }

    @Nullable
    @Override
    public Map<String, Integer> getCommandsMap() {
        return MapBuilder.of("create", REACT_COMMAND_CREATE);
    }

    @Override
    public void receiveCommand(View view, int commandId, @Nullable ReadableArray args) {
        Log.d(REACT_CLASS, "receiveCommand: " + commandId);
        switch (commandId) {
            case REACT_COMMAND_CREATE:
                createFragment(view);
                break;
        }
    }

    private void createFragment(View view) {

        if(mContext != null) {

            // load the awesome lib fragment as container

            AwesomeFragment awFragment = new AwesomeFragment();
            //Here's where I'm stuck !!
            mContext.getCurrentActivity().getFragmentManager().beginTransaction().add(R.id.fl_awesomeview_container, awFragment).commit();
        }
    }
}

As getFragmentManager() is deprecated, how do I get the support fragment manager from the ThemedReactContext ?

@akdsouza I have the same issue.
getFragmentManager is deprecated, but getSupportFragmentManager needs FragmentActivity, which (I think) is not used anymore by RN 0.57 ...what a mess!! and I do not understand why Google is forcing us to use android.support.v4.app.FragmentActivity
Have you found any workaround?

Hi @aMarCruz , I went with just changing the MainActivity of the react generated android project to extend the ReactFragmentActivity. Note however that after initially upgrading to RN 0.57, I later downgraded back to RN 0.55.4. This was based on a discussion I had at the end of this PR=> https://github.com/facebook/react-native/pull/20602 which I believe is based on this PR=> https://github.com/facebook/react-native/pull/19950
So far I haven't seen any problems but I haven't tested extensively for side effects. It's worth a try.

@akdsouza , I think for public plugins supporting both MainActivity and FragmentActivity is the only path. In my case (a dialog lib) it is not so hard, although it introduces some duplication of code as in the React Native implementation. Thanks.


[Change Request] page 44 "Sales Credit Memo" - variables as Protected

Describe the request
Hello, can you please the DocumentIsPosted and IsSalesLinesEditable variables change to protected var in page 44 "Sales Credit Memo".
    var
        SellToContact: Record Contact;
        BillToContact: Record Contact;
        SalesSetup: Record "Sales & Receivables Setup";
        GLSetup: Record "General Ledger Setup";
        MoveNegSalesLines: Report "Move Negative Sales Lines";
        ReportPrint: Codeunit "Test Report-Print";
        UserMgt: Codeunit "User Setup Management";
        SalesCalcDiscByType: Codeunit "Sales - Calc Discount By Type";
        LinesInstructionMgt: Codeunit "Lines Instruction Mgt.";
        FormatAddress: Codeunit "Format Address";
        PrivacyNotice: Codeunit "Privacy Notice";
        PrivacyNoticeRegistrations: Codeunit "Privacy Notice Registrations";
        ChangeExchangeRate: Page "Change Exchange Rate";
        WorkDescription: Text;
        StatusStyleTxt: Text;
        JobQueueVisible: Boolean;
        JobQueueUsed: Boolean;
        HasIncomingDocument: Boolean;
        DocNoVisible: Boolean;
        ExternalDocNoMandatory: Boolean;
        OpenApprovalEntriesExistForCurrUser: Boolean;
        IsPowerAutomatePrivacyNoticeApproved: Boolean;
        OpenApprovalEntriesExist: Boolean;
        ShowWorkflowStatus: Boolean;
        OpenPostedSalesCrMemoQst: Label 'The credit memo is posted as number %1 and moved to the Posted Sales Credit Memos window.\\Do you want to open the posted credit memo?', Comment = '%1 = posted document number';
        CanCancelApprovalForRecord: Boolean;
        IsCustomerOrContactNotEmpty: Boolean;
        CanRequestApprovalForFlow: Boolean;
        CanCancelApprovalForFlow: Boolean;
        IsPostingGroupEditable: Boolean;
        IsSaaS: Boolean;
        IsBillToCountyVisible: Boolean;
        IsSellToCountyVisible: Boolean;
        SalesDocCheckFactboxVisible: Boolean;
        IsJournalTemplNameVisible: Boolean;
        IsPaymentMethodCodeVisible: Boolean;
        IsSalesLinesEditable: Boolean;
        VATDateEnabled: Boolean;

protected var
        DocumentIsPosted: Boolean;
        IsSalesLinesEditable: Boolean;

Additional context
we would like to use this boot variables in a Page Extension.
Internal work item: AB#498102

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 15971.


Error running on android

Hello, I was trying to run three_js but got this error
three_js: ^0.0.6

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':flutter_angle'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 974ms
Error: Gradle task assembleDebug failed with exit code 1

Hi @worldwidee,
I am sorry for the issue. I believe this only occurs with the new upgraded version of flutter. They have moved to kotlin version >8.x.x.
For a temp fix please go to you settings.gradle file and change the plugins section to the code below.
plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "7.3.0" apply false
    id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

I will work on upgrading the android manifest soon.
Thanks you for letting me know of the issue.

Hi @worldwidee,
This issue should now be resolved with the newest version of flutter_angle.

same error but for simple_sensor
A problem occurred configuring project ':simple_sensor'.

Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

 If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

Hi @AliGanjehei,
It looks like simple_sensors needs to be updated. I will see if I can do a pull request or make a version specifically for three_js.
Hope to have this solved soon

same problem with the simple_sensors :*(
btw thanks a lot for the amazing plugin

That was very quick, really appreciate it!


Not all images are accepted as icons (iOS)

Describe the bug:
I tried to cross compile an app to ios.
I received this error:
/* com.apple.actool.errors */
[REDACTED PATH]/Images.xcassets: error: The stickers icon set or app icon set named "AppIcon" did not have any applicable content.
/* com.apple.actool.compilation-results */
/dev/null

: exit status 1

Searching for this error shows xcode expects the file Images.xcassets to exist and hold assets like icons. I understand Fyne creates these icons 'on the fly' so maybe my icon image was a problem. I changed it for another one and the error was resolved. The 'badlogo.png' is no problem if compiled to 'darwin' (on MacOS).
So the attached 'badlogo.png' is not usable for some reason. This was just a test logo for me, so I simple replaced it with another logo.
Maybe the docker image logs would have shown some more clear information or errors. Now it took some time before I realized the image file could be a problem. I have no idea though how to retrieve the logs or a more verbose output?
To Reproduce:
Steps to reproduce the behavior:
Download the 'badlogo.png' image file.
Create a simple app and compile with:
fyne-cross ios -icon badlogo.png -app-id my.test.app
(Using fyne package results in the same error)
Device and debug info (please complete the following information):
Device info

OS: MacOS
Version: Sonoma 14.5
Go version: go1.21.5 darwin/amd64
fyne-cross version: 1.5
Fyne version: 2.4.5

badlogo.png.zip

Perhaps you used transparency? That is not allowed by Apple's rules sadly - but will work on any other OS.

Aha, did not know that! Yes, the logo has transparency. It took me a while to realize the logo was the problem, especially because it indeed is no problem for Darwin and Windows. Maybe some code can be added to check for transparency? For example: https://stackoverflow.com/questions/68747745/check-if-png-image-is-all-transparent-in-golang

Good plan, updating and re-opening to track


flatbuffers:x64-windows fails to build

Package: flatbuffers:x64-windows
Vcpkg version: 0.0.103-2018-02-05-7d969169956190b0e201d9e3d42d14e30eb46a63
-- Configuring x64-windows-rel
-- Configuring x64-windows-rel done
-- Configuring x64-windows-dbg
-- Configuring x64-windows-dbg done
-- Build x64-windows-rel
-- Build x64-windows-rel done
-- Build x64-windows-dbg
-- Build x64-windows-dbg done
CMake Error at C:/Source/vcpkg/ports/flatbuffers/portfile.cmake:43 (file):
file RENAME failed to rename
C:/Source/vcpkg/packages/flatbuffers_x64-windows/bin/flatc.exe

to
C:/Source/vcpkg/packages/flatbuffers_x64-windows/tools/flatbuffers/flatc.exe

because: File exists
Call Stack (most recent call first):
C:/Source/vcpkg/scripts/ports.cmake:72 (include)
Error: Building package flatbuffers:x64-windows failed with: BUILD_FAILED

Thanks for reporting this! It should be fixed in the latest master.


S-meter vs dBm.

S9 is a signal level that corresponds to -73 dBm for HF bands and -93 dBm for VHF bands. This is equivalent to 50 microvolts at the receiver's antenna input, assuming the input impedance of the receiver is 50 ohms.

ok thank you for the information


Fixes the incubator project reference

What this PR does / why we need it:
It updates the reference to the Incubator Project in Readme.md

@vaibhav2107 can you please rebase to get the latest CI changes in?

@saschagrunert sure, I will do


Add deprecation warning to ONNX exporting without test cases

ONNX model without test cases is harmful in some way
Add no_testcase parameter to suppress warning

Jenkins, test this please!

I agree it's better to use export_testcase for many usage especially output ONNX model file. But export returns ONNX graph on memory when filename is not set. On this usage, users would not have test case requirements, but must set no_testcase=True option, it's messy a bit. I think need more discussion about use cases.

Jenkins CI test (for commit 57fb6476dea706915171d6adcee97e667a1c915d, target branch master) succeeded!

Fixed the filename issue

Jenkins, test this please!

Jenkins CI test (for commit 32b0e776b663addbfd55dfaa04c77346b6896271, target branch master) succeeded!


Resolution

Course not downloading 1080p

Hi, even choosing the highest resolution.
It is only possible to download what is available on Udemy

Udeler doesn't convert the resolution, it just downloads the options provided by Udemy's own API.
Sorry.

I will review the Udemy API documentation, maybe they are providing the download at another link

Hi, Udeler doesn't convert the video quality, it just downloads the qualities provided by the Udemy API.
When the option is not found, the download will be done in the highest quality available.
Doing an automatic conversion can make Udeler very slow.
Sorry, I hope to keep getting new orders


Twitter Rate Limit is still an issue

Describe the bug
Still being Rate Limited on the twitter API with a suggestion to lower the connections in Setting. This however makes no difference at all. I tried as low as 10 Numbers of connections in 60s with only 1 Concurrent connection. To my understanding of the Twitter API https://developer.twitter.com/en/docs/twitter-api/rate-limits this shouldn't be an issue?
This also raises the questions, if the settings only effect the Tumblr API?
Should both Tumblr and Twitter really be treated under the same settings and name?
And shouldn't there also be a way to Authenticate a Twitter account? This would allow you to crawl users that only allow followers.
Desktop (please complete the following information):

TumblThree version: v2.5.0

Today and right at the moment it's working (here).
Did you already download a bit when you got the error? Then it would be a real "limit exceeded".
Or your current IP may be blocked for some reason. Or they are rolling out a new change which you already see and other regions will see it soon.
The settings affect the crawlers for both. Also the default settings are in absolute terms a bit too high for Twitter's API limits, but they work for normal crawling/downloading because of time spent between requests.
Obviously there are no separate settings yet, maybe needed in the future.
There is room for improvements. Contributions are welcome.

I actually have been trying to update one user who have already been downloaded once two weeks ago. The error is happening the first minute of running during Evaluated N tumblr posts out of N total posts.
It doesn't download anything new and then i get Error 1: Limit exceeded: username You should lower the connections to tumblr API in the Settings ->Connection pane.
Then i get the message waiting until date/time but at that time it only push the date/time forward and doesn't make any progress even after 1 hour. So it appears to be no way to make a complete update of already downloaded users (as of today). My Last Complete Crawl will continue be stuck at 2022-01-20.

Please open this blog in the browser and tell me when the first two posts have been posted.
Do you have "force rescan" enabled in this blog's settings?
What is the value of LastId in this blog's index file?

The two latest Tweets both on Feb 3. There are around 60 Tweets since the Last Completed Crawl and the user have a total of 8,796 Tweets.
force rescan is not enabled. However i still think that the software acts in such a way as if this setting was enabled. It's always Evaluated 3500 tumblr posts out of 8,796 total posts when ``Limit exceeded`.
1483991637554614277

At the moment I don't have a clue why it's crawling that much on this blog.
Do you have a value inside blog's "download pages" setting?

No, i have almost everything on default settings. The only things i have changed in the software is
General:
Active portable mode Enabled
Connection:
Concurrent connections 1
Concurrent video connections 1
Limit Tumblr API connections: Number of connections 30
Limit Tumblr SVC connections: Number of connections 30
Blog:
Download reblogged posts Disabled
Image size (category) Large
Video size (category) Large

It seems some error occurs during the crawl process that keeps it from updating LastId to the newest post.
You could have a look into the TumblThree.log file, whether you see a hint/error there.

This is the error in TumblThree.log

You should lower the connections to the tumblr api in the Settings->Connection pane., System.Net.WebException: The remote server returned an error: (429) Too Many Requests.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TumblThree.Applications.Extensions.TaskTimeoutExtension.d__0`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TumblThree.Applications.Services.WebRequestFactory.d__12.MoveNext() in C:\projects\Tumblthree\src\TumblThree\TumblThree.Applications\Services\WebRequestFactory.cs:line 129
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TumblThree.Applications.Crawler.TwitterCrawler.d__25.MoveNext() in C:\projects\Tumblthree\src\TumblThree\TumblThree.Applications\Crawler\TwitterCrawler.cs:line 257
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TumblThree.Applications.Crawler.TwitterCrawler.d__24.MoveNext() in C:\projects\Tumblthree\src\TumblThree\TumblThree.Applications\Crawler\TwitterCrawler.cs:line 236
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TumblThree.Applications.Crawler.TwitterCrawler.d__28.MoveNext() in C:\projects\Tumblthree\src\TumblThree\TumblThree.Applications\Crawler\TwitterCrawler.cs:line 339
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at TumblThree.Applications.Crawler.TwitterCrawler.d__30.MoveNext() in C:\projects\Tumblthree\src\TumblThree\TumblThree.Applications\Crawler\TwitterCrawler.cs:line 364
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at TumblThree.Applications.Crawler.TwitterCrawler.d__33.MoveNext() in C:\projects\Tumblthree\src\TumblThree\TumblThree.Applications\Crawler\TwitterCrawler.cs:line 456

This blog downloads without problems here. Even if I try to emulate your situation by adapting the settings and blog file accordingly, it downloads the posts until the one from last time and stops. I don't know what could be the difference to your system.
You could backup the blog's download folder and its two blog files. Then you can add the blog again and see, whether the blog works again and download the missing new posts. Later you can close the app and merge in the backed up files and the already downloaded entries in "blog"_files.twitter from the copy to the current one (just all entries, a few duplicates are ok).

Report from start to finnish:

I just downloaded the latest TumblThree-v2.5.1-x64-Application.zip
Unzipped and opened TumblThree.exe
Without changing any default settings at all i added some random users with large amount of tweets (5000+)
Enqueued all added users and pressed Crawl
It started to download files from the first user
Got 4151 files (3944 video/images + texts.txt)
Then the error occurred. Error 1: Limit exceeded: username You should lower the connections to tumblr API in the Settings ->Connection pane.
Apparently this twitter user had 50864 posts so nowhere near completion and still 3 other users to go.
Waited until waiting until date/time
Got a new waiting until date/time
I pressed Stop
Got a new status saying Calculating unique downloads, removing duplicates ...
This took forever and 20 minutes later i terminated the software.
Started the software again
Enqueued all users again and pressed Crawl
It started with the same first user again But this time showed something about File Already downloaded.... Skipping
It got to the point where it started to download some new files
Now i have 4174 files downloaded (3964 video/images + texts.txt)
After these 23!!!! (20 video/images) new files was downloaded the error occurred again.
Error 1: Limit exceeded: username You should lower the connections to tumblr API in the Settings ->Connection pane.
Terminated the software

Conclusions:

The twitter part of the software works to a certain limit. But will take forever to get any files beyond the limit. With only 20 new files the second time around it will take days to complete the first user if it ever succeed to the finish line.

All skipped files seems to be counted as a request that adds to the limit counter.

Log:
No TumblThree.log to be found in the TumblThree-v2.5.1-x64-Application folder.

Ok, but now we are talking about a different thing, isn't it? It's no longer about downloading a few dozen recent posts, but downloading historic posts (resp. complete blogs).
Twitter doesn't want more posts than a certain limit to be downloaded. Obviously they changed something. We have to see, whether we can find a solution or not.
The download of the "post lists" counts towards the limit, whether a post's media is downloaded or skipped.

To my understanding:
I see no difference between updating an already downloaded blog and complete new download.
Both have the same amount of Number of posts in the active users download queue.
In other words, you will never be able to update/download the second blog in the download queue if the first user have a large amount of Number of posts. The problem is that the software does a request to each and every post the user have no matter if
you do an update or download a new user. So you do not only get the recent 100 posts you haven't downloaded yet. You get the full blog in the queue no matter what.
The problem with updating a blog would not be a problem if you only got the recent posts between Now and Last Complete Crawl in the queue.

But as of now when you get all the users Number of posts in the queue. We have the problem where the user will never complete and because of that a new Date in Last Complete Crawl will never be updated.
So we can't be sure if we updated a blog or not.
The download process doesn't continue after the limits waiting time is ended.

Problem summary:

Updating all your twitter blogs is not longer possible.
You can't download a complete blog if it's larger than twitter limit. Because it doesn't continue after waiting time is over.
You can't get a new Last Complete Crawl Date if it never completes, And you then wouldn't see if its updated.
Updating a user acts in the same way as downloading a new. Same amount of posts in the user queue makes them break at almost the same point.
If a user have 50k posts and you downloaded 10k before the new twitter changes. The best you get is about 5k more files. 35k files in the middle is untouchable.
Updating more than one user is impossible if they each have over 5k posts (This includes all text tweets).
Updating small blogs succeeds as long as they individually or together don't reach x amount of posts, But they will fail to complete the day/time when they do.

First, you experience resp. describe something that I don't see here. Looks like most other users can update their existing blogs too.

The problem with updating a blog would not be a problem if you only got the recent posts between Now and Last Complete Crawl in the queue.

That's exactly what we're doing, precisely LastId (after a successful complete crawl).

In other words, you will never be able to update/download the second blog in the download queue

Not automatically and unattended, yes. You can, for example, remove this blog from the download queue, which stops its crawler and continues with the next one.
Let me summarize what I get (and probably others too):

Small blogs can be downloaded and updated without problems.
Any reasonably up-to-date blog can be updated without problems.
Only big blogs can no longer be downloaded completely and thus updated later. Experienced users could at least update them with a little tweaking (LastId).

The last point needs to be fixed, so that all posts to the limit are downloaded and then the blog is marked as completely downloaded.
This limit exists...[#161] That a workaround will not work forever should be clear and understandable.

Obviously they changed something. We have to see, whether we can find a [workaround] solution or not.

If you know how to fix it, you are welcome to do so (or share it).
@Hrxn @desbest @cr1zydog
I hope you don't mind. Can you still update your existing twitter blogs?

@Hrxn @desbest @cr1zydog I hope you don't mind. Can you still update your existing twitter blogs?

I've never used Twitter with this App before, so my own experience here is a little limited.
That said, what you state here is obviously true:

Small blogs can be downloaded and updated without problems.
Any reasonably up-to-date blog can be updated without problems.
Only big blogs can no longer be downloaded completely and thus updated later. Experienced users could at least update them with a little tweaking (LastId).

The last point needs to be fixed, so that all posts to the limit are downloaded and then the blog is marked as completely downloaded. This limit exists...[#161] That a workaround will not work forever should be clear and understandable.

Obviously they changed something. We have to see, whether we can find a [workaround] solution or not.

The third point is the real issue, as I understand it, and yes, this is a limitation due to how Twitter works.

I can't download any blogs, new or old.

I had this problem several months ago but it's not bothered me since and I didn't change anything other than the routine TumbleThree updates.  I catch-up with all my Tumblr blogs once a month and add any newly discovered ones.  I'm now following 257 Tumblr blogs (In know, I'm hooked!), and the last catch-up on the first of the month was 147 GB and 404,000 files.  It took almost 24 hours to harvest everything, but ran perfectly.
I'm using all default settings.


ADD: Show all available  Node Accounts

Add a button to "Show All Nodes" that lists all nodes alongside:

address
bond
status
slashpoints
version
status_since

http://<IP_ADDRESS>:1317/thorchain/nodeaccounts

You mean a Button that shows all monitored information of all added ThorNode addresses with one click?
Currently we monitor

address
bond
status
slashpoints

If we add

version
status_since
to "Show all Nodes", we should also show this information in "Show THORNode Stats".

Do you want to add these two attributes in both ?

I think this is not about monitoring all nodes, but just showing the details for all nodes on the network. Just a one-time thing when you click the button.

Exactly. "Show THORNode Stats" is also not about monitoring

Maybe introduce this function within a "Network" sub menu or so. We can also put in some overall network stats in the future (e.g. # of nodes, amount of bonded RUNE, etc.)


doc: Extend quarantine doc to cover flaky required lanes

What this PR does
This document update covers what actions should be taken when test lanes are flaking with multiple test failures where quaranting the individual tests might not make sense.

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
/cc @dhiller @EdDev

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note

NONE

/uncc @dhiller
/cc @xpivarc

/hold
For mailing list feedback

/hold cancel

@EdDev @acardace could you please take a look again? thanks

/approve


⚠ Bofrost.lu has degraded performance

In 201426a, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2853 ms

Resolved: Bofrost.lu performance has improved in 3698c71 after 52 minutes.


Change "Erreurs" to "Faits"

Facts can refer to errors but also to just information about a node, route or network.  In the French translations "Erreurs" should be changed to "Faits" where in English the term "Fact" is used.

Implemented in release v4.3.24.


[Mod Info] Sunless Radio - CSL Music Mod [Steam ID<PHONE_NUMBER>] by Nine

Mod:
Sunless Radio - CSL Music Mod [Steam ID<PHONE_NUMBER>] by Nine
Stability:

Stable: it simply functions fine.

Statuses:

Source code: bundled with mod in Source folder.

This will be updated in catalog 3.48.

This will be updated in catalog 3.48.


fix(configs/eventtailer): use right tag for image

Since switching to images from kube-logging instead of the ones from Banzai Cloud, upstream image tags don't have the v in front anymore:
https://github.com/kube-logging/eventrouter/pkgs/container/eventrouter/118063456?tag=0.4.0
(upstream taken from our image-sync repository)
Ref:

https://github.com/sighupio/fury-distribution-container-image-sync/pull/191

I guess because in our registry somehow the image is also present with the v in the tag. My theory is it was manually tagged to fix this very issue after release.
I noticed because the  image was not tagged with the v for ARM architecture (but is present without the v).


add travis webhook

Codecov Report

Merging #247 into master will decrease coverage by 0.13%.
The diff coverage is n/a.

Codecov Report

Merging #247 into master will decrease coverage by 0.23%.
The diff coverage is n/a.


pkg/option: fix race in IntOptions GetValue method

Fixes: 607b8179ff7a ("option: Refactor BoolOptions into IntOptions")
Signed-off-by: André Martins<EMAIL_ADDRESS>

This change is

test-me-please


Fixed #23727 - Change TEST_NON_SERIALIZED_APPS to include contenttypes.

When using a TransactionTestCase-based class with serialized_rollback set to
True and without this fix, then starting the second or any subsequent test
cases in a suite would cause _fixture_setup to attempt to insert the rows in
the django_content_type table that already exist there, causing an
IntegrityError.  This was because the contenttypes app registers a
post_migrate signal to repopulate its table.  However,
TransactionTestCase._fixture_setup, would call deserialize_db_from_string,
which would attempt to re-add those same rows.  This change was added so that
deserialize_db_from_string would not attempt to re-add those rows.
This is simple to reproduce with the following app test code:
class TestIt(TransactionTestCase):
serialized_rollback = True
def test_one(self):
self.assertTrue(True)
def test_two(self):
self.assertTrue(True)
However, this proved to be very difficult to write a test case for in the
django unit tests framework because the framework requires that the test case
class's 'available_apps' attribute be non-None, but doing so causes a different
code path to be executed (the post_migrate signal is not sent during the
database flush) and the bug is not exposed.

I don't really like the idea of adding it to the default settings -- after all third-party apps cannot add themselves to default settings and I don't think contrib apps should have special privileges in this regard. If we cannot come up with an elegant solution or improve the error message that's displayed, I'd suggest to limit this to a note in the documentation.


integrate automated and interactive transaction recording

add client-side(interactive) xhr/fetch recording from xhr-override-demo repo
add server for receiving and rendering client/transaction details
add temporary frontend to render result data directly to DOM
add websockets to temporary frontend
refactor header-parser to generate transaction objects according to new schema
build simple cli to start results server, user server, and automated recording
add dependencies to support cli and extended servers
change public/index.html

nice?


Show a paginated list of datasets on the root dataset search page

Went with "10 most recent" rather than a paginated list. I think it fills the same purpose and the code is much simpler.


Node-gyp rebuild issues

Hi @felixrieseberg,
After update to 1.3.1 in rebuild part there are a bunch of errors and warnings. Probably you can assist to overcome them. There are different types:
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(2680): error C2375: 'WSAAsyncSelect': redefinition; different linkage

c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\mswsock.h(151): error C2011: '_TRANSMIT_FILE_BUFFERS': 'struct' type redefinition

c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\ws2ipdef.h(80): error C2079: 'sockaddr_gen::Address' uses undefined struct 'sockaddr'

c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\ws2ipdef.h(142): warning C4005: 'IP_DONTFRAGMENT': macro redefinition

Have no idea where they come from. Thanks in advance.

I've added a #define _WINSOCKAPI_ that should have fixed this. Are you still seeing issues?

@felixrieseberg looks like they are gone, thanks!


Github WebHook support

And endpoint which received notifications from a Github Webhook would be nice, as an alternative to the EJB checker

webhook payload for issue comment event: https://developer.github.com/v3/activity/events/types/#webhook-event-name-13


Can I pause downloading to Content.tar.gz during Update.sh?

The title says it all.

It keeps Content.tar.gz's progress data. I missed it.


test: try to parse randomly generated code

Use pysource-codegen and pysource-minimize combined to find source code which can not be parsed.
some results:
@'some const text'[name_3]
async def name_5(): # type: some text
    pass

@lambda: name_5
class name_5:
    name_4 = name_0

@1[name_0]
async def name_3(): # type: ignoresome text
    pass

It might be that these examples are not as minimal as they could be (the type strings are propably not important). But I think that they are a good starting point.

Oh, thanks a lot! I already have written a fuzz task though, let me push it so you can see :sweat_smile:
It doesn't minimize code though, so we might be able to reuse that part :slightly_smiling_face:

Have a look at https://github.com/mkdocstrings/griffe/blob/main/duties.py#L302 :slightly_smiling_face:

No problem. You don't have to merge this merge-request. I wanted to show what I mean with the minimization part. I hope it will help you to fix some bugs.

Yes I already fixed 3 bugs thanks to pysource-codegen :heart: :rocket:
And thanks for the PR, I didn't think we could use pysource-minimize like this, I will integrate it in my fuzz task!

Great :+1:
The SystemErrors are from cpython itself https://github.com/python/cpython/issues/109219 It really looks for me like you are using a pre-release.
Could you please verify this.
We should report a bug if this is not the case.

Yep, I answered on the issue, I was indeed using 3.12.0rc1. I've upgraded to 3.12.0, ran many and there's no SystemError anymore.

Sorry for the notifications, I was just testing something. I reused your code in another commit, marking you as co-author. Thanks again!


Issues with Wallet Connect: opensea - switching network causes error

Overview
Listing different issues found when connecting Shapeshift to another dApp using Wallet Connect
References and additional details
Connect to Opensea and try purchase any NFT that isnt on ETH and note that the transaction wont complete - gives error about not being able to switch network

Acceptance Criteria
Should be able to sign and complete transaction in connected dApps
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response

Trying to purchase an NFT in BNB using Opensea says to check wallet to sign, but nothing appears in trust wallet. No tx comes across to be signed.

When opensea is connected to shapeshift, you cannot change the network. gives an error. When connected to trust wallet you can switch between chains no problem.

Strategy to solve:

import seed into trustwallet mobile and try to repo with that

Work on trust wallet - need to retry with shapeshift in case issue was fixed on opensea side

This issue is on opensea side, caused by running older version of walletconnect 2
https://github.com/MetaMask/metamask-mobile/issues/6655#issuecomment-1609461290


Keep the values of the IDs of the HTML elements

Hi:
Excellent editor. It would be convenient if the source code of the html property of the templates kept the values of the IDs of the  elements.
Thanks a lot,
Carlos Cuesta

Hi,
You can use the attributesWhitelist option.
suneditor.create("", {
  attributesWhitelist: {
    "all": "id"
  }
})

Hi:
Thank you very much for your prompt response and solution. Would the following be possible with data attributes?
  attributesWhitelist: {     "all": "data-*"   }
A greeting

@cacuestai You can RegExp syntax.
ttributesWhitelist: { "all": "data-.+" }


Victor VosMottor: Watch doctorojie1(?:@yahoo.com)?

Victor VosMottor requests the watch of the watch_keyword doctorojie1(?:@yahoo\.com)?. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

doctorojie1(?:@yahoo\.com)? has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by cigien in Charcoal HQ


Edge features

Added edge features option in pyg model.

edge features fixed finally

Added heterogeneous support as well in utils/nn/model/ParticleNetPyGHetero.py


blendshape names empty after export

blendshape names empty after export
this is the original

this is the one after using utinyripper

i thought utf-8 would cover this?
i noticed that animations do not play any of the blendshapes, is there a fix for that?
i have other ideas and improvements as well, please message me on discord:
AlexViktor#1715

any shapekey/blendshape does not work, why?

i thought utf-8 would cover this?

it does. i don't have any issues with displaying those unicode symbols for extracted assets

any shapekey/blendshape does not work, why?

because when AnimationClip isn't statically connected with Animator, ripper can't restore original blendshape name for animation clip. in that case it insert hash value instead the name.

could the blendshapes be restored somehow else? or would i need to reassign all of them?

you can write a script that calculate crc for blend shapes and then replace dummy names with actual ones. But if you need to do it only once, it will be much easier just to reassign them manually.

i need a solid solution that i can use every time when needed,
so yes, i will need a script :/
but thank you for telling me, what to look into

i tried importing the assets to a unity 2019.3 project, and all blendshapes were there,
so it seems to be a 2018.4.20f1 unity bug

https://www49.zippyshare.com/v/HpDu4pM1/file.html
original

unpacked with utinyripper

error message

please fix


fix: main.tsx to include exchange parameters

Error: Argument of type '{ url: string; }' is not assignable to parameter of type 'ClientOptions'.
Property 'exchanges' is missing in type '{ url: string; }' but required in type 'ClientOptions'.ts(2345)
urql-core-chunk.d.ts(88, 5): 'exchanges' is declared here.
This error is being caused because when creating the urql client, it expects an object of type ClientOptions. However, you are passing in an object with only a url key, which doesn't match that expected type.

Duplicate of https://github.com/serverless-stack/sst/pull/2763


Discrepancy between recorded duration and encoded duration

Dear all,
I have been using picamera to record videos of mice for several days.
I set the code so that every hour the stream is saved to a *.h264 file instead of saving to a single enormous file:
`import picamera
from time import sleep
w = 960
h = 540
camera = picamera.PiCamera(
resolution = (w, h),
framerate = 30,
sensor_mode = 6)
camera.shutter_speed = 0 #Value in microseconds, 0=auto
camera.exposure_compensation = 6
camera.saturation = 0
camera.video_denoise = False
camera.iso = 100
camera.video_stabilization = False
camera.meter_mode = 'backlit'
camera.sharpness = 100
camera.start_preview()
camera.preview.fullscreen = False
camera.preview.window = (1, 40, w, h)
sleep(30)
g = camera.awb_gains #copies white balance values
camera.awb_mode = 'off' #switches auto white balance off
camera.awb_gains = g #fixes white balance values
for filename in camera.record_sequence([
'/home/pi/10-04-2019_Control/hour%03d.h264' % (h+1)
for h in range(99) #100 hours
], format='h264', quality=25, bitrate=3000000):
camera.wait_recording(60*60) #one hour
camera.stop_recording()
camera.stop_preview()
camera.close()`
If you look carefully, which I didnt do before starting the recordings, the camera sensor_mode 6 is not compatible with 30 fps, so the camera generated a 40 fps stream (I assume). Now I am encoding the files to something readable with ffmpeg trying to fix the framerate to 30 fps as initially planned, however I find that the duration is 19 seconds longer than expected (1:00:19), I am using this line:
ffmpeg -f lavfi -i aevalsrc=0 -r 40 -i "hour001.h264" -shortest -c:v h264_nvenc -qp 23 -r 30 "hour001.mp4"
Anyone has a solution for this?

(a) Why are you forcing the sensor mode? If you want 960x540 @ 30fps, then let the firmware choose the most appropriate mode for you and scale it. In this case it would be mode 5 (1640x922) and resized.  Note that using mode 5 will change your field of view slightly.
(b) How are you expecting FFmpeg to correct the frame rate? Video frames are discrete in time, therefore if your source is producing frames at 0, 25, 50, 75 and 100ms, producing a frame for 33ms, 66ms, and 99ms is non-trivial.
(c) The camera produces frames at as close to the requested frame rate as possible, however it works in increments of the line period.
Working through the theoretical numbers, for mode 5 that is the line period is 18.904us. For a frame period of 33.33333ms (30fps) the software will choose 1763lines, 33.328ms, or 30.005fps. That's a 0.016% error.
An hour at 30fps should be 108000 frames. At 30.005fps you get 108018 frames, or an extra 0.6secs of video.
You will therefore get a a few extra frames for your recording.
Repeating those calcs with mode 6 (19.517us/line) and 40fps, you get 1280 lines, 24.981ms/frame, or 40.029fps. Over an hour you get 144105 frames, or an extra 2.6secs.
If you actually care about exact frame rate, then use the timestamps that are returned with every frame in the stream, and record them into a container.

Thanks for your input, lets go over your points:
a)These recordings were made in a laboratory setting in order to extract behavioral sequences of mice videos in their own homecages. It would have been impossible to repeat the recordings on the same animals so I wanted to make sure all recordings would be done the same way. Thats why I fixed the sensor mode (same way I fixed many other parameters), to avoid uncontrolled variables changing from one individual to the next.
b) Well, as far as I can see, thats exactly one of the options with FFMEPG, change the framerate of the video. Maybe my wording was not precise enough. By framerate I was refering to the video, not to the length in time of each frame. Of course, ffmpeg will not be able to change the duration of each frame, but it can adjust the framerate of the video to "simulate" a video recorded at 30 fps (my initial intention).
c)I understand the maths there, which still do not explain why a stream at 40 fps recorded during 1 hour  is encoded into a video of 1 hour 19 seconds, which is 16.4 seconds=656 extra frames coming from nowhere that I can see.
My problem is not with the actual framerate, I can change the framerate of the video easily in ffmpeg, what bothers me is the difference in duration of the video compared to the actual duration of the recording.
Any suggestions are most welcome.

(a) Your choice, nothing to answer.
(b) FFmpeg question, not PiCamera.
(c) One inaccuracy in my calcs - the minimum frame rate for modes 6&7 is 40.1fps, not 40.0fps.
24.38ms/frame, rounds to 1277lines or 24.923ms -> 40.123fps. 144443 frames in an hour. Slow that down to 40fps and you get 11 extra seconds. I can't explain more than that.
Analyse the captured clip and determine how many frames are in your recorded file.
As before, if you really care about realtime then you MUST use timestamps. No device ever records at exactly the frame rate requested unless specifically configured for broadcast or film use.

b) Not really. Videos recorded with exactly the same code, except mode 0 and 30 fps, are encoded by ffmpeg as *.mp4 of exactly 1:00:00 hour, as expected. For sure, they vary a little in the total number of frames but never enough to make up even 1 second. So ffmpeg is interpreting the input stream correctly for those files.
c) No problem. Even like that I still cant explain the 19 seconds. And given that at mode 0 30 fps, the videos come out at exactly 1:00:00 I dont see why at mode 6 40 fps they should come any longer. Unless mode 6 has some weird, unexpected behavior when set to deliver a slower fps than what is supported...
If anyone might provide any insights it would be great, but thanks anyway @6x9


[cli] Is there a list of available variables for use in the compose file? Like {{.Stack.Name}}, {{.Scale.Id}}

Is there a list of all available variables allowed?
I'm really looking for one that will let give me the scale number as I have a service that I have to define the hostname
http://rancher.com/docs/rancher/latest/en/cli/variable-interpolation/
neo4j:
  labels:
    io.rancher.container.hostname_override: container_name
  environment:
    - NEO4J_dbms_connector_bolt_advertised__address=hosts-neo4j-{{.Count}}:7687

Doing it manually does not work well with scale at all.

Thanks for your report!
With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.
If you think we should keep this issue open, please let me know.


Support for multiple managed dependents of the same type

We need to make this use case work for managed dependent resources as well… I've started looking into it and will open as issue for it since we can't currently do it correctly. A potential way to fix the problem would be to use the name field of the Dependent annotation but I still need to hammer out the details.
Originally posted by @metacosm in https://github.com/java-operator-sdk/java-operator-sdk/pull/1268#pullrequestreview-997721334

Are you sure about this? Maybe we should start by writing an Integration tests, since I don't see why it should not work.

This is a duplicate: https://github.com/java-operator-sdk/java-operator-sdk/issues/1175

Closing this since its a duplicate.


doc: update ReadMe file with the appropriate info.

Proposed changes
Currently our ReadMe only mentions the ability to create search pages, which is not the case anymore. I've updated the info to highlight the key features.

iirc this is reflected in the doc website, so invoking @jpmarceau 🧙

This overlaps with @y-lakhdar 's PR here: https://github.com/coveo/cli/pull/561, which seems ready to merge 🙃

This overlaps with @y-lakhdar 's PR here: #561, which seems ready to merge 🙃

I merged Yassine's PR @mdey1 , you will be able to pull and merge (and fix conflicts ;) )

This overlaps with @y-lakhdar 's PR here: #561, which seems ready to merge 🙃

I merged Yassine's PR @mdey1 , you will be able to pull and merge (and fix conflicts ;) )

Oh oupss! I didn't notice his PR, that's my bad. His PR seems to have all the necessary information and it's been reviewed by JP as well, so I don't think mine is necessary then :) I'll close this PR.


Anonymous functions on filters/hooks

Submit a feature request or bug report

[x ] I've read the guidelines for Contributing to Roots Projects
[x ] This is a feature request
[ ] This is a bug report
[ x] This request isn't a duplicate of an existing issue
[ ] I've read the docs and NPM Debugging Guidelines post and followed them (if applicable)
[x ] This is not a personal support request that should be posted on the Roots Discourse forums

What is the current behavior?
Theme use anonymous function on hooks which are hard to remove
What is the expected or desired behavior?
Theme using normal function that user can remove.

Please describe your local environment:
WordPress version: 4.7.3
OS: n/a
NPM/Node version: 6
Where did the bug happen? Development or remote servers?
Anyplace
Feature Request
Please provide use cases for changing the current behavior:
So I have a plugin that includes custom templates which don't run on blade engine. The problem is that sage is using anonymous functions on hooks and filters make other developers complicate to work with.
I do use closures myself on hooks that I'm almost certain that others don't need to remove. On this particular case the template_include filter is not a good choice as in order to play with it we need to find workarounds that not always work as intended.
Eg: http://stackoverflow.com/questions/31240432/anonymous-functions-in-wordpress-hooks
https://wordpress.stackexchange.com/questions/137688/remove-actions-filters-added-via-anonymous-functions
ps: Thanks for the nice work. I really liked the theme.

Just edit the filter if necessary. It's really that simple. Everything in admin.php, filters.php, helpers.php, and setup.php are intended to be edited by developers. Sage is a starter theme, after all.


feat(#1119): Users without personal datasets

closes #1119
This PR changes workspace management, workspace is now a filtrable field in datasets list table

Applied filters are not visibles as url query params. Following image shows a dataset list where recognai filter is applied from breadcrumb click and francisco is applied by clicking in filter selector.

The resulting url contains only the first one.

@leiyre I pushed a small commit in which I updated the text when the dataset list is empty. Just to let you know.

@leiyre please, resolve conflicts locally. A lot of changes are applied in user.vue and I cannot do the conflicts resolution by myself


[SE-0287] [Sema] Implementation for implicit member chains

This is the implementation for a forthcoming proposal (see this discussion thread) that extends implicit member syntax to allow additional member accesses chained off of the base UnresolvedMemberExpr.

So, we can look at this problem from the inside out the way you’ve got it, but I wonder if it wouldn’t be cleaner to try it the other way around. The intent is to improve inference around an apply where the base of a sequence of member references is given contextually.  So why not have the typing rules for applies cooperate here?  We could try to look through an apply to bind the contextual type of whatever parameter to an implicit TypeExpr at the head of the chain. That should handle operator applies for you as well.

@CodaFi Just to clarify that I'm understanding correctly, you're suggesting that in a construction like:
foo(.my.member.chain)

The type checking for foo would be responsible for looking through each parameter, seeing if it's the tail of an implicit chain, and binding the base type appropriately?
That sounds like it could work out nicely, but I worry that it misses locations where type inference should be able to determine the contextual type but we forget to look through all the relevant expressions. Please correct me if I'm misunderstanding, but just focusing this on apply expressions would miss the inference in return statements, pattern binding decls, assign expressions, and possibly others. Moreover, whenever a new construct is added to the language, we'd have to make sure to consider the possibility of each sub-expression being part of an implicit member chain in order to bind the base type appropriately.
With the, the base time is automatically bound to whatever contextual type we have by the expression at the end of the chain. Am I missing something?

Right, as written the explanation I gave was... incomplete. Let me try to rephrase with the benefit of having puzzled through more of the details of the implementation here.
Essentially, you have the right idea about the typing rules here, the question is how best we propagate contextual information to the heads of the member reference chains. Your implementation does so by modeling the backpropagation explicitly in the AST, whereas I was trying to request we instead specialize the typing rules in CSGen. I believe this would better model the heterogeneous version of this proposal anyways since you are only using the back-pointers to locate from "tail" to "head" as it were.
Now, as I'm sure you've already noticed, this is pretty tough because syntactically the "head" of the chain with the syntactically leading UnresolvedMemberExpr is, in fact, the innermost expression in the AST. But I think as long as we have to eat the cost of an AST traversal to detect the chains we have to rebind, let's just eat that cost in one place.

Thanks for your thoughtful feedback @CodaFi, that all makes sense.
I agree with you that lifting this out of the AST is cleaner. There's a couple spots where I worry we lose the information about the "head" of the chain, specifically in the spots where we're calling isUnresolvedMemberChainTail to produce a better fix in CSSimplify. I'll investigate if there's a way to produce the desired fix without walking back down the tree, but it may not be possible without caching the member-chain-base info somewhere--do you think it's acceptable to re-traverse the chain in these cases since we're only hitting these checks in a failure case anyway?

Also, the latest commit has the member-chain stuff lifted out of the AST and into the constraint system. I've reworked CSGen (and isMemberChainTail so that we should only make one traversal of each chain over the course of type checking (aside from the issue with diagnostics noted above). Let me know how this looks to you!

@xedin I'd also love your feedback on this PR which implements multi-member chains (without changing the current rules for generic arguments at the head and tail matching).

Thanks for circling back on this @xedin! I mentioned a similar possibility up-thread. I think something like that would be possible, with a couple caveats:

I believe we do in fact need to track of UnresolvedMemberBaseTypes on the constraint system itself. It's used in validateInitializerRef in CSSimplify to properly form an initializer call from an UnresolvedMemberExpr.
If we lift the call to addUnresolvedMemberChainConstraints into ConstraintWalker, we would be paying the cost of the isMemberChainTail and getMemberChainBase calls on (potentially) every expression we visit, instead of how it is now where we only pay that cost when we visit expressions that might actually be part of a member chain.

If I've missed something let me know! Interested to hear your thoughts on the tradeoff here.

I believe we do in fact need to track of UnresolvedMemberBaseTypes on the constraint system itself. It's used in validateInitializerRef

It looks like validateInitializerRef already looks for a type variable representing MemberRefBase in the set of available type variables. I think it's okay to keep it that way. In the future we could arrange type variables into a MapVector based on their locators to mitigate the cost.

If we lift the call to addUnresolvedMemberChainConstraints into ConstraintWalker, we would be paying the cost of the isMemberChainTail and getMemberChainBase calls on (potentially) every expression we visit, instead of how it is now where we only pay that cost when we visit expressions that might actually be part of a member chain.

The problem I see with current approach is that the logic is scattered around constraint generator. I think regular expressions are better off not knowing whether they are a part of the chain or not. Having everything in one spot IMO going to help maintenance in the long run even if constraint walker has to lookahead to determine if expression is included in the chain.
Just to clarify what I'm thinking - if constraint walker encounters an expression which could be a tail of the chain it would spin a separate walker to determine whether there is a chain from this member or any other sub-member, record such chains so all of the intermediate members could avoid the check, this is effectively a depth-first search of chains from a possible tail.

The problem I see with current approach is that the logic is scattered around constraint generator. I think regular expressions are better off not knowing whether they are a part of the chain or not.

Makes total sense. It's been a bit since I've touched this implementation but give me a bit and I'll see where your suggestions take me. Thank you!

@Jumhyn No worries! Please re-request the review when you are ready otherwise there is a high chance that I'm going to loose track of this again :/

@xedin Will do! I realized we're also using getUnresolvedMemberBaseType in CSApply as part of visitUnresolvedMemberExpr. With single-member chains we could use the type of the UnresolvedMemberExpr itself as a stand-in since they were guaranteed to be equal, but that assumption doesn't hold anymore. Do you have a suggestion for how we might be able to deal with that without caching the UnresolvedMemberExpr base types in the constraint system?
(Also, FWIW, I don't think I can re-request your review until your current review request is cleared—looks like just a comment doesn't reset that state)

Sorry I forgot to mention that in the review - I think this check is obsolete because diagnostics no longer re-typecheck sub-expressions.

@xedin Unfortunately it's used for more than just the diagnostic—I thought that too initially, but we actually use baseTy throughout that method to turn the UnresolvedMemberExpr into a MemberRefExpr with the appropriate (metatype) base. In order to form the base, we need access to the base type.

Hm, I think we might be able to extract that from OverloadChoice associated with SelectedOverload picked for that member?

Ooh, nice. That looks promising. Thank you for your help!

@xedin Unrelated to the above, it looks like some changes have gone in since I last worked on this that makes my model for the member chain constraints not quite work. When we generate the constraints for an expression like,
let _: Foo = .optFoo!

the current implementation here ends up with four type variables:

The base of the chain.
The result of the .optFoo access.
The result of the force unwrap.
The result of the entire chain.

In the constraint system, the type variables actually associated with each expression looks like:
.optFoo!
^  ^   ^
T1 T2  T4

The extra level of indirection was introduced to handle the fact that a) the base of the chain can be an optional of the result type of the final member of the chain and b) the result of the entire chain might be an lvalue even though the base isn't.
However, the fact that T3 isn't actually tied to the result of an expression causes an issue when we get to type coercion. If optFoo is a static var, we get the following solution:
T1 as Foo
T2 as @lvalue Foo?
T3 as @lvalue Foo
T4 as Foo

The fact that T3 doesn't actually get represented in the AST means that coerceToType never gets a chance to insert the proper LoadExpr to perform the lvalue->rvalue conversion. However, I'm having trouble coming up with a way of modeling the constraints that doesn't introduce a level of indirection, which inevitably leaves some type variable out of the AST.
Do you have any thoughts about a path forward?

@xedin I've updated the PR per your suggestions. I still haven't come up with a satisfying fix for the issue noted directly above (and would love your input), but the implementation has now been restricted to CSGen—definitely a lot cleaner than before!

@Jumhyn What you have described makes sense to me conceptually but I think that chain should always be loaded in the end, only intermediate members should be allowed to produce l-value.
Constraint system should end up with

$T0[.optFoo] == $T1 -> result type of .optFoo which is going to be @value S?
$T1 optional with object type $T2 -> This is the ! which is going to be @lvalue S
$T2 equal $T3 -> result of the chain (this serves as a r-value adjustment) which is going to be S because $T3 doesn't allow l-value.

@xedin Right, that is what we end up with. But then, during solution application we do the following:

Build the MemberRefExpr from the UnresolvedMemberExpr giving us (implicit S).optFoo.
Call coerceToType, which coerces the MemberRefExpr to @lvalue S?, which works as expected.
Call coerceToType on the ForceValueExpr, which coerces to type S. Since in the AST the ForceValueExpr has type $T3 (which was solved to S), we don't insert the LoadExpr.

Then, in ASTVerifier.cpp, we abort in checkOptionalObjectType because the result of the ForceValueExpr has different lvalue-ness than the sub-expr. Basically, the lvalue conversion got 'lost' in $T2, since $T2 is not represented in the AST.

Since in the AST the ForceValueExpr has type $T3 (which was solved to S), we don't insert the LoadExpr.

How did AST end up with $T3 for the type of ForceValueExpr instead of $T2?

@xedin When we create the constraints for the chain, we take the type originally produced by the ForceValueExpr ($T2) and create a new type variable ($T3) to return instead so that $T3 gets matched with the contextual type. Is that the wrong way to go about things?

Yes, that's incorrect, type of ForceValueExpr should stay as is but it's connected to the rest of the system via equality constraint to the end of the chain which serves as r-value adjustment and that type variable should be connected to the contextual type.

@xedin Is there an example I can look at for how to link a type to the contextual type in the way you are talking about? The old implementation for visitUnresolvedMemberExpr seems to do this by returning a new type variable resultTy as the type of the UnresolvedMemberExpr which is different from the memberTy of the actual member access. That's what I was trying to mimic in my implementation.
Also, with the approach you suggest, how should we deal with a situation like
class Base {
  static var sub: Sub? = Sub()
}
class Sub: Base {}

let _: Base = .sub!

The contextual type is Base, but the result of the ForceValueExpr is Sub, which wouldn't satisfy an equality constraint, right?

Sorry I wasn't too specific - what I meant is "contextual type" is recorded as conversion constraint between expression type and specified contextual type so the constraint system would look like this:

$T0[.sub] == $T1 -> result type of .sub which is going to be @value Sub?
$T1 optional with object type $T2 -> This is the ! which is going to be @lvalue Sub
$T2 equal $T3 -> result of the chain (this serves as a r-value adjustment) which is going to be Sub because $T3 doesn't allow l-value.
$T3 conv Base -> result of the chain converted to the contextual type.

Since visitUnresolvedMemberExpr always expected a single member it was try to add this "r-value adjustment" type variable at the end to make sure that result of the member reference is always loaded. The only may to mimic that for the chained access so it equal tail of the chain to a new type variable and connect that type variable to the head. That's why I was saying that this has to be done in ConstraintWalker::walkToExprPost once tail (outermost expression in the chain) got constraints generated and types assigned.

I think such example .sub returning Sub and context requesting Base shouldn't type check based on the constraints of unresolved member inference, because the only known type here is Base, unless there is a subtype relationship between last member and chain result expressed via conversion constraint.

@xedin Thank you for taking the time to elaborate on that, super helpful!

$T3 conv Base -> result of the chain converted to the contextual type.

This is the constraint I'm unsure how to create. How do I get at the contextual type Base from within walkToExprPost?

I think such example .sub returning Sub and context requesting Base shouldn't type check based on the constraints of unresolved member inference, because the only known type here is Base, unless there is a subtype relationship between last member and chain result expressed via conversion constraint.

let _: Base = .sub already type-checks today, precisely because we have the conversion constraint from the type of the member to the type of the UnresolvedMemberExpr result. There's also more pathological cases like:
class Base {
  class Sub: Base {}
}

let _: Base = .Sub()

which also works out just fine.

This is the constraint I'm unsure how to create.

You don't have to worry about it, such constraint would be created if there is a contextual type set. The only problem which needs solving - how to avoid setting "chain result" to be a type of the last member of the chain (outermost expression). We might need to add a special implicit expression to accommodate this because contextual type gets converted to a result type an a root expression.

let _: Base = .sub already type-checks today, precisely because we have the conversion constraint from the type of the member to the type of the UnresolvedMemberExpr result.

Yes, I had to re-read that code, base is convertible to member and equal to result so it seems we should be fine than if result of the ForceValueExpr is made convertible to the chain result.

You don't have to worry about it, such constraint would be created if there is a contextual type set.

@xedin Sorry, I'm still missing something. If we're returning $T2 as the type of the ForceValueExpr, how does the constraint system get a hold of $T3 to know to convert it to the contextual type? As far as I can tell, if we aren't returning $T3 as the type of some expression, it's not going to get linked up to the contextual type. I'm guessing the answer is related to:

We might need to add a special implicit expression to accommodate this because contextual type gets converted to a result type an a root expression.

I was contemplating something like this, but I wasn't sure what the best place to insert that expression would be. Would it be appropriate to do so in ConstraintWalker::walkToExprPost? Also, would we need to create a custom expression to do this wrapping, or would it work to just wrap the chain in an implicit ParenExpr?

Yes, I had to re-read that code, base is convertible to member and equal to result so it seems we should be fine than if result of the ForceValueExpr is made convertible to the chain result.

Hmm, I'm not sure this matches my understanding. I see it as baseTy := Base, memberTy := Sub, resultTy := Base. So baseTy is not convertible to memberTy—it's the other way around (memberTy is convertible to baseTy).

I'm guessing the answer is related to

Exactly. This new implicit expression is going to become a new "root" expression and it's going to be set to have $T3 type so that it could be converted to contextual type. I think the only viable place to do that would be ConstraintWalker::walkToExprPost which returns Expr * to the next processing step.

Also, would we need to create a custom expression to do this wrapping, or would it work to just wrap the chain in an implicit ParenExpr?

I guess we could start from that and see how it goes, there is no rush to add new expressions :)

So baseTy is not convertible to memberTy—it's the other way around (memberTy is convertible to baseTy).

Yes, I didn't intent to be precise with ordering there, just online that it's conversion instead of equality :)

Okay fantastic. Thank you for talking that through with me! I've definitely got enough to work with now, so I'll get started on those changes and see if I hit any further roadblocks.

Sounds good!

@xedin Looks like using ParenExpr won't be so straightforward... verifyChecked(IdentityExpr *) makes sure that its type is identical to the sub expr, which breaks when we use it for lvalue->rvalue conversion :(

Maybe that’s for the best :) It’s okay for it to live only for the duration of the constraint solver and in CSApply it could be replaced with a LoadExpr or completely removed depending on result type of the tail. I will think about this some more, maybe there is a better alternative we just didn’t see...

I like the sound of that, will look into it.
I think it would require either a new expression type or tracking an additional bit on ParenExpr—since member chain logic is now constrained to CSGen, there's no way to tell apart an implicit ParenExpr generated for a member chain and an implicit ParenExpr generated for, say, an implicit call of a single-argument function.

@xedin Pushed a proof-of-concept implementation using the approach described above. It introduces a IsUnresolvedMemberPlaceholder member variable on ParenExpr, but I'd love your thoughts on whether we should just add a new IdentityExpr subclass instead (or something else I haven't thought of? 🙂).

@Jumhyn Let's just add a new IdentityExpr subclass with a proper name, I couldn't come up with anything else interesting...

@xedin Done! Let me know if there's a name you like better than UnresolvedMemberChainResultExpr. I wanted to be descriptive since its use is so specific but it ends up being pretty long and unwieldy.

That name sounds good to me! I have this in my queue and will look as soon as possible!

@xedin Thank you for your comments, will address them ASAP!

@xedin I'd like your input on some test failures I'm seeing. In typeCheckExpression; we call cs.setContextualType(expr, ...) before we generate constraints. This means that if we insert an UnresolvedMemberChainResultExpr at the top level during constraint generation, we lose the association between the top-level expression (e.g., UnresolvedMemberExpr) and the contextual type, which prevents us from recovering the contextual type when diagnosing certain fixes.
I see a couple of options. For one we could "transfer" the contextual type in ConstraintWalker::walkToExprPre when we create the UnresolvedMemberChainResultExpr by doing something like:
auto typeInfo = cs.getContextualTypeInfo(expr);
expr = new (context) UnresolvedMemberChainResultExpr(expr);
if (typeInfo) {
  cs.setContextualType(expr, (*typeInfo).typeLoc, (*typeInfo).purpose);
}

I'm not certain whether that's technically allowed or not.
The other option I see would be to move the AST transform into PreCheckExpression so that the UnresolvedMemberChainResultExpr is already in the AST by the time typeCheckExpression calls cs.setContextualType. We'd have to move isMemberChainTail, getMemberChainBase and related functions back to somewhere they could be used by both PreCheckExpression and ConstraintGenerator, so there's tradeoffs for either solution.
Interested to hear your thoughts, whenever you have the chance!

I've pushed up an implementation where we just transfer the ContextualTypeInfo when we inject an UnresolvedMemberChainResultExpr since that was the easier change.

@Jumhyn I like the second option you mentioned since chains should be detectable as pre-pass before constraint generation, that way all of the logic which currently resides in addUnresolvedMemberChainConstraints could be transferred to ConstraintGenerator::visitUnresolvedMemberChainResultExpr and chain detection could be pushed up to pre-check phase which is very nice IMO.

@xedin Done with the latest changes. Works out very nicely IMO!

Great! It's in my queue so I'll take a look asap! Let's run tests meanwhile to make sure that everything is fine.

@swift-ci please smoke test

@swift-ci please test source compatibility

@xedin I rebased to fix the merge conflict—would you mind running the tests again?

@swift-ci please smoke test

@swift-ci please test source compatibility

Thank you @LucianoPAlmeida!
@xedin So from my investigation of the test failures, it looks removing the lvalue matching logic caused some regressions. When we matched the lvalue-ness of the last member and the result, we could immediately merge the equivalence classes of the base and the chain result upon adding the $T_base == $T_result constraint if the member type variable is known to not be an lvalue (e.g., when we have a call). If we change the logic to always allow lvalue at the result of the chain, we are unable to immediately merge the types, which affects binding discovery down the line.
In most cases, this is fine, but there are some situations where we need that equivalence in order to properly resolve the base, such as when the result of the chain helps us infer an otherwise unbound generic parameter, e.g., when a closure is supposed to return T? and we do return .some(wrapped). We basically end up with
$T_base == $T_result [lvalue allowed] conv Optional<$T_generic>

and we can't infer any bindings from there, because $T_result has different lvalue-ness from both $T_base and $T_generic, which causes getPotentialBindingForRelationalConstraint to bail out early.
For now I've reverted that change (as well as added some additional improvements to the diagnostics around (im)mutability failures with unresolved member chains).
In the meantime, could we give the tests another run?

@swift-ci please smoke test

@swift-ci please test source compatibility

Thanks!

@Jumhyn I'm not sure I completely understand your last example, do you have a code snippet which demonstrates the problem? I think having result be allowed to bind to l-value type shouldn't affect ability to infer bindings for $T_base and $T_generic is unrelated to $T_result, it's only possible to bind $T_result to Optional<$T_generic> which should be fine, since ability to bind to l-value doesn't imply inability to bind to r-value type...

@xedin Sure, here's the minimal example I was able to reduce it to:
public struct S {
  let value : Int
  func transform<T>(_ f: (S) -> T?) -> T? {
    return f(self)
  }
}

public func foo(_ value: S){
  let _ = value.transform { arg in
    return .some(arg)
  }
}

The problem arises in getPotentialBindingsForRelationalConstraint at this check (~L718):
  // Make sure we aren't trying to equate type variables with different
  // lvalue-binding rules.
  if (auto otherTypeVar = type->lookThroughAllOptionalTypes()->getAs<TypeVariableType>())
    if (typeVar->getImpl().canBindToLValue() != otherTypeVar->getImpl().canBindToLValue())
      return None;

Because $T_result is lvalue allowed and $T_generic is not, we can't infer anything through the $T_result conv Optional<$T_generic> constraint. We also can't infer any bindings through the $T_base == $T_result constraint since $T_base is not lvalue allowed. We need the Optional to "bridge the gap" via $T_result in order for unresolved member lookup to proceed within Optional to find Optional.some.

Hm, looking though the optionals there doesn't make much sense to me if the type is inferred with them still wrapping generic parameter, this sounds like a bug in binding inference where it eagerly unwraps something it shouldn't... I'm guessing even with workaround some code is going to fail to type-check in cases where result of the last member is going to be l-value right?

I think you may be right, but such situations should be extremely rare—this will only arise with Optional, since we don't look through other types, and the only lvalue-allowing static member on Optional would be .none, which doesn't allow us to infer the type of Wrapped. I think I found a case that reproduces this issue in Swift 5.3, but it's pretty contrived:
extension Optional where Wrapped == Int {
    static var noneInt: Self { .none }
}

struct S<T> {}
extension S where T == Int {
    static var sInt: Self { S() }
}

func f<T>(_: T?) { print(T.self) } // Error: cannot infer contextual base
func g<T>(_: S<T>) { print(T.self) }

f(.noneInt)
g(.sInt)

I suppose this could manifest itself without the extension using multi-member chains via something:
f(.some(0).unsafelyUnwrapped)

where there is otherwise enough information to deduce the generic parameter in the chain, but lookup can't proceed because we can't infer through the result to the base.
Do you think we should attempt to fix this bug as part of this PR, or separately?

I think it would be okay to leave a FIXME in relation to that code and fix the issue separately.

@xedin Filed SR-13357 and added FIXME!

FWIW, here is where we introduced the lookThroughAllOptionalTypes logic.

Thank you @xedin and @hamishknight! I'll rebase to fix the conflict and address your requested changes ASAP. I think there will also be some diagnostic wins that get picked up from #33363.

@xedin Updated! Thank you for taking the time to review this PR so extensively, it's definitely a considerable improvement from where it started!
(Also, just in case, I want to confirm that when you say "before we merge" you're aware that this is still pending Swift evolution review, and so shouldn't be merged until the proposal is reviewed and approved. Review is scheduled to start tomorrow.)

bq. I want to confirm that when you say "before we merge" you're aware that this is still pending Swift evolution review
Yes, I know that the review is currently underway so it's good to have everything in a good shape!

@swift-ci Please Build Toolchain macOS

macOS Toolchain
Download Toolchain
Git Sha - 9950348fcb78843e4dedfffdd201e31557b44230
Install command
tar -zxf  swift-PR-31679-607-osx.tar.gz --directory ~/

@xedin @rintaro Latest change now offers all available members for unresolved member completion, and tests are updated appropriately. Let me know if you have further thoughts!

@rintaro Fixed up code completion according to our last conversation. Also, the latest commit implements the refactor I was talking about—UnresolvedMemberExpr no longer stores its call arguments directly. The change was pretty straightforward aside from a couple spots where we had to tweak the diagnostics. Also had to add a workaround in order to keep supporting this:
struct WeirdUMEInitCase {
  static let ty = WeirdUMEInitCase.self
  init(_ x: Int = 0) {}
}

let _: WeirdUMEInitCase = .ty()
let _: WeirdUMEInitCase = .ty(5)

which probably shouldn't be supported (the user should have to write .init), but it looks like the existing logic to catch that case only considered CallExpr and didn't check UnresolvedMemberExpr. Now that all unresolved member calls are CallExprs, we had to add an explicit exception for CallExprs whose Fn is an UnresolvedMemberExpr.
@xedin I'd love if you could take another look as well since this latest change is non-trivial compared to what you saw last.

Thanks @rintaro—addressed your comments and cleaned up code completion a bit more, turns out we can get rid of isReferenceableByImplicitMemberExpr altogether!

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - 321a679e0cd4f3cac6a4e530c6488b1a2af8e62c

Build failed
Swift Test OS X Platform
Git Sha - 321a679e0cd4f3cac6a4e530c6488b1a2af8e62c

@rintaro (or anyone) mind running tests again? Just rebased to fix failures.

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - 321a679e0cd4f3cac6a4e530c6488b1a2af8e62c

Build failed
Swift Test OS X Platform
Git Sha - 321a679e0cd4f3cac6a4e530c6488b1a2af8e62c

@rintaro Once more? 😇

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - 0af9cb469158574d5f320a483c3b91a296767206

Build failed
Swift Test OS X Platform
Git Sha - 0af9cb469158574d5f320a483c3b91a296767206

@swift-ci please test source compatibility

@swift-ci please test source compatibility

@swift-ci please test source compatibility Debug

@swift-ci please test macOS

Build failed
Swift Test OS X Platform
Git Sha - 8905f9735c4a7da3d25a44b4f229601ecda00403

Hmm, the macOS failure seems like a flake to me, could someone with more familiarity with the CI confirm and kick off another run?

@swift-ci please test macOS platform

There we go 🙂
Huge thanks to @xedin, @rintaro, and everyone else who provided feedback and guidance on this implementation! I started off with basically no knowledge of the type checker so this was a great learning experience.

@swift-ci please test Windows platform

Thank you Frederick!

Thank you, @Jumhyn and happy to help!


bond for client and server model generation

hi,
I wonder if bond is good for my use case since I am new to bond: my client is written in c# and server in java, right now i am  writing data models in both places, and let C# first serialize the model into a json, send over Http network, and java side then deseriliaze the model from the json. So whenever I need to modify or add new models, I need to change both C# and java. I am thinking writing bond files in a central place and let it generate both C# and Java, thus reduce my work, is this feasible, and what factors should I consider when adopting bond? thanks!

Also pasted the question in StackOverflow, thanks for your suggestions.
https://stackoverflow.com/questions/68431351/microsoft-bond-for-client-and-server-model-generation

Sharing data models between languages is one of the primary problems that Bond was designed to solve. That approach has been used successfully across many services inside of Microsoft. Your general approach sounds good to me.
The Bond-over-gRPC project takes this technique and used the gRPC transport (instead of HTTP 1.1). There's no Bond-over-gRPC for Java, so you won't be able to use Bond-over-gRPC, but you may want to look at it for inspiration.
If you have follow up questions about the finer points, feel free to ask them here.

I believe this has been answered. If not, reply back. Thanks.


Get clipboard contents on load?

I'm able to get the clipboard contents when I copy something on the page but not when I already have something in the clipboard.
Is it possible to get the clipboard contents on page load?

This should be supported. I assume you are using 1.0.5?

Here's my code.  Am I doing something wrong?
const Header = props => {
    const [clipboard, setClipboard] = useClippy();

    useEffect(() => {
        console.log("clipboard", clipboard);
    }, [clipboard]);

    return (
        {clipboard}
    );
};

I expect it to render the contents of the clipboard on load. Right now, it
only renders the contents of the clipboard if you copy something from the
page into the clipboard.
On Tue, Feb 11, 2020 at 5:00 PM Charles Stover<EMAIL_ADDRESS>wrote:

Your code looks like valid React code. What is the current behavior, and
what do you expect to happen?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CharlesStover/use-clippy/issues/15?email_source=notifications&email_token=AADGOGLBDFAWWBSTK53RJMDRCMU2VA5CNFSM4KTF5IQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELON3GA#issuecomment-584899992,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADGOGOKYCVH3IREBG2OYJTRCMU2VANCNFSM4KTF5IQA
.

I am unable to reproduce this. Do you experience this issue in the demo?


Add types-protobuf to requirements

While working with the grpc client, I noticed that pyCharm doesn't recognize the protobuf types.
This makes it very uncomfortable to use resources with schemas that require to instantiate Value objects.
After some digging, I managed to solve this issue by installing the protobuf stubs types-protobuf.
The developer experience for working with the grpc client could be improved, if types-protobuf would be installed along with the SDK.

Hi, thanks for raising.

pyCharm doesn't recognize the protobuf types.

What do you mean by this? That you're missing language features (auto completion, go to definition etc)? If so, which types are affected?
On my local set up, I'm seeing all the features I'd expect working on the struct_pb2.Value type.

Thanks for sharing. Interestingly, I get the expected behaviour using either pyright or python-lsp with nvim's native LSP client (the following shows the former):

Do you know which language servers (or otherwise) you're both using?

Thanks again for the fast reply.
AFAIK pyCharm (IntelliJ is basically the same) has its own type checker (its listed beside pyright in the typeshed package, which is also the source of the types-protobuf stubs).
Could it be possible that your setup somehow has access to the protobuf stubs without explicitly installing them (e.g. globally shared stubs / cached stubs from another project)?
This should be verifiable easily by using the "Go to definition" functionality and checking whether the file is located in the venv associated with the project or somewhere else.
And do you end up with the same file I added to the detail section in the answer above? That way I could check if my installation is somehow messed up.

Could it be possible that your setup somehow has access to the protobuf stubs without explicitly installing them (e.g. globally shared stubs / cached stubs from another project)?

Oh you've hit the nail on the head there 😄: .../typeshed-fallback/stubs/....
I'll add these in explicitly - many thanks!

Great! Much appreciated 👍
BTW in the meantime I found out, that pyCharm also comes with its own version of typeshed.
Unfortunately, it doesn't contain the protobuf stubs for whatever reason.


MudDatePicker Accessibility Issues

Feature request type
Enhance component
Component name
MudDatePicker
Is your feature request related to a problem?
This component does not support tabbing and arrow keys.
Describe the solution you'd like
We would like the component to be more accessible and support tabbing and arrow keys.
Have you seen this feature anywhere else?
No response
Describe alternatives you've considered
No response
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

+1 In our projects we've also experienced that this seems to be a frequent requirement!

+1
We're currently also evaluating the accessibility in our projects.
The MudDatePicker Keyboard Accessibility Issue was also a finding in our evaluation.

I asked the question before without response. Finally I find a workaround, the select date will be shown if adding the below properties.
Editable="false"
and
Mask="@(new DateMask("date format you need"))"


Update dependencies

Coverage decreased (-0.4%) to 74.312% when pulling 9e1f2a13914d44912d34c3a4cc24eed46ec2b989 on philipc:gimli into 1535f8f5e11b0b78512ce3c42316a1a0936eed3d on gimli-rs:master.


Show number of flagged message on the top right corner flag icon (which shows the flagged messages panel)

No indication of flagged messages unless click the top right corner flag icon and see the flagged messages on the appearing panel.
I would be a nice improvement to have a number on/inside of the flag to see how many (or least one) message is flagged.
Would be useful, because no possible to mark a message unread but sometime just no time to answer, so flag is a good feature for that... but if you busy maybe you even forget you flagged a message because you have to answer but was not time for it.

Thanks, appreciate your feedback @zsalab,
Would you like to contribute this in the feature idea forum so it can be discussed, upvoted and considered for a help wanted ticket?
Please include a link back to this GitHub issue. If you're interested in implementing, please say so and we'll prioritize the review.
You get 10 votes in the feature idea forum, and each one influences the future of the project.

https://mattermost.uservoice.com/forums/306457-general/suggestions/36982153-show-number-of-flagged-message-on-the-top-right-co

Awesome, thank you!


Add python example - channel options

@srini100
I struggled while I find channel options to build gRPC python client.
So I brought it up at google forum and got some PR feedback. Please check it out.
This example might be very helpful for python users.
Please review this example, and feel free to feedback.

@ovekyc, please sign the CLA. I will review this soon.

@srini100
Got it. Signed up.
And updated example, Simplified.

@srini100
Update all your feedback.
Please review it again.

@ovekyc, the sanity test is failing YAPF check. Please run tools/distrib/yapf_code.sh from grpc folder. It will format the file.

@srini100
Ran YAPF checking.

Rebase repo to grpc master branch.

There are two commits regarding YAPF. One is for my PR. And the other is for other python files.
I just ran the command and committed them separately. Because it is not my modification.
Please let me know if the last commit should be removed.

Yes, please remove the last commit as I am not sure why those files are not YAPF compliant to begin with. When I run yaph.sh I don't see it complaining about those files. Must be some environment differences. Let's just format the example file only. Thanks.

@srini100 Removed it.

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,997,294      Total (=)      1,997,294

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
11,021,759      Total (>)     11,021,758

 No significant differences in binary sizes


add support for detecting "OX Drive"

What feature or improvement do you think would benefit Files?
Open Exchange is an alternative to Nextcloud; as far as I know, the implementation of the Windows client runs via the Office Suite; it would be good to be able to access OX Drive as part of the cloud storage
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Drive#OX_Drive_for_Windows
Requirements

This proposal will accomplish X
This proposal will accomplish Y
This proposal will accomplish Z

Files Version
<IP_ADDRESS>
Windows Version
26120.1350
Comments
No response

Thanks for the feedback, I have added this to the project board.


replace seVersion by fullVersion

In incoming refactoring, deviceInfo.seVersion will be gone

i'm going to address this in the live-common PR


Recommendation to enable Transform(m1,m2).update(1)

I think the command Transform(mobject1, mobject2).update(1) when we use def update(group,alpha) is very useful. In this version is disabled, but if the next files have a little changes then works:
manimlib/animation/animation.py
    def __init__(self, mobject, **kwargs):
        assert(isinstance(mobject, Mobject))
        digest_config(self, kwargs)
        self.mobject = mobject
        self.starting_mobject = self.create_starting_mobject() # Add this line in 34

    def __str__(self):
        if self.name:
            return self.name
        return self.__class__.__name__ + str(self.mobject)

manimlib/animation/transform.py
    def __init__(self, mobject, target_mobject=None, **kwargs):
        super().__init__(mobject, **kwargs)
        self.target_mobject = target_mobject
        if self.target_mobject!= None:                            # Add this line in 29
            self.target_copy = self.target_mobject.copy() # Add this line in 30
        self.init_path_func()

In general, it should be better to use mobject1.become(mobject2) instead of that.  Is there a place where this isn't working?
As a general policy, it's now important to have as little copying done in an animation initialization as possible.  We want to make sure that copying, like that done for starting_mobject, is only done in the moment before an animation gets played, not when it's initialized.  This ensures that animations interact more nicely with each other in things like LaggedStart, AnimationGroup, and when mobject updaters are involved.  So having the "self.create_starting_mobject()" line in init would create other problems down the road.

Perfect, I really had no knowledge of that command, thank you very much.


a waxed sign or item-frame attached to a noteblock should pass clicks through to the noteblock

This isn't possible with the paper-api.