Could not remove item Recycle View with RecyclerViewMaterialAdapter

Hello
I am facing the issue when using this lib
I make a Recycle View with items
and then when user click to image in item, this item will be removed
But when I use this lib, I could not remove item.
In my case, I want to remove an item inside of my Adapter (not in fragment)
Can you help me?

Can't you access your adapter functions? I did a PR in this lib solving this issue but I guess florent didn't change lib version yet... Well, if this is your problem you can implements in your project this logic https://github.com/florent37/MaterialViewPager/issues/230 .


Version 6.1.1 does not work with python 3.5

File "/home/werty/.virtualenvs/myshibboleth3/lib/python3.5/site-packages/django_select2/conf.py", line 59
JS = f'//cdnjs.cloudflare.com/ajax/libs/select2/{LIB_VERSION}/js/select2.min.js'
^
SyntaxError: invalid syntax

We know, we don't support old Python versions. EoL for 3.5 is next year. Please see: https://github.com/applegrew/django-select2/commit/1954bf57fafee0f27a7b444b1a468331ac2af9b3
Again if you would provide a patch I am willing to merge it. But I won't invest my own time to support old python versions.

Possible you can add some notes to docs or requirements about what version of django-select2 supports what version of python

Sorry, yes, 2020, see https://devguide.python.org/#status-of-python-branches
Anyhow. I don't mind anyone patching it, I just won't do it myself, since I mostly use 3.7 or 3.6.


[BUG] Compile options broken on GCC 9

Description / Steps to reproduce the issue
Since commit 394a967 I can no longer compile Nuttx with make. The compile error appears to be caused by #13720 . The compile parameter that is causing the error, min-pagesize, was introduced in GCC version 12 (as far as I can tell).
Steps to reproduce
I have both nuttx and nuttx-apps (up to date with master) in a parent directory, then in nuttx directory:
git checkout 394a967
make distclean
./tools/configure.sh -l nucleo-g474re:nsh
make

Produces the error. I have checked, the error does not occur with the previous commit (f2bdfa4).
Error
Create version.h
LN: platform/board to /home/username/nuttxspace/apps/platform/dummy
Register: nsh
Register: sh
CC:  clock/clock.c cc1: error: invalid --param name 'min-pagesize'
make[1]: *** [Makefile:64: clock.o] Error 1
make: *** [tools/LibTargets.mk:65: sched/libsched.a] Error 2

System Info

GCC version: 9.4.0
arm-none-eabi-gcc version: 9.2.1
Linux running in WSL2

On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Ubuntu 20.04.6 LTS
NuttX Version
master
Issue Architecture
[Arch: arm]
Issue Area
[Area: Build System]
Verification

[X] I have verified before submitting the report.

RISC-V Build with GCC 10.2 is also failing: https://github.com/lupyuen/nuttx-ox64/actions/runs/11135472115/job/30945551434
$ riscv64-unknown-elf-gcc -v
gcc version 10.2.0 (SiFive GCC-Metal 10.2.0-2020.12.8)

$ tools/configure.sh ox64:nsh
$ make
Assembler messages:
Error: cannot find default versions of the ISA extension `zicsr'
Error: cannot find default versions of the ISA extension `zifencei'
/tmp/cchLCHdn.s:3: Error: cannot find default versions of the ISA extension `zicsr'
/tmp/cchLCHdn.s:3: Error: cannot find default versions of the ISA extension `zifencei'
make[1]: *** [Makefile:72: PROXY__assert.o] Error 1
make: *** [tools/LibTargets.mk:238: syscall/libproxies.a] Error 2
CC:  proxies/PROXY__assert.c

But that's based on the older SiFive RISC-V Toolchain. We could probably ask devs to switch from SiFive Toolchain to the newer xPack RISC-V Toolchain (GCC 14.2), which compiles OK.

RISC-V Build with GCC 10.2 is also failing: https://github.com/lupyuen/nuttx-ox64/actions/runs/11135472115/job/30945551434
$ riscv64-unknown-elf-gcc -v
gcc version 10.2.0 (SiFive GCC-Metal 10.2.0-2020.12.8)

$ tools/configure.sh ox64:nsh
$ make
Assembler messages:
Error: cannot find default versions of the ISA extension `zicsr'
Error: cannot find default versions of the ISA extension `zifencei'
/tmp/cchLCHdn.s:3: Error: cannot find default versions of the ISA extension `zicsr'
/tmp/cchLCHdn.s:3: Error: cannot find default versions of the ISA extension `zifencei'
make[1]: *** [Makefile:72: PROXY__assert.o] Error 1
make: *** [tools/LibTargets.mk:238: syscall/libproxies.a] Error 2
CC:  proxies/PROXY__assert.c

But that's based on the older SiFive RISC-V Toolchain. We could probably ask devs to switch from SiFive Toolchain to the newer xPack RISC-V Toolchain (GCC 14.2), which compiles OK for Ox64.
Update: BL602 won't boot when we switch SiFive Toolchain to xPack Toolchain. We might need to tweak the BL602 Makefiles to fix this: https://github.com/lupyuen/nuttx-bl602/releases/tag/upstream-2024-10-02
EXCEPTION: Illegal instruction. MCAUSE: 00000002, EPC: 2300f380, MTVAL: 00000000
PANIC!!! Exception = 00000002
Current Version: NuttX  12.6.0 b2e69b86ad Oct  2 2024 01:44:08 risc-v
Assertion failed panic: at file: :0 task: Idle_Task process: Kernel 0x230024ea
EPC: 2300f380

I thought I commented on this already..
I see the same issue with my toolchain:

riscv64-unknown-elf-gcc -v
Using built-in specs.
COLLECT_GCC=riscv64-unknown-elf-gcc
COLLECT_LTO_WRAPPER=/home/ville/wpc_toolchain/rv64_gcc/bin/../libexec/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper
Target: riscv64-unknown-elf
Configured with: /scratch/jenkins/workspace/tpp-freedom-tools/tpp03--build-binary-packages--parameterized/obj/x86_64-linux-ubuntu14/build/riscv64-unknown-elf-gcc/riscv-gcc/configure --target=riscv64-unknown-elf --host=x86_64-linux-gnu --prefix=/scratch/jenkins/workspace/tpp-freedom-tools/tpp03--build-binary-packages--parameterized/obj/x86_64-linux-ubuntu14/install/riscv64-unknown-elf-gcc-10.2.0-2020.12.8-x86_64-linux-ubuntu14 --with-pkgversion='SiFive GCC-Metal 10.2.0-2020.12.8' --with-bugurl=https://github.com/sifive/freedom-tools/issues --disable-shared --disable-threads --enable-languages=c,c++ --enable-tls --with-newlib --with-sysroot=/scratch/jenkins/workspace/tpp-freedom-tools/tpp03--build-binary-packages--parameterized/obj/x86_64-linux-ubuntu14/install/riscv64-unknown-elf-gcc-10.2.0-2020.12.8-x86_64-linux-ubuntu14/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=../riscv-gcc --with-system-zlib --enable-checking=yes --enable-multilib --with-abi=lp64d --with-arch=rv64imafdc CFLAGS=-O2 CXXFLAGS=-O2 'CFLAGS_FOR_TARGET=-Os -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-Os -mcmodel=medany'
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (SiFive GCC-Metal 10.2.0-2020.12.8)

@cuiziwei1 @xiaoxiang781216 for awareness!

Sorry, we are in the national holiday until next Monday, the response will be a little bit later.

Ubuntu 22.04 stock RiscV toolchain (in APT package gcc-riscv64-unknown-elf) also breaks:
$ dpkg -S $(which riscv64-unknown-elf-gcc)
gcc-riscv64-unknown-elf: /usr/bin/riscv64-unknown-elf-gcc
$ riscv64-unknown-elf-gcc -v 2>&1 | fgrep -v Config
Using built-in specs.
COLLECT_GCC=riscv64-unknown-elf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper
Target: riscv64-unknown-elf
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.2.0 ()

what's error message?

What's error message?

For rv-virt:nsh with Ubuntu 22.04 gcc-riscv64-unknown-elf toolchain:
$ ninja
[1/1256] Building C object arch/CMakeF...risc-v/src/qemu-rv/qemu_rv_start.c.obj
FAILED: arch/CMakeFiles/arch.dir/risc-v/src/qemu-rv/qemu_rv_start.c.obj
/usr/bin/riscv64-unknown-elf-gcc -D__KERNEL__ -D__NuttX__ -I/home/yf/Projects/Nuttx/nuttx/arch/risc-v/src/qemu-rv -I/home/yf/Projects/Nuttx/nuttx/arch/risc-v/src/common -I/home/yf/Projects/Nuttx/nuttx/sched -isystem /home/yf/Projects/Nuttx/nuttx/include -isystem /home/yf/tmp/rv64/aaa/include -Os -fno-strict-aliasing -fomit-frame-pointer -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas -Wstrict-prototypes -mcmodel=medany -ffunction-sections -fdata-sections -g -march=rv64imafdc_zicsr_zifencei -mabi=lp64d -DNDEBUG -fmacro-prefix-map=/home/yf/Projects/Nuttx/nuttx= -fmacro-prefix-map=/home/yf/Projects/Nuttx/apps= -fmacro-prefix-map=/home/yf/Projects/Nuttx/nuttx/boards/risc-v/qemu-rv/rv-virt= -fmacro-prefix-map=/home/yf/Projects/Nuttx/nuttx/arch/risc-v/src/qemu-rv= -MD -MT arch/CMakeFiles/arch.dir/risc-v/src/qemu-rv/qemu_rv_start.c.obj -MF arch/CMakeFiles/arch.dir/risc-v/src/qemu-rv/qemu_rv_start.c.obj.d -o arch/CMakeFiles/arch.dir/risc-v/src/qemu-rv/qemu_rv_start.c.obj -c /home/yf/Projects/Nuttx/nuttx/arch/risc-v/src/qemu-rv/qemu_rv_start.c
cc1: error: '-march=rv64imafdc_zicsr_zifencei': unsupported ISA subset 'z'
cc1: error: requested ABI requires '-march' to subsume the 'D' extension
cc1: error: ABI requires '-march=rv64'

@cuiziweizw look at this problem.

Sorry for the above problem. I have submitted a new patch https://github.com/apache/nuttx/pull/14130  to fix this problem.

Any changes to the compiler need to take into account developers using different versions of the compiler. It is very strange why PR https://github.com/apache/nuttx/pull/13720 was merged. The impact of deleting it is to continuously apply meaningless patches. Please review the relevant commits carefully. @xiaoxiang781216


