MDSelectionList items are overlapping

I have been trying making a selectable list with custom widgets as its contents . Whenever I use MDList , everything works perfectly but whenever I use MDSelectionList , if widgets are longer in length , widgets overlap each other . I have posted this issue on reddit with a video demonstrating the issue . Also there is another question , how can I pass texture_size[0] in python code , as whenever I add a widget , the widget gets squashed , you can understand better in the video
here is the post.
https://www.reddit.com/r/kivy/comments/spaha1/mdselectionlist_messing_up_the_contents_of_list/
Thank you for your time.

@USER4247 Attach a minimal code example that reproduces this behavior.

@USER4247 Attach a minimal code example that reproduces this behavior.

here is the code sample in my repository
https://github.com/USER4247/Demo

So what am I doing wrong ? . It works perfectly if I use MDList

@USER4247 https://github.com/kivymd/KivyMD/issues/1182#issuecomment-1035931624

Well , any luck?? . I made a repo because there were some files required for execution and it would have been a headache if I provided em in text here .
Is there something I am doing wrong ?

@USER4247
If you would like to get an answer to your question quickly, please follow the following small terms:
If you get an error in your code, please describe your question in one message and attach MINIMUM CODE .
MINIMUM CODE is:
Code in which there are no unnecessary imports, classes, functions, widgets that are not related to the reproduction of the error.
KV string should be in the code, not in a separate file, for example:
[imports]

KV = """
    ...
"""

class Test(MDApp):
    def build(self):
        return Builder.load_string(KV)

Test().run()

If your code exceeds the allowed number of characters in one message, then this is not the MINIMUM CODE. Your code should run in three clicks: Copy/Paste/Run.
If this is not possible in three clicks, this is NOT the MINIMUM CODE.

