Draggable + TextField interaction stopped working

Steps to Reproduce

Switch to 90f8ac5b41129a21878fe1607a9fcf57576a840c  on master channel or any commit which comes after 90f8ac5b41129a21878fe1607a9fcf57576a840c Execute flutter run on the code sample

Expected results: TextField is horizontally draggable, text inside TextField changes to "Wee.. I'm being dragged"
Actual results: TextField is not horizontally draggable, text inside TextField is still "Drag me horizontally"

Code sample

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

const defaultText = "Drag me horizontally";
const successText = "Wee.. I'm being dragged";
final dismissibleTextEditingController = TextEditingController(text: defaultText);
void main() {
  debugPrintGestureArenaDiagnostics = true;
  runApp(
    MaterialApp(
      home: Scaffold(
        body: Container(
          padding: const EdgeInsets.all(50),
          child: Center(
            child: Dismissible(
              direction: DismissDirection.horizontal,
              onUpdate: (details) {
                dismissibleTextEditingController.text = successText;
                if (details.progress == 0.0) {
                  dismissibleTextEditingController.text = defaultText;
                }
              },
              key: const Key('Dismissible'),
              child: TextField(
                controller: dismissibleTextEditingController,
              ),
            ),
          ),
        ),
      ),
    ),
  );
}

Logs

Successful Gesture Arena on a690c0485f8afc6200f8d1dc60e483aeed8f01a7.
flutter: Gesture arena 3    ❙ ★ Opening new gesture arena.
flutter: Gesture arena 3    ❙ Adding: LongPressGestureRecognizer#6412b(debugOwner: _TextSelectionGestureDetectorState#09cd1, state: ready)
flutter: Gesture arena 3    ❙ Adding: TapAndDragGestureRecognizer#a9a43(debugOwner: _TextSelectionGestureDetectorState#09cd1)
flutter: Gesture arena 3    ❙ Adding: HorizontalDragGestureRecognizer#f173b(debugOwner: GestureDetector, start behavior: start)
flutter: Gesture arena 3    ❙ Closing with 3 members.
flutter: Gesture arena 3    ❙ Rejecting: LongPressGestureRecognizer#6412b(debugOwner: _TextSelectionGestureDetectorState#09cd1, state: possible)
flutter: Gesture arena 3    ❙ Accepting: HorizontalDragGestureRecognizer#f173b(debugOwner: GestureDetector, start behavior: start)
flutter: Gesture arena 3    ❙ Self-declared winner: HorizontalDragGestureRecognizer#f173b(debugOwner: GestureDetector, start behavior: start)

Unsuccessful Gesture Arena on commit 90f8ac5b41129a21878fe1607a9fcf57576a840c and subsequent commits
flutter: Gesture arena 1    ❙ ★ Opening new gesture arena.
flutter: Gesture arena 1    ❙ Adding: LongPressGestureRecognizer#fec4e(debugOwner: _TextSelectionGestureDetectorState#1676e, state: ready)
flutter: Gesture arena 1    ❙ Adding: TapAndHorizontalDragGestureRecognizer#dc538(debugOwner: _TextSelectionGestureDetectorState#1676e)
flutter: Gesture arena 1    ❙ Adding: HorizontalDragGestureRecognizer#2bb6b(debugOwner: GestureDetector, start behavior: start)
flutter: Gesture arena 1    ❙ Closing with 3 members.
flutter: Gesture arena 1    ❙ Rejecting: LongPressGestureRecognizer#fec4e(debugOwner: _TextSelectionGestureDetectorState#1676e, state: possible)
flutter: Gesture arena 1    ❙ Accepting: TapAndHorizontalDragGestureRecognizer#dc538(debugOwner: _TextSelectionGestureDetectorState#1676e)
flutter: Gesture arena 1    ❙ Self-declared winner: TapAndHorizontalDragGestureRecognizer#dc538(debugOwner: _TextSelectionGestureDetectorState#1676e)

https://user-images.githubusercontent.com/64651636/230674533-5a53f23b-211c-411d-b2d8-3831cc7db6af.mov
https://user-images.githubusercontent.com/64651636/230674441-dedd85df-1543-4de1-bec5-581c2bc411b6.mov

@chunhtai @Renzo-Olivares @xu-baolin @justinmc This seems to be caused by https://github.com/flutter/flutter/pull/123055
Since that pull request landed in master, and I assume passed your internal checks and tests, does that mean that this is intended behaviour?
If it is indeed intended, then is there some simple parameter that we can change in the Dismissible or the TextField widget in order to make the Dismissible win the GestureArena ?
Essentially the way that it was working before commit 90f8ac5b41129a21878fe1607a9fcf57576a840c was merged?

Thank you for reporting this @borjandev. Getting this behavior correct is really tricky since text selection dragging gestures on mobile devices were just recently introduced (they have been supported on desktop for a while). What you can do for now as a short-term solution is wrap your Dismissible in a MediaQuery with a custom gestureSettings like below.
What this does is changes the drag acceptance threshold for touch devices for the Dismissible making it 0.1 (by default it is 8.0) lower than the drag acceptance threshold of the TextField for touch devices which is also 8.0 by default.

Code sample
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

const defaultText = "Drag me horizontally";
const successText = "Wee.. I'm being dragged";
final dismissibleTextEditingController = TextEditingController(text: defaultText);
void main() {
  debugPrintGestureArenaDiagnostics = true;
  runApp(
    MaterialApp(
      home: Scaffold(
        body: Container(
          padding: const EdgeInsets.all(50),
          child: Center(
            child: MediaQuery(
              data: const MediaQueryData(
                gestureSettings: DeviceGestureSettings(touchSlop: 7.9)
              ),
              child: Dismissible(
                direction: DismissDirection.horizontal,
                onUpdate: (details) {
                  dismissibleTextEditingController.text = successText;
                  if (details.progress == 0.0) {
                    dismissibleTextEditingController.text = defaultText;
                  }
                },
                key: const Key('Dismissible'),
                child: TextField(
                  controller: dismissibleTextEditingController,
                ),
              ),
            ),
          ),
        ),
      ),
    ),
  );
}

@Renzo-Olivares Thank you for the prompt response, and for the short-term solution!
Modifying the touchSlop is viable in my use case.
Looking forward to hear thoughts from others, but feel free to close this issue if needed, as even in the absence of an ideal full solution, I would accept the tradeoff of needing to modify the touchSlop, as it provides the necessary control to prioritise the widget which wins the GestureArena, which can be tailored to the specific app use case.

Great to hear that worked for you! I'll keep this open for discussion, and at the least I think I'll probably make a PR to add this use-case to the documentation somewhere so it is more discoverable to others.

This is replicable on latest master but not on latest stable.
Code sample: https://github.com/flutter/flutter/issues/124421#issue-1659166549

 stable, master flutter doctor -v