Assignment

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I am completing my shell assignment
What did you learn from the changes you have made?
I learn how to create directories, files under the bash also how to remove them etc.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
For the codes I have also added alternative versions of it
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Yes, creating a new branch and committing and pull request
How were these changes tested?
Yes I have tested them on bash
A reference to a related issue in your repository (if applicable)
Checklist

[ X] I can confirm that my changes are working as intended

Hi,
Thank you for your response. I apologize for the delay, as I was in a
different time zone when I spoke with Jennie about catching up in
mid-September. I just wanted to make sure that Jennie is aware of this
delay. Please confirm that my assignment has been accepted.
Let me know if there is anything else I can do.
Thank you
On Fri, Sep 13, 2024 at 2:13 PM Emma @.***> wrote:

@.**** approved this pull request.
very late.
—
Reply to this email directly, view it on GitHub
https://github.com/zekiyerdem/shell/pull/1#pullrequestreview-2303772574,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BFMUQKJACNRAX6BQCZE7F23ZWMTNJAVCNFSM6AAAAABOAHP3W2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMBTG43TENJXGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


⚠ Bofrost.lu has degraded performance

In 3a64114, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1107 ms

Resolved: Bofrost.lu performance has improved in 99b1aac after 6 minutes.


ERROR: InvalidTemplate - Deployment template validation failed: 'The template resource '_artifactsLocation'

Hello,
Below is my github actions deployment, but still getting an error. Anybody can help me? Thank you!
deploy:
  name: Deploy
  runs-on: ubuntu-latest
  steps:
    - name: Checkout
      uses: actions/checkout@v3

    - name: Login to Azure Cloud
      uses: azure/login@v1
      with:
        creds: ${{ secrets.AZURE_CREDENTIALS }}

    - name: Run ARM deploy
      uses: azure/arm-deploy@v1
      with:
        resourceGroupName: group1
        template: azure/templates/armdeploy.json
        parameters: azure/templates/armdeploy.parameters.json
        additionalArguments: "--what-if --rollback-on-error --what-if-exclude-change-types Create Ignore"

armdeploy.json
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "<IP_ADDRESS>",
  "parameters": {
      "_artifactsLocation": {
          "type": "string",
          "defaultValue": "[deployment().properties.templateLink.uri]",
          "metadata": {
              "description": "The base URI where artifacts required by this template are located, including a trailing '/'"
          }
      },
      "_artifactsLocationSasToken": {
          "type": "securestring",
          "defaultValue": "",
          "metadata": {
              "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured."
          }
      },

error
ERROR: InvalidTemplate - Deployment template validation failed: 'The template resource '_artifactsLocation' at line '1' and column '182' is not valid: The language expression property 'templateLink' doesn't exist, available properties are 'template, templateHash, parameters, mode, provisioningState'.. Please see https://aka.ms/arm-template-expressions for usage details.'.

Hi @rx007 this stack overflow issue looks similar to what you are facing [Link](https://stackoverflow.com/questions/57195408/use-deployment-properties-templatelink-uri-on-local-deployments-
through-arm).
This looks like you cant use templateLink.uri for local templates.

As the official article said:
The templateLink property is only returned when linking to a remote template with a URL. If you're using a local template, that property isn't available.

Will it be possible to see if second answer works for you?

Hi @rx007 I am closing this issue due to inactivity but feel free to reopen if you are still facing this issue.


second Number

Hi,
i need a Token for a sekond Phone.
i send "signup"
the answer is
To use WHIN, you must first sign up to get your service token by sending the word signup.

I have 2 phones with 2 different numbers.
on the first phone I sent Signup and immediately got a token.
I did the same thing with the 2nd phone, but here I keep getting the message that I should first send the word signup
Can you help me.

This must be a difference in the WhatsApp version of the app installed on each. Let's do this:

first: Make sure you update the version of the app.
second: send a signup msg and check if you get a token. If you don't get it:
take note of the date / hour you sent it and post it here, together with the last 5 numbers of the phone that is not working.

We will have a look and see if there is any problem with the metadata not parsing correctly.
Your problem is easy to get solved.

Hello, thanks for the help
Whats app is current version <IP_ADDRESS>
I tried again today.
Unfortunately again no token
Attempt was on 08/27/2022 at 12:08 German time
The last 5 digits of the phone number are "94207"
Many Thanks

it's weird, I can see your signup request on the logs,... but you're right as the whin token was not created.
I don't see any problem on your side, so the root cause is very likely on our end.
While we investigate, and as a workaround, I would recommend you try to get the token using whatsapp web for that number (not the app on the phone). Once you get the token, you should not have any problem sending/receiving.
I will leave this issue open till we find out the reason.

Hi,
I've tried both WhatsApp versions.
By phone and by PC
I'll try again today when I'm home.
Thank you for your support

Hi,
I tried again today at 19:06 German time.
Once via WhatsApp Web and once via mobile phone.
Unfortunately, both didn't work out again.

I think I found the problem.
For some weird reason, the msgs you're sending from that particular number have a different structure:
{"key":{"remoteJid":"4XXXX4207@s.whatsapp.net","fromMe":false,"id":"3EB0C3XXXXXXXF370"},"messageTimestamp":1661792786,"pushName":"NXXXXe","message":{"extendedTextMessage":{"text":"signup","contextInfo":{"expiration":86400,"ephemeralSettingTimestamp":"1660654363","disappearingMode":{"initiator":"INITIATED_BY_ME"}}},"messageContextInfo":{"deviceListMetadata":{"senderKeyHash":"QHcXXXXXXXXeJbg==","senderTimestamp":"1661025261","recipientKeyHash":"BdXXXXXXXO6+tg==","recipientTimestamp":"1661762907"},"deviceListMetadataVersion":2}}}
@alsak0de, can you please have a look at this? the "signup" text comes inside message.extendedTestMessage as "text":"signup" instead of how they usually come in. I guess we should have to adjust the parsing.
@Gernair, just for our own info: are you sure you're using a regular whatsapp client?. We have thousands of people using whin, and you're the only one that is sending whatsapps with this msg structure. Not a problem for us, just asking...

Hi,
I have an Apple iPhone and it worked perfectly the first time.
My wife has a Samsung Galaxy cell phone and downloaded Whats App from the Play Store.
I don't know how else to get WhatsApp.
My wife also has the same WhatsApp version as me.
Should I uninstall and reinstall WhatsApp?
Or what can I do to help you ?

you don't need to do anything else, do not worry it's okay. There's something we need to change on the backend so that the signup is working for the second number.
The weird thing is that the msg structure is different even if you use whatsapp web (not related to a given phone vendor)... But again, you're good.
We will close the issue when it's done, first we need to adjust slightly the code.

same as #41 and #42

see #42


HBASE-26964 Fix java import in admin.rb

The java_import for MobCompactPartitionPolicy in admin.rb is missed, which cause an error message for creating table.
hbase:006:0> create 't2', {NAME => 'f', IS_MOB => true, MOB_THRESHOLD => 1000000, MOB_COMPACT_PARTITION_POLICY => 'weekly'}
ERROR: uninitialized constant Hbase::Admin::MobCompactPartitionPolicy
Did you mean?  Hbase::Admin::MOB_COMPACT_PARTITION_POLICY
For usage try 'help "create"'
Took 0.6897 seconds
hbase:007:0>

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
3m 42s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+1 :green_heart:
mvninstall
2m 33s
master passed

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
2m  1s
the patch passed

+1 :green_heart:
rubocop
0m  5s
There were no new rubocop issues.

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.


How to change background color of BottomNavigationBarItem(child) when user pressed? Not change all of navbar color

I want every menu that I click will change color for each menu that is clicked, not for the entire color background of the nav bar.
Like the example below:
Here
When a user clicks on the "Near Me" menu then the box on the menu will change color. But for the background/color box on the other menu, it is still black. Similarly, clicking on the other menus will change color to red and will not change the color of the menu that is not clicked (still black)
This my Code:
int _page = 0;
final List<Widget> _children = [
    MainPage(),
    MainPage(),
    MainPage(),
    MainPage(),
    MainPage(),
  ];

...

bottomNavigationBar: Theme(
            data: Theme.of(context).copyWith(
              canvasColor: Color(0xFF3B3D58),
              primaryColor: Colors.white,
              textTheme: Theme.of(context).textTheme.copyWith(
                caption: TextStyle(color: Colors.grey)
              )
            ),
            child: BottomNavigationBar(
              type: BottomNavigationBarType.fixed,
              currentIndex: _page,
              items: [
                BottomNavigationBarItem(
                  icon: Icon(Icons.home),
                  title: Text('Home'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.add_circle),
                  title: Text('Add Place'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.near_me),
                  title: Text('Near Me'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.favorite),
                  title: Text('Favorite'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.more_horiz),
                  title: Text('More'),
                ),
              ],
              onTap: onTabTapped,
            ),
          ),

And this is my result of my code:
Here

 BottomNavigationBarItem(               backgroundColor: Colors.red,)
I tried this but even it isn't working

@bhargav6744 Yes, I already try it but it isn't working

doesn't work for me too

Hi team use below property with for background color
backgroundColor: Colors.green,
type: BottomNavigationBarType.fixed,

thanks is working for me

bottomNavigationBar: Theme(
data: Theme.of(context).copyWith(
canvasColor: appbarColor,
primaryColor: appColor,
textTheme: Theme.of(context)
.textTheme
.copyWith(caption: TextStyle(color: Colors.black)),
),
child: BottomNavigationBar(
currentIndex: _curentIndex,
onTap: onTapp,
items: [
BottomNavigationBarItem(
icon: Icon(
Icons.home,
),
title: Text("Home"),
),
BottomNavigationBarItem(
icon: Icon(
Icons.history,
),
title: Text("History"),
),
BottomNavigationBarItem(
icon: Icon(
Icons.flight,
),
title: Text("Cows"),
),
],
),
),

Thank you, that's worked!

For now, i just replaced the actual implementation for the one gived on pull request https://github.com/flutter/flutter/pull/53261 :/
For example, this is the implementation for Material package
https://raw.githubusercontent.com/digitalkaoz/flutter/fe7bb851d5de69db97dcdc297cc779c771804a57/packages/flutter/lib/src/material/bottom_navigation_bar.dart

I believe you just use
selectedItemColor and
unselectedItemColor in the BottomNavigationBar() widget contents. These will allow you to change the color for each Bottom Navigation Bar item. Example
bottomNavigationBar: BottomNavigationBar(             backgroundColor: Colors.blueAccent,             selectedItemColor: Colors.white,             unselectedItemColor: Colors.black,             items: [               BottomNavigationBarItem(                 icon: Icon(                   Icons.category,                 ),                 label: "Test",               ),             ],           ),

I would like to work on the issue, we also have a requirement to show gradient when BottomNavigationBarItem is selected. Is it something we are also looking to added?
cc:\ @shihaohong @HansMuller

@AyushBherwani1998 By gradient, did you mean to have the color value lerp between selected/unselected states?

No, actually instead of having a solid background, we have a requirement for the gradient.  For reference, I'm attaching a image below.

Hey, @shihaohong I did check out the implementation, my first thoughts are to change the backgroundColor property from Color to MaterialStateProperty<Color>. This way we will be handling the MaterialState.selected and default color for the unselected state.
We can add a new property of Color? background to class _BottomNavigatonTile and while adding the _BottomNavigationTile we can pass background color after resolving states. I did some quick changes, and it works fine.

Since, I'm adding the property, should we also deprecated selectedItemColor and unselectedItemColor and add MaterialStateProperty<Color> itemColor. The same suggestion goes for other similar properties too.

@shihaohong just a reminder, this will be breaking change if we just change the background from Color to MaterialStateProperty<Color>. Can we introduce a new property and deprecate the backgroundColor?

@AyushBherwani1998 I don't think it has to be a breaking change (or maybe not yet) -- We can have those properties coexist, and if the passed in color is a MaterialStateProperty, to simply ignore selectedItemColor and unselectedItemColor. We would document this behavior as well. Would it be possible to do this with backgroundColor and not create a new property?
This was what I was hoping to do with ToggleButtons if I get back to it: https://github.com/flutter/flutter/issues/36861.

I want every menu that I click will change color for each menu that is clicked, not for the entire color background of the nav bar.
Like the example below:
Here
When a user clicks on the "Near Me" menu then the box on the menu will change color. But for the background/color box on the other menu, it is still black. Similarly, clicking on the other menus will change color to red and will not change the color of the menu that is not clicked (still black)
This my Code:
int _page = 0;
final List<Widget> _children = [
    MainPage(),
    MainPage(),
    MainPage(),
    MainPage(),
    MainPage(),
  ];

...

bottomNavigationBar: Theme(
            data: Theme.of(context).copyWith(
              canvasColor: Color(0xFF3B3D58),
              primaryColor: Colors.white,
              textTheme: Theme.of(context).textTheme.copyWith(
                caption: TextStyle(color: Colors.grey)
              )
            ),
            child: BottomNavigationBar(
              type: BottomNavigationBarType.fixed,
              currentIndex: _page,
              items: [
                BottomNavigationBarItem(
                  icon: Icon(Icons.home),
                  title: Text('Home'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.add_circle),
                  title: Text('Add Place'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.near_me),
                  title: Text('Near Me'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.favorite),
                  title: Text('Favorite'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.more_horiz),
                  title: Text('More'),
                ),
              ],
              onTap: onTabTapped,
            ),
          ),

And this is my result of my code:
Here

where is your ontapped function

Any updates on this? Cannot believe it is pending for so long... :(

I found this workaround:
https://dartpad.dev/?id=60405c72383f2114decc8486b427e03e&null_safety=true

Any updates on this? Cannot believe it is pending for so long... :(

Yes it's done thanks for replying

@adityaguptagkp30

Any updates on this? Cannot believe it is pending for so long... :(

Yes it's done thanks for replying

It's done but not released yet?

Has there been any permanent, released fix for this?

Has there been any permanent, released fix for this?

you know how to fix it?

When BottomNavigationBar have BottomNavigationBarType.shifting the background color use if the BottomNavigationBarItem's background color. When BottomNavigationBar have  BottomNavigationBarType.shifting the BottomNavigationBar's background color is used.

I found this workaround: Try here: https://dartpad.dev/?id=60405c72383f2114decc8486b427e03e&null_safety=true
code here:
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

/// This is the main application widget.
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: _title,
      home: MyStatefulWidget(),
    );
  }
}

/// This is the stateful widget that the main application instantiates.
class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({Key? key}) : super(key: key);

  @override
  State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}