I am trying to paste my code in the comment but it's pasting it like this
`[imports]
KV = """
...
"""
class Test(MDApp):
def build(self):
return Builder.load_string(KV)
Test().run()'
My code is about 113 lines long and there is only 1 .py file which has all the essentials to run code .
I am using <> to add code .
I am new to GitHub so please spare me if I did something wrong.

Here is the code
from kivymd.app import MDApp
from kivy.core.window import Window
from kivymd.uix.boxlayout import MDBoxLayout
from kivy.uix.scrollview import ScrollView
from kivymd.uix.list import *
from kivymd.uix.label import MDLabel
from kivy.uix.widget import Widget
from kivy.lang.builder import Builder
from kivymd.uix.button import *
from kivymd.uix.textfield import MDTextField
from kivy.animation import Animation
Window.size=(320,600)
kv = '''
MDBoxLayout:
    orientation: "vertical"
    MDBoxLayout:
        size_hint_y: None
        height: 50
        spacing: 5
        padding: [0, 0, 10, 0]
        MDIconButton:
            id: icon
            icon: "camera"
    ScrollView:
        MDSelectionList: #-----------------> here if its changed to MDList , everything works fine
            id: msglist
    MDBoxLayout:
        padding: [10, ]
        spacing: 5
        size_hint_y:None
        height: 80
        MDTextField:
            id: text
            multiline:True
        MDIconButton:
            icon: "send"
            on_press: app.send_message(text.text)

<ChatBubble@Widget>:
    id: chtbld
    md_bg_color: [0, 0, 0, 0]
    size_hint_y: None
    height: 60
    adaptive_height: True
    padding: [10, 0, 10, 0]
    orientation: 'vertical'
    MDBoxLayout:
        id: box
        height:msg_content.height
        size_hint: None, None
        md_bg_color: app.theme_cls.bg_darkest
        Spacer:
            id: wid1
        MDRelativeLayout:
            id: boxT
            MDLabel:
                id: msg_content
                text: root.msg
                font_size:15
                height: self.texture_size[1]
                width: msg_content.texture_size[0]
                text_size:  [None, None]
                size_hint_y: None
                halign: 'left'
                color: app.theme_cls.opposite_bg_normal
            MDBoxLayout:
                spacing: 3
            Spacer:
                id: wid3
                height: 5
            MDFlatButton:
                #width: 200
                width: msg_content.texture_size[0]
                height:msg_content.texture_size[1]
                size_hint: None, None
                radius: [10, 10, (1, -5), 10] if self.pos_hint == {'right': 1} else [10, 10, 10, (1, -5)]
                md_bg_color: app.theme_cls.bg_darkest
<Spacer@Widget>:
    id: wid
    width: 5
    size_hint: None, None
'''
class ChatBubble(MDBoxLayout):
    msg = StringProperty()
    time = StringProperty()
class ChatApp(MDApp):
    def build(self):
        GUI=Builder.load_string(kv)
        return GUI
    def send_message(self,message):
        self.msg = ChatBubble()
        self.root.ids["text"].text = ""
        self.msg.ids["msg_content"].text = message.strip("you:")
        p = message
        if len(p) <= 5:
            width = 70
        elif 10 < len(p) <=15:
            width = 120
        elif len(p)>25:
            width = 220
        self.root.ids["msglist"].add_widget(self.msg)
    def set_selection_mode(self, instance_selection_list, mode):
        if mode:
            a = self.root.ids['icon'].icon = 'trash-can'
        else:
            icon = self.root.ids["icon"].icon = "camera"
        Animation(d=0.2).start(self.root.ids['Chat_Screen'].ids['headbox'])
    def selected(self,instance_selection_list,instance_selection_item):
        pass
    def unselected(self,instance_selection_list,instance_selection_item):
        pass
if __name__ == "__main__":
    ChatApp().run()

If you change MDSelectionList to MDList , widgets will not overlap
Try it out by writing in something into txtfield and then writing
1
2
3
4
5
6
Widgets will overlap but overlapping doesn't occur in MDList

So , what's the problem here ??

@USER4247 The above code cannot be tested because it is full of bugs. In addition, this is not a minimal example and it does not demonstrate absolutely anything. Edit your code example.

I have removed the unwanted lines in code . Only important part is above the ChatBubble@Widget . Rest of the code is just adding the text input in selectionlist . Anything the user writes is shown inside custom wiget aka ChatBubble@Widget . The problem is with spacing in SelectionList inside ScrollView . Widgets containing user text overlap each other's space . But spacing is fine in case of MDList . Changing SelectionList to MDList auto-spaces everything and widgets dont overlap. Try writing anything then writing  a long list . The list will overlap the previous widgets only in case of SelectionList.

@USER4247 At least 50 lines of code in your example are redundant and have nothing to do with reproducing the error.

Sir , I am still leaning to code . I have tried my best to make a small example of problem that I am facing with SelectionList. Please view the reddit link that I have provided , it explains the problem with a video .

@USER4247 You must attach a minimal code example here.

this time I have shorten the code as well as there is an example pre-loaded in the code. Code is about 70 lines.
from kivymd.app import MDApp
from kivy.core.window import Window
from kivymd.uix.boxlayout import MDBoxLayout
from kivy.uix.scrollview import ScrollView
from kivymd.uix.list import *
from kivymd.uix.label import MDLabel
from kivy.uix.widget import Widget
from kivy.lang.builder import Builder
from kivymd.uix.button import *
from kivymd.uix.textfield import MDTextField
Window.size=(500,500)
kv = '''
MDBoxLayout:
    orientation: "vertical"
    MDBoxLayout:
        size_hint_y: None
        height: 50
        spacing: 5
        padding: [0, 0, 10, 0]
    ScrollView:
        MDSelectionList: #-----------------> here if its changed to MDList , everything works fine
            id: msglist
            size_hint_y:None
    MDBoxLayout:
        padding: [10, ]
        spacing: 5
        size_hint_y:None
        height: 80
        MDTextField:
            id: text
            multiline:True
        MDIconButton:
            icon: "send"
            on_press: app.push_text(text.text)

<Custom_Box@Widget>:
    MDBoxLayout:
        height:msg_content.height
        size_hint: None, None
        md_bg_color: app.theme_cls.bg_darkest
        MDRelativeLayout:
            MDLabel:
                id: msg_content
                text: root.msg
                font_size:15
                height: self.texture_size[1]
                width: self.texture_size[0]
                text_size:  [None, None]
                size_hint_y: None
                halign: 'left'
                color: app.theme_cls.opposite_bg_normal
'''
class Custom_Box(Widget):
    msg = StringProperty()
class SelectionListTest(MDApp):
    def build(self):
        GUI=Builder.load_string(kv)
        return GUI
    def on_start(self):
        example = ['this is example message',"a"*70,'2nd message overlaps first message','following problem does not occur in MDList']
        for data in example:
            self.msg = Custom_Box()
            self.msg.ids["msg_content"].text = data
            self.root.ids["msglist"].add_widget(self.msg)
    def push_text(self,text):
        self.msg = Custom_Box()
        self.root.ids["text"].text = ""
        self.msg.ids["msg_content"].text = text
        self.root.ids["msglist"].add_widget(self.msg)
if __name__ == "__main__":
    SelectionListTest().run()

With all due respect sir , is the problem explained properly , if not , I will rewrite the code.

is my problem clear now ?


Remove unnecessary bootstrap file

I don't see a need for this, as the tests only need to be run with composer autoloader...?

Coverage remained the same at 100.0% when pulling 4ef0b9fe790172d2e45475a0ccd96ae616cc4234 on fix/remove-test-boostrap into 51c4f45649b35c36d36a087a2bf9a87bb350db4d on 2.x.

Coverage remained the same at 100.0% when pulling 4ef0b9fe790172d2e45475a0ccd96ae616cc4234 on fix/remove-test-boostrap into 51c4f45649b35c36d36a087a2bf9a87bb350db4d on 2.x.

Coverage remained the same at 100.0% when pulling 4ef0b9fe790172d2e45475a0ccd96ae616cc4234 on fix/remove-test-boostrap into 51c4f45649b35c36d36a087a2bf9a87bb350db4d on 2.x.


Update to 1.21.1?

Hello :) I would love this plugin to be compatible with 1.21.1

Done :)
Latest release on Modrinth


TEP-0114: Remove support for v1alpha1.Run

v1alpha1.Run has been replaced by v1beta1.CustomRun, and the PipelineRun controller no longer creates v1alpha1.Run objects. This commit removes support for v1alpha1.Run in the PipelineRun controller. It maintains the API fields for v1alpha1.Run for use by clients.
Note: Retries behavior has changed between v1alpha1.Run and v1beta1.CustomRun. The PipelineRun controller does not consider whether CustomRuns have retries remaining to determine whether they have completed; it only considers their status.
/kind cleanup
Closes https://github.com/tektoncd/pipeline/issues/6498
Closes https://github.com/tektoncd/pipeline/issues/5870
Closes https://github.com/tektoncd/pipeline/issues/5863
Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[x] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
[x] Has Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including functionality, content, code)
[x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[x] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
[x] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
action required: v1alpha1.Run objects are no longer supported. You must upgrade to v1beta1.CustomRun before upgrading to this release. See https://github.com/tektoncd/pipeline/blob/main/docs/migrating-v1alpha1.Run-to-v1beta1.CustomRun.md for migration instructions

Thanks! I wonder do need to remove run in config/200-clusterrole.yaml?

Thanks! I wonder do need to remove run in config/200-clusterrole.yaml?

nice catch, thanks!

/retest

/lgtm

/retest


Compare256 function pointer

when e.g. the avx2 target feature is not enabled at compile time, but the feature is available at runtime, this approach reduces branching. We still dispatch statically if the target feature is already enabled at compile time

for level 1
Benchmark 1 (62 runs): target/release/examples/compress-baseline 1 rs silesia-small.tar
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          81.7ms ±  991us    80.3ms … 87.8ms          3 ( 5%)        0%
  peak_rss           26.7MB ± 53.8KB    26.6MB … 26.7MB         13 (21%)        0%
  cpu_cycles          305M  ± 3.65M      298M  …  328M           5 ( 8%)        0%
  instructions        661M  ±  278       661M  …  661M           0 ( 0%)        0%
  cache_references   19.8M  ±  185K     19.5M  … 20.8M           2 ( 3%)        0%
  cache_misses        432K  ± 86.9K      336K  …  783K           2 ( 3%)        0%
  branch_misses      2.94M  ± 8.26K     2.88M  … 2.96M           2 ( 3%)        0%
Benchmark 2 (63 runs): target/release/examples/blogpost-compress 1 rs silesia-small.tar
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          80.3ms ±  584us    78.7ms … 83.1ms          2 ( 3%)        ⚡-  1.6% ±  0.3%
  peak_rss           26.7MB ± 63.2KB    26.5MB … 26.7MB          0 ( 0%)          -  0.0% ±  0.1%
  cpu_cycles          299M  ± 2.38M      293M  …  312M           3 ( 5%)        ⚡-  2.0% ±  0.4%
  instructions        620M  ±  255       620M  …  620M           1 ( 2%)        ⚡-  6.2% ±  0.0%
  cache_references   19.7M  ±  146K     19.5M  … 20.2M           3 ( 5%)          -  0.8% ±  0.3%
  cache_misses        409K  ± 74.2K      311K  …  664K           1 ( 2%)          -  5.3% ±  6.6%
  branch_misses      2.95M  ± 15.7K     2.87M  … 2.96M           2 ( 3%)          +  0.6% ±  0.2%

This shows an improvement on x86_64 Intel as well (compiled with RUSTFLAGS="-Ctarget-cpu=native"). I had to add an unsafe block to line 15 of compare256.rs to get it to compile.
Benchmark 1 (69 runs): ./blogpost-compress-baseline 1 rs silesia-small.tar
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          73.1ms ± 2.22ms    71.5ms … 89.2ms          3 ( 4%)        0%
  peak_rss           26.7MB ± 66.0KB    26.6MB … 26.7MB          0 ( 0%)        0%
  cpu_cycles          280M  ± 1.28M      278M  …  289M           2 ( 3%)        0%
  instructions        568M  ±  224       568M  …  568M           0 ( 0%)        0%
  cache_references    268K  ± 30.3K      262K  …  516K           3 ( 4%)        0%
  cache_misses        232K  ± 6.58K      203K  …  245K           8 (12%)        0%
  branch_misses      2.94M  ± 4.65K     2.93M  … 2.96M           3 ( 4%)        0%
Benchmark 2 (69 runs): ./target/release/examples/blogpost-compress 1 rs silesia-small.tar
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          72.5ms ±  707us    71.6ms … 75.1ms          7 (10%)          -  0.9% ±  0.8%
  peak_rss           26.6MB ± 66.1KB    26.5MB … 26.7MB          0 ( 0%)          -  0.1% ±  0.1%
  cpu_cycles          280M  ±  716K      279M  …  282M           0 ( 0%)          +  0.3% ±  0.1%
  instructions        559M  ±  257       559M  …  559M           1 ( 1%)        ⚡-  1.6% ±  0.0%
  cache_references    266K  ± 5.77K      263K  …  308K           7 (10%)          -  0.9% ±  2.7%
  cache_misses        230K  ± 7.94K      200K  …  242K           9 (13%)          -  1.0% ±  1.1%
  branch_misses      2.96M  ± 6.81K     2.95M  … 2.98M           0 ( 0%)          +  0.7% ±  0.1%

At compression level 2 and higher, I don't see an improvement, but there's no regression either.


Removed trailing commas in objects, which cause error in IE8 and bellow

Nice, thank you!

Sorry, you closed pr because there too minor changes?

Oops, I meant to merge it! Pressed the wrong button I guess :/ Thanks for clarifying!


Can't get attribute 'SPPF'

Describe the bug
I get  Can't get attribute 'SPPF' on <module 'models.common' from 'PATH_TO_DIR/sparseml/integrations/ultralytics-yolov5/yolov5/models/common.py'> when I try to train using train.py from the yolov5 within sparseml
Expected behavior
train.py should train my model
Environment

OS [e.g. Ubuntu 18.04]: Windows 10
Python version [e.g. 3.7]: 3.7 (Conda)
SparseML version or commit hash [e.g. 0.1.0, f7245c8]: 0.9.0
ML framework version(s) [e.g. torch 1.7.1]: torch 1.7.0
Other Python package versions [e.g. SparseZoo, DeepSparse, numpy, ONNX]:
Other relevant environment information [e.g. hardware, CUDA version]:
IDE: PyCharm 2021.3
GPU: NVIDIA GeForce RTX 2080 Founders Edition
CPU: AMD Ryzen 5 3600
CUDA:

To Reproduce
(anaconda prompt)
Clone sparseml repository
cd to integrations/ultralytics-yolov5
run setup_integration.sh
cd to yolov5
python train.py --cfg ../models/yolov5s.yaml --weights yolov5s.pt --data D:/Projects/Python/ML/Aimbot/yolov5/data/12-22_V1.yaml --hyp data/hyp.scratch.yaml
Errors

Additional context
I was able to train the model with the exact same command (file paths adjusted accordingly) with standalone yolov5 on a standalone local directory, however this issue only arises when I try to train using the yolov5 within sparseml/integrations/ultralytics-yolov5.

Hi @yDing121, we believe the issue happening here is the default weights loading from Ultralytics are improperly serialized and conflicting with the local Windows environment. Could you try and replace --weights yolov5s.pt with --weights zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/base-none?
One note I want to call out, though, is that we currently have limited support for Windows platforms and is not part of our current pathways for testing. If you have access to a Linux server or VM this also may remedy the issue.
Thanks,
Mark

Hi @yDing121, the fix for this is up on our nightly now (pip install sparsify-nightly). Can you try it out and let us know if you have any issues? Will follow up once this is live on our main release pathway as well.

Hey Mark,
I will be testing this shortly.
From: Mark Kurtz @.>
Sent: Monday, January 24, 2022 10:15 AM
To: neuralmagic/sparseml @.>
Cc: Yilang (Lance) Ding @.>; Mention @.>
Subject: Re: [neuralmagic/sparseml] Can't get attribute 'SPPF' (Issue #492)
Hi @yDing121https://github.com/yDing121, the fix for this is up on our nightly now (pip install sparsify-nightly). Can you try it out and let us know if you have any issues? Will follow up once this is live on our main release pathway as well.
—
Reply to this email directly, view it on GitHubhttps://github.com/neuralmagic/sparseml/issues/492#issuecomment-1020206089, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AU5Y7STDHM2WZBL4A4C4U33UXVUGVANCNFSM5KTE7K5A.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

@yDing121 I followed your guide to install sparsify-nightly but got the same Can't get attribute 'SPPF' error.
Then I found similar issue from yolov5 official github. AttributeError: Can't get attribute 'SPPF' #5175. The post suggested that we can downgrade our yolov5.pt to tag v5.0.
It works for me.

Thank you @kuonumber for your update! Glad to hear it worked!
@yDing121 Let us know if you found similar success.
Best, Jeannie / Neural Magic

With no further comments on this thread, I am going to go ahead and close this issue. Please feel free to re-open if you want to continue the conversation. If you feel inclined, please ⭐ our repo if not already; we appreciate the community support! https://github.com/neuralmagic/sparseml/stargazers
Thank you!
Jeannie / Neural Magic


Add conversion to float for comparison on GPU/CUDA

Signed-off-by: Beat Buesser<EMAIL_ADDRESS>Description
This pull request adds a missing conversion to float for comparison on GPU/CUDA in PyTorchClassifier.
Fixes #2014
Type of change
Please check all relevant options.

[ ] Improvement (non-breaking)
[x] Bug fix (non-breaking)
[ ] New feature (non-breaking)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Codecov Report

Merging #2022 (b4a6cb3) into dev_1.13.1 (c4d0799) will decrease coverage by 62.99%.
The diff coverage is 0.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@               Coverage Diff               @@
##           dev_1.13.1    #2022       +/-   ##
===============================================
- Coverage       85.42%   22.44%   -62.99%
===============================================
  Files             290      290
  Lines           25448    25427       -21
  Branches         4576     4576
===============================================
- Hits            21740     5708    -16032
- Misses           2539    19639    +17100
+ Partials         1169       80     -1089

Impacted Files
Coverage Δ

art/estimators/classification/pytorch.py
11.84% <0.00%> (-74.04%)
:arrow_down:

art/evaluations/evaluation.py
0.00% <0.00%> (-100.00%)
:arrow_down:

art/estimators/object_detection/utils.py
0.00% <0.00%> (-100.00%)
:arrow_down:

art/evaluations/security_curve/__init__.py
0.00% <0.00%> (-100.00%)
:arrow_down:

art/attacks/poisoning/perturbations/__init__.py
0.00% <0.00%> (-100.00%)
:arrow_down:

...essing/expectation_over_transformation/__init__.py
0.00% <0.00%> (-100.00%)
:arrow_down:

...rmation/natural_corruptions/contrast/tensorflow.py
0.00% <0.00%> (-100.00%)
:arrow_down:

...formation/natural_corruptions/zoom_blur/pytorch.py
0.00% <0.00%> (-93.94%)
:arrow_down:

...mation/natural_corruptions/zoom_blur/tensorflow.py
0.00% <0.00%> (-93.55%)
:arrow_down:

art/attacks/evasion/shapeshifter.py
5.89% <0.00%> (-93.30%)
:arrow_down:

... and 220 more

Hi Beat, thank you for the review. Looks good on my end and fixes the reported bug!


How do I connect the OV5642 to an Arduino Mega?

Hi Arducam,
I have been testing out the OV5642 on my Arduino UNO and it has been working quite well. However, for my main project, I need to move it over to an Arduino MEGA , but when I switch to this Arduino it just gives me an SPI Interface Error. I am hooking it up to the exact same pins in the two arduinos but it is only working for the UNO. What should I do to fix this? I am using the LowPowerMode example for the arducam mini.
Thanks!

@jwerbs1217
Hi,
What's your SPI CS ?Please attach us some pictures about your phenomenon.
Let us know if you need more help.
Regards,
ArduCAM support team.

For anyone with this issue in the future, I figured it out. Connect MISO MOSI SCK to 50 51 52 respectively, CS to any digital pin (in the code this is designated as SPI_CS), VCC to 5V, GND to GND, and SDA and SCL to 20 and 21 respectively.

@jwerbs1217
Hi,
Please connect the SPI signal from ISCP.
Please refer to the picture we attached to you.

Let us know if you need more help.
Regards,
ArduCAM support team.


Fix Negative Lookback Groups

Python's regex only allows fixed-length strings for lookbacks; change
from variable-length lookback strings to instead be looking for spaces,
implying a multi-word string.
Fixes https://github.com/quisquous/cactbot/issues/2626

Thank you!


Row property 'mainAxisAlignment: MainAxisAlignment.spaceEvenly' issue

Row(
    mainAxisAlignment: MainAxisAlignment.spaceEvenly
    children: [
        WidgetOne,
        WidgetTwo,
        conditionalCheck ? WidgetThree : Container(),
        WidgetFour
    ]
)

When it renders, the wigets will not be evenly placed if thee conditional check is false and returns an empty container that contains no space

True but you could use this instead:
class RowIssue extends StatelessWidget {
final emptyContainer = Container();
@override
Widget build(BuildContext context) {
bool conditionalCheck = false;
return Scaffold(
body: SafeArea(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
WidgetOne(),
WidgetOne(),
conditionalCheck ? WidgetOne() : emptyContainer,
WidgetOne()
].where((elem) => elem != emptyContainer).toList()),
),
);
}
}
Not the best performance-wise but it does the trick!

Hi @therenca , could you please share the output of flutter doctor -v and the minimal  complete reproducible code with the output. I tried with the below code sample and it looks good to me.
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        home: Scaffold(
            body: Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: [
            ChildWidget(
              color: Colors.green,
            ),
            ChildWidget(),
            ChildWidget(
              color: Colors.blue,
            )
          ],
        )));
  }
}

Thank you.

Hello @therenca I think his issue relates to the spaceEvenly not performing as it should when a conditional check is used to render an empty container or SizedBox within the row.
Please try this in your own example, I believe his issue stands

Hi @josh-burton, I did try that, but It wouldn't be possible to figure out the cause without looking at the complete code, I did try a conditional sample though but could not reproduce it.

code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}
class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool toggleOff = true;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        home: Scaffold(
            floatingActionButton: FloatingActionButton(
                child: Icon(toggleOff ? Icons.toggle_off : Icons.toggle_on),
                onPressed: () {
                  setState(() {
                    toggleOff = !toggleOff;
                  });
                }),
            body: Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: [
                ChildWidget(
                  color: Colors.blue,
                ),
                toggleOff ? ChildWidget() : Container(),
                ChildWidget(
                  color: Colors.green,
                )
              ],
            )));
  }
}

class ChildWidget extends StatelessWidget {
  final Color color;
  const ChildWidget({Key? key, this.color = Colors.red}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(width: 100, color: color);
  }
}

Output
https://user-images.githubusercontent.com/31410839/129394904-ff07b73b-445b-4e71-9aab-93ca7de73058.mov

Hello @maheshmnj Your conditional sample does seem to share the same issue as we can see that the two Child Widgets aren't spaced evenly.
Based on your sample an accurate Row with MainAxisAlignment.spaceEvenly would be like this:

@josh-umahi, thanks for the clarification I can replicate the issue, It seems conditional statement has nothing to do with this issue, This issue occurs when we add a widget with no dimensions in a Row e,g Container() or SizedBox()

code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

final darkNotifier = ValueNotifier<bool>(false);

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool toggleOff = true;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        home: Scaffold(
            floatingActionButton: FloatingActionButton(
                child: Icon(toggleOff ? Icons.toggle_off : Icons.toggle_on),
                onPressed: () {
                  setState(() {
                    toggleOff = !toggleOff;
                  });
                }),
            body: Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: const [
                ChildWidget(
                  color: Colors.blue,
                ),
                ChildWidget(
                  color: Colors.green,
                ),
                SizedBox(),
              ],
            )));
  }
}

Output
The output shows when the sizedbox is positioned inside the row as

First child
Centered child
last child

A container without a child will size itself to be as large as possible. That's probably why it looks like the children are no longer spaced evenly.


Unify optimize calls between top-level select and sub-select

Side effect of the change is that this now enables fetch optimization
for sub-queries.
Given the impact of this, I'd hold this off for 5.8

Good call. Looks like this makes it worse in some cases:
Three node cluster
Q: select * from articles where id in (select id from colors where coolness > 0) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |       88.784 ±   24.866 |     76.193 |     84.462 |     89.902 |    327.791 |
|   V2    |       92.580 ±   27.771 |     80.273 |     88.493 |     91.625 |    335.170 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               +   4.19%                           +   4.66%
There is a 84.93% probability that the observed difference is not random, and the best estimate of that difference is 4.19%
The test has no statistical significance

Q: select * from articles where id in (select id from colors where coolness > 0 limit 100) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |        4.599 ±    2.740 |      3.106 |      4.121 |      4.438 |     29.793 |
|   V2    |        5.395 ±    1.312 |      4.142 |      5.122 |      5.517 |     14.346 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               +  15.93%                           +  21.65%
There is a 99.98% probability that the observed difference is not random, and the best estimate of that difference is 15.93%
The test has statistical significance

Q: select * from articles where id in (select id from colors where coolness > 0 limit 10) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |        3.274 ±    1.143 |      2.350 |      3.161 |      3.458 |     16.142 |
|   V2    |        2.901 ±    1.261 |      2.202 |      2.683 |      2.993 |     17.781 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               -  12.08%                           -  16.36%
There is a 99.79% probability that the observed difference is not random, and the best estimate of that difference is 12.08%
The test has statistical significance

Q: select * from articles where id not in (select id from colors where coolness > 0) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |      414.548 ±    9.325 |    401.679 |    412.644 |    417.640 |    462.819 |
|   V2    |      424.616 ±   11.068 |    408.753 |    423.037 |    427.560 |    478.425 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               +   2.40%                           +   2.49%
There is a 100.00% probability that the observed difference is not random, and the best estimate of that difference is 2.40%
The test has statistical significance

Single node cluster
# Results (server side duration in ms)
V1: 5.8.0-e0a9b0b6782cc893871e9cdf1a19d49729e85a1f
V2: 5.8.0-f388324fba1b2ea85de6a3a52d3a17e9476189d5

Q: select * from articles where id in (select id from colors where coolness > 0) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |       85.310 ±   22.863 |     79.978 |     82.517 |     84.617 |    399.319 |
|   V2    |       89.104 ±   23.844 |     83.179 |     85.835 |     87.945 |    410.937 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               +   4.35%                           +   3.94%
There is a 89.49% probability that the observed difference is not random, and the best estimate of that difference is 4.35%
The test has no statistical significance

Q: select * from articles where id in (select id from colors where coolness > 0 limit 100) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |        1.902 ±    1.807 |      1.224 |      1.567 |      1.959 |     22.871 |
|   V2    |        2.988 ±    0.906 |      2.306 |      2.761 |      3.176 |     13.415 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               +  44.41%                           +  55.17%
There is a 100.00% probability that the observed difference is not random, and the best estimate of that difference is 44.41%
The test has statistical significance

Q: select * from articles where id in (select id from colors where coolness > 0 limit 10) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |        1.062 ±    0.147 |      0.854 |      1.045 |      1.106 |      2.450 |
|   V2    |        1.185 ±    0.167 |      0.998 |      1.157 |      1.230 |      2.832 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               +  10.93%                           +  10.19%
There is a 100.00% probability that the observed difference is not random, and the best estimate of that difference is 10.93%
The test has statistical significance

Q: select * from articles where id not in (select id from colors where coolness > 0) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |      429.877 ±    9.959 |    421.066 |    428.179 |    431.825 |    546.776 |
|   V2    |      416.736 ±   10.045 |    408.934 |    414.852 |    418.107 |    525.040 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               -   3.10%                           -   3.16%
There is a 100.00% probability that the observed difference is not random, and the best estimate of that difference is 3.10%
The test has statistical significance

Relates a bit to:

https://github.com/crate/crate/issues/11285 and we could also consider having a cost model for fetch/non-fetch (https://github.com/crate/crate/issues/14146)

I'll put this on hold for now. After https://github.com/crate/crate/issues/15548 where we may eliminate some of the differences we can decide on how to proceed here.

I've brought this up-to-date locally, and there are a few failing tests, mainly around Eval phases missing in plans:
[ERROR]   CorrelatedSubqueryITest.test_where_exists_with_correlated_subquery:225
expected:
  "Eval[x]
    └ Filter[EXISTS (SELECT x FROM (empty_row))]
      └ CorrelatedJoin[x, (SELECT x FROM (empty_row))]
        └ Rename[x] AS t
          └ TableFunction[generate_series | [generate_series] | true]
        └ SubPlan
          └ Eval[x]
            └ Limit[1;0]
              └ TableFunction[empty_row | [x] | true]
  "
 but was:
  "Eval[x]
    └ Filter[EXISTS (SELECT x FROM (empty_row))]
      └ CorrelatedJoin[x, (SELECT x FROM (empty_row))]
        └ Rename[x] AS t
          └ TableFunction[generate_series | [generate_series] | true]
        └ SubPlan
          └ Limit[1;0]
            └ TableFunction[empty_row | [x] | true]

Are these expected changes?

Are these expected changes?

I think these are related to c7ea2e0005c1c8ad583373e47ebb93f156c8b9f5 and are expected, so I'll fix them.

It looks as though it doesn't make a measureable difference on the queries tested above:

Q: select * from articles where id in (select id from colors where coolness > 0) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |       33.604 ±   13.451 |     29.918 |     31.234 |     32.573 |    208.353 |
|   V2    |       33.326 ±   15.248 |     29.891 |     30.748 |     31.450 |    233.762 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               -   0.83%                           -   1.57%
There is a 15.29% probability that the observed difference is not random, and the best estimate of that difference is 0.83%
The test has no statistical significance

Q: select * from articles where id in (select id from colors where coolness > 0 limit 100) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |        1.710 ±    1.945 |      0.970 |      1.137 |      1.281 |     24.015 |
|   V2    |        1.488 ±    0.562 |      1.129 |      1.399 |      1.552 |      8.694 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               -  13.87%                           +  20.72%
There is a 87.77% probability that the observed difference is not random, and the best estimate of that difference is 13.87%
The test has no statistical significance

Q: select * from articles where id in (select id from colors where coolness > 0 limit 10) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |        0.833 ±    0.094 |      0.707 |      0.813 |      0.852 |      1.351 |
|   V2    |        0.825 ±    0.093 |      0.706 |      0.811 |      0.866 |      1.727 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               -   1.03%                           -   0.22%
There is a 63.48% probability that the observed difference is not random, and the best estimate of that difference is 1.03%
The test has no statistical significance

Q: select * from articles where id not in (select id from colors where coolness > 0) limit 10000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |      404.490 ±    9.796 |    400.342 |    401.866 |    402.570 |    466.668 |
|   V2    |      404.974 ±   20.045 |    400.631 |    402.198 |    402.876 |    659.557 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               +   0.12%                           +   0.08%
There is a 24.10% probability that the observed difference is not random, and the best estimate of that difference is 0.12%
The test has no statistical significance

It looks as though it doesn't make a measureable difference on the queries tested above:

A query that got notably worse in the first benchmark is
select * from articles where id in (select id from colors where coolness > 0 limit 100) limit 10000
It was +15.93% on multi-node, +  44.41%  on a single node.
Looks like results got better in the last benchmark?

13.87%

Looks like results got better (- 13.87%) for this query in the last benchmark?

The mean improved, but the median got worse (+20.72%).  These runs are quite noisy, however, and the benchmark reports no statistical significance to the differences.  I think it's probably worth merging in any case as it improves the code?

I'd say get it in. If nightly benchmarks show regressions we can still investigate or revert.

@Mergifyio squash title+body

retest this please


Axis label are not in the same precision as original plot

When exporting this simple plot:
import matplotlib.pyplot as plt

plt.ylim([0.635, 0.665])
plt.grid()

the label on the y axis in the result are labeled to 2-digit precision.
I'd expect a behavior similar to matplotlib, i.e. 3-digit precision.

Can you post the output tex too?

Sure.
% This file was created by matplotlib2tikz v0.6.2.
\begin{tikzpicture}

\begin{axis}[
xmin=0, xmax=1,
ymin=0.635, ymax=0.665,
tick align=outside,
xmajorgrids,
x grid style={lightgray!92.026143790849673!black},
ymajorgrids,
y grid style={lightgray!92.026143790849673!black}
]
\end{axis}

\end{tikzpicture}

Alright, so that looks fairly normal.
What happens here is that default settings from matplotlib are translated into default settings in pgfplots. Those simply happen to differ.
Trying to imitate exactly what mpl looks like would probably make the output file a mess. (Think of legend border colors, fonts, etc.)
What you're looking for is the extra argument to save(), and you want to supply a pgfplots command for specifying the data precision. Not sure what that is right now, but you'll find it in the manual.

Seems fair.
Now let's say I add:
fig, ax = plt.subplots()
ax.yaxis.set_major_formatter(FormatStrFormatter('%.3f'))

to the plot above. Shouldn't be it translated to pgfplots? (it is not...)

Hm, yeah, the number formats aren't considered at all. Perhaps this can be fixed after all...


Write capabilities

Users should be able to write Models back to a file.

roxmltree hampers this feature (that is why is read only xmltree).
Consider quick-xml.

It is working now!


Automatic tree-shaking of messages

It would be beneficial for performance if we could analyse what messages are used on a given page and only return those from getInitialProps.
There's babel-plugin-inline-i18n-messages but it has some limitations with Next.js currently (https://github.com/hjylewis/babel-plugin-inline-i18n-messages/issues/6).
In order to support also static rendering, what we'd have to do is:

Before the Next.js build runs, we have to make a webpack build of every page which should emit all module names on a page. Also lazy loaded components should be included.
We can use these module names to read the files and detect which messages are used. By doing this, we'll have to force the user to use the exported APIs directly and will disallow e.g. the wrapping of useTranslations. This is a similar limitation as what react-intl has.
Run the actual Next.js build and use the map of used messages on a page within getInitialProps to slice off unneeded messages.

An alternative (or possibly addition) is a concept based on the recently announced server components.
Code like this:
function LatestFollower({user}) {
  const t = useTranslations('LatestFollower');

  function onFollowClick() {
    UserAPI.follow(user.id);
  }

  return (
    <>
      <Text>{t('latestFollower', {username: user.name})}</Text>
      <IconButton
        aria-label={t('followBack')}
        icon={<FollowIcon />}
        onClick={onFollowClick}
      />
    </>
  );
}

… could be turned into:
function LatestFollowerServer({user}) {
  const t = useTranslations('LatestFollower');

  return (
    <LatestFollowerClient
      $1={<Text>{t('latestFollower', {username: user.name})}</Text>}
      $2={t('followBack')}
      $3={<FollowIcon />}
    />
  );
}

function LatestFollowerClient({$1, $2, $3, user}) {
  function onFollowClick() {
    UserAPI.follow(user.id);
  }

  return (
    <>
      {$1}
      <IconButton aria-label={$2} icon={$3} onClick={onFollowClick} />
    </>
  );
}

These are the interactive features that React currently has:

useState
useReducer
use(Layout)Effect
refs (and thus useImperativeHandle)
event listeners

Most are easy to detect, but event listeners seem a bit tough, since it could potentially be a render prop. A convention like on[A-Z].* would definitely help here.

For very performance critical apps, it might make sense to use components that make use of next-intl only on the server side and to provide labels as strings to interactive client components. That way you wouldn't have to tree shake anything.

For very performance critical apps, it might make sense to use components that make use of next-intl only on the server side and to provide labels as strings to interactive client components. That way you wouldn't have to tree shake anything.

A manual approach seems easy and reliable: https://github.com/amannn/next-intl/pull/62

Thanks @amannn for sharing this with me. For those who might be interested, we built a similar Babel plugin solution that works on Next.js: https://github.com/Avansai/next-multilingual
Of course, as called out, one of the drawbacks is that all locales are loaded in the same bundle which increases the size. I am planning to try to find a solution as we are adding an SWC version of the plugin.

@yashvesikar just shared a POC for a webpack plugin that extracts messages based on page entry points with me: https://github.com/yashvesikar/next-intl-translation-bundler-example
I'm still mind blown 🤯
AFAICT what we'd have to do (assuming we'd implement this for the app directory) is:

Detect all entry points. In the POC, every file is treated as an "entry point", meaning that it will emit translations. This would need to be adapted to only handle modules that have the 'use client' banner as these are the boundaries where we're switching to the client side.
For every entry point, traverse the module graph and find all references to useTranslations/t and collect the namespaces.
Emit the translations per entry point.

The other part is that this is a webpack plugin, no idea if these will be supported by Turbopack or if we'd have to implement it in Rust instead (if Turbopack even supports plugins at this point).

@amannn Unfortunately, I don't have much knowledge of the app directory and all that RSC entails. I can speak to some of the advancements I implemented to this logic in the past and some of the ones I didn't get to.

Support for colocated translations by component — Similar to CSS modules. This has a few advantages:

IMO it's easier to spot and fix & address translation bugs and errors.
Gives the translation plugin full control over the key names and allows the user to use TS type checking! (rough idea) i.e.

// src/components/my-component/i18n/en-US.json
{"title": "Title in English", "other": "Some other Key that won't be bundled"}
// src/components/my-component/i18n/fr.json
{"title": "Title in French"}

// src/components/my-component/i18n/index.ts
// loader can check that the keys match the ones in the main locale json
let translations = {title: "title"} as const

// src/components/my-component/my-component.tsx
import { translations } from "/.i18n

export const MyComponent() => {
	// by modifying the useTranslations hook we can make t(key) have key be typeof translations
	const t = useTranslations(translations);

	return(
		<div>{t(translations.title)}</div>
	)
}

Figuring out how to get Webpack to load the translation files as dependencies.
Right now in the POC, I made the server is loading the files from the disk using fs.readFileSync. This is probably the worst way to read that data for high-traffic scenarios because it is a blocking call. Even making that call async will be much better, even better might be to figure out how to have Webpack resolve the dependency itself such that the translations for a given page/path are available to the getServerSideProps function the same way any other import would be. I spent a little time looking into that but Webpack beat me 😅
An open question is whether caching would be better done this way or via a separate network request with a long max-age.

Improving the HMR, right now the HMR in dev kinda works. The POC plugin will build the right translation output files the first time the page is loaded in dev, but if the translation JSON file is changed the server needs to be restarted.

Some known limitations are that the Webpack parser is very limited and fickle. It's not a great way to traverse the AST to get all the keys, but since it's a single toolchain it is nice. I don't have any experience in SWC or TurboPack parsers but I have a hard time imagining they are worse than Webpack.
There are a few more things but I will leave it here for now. Sorry for the wall of text, happy that this may be useful to the project :)

Hey @yashvesikar, thanks a lot for chiming in here and sharing your thoughts in detail!

Support for colocated translations by component

That's an interesting one, I think @nbouvrette is exploring something similar to this.
At least for next-intl, I'm currently not pursuing this direction though and rather try to make it easy to work with message bundles per locale as from my experience this integrates well with using translation management systems. We do have type checking though btw.!

Improving the HMR

Good point! That's something that's working fairly well currently, I'd have to investigate this for sure.

I don't have any experience in SWC or TurboPack parsers but I have a hard time imagining they are worse than Webpack.

😆 Well, I've read that Turbopack is adding support for Webpack loaders, I'm not sure what the story for plugins is though. This topic is generally a bit futuristic at this point and Turbopack is still quite experimental from what I know. At least for the time being, a webpack plugin would definitely be the way to go.

(continuing from our Twitter thread) in nextjs every page is an entrypoint + a main entrypoint for shared assets. so extracting all keys for a page is the same as by entrypoint. the webpack docs are simultaneously really useful and not useful enough 😅

Hmm, I just console.log'd the entry points—and I can confirm the part with the pages being entry points! But e.g. if pages/A.tsx imports components/Profile.tsx, how can I find this reference to process the dependency graph recursively?
Generally I'm currently still quite busy with the RSC integration for next-intl, but your thoughts are really helpful here, I hope to find some time to revisit this topic in the future! Made me laugh the other day when I saw that this was issue #1! 😄

Great to see I'm not the only one wanting to solve this problem. I don't know if you guys saw but I split the next-multilingual logic that dynamically loads message modules into this package: https://github.com/Avansai/messages-modules
It uses Babel to dynamically inject the message in their local scope which is pretty neat but one optimization I would like to fix is that it loads all locales and not just the one being viewed... which of course would end up causing performance issues in the long run. But I think it's still better than a huge message file containing messages that are not even used
The big problem ahead is that from what I understood the app directory cannot use Babel... so basically I will need to rewrite this package in Rust so that it can work with SWC.
If you guys are interested to team up, I would be more than happy to get some help. Otherwise, I will most likely work on this later this year (Q3?) which should also give extra time to make the app directory more stable

Maybe something like like this can help to omit loading all translation files at ones, esp. the caching strategy is interesting here one variant of the server part. https://github.com/QuiiBz/next-international/blob/v2/packages/next-international/src/app/server/create-get-scoped-i18n.ts
The client part especially how translations are instructed to load is also interesting, also this requires no plugin.
Maybe this helps
Thx!

In next-international, getScopedI18n is about being able to provide a namespace, which is not supported by getI18n as far as I understand. Loading of messages upfront via createI18nServer/createI18nClient  is the same for either API. That's at least my understanding.
next-intl handles both cases with one API via getTranslations(namespace?) and useTranslations(namespace?).
The current plan for this feature is to collect namespaces and keys with a compiler!

I apologize for the misunderstanding in my earlier message about scoped translations - I should have read the documentation more thoroughly. Scoped translations help streamline code by reducing redundancy.
getI18n vs getScopedI18n
const t = getI18n();
console.log(t('pages.settings.published'));
console.log(t('pages.settings.title'));

const t = useScopedI18n('pages.settings');
console.log(t('published'))
console.log(t('title'));

No worries! Yep, I agree that scoping translations is helpful. next-intl is heavily based on that too! 🙂

Is there any progress?

@amannn Will this be covered in the v4 release? https://github.com/amannn/next-intl/pull/1412

@stramel Not yet, no. I was generally a bit busy with other tasks recently, but I'm planning to pick up this topic again early next year to hopefully introduce this in the v4 range.
The current state is that there's a promising proof of concept (see https://github.com/amannn/next-intl/issues/1#issuecomment-1497645889) that seems to show that this can be done. I'd like to explore this topic in combination with https://github.com/amannn/next-intl/issues/962 since these topics are related.
I'll keep this issue updated once I have more. Thanks everyone for showing so much interest in this feature, I absolutely know this is an important feature for many of you!


Add capability to specify proxy for Artifactory repository replications

Is your feature request related to a problem? Please describe.
I have a use case where I am trying to configure Artifactory replications through Terraform and need to be able to set a proxy for the replication.
Describe the solution you'd like to see
Add support for setting the proxy when creating a new replication.  After support is added in this repo, changes will also be needed for https://github.com/jfrog/terraform-provider-artifactory.
Describe alternatives you've considered
N/A
Additional context

https://github.com/atlassian/go-artifactory/pull/33 tried adding support for it when terraform-provider-artifactory was using that repo for the client.  We were using that until we upgraded to Artifactory 7.x where the JSON API for GET and POST replications was slightly changed.

PR here: https://github.com/jfrog/jfrog-client-go/pull/524


https://tny.so

Domain
https://tny.so
Link
https://tny.so/NNj9W
Version
0.0.0
What browsers are you seeing the problem on?
Brave
What OS are you seeing the problem on?
Windows
(Optional) Anything else?


fix: Update proxy settings for atlas in docker-compose

Summary of Changes
Update proxy settings for atlas in docker-compose, I removed http:// from the host and added an environment variable that disables encrypted traffic (as suggested by @verdan).
Documentation
Current settings are contacting non-existent URL, fix will ensure that the docker-compose for Atlas works again.
CheckList
Make sure you have checked all steps below to ensure a timely review.

[x] PR title addresses the issue accurately and concisely, including a title prefix.
[x] PR includes a summary of changes.
[x] My commits follow the guidelines from "How to write a good git commit message"

please signoff your PR @Whazor then we're good to go!


Window switcher ALT + ` does not work

