new rocm-smi reports messy error when trying to find fan of QXL video device (libvirt-qemu/kvm)

Hi,
I have been using rocm for a while now inside a qemu/kvm VM using PCI-passthrough for the AMD GPUs.  There is also a QXL video device for the VM (GPU 0).
After a recent update, rocm-smi now has a messy error when it tries to get info about the QXL device fans on GPU 0.
rocm-smi version: 1.0.0-34-g23012d0
kernel:  Linux 4.11.0-kfd-compute-rocm-rel-1.6-180
error:
root@ubuntu:/home/tux# rocm-smi
====================    ROCm System Management Interface    ====================
================================================================================
 GPU  Temp    AvgPwr   SCLK     MCLK     Fan      Perf    SCLK OD
  5   47.0c   120.210W 1000Mhz  500Mhz   71.76%   auto      0%
  3   44.0c   81.170W  1266Mhz  2088Mhz  100.0%   auto      0%
  1   43.0c   76.33W   1185Mhz  2088Mhz  100.0%   manual    2%
  4   42.0c   73.255W  1185Mhz  2088Mhz  100.0%   manual    2%
  2   41.0c   81.253W  1266Mhz  2088Mhz  100.0%   manual    0%
Traceback (most recent call last):
  File "/usr/bin/rocm-smi", line 1058, in <module>
    showAllConcise(deviceList)
  File "/usr/bin/rocm-smi", line 728, in showAllConcise
    fan = str(getFanSpeed(device))
  File "/usr/bin/rocm-smi", line 358, in getFanSpeed
    fanLevel = int(getSysfsValue(device, 'fan'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
root@ubuntu:/home/tux#

it seems to normally detect no powerplay on GPU 0 with the rest of the fields when invoking roc-smi -a, but has the same messy error with the fans:
root@ubuntu:/home/tux# rocm-smi -a
====================    ROCm System Management Interface    ====================
================================================================================
GPU[5] 		: GPU ID: 0x7300
GPU[3] 		: GPU ID: 0x67df
GPU[1] 		: GPU ID: 0x67df
GPU[4] 		: GPU ID: 0x67df
GPU[2] 		: GPU ID: 0x67df
GPU[0] 		: GPU ID: 0x0100
================================================================================
================================================================================
GPU[5] 		: Temperature: 53.0c
GPU[3] 		: Temperature: 48.0c
GPU[1] 		: Temperature: 48.0c
GPU[4] 		: Temperature: 47.0c
GPU[2] 		: Temperature: 46.0c
GPU[0] 		: Unable to display temperature
================================================================================
================================================================================
GPU[5] 		: GPU Clock Level: 7 (1000Mhz)
GPU[5] 		: GPU Memory Clock Level: 0 (500Mhz)
GPU[3] 		: GPU Clock Level: 4 (1266Mhz)
GPU[3] 		: GPU Memory Clock Level: 2 (2088Mhz)
GPU[1] 		: GPU Clock Level: 3 (1185Mhz)
GPU[1] 		: GPU Memory Clock Level: 2 (2088Mhz)
GPU[4] 		: GPU Clock Level: 3 (1185Mhz)
GPU[4] 		: GPU Memory Clock Level: 2 (2088Mhz)
GPU[2] 		: GPU Clock Level: 4 (1266Mhz)
GPU[2] 		: GPU Memory Clock Level: 2 (2088Mhz)
GPU[0] 		: PowerPlay not enabled - Cannot display clocks
================================================================================
================================================================================
GPU[5] 		: Fan Level: 183 (71.76)%
GPU[3] 		: Fan Level: 255 (100.0)%
GPU[1] 		: Fan Level: 255 (100.0)%
GPU[4] 		: Fan Level: 255 (100.0)%
GPU[2] 		: Fan Level: 255 (100.0)%
Traceback (most recent call last):
  File "/usr/bin/rocm-smi", line 1074, in <module>
    showCurrentFans(deviceList)
  File "/usr/bin/rocm-smi", line 563, in showCurrentFans
    fanspeed = getFanSpeed(device)
  File "/usr/bin/rocm-smi", line 358, in getFanSpeed
    fanLevel = int(getSysfsValue(device, 'fan'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
root@ubuntu:/home/tux#

It does not seem to affect usability and performance so far.

We pushing update right now can you double check. After donning update to the driver.
Greg
On Dec 21, 2017, at 5:05 PM, hairetikos <notifications<EMAIL_ADDRESS>wrote:
Hi,
I have been using rocm for a while now inside a qemu/kvm VM using PCI-passthrough for the AMD GPUs. There is also a QXL video device for the VM (GPU 0).
After a recent update, rocm-smi now has a messy error when it tries to get info about the QXL device fans on GPU 0.
rocm-smi version: 1.0.0-34-g23012d0
kernel: Linux 4.11.0-kfd-compute-rocm-rel-1.6-180
error:
root@ubuntu:/home/tux# rocm-smi
====================    ROCm System Management Interface    ====================
GPU  Temp    AvgPwr   SCLK     MCLK     Fan      Perf    SCLK OD
5   47.0c   120.210W 1000Mhz  500Mhz   71.76%   auto      0%
3   44.0c   81.170W  1266Mhz  2088Mhz  100.0%   auto      0%
1   43.0c   76.33W   1185Mhz  2088Mhz  100.0%   manual    2%
4   42.0c   73.255W  1185Mhz  2088Mhz  100.0%   manual    2%
2   41.0c   81.253W  1266Mhz  2088Mhz  100.0%   manual    0%
Traceback (most recent call last):
File "/usr/bin/rocm-smi", line 1058, in
showAllConcise(deviceList)
File "/usr/bin/rocm-smi", line 728, in showAllConcise
fan = str(getFanSpeed(device))
File "/usr/bin/rocm-smi", line 358, in getFanSpeed
fanLevel = int(getSysfsValue(device, 'fan'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
root@ubuntu:/home/tux#
it seems to normally detect no powerplay on GPU 0 with the rest of the fields when invoking roc-smi -a, but has the same messy error with the fans:
root@ubuntu:/home/tux# rocm-smi -a
====================    ROCm System Management Interface    ====================
GPU[5]          : GPU ID: 0x7300
GPU[3]          : GPU ID: 0x67df
GPU[1]          : GPU ID: 0x67df
GPU[4]          : GPU ID: 0x67df
GPU[2]          : GPU ID: 0x67df
GPU[0]          : GPU ID: 0x0100
================================================================================
GPU[5]          : Temperature: 53.0c
GPU[3]          : Temperature: 48.0c
GPU[1]          : Temperature: 48.0c
GPU[4]          : Temperature: 47.0c
GPU[2]          : Temperature: 46.0c
GPU[0]          : Unable to display temperature
================================================================================
GPU[5]          : GPU Clock Level: 7 (1000Mhz)
GPU[5]          : GPU Memory Clock Level: 0 (500Mhz)
GPU[3]          : GPU Clock Level: 4 (1266Mhz)
GPU[3]          : GPU Memory Clock Level: 2 (2088Mhz)
GPU[1]          : GPU Clock Level: 3 (1185Mhz)
GPU[1]          : GPU Memory Clock Level: 2 (2088Mhz)
GPU[4]          : GPU Clock Level: 3 (1185Mhz)
GPU[4]          : GPU Memory Clock Level: 2 (2088Mhz)
GPU[2]          : GPU Clock Level: 4 (1266Mhz)
GPU[2]          : GPU Memory Clock Level: 2 (2088Mhz)
GPU[0]          : PowerPlay not enabled - Cannot display clocks
================================================================================
GPU[5]          : Fan Level: 183 (71.76)%
GPU[3]          : Fan Level: 255 (100.0)%
GPU[1]          : Fan Level: 255 (100.0)%
GPU[4]          : Fan Level: 255 (100.0)%
GPU[2]          : Fan Level: 255 (100.0)%
Traceback (most recent call last):
File "/usr/bin/rocm-smi", line 1074, in
showCurrentFans(deviceList)
File "/usr/bin/rocm-smi", line 563, in showCurrentFans
fanspeed = getFanSpeed(device)
File "/usr/bin/rocm-smi", line 358, in getFanSpeed
fanLevel = int(getSysfsValue(device, 'fan'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
root@ubuntu:/home/tux#
It does not seem to affect usability and performance so far.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/RadeonOpenCompute/ROCm/issues/282, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD8DuVTM52YCUdXk4FIMVMBTCqb5FEAjks5tCuQogaJpZM4RKdZj.

@gstoner FYI that was after upgrading rocm from the prior version hosted at the github/radeon repo
I have just done a fresh install on another VM to test it (as per the official guide), and i get this error with rocm-smi, it seems the default installation is broken and the dependencies are not installed properly...
root@ubuntu:/home/tux# /opt/rocm/bin/rocm-smi
Traceback (most recent call last):
  File "/opt/rocm/bin/rocm-smi", line 8, in <module>
    import json
ImportError: No module named 'json'
root@ubuntu:/home/tux#

repo.radeon.com is where you get the binary packages

@gstoner but aren't these the ones I have been just installing anyway, from the repo as per the official guide?  ( ie:  http://repo.radeon.com/rocm/apt/debian/pool/main/ contents has 21-Dec-2017 timestamps )
Any suggestions on how to fix the broken fresh installation?
and how to install the previous binaries including rocm kfd compute kernel?

@gstoner I have the fresh installation more functional now
The problem I think was that it was too fresh, I had it so minimal that some packages were missing that were not installed as an explicit dependency (python json module or something)
though, roc-smi is behaving the same with regards to the QXL video device of the qemu/kvm VM:
====================    ROCm System Management Interface    ====================
================================================================================
 GPU  Temp    AvgPwr   SCLK     MCLK     Fan      Perf    SCLK OD
Traceback (most recent call last):
  File "/opt/rocm/bin/rocm-smi", line 1058, in <module>
    showAllConcise(deviceList)
  File "/opt/rocm/bin/rocm-smi", line 728, in showAllConcise
    fan = str(getFanSpeed(device))
  File "/opt/rocm/bin/rocm-smi", line 358, in getFanSpeed
    fanLevel = int(getSysfsValue(device, 'fan'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

You mentioned an update is being pushed, where can I grab it?

The  ROCm-SMI source code  lives here for the release  https://github.com/RadeonOpenCompute/ROC-smi/tree/roc-1.7.x.  This still looks like we can not get the data we need via SYSFS in virtualized environment.
On Dec 22, 2017, at 1:13 AM, hairetikos <notifications<EMAIL_ADDRESS>wrote:
@gstonerhttps://github.com/gstoner I have the fresh installation more functional now
The problem I think was that it was too fresh, I had it so minimal that some packages were missing that were not installed as an explicit dependency (python json module or something)
though, roc-smi is behaving the same with regards to the QXL video device of the qemu/kvm VM:
====================    ROCm System Management Interface    ====================
GPU  Temp    AvgPwr   SCLK     MCLK     Fan      Perf    SCLK OD
Traceback (most recent call last):
File "/opt/rocm/bin/rocm-smi", line 1058, in
showAllConcise(deviceList)
File "/opt/rocm/bin/rocm-smi", line 728, in showAllConcise
fan = str(getFanSpeed(device))
File "/opt/rocm/bin/rocm-smi", line 358, in getFanSpeed
fanLevel = int(getSysfsValue(device, 'fan'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
You mentioned an update is being pushed, where can I grab it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/RadeonOpenCompute/ROCm/issues/282#issuecomment-353537197, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD8Dua2GC8prSAidTPb6wDEybfVjhb3Tks5tC1abgaJpZM4RKdZj.


Missing translations in components

Translation to supported languages is not added. Only the cases in related files are.

@E-Hon make sure you are working with the latest code from master; some of the files you are trying to update have been deleted as a result of refactoring in the internationalisation code. see https://github.com/mit-cml/appinventor-sources/commit/95654754d7a97010126dfe6453da58daeabbd36a

Oh.... right...
I guess I can close it?
On Mon, Apr 20, 2015 at 9:10 PM, Jos<EMAIL_ADDRESS>wrote:

@E-Hon https://github.com/E-Hon make sure you are working with the
latest code from master; some of the files you are trying to update have
been deleted as a result of refactoring in the internationalisation code.
see 9565475
https://github.com/mit-cml/appinventor-sources/commit/95654754d7a97010126dfe6453da58daeabbd36a
—
Reply to this email directly or view it on GitHub
https://github.com/mit-cml/appinventor-sources/pull/366#issuecomment-94447544
.


rest url rule generate wrong schema

Url config
    'enablePrettyUrl' => true,
    'showScriptName' => false,
    'enableStrictParsing' => false,
    'rules' => [
       [
         'class' => 'yii\rest\UrlRule',
         'controller' => ['v1/channel']
       ]
   ]

Endpoint
domain.com/app-name/frontend/web/index.php/v1/channels

Generated endpoint
"_links": {
      "self": {
         "href": "domain.com/app-name/frontend/web/v1/channel?offset=1"
      }
    }

Yii version |  2.0.9

what exactly is wrong? note that 'showScriptName' => false does not match the URL you have given above.

@cebe  I  use pluralize schema /channels, but generated url isn't pluralize /channel

I am unable to reproduce this issue. I have created a unit test to verify the behavior of yii\rest\UrlRule with your parameters.

It's caused, when I use extra patterns.
Config example
    'enablePrettyUrl' => true,
    'showScriptName' => false,
    'enableStrictParsing' => false,
    'rules' => [
       [
         'class' => 'yii\rest\UrlRule',
         'controller' => ['v1/channel'],
           'extraPatterns' => [
            'my' => 'my'
         ]
       ]
   ]

Request url in index action
domain.com/v1/channels

Generated url
  "_links": {
      "self": {
        "href": "domain.com/v1/channels?offset=1"
      }
    },

Request url in custom action
domain.com/v1/channels/my

Generated url
  "_links": {
      "self": {
        "href": "domain.com/v1/channel/my?offset=1"
      }
    },

Reproduced, if you explicitly state a HTTP verb in the extra pattern it should work: 'GET my' => 'my' .

Fixed. Thanks for reporting!


Arguments for "providesAsset" aren't very clear

Not too big of a big deal, but when I was trying to figure out how to say that my theme provides entire asset groups, I wasn't able to easily figure out how. It's pretty easy, all you do is pass in the handle. But the first argument is supposed to be type (javascript or css) and the second is the handle. So I didn't know that I could pass in the handle as the first arg and override the whole group.
https://github.com/concrete5/concrete5/blob/develop/web/concrete/src/Page/Theme/Theme.php#L92-L96
I updated the documentation page, but it feels like a phpdoc block would make it clearer. It would make more sense to have the handle as the first argument, but that would break a lot of sites. ;)

Actually, looks like it doesn't work at all. The ResponseAssetGroup's markAssetAsIncluded works if you have a second argument, but calling providesAsset() in the page theme without false as the second argument fails.
Should
public function providesAsset($assetType, $assetHandle)
be changed to
public function providesAsset($assetType, $assetHandle = false)
That fixes it so you can pass only one argument in from the page_theme.php
Not sure if I should open a new issue for that?

Thanks – I updated the PageTheme class.

@herent in the future if the title doesn't match, open a new ticket.

OK, will do. Just kind of thought they were still related since it's the same spot that needed changing.

Thanks @herent!


TabPane should be replaced with TabBar in emojipicker.js

This issue was imported from Closure Library's previous home at http://closure-library.googlecode.com
The link to the original issue is:
https://code.google.com/p/closure-library/issues/detail?id=420

This issue is being closed as a preparation step before archiving the repository.  See the README for more detail.


GAE Rails integration tests compatible with gcloud SDK v147

gcloud SDK starts to prepand exec in docker image entrypoint in version 147.0.0. This change has broken the GAE Rails integration test workflows. We can wrap the Rails test applications' entrypoints in bash -c to work around this change.
To test this change, upgrade gcloud SDK to version 147.0.0 or later, then run rake integration:gae and verify this task complete successfully.
I also noticed GAE Flex has fixed the load balancer unavailable right after deployment bug. So we can safely remove that sleep statement.

Thanks @hxiong388!!!! LGTM, but I will test tomorrow before merging.


Documentation request: loading MANO hands and SMPL body model together

I am trying to load the reconstructed hands together with the SMPL mesh/vertices. While loading the SMPL vertices (red) and pose keypoints (yellow) and projecting into a given camera works fine I have some trouble with the hands.
The hand keypoints and the reconstructed hand mesh (blue: left, green: right) seem to be placed at some normalised position -

Applying the rotation and translation provided in mano_params_l.txt/mano_params_r.txt also does not seem to produce the right results.

The camera calibrations for body and hands seem to be identical.
Could you provide a sample of loading SMPL and MANO in the same coordinate frame?

This has actually been asked already: https://github.com/zhixuany/HUMBI/issues/5
@zhixuany Is there an update wrt jointly tracked body and hands or does the dataset - as of now - still treats body and hands separately?

This has actually been asked already: https://github.com/zhixuany/HUMBI/issues/5
@zhixuany Is there an update wrt jointly tracked body and hands or does the dataset - as of now - still treats body and hands separately?

We allocate different time sessions to capture body movement and hand gestures separately, in order to highlight each. Thus, we did not process hand in sequence focus on body movement, though we made that particular images in the paper showing body and hand mesh together.

We allocate different time sessions to capture body movement and hand gestures separately, in order to highlight each. Thus, we did not process hand in sequence focus on body movement, though we made that particular images in the paper showing body and hand mesh together.


Fix minor errors in CONTRIBUTING.md

Description

A misplaced question mark and a minor grammatical error were in this document, so I fixed them.
I also added a comma
Types of Changes

[ ] Core
[ ] Bugfix
[ ] New feature
[ ] Enhancement/optimization
[x] Documentation

Issues Fixed or Closed by This PR

none

Checklist

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Hi, thanks for contributing to Strawberry 🍓!
We noticed that this PR is missing a RELEASE.md file. We use that to automatically do releases here on GitHub and, most importantly, to PyPI!
So as soon as this PR is merged, a release will be made 🚀.
Here's an example of RELEASE.md:
Release type: patch

Description of the changes, ideally with some examples, if adding a new feature.

Release type can be one of patch, minor or major. We use semver,so make sure to pick the appropriate type. If in doubt feel free to ask :)


Fix styled component modifications failing to trigger hot reload

What is the context of this PR?

Hot reloading has stopped working when editing styled components
Upgraded styled components package to fix this

How to review

Run tests
Ensure styles are the same
Ensure you can edit a styled component and it triggers a reload

 Upgrade styled components package


ability to delete files

Hello, first of all thank you for making my life easier with this image, been using for about a year
I use this with NAS + infuse for apple tv
The only nitpick I have is ability to delete files from it. The app supports it but webdav doesn't, at least from what I see I can only add custom users
Maybe I am missing something or is there any easy workaround? Thank you!!

Hello, it should support DELETE, see here. A log when it fails to delete might help, could you provide one?

hello again, the issue was on my side. It returned 400 error on delete because I forgot to set these env variables:
PUID=1000
PGID=1000

hopefully this thread will help someone like me 😅


systemd cgroup driver detection does not work on servers

It looks like this was regressed by https://github.com/k3s-io/k3s/commit/a9b5a1933fb. On servers, the NOTIFY_SOCKET environment variable gets unset, which prevents the cgroup detection code from detecting that it is running under systemd.
Originally posted by @brandond in https://github.com/k3s-io/k3s/issues/5454#issuecomment-1182605398


There should be the currency icon inside the currency dropdown

Bagisto Version: Master
Steps To reproduce--
1. log in as a user.
2. Try to change the app currency for the header section
Expected result:  There should be the currency icon inside the currency dropdown.
Actual result: There is no currency icon inside the currency dropdown. Please find the creenshot Here.

@jitendra-webkul
Now, this enhancement is done. so I am closing this enhancement.
And I have attached a screenshot Here, for future reference.


dataset not found

Hi,
the link present on repo doesn't seems to valid? can reshare the link for processed dataset thanks

Sorry, I mistakenly deleted the zip file in Google drive.
I will inform you when I find the source file, but it shall be in an broken laptop at another city.

Hi, I have found the data and updated the data link.
You can check it.


Customized EXP rate for level up

Allow users to change EXP modifier by  editing files which related to EXP.
For example,we could use 500/750/1125/1687/2531 to replace original one(which might be 500/1000/2000/4000/8000). The rate has been changed from 200% to 150%.
The default rate (200%) may cause users put most of their time on getting EXP.

como eu configuro o mod

How do i set the mod

Yes! I'd love to be able to change the XP scaling amount - maybe even have different scalings (linear, exponential like it is currently, logarithmic) available. Even different scaling per tool?

Okay I've dug around a bit, found TinkersToolLeveling/src/main/java/slimeknights/toolleveling/config/ConfigFile.java. Could the value in line 88 be made available to adjust in the config? Not sure exactly how it works but it seems to be a very simple change.

@Hexus-One  and Allow unlimited levels ,please

Oh? I thought the config file already allowed you to set an upper limit (0 or less for infinite) for levelling.

@Hexus-One oh ...sorry my mistaken..

Haha no worries :)

@Hexus-One get exp point for different block ,For example: 1 point for stone ,2 point for iron ore and 4 point for gold ore .can you achieve it? oh and Customized exp getting rate :)

The values are not exposed because they act as the soft-cap for amount of modifiers you get.

Oh... but surely it would not hurt to make it adjustable to the end users'/modpack creators' discretion? Or would this cause too many additional problems?

Edit: may I compile a separate fork for provate use?

You can do whatever you want for private use. ;)


After running jira.jar file I was able to fetch data from Jira URL and populate it to mongodb.in mongodb under test and under feature all the stiories are there but while configuring jira feature widget I will get nothing in dropdown-plx help

@kkkkk111 :

For the "Agile Content Tool Type"
Can you please run the below query against your mongoDB, and check if you have any collectors registered
db.collectors.find({ "collectorType": "AgileTool" })

For Project Names, please run the below query to check if you have any projects in the database:
db.scope.find({"collectorId" : ObjectId({your collector id value})})

For the Team Names, please run the below query to check if you have any teams in the database:
db.team.find({"collectorId" : ObjectId({your collector id value})})

hi sir thanks a lot..
will you please help me for ldap configuration..for hygieia.
On Thu, Jul 19, 2018 at 8:31 PM, subodhbattina<EMAIL_ADDRESS>wrote:

@kkkkk111 https://github.com/kkkkk111 :

For the "Agile Content Tool Type"
Can you please run the below query against your mongoDB, and check if
you have any collectors registered
db.collectors.find({ "collectorType": "AgileTool" })
2.
For Project Names, please run the below query to check if you have any
projects in the database:
db.scope.find({"collectorId" : ObjectId({your collector id value})})
3.
For the Team Names, please run the below query to check if you have
any teams in the database:
db.team.find({"collectorId" : ObjectId({your collector id value})})
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/capitalone/Hygieia/issues/2344#issuecomment-406307641,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Am4IlsyISCG7Si1QCELtyFYCANFOQPWmks5uIJ9EgaJpZM4VITJL
.


Update

Fix: Add only healthy containers to the target pool
Fix: Only attempt to update provider configs if the LB config from
metadata has changed. This prevents flooding of the provider API when
there is a flapping service in the environment that causes the metadata
version to change rapidly.
Enhancement: Set Cattle service FQDN to the FQDN of the load balancer
(if supported by the provider)
Refactored code
Updated godeps

Code refactor LGTM.


Function unable to take either Hash or named parameter variant

The following works on mRuby 3.0.0, 3.1.0, CRuby 3.2.2, and CRuby 3.4.0dev, but raises an argument exception in mRuby 3.2.0, and mRuby master:
mRuby 3.0.0, CRuby 3.2.2, CRuby 3.4.0dev:
def print_line line
  puts line
end

print_line({x: 0, y: 0, w: 100, h: 100}) # {:x=>0, :y=>0, :w=>100, :h=>100}
print_line(x: 0, y: 0, w: 100, h: 100) # {:x=>0, :y=>0, :w=>100, :h=>100}

mRuby 3.2.0, master:
def print_line line
  puts line
end

print_line({x: 0, y: 0, w: 100, h: 100}) # {:x=>0, :y=>0, :w=>100, :h=>100}
print_line(x: 0, y: 0, w: 100, h: 100) # wrong number of arguments (given 1, expected 1) (ArgumentError)

I performed a git bisect and it looks like the following commit caused the regression: 5d1373335202a293d92eabf252223cab4559678f

I was able to reproduce it in mruby 3.2, but not in master (commit ebf66a2b801706eb02d801384c2d1fc84b579635).
I think this has been fixed since it was reported by #5944.
@amirrajan, could you check again to see if you have tried it with the latest master?

Confirmed. It is indeed fixed in master (my mistake)


Problem with moving save task

When moving save step forward and starting from a the save game, it doesn't start correctly.

Are this a solvable issue - isn't it just expected behavior?

It might be


Raise NPE in summarize operator with MAX/MIN for null values.

Summary
This is backport (0.1-develop) of asakusafw/asakusafw-compiler#121.
Background, Problem or Goal of the patch
see asakusafw/asakusafw-compiler#121.
Design of the fix, or a new feature
N/A.
Related Issue, Pull Request or Code

asakusafw/asakusafw-compiler#121

BUILD SUCCESS. <jenkins-prb-asakusafw-dag-53>


suitesparse: 5.4.0 → 5.7.1 + clean up

Motivation for this change
Also had split (e.g. GEGL depends only on umfpack) in the works but it does not make sense to delay it.
cc @knedlsepp @ttuegel @jluttine
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Upstream also now suggests to link against Intel MKL instead of OpenBLAS but it is just something they discovered recently, not a regression. As such, I will not touch that until we know more.

Interesting findings about MKL/OpenBLAS. I guess we probably care about the licensing quite a bit so the swap wouldn't be all that straightforward anyway.

Was graphblas part of suitesparse before? I remember seeing quite a few log messages as part of the build.

Yes it was. It is also what made the build take so long.

I have spent a couple hours and purged it completely (see the commit message).
It builds both with and without cuda.
Now only checking the makeFlags if they are still needed remains but I have spent too much time on this already.
In the future we might clean the expression even further:

I have opened an upstream issue to allow us to remove the Makefile editing: https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/25
Darwin dylib names might be fixed on master: https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/f6daae26ee391e475e2295e77c839aa7c1a8b784

IMHO it make sense to have structural and functional changes in separate commits, not only for reviewing but also for making sense of it when blaming files.

there is a lot going on, and I don't have enough context on how these applications are meant to behave, to have much of an opinion.
the diff LGTM, so I'll defer to your preference.

I would like to hear from @ttuegel who introduced the merged libsuitesparse.so if they still have some need for it. If there is no response, we should merge it after a week.


IMPORTANT: Fix For First Aid

Core: First Aid doesn't scan in non English client, this fixes it
The toc edit is flavour

--Couldn't find proper one so I used the CN one, pls send message on discord if innacurate -Belrand

The PTR lets you set any locale in the launcher, fyi.

Sadly, I am unable to distinguish between zhTW and zhCN locales ^^'
I can give a shot, but I'm unsure as to how I can copy the text from the game though

ChatFrame1EditBox:SetText((GetSpellInfo(...))), or something along those lines?

I'm dumb, it's a skill, I can just link it in chat
Game returned 急救 in zhTW locale but it seems different IG

So "急救" does work!

I got a lot of Lua errors but none of them from Guildbook so I believe it's good!


Voice Connected frame not colored

I think you forgot to color this part of the interface, unless there's a problem on my part of it

You're right, I forgot about it. Fixed in the latest commit. Thanks for the heads up :)


fix: dns change

One-line summary

Zalando ticket : ARUHA-XXX (only if appropriate)

Description
A few sentences describing the overall goals of the pull request's
commits.
Review

[ ] Tests
[ ] Documentation

Deployment Notes
These should highlight any db migrations, feature toggles, etc.

:tada: This PR is included in version 1.2.16 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


problem downloading the dataset

Hello,
UPDATE: trying using the "baidu drive" option.
UPDATE2: downloading big files from baidu drive seems to require installing their executable which is not an option for me. Any idea, anyone?
not a problem with the code, just a problem downloading the celebs dataset.
http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
Dropbox doesn't like all the traffic it generated, and blocked access to the zip files.
Anyone here knows of a way to still get the dataset? any mirror or copy of the file anywhere?

Use Google Drive if the project Dropbox is down -- https://drive.google.com/open?id=0B7EVK8r0v71pWEZsZE9oNnFzTm8
I will add this info to the README as a couple of other people also had this problem

Thanks a lot! :)


Negative numbers are considered flags

If you try to run a input a negative number into a brain-flak program.  e.g.:
$brainflak test.txt -7

You get the following
invalid option: -7

Welcome to Brain-Flak!

Usage:
	brain_flak source_file
	brain_flak source_file args

    -d, --debug                      Enables parsing of debug commands
    -f, --file=FILE                  Reads input for the brain-flak program from FILE, rather than from the command line.
    -a, --ascii                      Take input and output in ASCII code points, rather than in decimal

It obviously thinks -7 is a flag but I don't know how to fix it.

Fixed with 306f46792b69ba3de4bd3feed330962ffe85abce


Failure while reading containerd-sourced images

Describe the bug
Docker desktop has two options for pulling and storing images internally: the default container and containerd.
jf cli cannot scan images or tar files created using containerd.
Current behavior
JFrog Xray version is: 3.86.11
command: jf scan mariadb-latest-containerd.tar

[jfxia] [WARN ] [] [docker_tar:74                 ] [UnnamedContext                  ] Failed to index tar file as container image, continue to generic tar indexer. Error: failed to analyze OCI tar archive
--- at /go/src/jfrog.com/xray/backend/indexer/indexer_core/docker_tar.go:144 (DockerTarOpener.analyzeTarAsContainer) ---
Caused by: failed to parse and validate manifests list: index.json
--- at /go/src/jfrog.com/xray/backend/indexer/indexer_core/oci_tar.go:53 (DockerTarOpener.handleIndexFile) ---
Caused by: manifest unexpected media type: application/vnd.oci.image.index.v1+json
--- at /go/src/jfrog.com/xray/backend/indexer/indexer_core/oci_tar.go:95 (DockerTarOpener.parseAndValidateManifestsList) ---

Reproduction steps
I used mariadb:lateset as an example, since it is easily available. It is NOT necessary to export files to tar, but doing so makes it easier to demonstrate the error.

Check that "Use containerd for pulling and storing images" option in Docker Desktop is disabled. This is "control" test.

Download the image if needed:
docker pull mariadb:latest

Save image to tar file:
docker save mariadb:latest -o mariadb-latest-default.tar

Enable "Use containerd for pulling and storing images" option in Docker Desktop. (Docker will restart)

Download the image if needed:
docker pull mariadb:latest

Save image to tar file:
docker save mariadb:latest -o mariadb-latest-containerd.tar

Scan the images:
jf scan  mariadb-latest-default.tar
jf scan  mariadb-latest-containerd.tar

Expected behavior
jf scan  mariadb-latest-default.tar
Will produce a viable security scan.
jf scan  mariadb-latest-containerd.tar
Will fail to scan with the following error:

Failed to index tar file as container image, continue to generic tar indexer. Error: failed to analyze OCI tar archive
--- at /go/src/jfrog.com/xray/backend/indexer/indexer_core/docker_tar.go:144 (DockerTarOpener.analyzeTarAsContainer) ---
Caused by: failed to parse and validate manifests list: index.json
--- at /go/src/jfrog.com/xray/backend/indexer/indexer_core/oci_tar.go:53 (DockerTarOpener.handleIndexFile) ---
Caused by: manifest unexpected media type: application/vnd.oci.image.index.v1+json
--- at /go/src/jfrog.com/xray/backend/indexer/indexer_core/oci_tar.go:95 (DockerTarOpener.parseAndValidateManifestsList) ---

jf will continue despite the failure and fail to find any vulnerabilities

Vulnerable Components
┌───────────────────────────────────────────┐
│ ✨ No vulnerable components were found ✨ │
└───────────────────────────────────────────┘

JFrog CLI version
jf version 2.59.1
Operating system type and version
Mac OS 14.5, Docker Desktop <IP_ADDRESS>
JFrog Artifactory version
No response
JFrog Xray version
JFrog Xray version is: 3.86.11

This behavior is still present in the CLI. The containerd storage option is now the default in Docker Desktop, so this is only going to become a bigger issue.


Open AppMap for all types of code objects

Closes https://github.com/getappmap/appmap-intellij-plugin/issues/233
Removes the special handling of function code objects. These code objects are now opened in an AppMap, i.e. all code objects are now treated in the same way.

@ahtrotta Thanks! I added the setState in https://github.com/getappmap/appmap-intellij-plugin/pull/234/commits/a7e6cfb360e23fafb4284f50d521a329d4b15729.
This preselects the method in the left pane of the AppMap view, but does not seem to highlight the node as in your screenshot.
I tried to test this VSCode with the latest version of AppMap, but it's still opening the source file and not the AppMap view.

I just ran this branch locally (./gradlew runIde) and I noticed that there aren't any sequence diagrams. What version of @appland/components does this branch use? The selection not occurring in the map might be because the version of @appland/components is old.

@ahtrotta I just rebased this branch on main and also updated to the latest appmap/components. Please try again.
I still think that there's something wrong with the navigation, but I'm not sure.

In VS Code, it opens the source file and there's an AppMap pin next to the function. If you hover over the pin it will give you the option to Open code object in AppMap. In JetBrains, we want to mimic the Open code object in AppMap functionality directly.

Yeah, I see the Sequence Diagram tab but there is still a problem with selecting the current code object in the map.

I rebased onto main and think that it's now working in the same way as the VSCode plugin.
At last for https://github.com/land-of-apps/sample_app_6th_ed/ the AppMap view highlights the chosen method.
It does not work for projects like spring-petclinic, but that's also the case for VSCode.

Awesome! It seems to open the map with the correct function selected!
I've found a bug, though. If I open this repo, generate maps, and then navigate to the code objects tree view (Code --> ActionController --> Instrumentation --> process_action):

If I select a map (for example Site_layout layout links):

Then I reset the map view with the Clear selection button:

If I close the map and then I re-open the map from the AppMaps list:

The map will open with the same function selected again, even though I cleared that selection in the previous step:

So it seems like the selection state is being passed into the map again even though the map is being opened from the AppMaps list and not the Code Objets tree view.

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

v0.32.0
GitHub release

Your semantic-release bot :package::rocket:


This doesn't work in Playgrounds for some reason

After adding the package to a Playgrounds App, the app no longer refreshes.
Also, none of the required packages (MathJaxSwift, etc.) are loaded. They can obviously be loaded individually by finding the addresses in the package manifest, but I'm not sure if that's a Playgrounds issue or an issue with this package.

This may be fixed with version 1.3.1. I was able to get it added to a Playgrounds application and have it refreshed. I will keep looking into it more, but if you can confirm this is fixed, I'll close the issue.


Cleanup for 2.0 release

Please update the license to 2023
https://github.com/adobe/aepsdk-analytics-android/blob/dev/LICENSE#L189

Change the license to 2023
https://github.com/adobe/aepsdk-analytics-android/blob/dev/LICENSE#L189


Add @mui/icons-material as default on Installation page (Docs)

[X] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Many component demos are using the Icons and for new users, this can be confusing because the default list of dependencies does not include the installation of the @mui/icons-material module:
// with npm
npm install @mui/material @emotion/react @emotion/styled

// with yarn
yarn add @mui/material @emotion/react @emotion/styled

Examples 🌈

When a user tries to use a demo component, they will be presented with the next error due that @mui/icons-material is not installed by default:

Motivation 🔦

I think this will improve the docs and onboarding of new users.

Thanks for the feedback. We have a section for icons just below that one, here is the one specific to the SVG icons - https://next.material-ui.com/getting-started/installation/#svg-icons
It's riskier to add it in the default installation command, as people may consider it required in order for the material components to be used.


Don't recompile oqs everytime cargo build is invoked

Currently, the build.rs of oqs-sys is configured so that oqs is recompiled every time cargo build is executed. This really takes the fun away from cargo watch etc., as it blows the time of a cargo build with an already filled target/ to 20 seconds+.
https://doc.rust-lang.org/cargo/reference/build-scripts.html#change-detection provides some guidance on how to refine the behavior in this regard.

This should already be caught by: https://github.com/open-quantum-safe/liboqs-rust/blob/main/oqs-sys/build.rs#L126-L129....

though at least CC should be added to the environment variables, maybe also CMAKE_*


Bot Framework submissions

We can keep track of related Bot Frameworks and accept new submissions in comments to this issue.

Repository

https://github.com/wiz0u/YourEasyBot

https://github.com/TgBotFramework/TgBotFramework

https://github.com/immmdreza/FlamingoFramework

https://github.com/MajMcCloud/TelegramBotFramework

https://github.com/TelegramUpdater/TelegramUpdater

Move Frameworks list to wiki: https://github.com/TelegramBots/Telegram.Bot/wiki


ci: use a secret for dockerhub user

self explanatory

:tada: This PR is included in version 2.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Missing blacklight.yml config file -- error from rabbitmq error queue

there are 2 of these. one header and both payloads below.
{"error":"You are missing a configuration file: /opt/dpul/releases/20200504141824/config/blacklight.yml. Have you run \"rails generate blacklight:install\"?","num_attempts":6,"failed_at":"2020-05-04T14:58:54+00:00","properties":{"content_type":"application/octet-stream","headers":{"x-death":[{"count":5,"exchange":"pomegranate_production-retry","queue":"pomegranate_production-retry","reason":"expired","routing-keys":[""],"time":"2020-05-04T14:54:53.000+00:00"},{"count":5,"exchange":"figgy_events","queue":"pomegranate_production","reason":"rejected","routing-keys":[""],"time":"2020-05-04T14:53:53.000+00:00"}],"x-first-death-exchange":"figgy_events","x-first-death-queue":"pomegranate_production","x-first-death-reason":"rejected"},"delivery_mode":2,"priority":0},"error_class":"RuntimeError","error_message":"You are missing a configuration file: /opt/dpul/releases/20200504141824/config/blacklight.yml. Have you run \"rails generate blacklight:install\"?","backtrace":["/opt/dpul/shared/bundle/ruby/2.6.0/gems/blacklight-6.20.0/lib/blacklight.rb:77:in `blacklight_yml'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/blacklight-6.20.0/lib/blacklight.rb:62:in `connection_config'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/blacklight-6.20.0/lib/blacklight/configuration.rb:211:in `connection_config'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/blacklight-6.20.0/lib/blacklight/abstract_repository.rb:50:in `connection_config'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/blacklight-6.20.0/lib/blacklight/solr/repository.rb:88:in `build_connection'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/blacklight-6.20.0/lib/blacklight/abstract_repository.rb:17:in `connection'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/blacklight-6.20.0/lib/blacklight/solr/repository.rb:61:in `block in send_and_receive'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/benchmarkable.rb:43:in `block in benchmark'","/opt/dpul/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'","/usr/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'"]}

payload: {"id":"2190535d-fa3a-4b80-8022-da93c7db8946","event":"UPDATED","manifest_url":"https://figgy.princeton.edu/concern/scanned_resources/2190535d-fa3a-4b80-8022-da93c7db8946/manifest","collection_slugs":["lapidus_pamphlets","lapidus"]}

Another one's payload:
{"id":"2c225f85-288f-4b41-8e3c-eaaf5d6123c6","event":"UPDATED","manifest_url":"https://figgy.princeton.edu/concern/ephemera_folders/2c225f85-288f-4b41-8e3c-eaaf5d6123c6/manifest","collection_slugs":["soviet_posters","slavic"]}

Re-queued all messages from the error queue after resolving #784 and #785. No longer getting this error; closing.


Make compatible with Ubuntu

Ensure the installation and runtime work on Ubuntu.

Disable interactions with the gpiozero library if the platform is not a Raspberry Pi.

Hi Bruce ! First thank you for the amazing job you've done. Guess what ?! We also have robocalls in France. But also due to chip shortage it becomes difficult, if not impossible to get RPi. I tried to setup callattendant in a virtualenv on a Wyse thin client (amazing AMD cpu for less than 60$). Unfortunately it seems, as you posted initialy, that callattendant expect GPIOs to be there, which I have not, hence the service do not start... I tried to comment pieces of codes here and there to try to disable the parts about GPIOs in app.py like:
from hardware.indicators import ApprovedIndicator, BlockedIndicator
&
        self.approved_indicator = ApprovedIndicator(                 self.config.get("GPIO_LED_APPROVED_PIN"),                 self.config.get("GPIO_LED_APPROVED_BRIGHTNESS", 100))         self.blocked_indicator = BlockedIndicator(                 self.config.get("GPIO_LED_BLOCKED_PIN"),                 self.config.get("GPIO_LED_BLOCKED_BRIGHTNESS", 100))
also in config.py all about GPIO_LED
But I still have the same error about gpiozero not accessible. I'm not sure I'm in the right direction...
I was wondering if it would be possible to first understand if changes that have to be made to get rid of GPIO is an hard job or if it can be made easily...
If you still visit this page let us know :)
Thanks a lot, merci beaucoup.
Best regards.

Hello advfr,
You should take a look at this commit for disabling GPIO:
https://github.com/emxsys/callattendant/pull/152
I don't had time to try it as I would like to install Callattendant on a Linux VM too.
Bye from France too ;-)

Salut John, thanks a lot for your so prompt answer.
I took a look to the commit proposed by Lucien Van Elsen.
I'm really really far to be an expert, but it looks like that nowhere I see something to avoid the download of the... what... libraries (in setup.py) like gpiozero, pigpio, RPi.GPIO and RPIO.
In app.py, he still imports things from hardware.indicators. (indicators.py itself imports things from gpiozero)
I'm thinking changes have been suggested not to use GPIO but still using a Pi.
I don't know if I'm clear and if you see what I mean...
I created of fork and I'm trying to comment maximum things about indicators/GPIO things like that...
I left from galacticstudios's fork, which has an interesting improvement with possibility to manage white/black list with web interface and regular expressions.
All the best, I will come back here if I'm able to do what I want.
A bientôt !

Hi again, I think my fork is functionnal.
https://github.com/advfr/callattendant/
Once again big thanks to Bruce !

Hello advfr,
Thank you very much for making Callattendant compatible with other OS than Raspberry OS.
I will take a look when I will have some time :)
Have a nice day!

I've attempted to dockerize @advfr's fork but I am currently having issues with calls not being detected. The modem initializes but I haven't yet debugged the reason for the detection issue. I'll update and if you know the reason, please feel free to share.
https://github.com/foureight84/callattendant-docker

I've attempted to dockerize @advfr's fork but I am currently having issues with calls not being detected. The modem initializes but I haven't yet debugged the reason for the detection issue. I'll update and if you know the reason, please feel free to share.
https://github.com/foureight84/callattendant-docker
EDIT: I can send commands and receive response from the modem via minicom inside the container. Debug log shows that app is detecting rings but no actions are taken.

I decided to fork the master branch and remove references to gpio usage. It's working now. You can find the updated branch here: https://github.com/foureight84/callattendant/tree/no-gpio
Docker instance working as well.
@advfr I believe your changes might have removed the ring event thread. This is just a hunch since callattendant never kicks in to handle the call during testing. I haven't reviewed the changes made.


fever api cannot add feed?

I am using stringer in reeder, but I cannot add or delete feed , does stringer 's api   support this? hoping to supporting :)

Fever's API documentation, that we've used as a reference while implementing Fever API support in Stringer, says

The public beta of the API does not provide a way to add, edit or delete feeds or groups but you can mark items, feeds and groups as read and save or unsave items.

Has Fever added undocumented support for managing feeds to their API? If they have, I'd welcome a PR adding support for it in Stringer.

I'm closing this issue for lack of activity.


Implement Data Parallel on n300

Implement Data parallel for Convnet Mnist model on n300.

Commit is available for Convnet_Mnist data parallel implementation.
Corresponding commit

PR is available for convnet mnist data parallel implementation
Corresponding PR : #13469


Support more generic unions

Right now unions have these restrictions:

No more than one class type per union
No more than one array type per union
No more than one map type per union
No more than one enum type per union
Unions cannot contain both a class and a map type
Unions cannot contain both an enum and the string primitive type

Some of these are more easily lifted than others.  The enum restrictions, are easy, for example, provided that the enums don't overlap.  If they do, we could bail, or just go by whichever is first in the list.  If the string primitive type is in the mix as well, use it if the string we got isn't part of any of the enums.
The one-array and one-map restrictions can be solved by deserializing the first array element and checking which type it is, i.e. if we have to handle A[] | B[] we parse the first element, and if it's an A we have an A[].  There are cases where things are more complicated, in particular:

An int[] vs an double[] can be disambiguated by any element, i.e [1,2,3.1415] looks like an int[] at first, until we get to the last element.

An empty array or map is undecidable.  Do we add a separate union case for that?  Do we pick the first array or map type in the oneOf sequence?

The class type case is the most complicated one.  Here are some difficulties:

There might be cases where the data matches more than one type, such as when empty arrays or maps, or optional properties are involved, or enums and strings.

The element that breaks the ambiguity between types can come late.  Take, for example, classes A: { foo: string } and B: { foo: string, x: bool }.  Until we have seen x, or the end of the object, we don't know whether we're dealing with an A or B.

There can be ambiguous elements in addition to late ambiguity-breaking types.  For example: A: { arr: int[] } and B: { arr: double[], x: bool}. If we see arr first we have to deserialize it into a double[] and then, if we don't see x, convert it into an int[].  Similar cases apply to maps, enums, and even class types that allow ambiguity (imagine, for example, the arr properties instead of being arrays, being two classes that differ in a single property which is an enum in one, a string in the other).

There could be more than one disambiguating element.  For example: A: { x: int, y: double } and B: { x: double, y: int }.  You can't decide between these two cases until you've seen both x and y.

In two of our target languages, Elm and TypeScript, none of this is an issue.  TypeScript only does validation of types, so when it handles a union it just checks that the type satisfies one of the cases.  Elm is somewhat similar, in that it adopts the inefficient but very generic deserialization strategy of just trying all possible cases one by one, and using the first one that works.
In many of the other frameworks we don't really have that choice - they don't let us restart reading the JSON for each case (C++ does, because, like Elm, it deserializes the JSON into an intermediate, dynamically typed, form first).  In addition to that, I'm not fond of that kind of inefficiency.
I don't think writing a code generator for class types that's super smart and able to disambiguate at the earliest point is feasible.  A pretty generic and feasible way to do this is to generate two types for each union type:

The user-facing one that's nice and exactly what you expect.
A messy internal one that is the element-wise union of the classes, i.e. what you get right now.  We can already deserialize this, and once we have the result, we can run a simple disambiguation over it and construct the correct nice user-facing type out of it.

I don't think there's a way to make deserializing perfectly unambiguous without some constraints. If all union types always have a clearly defined assignment name, then there can be no ambiguity. An example is { a: double[] }, { b: int[] }. Assuming there is a schema that defines that the object's a property is always of type double[], then there is no ambiguity (b would be another type). It's only when trying to infer that does it become impossible. I understand that right now the property name isn't taken into account when determining type of the child json node, but perhaps including the property name is necessary. This is effectively how protobuf differentiates: using numerically tagged fields, which are roughly equivalent to unique names.
Another possibility is to disallow mixing primitives and maps/classes/arrays in a union. so { a: true } and { a: { b: "something" } } would never be considered the same type, but { a: { b: "something" } } and { a: { c: false } would be unionized. a in both cases points at a map, so there can be a unified type.

An empty array or map is undecidable.

Maybe if you encounter an empty map or array, consider it null and require the property that contains the empty thing to be optional (so the programmer would know to check). This could even be something that QuickType enforces when reading in the schema, responding with a warning or, more helpfully, an error.

The class type case is the most complicated one.

I didn't know this was even possible! In my experience, hydrating a true class is really complicated, usually because of internal state or work embedded in the constructor. Why even try to make this work when a consumer will probably wrap the plain structures QuickType generates into a stateful class (if they need that) anyway? Maybe I'm misunderstanding what this means though.

I didn't know this was even possible! In my experience, hydrating a true class is really complicated, usually because of internal state or work embedded in the constructor. Why even try to make this work when a consumer will probably wrap the plain structures QuickType generates into a stateful class (if they need that) anyway? Maybe I'm misunderstanding what this means though.

Let me know if I understand you correctly: What you would expect as the output from a union of two or more class types is not two classes in the target language, but one single class that contains a union of all the properties of the class types?  And, I assume, an additional field that tells you which one of the union cases applies to the deserialized JSON?  And you'd require that properties with the same name can't have different types in different union cases?

Maybe if you encounter an empty map or array, consider it null and require the property that contains the empty thing to be optional (so the programmer would know to check). This could even be something that QuickType enforces when reading in the schema, responding with a warning or, more helpfully, an error.

I don't like this solution: it changes the semantics of array deserialization depending on whether the class is in a union with another class or not.  But a simple change makes it better: we can just initialize all non-optional/nullable arrays as empty.  If we don't see them, they remain empty, but that's ok, since they're in a union case that doesn't apply anyway.

Another possibility is to disallow mixing primitives and maps/classes/arrays in a union. so { a: true } and { a: { b: "something" } } would never be considered the same type, but { a: { b: "something" } } and { a: { c: false } would be unionized. a in both cases points at a map, so there can be a unified type.

I'm sorry, I don't get this point.  When you're saying "would never be considered the same type" do you mean that we wouldn't support it?  I'm also confused about the map thing - why is this important here?  And would you want unions of map types to be supported?

Something we can do pretty easily for languages that only do verification, not construction of objects - right now TypeScript is the only one where we do that:
We can keep unions arbitrarily complex and emit the corresponding types if the language supports it.  So if we have a union of class types A and B, instead of unifying them into one class, we keep them in the union and then make the TypeScript renderer emit
type ClassUnion = A | B

For languages that don't support that we would still unify the classes.


Flutter activity is not finished after all routes are popped

I'm adding a few new screens built with Flutter onto an exiting Android app with a pre-warmed engine. Everything works so smoothly until I tried to close the UI from the flutter side.
In stand-alone flutter app, when all routes popped from the root Navigator, the app is closed automatically. But in this app, the app popped into a funny screen.
This is the home or the MaterialApp

When I clicked Exit, it runs Navigator.pop(context);
I was expecting the FlutterActivity is finished, but it doesn't, and this is what I see on the screen:

This is the same screen captured the by emulator screenshot tool, which is a blank screen

I can leave this screen by press physical back, I can return to my native screen.
If I re-show the flutter screen again, I would see

It renders a transparent view on it, but you can still see flutter debug ribbon.

Syncing files to device Android SDK built for x86...

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building Navigator-[GlobalObjectKey<NavigatorState>
_WidgetsAppState#a6a87](dirty, dependencies: [HeroControllerScope], state:
NavigatorState#a52a8(tickers: tracking 0 tickers)):
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4042 pos 12:
'_history.isNotEmpty': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was:
  MaterialApp
  file:///Users/timnew/Workspace/mobile-android/flutter_module/lib/screens/app/JoraApp.dart:28:12

When the exception was thrown, this was the stack:
#2      NavigatorState.build (package:flutter/src/widgets/navigator.dart:4042:12)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
#5      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#6      Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#7      StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#8      Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#9      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#10     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#11     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#12     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#14     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#15     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#16     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#17     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#18     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#19     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#20     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#22     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#23     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#24     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#26     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#27     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#28     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#30     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#31     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#32     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#33     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#34     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#35     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#36     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#37     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#38     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#39     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#40     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#41     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#42     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#43     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#44     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#45     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#46     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
#47     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#48     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#49     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#50     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#51     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#52     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#53     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#54     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#55     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#56     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#57     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#58     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#59     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#60     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#61     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#62     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#63     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#64     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#65     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#66     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#67     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#68     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
#69     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#70     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#71     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#72     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#73     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#74     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#75     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#76     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#77     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#78     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#79     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#80     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#81     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#82     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#83     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#84     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#85     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#86     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#87     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:183:11)
#88     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#89     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#90     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#91     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#92     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#93     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#94     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#95     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#96     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#97     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#98     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#99     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#100    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#101    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#102    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#103    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#104    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#105    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#106    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#107    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#108    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#109    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#110    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#111    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#112    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#113    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#114    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#115    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:183:11)
#116    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#117    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
#118    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#119    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#120    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#121    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#122    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:183:11)
#123    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#124    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#125    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#126    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#127    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#128    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#129    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#130    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#131    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#132    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#133    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#134    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#135    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#136    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#137    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#138    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#139    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#140    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#141    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#142    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#143    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#144    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#145    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#146    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#147    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#148    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#149    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#150    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#151    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#152    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#153    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#154    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#155    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2730:33)
#156    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:913:20)
#157    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:302:5)
#158    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
#159    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9)
#160    SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:864:7)
(elided 6 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, and dart:async-patch)

════════════════════════════════════════════════════════════════════════════════════════════════════
Reloaded 0 of 577 libraries in 371ms.

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building Navigator-[GlobalObjectKey<NavigatorState> _WidgetsAppState#a6a87](dirty, dependencies: [HeroControllerScope], state: NavigatorState#a52a8(tickers: tracking 0 tickers)):
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4042 pos 12: '_history.isNotEmpty': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was:
  MaterialApp file:///Users/timnew/Workspace/mobile-android/flutter_module/lib/screens/app/JoraApp.dart:28:12
When the exception was thrown, this was the stack:
#2      NavigatorState.build (package:flutter/src/widgets/navigator.dart:4042:12)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
#5      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#6      Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

Steps to Reproduce
This is flutter side code
class FlutterApp extends StatefulWidget {
  @override
  _FlutterAppState createState() => _FlutterAppState();
}

class _FlutterAppState extends State<FlutterApp> {
  final routeRemoteController = RouteRemoteController();
  final Map<String, WidgetBuilder> _routes = {
    "debug": (context) => DebugScreen(),
    // "profile": (context) => ProfileScreen(),
    // "feedback": (context) => FeedbackDialog(),
  };

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'FlutterModule',
      // navigatorObservers: [routeRemoteController],
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: _routes,
      initialRoute: 'debug',
    );
  }
}

class DebugScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("Debug Entry"),
        ),
        body: Builder(builder: _buildBody));
  }

  Widget _buildBody(BuildContext context) {
    return ListView(
      children: <Widget>[
        _NavigateItem(routeName: "profile"),
        _NavigateItem(routeName: "feedback"),
        _OptionItem(text: "Exit", onTap: () => Navigator.pop(context)),
      ],
    );
  }
}

class _OptionItem extends StatelessWidget {
  final VoidCallback onTap;
  final IconData icon;
  final String text;

  const _OptionItem({
    Key key,
    this.onTap,
    this.icon,
    @required this.text,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) => ListTile(
        leading: icon != null ? Icon(icon) : null,
        title: Text(text),
        onTap: onTap,
      );
}

class _NavigateItem extends StatelessWidget {
  final String routeName;
  final IconData icon;
  final String text;

  const _NavigateItem(
      {Key key, this.icon, String text, @required this.routeName})
      : this.text = text ?? routeName,
        super(key: key);

  @override
  Widget build(BuildContext context) => ListTile(
        leading: icon != null ? Icon(icon) : null,
        title: Text(text),
        onTap: () => Navigator.pushNamed(context, routeName),
      );
}

This is the android side code

object FlutterManager {
  private const val engineName = "default"
  private const val routeControlChannelName = "jora/navigation"

  private lateinit var flutterEngine: FlutterEngine

//  private val navigationControl: FlutterNavigationControl by lazy {
//    FlutterNavigationControl(
//      MethodChannel(flutterEngine.dartExecutor, routeControlChannelName, JSONMethodCodec.INSTANCE)
//    )
//  }

  fun init(context: Context) {
    flutterEngine = FlutterEngine(context)

    flutterEngine.dartExecutor.executeDartEntrypoint(
      DartExecutor.DartEntrypoint.createDefault()
    )

    FlutterEngineCache.getInstance().put(engineName, flutterEngine)
  }

  fun createFragment(routeName: String?): FlutterFragment {
//    routeName?.let {
//      navigationControl.replaceRoot(routeName)
//    }

    return FlutterFragment.withCachedEngine(engineName)
      .transparencyMode(TransparencyMode.transparent)
      .build()
  }

  fun startActivity(activity: Activity, routeName: String? = null) {
//    routeName?.let {
//      navigationControl.replaceRoot(routeName)
//    }

    activity.startActivity(
      CrossPlatformActivity
        .withCachedEngine(engineName)
        .backgroundMode(BackgroundMode.transparent)
        .build(activity.applicationContext)
    )
  }
}
//
//class FlutterNavigationControl(private val channel: MethodChannel) : MethodChannel.MethodCallHandler {
//  private val logger
//    get() = Timber.tag("FlutterNavigation")
//
//  init {
//    channel.setMethodCallHandler(this)
//  }
//
//  fun pushRoute(route: String) {
//    logger.i("Sending message to push route '$route'")
//    channel.invokeMethod("pushRoute", route)
//  }
//
//  fun popRoute() {
//    logger.i("Sending message to pop route.")
//    channel.invokeMethod("popRoute", null)
//  }
//
//  fun replaceRoot(route: String) {
//    logger.i("Sending message to replace root route: $route")
//    channel.invokeMethod("replaceRoot", route)
//  }
//
//  override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
//  }
//}

import io.flutter.embedding.android.FlutterActivity

class CrossPlatformActivity : FlutterActivity() {

  companion object {
    fun withCachedEngine(engineId: String): CachedEngineIntentBuilder =
      CachedEngineIntentBuilder(CrossPlatformActivity::class.java, engineId)
  }
}

Expected results:
When I pressed "Exit" button in flutter app, the last route is popped via Navigator.pop, the activity/fragment should be removed from the Android navigation stack, same as physical back button is pressed.
I tried to host FlutterFragment in a activity or use FlutterActivity directly, both has the renders the transparent view.
Actual results:
A transparent activity/fragment is still there, which can be dismissed by pressing physical back
Logs are attached below, expand it to see:

Logs

⋊> flutter analyze
Analyzing mobile-android...

   info • Unused import: 'package:flutter_module/screens/feedback/FeedbackDialog.dart' • flutter_module/lib/screens/app/FlutterApp.dart:5:8 • unused_import
   info • Unused import: 'package:flutter_module/screens/profile/ProfileScreen.dart' • flutter_module/lib/screens/app/FlutterApp.dart:6:8 • unused_import

2 issues found. (ran in 4.7s)

[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.5 19F101, locale en-AU)
    • Flutter version 1.22.2 at /Users/tim.wen/Workspace/flutter
    • Framework revision 84f3d28555 (3 weeks ago), 2020-10-15 16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/tim.wen/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = Users/tim.wen/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[!] Android Studio
    • Android Studio at /Applications/Android Studio 4.2 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

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

[✓] Connected device (1 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 2 categories.

I'm not 100% this is a flutter bug or there is something critical missed from the code.
As I'm actually expecting to get a callback from Flutter Engine when all the routes has been popped from the root Navigator. So I can manually update the fragment stack.
I tried to use FlutterUiDisplayListener to capture the callback from Flutter, but FlutterUiDisplayListener.onFlutterUiNoLongerDisplayed was not called on all routes are popped, but called on FlutterActivity/FlutterFragment is closed.

Seems this is the similar issue as https://github.com/flutter/flutter/issues/67011 and https://github.com/flutter/flutter/issues/69879

Hi @timnew
Can you please provide  a minimal complete reproducible code sample in a repository to better address the issue
Thank you

@TahaTesser Yes I can, here is the repo: https://github.com/timnew/flutter-issue-69956
Steps to reproduce:

Build and launch the Android app

Press the Launch Flutter Activity button, flutter app will be launched

Pressed the Exit button on flutter screen, to pop the main screen from navigator.

A funny screen show appear

Press physical back would return to Android Activity

Press Launch Flutter Activity button again, a blank screen would shown

Same bug can be reproduced with FlutterFragment too, but to make it simpler, I uses FlutterActivity here

This issue can be somehow mitigated by checking whether current route is the last route in Navigator, if yes, calling SystemNavigator.pop instead of calling Navigator.pop.
But it still have issues:

SystemNavigator.pop doesn't work for FlutterFragment, which actually finishes the hosting activity
The behaviour of pop is different from the behaviour of pressing physical back
It adds a lot of complexity on the Flutter navigation management.

So far, it is not a completely unsolvable issue, but it would be relatively complicated issue to address, if considering Flutter side might have nested navigator, and flutter app doesn't know whether the flutter is hosted in a activity or fragment.
It would be nice to have:

SystemNavigator.pop() if called rather than pop the last route from the navigator, when Navigator.pop is invoked`
SystemNavigator.pop calls a delegate on FlutterFragment, which can be registered on FlutterFragment when it is created, which can finish the host activity by default it not get overriden.
So the hosting app can decide what is the best behaviour to unmount the FlutterUI.

multiple flutter doctor -v
[✓] Flutter (Channel stable, 1.22.3, on Microsoft Windows [Version 10.0.19042.610], locale en-US)
    • Flutter version 1.22.3 at C:\Code\flutter_stable
    • Framework revision 8874f21e79 (11 days ago), 2020-10-29 14:14:35 -0700
    • Engine revision a1440ca392
    • Dart version 2.10.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Code\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[!] Android Studio (version 4.1.0)
    • Android Studio at C:\Code\android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.51.0)
    • VS Code at C:\Users\taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.16.0

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

[✓] Flutter (Channel master, 1.24.0-8.0.pre.149, on Microsoft Windows [Version 10.0.19042.610], locale en-US)
    • Flutter version 1.24.0-8.0.pre.149 at C:\Code\flutter_master
    • Framework revision 8e7748e74c (7 hours ago), 2020-11-08 20:32:04 -0800
    • Engine revision 0f7cdca65f
    • Dart version 2.12.0 (build 2.12.0-27.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Code\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.51.0)
    • VS Code at C:\Users\taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.16.0

[✓] Connected device (4 available)
    • Windows (desktop) • windows    • windows-x64    • Microsoft Windows [Version 10.0.19042.610]
    • Web Server (web)  • web-server • web-javascript • Flutter Tools
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 86.0.4240.183
    • Edge (web)        • edge       • web-javascript • Microsoft Edge 86.0.622.63

• No issues found!

This issue is reproducible on the latest Flutter channels but the current result has been changed a little bit:
On Reproduction Steps at https://github.com/flutter/flutter/issues/69956#issuecomment-723354500, it will show black screen instead of a funny screen as above. And then every time Launch Flutter Activity again, the black screen still persists. There is no exception log from the console.
Update the labels for further investigation.

Demo
https://user-images.githubusercontent.com/104349824/207857725-dedb515c-fb48-43cd-8e8f-93bb44cee668.mp4

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.0 22A380 darwin-x64, locale en-VN)
    • Flutter version 3.3.9 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (31 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

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

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

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

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

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 12 (API 31)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 13.0 22A380 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 107.0.5304.110

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

• No issues found!

[!] Flutter (Channel master, 3.7.0-9.0.pre.11, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
    • Flutter version 3.7.0-9.0.pre.11 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dbc9306380 (4 hours ago), 2022-12-14 13:53:20 -0800
    • Engine revision 0a6a4a58f4
    • Dart version 3.0.0 (build 3.0.0-21.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

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

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

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

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

[✓] Connected device (4 available)
    • SM T225 (mobile) • R9JT3004VRJ                              • android-arm64  • Android 12 (API 31)
    • iPhone (mobile)  • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.7.2 19H218
    • macOS (desktop)  • macos                                    • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
    • Chrome (web)     • chrome                                   • web-javascript • Google Chrome 108.0.5359.98
    ! Error: iPhone is busy: Fetching debug symbols for iPhone. Xcode will continue when iPhone is finished. (code -10)

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

! Doctor found issues in 1 category.


Implement Passport Middleware

User Profiles Subtask
Add Passport to the user profile component for enhanced profile information.
We need to create the ability to link social profiles for users.

What is "Passport Middleware"?

@sethbergman ^?

Guess I never saw this. Passport is Express middleware. It's for login / oAuth flow. It is a free solution, unlike Auth0.
I will be working on this next, as I am finishing up with the style guide. I'm doing i


[SPARK-11997][SQL] NPE when save a DataFrame as parquet and partitioned by long column

Check for partition column null-ability while building the partition spec.

Can one of the admins verify this patch?

@davies Can you please let me know your comments.

@dilipbiswal , yours is the first PR after PR #10000 !

ok to test

Test build #46777 has started for PR 10001 at commit af508de.

@dilipbiswal Do you know why it is broken?

@yhuai Hi Yin, in the discoverPartitions method, we are trying to create the partition spec and are trying to cast a partition value to the corresponding user specified schema's column type. In case of null partition value the following code raises a null poiner exception in row.getString(i).
Cast(Literal.create(row.getString(i), StringType),              userProvidedSchema.fields(i).dataType).eval()
in this fix i am trying to check for null first and create a null literal of string type as opposed to calling row.getString().  Hope it is okay .. Please let me know.

Test build #46777 has finished for PR 10001 at commit af508de.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/46777/
Test PASSed.

@dilipbiswal I guess I did not ask my question clearly. I meant why 1.5 is good but 1.6 is broken. There must be a change that exposed this issue.

@yhuai Yeah.. this function discoverPartitions() was changed recently (10/22/2015) as part of spark-9735.

Test build #46791 has started for PR 10001 at commit 4de7697.

LGTM

Test build #46791 has finished for PR 10001 at commit 4de7697.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/46791/
Test PASSed.


OpenAI API errors get catched silently

Hi @justinmahar,
first, thanks for this very nice library! It has saved me some valuable time! 🚀
I have an issue with the exception handling which we could optimize maybe:
Sometimes OpenAI responds with a JSON like this:
{
   "message":"That model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID a937df050d4a28d199c07201da887214 in your message.)",
   "type":"server_error",
   "param":null,
   "code":null
}

In this case the error gets catched silently in this code block:
https://github.com/justinmahar/openai-ext/blob/8364d8b1f5e98d095eabb7223db17989df260f2f/src/OpenAIExt.ts#L194-L197
Unfortunately theres no posibility for overlying code to identify this error and inform the user or retry the request.
onContent will be called with
{
   "content":"",
   "isFinal":true
}

in this case.
I would instead recomment to throw such an error.
Is that something you we could change? If it is helpful, I could also work on a fix and submit a PR 😊

Hey @Anton-Plagemann, great catch here! (pun intended)
So I've added a throw clause to the catch block and I'm now also throwing an error whenever the parsed blob doesn't contain completion choices (which likely indicates there was an error).
Give it a try with the newest version:
npm i openai-ext@latest

Hope that solves your issue, keep me posted!

Hi @justinmahar,
Thank you so much for your quick response and for implementing the changes! I really appreciate it. I have updated the library in my application and will test it out. I'll let you know as soon as I have any results (could take some time to wait for the next error 😄).
Thanks again for your help!

Hi @justinmahar,
I now can confirm it works as expected and all errors are passed through 🥳
Surprisingly theres also sometimes a Unexpected end of JSON input error, but it seems to be tolerable (maybe 1 or 2 tokens get lost but thats ok 😊).
Thanks again for the update!

Woohoo!! 🍻


fix(Tag): account for forwardRef objects

This or bump prop-types to a min version of 15.7.0 where they introduce .elementType

Coverage remained the same at 97.414% when pulling 863b7e4952bcbd7e7403a4d801d6e230506a8aa3 on fix/forward-ref-tags into 985ddb257c9e3fb05c660dee7c34ed4692399db5 on master.