[!] Flutter (Channel stable, 3.7.10, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
    • Flutter version 3.7.10 on channel stable at
      /Users/dhs/documents/fluttersdk/flutter
    ! Warning: `flutter` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
      your current Flutter SDK checkout at
      /Users/dhs/documents/fluttersdk/flutter. Consider adding
      /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
      Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
      of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4b12645012 (6 days ago), 2023-04-03 17:46:48 -0700
    • Engine revision ec975089ac
    • Dart version 2.19.6
    • DevTools version 2.20.1
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

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

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

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

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

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

! Doctor found issues in 1 category.

[!] Flutter (Channel master, 3.10.0-2.0.pre.29, on macOS 12.2.1 21D62
    darwin-x64, locale en-GB)
    • Flutter version 3.10.0-2.0.pre.29 on channel master at
      /Users/dhs/documents/fluttersdk/flutter
    ! Warning: `flutter` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
      your current Flutter SDK checkout at
      /Users/dhs/documents/fluttersdk/flutter. Consider adding
      /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
      Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
      of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f4cd897e7e (3 hours ago), 2023-04-10 10:09:21 +0800
    • Engine revision 58ab7eaee6
    • Dart version 3.0.0 (build 3.0.0-417.0.dev)
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/dhs/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13C100
    • CocoaPods version 1.11.2

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

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 65.1.4
    • Dart plugin version 213.7228

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

[✓] Connected device (3 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 15.3.1 19D52
    • macOS (desktop)           • macos                                    •
      darwin-x64     • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)              • chrome                                   •
      web-javascript • Google Chrome 109.0.5414.119

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

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

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

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

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

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

! Doctor found issues in 1 category.

@Sembauke can you post a code sample? Thank you

Responding here, despite not being related to TextField, because https://github.com/flutter/flutter/issues/127165 was closed in favor of this ticket.
On iOS, you can no longer (as of 3.10) trigger certain GestureDetectors on SelectableText.  For instance, onHorizontalDragUpdate will not trigger if you swipe right on the text in the below code sample.  However, if that ListView is still flinging/scrolling then it will indeed trigger.  I included a lot of text so you can play with the vertical scrolling.  If it's idle then the GestureDetector doesn't work, if it's ScrollDirection.forward or ScrollDirection.reverse then it does work.

import 'package:flutter/material.dart';
class TermsScreen extends StatelessWidget {
const TermsScreen({super.key});
@override
Widget build(BuildContext context) {
return GestureDetector(
  onHorizontalDragUpdate: (DragUpdateDetails dragUpdateDetails) {
    if (dragUpdateDetails.delta.dx > 20) {
      Navigator.pop(context);
    }
  },

  child: Scaffold(
    body: Container(
      padding: const EdgeInsets.symmetric(horizontal: 24.0),
      child: ListView(
        children: const <Widget>[

          SelectableText.rich(
            TextSpan(
              style: TextStyle(color: Colors.black, fontSize: 17.0),
              children: [

                TextSpan(
                  text: "Notice that widgets are passed as arguments to other widgets. The Scaffold widget takes a number of different widgets as named arguments, each of which are placed in the Scaffold layout in the appropriate place. Similarly, the AppBar widget lets you pass in widgets for the leading widget, and the actions of the title widget. This pattern recurs throughout the framework and is something you might consider when designing your own widgets.",
                  style: TextStyle(color: Colors.black, fontSize: 17.0),
                ),

                TextSpan(
                  text: "Notice that widgets are passed as arguments to other widgets. The Scaffold widget takes a number of different widgets as named arguments, each of which are placed in the Scaffold layout in the appropriate place. Similarly, the AppBar widget lets you pass in widgets for the leading widget, and the actions of the title widget. This pattern recurs throughout the framework and is something you might consider when designing your own widgets.",
                  style: TextStyle(color: Colors.black, fontSize: 17.0),
                ),

                TextSpan(
                  text: "Notice that widgets are passed as arguments to other widgets. The Scaffold widget takes a number of different widgets as named arguments, each of which are placed in the Scaffold layout in the appropriate place. Similarly, the AppBar widget lets you pass in widgets for the leading widget, and the actions of the title widget. This pattern recurs throughout the framework and is something you might consider when designing your own widgets.",
                  style: TextStyle(color: Colors.black, fontSize: 17.0),
                ),

                TextSpan(
                  text: "Notice that widgets are passed as arguments to other widgets. The Scaffold widget takes a number of different widgets as named arguments, each of which are placed in the Scaffold layout in the appropriate place. Similarly, the AppBar widget lets you pass in widgets for the leading widget, and the actions of the title widget. This pattern recurs throughout the framework and is something you might consider when designing your own widgets.",
                  style: TextStyle(color: Colors.black, fontSize: 17.0),
                ),

                TextSpan(
                  text: "Notice that widgets are passed as arguments to other widgets. The Scaffold widget takes a number of different widgets as named arguments, each of which are placed in the Scaffold layout in the appropriate place. Similarly, the AppBar widget lets you pass in widgets for the leading widget, and the actions of the title widget. This pattern recurs throughout the framework and is something you might consider when designing your own widgets.",
                  style: TextStyle(color: Colors.black, fontSize: 17.0),
                ),

                TextSpan(
                  text: "Notice that widgets are passed as arguments to other widgets. The Scaffold widget takes a number of different widgets as named arguments, each of which are placed in the Scaffold layout in the appropriate place. Similarly, the AppBar widget lets you pass in widgets for the leading widget, and the actions of the title widget. This pattern recurs throughout the framework and is something you might consider when designing your own widgets.",
                  style: TextStyle(color: Colors.black, fontSize: 17.0),
                ),

              ],
            ),
          ),

        ],
      ),
    ),

  ),
);

}
}

@Sembauke can you post a code sample? Thank you

@Renzo-Olivares We got it working with your workaround. Thanks

Looks like the workaround stopped working after recent flutter updates.

@Renzo-Olivares this needs flutter team's attention

Just adding my comment here that this is causing me issues as well. Does the flutter team have a work around here that we could use considering the above workaround does not work anymore? Is a fix incoming?


add winston-transport-vscode to community transports docs

winston-transport-vscode is a transport for VS Code extension development.
VS Code offers 2 types of output for extension development: a plaintext OutputChannel, and a log-driven LogOutputChannel.
This package offers 2 transports to work with these output channels, along with dedicated levels config and format for working with LogOutputChannel.

GitHub source code
NPM package

Looks nice!  Thank you for your contribution to the Winston ecosystem!


Support python tests with MSVC

Description of the Change
Change CMake calls to support MSVC and Windows environment to run and compile Python bindings.

Benefits
Python bindings on Windows!

Possible Drawbacks
Release build only. Default python installation from python.org is missing _d.{lib, dll}

Installation

choco install python3
pip install protobuf

Works on Win Server 2016, protobuf-3.5.1, python 3.6
+ ctest -R python --output-on-failure
Test project C:/J/workspace/msvc106da0dd/build
    Start 12: python_transaction_test
1/2 Test #12: python_transaction_test ..........   Passed    0.89 sec
    Start 13: python_query_test
2/2 Test #13: python_query_test ................   Passed    0.30 sec

100% tests passed, 0 tests failed out of 2

Link to respective Jenkins build


-[EAGLContext flush]: unrecognized selector sent to instance 0x170231980

Hello,
I have used JOTView and GPUImage libraries in same project.
so I go in a screen in which I have used Jotview library then i go back and switch to another screen in which I have used GPUImage library, then app just crashes with this reason
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[EAGLContext flush]: unrecognized selector sent to instance 0x170231980'
When I go back from screen in which I have implemented JotView, I clear jotview like this: [jotView clear:YES];
App is crashing in JotGLContext.m file at this function    [(JotGLContext*)[JotGLContext currentContext] flush];
I think your library and GPU library both are using OPENGL, that is why it is causing error.
Can you help me with this error ?
Thanks

hrm, not sure why it would be doing that. Can you post a stack trace as well?

What do you mean by Stack Trace ? Can you tell me more about this ?

The stack trace shows which methods are running when the crash happens. To find it - first - setup an exception breakpoint so that the debugger opens right when the crash happens. Make sure the breakpoint is set to Obj-C exceptions:

Then when the crash happens, highlight the thread that's crashed, and copy/paste it to this issue:

Did You manage to fix this? I have the same issue...
Also ha GPUImage and JotUI in the same project. Here is how my app is organized:
First screen: load photo from gallery, or from camera (photo taken trough GPUImage filters)
Second screen: edit screen with some stickers addon, sliding frames, and some buttons sending taken photo to eraser option and Jot UI option.
Third screen is JotUI option...
When photo is taken from gallery everything works fine, even though I didn't manage to get back image view that i was writing on back to second screen.
But when photo is taken with camera and GPUImage filters, app crashes with same error (-[EAGLContext flush]:......) when I tap on JotUI option screen to show up.
Hopefully I got this problem closer to You.

I got the same problem too.
When GPUImage is used, JotView will crash at initialization.
crash code:

[(JotGLContext*)[JotGLContext currentContext] flush];

I modified it:

if ([[JotGLContext currentContext] isKindOfClass:[JotGLContext class]]) {
[(JotGLContext*)[JotGLContext currentContext] flush];
}

Thanks for the discussion and detail on this. I've pushed up this fix at db568d3dd3 on master


Fix skipIfNoExtension

There was a flaw in the logic introduced in #847, and now that tests that require C++ extension are skipped all the time. This PR fixes it.

thanks!


sandbox decorator not working on py3

run:
python3 kivy/kivy/uix/sandbox.py

result:
Clock.tick()
File "/usr/lib/python3.4/site-packages/kivy/clock.py", line 483, in tick
 self._process_events()
File "/usr/lib/python3.4/site-packages/kivy/clock.py", line 615, in _process_events
 event.tick(self._last_tick, remove)
File "/usr/lib/python3.4/site-packages/kivy/clock.py", line 353, in tick
 callback = self.get_callback()
File "/usr/lib/python3.4/site-packages/kivy/clock.py", line 320, in get_callback
 return callback()
File "/usr/lib/python3.4/site-packages/kivy/weakmethod.py", line 47, in __call__
 return getattr(self.proxy, self.method_name)
AttributeError: 'Sandbox' object has no attribute '_f2'

:+1:


Looking for M2 asset with uncompressed texture data.

Most M2 asset rely on S3TC texture compression which the loader already supports. However, certain assets use uncompressed textures. It would be good to know the filename of such an asset for testing (https://wow.tools/) so the below code path can be implemented and verified:
https://github.com/Mugen87/three-m2loader/blob/e71c7760f5b19c828a2befc0eaf8781db888d91d/M2Loader.js#L1735-L1739

f3f1000b40a08aafbec8176679c7420a0a8040cd added supported for color palette textures but only for BLP_PIXEL_FORMAT_PIXEL_UNSPECIFIED. More textures for testing are required.


fix(configservice-configrules): filter out rules created by config-conforms

Conformance packs add config rules. These cannot be deleted. This excludes those rules from trying to be removed.

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


.Net: Bug: Hallucination in semantic kernel responses

Describe the bug
We have integrated the semantic kernel and configured it to call the ticketing system (API based) automatically by using an auto-function call. During the initial function call, it retrieves the response accurately and provides the correct answer. However, when follow-up questions are asked within the same chat history, it starts generating random answers and exhibiting hallucinations. Additionally, it is not even hitting the function again on the follow-up question. If the chat history is cleared and a new conversation is started, it performs correctly initially, but the same issues reoccur after 2nd or 3rd question.
Expected behavior
It should give an answer correctly, and call function every time instead of hallucinat.
Platform

OS: Windows
IDE: Visual Studio
Language: C#,
Source: Microsoft.SemanticKernel (1.15.0), Microsoft.SemanticKernel.Connectors.OpenAI (1.15.0)

Hi @Vishal11848, take a look at this article Managing Chat History for Large Language Models (LLMs). You likely need to implement one of these strategies to limit the amount of chat history being sent to the LLM.

Hi @Vishal11848, take a look at this article Managing Chat History for Large Language Models (LLMs). You likely need to implement one of these strategies to limit the amount of chat history being sent to the LLM.

Thank you for your suggestion, Mark. Currently, we are sending the history of the past five conversations. However, the system sometimes starts hallucinating as early as the 2nd interaction, and other times it occurs at the 3rd or 5th interaction. The issue is not consistent.
I am trying to follow the steps which you shared, will share more updates on it.

Hello @markwallace-microsoft
Could you please inform me about the version of the semantic kernel being used here?


Store data permanently.

Store data on the SD card or in EEPROM, provide way to download the data to the PC.

STM32 board and its firmware will be replaced by dedicated data acquisition module.


Create Alaram-clock

fixes #363

File extension is missing, firstly fix that.

sir all changes are done pls merge the pr


#463, fix a potential NPE, move packet.length inside null check.

Fix issue #463

Code looks good, can you add some unit tests for this method?


bug(table): Transparent gap between the 2 first sticky columns

Expected Behavior
There should be no gap between the firsts sticky columns
Actual Behavior
There is a transparent gap between the 2 firtsts sticky columns where we can see the other columns data when scrolling horizontaly
Environment

Angular: 9.0.2
CDK/Material: 9.1.0
Browser(s): Chrome
Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

I have the same problem, but it happens to me when I work only with a ** "sticky" ** column and adding padding to the parent tag of the table.
Duplicate of #

Thank you for your comment.
In my case:

I don't have any padding neither on the table, nor its parent, or the cells.
It happens only I there are more than one sticky columns at the beginning

Additional information:
The issue is only on first data load. If I re-load data (by sorting, or going to next page), then everything is ok.

There is the same issue with multiple sticky columns at the end of the table.

Please provide a reproduction in StackBlitz so that we can help you diagnose the issue

Closing because no clarification was provided.

@JessyParis Hey, were you able to figure out this issue with the first two sticky columns? The bug has been closed but I do not see any resolution.

Unfortunatly, no.
And I have no time to make a StackBlitz for now.
The bug remains with Material v10


Correct warning

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

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

Correct warning
Currently, if you open up an action generated by the tap-new command in
the Github GUI, you get a warning saying "pull_requests should be an
object". This fixes that.
This wasn't stopping anything working currently, though I suppose it may
in the future.

Could you link to a workflow run where this warning is shown?
We are using this syntax in a few org repos and it's working fine.

@dawidd6


Insightmaker/mxGraphModel

Is there already a way to load a mxGraphModel/InsightMaker model? If not, are there plans to? If not, I'm gonna read the source and do it.

Oops, got too many tabs open. Sorry!


Update vlinder datasets based on feedback on data paper

@stijnvanhoey, as you know we have submitted a data paper describing dagvlinders-inbo-occurrences and dagvlinders-natuurpunt-occurrences. Dirk Maes has just updated the paper based on the feedback from the reviewers. Some of this updates affect the metadata of the datasets as well. Can you update those metadata for both datasets?
I'll email you the paper.

Done. Paper published and datasets republished.


LSP: Weird stuff

Failed to modify settings

Please modify following settings manually:
* `Lua.workspace.library`: add element `"/home/async/.local/share/nvim/mason/packages/lua-language-server/libexec/meta/5393ac01"` ;

Fixed in the newest Lua_LS


[Feature Request]:

What is your request?
Can you please add back the white background in fg stat tracker?

PLEASE!!!!

forget to mention in next update add the white background and other cool things you add

Check it out in v1.169.

THANK YOU!


H02 vehicle status field

Bit

First

Second

Third

0
0
Illegal door open alarm
0
Thief alarm
0
Thief alarm

1
0
SOS
0
Rob alarm
0
Robbery alarm

2
0
Speed alarm
0
Over speed alarm
0
overspeed speed

3
0
illegal ignition alarm
0
undefined
0
Illegal ignition alarm

4
0
Entering alarm
0
In geo-fence alarm
0
Entering alarm

5
0
GPS antenna disconnect alarm
0
undefined
0
GPS antenna disconnect alarm

6
0
GPS antenna short circuit alarm
0
undefined
0
GPS antenna short circuit alarm

7
0
Out alarm
0
Out geo-fence alarm
0
Out alarm

8
0
Door open
0
undefined
0
Door open

9
0
Armed
0
undefined
0
Vehicle fortification

10
0
ACC off
0
ACC OFF
0
ACC off

11
0
Crash alarm
1
undefined
1
reserves

12
1
keep
1
undefined
1
reserves

13
0
pump
0
undefined
0
engine

14
0
Custom alarm
0
undefined
0
Custom alarm

15
0
Over speed
0
undefined
0
overspeed

16
0
GPS mistake alarm
0
undefined
0
GPS receiver fault alarm

17
0
Shock alarm
1
Low battery alarm
1
reserves

18
0
Tilt alarm
1
undefined
1
reserves

19
0
Use backup battery
0
GPS tracker is powered via built in battery
0
Terminal by backup battery power supply

20
0
Battery remove alarm
0
Main Power disconnect
0
Battery removed

21
0
GPS antenna disconnect
0
undefined
0
GPS antenna disconnect

22
0
GPS antenna short circuit
0
undefined
0
GPS antenna short circuit

23
0
Low level sensor 2 on
0
undefined
0
Low level sensor 2 on

24
0
Temple alarm
0
undefined
0
Temperature

25
0
Move alarm
0
undefined
0
Three input error password

26
0
Blind record alarm
0
undefined
0
GPRS backed up

27
0
Oil cut off
0
GPS Tracker in Disable Fuel
0
Vehicles in oil cut-off current state

28
0
Battery demolition
0
Main power off Alarm
0
Battery demolition

29
0
Home SOS alarm
0
undefined
0
High level sensor 1 is high

30
0
Office SOS alarm
0
undefined
0
High level sensor 2 is high

31
0
Low level sensor 1 on
0
undefined
0
Low level sensor 1 on

hi Anton, may I ask if you plan on implementing some of these? I would be highly interested in all power related status updates.
Please share your purpose of posting this.
Thank you
Faisal

The reason is to understand differences in flags for different devices that use H02 protocol. It's fairly easy to add support for new flags. You can do it yourself if you have some basic programming skills.

Would you be able to provide some guidance on how to get started?
I enabled debug logging and then disconnected power from my tracker. No logs were generated but I received an sms from tracker on power disconnect.

The code is here:
H02ProtocolDecoder.java#L68

Perfect, Thank you
How to assure device is posting data to traccar server?

I don't understand the question. You would see the data if it's coming.

Sorry my questions was, how do I know tracker sends an event when power is disconnected.
following java code produced the output below. Could you please help me make sense out of it?
private void processStatus(Position position, long status) {
        StringBuilder sb = new StringBuilder("processStatus -> ");
        sb.append(status).append("\t");
        for (int i = 0; i < 32; i++)
            sb.append(String.format("%d=%b, ", i, BitUtil.check(status, i)));
        Log.info(sb.toString());

processStatus -><PHONE_NUMBER>  0=true, 1=true, 2=true, 3=true, 4=true, 5=true, 6=true, 7=true, 8=true, 9=true, 10=false, 11=true, 12=true, 13=true, 14=true, 15=true, 16=true, 17=true, 18=true, 19=true, 20=true, 21=true, 22=true, 23=true, 24=true, 25=true, 26=true, 27=true, 28=true, 29=true, 30=true, 31=true,
processStatus -><PHONE_NUMBER>  0=true, 1=true, 2=true, 3=true, 4=true, 5=true, 6=true, 7=true, 8=true, 9=true, 10=false, 11=true, 12=true, 13=true, 14=true, 15=true, 16=true, 17=true, 18=true, 19=true, 20=true, 21=true, 22=true, 23=true, 24=true, 25=true, 26=true, 27=true, 28=true, 29=true, 30=true, 31=true,
`
You are an amazing help, I truly appreciate your prompt replies and help

In your examples you only have "ACC off" flag. Also, both examples are exactly the same. Not sure why you provided two of them.

it printed to log twice so I just shared it.
it seems all the statuses are reversed. I should have only ACC on but I get the general Idea.
Thank you

What is the meaning of first, second and third?
If I want to add a low battery alarm, would it be the following or something else?
if (!BitUtil.check(status, 17)) {             position.set(Position.KEY_ALARM, Position.ALARM_LOW_BATTERY); }

Actually, if I look at the table, the bit 17 can be 0 or 1, so would this be correct?
if (BitUtil.check(status, 17)) { position.set(Position.KEY_ALARM, Position.ALARM_LOW_BATTERY);         } else if (!BitUtil.check(status, 17)) {             position.set(Position.KEY_ALARM, Position.ALARM_SHOCK); }

It doesn't work like that. The bit seems to mean different things for different devices.

Does it mean that if I add only the code for ALARM_SHOCK, it could do battery alerts for some devices and LOW_BATTERY for others?

You need a way to differentiate device models.

And without knowing which one is for which device, it's even desperate. I am also surprised that devices which can report SHOCK cannot report LOWBAT, this is quite strange.
Does BitUtil.check check the changes to former status or just the bit in the status?

Just current but state.


this type is not assignable to NonNullable<this>

TypeScript Version:  2.8.1

Search Terms:  NonNullable, this
Code
class X {
    fn(): void {
        // Type 'this' is not assignable to type 'NonNullable<this>'.
        //  Type 'X' is not assignable to type 'NonNullable<this>'.
        const x: NonNullable<this> = this;
        //    ~
    }
}

Expected behavior:
A reference of type this should be assignable to a NonNullable<this> within a method.
Actual behavior:
this is not assignable to NonNullable<this>.
Playground Link:
http://www.typescriptlang.org/play/#src=class X {
    fn()%3A void {
        const x%3A NonNullable<this> %3D this%3B
    }
}

Related Issues:

That's because a generic is a class definition not an instance. this is an instance. Your code should look like:
class X {
    fn(): void {
        const x: NonNullable<X> = this;
    }
}

@sandersn seems like a bug but I might be missing something extra-subtle

Why should dynamic objects be allowed as generic definitions?

I may have whittled down the actual issue I was dealing with too much. Here is an example of the bug I was trying to be succinct with:
export class Entry<T extends Table> {
    private _table: T | null = null;
    createSubsetForDirectory(): void {
        const entry = new Entry<T>();
        // error TS2345: Argument of type 'Entry<T>' is not assignable to parameter of type 'Entry<NonNullable<T>>'.
        //  Type 'T' is not assignable to type 'NonNullable<T>'.
        //    Type 'Table' is not assignable to type 'NonNullable<T>'.
        this._table!.fn(entry);
        //              ~~~~~
    }
}

export abstract class Table {
    fn(directoryEntry: Entry<this>): this | null {
        return null;
    }
}

@aschmois In this case, I'm using this as a polymorphic this type. See http://www.typescriptlang.org/docs/handbook/advanced-types.html#polymorphic-this-types

@athasach that's actually a much more serious repro as it's a regression from 2.7. That code worked as far back as 2.0

Pinging @weswigham. I suspect this is related to #22096.

I will say that the current behavior doesn't seem totally wrong. In general, a type parameter T isn't assignable to NonNullable<T>. Rather, it is the other way around. And, in the specific example, the this instance might be null or undefined (although it is pretty unlikely).

Pinging @weswigham. I suspect this is related to #22096.

This is just what falls out from conditional type assignability rules, I suppose. The example in the OP didn't use the ! operator at all, so it really doesn't have anything to do with changing ! to also use NonNullable (other than providing another place where people and see the behavior):
class X {
    fn(): void {
        // Type 'this' is not assignable to type 'NonNullable<this>'.
        //  Type 'X' is not assignable to type 'NonNullable<this>'.
        const x: NonNullable<this> = this;
        //    ~
    }
}

It seems like the issue is mostly that NonNullable<T> where T's domain does not include null or undefined (because, eg, T extends Table) needs to collapse to just T, but right now it stays generic. @ahejlsberg I think this is something you changed right before the release actually - making conditional types stay generic more often?

Yes, I did make a change where distributive conditional types are always deferred if the checked type is generic, but I think it stayed generic before as well.
It may be that that ! operator should do a bit more work, i.e. remove null and undefined that are known to be present (as we used to do) and only return a NonNullable<T> if the resulting T could actually be nullable (which wouldn't be the case in the example above after we remove explicit null and undefined). I'm not sure it is feasible to have the NonNullable<T> type collapse as you suggest.

only return a NonNullable if the resulting T could actually be nullable

I'm pretty sure it'd be correct to (re)build that logic into conditional types in general at that point, since nothing about that logic would be specific to either null or undefined. One of the motivating examples for conditional types is non-null types; it'd be off that ! could do the right thing but a conditional type couldn't.
And again, the original issue doesn't involve ! - the postfix operator is just another way to witness the same problem!

@weswigham In principle I agree, but devising the exact logic by which this would happen isn't trivial. We currently defer resolution for distributive conditional types when the check type is generic. Even in cases where we know that the check will always go a certain way (e.g. because of a constraint), we still need to defer because the generic type may be instantiated to a union type that we want to distribute over. Only when we can conclude that distributing over a union wouldn't affect the outcome can we actually consider resolving early. I think it would pretty much amount to recognizing Exclude- and Extract-like types. It may be worth doing, but building it into the getNonNullableType function would definitely be simpler.


Docs: refresh examples

Description of the improvement
Summary of the proposal
The repository contains - at present - examples in CDK and SAM that showcase how to use the Powertools utilities available. The new idempotency utility should be part of these example.
How, where did you look for information
In the CDK & SAM examples.
Missing or unclear documentation
N/A
Improvement
Include examples of the new utility.
Related existing documentation
https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples
Related issues, RFCs
#447

As part of this issue I was thinking of addressing a couple of points:
a. add the Idempotency utility to the examples
b. refactor the part of the example that covers Parameters
c. add Batch Processing
d. improve the README
a. Add Idempotency
As part of this issue we should add something about the Idempotency utility. Based on the current sample I think the most logical place to add the utility would be in the put-item function as specifically modify the handler in such a way that the Idempotency utility is used to ensure that the same item is inserted only once.
Currently the code that inserts the item is part of the handler and looks like this:
const body = JSON.parse(event.body);
const { id, name } = body;

await docClient.send(
  new PutCommand({
    TableName: tableName,
    Item: {
      id,
      name,
    },
  })
);

I propose to extract the logic above to its own function and use the makeIdempotent function wrapper on it using all or some of the arguments.
b. Refactor Parameters
A couple of months ago we added the Parameters utility to the examples in conjunction with the GA of the utility. At the time I recall us struggling to find a way to use it and eventually we settled on creating a second REST API endpoint and using the utility to retrieve an arbitrary value which is then returned in the response.
After looking at the usage again, and also listening customer feedback, I think there's an opportunity to improve this area and use the utility for something more useful.
My first choice would have been to store the name of the Idempotency table (from the previous point) in a SSM parameter and then use the Parameters utility to retrieve it. This however is not possible at the moment given that we must instantiate the DynamoDBPersistenceLayer outside of the function handler and using await at the top-level requires ESM.
For context, and to maybe revisit this once we finally support ESM in the coming months, this is what I mean:
import { getParameter } from '@aws-lambda-powertools/parameters/ssm';
import { DynamoDBPersistenceLayer } from '@aws-lambda-powertools/idempotency/dynamodb';

const persistenceLayer =  new DynamoDBPersistenceLayer({
  tableName: await getParameter('/dev/idempotency-table-name');
});

With that in mind, I think we could revisit this in a month or so and hopefully we'll be able to use the Parameters utility to retrieve the name of the Idempotency table using ES Modules.
c. Add Batch Processing
Given that we are inserting items in a DynamoDB Table, we could enable the Stream on the table and plug a fourth Lambda that consumes the stream and uses Batch Processing to do so.
The trigger for this function could be set to new items (aka inserts NOT updates / deletes). This function would provide an async record handler that would process each record in the batch and do something on it (TBD).
Ideas:

enrich the item with additional data
do some validation and optionally reject the item (aka mark it as failed)
others

d. Improve the README
At the moment the README is a bit bare and I think we could improve it by adding a couple of things:

contextualize the example and explain what it does
provide an overview of the architecture + diagram
try to find a way to make the README more engaging by talking about a fictional use case that the example is trying to solve

@am29d what do you think? If we agree I'll move this out of the GA milestone.

Is there a working example for using v2 with cdk?
We are using SST/CDK and after migrating to V2 the transpiled JS is not valid, the lambda fails with __classPrivateFieldSet is not defined. I see there are private fields used in the IdempotencyConfig.

Hi, I've started working on a refreshed version earlier today and I should have a branch sometime later this week, however the private fields were present already in v1 (see blame view here) and the examples are already using v2.
I'd suggest to check your typescript version and the target version you're transpiling to check that they're recent and targeting Node.js 16 or newer. If none of them fixes the issue I'd recommend opening a dedicated issue.

Thanks @dreamorosi, I did see it was present in v1. I assumed it was something to do with transpiling the esm code now, our repo was already esm.
Target is es2022 and our version of typescript wasn't that far behind but I had already tried using the latest of that.
When you have a branch you can share could you please post the link here? If I still can't get it running after having a look I will create a small repo to reproduce and open an issue.

I just published my working branch, which you can find here. Note that it's still very unpolished, but hopefully it'll help you.

Hi @AllyMurray, just wanted to let you know that I have encountered the same issue and I'm sure it's not an issue with your setup but a bug on our side.
I have opened an issue #2230 to track this and I think I have already a fix available. If I'm right, we should be able to make a release tomorrow with the fix.

That's great @dreamorosi, thanks for sorting that out so quickly. I did have a look at the branch and couldn't see anything obvious so I planned to create a repo to reproduce the issue but you beat me to it 😄

No worries, I initially understood the issue was using v2 in general, but then when I got to adding the idempotency module I got the same error and understood.
It was actually so timely that you commented in the morning, otherwise I'd have thought I was doing something wrong and spent hours trying to fix the wrong thing.
Anyway the fix is merged and we're running tests now, if everything works we should be able to release later today.


Get Extend Kubernetes section into left nav.

This PR creates an Extending Kubernetes section in the left nav.
Addresses part of #8275.
Preview: https://deploy-preview-8530--kubernetes-io-master-staging.netlify.com/docs/concepts/extend-kubernetes/extending/

/assign @heckj

/assign @Bradamant3

@steveperry-53 I might have merged something else that's causing the merge conflict -- sorry! Ping me after you fix and I'll get this one merged.

Started again in new PR #8569/


Use Cartographer's cmake functions for ROS projects.

pull request

pull request

ptal.

Reassigning to damon since he reviewed all the related code in cartographer.


Feature/um 146 shared memory mpi.clean

No synchronization yet. But, you can run bin/recipe_shared_memory
This is a clean branch rebuilt by hand.  Three code commits.

LGTM

LGTM

LGTM


Support bracket notation for jsonpath revisit

revisit #14
I had separated the JsonPathCompiler
Would you please review this?

On reading Readme of JsonPathCompiler repository, it says "read javadoc", but I could not find it. Could you put a link on its readme?

Reviewed

Let us rethink of package name of jsonpath compiler "kysnm".
Imagine managing the library as a team, we can transfer github repository easily later, but changing package name is not easy.
Candidates

com.github.dena https://github.com/dena
com.github.denadev https://github.com/denadev
com.github.denaanalytics
com.dena.analytics
jp.mbga.analytics

@civitaspo do you have any opinions?

hmm, I don't have any other options.
"com.dena.analytics" sounds good to me, because other package names which have "github" namespace premise that the organization (which has the name) exists or will exist on github. If this library uses one of the package names, the transferring repository (including outside the organization) becomes difficult.

The bad point of "com.dena.analytics" is that we actually do not have the domain yet.
But, well,,,,, lt us go with "com.dena.analytics".

Reviewed (2)

Fixed

LGTM. Please squash to meaningfull commits. Or, is it okay to "squash and merge" into onke commit?

I'm okay to "squash and merge". Thank you.

0.6.0.pre1 is released

Thanks!


Async/Await doesn't seem to work

Please attempt to answer the following questions before submitting a new issue:

What version of Cloudscraper are you using?

<EMAIL_ADDRESS>

What version of Node.js are you using? (Please share the process information)

v10.16.3

How often does the problem occur?

Whenever i use async/await it doesn't seem to work properly but it works when i use .then functions

What is the URL?

https://www.goat.com/web-api/v1/product_variants?productTemplateId=travis-scott-x-air-jordan-1-retro-high-og-cd4487-100'

Are there any similar issues? (Please share the links)

No, I haven't seen anything on stackoverflow or github

[x] I have read the README. (Code examples)

Please share a minimal working code snippet that reproduces the problem.
Code snippet
const goatRequest = async (link) => {
    try {
        let response = await cloudscraper.get(link)
    } catch (error) {
        console.log(error)
    }

    if (response.statusCode == 200){
        console.log(response.body)
    }
}

When I run the function it prints this in the console
(node:2034) UnhandledPromiseRejectionWarning: ReferenceError: response is not defined
    at goatRequest

(node:2034) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2034) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

Should be fixed in 4.6.0. Please update and try again


Error deserialize closed issue json

Issue.cs#L40:
...
[JsonProperty("closed_by")]
public string ClosedBy { get; set; }
...

GitLab API Documentation:
...
   "closed_by" : {
      "state" : "active",
      "web_url" : "https://gitlab.example.com/root",
      "avatar_url" : null,
      "username" : "root",
      "id" : 1,
      "name" : "Administrator"
    },
...

Please, fix it
[JsonProperty("closed_by")]
public ClosedBy ClosedBy { get; set; }

public class ClosedBy
{
    [JsonProperty("state")]
    public string State { get; set; }

    [JsonProperty("web_url")]
    public Uri WebUrl { get; set; }

    [JsonProperty("avatar_url")]
    public Uri AvatarUrl { get; set; }

    [JsonProperty("username")]
    public string Username { get; set; }

    [JsonProperty("id")]
    public int Id { get; set; }

    [JsonProperty("name")]
    public string Name { get; set; }
}

@MurashovAlexander could you please give some more information about the exception?

@MurashovAlexander could you please give some more information about the exception?

JsonReaderException: Unexpected Character encountered while parsing value: {.Path '[0].closed_by', line 1, position 538.

I'll have a look at it.

Issue should be fixed in PR #53

Issue should be fixed in PR #53

thanks


HTTP  500 errors occurred during the creation of the wasmplugin

Describe the feature request
The wasmplugin resource triggers both ECDS and LDS updates, and when envoy receives the  LDS first, a new listener will start serving requests even if no wasm filter is found. Then all http requests fail with 500 status until the wasm filter loaded through ECDS.
Describe alternatives you've considered
Maybe we can add default_config and apply_default_config_without_warming to ECDS like this:
             {
              "name": "wasm-test",
              "config_discovery": {
               "config_source": {
                "ads": {},
                "initial_fetch_timeout": "0s",
                "resource_api_version": "V3"
               },
               "default_config": {
                "@type": "type.googleapis.com/envoy.extensions.filters.http.composite.v3.Composite"
               },
               "apply_default_config_without_warming": true,
               "type_urls": [
                "type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm",
                "type.googleapis.com/envoy.extensions.filters.http.composite.v3.Composite"
               ]
              }
             }

The default_config here is  a empty composite filter config used to pass the requests without any processing.
I tested this configuration and no http 500 errors occurred during the creation of the wasmplugin resource.
Affected product area (please put an X in all that apply)
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[x] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Additional context

The listener won't be ready before ecds loaded

The listener won't be ready before ecds loaded

@hzxuzhonghu You can test the configuration below and the listener will be ready even if the wasmtest filter configuration is not found in ecds.
*envoy.yaml:
node:
  cluster: test-cluster
  id: test-idn
admin:
  address:
    socket_address: { address: <IP_ADDRESS>, port_value: 9901 }
static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address: { address: <IP_ADDRESS>, port_value: 10000 }
    listener_filters:
    - name: "envoy.filters.listener.tls_inspector"
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          codec_type: AUTO
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match: { prefix: "/" }
                direct_response:
                  status: 200
                  body:
                    inline_string: "hello world"
          http_filters:
          - name: wasmtest
            config_discovery:
              config_source:
                path: ./ecds.yml
                resource_api_version: V3
              type_urls:
              - type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm

ecds.yaml:
resources: {}

maybe static listener and dynamic listener behave differently.
cc @ramaraochavali may know this

@hzxuzhonghu  Dynamic listeners have the same problem. I tested with the official demo, and there is always a problem when loading the wasm code for the first time through this configuration (envoy has wasm code cache, so only the first time):
kind: WasmPlugin
metadata:
  name: wasmtest
  namespace: istio-system
spec:
  selector:
    matchLabels:
      istio: ingressgateway
  url: oci://xxxxx

Start a  wrk like this:
wrk -c10 -t10 -d60s http://<IP_ADDRESS>/productpage

Then you can see these errors in the ingressgateway's log:

I am not sure how you get this result, in pilot-agent, pilot-agent will convert the wasm filter before sending to envoy

I am not sure how you get this result, in pilot-agent, pilot-agent will convert the wasm filter before sending to envoy

I know, this covertion is avoid to load wasm code from remote, however this way not solve the problem that ECDS is not ready when LDS is acked.

If you do config dump, you can see the listener is warming rather than ready. So I could not understand how it can take effect. Inb other word, envoy is still using old warmed listener.

apiVersion: extensions.istio.io/v1alpha1
kind: WasmPlugin
metadata:
  name: openid-connect
  namespace: default
spec:
  selector:
    matchLabels:
      app: httpbin
  url: oci://private-registry:5000/openid-connect/openid:latest
  imagePullPolicy: IfNotPresent
  pluginConfig:
    openid_server: authn
    openid_realm: ingress

I applied the above config, unfortunately, I see complete different scenario as I described before. Not sure why

@hzxuzhonghu Did you use a stress tool for testing? When I used wrk with about 100 qps, I only saw 8 failures.

@hzxuzhonghu Add another condition: it will only happen when the wasmplugin resource is applied for the first time after envoy is started.

Did you use a stress tool for testing? When I used wrk with about 100 qps, I only saw 8 failures, and they all happened within 100ms:

I didn't do that. I just applied a wasmplugin to a sidecar and then curl manually
cc @bianpengyuan @kyessenov

Is it a problem with the Wasm or Composite? I wrote that note. What that means is that we don't do transitive warming, e.g. if filter itself needs warming, that won't trigger the outer listener warming if the config is sent via ECDS.
Assuming Wasm code is inlined, that should not require warming, unless something else in Composite is not inlined.

@kyessenov Both Wasm and Composite are fine. I think the problem occurs in this scenario: ECDS and LDS updates are racing, LDS updates arrive first, then new listeners start serving requests, and fail because no filter config is found, with response_flags set to NFCF.
This problem will cause envoy to fail to process the request during the creation of the istio wasmplugin resource.
My solution was to change istio's code to use the empty config for the Composite filter as the default_config, this filter doesn't do anything and will change to the Wasm filter's config when the ECDS update arrives.

cc @tbarrella

Racing ECDS and LDS is supported. It'd still help to find out why new listener start serving before filter config is loaded. That means that ECDS is not putting a new listener to warming, so could be a bug. There is a possibility of a deny-listed extension name, but apart from that, if ECDS is already loaded, it should be runnable on the new listener.

@kyessenov
I seem to have found the problem, this line here will trigger the listener's  watcherHandle to be ready and then the new listener will be warmed, even if the exception of unexpected resource name in ExtensionConfigDS response is thrown.
https://github.com/envoyproxy/envoy/blob/09ede365201986d45e2f8cae19695bdd8a9fceb2/source/common/filter/config_discovery_impl.cc#L91

@johnlanni @kyessenov I encountered this problem in the production environment, and the Istio version is 1.16.5.
Has there been any progress on this issue? I think this is a relatively serious problem.

https://github.com/istio/istio/pull/38399
@fatedier You can use this way as a workaround.

It seems that the latest envoy code solves this problem, @kyessenov please confirm.
https://github.com/envoyproxy/envoy/blob/main/source/common/filter/config_discovery_impl.cc#L137

@kyessenov It seems to find the problem, this line here will trigger watcherHandle of the listener to be ready and then the listener will be warmed, even if the exception of unexpected resource name in ExtensionConfigDS response is thrown. https://github.com/envoyproxy/envoy/blob/09ede365201986d45e2f8cae19695bdd8a9fceb2/source/common/filter/config_discovery_impl.cc#L91
Looking at these debug logs you will find the problem, Unexpected resource name in ExtensionConfigDS response is printed after replacing existing listener 1.
[2022-05-04 16:55:58.031][2327134][debug][config] [external/envoy/source/common/config/filesystem_subscription_impl.cc:64] Filesystem config refresh for /mnt/zhangty/lds.yml
[2022-05-04 16:55:58.032][2327134][debug][config] [external/envoy/source/server/listener_manager_impl.cc:391] begin add/update listener: name=listener_0 hash=16994993739313691510
[2022-05-04 16:55:58.032][2327134][debug][config] [external/envoy/source/server/listener_manager_impl.cc:423] use in place update filter chain update path for listener name=listener_0 hash=16994993739313691510
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/server/listener_manager_impl.cc:85]   filter #0:
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/server/listener_manager_impl.cc:86]     name: envoy.http_connection_manager
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/server/listener_manager_impl.cc:89]   config: {"@type":"type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager","access_log":[{"typed_config":{"@type":"type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog"},"name":"envoy.access_loggers.stdout"}],"stat_prefix":"ingress_http","route_config":{"virtual_hosts":[{"domains":["*"],"name":"local_service"}],"name":"local_route"},"http_filters":[{"name":"wasmtest","config_discovery":{"type_urls":["type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","type.googleapis.com/envoy.extensions.filters.http.composite.v3.Composite"],"config_source":{"path":"/mnt/zhangty/ecds.yml","resource_api_version":"V3"}}},{"name":"envoy.router","typed_config":{"@type":"type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"}}]}
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/extensions/filters/network/http_connection_manager/config.cc:625]     http filter #0
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/extensions/filters/network/http_connection_manager/config.cc:665]       dynamic filter name: wasmtest
[2022-05-04 16:55:58.033][2327134][debug][file] [external/envoy/source/common/filesystem/inotify/watcher_impl.cc:47] added watch for directory: '/mnt/zhangty' file: 'ecds.yml' fd: 1
[2022-05-04 16:55:58.033][2327134][debug][init] [external/envoy/source/common/init/manager_impl.cc:24] added shared target FilterConfigSubscription init wasmtest to init manager Listener-local-init-manager listener_0<PHONE_NUMBER>9313691510
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/extensions/filters/network/http_connection_manager/config.cc:625]     http filter #1
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/extensions/filters/network/http_connection_manager/config.cc:654]       name: envoy.router
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/extensions/filters/network/http_connection_manager/config.cc:657]     config: {
 "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
}

[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/server/filter_chain_manager_impl.cc:237] new fc_contexts has 1 filter chains, including 1 newly built
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/server/listener_impl.cc:743] add warming listener: name=listener_0, hash=16994993739313691510, address=<IP_ADDRESS>:10000
[2022-05-04 16:55:58.033][2327134][debug][misc] [external/envoy/source/server/listener_impl.cc:752] Initialize listener listener_0 local-init-manager.
[2022-05-04 16:55:58.033][2327134][debug][init] [external/envoy/source/common/init/manager_impl.cc:53] init manager Listener-local-init-manager listener_0<PHONE_NUMBER>9313691510 initializing
[2022-05-04 16:55:58.033][2327134][debug][init] [external/envoy/source/common/init/target_impl.cc:15] init manager Listener-local-init-manager listener_0<PHONE_NUMBER>9313691510 initializing shared target FilterConfigSubscription init wasmtest
[2022-05-04 16:55:58.033][2327134][debug][config] [external/envoy/source/common/config/filesystem_subscription_impl.cc:64] Filesystem config refresh for /mnt/zhangty/ecds.yml
[2022-05-04 16:55:58.034][2327134][debug][init] [external/envoy/source/common/init/watcher_impl.cc:14] shared target FilterConfigSubscription init wasmtest initialized, notifying init manager Listener-local-init-manager listener_0<PHONE_NUMBER>9313691510
[2022-05-04 16:55:58.034][2327134][debug][init] [external/envoy/source/common/init/watcher_impl.cc:14] init manager Listener-local-init-manager listener_0<PHONE_NUMBER>9313691510 initialized, notifying Listener-local-init-watcher listener_0
[2022-05-04 16:55:58.034][2327134][debug][config] [external/envoy/source/server/listener_impl.cc:743] execute in place filter chain update: name=listener_0, hash=16994993739313691510, address=<IP_ADDRESS>:10000
[2022-05-04 16:55:58.034][2327134][debug][config] [external/envoy/source/server/listener_manager_impl.cc:603] replacing existing listener 1
[2022-05-04 16:55:58.034][2327134][debug][config] [external/envoy/source/server/listener_impl.cc:743] draining 1 filter chains in listener listener_0: name=listener_0, hash=13339156071402463368, address=<IP_ADDRESS>:10000
[2022-05-04 16:55:58.121][2327134][warning][config] [external/envoy/source/common/config/filesystem_subscription_impl.cc:43] Filesystem config update rejected: Unexpected resource name in ExtensionConfigDS response:
[2022-05-04 16:55:58.121][2327134][debug][config] [external/envoy/source/common/config/filesystem_subscription_impl.cc:44] Failed configuration:
resources {
}

[2022-05-04 16:55:58.121][2327134][debug][filter] [external/envoy/source/common/filter/config_discovery_impl.cc:168] Updating filter config wasmtest failed due to 2
[2022-05-04 16:55:58.121][2327134][info][upstream] [external/envoy/source/server/lds_api.cc:77] lds: add/update listener 'listener_0'

It seems that this envoy PR fix this problem:
https://github.com/envoyproxy/envoy/pull/25974

@johnlanni Thank you for reply.
@kyessenov Which Istio version includes this fix? Is it possible to backport it to version 1.16?

It's difficult to backport to 1.16. I backported it to 1.17 in the Google build so we can do the same for Istio OSS.

It's difficult to backport to 1.16. I backported it to 1.17 in the Google build so we can do the same for Istio OSS.

@kyessenov That's great, thank you for your work.


Compiler API to resolve path from ImportDeclaration

Hi there, since TS supports paths in tsconfig.json, is there an API in the compiler (Program, CompilerHost or something) to programmatically resolve real path of an import?
I wrote this transformer https://github.com/longlho/ts-transform-css-modules and it's tripping up on paths that are aliased in tsconfig.json, e.g:
import * as css from 'alias/foo.css'

tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "alias/*": "../../../some_location/*"
    }
  }
}

I can try to manually reconstruct TS resolver but rather not to.
Thanks!

ts.resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;

For your use case you can ignore the last parameter redirectedReference.
The cache if needed can be created using
ts.createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string): ModuleResolutionCache;

Thanks a lot for the help! I gave that a try but unfortunately .css is not a valid TS module extension & looks like failedLookupLocations is internal so I can work off of the result :(

Now that the original question has been answered, wouldn't this be a duplicate of #28770?


Show how to change the naming format for properties

What to solve
Sometimes you want to decide on the naming format of properties, maybe you always want to append something, or just want a different format.
This can be done by changing the naming convention, by providing a custom function for formatting the property name.
Use the following code in the example:
generator = new TypeScriptGenerator({
  namingConvention: {
    property: (name) => {
      return `append${FormatHelpers.toPascalCase(name)}`;
    }
  }
});

Duplicate the folder https://github.com/asyncapi/modelina/tree/master/examples/TEMPLATE and rename it to changing-naming-format-for-properties. Update any relevant documentation.

Some folks want more specific tasks to complete, or use this if you get stuck - CLICK ME

This issue is specially designed for first-time contributors, that want to contribute their very first code. If you are accustomed to how to solve issues in AsyncAPI, you can skip some of the steps.
What to know before getting started
Before actually getting started with solving the issue, there are a few things that need to be set up:

Make sure you familiarize yourself with our code-of-conduct and contributor guidelines
We work on forks of repositories and branches in forks, if you are unsure how to set this up you can follow the guide on our git-workflow setup.

Feel free to reach out either here in the issue, or on slack under #tooling if you have any questions or are stuck, we will gladly help.
Getting started
This is a task list, that you copy into your PR description to ensure everything is included, this list walks you through each step as to how to solve this issue. It assumes that you have already set up your fork and branch and are ready to commit code.

[ ] Duplicate the folder https://github.com/asyncapi/modelina/tree/master/examples/TEMPLATE and rename it to changing-naming-format-for-properties. This will give you a good base to start out with.
[ ] Adapt the documentation about the feature and ensure the example are linked correctly.

The docs that need to change are the following: docs/advanced.md#change-the-naming-format-for-properties
The documentation must reference an actual example that is tested and contain no code itself. It is because the docs will inevitably become desynchronized and display incorrect code.

[ ] Adapt the examples overview to include your new example.
[ ] Now it is time to adapt the test code (in examples/changing-naming-format-for-properties/index.spec.ts) and the implementation (in examples/changing-naming-format-for-properties/index.ts).
[ ] Make sure that the test succeeds, by standing in the new example folder and execute npm run test.
[ ] Make sure that there are no linting errors, by standing in the root folder and execute npm run lint.
[ ] Create your PR, by selecting your branch that should be merged with the master branch - https://github.com/asyncapi/modelina/compare
[ ] It is good practice to double-check your PR before requesting a review from someone else, the same way you read an assignment before handing it in.

Do you have any examples I can check for reference?
We have currently 4 example documentations that you can look for guidance on how to achieve the desired output:

How to add logging to the library
Generate models from AsyncAPI documents
Generate models from JSON Schema draft 7 documents
Generate an interface instead of class

Happy Hacktoberfest, everyone! ✨✨ Feel free to reach out to me for any questions you may have about adding documentation on these open issues. 🙂
Tag me in your AsyncAPI Doc PRs 📄, my GitHub handle is /alequetzalli 🐙.

Because we have https://modelina.org/examples?selectedExample=overwrite-naming-formatting I would say this is fine.


The 'Save' Button on the 'Import/Export' Feature is functioning properly.

The 'Save' Button on the 'Import/Export' Feature is functioning properly. Neither the Pokemon Showdown Desktop Application nor on the official website does it work.
I found out while trying to import a team I found on Smogon.
Figured I might as well mention this.
EDIT: It's only when you want to import a team; The importing individual sets / Pokemon works fine.
EDIT 2: It seems to work only after you import individual sets for Pokemon. Not entirely sure if you have to do that for the rest of the 5 Pokemon though.

Works fine for me. Maybe a browser issue?

I realized what the problem. I was trying to import to different Hidden Power Types on the same line.  I delete one and it worked. Apologies for the user error.

Could you give an example? That's something I might want to fix anyway.


[ISSUE #5344] Fix Windows and Mac CI pipelines

Make sure set the target branch to develop
What is the purpose of the change
Fix https://github.com/apache/rocketmq/issues/5344
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Codecov Report

Merging #5345 (d3e901c) into develop (099e01f) will decrease coverage by 1.61%.
The diff coverage is n/a.

:exclamation: Current head d3e901c differs from pull request most recent head 7e4a7f0. Consider uploading reports for the commit 7e4a7f0 to get more accurate results

@@              Coverage Diff              @@
##             develop    #5345      +/-   ##
=============================================
- Coverage      43.07%   41.45%   -1.62%
+ Complexity      7807     7543     -264
=============================================
  Files           1001     1001
  Lines          69675    69684       +9
  Branches        9204     9205       +1
=============================================
- Hits           30012    28888    -1124
- Misses         35883    37129    +1246
+ Partials        3780     3667     -113

Impacted Files
Coverage Δ

.../org/apache/rocketmq/store/timer/TimerRequest.java
0.00% <0.00%> (-96.78%)
:arrow_down:

...pache/rocketmq/store/dledger/DLedgerCommitLog.java
0.00% <0.00%> (-79.00%)
:arrow_down:

...apache/rocketmq/store/timer/TimerMessageStore.java
0.00% <0.00%> (-54.19%)
:arrow_down:

...rg/apache/rocketmq/common/stats/StatsSnapshot.java
84.61% <0.00%> (-15.39%)
:arrow_down:

...org/apache/rocketmq/store/AppendMessageResult.java
51.66% <0.00%> (-15.00%)
:arrow_down:

...n/java/org/apache/rocketmq/store/ConsumeQueue.java
57.81% <0.00%> (-10.75%)
:arrow_down:

.../apache/rocketmq/common/stats/MomentStatsItem.java
38.09% <0.00%> (-9.53%)
:arrow_down:

...ache/rocketmq/common/stats/MomentStatsItemSet.java
39.13% <0.00%> (-8.70%)
:arrow_down:

...ache/rocketmq/store/config/MessageStoreConfig.java
50.51% <0.00%> (-8.20%)
:arrow_down:

...pache/rocketmq/store/SelectMappedBufferResult.java
66.66% <0.00%> (-5.56%)
:arrow_down:

... and 36 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

For the first time, we get all green badges from all CI pipelines


add sticky version flag to https://www.tensorflow.org/

The https://www.tensorflow.org/ site would be greatly improved by a sticky flag (stored in a cookie in the browser) for the version you're using.  This would be used (as a default) for the landing page and search results.  People could choose to set it, or use have some such value as 'stable' for the latest stable release.
I waste a lot of time repeatedly navigating from 1.8 to the right version for the environment I'm working in.  When reading the docs, I prefer to read them for the right version of the API ...

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

OS Platform and Distribution: N/A
TensorFlow installed from: N/A
TensorFlow version: 1.7
Bazel version: N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A
Exact command to reproduce:  https://www.tensorflow.org/api_docs/python/ then search (e.g. tf.layers.dense).  The version I require (1.7) isn't on the first or second pages, so the quickest route is to click on the link for any of the prior versions (e.g. first is for v1.1) and edit the URL to change /1.1/ to /1.7/.
Nasty, and not recommended as a standard practice.

Thanks for the feedback, but there are no plans to add this feature at this time.
However, you can bookmark an older version: https://www.tensorflow.org/versions/r1.7/api_docs/python/
And we are planning to add a /stable/ directory that points to the latest release.

If you could make search aware of and respect this base version, that would be very helpful.

Good idea and will keep it in mind, thanks


Improve DX for IdentityInput

Discussed in https://github.com/FuelLabs/fuels-ts/discussions/1844

Originally posted by Dhaiwat10 March  7, 2024
Take this Sway function signature for example:
fn new_game(player: Identity);

If you try to call this function via the TS SDK, it would look something like this:
await contract.functions.new_game({ Address: { value: walletAddress });
await contract.functions.new_game({ ContractId: { value: contractId });

The idea is to change it to something like:
type Identity = {address: string, contractId?: never} | {address?: never; contractId: string}

await contract.functions.new_game({ address: walletAddress });
await contract.functions.new_game({ contractId: contractId });

It seems to me that we can generalize this approach for all enums, not just the Identity one?
For example, this is currently possible:
    const { value } = await contract.functions
      .take_b256_enum({ Value: 'qweqwe', Data: 'asds' })
      .call();

But we'd want to only provide Value or Data.


feat: add dark splash screen, ref #4398

Try out this version of Leather — Extension build, Test report

Adds dark splash screen, if system theme is dark
Must admit here, that if users chooses light theme in wallet and has dark system theme enabled - splash screen will be dark
https://github.com/leather-wallet/extension/assets/46521087/575c4ec8-447b-4c8e-8ec1-3390662f15df

Please link issues via the "Development" feature in the right-hand side generally 🙏

@alter-eggo: what's happening with this PR? Can we update and get it merged?

@pete-watters I discussed with @fabric-8 it. need to add animation here, will do it later

@pete-watters I discussed with @fabric-8 it. need to add animation here, will do it a bit later

OK great. Maybe we can close the PR until it's ready? Or make it Draft?

close, as will work on it a little bit later


Research: Domain of Companies and Securities

Research the Domain of Companies and Securities

Entities:
Company
- name

Security
- company
- name
- code

SecurityPrice
- security
- company
- price
- date


Rendering after promise resolution

Any suggestion on how to handle this?

Hi @drmikecrowe! You might be the first user of malevic! Didn't notice your problem.
This library renders everything synchronously, when you call render() or sync().

Hi @drmikecrowe! You might be the first user of malevic! Didn't notice your problem.
This library renders everything synchronously, when you call render() or sync().

@drmikecrowe I browsed your repository a little bit. Sorry.
Some notice: in JSX lower case tag is used for elements (like <div> or custom elements like my-custom-element defined with customElements.define('my-custom-element', MyCustomElement)). So when you assign a string, the behavior is unpredictable.

@drmikecrowe I browsed your repository a little bit. Sorry.
Some notice: in JSX lower case tag is used for elements (like <div> or custom elements like my-custom-element defined with customElements.define('my-custom-element', MyCustomElement)). So when you assign a string, the behavior is unpredictable.


Increment counter when messages to identity fail

This adds a counter to an identity for the number of consecutive messages that we have failed to send.
An endpoint accepts the identity or msisdn of the identity and the delivery status of the last message sent. If the delivery was unsuccessful we increment the count and if it was successful we decrement the count.
If the count reaches a limit specified in the settings then a web hook is triggered. The payload sent by this hook is the identity id and the value of the count.

@erikh360 I've added tests for those two cases. Ready for another review.


Fix build.sh so it doesn't corrupt the Info.plist

The script appears to remove 2 lines instead of 3, resulting in a repeated </dict> and thus a corrupted plist.

Perhaps we could use PlistBuddy? It's already included in macOS

Should work now

Merged, thanks.


Cards: Waterfall view does not correctly layout on initial load, even when the size is provided

Provide a general summary of the issue here
When using waterfall layout, when disabling caching and throttle network, the card renders in the wrong size before the image is loaded. However, the sizes are provided, so I expect it to still layout correctly.
The same happens when loading additional cards with infinite scroll.
https://github.com/user-attachments/assets/c8bf1f2b-4d9e-4f8e-b5d1-d024ad1a9ed0
🤔 Expected Behavior?
When the size is provided, it should layout the cards correctly.
😯 Current Behavior
Even though the size is provided, all the cards have the same size.
💁 Possible Solution
No response
🔦 Context
No response
🖥 Steps to Reproduce

open https://reactspectrum.blob.core.windows.net/reactspectrum/d405547aa7a7a38ac6b05a7887702e082259cf53/storybook/index.html?path=/story/cardview-waterfall-layout--default-waterfall&providerSwitcher-express=false
open developer tools
in networking, disable caching, throttle 3g
reload the story with the button in the storybook
change the window size and see the cards change size

Version
current HEAD
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Macos
🧢 Your Company/Team
Adobe/GenStudio
🕷 Tracking Issue
No response

Might be something with the images not loading fully by the time we measure the actual DOM nodes for the true size of the cards thus making each card the same size. Ideally we should relayout when the images fully load so we get the true aspect ratio for each card.

We will revisit this in S2 CardView, closing out in favor of https://github.com/orgs/adobe/projects/19/views/32?sliceBy[value]=🌈&pane=issue&itemId=68909718


auth on REST API

I followed the steps to set this up but I wanted to try securing my REST API.  Basically started with the project from scratch.  When I get past the MSFT login screen I get this:
An unhandled exception occurred while processing the request.
Exception: OAuth token endpoint failure: Status: BadRequest;Headers: Cache-Control: no-cache, no-store
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
x-ms-request-id: 82e6483a-836f-4f98-92d9-3699c9a70000

Does this need some special handling with a controller where I secure it with     [Authorize]?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a4c264c0-0c5c-298e-bb45-9b4891c8d162
Version Independent ID: ce69b990-0b4c-abda-cd2d-68f85cd8031e
Content: Microsoft Account external login setup with ASP.NET Core
Content Source: aspnetcore/security/authentication/social/microsoft-logins.md
Product: aspnet-core
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

The sample is for securing web UI, not web APIs.  See #4556


Lag when holding down x or X

The new selection is rendered as expected when repeatedly pressing x or X, but when holding down either key, the new selection isn't rendered until the key is released.
I believe this is because I'm running a shell command to detect whether the selection spans multiple lines, which is an expensive operation to be running repeatedly.
Replacing shell commands with native Kakoune execute-keys and/or evaluate-commands should eliminate this lag.

I haven't noticed this lag recently, and I'm not sure how to completely eliminate calls to the shell, so I'm going to close this.


Add a first list of Tier 1 variables

I open a new pull-request with only Tier 1 variables.
I found it easier for @IAMconsortium/common-definitions-macro-economy to follow discussions and agree with PR with manageable size (working with small subset of variables and from the same tier).
Open to review for @IAMconsortium/common-definitions-macro-economy
@orichters thank for your work with #56 being usefull for the Tier 2 & 3 as well.

Seems good to be merged.

Thank you Daniel for reviewing this.

Thank you @IAMconsortium/common-definitions-macro-economy for putting together this PR.
Two suggestions before merging, to ensure the long-term viability of the common-definitions variable template: this PR adds quite a few top-level variables (or categories). In order to keep the number of top-level variables small, how about the following:
1. make Employment and Unemployment sub-categories of Population (similar to Population|Urban vs. Population|Rural).

I am ok with this. Even though Employment + Unemployment does not equal total population, but this is a matter of appropriate definition. Olivier and Laurent, if you agree I will push the changes.

2. make Import and Export sub-categories of Trade and add `[Value]` for disambiguation, so have

   * Trade|Import [Value]
   * Trade|Export [Value]

   and then later add

   * Trade|Primary Energy|Biomass [Volume]
   * ..

This is a good idea.
I am less sure about this one as I was going to suggest a GDP decomposition as tier 2 variables : Export and Import in values being component of GDP decomposition.
But in this case this would be :
GDP|"Production side" of something else|Export
I will think about it. Or we can apply your suggestion and revert it in an upcomming PR.

Thanks @danielhuppmann for the reminder.
The zoom was a suggestion but we did not plan it.
I will commit a change for Employment and follow your suggestion Trade, which will help to close the PR faster.
Then leave a discussion on GDP composition for later.

Thanks @FlorianLeblancDr. Agree on your point about population and employment being not quite ideal. How about “Labour Market|Employment” as a new top-level category?

ping @FlorianLeblancDr - can we move this forward and merge soon?

@danielhuppmann
Yes sorry I got busy.
This seems good now :

I took your suggestion for Export / Import
I find a way to implement Employment variables as a sub-category of Population.
This makes sens, in a near future we might want to report unemployment by education type (and by sector / education)

Thank you!
I'm not sure whether this list is helpful...

Population|Employment
Population|Female
Population|Male
Population|Not Active
Population|Unemployment
Population|Urban
Population|Rural

There are too many different categories mixed together...
Can I again suggest to use Labour Force|Employed vs. Labour Force|Unemployed (plus breakdowns by education later) instead?

Sure, I am kind of agnostic at this point, I was trying to follow your initial suggestion to move it in Population.
I got your point : Population defines what people are (by age, sex, education) not what they do.
I find it useful to have the "Not Active" in the tag, in order to suggest, besides definitions, that the sum of Employment + Unemployment is not equal to total population.. even though "Labor Force|Not Active" is a little strange.
"Pop. Activity" could include all.
Feel free to follow your intuition and merge.


Defining operators for CustomType

In the documentation, it states:

It is strongly recommended that, when defining operators for custom types, always define the full set of six operators together, or at least the == and != pair.

But i can't find any example for defining operators for a custom type?
I've tried:
        tb.with_fn("<", |a, b| {
            Self::compare(a, b).expect("Could not compare prices") == Ordering::Less
        });
        tb.with_fn(">", |a, b| {
            Self::compare(a, b).expect("Could not compare prices") == Ordering::Greater
        });
        tb.with_fn("<=", |a, b| {
            let cmp = Self::compare(a, b).expect("Could not compare prices");
            cmp == Ordering::Less || cmp == Ordering::Equal
        });
        tb.with_fn(">=", |a, b| {
            let cmp = Self::compare(a, b).expect("Could not compare prices");
            cmp == Ordering::Greater || cmp == Ordering::Equal
        });
        tb.with_fn("!=", |a, b| {
            Self::compare(a, b).expect("Could not compare prices") != Ordering::Equal
        });
        tb.with_fn("==", |a, b| {
            Self::compare(a, b).expect("Could not compare prices") == Ordering::Equal
        });

But i still get an error that the function ">" wasn't found?
How do you define operators for custom types?

After some more digging, i managed to find the solution: I had to use the Engine, not the typebuilder.
    engine.register_fn("==", |a: MyType, b: MyType| a == b);

Is it possible this could be in the typebuilder aswell? I have no idea how the two interact, so it's more of a question/suggestion.

@schungx thank you for the swift reply. I will definitely try this later :+1:

It worked wonders. Thank you 👍


Originally from @abunashir in https://github.com/metanorma/metanorma/issues/95#issuecomment-604462712

Yap, I can look into it. From the first look, I agree with Ron about having a separate library dedicated to find or download fonts and then utilize that using metanorma setup or some other interface. Here is how I would have approach this:

Develop a separate library(eg: font-finder), that will work more likely as finder or downloader > for fonts(using system or internet) and then copy those fonts to the provided directory.
Then metanorma will use that library, and metanora setup will look at it's flavor for fonts manifesto and  pass it to the font-finder with a download path.
If missing fonts requires licensing agreement then metanorma will also prompt that for user input.

Also this:
When the user runs setup, we should create a ~/.metanorma/fonts directory to install all necessary fonts into.
There should be a command metanorma setup (because user may upgrade metanorma gems that have additional flavors that need more fonts).
Users can install additional flavors that may require additional fonts. Running metanorma setup should find out requirements from these flavors and install the fonts in the proper place.
We need the user to install fonts him/herself because of font licensing for distributions -- users can download the fonts freely, but we cannot distribute them. Even on Ubuntu where there is a package to install Windows fonts, we cannot depend on it because it is in the "contrib" repository and is not enabled by default.
...
This means that:

Each flavor must provide it's own "font manifest file" to describe what fonts it requires.
We must have a processor for the font manifest file to know how to install each font.

Instead of making the user manually run metanorma setup, we can also ask the user on first run if the font directory is not setup the following:
Metanorma has detected that you do not have the necessary fonts installed
for PDF generation. The generated PDF will use generic fonts that may not
resemble the desired styling. Metanorma can download these files for you
if you accept the font licensing conditions for the fonts "font-1", "font-2" ....
If you want Metanorma to download these fonts for you and indicate your
acceptance of the font licenses, type "Yes". (Y/N?) Y

This is done in https://github.com/fontist/formulas/blob/master/Formulas/cleartype_fonts.rb . This ticket has been split into multiple tickets.


Convert macros to use ::extendr_api where possible.

Many macros rely on use extendr_api::prelude::* we should make all macros
use ::extendr_api.
In procedural macros, we may be able to use CARGO_PKG_NAME to detect if we are compiling
in our own project and the pick either crate::ident or ::extendr_api::ident.
This is a little more challenging. So jump in if you have done some proc_macro work before.

I've looked at this extensively today. Even if you do the above, two invocation of the #[extendr] macro (for example) within the same module, would double the same import statements, and that's an error.
I've tried to use a pattern const _:() = {}, but then functions defined within that are not available outside of this scope. Similarly defining intermediate modules and scoping the use-statements in it, doesn't work, because you need a unique module name every time.
This is a giant headache, and at this point I don't know a solution for it. Let me know if there are other ideas.

Why can't we just avoid using use and instead just namespace all the imported types?

That's also an idea, however it will add a lot of clutter. The reason is a lot of the time Robj has traits that are called, meaning we'll need <PLACE_HOLDER as Trait>. as well. I'm up for making such a PR but it will be ugly.

It will make the trait definition cluttered maybe, but no one will see the actual generated code so it's no big deal.

Actually, we can just put the use statements within each wrapper function, so there wouldn't be confusion.
But I can report the trick with the environment variable doesn't work.


Query failed : Exception: Cast from BOOLEAN to BOOLEAN not supported

per original description at https://community.mapd.com/t/query-failed-exception-cast-from-boolean-to-boolean-not-supported/900
While MAPD doesn’t claim to support distinct predicate, this results in an expected error, suggesting re-written query failing.
select rnum, tsint.csint from tsint where tsint.csint is distinct from 1
Error: Query failed : Exception: Cast from BOOLEAN to BOOLEAN not supported
create table if not exists TSINT ( RNUM integer not null , CSINT smallint );
insert into TSINT(RNUM, CSINT) values ( 0, NULL);
insert into TSINT(RNUM, CSINT) values ( 1, -1);
insert into TSINT(RNUM, CSINT) values ( 2, 0);
insert into TSINT(RNUM, CSINT) values ( 3, 1);
insert into TSINT(RNUM, CSINT) values ( 4, 10);

Closing in lieu of #173


Subgraphs

Reference Issues/PRs
#104
What does this implement/fix? Explain your changes
Adds secondary structure and surface-based subgraphs & tests.
Minor bugfix to RSA calculation where it would fail if it was the only/first DSSP feature computed.
Adds GraphConfigurationError exception.
What testing did you do to verify the changes in this PR?
Added tests for the new functions.

Codecov Report

Merging #110 (48fe654) into heatmap (3de81c7) will increase coverage by 2.33%.
The diff coverage is 74.35%.

@@             Coverage Diff             @@
##           heatmap     #110      +/-   ##
===========================================
+ Coverage    38.78%   41.12%   +2.33%
===========================================
  Files           50       50
  Lines         3117     3154      +37
===========================================
+ Hits          1209     1297      +88
+ Misses        1908     1857      -51

Impacted Files
Coverage Δ

graphein/protein/features/nodes/amino_acid.py
80.43% <50.00%> (-3.29%)
:arrow_down:

graphein/protein/utils.py
68.00% <60.00%> (+14.66%)
:arrow_up:

graphein/protein/subgraphs.py
73.64% <76.00%> (+0.56%)
:arrow_up:

graphein/protein/features/nodes/dssp.py
90.12% <100.00%> (+65.44%)
:arrow_up:

graphein/protein/graphs.py
74.21% <0.00%> (+0.62%)
:arrow_up:

graphein/utils/utils.py
37.16% <0.00%> (+2.65%)
:arrow_up:

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 3de81c7...48fe654. Read the comment docs.


Union type to copy properties to other object not assignable to never

TypeScript Version:  3.5.x

Search Terms: union properties object never
Code
interface IUser {
    id: number;
    createdAt: Date;
    name: string;
    age: number;
    isActive: boolean;
}

//Imagine this array is an array of strings matching the property names of IUser
let properties = [] as any[] as (keyof IUser)[];

let user: IUser = {} as any; //Imagine this being fetched from a database
let constructedUser: IUser = {} as any;
for (let prop of properties) {
    constructedUser[prop] = user[prop];
}

Expected behavior: No errors
Actual behavior:
Type 'string | number | boolean | Date' is not assignable to type 'never'.
  Type 'string' is not assignable to type 'never'.

This used to work on 3.4, seems broken on 3.5
Playground Link:
3.5: (Broken)
https://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgJIFUDO1kG8BQyRywAJgFzIgCuAtgEbQDchxCUEckpAgmJQBEuEFsSpxaESpjBRQAc1HE48qVTqMoSosEw8EYYADc19APZmANpxAsAvvnwB6J6lorQKMAAtdyOFBQcACeJJj+IP6BIchmMMgyciDy4e5gCL7JyD4oAA5QZrnQYKEgEhDhcWhY0PjWYMj5hcXAFcgAvMgA2gC6-uFwIMG9-cgAFADWEMFVGNhQAJS9LHUQDdTzlHM4nbh2o4PBTMgubh4gXr7hjArIMGsZEKR3BbT+yKRccPRw2KsNCDMIES1AMTxqUC2EI6eH2vwiR3wMDMUHG9UaBVysXiTSKUEMFQWeFYREBwNkoO4EK6uL6nQ20BpmJ69iAA
3.3: (Working)
https://www.typescriptlang.org/play/?ts=3.3.3#code/JYOwLgpgTgZghgYwgAgJIFUDO1kG8BQyRywAJgFzIgCuAtgEbQDchxCUEckpAgmJQBEuEFsSpxaESpjBRQAc1HE48qVTqMoSosEw8EYYADc19APZmANpxAsAvvnwB6J6lorQKMAAtdyOFBQcACeJJj+IP6BIchmMMgyciDy4e5gCL7JyD4oAA5QZrnQYKEgEhDhcWhY0PjWYMj5hcXAFcgAvMgA2gC6-uFwIMG9-cgAFADWEMFVGNhQAJS9LHUQDdTzlHM4nbh2o4PBTMgubh4gXr7hjArIMGsZEKR3BbT+yKRccPRw2KsNCDMIES1AMTxqUC2EI6eH2vwiR3wMDMUHG9UaBVysXiTSKUEMFQWeFYREBwNkoO4EK6uL6nQ20BpmJ69iAA
Related Issues:

This is a consequence of #30769.

I guess it's a design limitation that if the target and source objects are the same interface, and are being indexed with the same key it can't infer that in that one case the types should match?

The issue is that the compiler only sees the types when checking this - it doesn’t know that prop evaluates to the same key on both sides, only that it’s type keyof IUser.  That isn’t enough information to guarantee the assignment is safe, so it rejects it.