Hello,
As title says, ALT + ` does not work.

Windows 10
Window Switcher v1.10.1
Microsoft Sculpt Ergonomic Keyboard - https://www.laptopoutlet.co.uk/microsoft-sculpt-mouse-5kv-00005.html

window-switcher.ini
# Whether to show trayicon, yes/no
trayicon = yes

[switch-windows]

# Hotkey to switch windows
hotkey = alt+`

# List of hotkey conflict apps
# e.g. game1.exe,game2.exe
blacklist =

# Ignore minimal windows
ignore_minimal = no

[switch-apps]

# Whether to enable switching apps
enable = no

# Hotkey to switch apps
hotkey = alt+tab

# Ignore minimal windows
ignore_minimal = no

[log]

# Log level can be one of off,error,warn,info,debug,trace.
level = debug

# Log file path.
# e.g.
#   window-switcher.log (located in the same directory as window-switcher.exe)
#   C:\\bin\\window-switcher.log (full path)
path = window-switcher.log

window-switcher.log
[00:00:00.000] (2ef4) INFO   start config=Config { trayicon: true, log_level: Debug, log_file: Some("C:\\Users\\Matthew\\Google Drive\\Programs\\window-switcher.log"), switch_windows_hotkey: Hotkey { id: 1, name: "switch windows", modifier: [VIRTUAL_KEY(164), VIRTUAL_KEY(165)], code: 192 }, switch_windows_blacklist: {""}, switch_windows_ignore_minimal: false, switch_apps_enable: false, switch_apps_hotkey: Hotkey { id: 2, name: "switch apps", modifier: [VIRTUAL_KEY(164), VIRTUAL_KEY(165)], code: 9 }, switch_apps_ignore_minimal: false }
[00:00:00.006] (2ef4) INFO   foreground watcher start
[00:00:00.007] (2ef4) INFO   keyboard listener start
[00:00:00.007] (2ef4) DEBUG  is_admin true
[00:00:00.128] (2ef4) INFO   trayicon registered
[00:00:03.343] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 163, scanCode: 29, flags: KBDLLHOOKSTRUCT_FLAGS(1), time: 176088703, dwExtraInfo: 0 }
[00:00:03.471] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 78, scanCode: 49, flags: KBDLLHOOKSTRUCT_FLAGS(0), time: 176088828, dwExtraInfo: 0 }
[00:00:03.489] (2ef4) DEBUG  foreground explorer.exe false
[00:00:03.583] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 78, scanCode: 49, flags: KBDLLHOOKSTRUCT_FLAGS(128), time: 176088937, dwExtraInfo: 0 }
[00:00:03.705] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 163, scanCode: 29, flags: KBDLLHOOKSTRUCT_FLAGS(129), time: 176089062, dwExtraInfo: 0 }
[00:00:07.119] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 164, scanCode: 56, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176092484, dwExtraInfo: 0 }
[00:00:07.407] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176092765, dwExtraInfo: 0 }
[00:00:07.535] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(160), time: 176092890, dwExtraInfo: 0 }
[00:00:07.783] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176093140, dwExtraInfo: 0 }
[00:00:07.911] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(160), time: 176093265, dwExtraInfo: 0 }
[00:00:08.095] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176093453, dwExtraInfo: 0 }
[00:00:08.239] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(160), time: 176093593, dwExtraInfo: 0 }
[00:00:08.687] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 164, scanCode: 56, flags: KBDLLHOOKSTRUCT_FLAGS(128), time: 176094046, dwExtraInfo: 0 }
[00:00:09.307] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 162, scanCode: 541, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176094671, dwExtraInfo: 0 }
[00:00:09.308] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 165, scanCode: 56, flags: KBDLLHOOKSTRUCT_FLAGS(33), time: 176094671, dwExtraInfo: 0 }
[00:00:09.491] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176094843, dwExtraInfo: 0 }
[00:00:09.619] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(160), time: 176094984, dwExtraInfo: 0 }
[00:00:09.803] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176095156, dwExtraInfo: 0 }
[00:00:09.907] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(160), time: 176095265, dwExtraInfo: 0 }
[00:00:10.011] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(32), time: 176095375, dwExtraInfo: 0 }
[00:00:10.131] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 223, scanCode: 41, flags: KBDLLHOOKSTRUCT_FLAGS(160), time: 176095484, dwExtraInfo: 0 }
[00:00:10.443] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 162, scanCode: 541, flags: KBDLLHOOKSTRUCT_FLAGS(128), time: 176095796, dwExtraInfo: 0 }
[00:00:10.444] (2ef4) DEBUG  keyboard KBDLLHOOKSTRUCT { vkCode: 165, scanCode: 56, flags: KBDLLHOOKSTRUCT_FLAGS(129), time: 176095796, dwExtraInfo: 0 }
[00:00:13.259] (2ef4) DEBUG  foreground explorer.exe false
[00:00:13.357] (2ef4) DEBUG  foreground explorer.exe false
[00:00:15.853] (2ef4) DEBUG  trayicon destroyed
[00:00:15.859] (2ef4) DEBUG  keyboard listener destroyed
[00:00:15.859] (2ef4) DEBUG  foreground watcher destroyed