/// This is the private State class that goes with MyStatefulWidget.
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  int _selectedIndex = 0;
  static const TextStyle optionStyle =
      TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
  static const List<Widget> _widgetOptions = <Widget>[
    Text(
      'Index 0: Home',
      style: optionStyle,
    ),
    Text(
      'Index 1: Business',
      style: optionStyle,
    ),
    Text(
      'Index 2: School',
      style: optionStyle,
    ),
  ];

  void _onItemTapped(int index) {
    setState(() {
      _selectedIndex = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('BottomNavigationBar Sample'),
      ),
      body: Center(
        child: _widgetOptions.elementAt(_selectedIndex),
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: <BottomNavigationBarItem>[
          _bottomNavigationBarItem(Icons.home, 'Home'),
          _bottomNavigationBarItem(Icons.business, 'Home'),
          _bottomNavigationBarItem(Icons.school, 'Home'),
        ],
        currentIndex: _selectedIndex,
        selectedItemColor: Colors.amber[800],
        elevation: 0,
        onTap: _onItemTapped,
      ),
    );
  }

  BottomNavigationBarItem _bottomNavigationBarItem(
      IconData icon, String label) {
    return BottomNavigationBarItem(
      activeIcon: _navItemIcon(icon, label, Colors.red, Colors.white),
      icon: _navItemIcon(icon, label, Color(0xff3b3c58), Colors.grey),
      title: Padding(padding: EdgeInsets.all(0)),
    );
  }

  Row _navItemIcon(IconData icon, String label, Color? backgrondColor,
      Color? foregroundColor) {
    return Row(
      children: [
        Expanded(
          child: Container(
            color: backgrondColor,
            child: Padding(
              padding: const EdgeInsets.all(12.0),
              child: Column(
                children: [
                  Icon(
                    icon,
                    color: foregroundColor,
                  ),
                  Text(
                    label,
                    style: TextStyle(color: foregroundColor),
                  )
                ],
              ),
            ),
          ),
        ),
      ],
    );
  }
}

Seems promising. But not work for now, as title widget was removed, and label string was added, and required :(


Security vulnerability in browserify-sign

The 4.0.0 version of browserify-sign depends on a version elliptic that has a vulnerability. You should update it too 4.2.1.

There is another vulnerability here: https://www.npmjs.com/advisories/1547 (fixed in 6.5.3)

Can we move this forward? It blocks me in an enterprise env, where snyk spots this issue.

Can we move this forward? It blocks me in an enterprise env, where snyk spots this issue.

delete your package-lock or yarn-lock and reinstall, this project calls for ^4.0.0 which means >= 4.0.0 && <5.0.0 so it should use the latest version of browserify-sign

delete your package-lock or yarn-lock and reinstall, this project calls for ^4.0.0 which means >= 4.0.0 && <5.0.0 so it should use the latest version of browserify-sign

Thanks, indeed it solved the problem. (I guess this issue can be closed then.)

Thanks, indeed it solved the problem. (I guess this issue can be closed then.)


OKE : for Flex compute shapes, no possibility to specify the OCPU and RAM

In the properties, when selecting a flex compute shape, it is not possible to indicate the OCPU and RAM.
When creating the OKE with the generated stack (export), the node pool is not created.

Added in 0.46.0 Release


Update to node 10 in .travis.yml

Coverage remained the same at 98.276% when pulling 4d3f483e7aab5103b6550cad71338250b8939cf3 on greenkeeper/update-to-node-10 into 8386b2b7d9b0c57d6aeb95f43e6ece8b44bfe42b on master.


Wyze v3 on UCTRONICS adapter connection issues

I have a couple of wyze v3 with thingino. I am using the UCTRONICs poe adapter for power and data.
They are all connected to a poe switch with a budget of 64w. There is no usb OTG cables in between. If they are all started at the same time, they work for roughly 4 to 5 hours then they start losing connection.
I can’t figure out why they would work for hours then start dropping off network.
The poe adapter still shows active on the router
How do I troubleshoot this issue please?
I would like to know what log to read right before the camera lost connection if possible.

there are three major loggers in thingino accessible via dmesg, logread, logcat

Make sure your POE switch actually puts out 64w in the budget... I've had some generic switches that can not sustain the claimed power output for long.

Thank you both. The switch I have is tp-link LS108GP
It's a decent unmanaged poe switch.
I am leaning towards giving up on the poe option altogether and just using wifi. Picture Quality gonna be reduced but it's better than nothing.
With the adapters, there is too many points of failure and since I am planing on setting these v3s through the attic, I rather have something that just works.
Thanks guys for your suggestions.

moving this to discussions for visibility


Is this repo dead?

There are hundreds of open issues and PRs, many of which have been around for months and even years now.
Pods are outdated. "YogaKit" on CocoaPods is version 1.18.1 which is missing in this repo, while version v1.19.0 was released more than a year ago and is still unavailable. Ok the release notes tell "Release for Maven Central.", which suggests it's irrelevant for iOS, but what is version 1.18.1 then? And the "yoga" pod is 1.14.0, clearly far behind the main pod.
Speaking of iOS. There are also a few fundamental problems, like not working properly with iOS transforms, or that in order for a child to be laid out by a yoga-enabled parent, you need to enable all the Yoga machinery for the child as well. That makes it particularly difficult to use with, say, UIScrollView.

My question is, is this project considered for further development, and should I bother opening new issues, or creating new PRs?

AFAIK react-native also uses yoga as their "backend". Supposedly the repo shouldn't be dead, but who knows...

The last kind of official statement I know of are the following tweets by @TheSavior . So sad it is, I guess the repo will not get the attention it deserves in the near future, that's why I stopped submitting PRs years ago.

My fork still alive: https://github.com/cntrump/yoga
I added some little improves:

float -> double
allow negative padding
fix some crash issues in YogaKit

No offense anyone, but I think this repo is maintained pretty badly for a library that is used in some of the most important apps around the world.
Also I wonder why they added static position and shifted all other positions in 1.19.0, basically breaking backward compatibility with previous versions.

I'm going to be spending some time trying to get this repo into a cleaner state. If there are any issues or PRs folks feel passionate about, please let me know in this thread.

Nick, I'd really like to see CSS grid support. The lack of grid makes it difficult to build tables. https://github.com/facebook/yoga/issues/867

@AndrewAPrice Yoga is a flexbox implementation, CSS grid is entirely separate concept, wouldn't it be basically a brand new library?

@brianguertin you could argue that. Since on the web you can embed grids and flexboxes within each other and many of the attributes are shared in name and behavior, it would be nice if there were a layouting engine that could handle them both in a generic way.

One thing I would like to see added is support for overflow alignment keywords, safe / unsafe.
https://w3c.github.io/csswg-drafts/css-align/#overflow-values

@QOAL I was able to shim safe support in my use case, but it won't work for everyone:
Whenever I'm assigning "justify-content" to a node, I first check the sum of the main axis size of all the children.
If the sum is greater than the flexbox's size, I replace justify-content with "start". Otherwise, I apply the configured justify-content as intended. This is what the "safe" keyword does.
This only works because in my use case because I evaluate each node of my UI tree independently; so I always know the actual size of the flexbox and the desired size of the children.
But it would be neater if Yoga supported it :)