Great thanks :)


CLI: Integrate Wrappers CLI Deployment (IPFS & ENS)

@nerfZael has done a lot of great work creating the wrappers CLI which provides:

IPFS publishing via wrappers.io gateway
ENS publishing (mainnet & rinkeby)

We should integrate this functionality into the main w3 CLI.
https://github.com/nerfZael/wrappers

I think we should start thinking about moving blockchain specific commands and functionality to chain specific CLI tools.
Otherwise, we will start bloating our w3 CLI with chain specific logic for many chains. (Ethereum/ENS publishing, Near publishing, Polkadot publishing)
We are trying to be chain agnostic, so this kind of move makes sense.
My suggestion would be to, still, add IPFS publishing to w3 CLI, but move ENS to an Ethereum CLI

Instead of having separate CLIs, I was thinking these different types of chain-specific publishing steps could be extensions to the CLI.
We're already doing this with the "test-env" in the "Modular Test Environments" PR, allowing developers to add their own services to run their wrappers against.

But in general I agree, CLI cannot be bloated with chain-specific operations, and it must be done in an extensible way.

I agree on going with the extensions route.

A feature that we should support with this and that is not already supported with wrappers CLI, is the ability to publish an IPFS hash to ENS, instead of needing to publish build folder to IPFS and then IPFS to ENS


Replace QuerySplittingVisitor with QuerySplitter

The QuerySplittingVisitor mutated the functions and basically did the
same thing as the QuerySplitter does.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@b78194b). Click here to learn what that means.
The diff coverage is 93.1%.

@@            Coverage Diff            @@
##             master    #6184   +/-   ##
=========================================
  Coverage          ?   83.22%
  Complexity        ?    12510
=========================================
  Files             ?     1451
  Lines             ?    47411
  Branches          ?     5812
=========================================
  Hits              ?    39460
  Misses            ?     5259
  Partials          ?     2692

Impacted Files
Coverage Δ
Complexity Δ

...a/io/crate/analyze/relations/RelationSplitter.java
92.41% <100%> (ø)
48 <0> (?)

...a/io/crate/planner/consumer/ManyTableConsumer.java
90.1% <100%> (ø)
70 <0> (?)

...java/io/crate/analyze/relations/QuerySplitter.java
88% <75%> (ø)
2 <0> (?)

Continue to review full report at Codecov.

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


exporter: add namespace to internal metric label

This change makes the metric label a URI so that OTLP gauges don't accidentally conflict with this label. We will document in the Ops Agent that this is a reserved label key.

The E2E tests have not run because it Needs /gcbrun from a collaborator. Is this something you can help with @damemi or do I need to be added as a collaborator?