For my use case I need Yoga in a Kotlin multiplatform codebase. This means ideally using it in commonMain sources, which are shared across platforms (Android, iOS, Web, etc.).
I ran into some challenges trying to use Yoga as-is:

I had to individually wrap JS, Android, and iOS binaries with a common Kotlin API, so I could call it from common source set

I could not figure out how to get it working for running unit tests on my laptop, as there is no JVM build for OSX available.

So.... I ended up converting Yoga entirely to pure Kotlin (no C++ or JNI remaining). Based on somebody else's previous conversion to pure Java.
Amazingly, all the unit tests still pass, and I now have a simple Kotlin library that can be dropped into any Kotlin project, in case anyone else needs it, I published here: https://github.com/Joingo/yoga-kotlin

What with the project now?

@XantreGodlike please have a look in the latest history of the repo. Since @NickGerleman picked things up, this repo is alive again.

We just put out a new proper release with https://github.com/facebook/yoga/releases/tag/v2.0.0-beta.1.
I think that's the last thing I wanted to do before closing this issue out 🙂.


ASP.Net Core User Is null

https://stackoverflow.com/questions/47860774/c-sharp-net-core-asp-net-api-user-is-null
I hate to create github issues to bring attention, but I have been stumped on this for about 4 days now and I can't seem to bring attention on StackOverflow.  I have never seen such a thing.  All logs are on the link.
Thanks,

Sorry -- This seems to be a general question about IdentityServer - not a bug report or an issue.
Please use one of the our free or commercial support options
See here for more details.
Thanks!


Selective reCaptcha with IP address whitelist

Would it be possible to not show configured Google reCaptcha when accessing website from predefined IP address?
We would like to use the API access to MR on our Internet facing instance but reCaptcha blocks our attempts do so. We could disable reCaptcha but I would like it to be there to mitigite possible bot attacks.
Something like this pseudocode:
if ip_src is not in ip_whitelist then recapcha.show()

Update: I looked into AUTH_METHODS and NETWORK method but I get

Configuration failure: No authentication method configured in AUTH_METHODS.

Perhaps network method is missing here: https://github.com/munkireport/munkireport-php/blob/b86e2834d95f1e7f24d559a988158dd9a52899bb/app/lib/munkireport/AuthHandler.php#L11
But even with NETWORK method working It would be good to have authenticaton without reCaptcha. Perhaps AUTH_NETWORK_WHITELIST_IP4 could be reused for this.

AUTH_NETWORk is a pre-authentication filter that will prevent certain networks from reaching the login methods. I need to think about adding a network filter to the Recaptcha. Maybe there's a better way to allow API access


[VS Code] Collaboration session not found.

Error:
Collaboration session not found.
Steps to Reproduce:

Version Data

extensionName
VSLS

extensionVersion
0.3.319

protocolVersion
2.2

applicationName
VSCode

applicationVersion
1.23.1

platformName
Linux

platformVersion
4.15.0-23-generic

@junjie910918 Hey! This error typically indicates that the "host" ended the collaboration session before you actually joined. Could that have been the case here? In the meantime, I'm going to close this as a duplicate of #489, so if you could reply to that thread with more details, that would be greatly appreciated. Thanks!


Turbo frames and streams on tags

I have the usecase that i have a table e.g.:

       1
       Name
       <form method="POST"><button type="button">Some Action</button></form>

The button submit something and should return just the
 again.
So currently I would have todo something like this which ends in not valid HTML and requires css hacks to get the things work, but is not very nice for accessibility:

   <turbo-frame id="list-1">
       1
       Name
       <form method="POST"><button type="button">Some Action</button></form>
   </turbo-frame="list-1">

So what would be nice if to have something like:

       1
       Name
       <form method="POST"><button type="button">Some Action</button></form>

A data attribute over a custom tag make it possible, maybe it is strange as data-turbo-frame is used on links for target frame but think a data-turbo-frame without a value would not conflict here.

Is this related to https://github.com/hotwired/turbo/issues/48?

@seanpdoyle thank for the fast response. The issue looks similar, I'm not using ruby so not understanding all the comments examples. I'm using turbo over symfony/ux. Are I'm missing something in the documentation, as the issue seems to be close, so I think there is a solution now? Could not find it in the documantation. What looks promising in the documentation is something like the is attribute:

What is the recommended solution here? Maybe I can add something the the docs here. What would be the correct place?

Assuming the form#post causes the update to the DOM, you could response with a turbo-stream response instead.
Original HTML

       1
       Name
       <form method="POST"><button type="button">Some Action</button></form>

POST response (MIME type of text/vnd.turbo-stream.html)
<turbo-stream action="replace" target="name-1">
  <template>

       1
       Name
       Something else

  </template>
</turbo-stream>

see Streaming From HTTP Responses


PowerRename Features

Description of the new feature / enhancement
Prepend and append features. Just two simple options to add text to the beginning and end of the filename.
Scenario when this would be used?
For example somethimes i get files from my sound designer that are named in a way that every file name starts with a different number. Some applications do not support this naming so i have to prepend some string at the beggining of every file.
Supporting information
Popular mac app NameChanger has this two features.

There is a solution here, but it isn't elegant https://github.com/microsoft/PowerToys/issues/13865#issuecomment-944878846


Missing documentation - What's the purpose of $IsCoreCLR?

This is not an issue but I can't find any information about what's the purpose and usage for this variable:
$IsCoreCLR.
This is not event included in the PowerShell Help documentation.
It's excluded from the "About_Automatic_Variables" help doc.
So, all other $Is* are self-explanatory!
Steps to reproduce
Get-Variable Is*

Name                           Value
----                           -----
**IsCoreCLR                      True**
IsLinux                        False
IsMacOS                        False
IsWindows                      True

Get-Help About_Automatic_Variables

Help document has no information about any of the $Is* variables.
$Psver
Environment data

PS C:\Program Files\PowerShell\6.0.0-beta.7> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.7
OS                             Microsoft Windows 10.0.16294
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

This is a new one for PSCore6.  Originally, we weren't committed to only supporting CoreCLR so there was a possibility of a FullCLR version.  I'm actually not sure if there's still value in having this and perhaps we should remove it.  cc @daxian-dbw @joeyaiello

Not that there aren't other ways of doing this, but it is useful for pester testing where features of a module are exclusively available in Core or Windows PowerShell. Since $IsCoreCLR will not eval $true in 5.1, you can easily add a -pending:$IsCoreCLR or -skip:(-not $IsCoreCLR)

$PSVersionTable.PSEdition -eq "Core" covers that usage (although more verbose)

Agreed. It's not a strong argument for keeping it, but I grew fond of it. 😄

I agree that we should remove $IsCoreCLR before RTM.

@PowerShell/powershell-committee discussed this and agrees there is no value to keep $IsCoreClr so we recommend removing it

I noticed this variable is still present in the Release Candidate 1. Don't forget to remove it ;-)

It maybe here to stay: https://github.com/PowerShell/PowerShell/pull/5324#issuecomment-343644775

Given where we are with RC and headings towards GA and this is really a matter of cleanliness and not a functional issue to keep it (and our tests are using it so changing them to use PSEdition is work), this is going to stay.


cpr error

When I tried to compile with Visual Studio 2019, the following error occurred:
\cpr-master\cpr\ timeout.cpp (19,65): error C2039: "to_ string ": not a member of std.
\cpr-master\cpr\ session.cpp (114,10): error c2280: "CPR:: URL & CPR:: URL:: operator = (const CPR:: URL &) noexcept": attempted to reference a deleted function.
For the first error, I added "include < string > in timeout. h, and then recompilation does not report the first error.
now，I don't know how to solve the second problem。

In "cprtypes. h", I try to modify the source code and delete noexcept to compile normally.
StringHolder(const StringHolder& other) noexcept = default;
StringHolder(StringHolder&& old) noexcept = default;
StringHolder& operator=(StringHolder&& old) noexcept = default;
StringHolder& operator=(const StringHolder& other) noexcept = default;

Url(const Url& other) noexcept = default;
Url(Url&& old) noexcept = default;
~Url() override = default;

Url& operator=(Url&& old) noexcept = default;
Url& operator=(const Url& other) noexcept = default;

The above code is modified as follows:
`StringHolder(const StringHolder& other) = default;
StringHolder(StringHolder&& old) = default;
virtual ~StringHolder() = default;
StringHolder& operator=(StringHolder&& old) = default;
StringHolder& operator=(const StringHolder& other) = default;

Url(const Url& other) = default;
Url(Url&& old) = default;
~Url() override = default;
Url& operator=(Url&& old) = default;
Url& operator=(const Url& other) = default;

`

This has been fixed in: https://github.com/whoshuu/cpr/commit/fe29aee4ca4bfc9d17802e7623c2ee574b1d1e9b and https://github.com/whoshuu/cpr/commit/11591630ed9ab0c7263ea0bd16f595f8cb84d631 .
Please try pulling the latest changes.

Thank you. I have been able to compile the library。
I tried to run the demo on the document, and the demo print was always empty。
The code is as follows:
`int main(int argc, char** argv) {
cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
cpr::Authentication{"user", "pass"},
cpr::Parameters{{"anon", "true"}, {"key", "value"}});
r.status_code;            // 200
r.header["content-type"]; // application/json; charset=utf-8
r.text;                   // JSON text string
std::cout << r.text << std::endl;

}`

[
Uploading lib.zip…
](url)

Thank you. I have been able to compile the library。
I tried to run the demo on the document, and the demo print was always empty。
The code is as follows:
`
int main(int argc, char** argv)
{
cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
cpr::Authentication{"user", "pass"},
cpr::Parameters{{"anon", "true"}, {"key", "value"}});
r.status_code;            // 200
r.header["content-type"]; // application/json; charset=utf-8
r.text;                   // JSON text string
std::cout << r.text << std::endl;
}
`
I used openssl1.1.1h when compiling the CPR library. Is it related to the OpenSSL version?


[BUG] LambdaOp doesn't work on the raw lambda functions (it expects the lambda function to have a "create_node" attribute)

Describe the bug
LambdaOps don't work in the latest merlin (following the example in the docs)
Steps/Code to reproduce bug
https://nvidia-merlin.github.io/NVTabular/main/api/ops/lambdaop.html?highlight=lambdaop#nvtabular.ops.LambdaOp
The example usage 1 doesn't work and throws an error.
lambda_feature = nvt.ColumnSelector(["col1"])
new_lambda_feature = lambda_feature >> (lambda col: col.str.slice(0, 5))