/gcbrun

@damemi @dashpole can someone with write access merge this?
The only failure seems to be codecov but from looking at it, the affected file doesn't actually have a change in coverage.

Added the stackdriver-admins team as triagers so your team shouldn't need gcbrun anymore.

(you can ignore codecov) it is informing, but doesn't block merging.  I'll leave it to mike to merge


Json array doesn't update when adding a new key and value

I have a repeater field that adds images and descriptions, so the user can add how many he wants.
But, If i'm in Spanish language and modify the description, then in English I add another row, the Spanish won't add this row automatically, I'll have to add it manually.
It happens because json fields does not have a single id.
Is there anyway to solve this problem?

Hello, we need to see the code to understand.

It works like this:
If I add 5 elements in a json array column while in English language and then I change to Spanish it's column won't update, I'll have to add those same 5 elements while editing in Spanish.
Example of this json array:
[{"img": "img.jpg", "description": "Some description"}, {"img": "img2.jpg", "Some Description 2": ""}]

A json array is not php code. How can we help if you don't show your actual code? How is this json used? Have you tried using the examples in the docs and tests?

I recommend you to switch to any media attachment setup like in https://github.com/spatie/laravel-medialibrary and use the translation model for every image entity. Atm you try to translate descriptions for multiple entities (images) in one table row/entity - this will explode at any time. So split it into more tables/entities and you will be fine.


Allow for custom middleware to be passed to the module store

Right now, no extra middleware can be added to the store

Thanks for the feedback Alex.
This is by design, we believe that react-redux-modules is for large scale applications, and in our opinion redux-saga is best available middleware for large scale react+redux apps. It provides not just side effects but other cool features like channels.
Taking direct dependency on redux-saga makes our interface simple and we need not build another layer of abstraction.
We will keep our options open though and if we get more requests around this we will reconsider.

It's worth noting for future readers that #8 (Oct 4/2018) adds this functionality although it is not mentioned in the documentation. It looks like this:
<DynamicModuleLoader modules={ [{ middlewares: [middleware1, middleware2...] }] } >


Update to the latest version of Docsy

Docsy has just added support for dynamically generated landing pages via https://github.com/google/docsy/pull/67.
It would be very useful to update opencue.io to incorporate these changes as it will reduce the need to manually edit these pages in the future.

Staged the latest version at:
https://5cf175e2f57e14000897d971--elated-haibt-1b47ff.netlify.com/
Looks like there are issues to iron out with the landing page...

Identified the cause of the behavior in https://github.com/google/docsy/issues/83


GitBook email invites

Send SNet GitBook email invites to Archive WG Team

[x] Vanessa - email invite accepted
[ ] Andre
[ ] Miro

[ ] Need to add core team members to SNet GitBook account, Invite sent


Add &page=page query param for google analytics js calls

There might be some other spots that could use query params too

resolved by: https://github.com/djsegal/julia_packages/commit/a30d996025334cfad5c4c70dff3c9375db0e9ee0
// don't know where manual query param setting would happen. this was only *.js.erb endpoint


"Contributors" renders as "undefined" on Foxx Info pane

"Contributors" is not rendering correctly on Foxx Info pane even when manifest.json correctly specifies a "contributors" array.
Repeatable in both _system and user db's.
Reported on Slack feedback30 channel. See this image.
platform: Ubuntu 14
version: Arango v3.0-beta1 installed from 'deb https://www.arangodb.com/repositories/unstable/xUbuntu_14.04/ /'
browser: Chrome

A bit of follow up. Tip from a Slack participant showed that Contributors is an array of objects rather than strings. Also, it looks like the page template renders the "name" properties of the Contributors objects and sets the mailto: action to the "email" properties, if those properties exist. See this example.
This is probably just a case of touching up the docs to match a reasonable behavior.

hm, we believe this has been fixed on the way to RC1 or RC2 tonite. Could you revalidate this?

Closing as RC2 is available with this fixed via https://www.arangodb.com/download-preview/ Thanks for reporting.


Remove footer with GitHub logo on somes pages

The following pages should not (IMO) have a footer with GitHub logo:

user and org dashboard
all_petitions view
account settings
edit user permission page
new template page
new petition page
edit petition page
show signatures page

Fixed in #127

Thanks!


move to new settings model

Nice! so i see you updated the transaction simulation, Does that mean the phishing detection setting isnt hooked up?

ah yeah that isn't hooked up. let me add that here


Size of window

Problem: Whole map does not fit in entire "screenshot"
Request: Find out what .js "heighy/width" do when modified
Problem: Suitable for most devices?
Request: Move GitHub logo

First two are somehow fixed

doesnt fit all windows
if above: downloading doesnt show credits and count


WebdynrPro Objects are not captured in the list

Hello Team,
I couldn't find any WebdynPro objects in the staging level or at the modified level. Thanks for your prompt response.

try clicking "refresh" another time in the UI, plus double check that its the correct package being serialized

I did it several times, still NO

I could see the FG, CL but not the Webdynpro objects. Could you please help ?

first check if you are running the latest version?

Yes its the latest version.

All our WebDynpro test cases are successful:
https://ci.abapgit.org/src/0242ac1100021eebb1bbc829fae4fe35.smim.abapgit_ci_result.html#web_dynpro
If there's an issue, please add more details (screenshots, releases, etc).

no response. closing


About the correctness of EventQueue

https://github.com/Jittor/jittor/blob/35b22799fda921b28e95b96d0b134fc1b2b90e7d/src/event_queue.h#L30
Hi, excellent work. I am studying the code of jittor. I am confused about the above line of code.
what will happen if I call the 'run' method several times before the previous 'todo' is executed? Will the new 'todo' overwrite the old one?
thanks.

Thank you, EventQueue::Worker::run is a internal function, it will only be called once by EventQueue::run_sync

thanks, I see.


The pipe 'L' could not be found

Hi, I'm getting this error:
JS: ERROR Error: Uncaught (in promise): Error: Template parse errors:
JS: The pipe 'L' could not be found

Also getting this error

Hi @Jameswr11, please check this issue here.

Also getting this error with the default instructions, why would this happen with just the default setup?


getTransactionByHashWithProof和getTransactionReceiptByHashWithProof没有返回proof

问题
RPC调用getTransactionByHashWithProof和getTransactionReceiptByHashWithProof接口没有返回proof
操作步骤
Steps to reproduce the behavior:

部署2.9.1节点
部署HelloWorld合约
调用sendRawTransaction接口发送交易，交易成功，成功调用合约set方法修改了值
调用getTransactionByHashWithProof和getTransactionReceiptByHashWithProof接口查上面的交易
返回的txProof和receiptProof没有值
getTransactionByHashWithProof返回结果
{  "id": "1",  "jsonrpc": "2.0",  "result": {      "transaction": {          "blockHash": "0xa9102a37fc8c52e4a99c250457d27b7bcfbf512d579914b1b00b503f98f1b3b6",          "blockLimit": "0x26b",          "blockNumber": "0x14",          "chainId": "0x1",          "extraData": "0x",          "from": "0xc8c852d550a605fb8d9fa961601037ec79c5d42d",          "gas": "0x1c9c380",          "gasPrice": "0x1c9c380",          "groupId": "0x1",          "hash": "0x5ee6aaf453752855ac83dd68e67e58866a96910adb826b2589a90384d640556e",          "input": "0x4ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000",          "nonce": "0x2e6f8794b97acb25265d901b1e5d0e4fff6dab431aba0f5881ca0d3a7070d52",          "signature": {              "r": "0x29fec7e7b6eb28fa229200b758be651505917a5c7c43b0b1794b0bb14798a9b5",              "s": "0x1289d348b2ace6d2d2e574ffe12a390102837dd571c03201806ab82282c6ecae",              "signature": "0x29fec7e7b6eb28fa229200b758be651505917a5c7c43b0b1794b0bb14798a9b51289d348b2ace6d2d2e574ffe12a390102837dd571c03201806ab82282c6ecae01",              "v": "0x1"          },          "to": "0x24faaa50ae981ea602e141e366dbd0dae2d9c4fc",          "transactionIndex": "0x0",          "value": "0x0"      },      "txProof": [          {              "left": [],              "right": []          }      ]  } }
getTransactionReceiptByHashWithProof结果
{  "id": "1",  "jsonrpc": "2.0",  "result": {      "receiptProof": [          {              "left": [],              "right": []          }      ],      "transactionReceipt": {          "blockHash": "0xa9102a37fc8c52e4a99c250457d27b7bcfbf512d579914b1b00b503f98f1b3b6",          "blockNumber": "0x14",          "contractAddress": "0x0000000000000000000000000000000000000000",          "from": "0xc8c852d550a605fb8d9fa961601037ec79c5d42d",          "gasUsed": "0x605c",          "input": "0x4ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000",          "logs": [],          "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",          "output": "0x",          "remainGas": "0x0",          "root": "0x0000000000000000000000000000000000000000000000000000000000000000",          "status": "0x0",          "statusMsg": "None",          "to": "0x24faaa50ae981ea602e141e366dbd0dae2d9c4fc",          "transactionHash": "0x5ee6aaf453752855ac83dd68e67e58866a96910adb826b2589a90384d640556e",          "transactionIndex": "0x0"      }  } }
调用sendRawTransactionAndGetProof接口发送交易，交易成功，成功调用合约set方法修改了值，调用上面两个查询方法也一样没有proof内容

期望
带WithProof的接口能返回交易的proof证明信息
环境/版本

OS: Ubuntu 22.04.3
FISCO BCOS Version 2.9.1

如果只有一笔交易，left和right都是空的应该是符合预期的，因为merkle树树根就是这一笔交易。可以通过getBlock进行二次确认。


[build-script-impl] Add a comment explaining why an option isn't truly dead as per reviewers suggestion.

In the original revert, this option was used in two places and I added a comment
only on the first one. This copies the comment onto the second usage of the
option.
Thanks to @edymtt and @compnerd for catching my careless error!

@swift-ci smoke test and merge

@swift-ci smoke test OS X platform

@swift-ci smoke test OS X platform

@swift-ci smoke test OS X platform


Allow replica to fetch segments from remote store instead of leader node

Description
This change enables replica to copy the segments(instead of node to node segrep) from remote store.
Might need few minor changes to make this PR ready, if required.
What is not covered:

SegRep relies on StoreFileMetadata to compute the diff whereas remote store has its own metadata file for fetching diff and downloading the segments. We'll need converge both the approaches to use common constructs.
There were also discussions to enable fsync-less commits instead of refreshes in https://github.com/opensearch-project/OpenSearch/issues/4555, while that change is good to have, its is not immediately required to make the integration work as we're already uploading the in-memory segments(after refresh) to remote store as well.
Deletion policy for segments in remote store(probably should be covered during remote store GA).