AttributeError                            Traceback (most recent call last)
Input In [48], in <cell line: 2>()
      1 lambda_feature = nvt.ColumnSelector(["col1"])
----> 2 new_lambda_feature = lambda_feature >> (lambda col: col.str.slice(0, 5))

File /core/merlin/dag/selector.py:128, in ColumnSelector.__rshift__(self, operator)
    124 if isinstance(operator, type) and issubclass(operator, merlin.dag.BaseOperator):
    125     # handle case where an operator class is passed
    126     operator = operator()
--> 128 return operator.create_node(self) >> operator

AttributeError: 'function' object has no attribute 'create_node'

You can hack around it by adding an nvt.ops.LambdaOp() in front of your lambda function like:
new_lambda_feature = lambda_feature >> nvt.ops.LambdaOp(lambda col: col.str.slice(0, 5))

But this also causes issues in case you want to use a column to generate a new column with a different dtype - a common usecase could be something like changing datetime types into hour/day/timestamp.
Example:
datetime_col = nvt.ColumnSelector(["time"])  # time is a datetime64[ns] column
ts = datetime_col >> nvt.ops.LambdaOp(lambda col: cudf.to_datetime(col).astype(np.int64) // 10 ** 9) >> nvt.ops.Rename(postfix="_timestamp")

w = nvt.Workflow(datetime_col + ts)
w.fit(train_set)
dataset = w.transform(train_set)

But when you try to see the data inside, you get errors like:
Failed to transform operator <nvtabular.ops.lambdaop.LambdaOp object at 0x7f7def8be9a0>
Traceback (most recent call last):
  File "/nvtabular/nvtabular/workflow/workflow.py", line 539, in _transform_partition
    f"Dtype discrepancy detected for column {col_name}: "
  File "/nvtabular/nvtabular/ops/lambdaop.py", line 103, in label
    source = getsourcelines(self.f)[0][0]
  File "/opt/conda/lib/python3.8/inspect.py", line 979, in getsourcelines
    lines, lnum = findsource(object)
  File "/opt/conda/lib/python3.8/inspect.py", line 798, in findsource
    raise OSError('could not get source code')
OSError: could not get source code
distributed.worker - WARNING - Compute Failed
Function:  subgraph_callable-6e8e2068-b78f-42f9-9cc0-26e2684b
args:      ([{'piece': ('part-00000-1ab1f599-3eb8-4f9c-aa2c-cffe70690c00-c000.snappy.parquet', [0], [])}])
kwargs:    {}
Exception: "OSError('could not get source code')"

nvt.ops.LambdaOp expects the dtype of the columns to be the same.
Another way to reproduce the error:
def extract_hour(col):
    return col.dt.hour

ts = datetime_col >> nvt.ops.LambdaOp(extract_hour) >> nvt.ops.Rename(postfix="_hour")

w = nvt.Workflow(datetime_col + ts)
w.fit(train_set)
dataset = w.transform(train_set)
dataset.head()

Failed to transform operator <nvtabular.ops.lambdaop.LambdaOp object at 0x7f5c3deec5e0>
Traceback (most recent call last):
  File "/nvtabular/nvtabular/workflow/workflow.py", line 538, in _transform_partition
    raise TypeError(
TypeError: Dtype discrepancy detected for column start_time: operator extract_hour reported dtype `datetime64[ns]` but returned dtype `int16`.
distributed.worker - WARNING - Compute Failed
Function:  subgraph_callable-8f598a98-5178-43af-a40d-c78da1ad
args:      ([{'piece': (part-00000-1ab1f599-3eb8-4f9c-aa2c-cffe70690c00-c000.snappy.parquet', [0], [])}])
kwargs:    {}
Exception: "TypeError('Dtype discrepancy detected for column start_time: operator extract_hour reported dtype `datetime64[ns]` but returned dtype `int16`.')"

@Arnie0426 thanks reporting the error and sorry for the inconvenience. we do not use lambda op as
lambda_feature >> (lambda col: col.str.slice(0, 5))

Correct, it is used as nvt.ops.LambdaOp(lambda col: col.str.slice(0, 5)).
we need to update example usage of the LambdaOp in the docs yes. And I will check your repro example as well.
@mikemckiernan  fyi.

You can change the output dtype by supplying the dtype property when creating the LambdaOp:
nvt.ops.LambdaOp(extract_hour, dtype=np.int32)

(It looks like the docstrings for this operator need an update.)

Thanks =) Passing a dtype solved it.


[3.x] Fix handling of async hidden render mode

Mute errors when conditioned shader is not ready yet [This is the specific issue in the bug report.]

Thanks!


:bug: - Fix binding of Array.get, to make sure it boxes options

This can cause runtime crashes when the individual members are options. When you are using Option.getExn after an Array.get to get the value if you know the array is in bounds, it will crash if the item in the array an option type and is None for the element. In normal cases you would use Array.getUnsafe for this, but in more complex scenarios this can happen. The types are actually incorrect and it can lead to crashes where you wouldn't expect it.

@jfrolich ping about @glennsl comment


Fix links verifier failure

@gewarren The workflow failed due to me having a global.json with a specific version, and the official docker image has updated the version. I updated the version in my global.json temporarily and added a fix to 0.0.9.
This is expected to fail again though if the docker image is updated again before I release a version with pinned SDK version in my Dockerfile.
Sorry for the inconvenience here. I'll try to get things more stable soon!


Make Cask::Artifact::Installer typesafe

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.

[x] Have you successfully run brew typecheck with your changes locally?
[x] Have you successfully run brew tests with your changes locally?

This is a re-apply of https://github.com/Homebrew/brew/pull/18020 now that the downstream fix is in. (I have searched the Homebrew org for any other references to the deleted modules, but that was the only one I found.)

Thanks @dduugg!


Fix CAS requirements

Currently, there are two dependencies that require CAS operations, which is undesirable when trying to avoid the atomic trap handler on esp32c3:

atomic_enum - the generated code references CAS ops from the stdlib, even though we don't actually use any in this esp-wifi.
atomic-waker - a transitive dependency, which uses CAS operations. Luckily they use portable-atomics which allows using emulated CAS ops. However, esp-wifi/embedded_svc don't actually enable the feature flags necessary to get those portable atomics to be used.

I was able to remedy this via the following:
+atomic-waker = { version = "1.1", default-features = false, features = ["portable-atomic"] }
+portable-atomic = { version = "1.5", default-features = false, features = ["require-cas", "unsafe-assume-single-core"]}

and then I patched my cargo.toml with this PR I opened to atomic-enum

Since the crate author seems to have disappeared I made this instead: https://github.com/bugadani/portable_atomic_enum The plan was to use this crate instead of atomic_enum, but it doesn't compile if someone uses the atomic emulation on RISC-V. I guess a CAS feature would make sense for my fork, too, but we can't use it yet and have to resolve the "emulation v portable-atomic" situation in some way before that changes.

Given that this functionality is not exposed to end-users of esp-wifi, I would expect that esp-rs can choose to use a fork or simply remove the dependency altogether without impacting any consumers of the library

@TheButlah I tried your workaround on one of my projects, but I still get a compilation error:
error[E0412]: cannot find type `AtomicUsize` in module `core::sync::atomic`
 --> /home/derfetzer/src/esp-wifi/esp-wifi/src/wifi/state.rs:7:1
  |
7 | #[atomic_enum]
  | ^^^^^^^^^^^^^^ not found in `core::sync::atomic`
  |
  = note: this error originates in the attribute macro `atomic_enum` (in Nightly builds, run with -Z macro-backtrace
 for more info)
help: consider importing one of these items
  |
1 + use atomic_polyfill::AtomicUsize;
  |
1 + use crate::wifi::AtomicUsize;
  |
1 + use portable_atomic::AtomicUsize;
  |

error[E0433]: failed to resolve: could not find `AtomicUsize` in `atomic`
 --> /home/derfetzer/src/esp-wifi/esp-wifi/src/wifi/state.rs:7:1
  |
7 | #[atomic_enum]
  | ^^^^^^^^^^^^^^ could not find `AtomicUsize` in `atomic`
  |
  = note: this error originates in the attribute macro `atomic_enum` (in Nightly builds, run with -Z macro-backtrace
 for more info)
help: consider importing one of these items
  |
1 + use atomic_polyfill::AtomicUsize;
  |
1 + use crate::wifi::AtomicUsize;
  |
1 + use portable_atomic::AtomicUsize;
  |

Do you have an idea what the problem could be?

CAS is a specific subset of the full atomic capabilities, the compare_and_swap / compare_exchange functionality. Atomic load/stores can often be emulated entirely via volatile read/write operations, which require no special hardware support on single core devices.
In my project, I can enable a subset of the full atomic features for the given target platform: https://github.com/SlimeVR/SlimeVR-Rust/blob/9eff429f4f01c8b7c607f3c3988de82729c753b3/firmware/.cargo/config.toml#L22C3-L30C49
This gives me access to std::sync::atomic::AtomicUsize without giving me access to the CAS operations.


vue3 directive not working

I have created the v-money3 directive and use it on the input element but its not reactive its give bellow error on console

Would be nice to have more information about the problem. I did not catch this error. Can you elaborate a codesandbox example?
This is a working example of directive usage.
<input v-model.lazy="amount" v-money3="config" />

import { Money3Directive } from "v-money3";
export default {
  data() {
    return {
      amount: 0,
    };
  },
  computed: {
    config() {
      return {
        decimal: ",",
        thousands: ".",
        prefix: "R$ ",
        suffix: "",
        precision: 2,
        masked: false /* doesn't work with directive */,
      };
    },
  },
  directives: {
    money3: Money3Directive,
  },
};

Hey, @yogesh-gohil. Could you please update to the last 3.13.6 version and test if your problem persists? I made a fix for a problem that was happening if you initialize the component using a null model.

closed by user timeout

https://github.com/jonathanpmartins/v-money3/issues/19 Could this be related @yogesh-gohil @botura ?

Probably yes, errors seen to be the same.


Update NuGet libraries to 6.4.2

PR Details

Description
Updating NuGet libraries from 6.4.0 to 6.4.2 as advised by dependabot due RCE vulnerability.
Related Issue
Closes #2016
Closes #2013
Closes #2012
Closes #2011
Closes #2010
Closes #2009
Types of changes

[x] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.
[x] I have built and run the editor to try this change out.

@Basewq I had to change your recent code as net472 didn't have string.Contains which took in comparison hint.

This should get easier when we use central version management.


get rsp branded materials

Helpful tweets:

https://x.com/reality_spiral/status/1861239231445901610
https://x.com/reality_spiral/status/1859165259027943496


Danger table layout 'broken' on GitHub

Report
What did you do?
I have Danger set up through Circle-CI for a couple of months now, and reporting on our private GitHub project has been great all this time. The server runs a simple bundle exec danger.
What did you expect to happen?
I have a number of rules set up that check labels on the GitHub PR. They usually report merrily with the table syntax:

What happened instead?
Yet recently (since about a week), the markup of the report has been wonky:

Any ideas?
Your Environment

circleci.com
Danger gem version 3.0.3
Dangerfile:

skips_changelog = github.pr_labels.include? "skips changelog"
has_app_changes = !git.modified_files.grep(/App/).empty?
has_app_changes ||= !git.modified_files.grep(/JediKit/).empty?
has_modified_changelog = git.modified_files.include?("CHANGELOG.md")

# Changelog entries are required for changes to main targets' files.
if has_app_changes && !skips_changelog && !has_modified_changelog
  fail("Changes to App or JediKit require a changelog-entry (unless labeled `skips changelog`)")
end

if github.pr_labels.empty?
  warn("PR lacks status labels (e.g. `work in progress: do not merge!`)")
else
  review_label_applied = github.pr_labels.include?("ready for review")
  review_label_applied ||= github.pr_labels.include?("please review me!")
  warn("PR is not yet labeled as `please review me!` or `ready for review`") if !review_label_applied
  fail("Sub-branch; rebase after parent is merged and remove label `sub-branch: rebase required!`") if github.pr_labels.include?("sub-branch: rebase required!")
end

# Don't let testing shortcuts get into master by accident
%w[App AppUITests JediKit].each do |dir|
  fail("Focused `describe`-closure detected within a spec of directory `#{dir}`") if `grep -r --include \\*.spec.swift fdescribe #{dir}/ `.length > 1
  fail("Focused `it`-closure detected within a spec of directory `#{dir}`") if `grep -r --include \\*.spec.swift fit #{dir}/ `.length > 1
  fail("`TODO` detected in directory `#{dir}`, create Jira stories instead") if `grep -r --include \\*.swift TODO #{dir}/ `.length > 1
  fail("`FIXME` detected in directory `#{dir}`, create Jira stories instead") if `grep -r --include \\*.swift TODO #{dir}/ `.length > 1
end

P.S. Hope you guys aren't offended by this being PR #666

@epologee Please try 4.0.1. It should be fixed - see https://github.com/danger/danger/issues/663 for more info.

Note to self: next time also check the closed issues!
At least I got to submit issue #666. Thanks @marcelofabri!


chore(package): update kronos-service to version 4.12.0

Coverage remained the same at 92.308% when pulling a9ec920dd460fcc21a3c11680baebfa1d0529cd1 on greenkeeper/kronos-service-4.12.0 into 864a8c20daa939f16a42cf83cb9593f94ef69efd on master.

Codecov Report

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

@@          Coverage Diff           @@
##           master    #194   +/-   ##
======================================
  Coverage    92.3%   92.3%
======================================
  Files           2       2
  Lines          13      13
======================================
  Hits           12      12
  Misses          1       1

Continue to review full report at Codecov.

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


Select card behaviour since 2.0.0-beta.9

When including a 'mushroom-select-card' in a pop up, the drop down is disconnected from the card and its contents are hidden behind any following cards in the pop up. This only started from 2.0.0-beta.9, reverting to beta 8 returns to normal behaviour
To Reproduce
Steps to reproduce the behavior:

Open pop up
select drop down on 'mushroom-select-card'
Options hidden behind other cards

Expected behavior
Options should be infront of other cards
Screenshots
beta 8 normal behaviour

beta 9+ broken behaviour

Thanks

Hi, I will release a new beta in a few minutes that should fix this, thank you for the feedback!

This problem (or something similar) seems to be back. As of 2.0.0 the drop down shows but isn't connected to the 'mushroom-select-card'.

In 2.0.4 the drop down is connected to the card again but only the first row shows, the second row is gradually more transparent, and any rows after that aren't visible.

However, the drop down shows normally when conditions cards below it are visible.

Thanks again

I will take a look at that, thanks for the feedback.

I've just fixed it, I will release a new beta as soon as I can!

Nothing like that, it was because of the gradient mask that is at the top and at the bottom of the pop-ups, its position was not fixed.

This issue is now fixed in the new betas 🎉
https://github.com/Clooos/Bubble-Card/releases/tag/v2.1.0-beta.2


doc: Update install.md

add conda install Cython before installing the forked version of pycocotools

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks for your contribution!

Hi @nguyenhoan1988 ！First of all, we want to express our gratitude for your significant PR in the mmdetection project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.
We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us ：https://discord.gg/raweFPmdzG
If you are Chinese or have WeChat，welcome to join our community on WeChat. You can add our assistant ：openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends：）
Thank you again for your contribution❤


Can’t edit party members in RXP

I’ve tried editing System/@party_members and this is what I saw:

When I click on the party member (she exists in the Actors, btw), I get the following window:

When I click ‘Add @ 1’, I get ‘Can’t edit: null’. Clicking on it brings the same window.
This only affects RXP, while RVXA and R2k[3] work well.

Hopefully fixed with https://github.com/20kdc/gabien-app-r48/commit/4b64c851350cfdf88f85e608fd864341931bc98a

This works now, thanks!


Update tile retreival ahn.py

On the eclipse server: Skip tile retreival if the link does not exist.
Legacy server: Rasterio merge returned only zero's since 17 sept. All the merging is now done within xarray.

Great.
I would just leave the old method (_download_and_combine_tiles) intact, and not change anything. With the proposed changes, and when as_data_array is False, you return something else as before . This method is just for people who wish to use the exact same output as before, using the legacy-methods. So changing its output-type is kind of contradictory to this. In a few versions, we will remove the legacy-methods and _download_and_combine_tiles.

Well could you maybe confirm? If I use _download_and_combine_tiles(), during the merge command of rasterio all values are converted to 0. With the proposed changes the function works like intended.

Since no error is produced and zeros are falsely returned, I would suggest to either

already remove these functions,
keep these functions as legacy functions with an additional warning that their outcome is wrong
keep these suggested changes

The zeros are caused by rasterio version 1.3.11, and you do get a warning (see issue #369). We changed the normal versions of the methods to use the xarray-merge to solve this bug. However, some people might want to use the old server, or as_data_array=False. Therefore, the old methods are still available using the _legacy-suffix. However, I do not think we should maintain these methods. This will introduce additional work and errors.
For example. With the proposed changes, the following code
import nlmod
extent = [100_000, 110_000, 400_000, 405_000]
nlmod.read.ahn.get_ahn4_legacy(extent)

produces
<xarray.DataArray 'band_data' (band: 1, y: 0, x: 2000)> Size: 0B
array([], shape=(1, 0, 2000), dtype=float32)
Coordinates:
  * band         (band) int32 4B 1
  * x            (x) float64 16kB 1e+05 1e+05 1e+05 ... 1.1e+05 1.1e+05 1.1e+05
  * y            (y) float64 0B
    spatial_ref  int32 4B 0
Attributes:
    AREA_OR_POINT:  Area

So this is an empty data-array (while the original methods produce the correct data-array, with non-zero data if you do not use rasterio 1.3.11). We can off course fix this issue as well, but this is not the goal of the legacy-methods.

Thanks Ruben for taking the time. I was falsely under the impression that the all-zeros-bug also appeared with other versions of rasterio. I will revert the code and merge the two remaining lines.


user role has no permission but can() return true?

1、User -- Roles
admin(id=1) -- super.admin
test(id=2)  -- admin
2、Role -- Permission
super.admin -- admin.manage
but I run:
$user = User::find(2);
dd($user->can('admin.manage'));
it returns true?

Maybe this block
    return $this->getPermissions()->contains(function ($value, $key) use ($permission) {
        return $permission == $value->id || Str::is($permission, $value->slug);
    });

should replace by this
    return $this->getPermissions()->contains(function ($value, $key) use ($permission) {
        return $permission == $value->id || $permission == $value->slug;
    });

I'm guessing.

I figured out this. Because rolePermissions() has this "->orWhere('roles.level', '<', $this->level())" condition,and my super admin 's level(1) is lower than normal admin(2)....Now I set my super admin level 100

@xlkit456852 is the issue resolved?

yes,resolved.

@xlkit456852  Don't you mind to close the issue then?


[TF] TensorFlow/TensorFlowCore Refactoring

This PR is part of the following "PR family":

this PR
tensorflow/swift-apis#109
tensorflow/swift-bindings#26

This set of PRs splits the current TensorFlow module of stdlib in two parts:

TensorFlowCore: Contains the core operations related to the interaction between TensorFlow and the Swift compiler, as well as the contents of the tensorflow/swift-bindings repository (some of the raw ops are used in TensorFlowCore and thus it was easiest to include this here).
TensorFlow: Contains all APIs defined by Swift for TensorFlow. This includes all functions that wrap TensorFlow ops, as well as the contents of the tensorflow/swift-apis repository. In fact, all the contents of this module have been moved to the tensorflow/swift-apis repository.

This results in the main benefit that all compiler logic remains part of the Swift compiler repository, while all API-related code lies in the tensorflow/swift-apis repository. The separation to TensorFlowCore and TensorFlow further allows all code in the APIs repository to be independently compiled and tested, without needing to be part of the compiler repository (which is the current case).
Alternatives Considered

Just moving parts of the code to tensorflow/swift-apis results in the code in that repository not being independently compilable and testable. It can only be compiled while compiling the Swift stdlib.
Moving everything to tensorflow/swift-apis has the main disadvantage that whenever changes are made to the compiler, changes will also have to be made to the APIs repository. Ideally, we would like to reduce that to the minimum and I believe that the current approach achieves that.

Current Status
All tests pass locally on my machine. I only made a couple minor modifications to make them pass:

test/TensorFlowRuntime/accelerator_only.swift: Had to rename the TensorFlow module to TensorFlowCore.
test/TensorFlow/deabstraction_finished.swift: Had to modify the generated SIL slightly, but I'm not really sure why I had to do that.
I also had to keep a few uses of @inline(__always) in tensorflow/swift-apis in order to make the partitioning tests pass.

Questions

Should we remove the partitioning tests and clean up code so that @inline(__always) is not used anywhere? The main issue these tests cause is that we cannot currently switch to using eager mode for the raw op bindings. More generally, we cannot currently move away from using #tfop as many of these tests rely on that.
It looks like many parts of CompilerRuntime.swift are outdated / have become redundant now that GPE is not supported. Should we clean that up at some point?

Comments
This set of PRs also includes the changes introduced in:

apple/swift#24164
apple/swift#24191
apple/swift#24229
apple/swift#24249

@rxwei @dan-zheng @pschuh

I can also verify that the toolchain builds successfully.

Can you do import TensorFlow using the new toolchain?

@rxwei yes everything works fine when using the new toolchain (I also tried compiling retro-swift and it works fine). The only issue is that I get some compiler errors when trying to compile swift-apis on its own. Example error:
1.      While emitting SIL for 'makeTensor(rank:)' (at /Users/eaplatanios/Development/GitHub/swift-apis/Sources/DeepLearning/Operators/Basic.swift:24:5)
2.      While silgen emitFunction SIL function "@$s14TensorFlowCore0aB6ScalarP12DeepLearningE04makeA04rankAA0A0VyxGSi_tF".
 for 'makeTensor(rank:)' (at /Users/eaplatanios/Development/GitHub/swift-apis/Sources/DeepLearning/Operators/Basic.swift:24:5)
0  swift                    0x0000000110149675 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift                    0x0000000110148915 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x0000000110149c62 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff60157b5d _sigtramp + 29
4  libsystem_platform.dylib<PHONE_NUMBER>00000000 _sigtramp +<PHONE_NUMBER>
5  swift                    0x000000010d385e26 swift::SILFunctionBuilder::addFunctionAttributes(swift::SILFunction*, swift::DeclAttributes&, swift::SILModule&, swift::SILDeclRef) + 1606
6  swift                    0x000000010d3868f5 swift::SILFunctionBuilder::getOrCreateFunction(swift::SILLocation, swift::SILDeclRef, swift::ForDefinition_t, swift::ProfileCounter) + 1381
7  swift                    0x000000010ccf6371 swift::Lowering::SILGenModule::getFunction(swift::SILDeclRef, swift::ForDefinition_t) + 321
8  swift                    0x000000010cddf7d3 swift::Lowering::SILGenFunction::emitGlobalFunctionRef(swift::SILLocation, swift::SILDeclRef, swift::Lowering::SILConstantInfo, bool) + 515
9  swift                    0x000000010cd0c0c8 (anonymous namespace)::Callee::getFnValue(swift::Lowering::SILGenFunction&, bool, llvm::Optional<swift::Lowering::ManagedValue>) const & + 1336
10 swift                    0x000000010cd08dcd (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3405
11 swift                    0x000000010cd07f7f swift::Lowering::SILGenFunction::emitApplyExpr(swift::Expr*, swift::Lowering::SGFContext) + 2111
12 swift                    0x000000010cd74140 swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 80
13 swift                    0x000000010cd65aa0 swift::Lowering::SILGenFunction::emitRValue(swift::Expr*, swift::Lowering::SGFContext) + 32
14 swift                    0x000000010cddbd6f swift::Lowering::SILGenFunction::emitReturnExpr(swift::SILLocation, swift::Expr*) + 383
15 swift                    0x000000010cdda061 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 8465
16 swift                    0x000000010cdd9efb swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 8107
17 swift                    0x000000010cdd7f45 swift::Lowering::SILGenFunction::emitStmt(swift::Stmt*) + 21
18 swift                    0x000000010cd8cb2a swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 426
19 swift                    0x000000010cd00b6c swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const + 268
20 swift                    0x000000010ccf6bee swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 734
21 swift                    0x000000010cde542e swift::ASTVisitor<SILGenExtension, void, void, void, void, void, void>::visit(swift::Decl*) + 110
22 swift                    0x000000010cde306b SILGenExtension::emitExtension(swift::ExtensionDecl*) + 59
23 swift                    0x000000010cde3025 swift::Lowering::SILGenModule::visitExtensionDecl(swift::ExtensionDecl*) + 21
24 swift                    0x000000010ccfce06 swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 838
25 swift                    0x000000010ccfdd25 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*) + 293
26 swift                    0x000000010ccfe2b9 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&) + 41
27 swift                    0x000000010c47efae performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 7934
28 swift                    0x000000010c47c048 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3016
29 swift                    0x000000010c42dd72 main + 690
30 libdyld.dylib            0x00007fff5ff723d5 start + 1

Relevant Swift function:
public extension TensorFlowScalar {
    /// Convert to a tensor with the specified rank, with all dimensions equal to 1.
    @inlinable
    func makeTensor(rank: Int) -> Tensor<Self> {
        return Tensor(repeating: self, shape: TensorShape(rank))
    }
}

@rxwei I wonder if these errors can be fixed by using the -sil-inline-generics, -sil-partial-specialization, and -enable-sil-ownership flags that are used when compiling the stdlib. That's the only difference I can see but I'm not sure how to use the flags with SwiftPM.

I also just tried enabling -O -whole-module-optimization for the TensorFlow module (i.e., not TensorFlowCore) and now all tests pass except TensorFlow/diagnostics.swift and TensorFlow/diagnostics_scalar_transfers.swift.

@rxwei I also made some progress on getting the standalone compilation of swift-apis working. First of all, I had to move DifferentialOperators.swift in TensorFlowCore because, when compiled as a part of a standalone module outside of the stdlib, it causes the following error:
1.      While verifying SIL function "@$s12DeepLearning8gradient2at__2in15CotangentVectorQz_AEQy_AEQy0_tx_q_q0_14TensorFlowCore0H0Vyq1_Gx_q_q0_tXEts14DifferentiableRzsAMR_sAMR0_AI0hI13FloatingPointR1_r2_lF".
 for <<debugloc at "<compiler-generated>":0:0>>0  swift                    0x000000010a996675 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift                    0x000000010a995915 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x000000010a996c62 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff60157b5d _sigtramp + 29
4  swift                    0x000000010bcc4052 cmark_strbuf__initbuf + 133885
5  libsystem_c.dylib        0x00007fff600176a6 abort + 127
6  libsystem_c.dylib        0x00007fff5ffe020d basename_r + 0
7  swift                    0x0000000107bb72c8 swift::AutoDiffFunctionInst::getAssociatedFunctionPair(unsigned int) const + 136
8  swift                    0x0000000107c21228 swift::SILInstructionVisitor<(anonymous namespace)::SILVerifier, void>::visit(swift::SILInstruction*) + 47832
9  swift                    0x0000000107c143ec (anonymous namespace)::SILVerifier::visitSILBasicBlock(swift::SILBasicBlock*) + 1196
10 swift                    0x0000000107c0e5b7 swift::SILFunction::verify(bool) const + 8471
11 swift                    0x0000000107c11553 swift::SILModule::verify() const + 211
12 swift                    0x0000000106cccb3f performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 10895
13 swift                    0x0000000106cc9048 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3016
14 swift                    0x0000000106c7ad72 main + 690
15 libdyld.dylib            0x00007fff5ff723d5 start + 1

Then, I also found out that if I comment out all uses of @differentiable, swift-apis compiles fine as a standalone module. So, there has to be something related to @differentiable that causes errors like the following:
1.      While emitting SIL for 'makeTensor(rank:)' (at /Users/eaplatanios/Development/GitHub/swift-apis/Sources/DeepLearning/Operators/Basic.swift:24:5)
2.      While silgen emitFunction SIL function "@$s14TensorFlowCore0aB6ScalarP12DeepLearningE04makeA04rankAA0A0VyxGSi_tF".
 for 'makeTensor(rank:)' (at /Users/eaplatanios/Development/GitHub/swift-apis/Sources/DeepLearning/Operators/Basic.swift:24:5)
0  swift                    0x0000000110149675 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift                    0x0000000110148915 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x0000000110149c62 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff60157b5d _sigtramp + 29
4  libsystem_platform.dylib<PHONE_NUMBER>00000000 _sigtramp +<PHONE_NUMBER>
5  swift                    0x000000010d385e26 swift::SILFunctionBuilder::addFunctionAttributes(swift::SILFunction*, swift::DeclAttributes&, swift::SILModule&, swift::SILDeclRef) + 1606
6  swift                    0x000000010d3868f5 swift::SILFunctionBuilder::getOrCreateFunction(swift::SILLocation, swift::SILDeclRef, swift::ForDefinition_t, swift::ProfileCounter) + 1381
7  swift                    0x000000010ccf6371 swift::Lowering::SILGenModule::getFunction(swift::SILDeclRef, swift::ForDefinition_t) + 321
8  swift                    0x000000010cddf7d3 swift::Lowering::SILGenFunction::emitGlobalFunctionRef(swift::SILLocation, swift::SILDeclRef, swift::Lowering::SILConstantInfo, bool) + 515
9  swift                    0x000000010cd0c0c8 (anonymous namespace)::Callee::getFnValue(swift::Lowering::SILGenFunction&, bool, llvm::Optional<swift::Lowering::ManagedValue>) const & + 1336
10 swift                    0x000000010cd08dcd (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3405
11 swift                    0x000000010cd07f7f swift::Lowering::SILGenFunction::emitApplyExpr(swift::Expr*, swift::Lowering::SGFContext) + 2111
12 swift                    0x000000010cd74140 swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 80
13 swift                    0x000000010cd65aa0 swift::Lowering::SILGenFunction::emitRValue(swift::Expr*, swift::Lowering::SGFContext) + 32
14 swift                    0x000000010cddbd6f swift::Lowering::SILGenFunction::emitReturnExpr(swift::SILLocation, swift::Expr*) + 383
15 swift                    0x000000010cdda061 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 8465
16 swift                    0x000000010cdd9efb swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 8107
17 swift                    0x000000010cdd7f45 swift::Lowering::SILGenFunction::emitStmt(swift::Stmt*) + 21
18 swift                    0x000000010cd8cb2a swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 426
19 swift                    0x000000010cd00b6c swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const + 268
20 swift                    0x000000010ccf6bee swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 734
21 swift                    0x000000010cde542e swift::ASTVisitor<SILGenExtension, void, void, void, void, void, void>::visit(swift::Decl*) + 110
22 swift                    0x000000010cde306b SILGenExtension::emitExtension(swift::ExtensionDecl*) + 59
23 swift                    0x000000010cde3025 swift::Lowering::SILGenModule::visitExtensionDecl(swift::ExtensionDecl*) + 21
24 swift                    0x000000010ccfce06 swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 838
25 swift                    0x000000010ccfdd25 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*) + 293
26 swift                    0x000000010ccfe2b9 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&) + 41
27 swift                    0x000000010c47efae performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 7934
28 swift                    0x000000010c47c048 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3016
29 swift                    0x000000010c42dd72 main + 690
30 libdyld.dylib            0x00007fff5ff723d5 start + 1

Sorry for the spamming, but I hope this may help in figuring out what's wrong. After digging a bit deeper it looks like these errors only come up when propagating the @differentiable attribute from initializers. For example, I get no error if I annotate a function as @differentiable and it does not use any @differentiable Tensor initializers. However, once I make an initializer @differentiable and use it from within another function declared as @differentiable, I get these errors.

That is interesting. It would help a lot if you can provide a minimal reproducer.

@rxwei I'll try to do that but in the meantime, I found out that the point where it crashes is in lines:
      // Get lowered argument indices.
      auto paramIndices = A->getParameterIndices();
      auto loweredParamIndices = paramIndices->getLowered(
          decl->getInterfaceType()->castTo<AnyFunctionType>());

in SILFunctionBuilder.cpp.

@rxwei shows EXC_BAD_ACCESS at line 246 of AutoDiff.cpp when doing parameters.size().

@rxwei In auto paramIndices = A->getParameterIndices(); paramIndices ends up being a nullptr.

What declaration is it processing? Is it an init or something?

According to the reported error this:
public extension TensorFlowScalar {
    /// Convert to a tensor with the specified rank, with all dimensions equal to 1.
    @inlinable
    func makeTensor(rank: Int) -> Tensor<Self> {
        return Tensor(repeating: self, shape: TensorShape(rank))
    }
}

But I often find this error locations confusing. I believe it's coming from the Tensor.init(repeating:shape:) because if I remove the @differentiable attribute from its declaration then the error goes away. It's only when I make Tensor.init(repeating:shape:) differentiable that I get this error for the makeTensor() function.

This sort of makes sense. When you call a function from a different module (each Swift file has its own SIL module), we first declare it in the current module with the same signature, and call it.

I'm not sure I understand this. I have declared all initializers in one file (e.g., Initializers.swift) and then I implement the makeTensor(rank:) method shown above using one such initializer in another file (e.g., Test.swift). I don't expect this should cause any issues, right? And it only does so when I make the declared initializers differentiable.

I meant the source location where that crasher happens makes sense, since makeTensor(rank:) is calling init(repeating:shape:). It's a little surprising that the parameter indices pointer nullptr. This means something's wrong with either deserialization or @differentiable attribute type checking.

I have a minimal reproducible example. Add this to one file:
public extension TensorFlowFloatingPoint {
  /// Convert to a tensor with the specified rank, with all dimensions equal to 1.
  @inlinable
  func makeTensor() -> Tensor<Self> {
    return Tensor(value: self)
  }
}

and this to another:
public extension Tensor {
  @inlinable
  @differentiable(vjp: _vjpInit(value:) where Scalar: TensorFlowFloatingPoint)
  init(value: Scalar) {
    self = Raw.fill(
      dims: Tensor<Int32>(1),
      value: Tensor(value))
  }
}

internal extension Tensor where Scalar: TensorFlowFloatingPoint {
  @inlinable
  static func _vjpInit(value: Scalar) -> (Tensor, (Tensor) -> Scalar) {
    return (Tensor(value: value), { $0.scalarized() })
  }
}

Hopefully you will get the same error and it should not depend on the TensorFlowCore/TensorFlow split.

I meant the source location where that crasher happens makes sense, since makeTensor(rank:) is calling init(repeating:shape:). It's a little surprising that the parameter indices pointer nullptr. This means something's wrong with either deserialization or @differentiable attribute type checking.

Oh I see. Yeah that makes sense. I misunderstood and thought you meant the crash sort of makes sense.

By the way, other than this error, everything else compiles fine in swift-apis now with the TensorFlowCore/TensorFlow separation, as swift-apis only imports TensorFlowCore and there are no ambiguous functions. :)

Reproduced on the latest tensorflow branch.

Oh and the fix I mentioned above on diagnostics.swift and diagnostics_scalar_transfers.swift also now let's us compile the new TensorFlow module with optimizations enabled.

Reproduced on the latest tensorflow branch.

Good to know. Let me know if there is anything else I can do to help with this. Otherwise, once we sort out a fix I can add it in this PR and run all tests.

https://bugs.swift.org/browse/TF-465
I'll take a look at it now.

Great, thanks!

@rxwei By the way, I don't know if this helps, but this crash only occurs when we compile this outside of stdlib. When compiled together with stdlib, the crash does not occur anymore. Could this mean that this has to do with any of the following flags?
set(swift_stdlib_compile_flags "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}")
list(APPEND swift_stdlib_compile_flags "-Xllvm" "-sil-inline-generics")
list(APPEND swift_stdlib_compile_flags "-Xllvm" "-sil-partial-specialization")
list(APPEND swift_stdlib_compile_flags "-Xfrontend" "-enable-sil-ownership")
list(APPEND swift_stdlib_compile_flags "-force-single-frontend-invocation")

@rxwei I actually just noticed something interesting. If I compile using swift build -c release, then the error goes away. So, either compiler optimizations help, or -whole-module-optimization makes the error go away because all source files are kind of considered as being a single source file.

Yes, -c release enables -whole-module-optimization, which merges those files to the same module.
I haven't got a chance to look into that issue further unfortunately.

@rxwei So I noticed that if you try to do decl->getAttrs().dump() you also get a crash because of the parameter indices being nullptr. So, I'm wondering if the parameter indices should be initialized somewhere else beforehand. Could you direct me as to where the imported declarations from other modules are type-checked?

This is where a @differentiable attribute gets deserialized from another module: https://github.com/apple/swift/blob/57f8cf549dce88ad3e5c4b150a19b8b7cf8d60db/lib/Serialization/Deserialization.cpp#L2579.
I haven't found anything wrong here yet.
One hack you can try is to skip the ones whose parameter indices are nullptr here:
https://github.com/apple/swift/blob/57f8cf549dce88ad3e5c4b150a19b8b7cf8d60db/lib/SIL/SILFunctionBuilder.cpp#L81

This is where a @differentiable attribute gets deserialized from another module:
swift/lib/Serialization/Deserialization.cpp
Line 2579 in 57f8cf5
auto *indices = AutoDiffParameterIndices::get(parametersBitVector, ctx);
I haven't found anything wrong here yet.

I looked into this earlier today but it didn't seem to be called at all before the error is thrown.

One hack you can try is to skip the ones whose parameter indices are nullptr here:
swift/lib/SIL/SILFunctionBuilder.cpp
Line 81 in 57f8cf5
for (auto *A : Attrs.getAttributes()) {

I actually considered that but wasn't sure what the implications are. Could that break auto-diff?

Some of my earlier debugging told me that addFunctionAttributes is actually called twice, so it should be okay.

Ok I am trying that now. Also, I was wondering why we need the DifferentialOperators.swift file in swift-apis (it's the Gradients.swift file in master). The functions it defines are already defined in AutoDiff.swift.

The functions it defines are already defined in AutoDiff.swift.

Not quite. The standard library AutoDiff.swift file defines general differential operators, which include gradient APIs that are applicable to functions that return a FloatingPoint scalar for mathematical correctness (gradient is only defined on functions that return a scalar). However, Tensor does not conform to FloatingPoint because it's not always a scalar. So we overload those differential operators and assume (assert) that the function being differentiated returns a scalar tensor.
Maybe Tensor should conform to FloatingPoint (and assert in certain FloatingPoint requirements that the tensor is rank-0) at some point.

Btw, the hacky fix works and now all tests defined using XCTest in swift-apis pass when compiled independently using the S4TF compiler. :)
I'll commit the fixes by tomorrow noon. It all seems to work now locally, including building and using the toolchain.

@rxwei All changes are pushed now in this PR and in tensorflow/swift-apis#109 . All tests pass on my machine, both for the Swift compiler and for swift-apis by running swift test using the Swift PM. Also, I have verified that the toolchain builds and that I can use everything normally by doing import TensorFlow.

That's awesome!

I think the best way to go about this PR is to first review and merge tensorflow/swift-apis#109 and tensorflow/swift-bindings#26 and then I can update the checkout commits here so that all tests can be run on the CI server.

@rxwei After making the changes we discussed I run into issues with the following tests:

TensorFlow/integration.swift
TensorFlow/retain_release.swift
I spent some time trying to debug them but didn't figure out a workaround. I just pushed all changes here and in the paired swift-apis PR. Could you please take a look when you get a chance?

What are the issues you ran into? Could you paste the test log into a gist and share it?

@rxwei there’s a few errors about the SIL not being what expected. The log is really big due to printing the whole SIL I think. Do you want me to share all of it or is there an easy way to find the relevant parts?

@rxwei Full gist is here: https://gist.github.com/eaplatanios/b9a8ff1a881ad70dbe5b7ae805a9f3d5

Thanks! I see that those GPE tests are very brittle. Our team is starting a discussion about what to do with GPE this week. How about putting this on hold and discuss it in Wednesday's meeting?

Sounds good. I believe it would be very useful to decide where GPE fits in, in the current design.

@rxwei Given the newer #24452 I believe we can close this PR.

Sounds good.


Notify pgwire clients about parameter changes using ParameterStatus

https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-ASYNC

ParameterStatus messages will be generated whenever the active value changes for any of the parameters the backend believes the frontend should know about. Most commonly this occurs in response to a SET SQL command executed by the frontend

One of the parameter changes that the frontend should know about is on datestyle however I do not see  ParameterStatus generated from the code below:
Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/crate", "crate", "");
Statement stmt = conn.createStatement();
stmt.execute("set datestyle = 'dmy'");

Currently the effect is very minor since CrateDB only supports iso for datestyle. https://cratedb.com/docs/crate/reference/en/5.6/config/session.html

Closing this for now - not a priority, no known use-case.
We can re-open this if a concrete case pops up


Add LICENSE

Hi there, can you please add a LICENSE to the repo?
Planning to package this tool in BlackArch and not having a LICENSE can be problematic.
References:
https://choosealicense.com/
https://tldrlegal.com/

Sure, BSD license was added. Thanks for pointing out


retry on gcloud crashed (OSError)

Fixes #85

What's the cause of gcloud crashed (OSError): unexpected end of data?

What's the cause of gcloud crashed (OSError): unexpected end of data?

Based on Creating temporary tarball archive of 7887 file(s) totalling 47.2 MiB before compression., I'm guessing upload/download from cloud was interrupted, trying to find other examples of this error to confirm.

Thanks @cjx10.
Could you please also add a RESOURCE_EXHAUSTED error? Here is an example.
The error happens when large-scale experiments (e.g., weekly) exceed our GCP's quota limit.

Could you please also add a RESOURCE_EXHAUSTED error?

Sure of course. Shall I open a new pr for this error

Could you please also add a RESOURCE_EXHAUSTED error?

Sure of course. Shall I open a new pr for this error

Whichever suits you the best :)