Issues Resolved
https://github.com/opensearch-project/OpenSearch/issues/4555
https://github.com/opensearch-project/OpenSearch/issues/4536
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff
[ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ankitkala I think we should split this into two PRs behind a new feature flag.

The ReplicationSource using remote store.
The notification publish step after upload.

Wdyt?

@ankitkala I think we should split this into two PRs behind a new feature flag.

The ReplicationSource using remote store.
The notification publish step after upload.

Wdyt?

@ankitkala I think we should split this into two PRs behind a new feature flag.

The ReplicationSource using remote store.
The notification publish step after upload.

Wdyt?

Makes sense!  Let me put up the first PR for notification publish step.


Unexpected end of JSON input

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.
I'm submitting a ...
[ ] bug report
[ ] question about the decisions made in the repository
Action taken (what you did)
Expected result (what you hoped would happen)
Actual result (unexpected outcome)
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

I'm submitting a ...
[X ] bug report
Action taken (what you did)
looked through bugs submitted and so far an answer has not been posted
Expected result (what you hoped would happen)
hoped for no errors and wanted successful trades instead but so far not one successful trade
Actual result (unexpected outcome)
paper trades and backtesting work perfectly, real trades never occur. candles are imported regularly as seen below with the "unexpected JSON" error occurring maybe twice a day or so. I am connected to Poloniex. I have tried both open IP and IP whitelist on poloniex website, the IP whitelist blocked everything so I opened it up again. I'm not sure if this JSON error is even the cause of bot never placing trades.
<-- POST /api/getCandles
--> POST /api/getCandles 200 399ms 671b
2019-06-28T14:07:59.120Z 'Unexpected end of JSON input'
<-- POST /api/getCandles
--> POST /api/getCandles 200 409ms 671b
<-- POST /api/getCandles
--> POST /api/getCandles 200 386ms 671b


GetUserByVanityUrl being called multiple times

We are monitoring our SQL DNN db and have noticed the GetUserByVanityUrl is being called multiple times by random vanityUrls. We have amended the proc to log the amount of calls.
We are using DNN v9.02.01 (533)
Here is an example log
(https://github.com/dnnsoftware/Dnn.Platform/files/2772573/GetUserByVanityUrl.xlsx)
We seem to have around 55 users with these weird sequenced numbered vanityUrls in our UserPortals table.
Can we safely remove them? Anyone know what might have caused this?

My best guess is that some automated scanning tool was scanning the vanity url with those values. Since nobody else replied to this issue, I am assuming it is not something widespread and is not easily reproducible so not an actionable issue and  closing this issue for those reasons.
@dtwilliams I would recommend backing up the database, then removing those wrong entries, that column supports nulls and I am not aware of this having side effects with other data, but if problems occur, you have that backup to revert to.


Does overloading automatically use 'not ==' if '<>' is not defined?

Reported by stefanv on 11 Apr 2014 20:30 UTC
If an operator record R defines function '==', and then for two instances r1 and 463a5ab09024d9c53e7e3a98fd95171296d0a79e of R, one writes r1 <> r2, is a tool expected to automatically generate not (r1 == r2)?
If so, the specification should state this.
If not, Complex should implement '<>'.

Migrated-From: https://trac.modelica.org/Modelica/ticket/1462

Comment by hansolsson on 17 Jun 2014 08:16 UTC
Spec group:
No automatic definitions of such functions (or <=, >, >= from <).
Agreement.

Comment by hansolsson on 24 Jun 2014 12:05 UTC
Note: The remaining issue is now that Complex does not define '<>'.

Modified by jmattsson on 10 Dec 2014 15:36 UTC

Comment by jmattsson on 10 Dec 2014 15:45 UTC
Reverting earlier change - better if MAP-LIB decides when to fix this.

Comment by dietmarw on 19 Dec 2014 07:01 UTC
Ticket retargeted after milestone closed

Comment by stefanv on 30 Sep 2015 12:05 UTC
It seems they haven't decided, so I'm changing the milestone in hopes that it will get fixed.

Comment by otter on 13 Dec 2015 18:41 UTC
Fixed in f318228a0a6233ef0c4d9b0b0ee4b829049567d5 by introducing function '<>' in record Complex.
Furthermore, introduced tests in ModelicaTest

Changelog modified by otter on 13 Dec 2015 18:41 UTC
Added missing overloaded function '<>' to operator record Complex

Comment by beutlich on 13 Dec 2015 18:52 UTC
Please revise f318228a0a6233ef0c4d9b0b0ee4b829049567d5:

Was function 'String' moved by design?
Was the uses annotation introduced by design?

Comment by otter on 13 Dec 2015 18:56 UTC
Sorry, was by mistake. Corrected in c6131ce025a6e6af0f3ad2ff4ce0ffb9d9b69740.


\boldsymbol{\Omega} shouldn't be italic

Describe the bug:
\boldsymbol seems to use italic capital Greek letters, unlike the normal environment.
To Reproduce:
\Omega(n) + \boldsymbol{\Omega(n)}

Expected behavior:
QuickLaTeX:

Screenshots:
Demo:

Environment (please complete the following information):

KaTeX Version: 0.11.1
Device: Desktop
OS: Windows 10
Browser: Chrome
Version: 80

Additional context:
Somewhat related to old issue #1971.
Same issue happens with \Theta.

Tracking this down, I believe buildCommon's makeOrd function is the source of the problem. By calling boldsymbol when the font is set accordingly, it uses Math-BoldItalic whenever possible. But \Omega is of type textord (as opposed to mathord, which is handled specially below when no font is specified, which is how it ends up being roman in the default mode.
Curiously, this default vs. nondefault behavior is somewhat correct: even \mathnormal{\Omega} renders italic in LaTeX, even though \Omega does not. \boldsymbol{\Omega} seems to be the exception to the current algorithm.
I've also noticed that \boldsymbol doesn't stack right with \mathit or \mathnormal. In LaTeX,
\boldsymbol{\Omega x\mathit{\Omega}}

produces  where all characters are bold.  But KaTeX produces a nonbold Omega at the end:

Ditto for \mathnormal.
I guess this is for another issue.


Dispose the temporary kernel connection file

Fixes #9298

Codecov Report

Merging #9353 (3baf418) into main (f03d91f) will increase coverage by 0%.
The diff coverage is n/a.

:exclamation: Current head 3baf418 differs from pull request most recent head 11cad61. Consider uploading reports for the commit 11cad61 to get more accurate results

@@          Coverage Diff          @@
##            main   #9353   +/-   ##
=====================================
  Coverage     74%     74%
=====================================
  Files        219     219
  Lines      10919   10919
  Branches    1512    1512
=====================================
+ Hits        8146    8183   +37
+ Misses      2182    2138   -44
- Partials     591     598    +7

Impacted Files
Coverage Δ

src/client/common/process/pythonDaemonPool.ts
76% <0%> (+1%)
:arrow_up:

...ent/datascience/progress/kernelProgressReporter.ts
80% <0%> (+2%)
:arrow_up:

src/client/common/process/proc.ts
78% <0%> (+2%)
:arrow_up:

.../client/datascience/plotting/plotViewerProvider.ts
41% <0%> (+2%)
:arrow_up:

src/client/common/featureDeprecationManager.ts
37% <0%> (+3%)
:arrow_up:

src/client/extension.ts
61% <0%> (+3%)
:arrow_up:

src/client/datascience/multiplexingDebugService.ts
55% <0%> (+3%)
:arrow_up:

src/client/datascience/datascience.ts
95% <0%> (+4%)
:arrow_up:

...ient/datascience/data-viewing/dataViewerFactory.ts
87% <0%> (+4%)
:arrow_up:

...t/common/variables/environmentVariablesProvider.ts
72% <0%> (+4%)
:arrow_up:

... and 2 more


sort import to make ruff happy

Issue
Current CI is failing because ruff is unhappy that some of our imports are unsorted.
Solution
Perform a ruff --fix to sort the imports.

Thanks for this. The change is correct, but I feel like it's highlighting that something in our CI is off; for example the PR I merged was passing and this one is failing, which is the inverse of what should be happening...
Just trying to figure out why.

I'm wondering now if we need these lines in the ruff checkout step too.
Alternatively we could extract Ruff into its own workflow and have it run on pull_request, as we don't need pull_request_target for it.

Going to merge this for now, and fix properly later.


new Webpush($auth) throwing error

NOTE: Please test in a least two browsers (i.e. Chrome and Firefox). This
helps with diagnosing problems quicker.

Please confirm the following:

[ ] I have read the README entirely
[ ] I have verified in the issues that my problem hasn't already been resolved

Setup

Please provide the following details, the more info you can provide the
better.

Operating System:
PHP Version: <7.1.>
web-push-php Version: <1.0.0>

Please check that you have installed and enabled these PHP extensions :

[ ] gmp
[ ] mbstring
[ ] curl
[ ] openssl

Please select any browsers that you are experiencing problems with:

[ ] Chrome

Please specify the versions (i.e. Chrome Beta, Firefox Beta etc).

Problem
I am trying to use this extension on a free hosting site. The webpush($auth) is throwing the following error:
Uncaught Error: Call to undefined function Mdanter\Ecc\Curves\gmp_init() in /storage/ssd3/532/1965532/public_html/vendor/mdanter/ecc/src/Curves/NistCurve.php:133
Since this is a free hosting site I can't edit my php.ini file.
Expected
I tried to send notifications to a list of subscribed users in my DB as per the tutorial.
Features Used

[ ] VAPID Support
[ ] Sending with Payload

Example / Reproduce Case
$auth = array(
'VAPID' => array(
'subject' =><EMAIL_ADDRESS>// can be a mailto: or your website address
'publicKey' => $public_key, // (recommended) uncompressed public key P-256 encoded in Base64-URL
'privateKey' => $private_key // (recommended) in fact the secret multiplier of the private key encoded in Base64-URL
)
);
$webPush = new WebPush($auth);
Other

Please put any remaining notes here.

Sending payload with push notifications requires these extensions.
You can still send "ping" push notifications (without payload). Then, in your service worker, you can fetch the notification content.

I tried the call sending null in payload and still got the same error

You have to initialize WebPush without any VAPID key.

If I initialize it without VAPID, nothing happens. There are no errors but I don't the notification.

Here is the code:
<?php
require 'vendor/autoload.php';

use Minishlink\WebPush\WebPush;

include 'conn.php';

$public_key = $_POST['public_key'];
$private_key = $_POST['private_key'];

$sql = "SELECT * FROM subscriptions;";
$res = $conn->query($sql);

$notifications = array();

while($row = mysqli_fetch_assoc($res))
{
	$data= array('endpoint'=>$row["endpoint"],'userPublicKey'=>$row["auth_key"],'userAuthToken'=>$row["auth_token"]);
	$notifications[] = $data;
}

$webPush = new WebPush();

foreach ($notifications as $notification) {
    $webPush->sendNotification(
        $notification['endpoint'],
        null,
        $notification['userPublicKey'],
        $notification['userAuthToken'],
		true
    );
}
$webPush->flush();

echo "Push subscriptions `complete";`
?>

I'd not be surprised that Chrome or Firefox forces us to use VAPID. If that's the case, you're going to  find another free hosting service!

I have done it using node js and firebase on chrome without VAPID.
Thanks for the help. Appreciate the quick response.

As an FYI: Chrome requires either a GCM API Key or VAPID Key. Firefox will work without either. (See tests for examples)


Cpr 126

👍 although it would be nice to see a test proving that this fixes the problem - I appreciate that it is possibly difficult to do if this is a race condition

We did update our IT but couldn't replicate the issue, but the tests now verifies the expected behaviour.


Feature request: built-in scheme for #tool to download an arbitrary HTTPS .zip file

Parameters

Version parameter: no.
There would be no notion of the downloaded tool having a version, so no version or prerelease parameters.

Format parameter: maybe
The format could be autodetected from the content type or file contents in case you eventually support archive formats other than .zip. There probably wouldn't be a need for a type/format parameter but it might be desirable.

Checksum parameter: I want this.
Even if the download is over HTTPS, it's nice to know if something else starts getting served. This would make HTTP/FTP URLs safe too.
If the checksum is missing, Cake could download the file and then include the checksum in an error message requiring the checksum to be present in the .cake file.

Since query parameters in the same URL would collide with the URL to use for the download whether or not they are excluded when downloading, there would need to be a new way to handle this.
Proposal
#tool download: followed by a URL. If the URL contains a comma, it must be URL-encoded.
A parameter may be specified no more than once. Some parameters are required. To specify a parameter, add a comma to the end of the line followed by the parameter name, an equals sign, and a parameter value. If the parameter value contains a double quote character or comma, the whole parameter value must be double-quoted.
Valid parameter names:

checksum: Required. Value must start with SHA256: and the remainder must be 32 hex characters, case-insensitive. Future checksums may be supported.

#tool download:http://static.wixtoolset.org/releases/v<IP_ADDRESS>10/wix314-binaries.zip, checksum=SHA256:0904A88A4BCD9DD3C2274CAABE73989CD72767EE90C8FA0BF813D004EEC90D32

Questions

Is a format parameter desirable even if multiple formats become supported?

Should there be support for the file scheme or absolute or relative or Windows UNC paths?

Should checksum be allowed to be omitted for HTTPS downloads? What about HTTP/FTP/file schemes?

I think this initially best would be implemented and tested as Cake module.
Example of Cake modules:
https://github.com/cake-contrib/Cake.DotNetTool.Module
https://github.com/cake-contrib/Cake.Chocolatey.Module
Documentation around modules here
https://cakebuild.net/docs/fundamentals/modules

@devlead Sounds good. I'm probably not up for it at this time, but maybe this proposal could interest someone else. Would you prefer this issue to be closed or stay open?

(I would be happy to help build a lexer and parser if needed though—those are fun.)

@jnm2 there is another module that could be used as a reference is this one:
https://www.nuget.org/packages/Cake.UrlLoadDirective.Module/
Which does something similar.


Card text is truncated [Chalk]

Sometime the text on a card is truncated and just has ellipses at the end.
Chalk results:

Expected (basalt) results:

Hmm, do you have a minimal example? Or does it still happen with the recent changes? Is scrollable set to true?

I am unable to page down any further. The latest version of master also broke Basalt & Aplite, the text is cut off by about the height of a status bar. Both of these images are scrolled down all the way.
Basalt: Missing the word meetup (notice it's cut off, I'm assuming this is related to #139)

Chalk: Cut off while scrolling, cannot scroll any further.

Minimal example code:
var UI = require('ui');

var main = new UI.Card({
  title: 'Pebble From A to Z series: Pebble App Development with Pebble.js and CloudPebble',
  body: 'Date: 27-02-2016 1:00pm\n'+
        'Location: Grovo\n'+
        'Distance: 334.1mi\n' +
        'Address: 3 Park Avenue, 30th Floor\n' +
        'New York, NY, us\n' +
        'Attending: 5 Pebblers\n' +
        'Host Group: Pebble\'s NYC Meetup',
  scrollable: true
});

main.show();

Tanks for the minimal example! This was a tricky one, turns out I was accidentally also using the content width for rendering. See if this fixes the issue.

This fixes the original text being truncated issue on chalk however the cut off text still occurs on basalt. I will open a new ticket to address this issue since the original issue here is fixed. Thanks again @Meiguro!


Fix the 'Learn more' link for discontinued nuget.prg based auth

Currently when somebody signs in using the NuGet.org authentication, we state the following in the blocking dialog:
NuGet.org authentication has been discontinued. Learn more.
The Learn more link goes to an old blog post. It should point to the following post, instead: https://blog.nuget.org/20180515/NuGet.org-will-only-support-MSA-AAD-starting-June.html

The Learn more link has been redirected to the correct page now.