RuntimeError when running on CPU

When running the examples from the colab, they work fine on GPU but I get the following runtime error when trying to run on CPU:
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.HalfTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

Below is a snippet of code to reproduce the error:
import torch
import requests

from PIL import Image
from lavis.models import load_model_and_preprocess

device = torch.device('cpu')
with torch.inference_mode():
    model, vis_processors, _ = load_model_and_preprocess(
        name='blip2_t5',
        model_type='pretrain_flant5xl',
        is_eval=True,
        device=device
    )

img_url = 'https://storage.googleapis.com/sfr-vision-language-research/LAVIS/assets/merlion.png'
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
image = vis_processors["eval"](raw_image).unsqueeze(0).to(device)

model.generate({"image": image, "prompt": "Question: which city is this? Answer:"})

I'm wondering whether this is due to some version mismatch between any of the libraries or whether perhaps there is somewhere in the code where the device is being ignored? The versions of torch and transformers are as follows:
torch                    1.12.1+cu113
torchvision              0.13.1+cu113
transformers             4.26.1

P.S.: This issue is similar to https://github.com/salesforce/LAVIS/issues/145 but the opposite behaviour...

UPDATE: When I got the previous error, I had installed the latest release available of salesforce-lavis which was 1.0.0. Now, I have installed from source and the error has shifted to the following:
RuntimeError: Input type (float) and bias type (c10::Half) should be the same

The versions of the relevant libs are the following:
salesforce-lavis         1.0.1
torch                    1.13.1
torchvision              0.14.1
transformers             4.26.1

Hi, instead of device = torch.device('cpu'), could you use device='cpu' instead? It should solve this problem.

Hi @LiJunnan1992, thank you very much! That fixed it!

With https://github.com/salesforce/LAVIS/commit/baad2d7c8df599d8d9b081ba2e946626eaa2dc34, this issue should now be fixed.


Mute

Allows staff to issue temporary or indefinite mutes to members, leaving a permanent infraction on their record.
This could have two different approaches.

As it stands today, a single command where the syntax is mute<user> [duration] <reason>
or
Infraction builder, where staff could use mute <user> which begins a brief conversation where they can specify the reason, the duration, and possibly choose which rule was broken

Added with ad1dc259a723a90b081a2f8f62ad54075501d927


v1.14 Backports 2024-01-23

Backporting ci-verifier fixes to address the failure observed in https://github.com/cilium/cilium/pull/30355:
go: errors parsing go.mod:
/host/go.mod:4: invalid go version '1.21.0': must match format 1.23

[x] #27857 (@tklauser)
[x] #27869 (@tklauser)
[x] #29549 (@tklauser)
[x] #29633 (@mhofstetter)

Once this PR is merged, a GitHub action will update the labels of these PRs:
 27857 27869 29549 29633

/ci-verifier

/ci-verifier

/test-backport-1.14

Conformance AKS and Cilium IPsec upgrade failed, but both are not marked as required. I'd not consider them blocking for merging this PR, given that it only touches another unrelated workflow. In any case, I'll triage them in a while.

Conformance AKS failed due to hitting the one hour timeout.
Cilium IPsec upgrade hit https://github.com/cilium/cilium/issues/27762, https://github.com/cilium/cilium/issues/29846, https://github.com/cilium/cilium/issues/29987


#202 bot notification board

Added new Message Board -functionality

Added command /ilmoitustaulu [off] which creates new message board or repins currently used message board message
Message Board is concept where on bots message in a chat is used as a "host message" which content can be edited indefinately. The host message is kept pinned in the chat so that the preview of the message content is shown in the pinned message preview banner. This can be used to relay short information to users and it works as a link to the host message which can then contain more detailed information. This commit contains base implementation that can be later refined and extended.
Contains implementation for adding 3 types of content to the board:

Scheduled messages are predefined scheduling for content. In this implementation the schedules are hard-coded. Scheduled message content can be chat specific or shared between chats. This commit contains an example of a possible weekly schedule.
Event messages are created by an predefined event in the chat. The trigger can be defined to be anything. This commit contains example of how the Twitch command starts stream status event in the chat if the chat is using message board
Notifications are messaegs that are shown in the message board for predefined period of time (by default 5 seconds). In this commit there are not yet implementation that uses this, as notifications by auto deleted messages is an established functionality.

Updated dependencies (major updates listed):

Pillow 9.4.0 -> 10.0.1
PTB 20.5 -> 21.4
New dependency: beautifulsoup4 4.12.3 (parsing html)

Contains major changes and/or improvements:

Recipe command (/ruoka) now randomizes random recipe from the list and fetches html content of that recipes page. Then parses the html to virtual DOM from which enriched recipe information is added to the message. New info contains: description, difficulty, prep time and serving count. This is first implementation where information is scraped from a website and can be used as an example for further implementations.
Major overhaul done to the Twitch Command implementation and updage loop logic. Previous implementation used recursive calls and complex hard to follow call chains. Newer logic should be more concise and clear. In addition, no recursive chains of calls are made anymore, which is more robust. In addition, support for event messages that follow the stream status added. These are used if the chat is using a message board.
Overhauled implementation while adding support for scheduled messages. Added sunrise and set information which is shown for only the scheduled message contents (this could be changed so that they are always shown)

Scheduled weather message: this is chat specific. List of users and their latest weather command city are fetched from the db. Then weather for each city is shown and rotated in the scheduled message with internal clock that updates the content every minute. The weather data is cached so that new data is fetched only once a minute.
Extended handle_exception_async introduced in the original Twitch integration implementation. Previously it worked only as function decorator to async functions. Now it works both as a function decorator and as a context manager. In addition, works for both async and sync contexts with the same call. Neat! However, the implementation is now more complex due to this update.

Contains general fixes and small improvements. Including, but not limited to:

Added rate limiter which should prevent exceptions in situation where bot would exceed its Telegram bot API rate limit. Instead now the rate limiter should delay sending new updates to the API untill rolling update rate limit window allows it.
Updated all tests to use test_mocks_v2 module mocks. Removed test_mocks_v1 entirely, as it is was no longer used an offered inferior developer experience coparing to v2.
Extracted video frame capture to its own module and VideoConvertService. This is only minor improvement. In the previous implementation, whenever the event loop required new twitch stream frame it started a new ffmpeg subroutine and was left wating for the subprocess finishing. This could cause a problem, where multiple converts were started in the same time (multiple different streams updating at the same time). Now each convert is done sequentially from a queue with a first-in-first-out principle. Now multiple streams should not cause problems with the stream frame extracting.

Could split PR of this size to smaller PRs.

Apple silicon mac gets stuck when running
python bobweb/web/manage.py test bobweb/bob

On one of the ilmoitustaulu tests.

Ilmoitustaulu-testi korjattu. Jätän ton TikToken kirjaston siivoamisen seuraavaan merge-requestiin ja jätän nyt splittaamatta tätä. Seuraava on sit malillisempi.


TextFormField ignores floatingLabelBehavior set inside the ThemeData

TextFormField ignore hasFloatingPlaceholder set inside the InputDecorationTheme ThemeData.
If you have InputDecorationTheme with hasFloatingPlaceholder set to false
and set the theme to textformfield. TextFormField ignores it.

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(
          inputDecorationTheme: InputDecorationTheme(
            hasFloatingPlaceholder: true,
          ),
        ),
      home: Scaffold(
        body: SafeArea(
          child: Center(
              child: TextFormField(
                decoration: InputDecoration(
                  hintText: 'Hint text',
                ),
              ),
          ),
        ),
      ),
    );
  }
}

Hi @dexcell
Looks like hasFloatingPlaceholder has been hasFloatingPlaceholder, replacement should be used
This should reflect in next stable
if you disagree please write in the comments and I will reopen it
Thank you

hasFloatingPlaceholder has been deprecated in favour of floatingLabelBehavior but the issue is still there, neither hasFloatingPlaceholder nor floatingLabelBehavior is inherited from ThemeData in TextField or TextFormField widgets.
Flutter (Channel stable, v1.17.0)
Code sample to reproduce
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(
          inputDecorationTheme: InputDecorationTheme(
            floatingLabelBehavior: FloatingLabelBehavior.never,
          ),
        ),
      home: Scaffold(
        body: SafeArea(
          child: Column(
            children: <Widget>[
              TextFormField(
                decoration: InputDecoration(
                  labelText: 'Label text',
                  hintText: 'Hint text',
                ),
              ),
              TextField(
                decoration: InputDecoration(
                  labelText: 'Label text',
                  hintText: 'Hint text',
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}

</details

Hi, I'm having this same issue.In order to reproduce it's fairly easy, create a theme for your app, like this example:
return ThemeData(       inputDecorationTheme: InputDecorationTheme(         floatingLabelBehavior: FloatingLabelBehavior.always,       ),     );
and then, when you do something like:
TextFormField(                       decoration: InputDecoration(                               hintText<EMAIL_ADDRESS>                              labelText: 'Email',                       )                           .applyDefaults(                               Theme.of(context).inputDecorationTheme),                       keyboardType: TextInputType.emailAddress,                       onSaved: (String email) {                         _user.email = email;                       },                     ),                   )
it completely ignores the floatingLabelBehavior defined in the theme. This is an extract from working code. If I put the floatingLabelBehavior inside the InputDecoration, inside the TextFormField, it works perfectly. I think the problem is that on the InputDecoration class, the floatingLabelBehavior variable it's being initialized like the following:
const InputDecoration({     this.floatingLabelBehavior = FloatingLabelBehavior.auto, .........

Tried with current master 1.19.0-2.0.pre.193. floatingLabelBehavior: FloatingLabelBehavior.never is still ignored when it's set in ThemeData

Confirmed even in dartpad.dev
https://dartpad.dev/570c6699c023febd3d4fe4fb8ace182f

Can confirm on Flutter 1.20.3.

this is still an issue in 1.22.5

Hi everyone.
floatingLabelBehavior is working on the web/desktop but not on mobile
For example FloatingLabelBehavior.never is ignored on iOS and Android
Preview

@ghprod
your dartpad example  with never is working now https://github.com/flutter/flutter/issues/48287#issuecomment-64055806,

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
    • Framework revision<PHONE_NUMBER> (5 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

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

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

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

[✓] Flutter (Channel master, 1.26.0-2.0.pre.313, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.26.0-2.0.pre.313 at /Users/tahatesser/Code/flutter_master
    • Framework revision 1cb0a24a46 (7 hours ago), 2021-01-12 21:39:27 -0800
    • Engine revision 10cee6abcb
    • Dart version 2.12.0 (build 2.12.0-214.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

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

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.1 20C69 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 87.0.4280.141

• No issues found!

Thank you

Hi everyone.
floatingLabelBehavior is working on the web/desktop but not on mobile
For example FloatingLabelBehavior.never is ignored on iOS and Android
Preview

@ghprod
your dartpad example  with never is working now https://github.com/flutter/flutter/issues/48287#issuecomment-64055806,

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
    • Framework revision<PHONE_NUMBER> (5 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

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

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

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

[✓] Flutter (Channel master, 1.26.0-2.0.pre.313, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.26.0-2.0.pre.313 at /Users/tahatesser/Code/flutter_master
    • Framework revision 1cb0a24a46 (7 hours ago), 2021-01-12 21:39:27 -0800
    • Engine revision 10cee6abcb
    • Dart version 2.12.0 (build 2.12.0-214.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

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

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.1 20C69 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 87.0.4280.141

• No issues found!

Thank you

Any updates on this?

This issue is no longer reproducible, verified on the latest master channel on all platforms.
Image shows the output of InputDecorationTheme.floatingLabelBehavior: FloatingLabelBehavior.never

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        inputDecorationTheme: const InputDecorationTheme(
          floatingLabelBehavior: FloatingLabelBehavior.never,
        ),
      ),
      home: Scaffold(
        body: SafeArea(
          child: Column(
            children: <Widget>[
              TextFormField(
                decoration: const InputDecoration(
                  labelText: 'Label text',
                  hintText: 'Hint text',
                ),
              ),
              const TextField(
                decoration: InputDecoration(
                  labelText: 'Label text',
                  hintText: 'Hint text',
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}

Closing as fixed. Incase anyone still encounters the issue, Please feel free to write in the comments and we will reopen it.
cc: @gildaswise  (FYI: In case you are still interested)


Go formatter emits .nx instead of .nv for variable names

Title says it all.

That's Name.Other... would you think it's ok to have Name.Variable as a token type for everything that's currently nx?

Hmm, it seemed to apply .nx to every name that was invented by the coder: variables, types, and funcs.
The reason I noticed this is that the default CSS with `
pygmentize -l Go -f html  -O full

doesn't have any styling for .nx, so the styled code was super boring. Haha, not sure what bug I'm really reporting…

.nx needs styling?
there's no distinction between variables/types/functions? (actually I'm not sure I want any)

FWIW, I added the following CSS
body .nx { color: #2217DD } /* user-created names */

and now the code looks pretty decent. Want a PR with that change?


Warning Message

Provide updated VIS style for error and warning messages on RC.1

*note @Shadowfiend and @mhluongo I took a stab at a different written message here in addition to the slightly updated visual design. my goal was to strike a more "caring" tone.
design with original message ↓

@ironng updated the warning message alert for the current dapp here - updated container shape, color, line spacing, and added an warning icon.

@Gluzman Thanks for the callout! I'm going to add this to the #264 PR since review hasn't started.

@Shadowfiend is the 👍for the new or old copy? or just for visual update?

New copy, sorry.


advertise: Release response buffer inside advertise loop

CC @breerly @blampe @junchaowu @vivekrsharma

:shipit:

🚢


[RFC] Get rid of Zephyr's prefer-later-defaults behavior

Zephyr adds a patch to vanilla Kconfig that makes it prefer later defaults, as documented here.
I think that change was made so that Kconfig.defconfig files can override defaults in the "base" configuration. They are included last.
I think the standard Kconfig behavior would be nicer, which is to use the first default with a satisfied condition. It's what people expect coming from other projects that use Kconfig, and you wouldn't have to carry that patch around.
I thought of a "safe" way to make the transformation:

Hack Kconfiglib to print defaults in reverse order when printing symbols. Print all symbols and save the output somewhere.

Include the Kconfig.defconfig files first instead of last, and switch the order of all the defaults around. Maybe other includes would need to be switched around as well.

Remove the Kconfiglib hack, print all symbols, and check that the output is still the same.

It would still take some boring manual work, but it seems doable.
Any objections? After that change, Zephyr would use mostly vanilla Kconfig (except for gsource and rsource -- IMO, gsource should usually be avoided as well).
At some point, it might be possible to install Kconfiglib and the menuconfig via pip instead of having them in the source tree.

CC @carlescufi @SebastianBoe @mbolivar

as long as you have a way to verify that the change does not impact the generated configurations and does generate the same final .config we should be fine with such change. Need to test this basically on all boards and tests and check if there are any differences.

@nashif
Should be fine as long as the defaults are evaluated in the same order as before. I'll check with some of the examples too.
Thought I'd do what doc/Makefile does to include everything when comparing outputs.

Any objections?

None from me, but as @nashif said, we need to make completely sure we haven't modified the generated .config files by running some sort of diffconfig on all .config files generated by sanitycheck.

gsource should usually be avoided as well

Why? I am not sure why globbing is a bad idea. We also use it in the current work to split Zephyr into multiple repositories, as you can see here:
https://github.com/zephyrproject-rtos/zephyr/pull/7338/files#diff-d6f4145321ef0d57a017a2079114715dR41

@carlescufi
Just some personal anti-globbing bias. Can't see at a glance what (isn't) being included, plus you might accidentally put something in there that matches (and yeah, that's actually happened to me in other projects).
The Python blowhard version would be "explicit is better than implicit" I think. :D
Maybe it's not a static set though, and yeah, just some personal experience. No biggie.

Working on https://github.com/zephyrproject-rtos/zephyr/issues/6879 now. Getting that fixed will help with some copy-paste action here.

Any objections?

What about out of tree applications? We currently specifically recommend applications put their content after including the Zephyr config file:
http://docs.zephyrproject.org/application/application.html#application-cmakelists-txt
This reversal would probably mean they should put their config options (and any default settings they want to override Zephyr's with) before including Zephyr's root Kconfig, no?
If so, this is a breaking change that should be communicated clearly to users.

@mbolivar
They'd also need to reverse the defaults on all symbols that have more than one default, so could get messy if there's a lot of out-of-tree stuff.

@ulfalizer hmm, "messy" makes me a little nervous :).
It makes sense to get back to the standard Kconfig behavior, though.
Is it possible to default to the standard behavior, but emit a message that it has changed, and letting apps define a CMake variable before including the boilerplate file that restores the "odd" behavior?
We could keep that for a deprecation period of say one release, before removing the odd behavior entirely.
I also want to confirm that by defining a default before including Zephyr's Kconfig root, they could override any default provided by the build (this is important when setting defaults conditionally).

Maybe some temporary ugly hack that switches stuff around in some way if you put a flag in the Kconfig file would be possible, if needed...

That's what I'm saying, basically.
If the user runs "cmake -DKCONFIG_USE_WEIRD_ZEPHYR_BEHAVIOR", then kconfiglib gets passed some option that enables the existing behavior.
Otherwise, it reverts to the "normal" Linux kernel behavior, but emits a warning that there was a breaking change (perhaps through a second option, so as not to pollute output when  run in its primary use case).
This at least gives app developers a sporting chance to notice what happened and fix any issues, especially if the warning is high quality and offers hints on what to do in case things go wrong.

@ulfalizer I think we can close this now, agree?

Yups, fine to close.


Default to Laravel File cache if server cache is down

When server is down it's better to use laravel file cache as default.
https://stackoverflow.com/questions/28047861/default-to-laravel-file-cache-if-redis-is-down

Better implementation:
https://github.com/oulfr/laravel-cache-fallback

Hi @oulfr, thanks for the suggestions. These are all things that should be implemented by the app developer. I don't want to make any presumptions.


[master] fix: get securely pathname from request url

Fixes #102

Coverage decreased (-0.05%) to 98.983% when pulling ed8c26495241c5776de78ff0979fe0fdaf8b8693 on rtrys:master into e68f5890a5f7377a0ed71adde00a4c0aff63aa4a on pinojs:master.


Support for adaptive charging on Poco F1?

Does adaptive charging work on poco f1 (beryllium) or is it just exclusive to Pixel Devices?

Maybe it's exclusive, it's not even working on Potter... I'm using PE11 beta. Maybe it works on Jan module... I'm on Dec..
But as far as I know, adaptive charging was introduced in Dec...

Maybe it's exclusive, it's not even working on Potter... I'm using PE11 beta. Maybe it works on Jan module... I'm on Dec..
But as far as I know, adaptive charging was introduced in Dec...

Does adaptive charging work on poco f1 (beryllium) or is it just exclusive to Pixel Devices?

Maybe it's exclusive, it's not even working on Potter... I'm using PE11 beta. Maybe it works on Jan module... I'm on Dec..
But as far as I know, adaptive charging was introduced in Dec...

The feature drop came in December on pixel devices but didn't work with the module installed on custom ROMs because of missing adaptivecharging.xml file which was added later to the module in January.
As of today the configurations are in both the Jan and Dec flashable zips found under release required for adaptive charging to kick in.
However adaptive charging itself is wonky - https://www.xda-developers.com/google-pixel-adaptive-charging-details/
 According to a Google support document, via 9to5Google, you must have an active alarm
 set sometime between 5 – 10 a.m. in order for the feature to work. In addition, you must
 also put your phone on a charger after 9 p.m. Otherwise, Adaptive Charging won’t kick in
 and your device will charge normally.

Does adaptive charging work on poco f1 (beryllium) or is it just exclusive to Pixel Devices?

Maybe it's exclusive, it's not even working on Potter... I'm using PE11 beta. Maybe it works on Jan module... I'm on Dec..
But as far as I know, adaptive charging was introduced in Dec...

The feature drop came in December on pixel devices but didn't work with the module installed on custom ROMs because of missing adaptivecharging.xml file which was added later to the module in January.
As of today the configurations are in both the Jan and Dec flashable zips found under release required for adaptive charging to kick in.
However adaptive charging itself is wonky - https://www.xda-developers.com/google-pixel-adaptive-charging-details/
 According to a Google support document, via 9to5Google, you must have an active alarm
 set sometime between 5 – 10 a.m. in order for the feature to work. In addition, you must
 also put your phone on a charger after 9 p.m. Otherwise, Adaptive Charging won’t kick in
 and your device will charge normally.


Format support: Import from pyflame

This could either by done by contributing an importer to speedscope like we have for stackprof (https://github.com/jlfwong/speedscope/blob/100578c536a3afab39fb6803d28913d12eac29c5/src/import/stackprof.ts), or by contributing a speedscope file format outputter to pyflame, like I did for rbspy (https://github.com/rbspy/rbspy/pull/161)

I’ll commit to implementing this feature myself if a total of $200 of donations is made to any combination of these specific charities:

American Civil Liberties Union
/dev/color: /dev/color is a non-profit organization whose mission is to empower Black software engineers to help one another grow into industry leaders.
Girls Who Code: Girls Who Code was founded with a single mission: to close the gender gap in technology

If you’d like to contribute to that total, please post a screenshot of your donation receipt in this thread*.
Independent of that, I would accept a PR to implement this, regardless of donation amounts.
*: I'm planning on trying this policy on a number of issues. Donations will apply to the total of exactly one issue, so please don't post the same receipt in multiple issue threads.


Add UI acceptance test in RF

https://github.com/Origami-TinyML/tflm_hello_world/blob/main/README.md#sprint-1
In the detail, https://blog.devgenius.io/testing-streamlit-a1f1fd48ce8f

Tuula, this is almost similar to what you are working right now. Can you take this?

I have done navigational tests that check that the page changes correctly from the links on the left. I would like to add some more tests now that the first tests (finally) function correctly. Does this task also include writing a new Dockerfile and running the tests from it?

I have done navigational tests that check that the page changes correctly from the links on the left.

Cool!

Does this task also include writing a new Dockerfile and running the tests from it?

That is a part of
https://github.com/Origami-TinyML/tflm_hello_world/issues/10, owned by @matiasto

It seems to be working now but I encountered a few fail previously with the exact same environment. There might be some timing issue left? Need some more wait?

Why python -m coverage report doesn't work with tflm?


Update project-11-blends.md

I did I new one because I deleted the fork of https://github.com/AC-BO-Hackathon/ac-bo-hackathon.github.io/pull/115 by mistake. However the video and repo are the same.

@sgbaird, I added the social link, please merge, thanks!

Merged! Also, good point. I will try to update the language to be clearer about this.


Remove unused output connection string from SQLDriverConnect call

Passing the output connection string pointer to SQLDriverConnect was causing crashes when connecting asynchronously. Since this variable was entirely unused inside nanodbc, the quickest and best fix seemed to be to simply remove it.

Although this change looks good to me for now, we may require the returned connection string in future features. So, it would be good to understand why it was causing crashes when connecting asynchronously. Any ideas?

Although this change looks good to me for now, we may require the returned connection string in future features. So, it would be good to understand why it was causing crashes when connecting asynchronously. Any ideas?

It's quite straightforward - the pointer being passed is to a local variable which goes out of scope immediately following the SQLDriverConnect call. When connecting asynchronously the function will return immediately, but the ODBC driver will try to write to the address later, probably when SQLCompleteAsync is called.
If we wanted to save the output connection string it would be as easy as keeping the buffer as a member variable in the connection_impl object instead.

@jon-v

(...) SQLDriverConnect call. When connecting asynchronously the function will return immediately (...)

I see. I don't have experience with async connections and I thought this particular call might actually be blocking.

One more thing, MSDN on SQLDriverConnect mentions OutConnectionString parameter can be NULL:

If OutConnectionString is NULL, StringLength2Ptr will still return the total number of characters (excluding the null-termination character for character data) available to return in the buffer pointed to by OutConnectionString.

But, it does not indicate NULL is allowed for StringLength2Ptr.
Is that an overlook and can we be sure all drivers will accept NULL?

Is that an overlook in MSDN and can we be sure all drivers will accept NULL?

History has shown that we can't even be sure that Microsoft's own drivers match their documentation. All I know is it works on our end, and the CI tests still pass.

Yes, that's fair comment.
Let's wait for @lexicalunit vote.

Yeah this is a good catch here. I've never been able to test with async myself so I never would have caught this problem. Thanks for the PR @jon-v! LGTM, we can either address the NULL vs nullptr issue in this PR or a subsequent one.

Great.
I wonder if we could add a CI build focused on testing the async stuff. Any guidelines would be helpful.


Suggestion: support multiple VRRPs for a load balance setup

I really enjoyed the image with a simple Yaml configuration. However, my team needs a more complicated setup for our environment.
Today, we have keepalived deployed natively on our servers. We are making the move to make a Docker deployment soon and your image has been of great value to us.
One of our structures relies on four frontend servers sharing the same virtual IPs. In order to create a load balance, we need four VRRPs declared on each server. This way, each server is the master of one virtual IP and everyone is a backup for the others.
This is what our configuration looks like for this setup (my local docker containers run on the bridge network <IP_ADDRESS>/16):
    vrrp_instance VI_18_18_0_102 {
      interface eth0
      state MASTER
      priority 160

      virtual_router_id 51

      unicast_src_ip <IP_ADDRESS>

      unicast_peer {
        <IP_ADDRESS>
        <IP_ADDRESS>
        <IP_ADDRESS>
      }

      authentication {
        auth_type PASS
        auth_pass d0cker
      }

      virtual_ipaddress {
        <IP_ADDRESS>
      }

      notify_master /container/service/keepalived/assets/notify.sh
    }

    vrrp_instance VI_18_18_0_103 {
      interface eth0
      state BACKUP
      priority 150

      virtual_router_id 52

      unicast_src_ip <IP_ADDRESS>

      unicast_peer {
        <IP_ADDRESS>
        <IP_ADDRESS>
        <IP_ADDRESS>
      }

      authentication {
        auth_type PASS
        auth_pass d0cker
      }

      virtual_ipaddress {
        <IP_ADDRESS>
      }

      notify_master /container/service/keepalived/assets/notify.sh
    }

    vrrp_instance VI_18_18_0_104 {
      interface eth0
      state BACKUP
      priority 150

      virtual_router_id 53

      unicast_src_ip <IP_ADDRESS>

      unicast_peer {
        <IP_ADDRESS>
        <IP_ADDRESS>
        <IP_ADDRESS>
      }

      authentication {
        auth_type PASS
        auth_pass d0cker
      }

      virtual_ipaddress {
        <IP_ADDRESS>
      }

      notify_master /container/service/keepalived/assets/notify.sh
    }

    vrrp_instance VI_18_18_0_105 {
      interface eth0
      state BACKUP
      priority 150

      virtual_router_id 54

      unicast_src_ip <IP_ADDRESS>

      unicast_peer {
        <IP_ADDRESS>
        <IP_ADDRESS>
        <IP_ADDRESS>
      }

      authentication {
        auth_type PASS
        auth_pass d0cker
      }

      ## IP virtual deste VRRP
      virtual_ipaddress {
        <IP_ADDRESS>
      }

      notify_master /container/service/keepalived/assets/notify.sh
    }

It would be great to have support for this. In fact, I've modifed your image to meet the demands of my team. I'm running your image with a modified version of the startup.sh script.
#!/bin/bash -e

# set -x (bash debug) if log level is trace
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/log-helper
log-helper level eq trace && set -x

FIRST_START_DONE="${CONTAINER_STATE_DIR}/docker-keepalived-first-start-done"
# container first start
if [ ! -e "$FIRST_START_DONE" ]; then

  rm -fr ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf

  # loop through KEEPALIVED_VIRTUAL_IPS
  # format si "PEERIP,VIRTUALIP"
  #
  for vipstring in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
  do

    # split PEERIP from VIRTUALIP
    pip=$(echo ${!vipstring} | awk -F ',' '{print $1}')
    vip=$(echo ${!vipstring} | awk -F ',' '{print $2}')

    # acquire IP from my own KEEPALIVED_INTERFACE
    my_IP=$(ifconfig eth0 | grep 'inet addr:' | awk '{print $2}' | sed 's/addr://')

    # loop through again to gather a list of peers, excluding my_IP
    my_PeerList=""
    for vipstring_2 in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
    do
      pip_2=$(echo ${!vipstring_2} | awk -F ',' '{print $1}')
      vip_2=$(echo ${!vipstring_2} | awk -F ',' '{print $2}')
      if [[ "$pip_2" != "$my_IP" ]]; then
        my_PeerList=$(printf "\n        %s" $my_PeerList $pip_2)
      fi
    done

    # replace dots with _ for sanitized VRRP name
    vip_sanitized=$(echo $vip | sed 's/\./_/g')

    vip_state="BACKUP"
    let KEEPALIVED_PRIORITY_REAL=$KEEPALIVED_PRIORITY
    if [[ "$pip" == "$my_IP" ]]; then
      vip_state="MASTER"
      let KEEPALIVED_PRIORITY_REAL=$KEEPALIVED_PRIORITY+10
    fi

    echo "
    vrrp_instance VI_${vip_sanitized} {
      interface ${KEEPALIVED_INTERFACE}
      state ${vip_state}
      priority ${KEEPALIVED_PRIORITY_REAL}

      virtual_router_id ${KEEPALIVED_VIRTUAL_ROUTER_ID}

      ## IP interno deste servidor
      unicast_src_ip ${my_IP}

      ## IPs internos dos peers
      unicast_peer {${my_PeerList}
      }

      authentication {
        auth_type PASS
        auth_pass ${KEEPALIVED_PASSWORD}
      }

      ## IP virtual deste VRRP
      virtual_ipaddress {
        ${vip}
      }

      # track_script {
      #   chk_nginx
      # }

      notify_master ${KEEPALIVED_NOTIFY}
    }

    " >> ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf

    let KEEPALIVED_VIRTUAL_ROUTER_ID=$KEEPALIVED_VIRTUAL_ROUTER_ID+1
  done

  touch $FIRST_START_DONE
fi

cat ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf

# try to delete virtual ips from interface
for vip in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
do

  # format is "PEERIP,VIRTUALIP"
  # pick virtual IP from variable
  vip=$(echo ${!vip} | awk -F ',' '{print $2}')

  IP=$(echo ${vip} | awk '{print $1}')
  IP_INFO=$(ip addr list | grep ${IP}) || continue
  IP_V6=$(echo "${IP_INFO}" | grep "inet6") || true

  # ipv4
  if [ -z "${IP_V6}" ]; then
    IP_INTERFACE=$(echo "${IP_INFO}" |  awk '{print $5}')
  # ipv6
  else
    echo "skipping address: ${IP} - ipv6 not supported yet :("
    continue
  fi

  ip addr del ${IP} dev ${IP_INTERFACE} || true
done

if [ ! -e "/usr/local/etc/keepalived/keepalived.conf" ]; then
  ln -sf ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf /usr/local/etc/keepalived/keepalived.conf
fi

exit 0

The configuration also needes a small adjustment to allow us to map each virtual IP to a peer in the list.
KEEPALIVED_COMMAND_LINE_ARGUMENTS: --log-detail --dump-conf

KEEPALIVED_INTERFACE: eth0
KEEPALIVED_PASSWORD: d0cker

KEEPALIVED_VIRTUAL_ROUTER_ID: 51

# For electing MASTER, highest priority wins.
# to be MASTER, make 50 more than other machines
KEEPALIVED_PRIORITY: 150

#
# List peers and virtual IPs in the format
# - PEER_IP,VIRTUAL_IP
#
# This format allows multiple VRRPs do be created, load balancing
# all traffic among all peers at the same time.
#
# It indicates that each PEER_IP will respond to its own VIRTUAL_IP as its master.
# When one of the hosts is offline, another peer will assume its virtual IP.
#
# The idea is to allow, not only failover, but also load balancing
#
KEEPALIVED_VIRTUAL_IPS:
  - <IP_ADDRESS>,<IP_ADDRESS>
  - <IP_ADDRESS>,<IP_ADDRESS>
  - <IP_ADDRESS>,<IP_ADDRESS>
  - <IP_ADDRESS>,<IP_ADDRESS>

KEEPALIVED_NOTIFY: /container/service/keepalived/assets/notify.sh

This would be an excellent addition. I hope you get a chance to merge the above example with your code. As far as I tested, this seems to work well in our test evironments, inside Docker.
To run this example, create four containers using the same Yaml above taking note of the IP ranges your local bridge is using. You could also statically assign IPs from the local bridge to each container if you can't rely on the automatic numering (102, 103, 104, 105, etc).

Opened this here by mistake. Cloned to the correct repository: #8


Bump app build number to 311

close in favor of https://github.com/mattermost/mattermost-mobile/pull/4576


Introduce http::Client + http::Request and refactor http::Get/Post to use

Including a few clean up commits as I went along.

There's also an interesting bug with MOCK_METHOD on Windows: https://github.com/google/googletest/issues/2490
I've seen it fixed in glog v1.11.0, we probably should upgrade our glog dependency in bazel/deps.bzl.

There's also an interesting bug with MOCK_METHOD on Windows: google/googletest#2490
I've seen it fixed in googletest v1.11.0, we probably should upgrade our com_github_google_googletest dependency in bazel/deps.bzl:
maybe(
        http_archive,
        name = "com_github_google_googletest",
        url = "https://github.com/google/googletest/archive/release-1.11.0.tar.gz",
        sha256 = "b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5",
        strip_prefix = "googletest-release-1.11.0",
        repo_mapping = repo_mapping,
    )

Added!


Library wheel requires Gtk4

When building the latest capypdf wheel, the mason build requires Gtk4 despite not needing any gtk4 for just the libraries.
I'm actually concerned about how pdfviewer et al aren't separated in the codebase, should we split them out into their own repositories and use a submodule so there's less possible confusion between the library and the applications that use it?
In Inkscape we do this for things like lib2geom which are still in-line, but use git submodules so they can have their own development life cycle and much fewer dependencies.

It should not "require" it as such. If GTK 4 is available it will build the devtool and if it is not, then it won't.
I this causes problems then I guess we can move devtools in a separate directory and add a build option whether to build devtools or not.

There is a compatibility problem with older glibs and newer Gtk4's, I have PopOS based on Ubuntu 22.04, and have been doing gtk4 work with Inkscape so it's installed. Running ninja on the builddir causes a single G_APPLICATION_DEFAULT_FLAGS isn't defined error.
But this would happen if I wanted the gtk programs anyway. The real grumble is that I don't need the gtk programs.

Devtools should now be separated and only built if you explicitly configure them to.

GTK is no longer looked unless you expliclly ask for it so closing.

Thanks Jussi :heart:


networking

Is there a way to connect multiple VMs into a cluster?
Some more information on the networking would be great.

krunvm uses libkrun 's networking capabilities, which are based on TSI (Transparent Socket Impersonation). You can find some information about it libkrun's project page, and in the slides 12-16 of this presentation.
What are the network requirements of the cluster? Are the nodes going to be running on different krunvm instances on the same Host? If that's the case, and the cluster service is able to differentiate each node by having it using a different service port, you might be able to use krunvm's port mapping feature to configure a different port on each node.
If the cluster requires each node to have a different IP address, and those are going to be run on different instances on the same Host, that'd be a use case that's not supported by krunvm out-of-the-box. But, there's probably still the possibility of making it work by manually configuring a vethX/vethY pair, adding vethX to a network bridge on the Host, and moving vethY to an independent network namespace. Then you'll need to assign an IP to vethY, and run krunvm on this network namespace.
If you could give me more details about this kind of cluster, I would like to give it a try myself.

I often use vagrant to spin up 2-3 VMs (on one host) that share a private network to test things. From the README it was quite clear if krunvm could be used to do a similar thing. Hence I opened the issue :)
Wishlist: Two machines on one host. Both sharing a private network and having an internal IP each. And also some way from the host to reach the VMs via sockets (port forwarding or something).
I'll read up on TSI - but wanted to leave this here first.

Being completely honest, I don't krunvm is good fit for that use case. Even after solving the networking part using network namespaces, the customizations in the kernel shipped with libkrunfw, and the virtio-fs-based root filesystem may lead to issues that are not strictly related to the applications being tested.
I think QEMU is better suited for that use case.  Some distributions even ship a specialized version of QEMU with just that machine type.

QEMU? That didn't even cross my mind yet.
That might even allow for some more flexibility in architectures.
But probably not the lightweight alternative to virtualbox I was hoping for.

While the "standard" QEMU build is quite large and has many dependencies, a microvm-specialized build should be quite lightweight.
I've just checked (using krunvm! ;-) the version that Ubuntu ships in the qemu-system-x86-microvm:
root@ubuntu-test:~# ldd /usr/bin/qemu-system-x86_64-microvm
	linux-vdso.so.1 (0x00007fffafda5000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f434f9cc000)
	libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f434f925000)
	libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f434f920000)
	libnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f434f913000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f434f7ea000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f434f69b000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f434f67e000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f434f65b000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f434f469000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f434ff82000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f434f3f6000)
root@ubuntu-test:~# ls -l /usr/bin/qemu-system-x86_64-microvm
-rwxr-xr-x. 1 root root 5809120 Feb 10 14:17 /usr/bin/qemu-system-x86_64-microvm

Not bad, I'd say.


Remove CircleCI and Danger

Description
Remove CircleCI and Danger
Issues Resolved

PRs are always red now our CircleCI token as expired
CIrcleCI & Danger were providing little benefit

Check List

[ ] A summary of changes made is included in the CHANGELOG under ## Unreleased
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable.

Released as: 2.2.9


React Compatibility

I am able to get the client example to connect with my python LSP server, but when I try to use the library in my react app it isn't working. I was wondering if we could get some docs on how to integrate with react, or if anyone knew of any guides on how to connect a custom LSP server to the react-monaco-editor.

Hi @wudstrand

I try to use the library in my react app it isn't working

Can you be more specific about that? What does not work? We don't have a react specific example, only the webpack related one to show how to use it.

Are you using @monaco-editor/react or react-monaco-editor? @monaco-editor/react won't work as it doesn't use the ESM version
What is the result of a npm list monaco-editor?

I am using the @monaco-editor/react at the moment so I guess I need to transition over to react-monaco-editor library. Do I need to use web pack with this component? Here is a copy of my current impl of the editor in react. If you could let me know if I am on the right track that would be great.
import React, {useState} from 'react';
import Editor, {EditorProps, Monaco} from "@monaco-editor/react";
import {toSocket, WebSocketMessageReader, WebSocketMessageWriter} from "vscode-ws-jsonrpc";
import {
    CloseAction,
    ErrorAction,
    MessageTransports,
    MonacoLanguageClient,
} from "monaco-languageclient";
import normalizeUrl from 'normalize-url';

const ReconnectingWebSocket = require('reconnecting-websocket');

interface Props extends EditorProps {
    enableEdit?: boolean
}

const LSPConnectedEditor: React.FC<Props> = ({enableEdit, ...other}) => {
    const [editor, setEditor] = useState<any | null>(null)

    function createLanguageClient (transports: MessageTransports): MonacoLanguageClient {
        return new MonacoLanguageClient({
            name: 'Sample Language Client',
            clientOptions: {
                // use a language id as a document selector
                documentSelector: ['python'],
                // disable the default error handler
                errorHandler: {
                    error: () => ({ action: ErrorAction.Continue }),
                    closed: () => ({ action: CloseAction.DoNotRestart })
                }
            },
            // create a language client connection from the JSON RPC connection on demand
            connectionProvider: {
                get: () => {
                    return Promise.resolve(transports);
                }
            }
        });
    }

    function createWebsocket(socketUrl: string) {
        const socketOptions = {
            maxReconnectionDelay: 10000,
            minReconnectionDelay: 1000,
            reconnectionDelayGrowFactor: 1.3,
            connectionTimeout: 10000,
            maxRetries: Infinity,
            debug: false
        };
        return new ReconnectingWebSocket.default(socketUrl, [], socketOptions);
    }

    function createUrl (hostname: string, port: number, path: string): string {
        // eslint-disable-next-line no-restricted-globals
        const protocol = location.protocol === 'https:' ? 'wss' : 'ws';
        return normalizeUrl(`${protocol}://${hostname}:${port}${path}`);
    }

    const beforeMount = (monaco: Monaco) => {
        monaco.languages.register({
            id: 'python',
            extensions: ['.py'],
            aliases: ['PYTHON', 'python', 'py'],
        });
    }

    const onMount = () => {

        // create the web socket
        const url = createUrl('localhost', 5000, '/');
        const webSocket = createWebsocket(url);

        webSocket.onopen = () => {
            const socket = toSocket(webSocket);
            const reader = new WebSocketMessageReader(socket);
            const writer = new WebSocketMessageWriter(socket);
            const languageClient = createLanguageClient({
                reader,
                writer
            });
            languageClient.start();
            reader.onClose(() => languageClient.stop());
        };
    }

    return (
        <Editor
            height="90vh"
            defaultLanguage={"python"}
            language={'python'}
            theme={'custom-theme'}
            beforeMount={(monaco: Monaco) => beforeMount(monaco)}
            onMount={(editor, monaco: Monaco) => onMount()}
            {...other}
        />
    )
}

export default LSPConnectedEditor;

Here is the output of npm list monaco-editor
+--<EMAIL_ADDRESS>| +--<EMAIL_ADDRESS>| | `--<EMAIL_ADDRESS>deduped
| `--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>| `--<EMAIL_ADDRESS>deduped
+--<EMAIL_ADDRESS>| `--<EMAIL_ADDRESS>deduped
`--<EMAIL_ADDRESS>  `-- vscode@npm<EMAIL_ADDRESS>
    `--<EMAIL_ADDRESS>deduped

Webpack is not required, you can use whatever you want as soon as everything use the ESM version of monaco-editor from npm.

Here is what I have so far. I am seeing an Uncaught Error: Missing service editorService error now.

import React, {useState} from 'react';
import {toSocket, WebSocketMessageReader, WebSocketMessageWriter} from "vscode-ws-jsonrpc";
import {
    CloseAction,
    ErrorAction,
    MessageTransports,
    MonacoLanguageClient,
} from "monaco-languageclient";
import normalizeUrl from 'normalize-url';
import MonacoEditor from "react-monaco-editor";
import {MonacoEditorProps} from "react-monaco-editor/src/types";
import * as monaco from "monaco-editor";

type Monaco = typeof monaco;
const ReconnectingWebSocket = require('reconnecting-websocket');

interface Props extends MonacoEditorProps {
    enableEdit?: boolean
}

const LSPConnectedEditor: React.FC<Props> = ({enableEdit, ...other}) => {
    const [editor, setEditor] = useState<any | null>(null)

    function createLanguageClient (transports: MessageTransports): MonacoLanguageClient {
        return new MonacoLanguageClient({
            name: 'Sample Language Client',
            clientOptions: {
                // use a language id as a document selector
                documentSelector: ['python'],
                // disable the default error handler
                errorHandler: {
                    error: () => ({ action: ErrorAction.Continue }),
                    closed: () => ({ action: CloseAction.DoNotRestart })
                }
            },
            // create a language client connection from the JSON RPC connection on demand
            connectionProvider: {
                get: () => {
                    return Promise.resolve(transports);
                }
            }
        });
    }

    function createWebsocket(socketUrl: string) {
        const socketOptions = {
            maxReconnectionDelay: 10000,
            minReconnectionDelay: 1000,
            reconnectionDelayGrowFactor: 1.3,
            connectionTimeout: 10000,
            maxRetries: Infinity,
            debug: false
        };
        return new ReconnectingWebSocket.default(socketUrl, [], socketOptions);
    }

    function createUrl (hostname: string, port: number, path: string): string {
        // eslint-disable-next-line no-restricted-globals
        const protocol = location.protocol === 'https:' ? 'wss' : 'ws';
        return normalizeUrl(`${protocol}://${hostname}:${port}${path}`);
    }

    const beforeMount = (monaco: Monaco) => {
        monaco.languages.register({
            id: 'python',
            extensions: ['.py'],
            aliases: ['PYTHON', 'python', 'py'],
        });
    }

    const onMount = () => {
        console.log('Mounted')

        // create the web socket
        const url = createUrl('localhost', 5000, '/');
        const webSocket = createWebsocket(url);

        webSocket.onopen = () => {
            console.log("Opening Web socket connection")
            const socket = toSocket(webSocket);
            const reader = new WebSocketMessageReader(socket);
            const writer = new WebSocketMessageWriter(socket);
            const languageClient = createLanguageClient({
                reader,
                writer
            });

            languageClient.start()
                .then(() => console.log('language client started'))
                .finally(() => console.log('language client done'));

            reader.onClose(() => languageClient.stop());
        };
    }

    return (
        <MonacoEditor
            height="90vh"
            language={'python'}
            theme={'custom-theme'}
            editorWillMount={(monaco: Monaco) => beforeMount(monaco)}
            editorDidMount={(editor, monaco: Monaco) => onMount()}
            {...other}
        />
    )
}

export default LSPConnectedEditor;

The issue is that react-monaco-editor has monaco-editor v0.33 as dependency while monaco-languageclient v3 REQUIRES monaco-editor 0.34, try to force the update to monaco-editor 0.34

@CGNonofr we should add a table to the main README stating the version requirements. I was thinking about that before and will add something soon.
I was also thinking whether makes sense to have usage examples for react, angular, vue and webpack outside this repo. First, we can move unneeded things out of here (removing unneeded dependencies from the examples) and to be able to point people to existing resources. I will see if I do this in the upcoming weeks whenever there is time (lower prio).

we should add a table to the main README stating the version requirements

It can't hurt :+1:

I was also thinking whether makes sense to have usage examples for react, angular, vue and webpack outside this repo

Why does it need to be outside of the repo?

Why does it need to be outside of the repo?

Yeah, god question. Maybe it is better to create two workspaces: one for the two libs and another on for the examples. Lean dependencies for the libs and whatever is needed can go in the examples.

Yeah, god question

🤣 Good, of course

I'm not sure why the angular/react demos can't be along with the other demos though

I'm not sure why the angular/react demos can't be along with the other demos though

Yes, they can. I would just like to have separated npm workspaces, one for monaco-languageclient and vscode-ws-jsonrpc and one for all current and future examples.

I know that I threw it all together a couple, but I now think it is better to have a separation here.

My issue may be different, but I also started receiving the following error:

+--<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>  `-- vscode@npm<EMAIL_ADDRESS>    `--<EMAIL_ADDRESS>deduped

I am using the monaco-editor/language-client in a vue application.
I added the window.MonacoEnvironment code below recently, so I'm trying to determine if this is the culprit.  Perhaps I'm doing something wrong here, but I was just trying to solve this warning:

import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker";
import tsWorker from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";

export function useMonacoEnvironment() {
  // @ts-ignore
  if (!window.MonacoEnvironment) {
    console.debug("Setting up monaco environment");
    // @ts-ignore
    window.MonacoEnvironment = {
      getWorker(_: any, label: string) {
        if (label === "json") {
          return new jsonWorker();
        }
        if (label === "css" || label === "scss" || label === "less") {
          return new cssWorker();
        }
        if (label === "html" || label === "handlebars" || label === "razor") {
          return new htmlWorker();
        }
        if (label === "typescript" || label === "javascript") {
          return new tsWorker();
        }
        return new editorWorker();
      },
    };
  }
}

The "missing service" error happens when there is multiple monaco editor versions involved

I am only seeing v 0.33.0 in my yarn.lock file.  But thanks I'll keep digging around with that in mind

@CGNonofr FYI I have just created a couple of enhancement issues for creating framework related examples.

I am only seeing v 0.33.0 in my yarn.lock file. But thanks I'll keep digging around with that in mind

That's weird, because monaco-languageclient@3 has a dependency on<EMAIL_ADDRESS>which has a dependency on<EMAIL_ADDRESS>

Oh you're not using the last version of monaco-languageclient! I don't know about your error, you should probably update though

Updated to v3 and still receiving the same error.  I'll figure this out.
+--<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>  `-- vscode@npm<EMAIL_ADDRESS>    `--<EMAIL_ADDRESS>deduped

I just realize it can happen if an editor is created before monaco-languageclient/monaco-vscode-api is loaded (because creating an editor initialize and freeze the services)
Otherwise I don't know, I'm interested it you find anything

Updated to v3 and still receiving the same error. I'll figure this out.

Plus, you don't need to define monaco-editor separately in your dependencies in the package.json? If so, remove it and only keep the dependency to monaco-languageclient.

Since monaco-editor is imported directly, I think it's a good idea to have it in the package.json

Yes, but you have to keep version in sync 🙂

I figured out how to reproduce my issue.
I am instantiating multiple monaco editors on a page without setting up any language services. These are just simple read-only views.

If I then navigate to a page that instantiates an editor with language services, it throws the error.
It appears that there may be some initialization logic that only occurs once.  So if I load an editor without language services, and then load it with language services, the second load fails.

Oh, I didn't see your comment earlier about loading monaco-languageclient/monaco-vscode-api!
I'm not 100% sure what you mean by import vscode.
Simply add an import statement? import vscode from "vscode"? Or is vscode coming from somewhere in monaco-editor or monaco-languageclient

Simply importing vscode should do the trick, importing monaco-languageclient should work as well
We use an alias from vscode to @CodinGame/monaco-vscode-api

That definitely fixed the issue.  Appreciate the help!

@kaisalmen We should probably have a troubleshoot section somewhere, why do you think?

We should probably have a troubleshoot section somewhere, why do you think?

Good idea, new document linked from the README or we just add a section in the README itself

Let' keep it simple as a section until it becomes too big

@wudstrand I try to do similar thing and wonder what python lsp server your are using here? Thanks.

@CGNonofr
I am trying to use @monaco-editor/react under nextjs to connect to python language server, and am having this problem.

`import { useRef, useEffect } from "react";
import type { NextPage } from "next";
import styles from "../styles/Home.module.css";
import Editor, { useMonaco } from "@monaco-editor/react";
import normalizeUrl from "normalize-url";
import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from "vscode-ws-jsonrpc";
import {
CloseAction,
ErrorAction,
MessageTransports,
MonacoLanguageClient,
} from "monaco-languageclient";
import * as monaco from "monaco-editor";
type Monaco = typeof monaco;
const ReconnectingWebSocket = require("reconnecting-websocket");
const Home: NextPage = () => {
// install Monaco language client services
const LanguageId = "plaintext";
const CODE = #ff0000 (red) #00ff00 (green) #0000ff (blue);
const onMount = (editor, monaco) => {
    console.log("onMount", editor, monaco);
    console.log("Mounted");

    function createUrl(hostname: string, port: number, path: string): string {
        // eslint-disable-next-line no-restricted-globals
        const protocol = location.protocol === "https:" ? "wss" : "ws";
        return normalizeUrl(`${protocol}://${hostname}:${port}${path}`);
    }

    function createWebsocket(socketUrl: string) {
        const socketOptions = {
            maxReconnectionDelay: 10000,
            minReconnectionDelay: 1000,
            reconnectionDelayGrowFactor: 1.3,
            connectionTimeout: 10000,
            maxRetries: Infinity,
            debug: false,
        };
        return new ReconnectingWebSocket.default(socketUrl, [], socketOptions);
    }

    function createLanguageClient(transports: MessageTransports): MonacoLanguageClient {
        return new MonacoLanguageClient({
            name: "Sample Language Client",
            clientOptions: {
                // use a language id as a document selector
                documentSelector: ["python"],
                // disable the default error handler
                errorHandler: {
                    error: () => ({ action: ErrorAction.Continue }),
                    closed: () => ({ action: CloseAction.DoNotRestart }),
                },
            },
            // create a language client connection from the JSON RPC connection on demand
            connectionProvider: {
                get: () => {
                    return Promise.resolve(transports);
                },
            },
        });
    }

    // create the web socket
    const url = createUrl("localhost", 5000, "/");
    const webSocket = createWebsocket(url);

    webSocket.onopen = () => {
        console.log("Opening Web socket connection");
        const socket = toSocket(webSocket);
        const reader = new WebSocketMessageReader(socket);
        const writer = new WebSocketMessageWriter(socket);
        const languageClient = createLanguageClient({
            reader,
            writer,
        });

        languageClient
            .start()
            .then(() => console.log("language client started"))
            .finally(() => console.log("language client done"));

        reader.onClose(() => languageClient.stop());
    };
};

const beforeMount = (monaco) => {
    console.log("beforeMount", monaco);
    monaco.languages.register({
        id: "python",
        extensions: [".py"],
        aliases: ["PYTHON", "python", "py"],
    });
};

return (
    <div className={styles.container}>
        <Editor
            height="90vh"
            defaultLanguage={LanguageId}
            defaultValue={CODE}
            onMount={onMount}
            beforeMount={beforeMount}
        />
    </div>
);

};
export default Home;
`

Can you please create your own issue as it's not related?

I've ran into a similiar issue when on Angular 14 when migrating the libraries v 0.13.0 -> v4.
We are currently seeing the following in the console:

During the migration, I have been using this code https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/client/src/client.ts as a reference to base it off.
Any idea how to solve this? I've tried the above but not had much! :(

@ChrisGilchrist did you check this already? https://github.com/TypeFox/monaco-languageclient/issues/412#issuecomment-1227303932

Yeah when running npm list monaco-editor, it shows the following:

You have<EMAIL_ADDRESS>that was just released (21h ago). Do you have another version in your list? Otherwise, please explicitly define 0.34.0 as dependency for now.
Do you import this
import * as monaco from "monaco-editor";

before anything else as also suggested here https://github.com/TypeFox/monaco-languageclient/issues/423#issuecomment-1255995975 ?

@CGNonofr have you seen this:
https://github.com/microsoft/vscode/pull/163858/files#diff-0dfa7db579eface8250affb76bc88717725a121401d4d8598bc36b92b0b6ef62
That is the only change in 0.34.1. Does it affect monaco-vscode-api?

I don't think so, does it introduce issues?

Don't know, was just asking. Will you release a new version fixed to 0.34.1?
I will now set a direct dependency to<EMAIL_ADDRESS>for monaco-languageclient and upgrade that whenever needed. This way a transitive dependency should not change monaco-editor version it uses unless explicitly configured in a project. That reasoning ist correct, isn't?

monaco-vscode-api synchronizes versions on vscode, not monaco-editor
I'm not sure yo understand what you mean, I see no reason to force a specific version of the editor

I'm not sure yo understand what you mean, I see no reason to force a specific version of the editor

ok, yes you are right. It must be defined on application/user level, not in the lib level (as it was done with 4.0.0)
For my understanding, why do you have direct dependency to monaco-editor defined here: https://github.com/CodinGame/monaco-vscode-api/blob/main/package.json#L177

I admit it's not always clear to me when to use dependencies and peerDependencies, I'm not sure why you think that the monaco-editor dependency here is not required.

I'm not sure why you think that the monaco-editor dependency here is not required.

Because, the source code of the lib does not use it/import it (only the examples) and monaco-vscode-api declares it as dependency. Wouldn't it be best that monaco-vscode-api adds a peer dependency like (or any other fitting upper range):
"monaco": ">= 0.34.0 < 0.35.0"

If we have this peer-dependency in place, then users with non-matching monaco-editor versions will get warnings. WDYT? This could even be done here in addition, but it is better placed in monaco-vscode-api and only needed once IMO.

Because, the source code of the lib does not use it/import it

monaco-vscode-api? it does that A LOT
btw: isn't >= 0.34.0 < 0.35.0 equivalent to ~0.34.0?

The version range was just an example, but being constraint here would be good, I guess. Image you jump with monaco-vscode-api to vs code 1.7x in the future, then you want to limited its compatibility to a specific range of monaco-editor as well, correct?

You have<EMAIL_ADDRESS>that was just released (21h ago). Do you have another version in your list? Otherwise, please explicitly define 0.34.0 as dependency for now. Do you import this
import * as monaco from "monaco-editor";

before anything else as also suggested here #423 (comment) ?

I've tried following the above but still have not had much luck doing so. I unfortunately can't seem to figure out how to do the same with the library https://github.com/atularen/ngx-monaco-editor. Is it compatible with this library?

I don't know. https://github.com/atularen/ngx-monaco-editor does not seem to be compatible with NG 14 as far as I can see.
Have you tried to build an new Angular component and basically add the init of client example to the init of the angular component? Add all imports as well and add the two functions from the example. Then all should be there.
We want to add basic Angular and React examples, but didn't get to it, yet.

I ran repository example but got the error as following

I've tried to install<EMAIL_ADDRESS>explicitly and downgrade to<EMAIL_ADDRESS>but the error still appears

This error can occur if you instantiate an editor BEFORE loading monaco-languageclient or monaco-vscode-api

This error can occur if you instantiate an editor BEFORE loading monaco-languageclient or monaco-vscode-api

The error occurs while creating new MonacoLanguageClient

Yes, was an editor created before?

Yes, was an editor created before?

No I've commented out monaco.editor.create..., I ran the example by npm run dev(vite)

Oh I didn't realize you were talking about the example
I just checked and everything seems to run fine on main HEAD

I just added a Volta section in the new Troubleshooting in the README. When using Volta mismatching node/npm versions are no longer an issue 😎

I close this because #415 was implemented via #436. We have an official react-client example now.


How to get ALL published ids on the server for a custom export method

Hi,
I am trying to make the full (all pages) results set as it appears in my datatable available as an export through a server method.
Instead of trying to reproduce how you've implemented the search , I'd like to just get the list of _ids that the full tabular publication is using.
I know full exports aren't possible with the 'buttons' mod, so I'm hoping to do something like this on my client:
Meteor.call('exportCsv',{collectionName:'People',datatableName:'Directory'});
Any help is appreciated.
Thanks!

@anthonymanzo Did you ever find a workaround for this? All I want to do is export ALL rows when user clicks csv/excel Button. But - I do not want the pagination on the table to change to ALL either.
I'm trying to not use a hacky approach. Thanks!


Loading bug when selecting out of path files

** Operating System**
WIndows 10
Matlab Version
2020b
Description
Error loading files out of matlab path

This could not be replicated.


Warn when defining a method with same name as a prop

When you specify a method on a component with the same name as a prop you get an error about mutating a prop directly, but it can be hard for people new to vue to figure out what this means.
This PR adds a more explicit warning message indicating exactly what went wrong.

That's was great 👍🏼

@posva thanks for the feedback. Updated.

Thanks!


fix(rdb): handle RDBEncInt8 type conversion correctly during RDB loadEncodedString

Resolve https://github.com/apache/kvrocks/issues/2546

@fstd2 It would be great if you could add a Go test case to prevent breaking in the future.

@fstd2 It would be great if you could add a Go test case to prevent breaking in the future.

I'm a beginner, don't know how to do..

@fstd2 No worry, I will do this later if you don't know how to. Thank you!


Feature Request - Option to resolve IPs to hostnames via DNS in Netflow/Insight

As the title says... it would be nice to have the option to resolve IPs to hostnames via DNS for the Netflow/Insight reporting.
See https://forum.opnsense.org/index.php?topic=3223.0

This would be an amazing feature, I was also looking on how to do this.

It needs https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/DnsController.php and https://github.com/opnsense/core/commit/97be1979a7e3b9950518987cf89d303b081b6dd5
When reverse lookup is selected, the charts expands to full width, domain names tend to be longer then ip addresses which limits the visible addresses to only a few due to how nvd3 handles the legends.

All done, thanks!


html+html2: Implement enough of the new parser to drop the old one

This is on hold until some issues with whitespace-collapsing have been fixed. The old HTML parser would drop all elements that only contained whitespace, which is obviously not correct in cases like hello world, but sort of correct in cases like
hello
\n\n
world
. Something that deals with this more properly will be added to the whitespace-collapsing system to not break too much when this is merged.


Disable default context error handler

Coverage increased (+0.05%) to 94.95% when pulling 30c8d9a974bffcebd5ac3cb52c69f3676ed20f25 on disable-context-error-handler into a52cf3d8d613a9690863c2e28790a5d547472670 on develop.

Coverage increased (+0.05%) to 94.96% when pulling 155ec4b8b9c0ed1b10adaf44f568680cb815d924 on disable-context-error-handler into a52cf3d8d613a9690863c2e28790a5d547472670 on develop.


CodePen is broken

Is anyone else having trouble getting the codepen to work? Page just continuously reloads for me with no console errors.

The codepen is working for me.

I've just tried it in Safari and it's working, perhaps just an issue with Chrome (i'm running 55.0.2883.95 on Mac osx).

Just updated Chrome and it works for me. Maybe something weird is going on with your browser cache? Try opening it in an incognito window?

Yep that must've been it. Worked in incognito and then in normal browser after I nuked my cache.  Thanks for taking the time to check. I'll try that first next time :)


Hello im just a noob that likes this project and having issue getting the frontend on my esp32cam, can you give me a clear (windows) discription of preperations to run the makefile ? thanks,

Hi there,
Sorry for the delay in responding to this - I don't normally use windows, but I do have a virtual machine setup now. You'll probably need to use the WSL if you want to use the Makefile without any modifications - https://docs.microsoft.com/en-us/windows/wsl/install-win10
You can however just run the steps manually from the makefile which should work.
cd frontend
yarn
yarn build
yarn export

For the firmware, you can just open it in PlatformIO and build and flash from there.


[BUG, DEADLOCK] fix build tool may deadlock on reading weaver output and error streams in sequence

this is when the weaver will run into errors. this is then deadlocking unreal during c# compilation.
also give UE thread a little rest time while waiting for recompilation process output

Thank you for the PR ⭐ Great stuff :D


[Question]: Why the choice of final classes everywhere?

What happened?
Final classes make it harder for developers to extend package functionality in their own projects. What's the benefit that you see?
How to reproduce the bug

Package Version

PHP Version

Which operating systems does with happen with?
No response
Notes
No response

You don't shy away from controversial topics, which is good. Personally, I prefer to use "final" whenever possible. From my point of view, the absence of "final" complicates maintenance in the long term.
I am well aware of the ongoing PHP-wide discussion about the use of "final," especially in open-source packages and generally, it's easier to remove "final" than to introduce it.
Nevertheless, I am considering making the following compromise: removing "final" from all classes and preparing "Backward Compatibility Guidelines" that outline limited liability for anyone attempting to tinker with the internal state of objects. The guidelines would convey this message: "Override whenever you want, but be aware that you risk being on your own; however, we will try our best not to break things." This approach could backfire spectacularly, but it's worth trying.
I'll give it some more thought and let you know.

In the long run "final" is definitely a better option for both sides. Open for extension, closed for modification (OCP) .
If extending classes is allowed, projects start to depend on implementation details which can lead to some serious maintenance issues if the internals change and they do.  On the other side it puts pressure on the package developer/s to consider this leading to harder maintenance.  "Principles of Package Design - Matthias Noback" is a interesting read on the subject.


redesign sdk

Simplify SDK design by eliminating caches/pools and background discovery as follows:

GetDevices returns devices
GetDevice returns a Device object
The Device object holds resource links and connections needed for getting/updating device's resources
The Close method needs to be called on the Device object

Codecov Report

Merging #21 into master will increase coverage by 6.71%.
The diff coverage is 60.97%.

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   53.95%   60.67%   +6.71%
==========================================
  Files          16       19       +3
  Lines         834     1035     +201
==========================================
+ Hits          450      628     +178
- Misses        301      304       +3
- Partials       83      103      +20

Impacted Files
Coverage Δ

local/updateResource.go
77.77% <100%> (ø)
:arrow_up:

local/discover.go
79.59% <100%> (ø)

local/getResource.go
23.68% <17.64%> (-54.1%)
:arrow_down:

local/observeResource.go
8% <18.18%> (+8%)
:arrow_up:

local/ownDevice.go
51.93% <27.9%> (-0.2%)
:arrow_down:

local/discoverDeviceOwnership.go
58.33% <40%> (ø)

local/client.go
43.58% <43.75%> (-25.27%)
:arrow_down:

local/getSdkDeviceID.go
43.75% <43.75%> (ø)

local/disownDevice.go
55.55% <50%> (+3.38%)
:arrow_up:

local/offboardDevice.go
47.36% <54.54%> (+21.05%)
:arrow_up:

... and 16 more

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 277b29c...9e843f2. Read the comment docs.


nextpnr: 0.4 -> 0.5

Description of changes
https://github.com/YosysHQ/nextpnr/releases/tag/nextpnr-0.5
Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[x] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

nixpkgs-review happy, aarch64-linux

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1712


HttpAdapter don't extend PsrHttpAdapter

I wonder if there should be an inheritance between the two interfaces.

Is the idea that PsrHttpAdapter is a minimal HTTP client implementation and HttpAdapter offers some convenience on top of that? In that case, HttpAdapter could perhaps wrap PsrHttpAdapter.

Yeah, that's the idea. I've already proposed in some of the issues not to extend PsrHttpAdapter in HttpAdapter. In the original (ivory-http-adapter) package there is a PsrDecorator adapter which does exactly that: accepts a PsrHttpAdapter, but implements HttpAdapter. It has not been migrated, because we haven't finished the interfaces yet.

I understand. One thing to keep in mind, though, is that other libraries that require an HTTP adapter shouldn’t really have to care whether it’s the basic PsrHttpAdapter or a more convenient HttpAdapter. So that’s one reason to keep the interface inheritance, or have both adapters extend from another base interface.

Well, what I would do is removing inheritance and doing the opposite you are suggesting: have an interface that extends both: HttpAdapter and PsrHttpAdapter.
IMO usually you choose one way to use the HTTP adapter: through the PSR interface or calling regular methods. There can be cases when you need both, in that case you can require an interface which extends both.
The fact that internally every request is converted to a PsrRequest is not relevant here. That's why I think the inheritance should be removed.
I also think that we could probably provide two virtual packages: one for psr-only adapters and one for the other.
But I admit I have various feelings about this one: the method requests in HttpAdapter return Psr Responses. So in fact that interface is also somewhat related to psr.


Enhanced Recurring Donations: A non-null value in "Number Planned Installments" for an Open Ended RD causes Next Donation Date to be null

Summary
When an Enhanced Recurring Donation record has a Recurring Type of "Open", a Status of "Active" and a value of 0 in the "Number of Planned Installments" field, the Next Donation Date will be set to null on the RD record.
Steps to Reproduce

Enabled Enhanced RD
Create a new Open ended Recurring Donation
Using Developer Console, update the RD record to have a value of 0 in the npe03__Installments__c field
Review the record in the UI
Click Edit and change a value such as Amount or Day of Month
Save the record

Expected Result

The Next Donation Date will have the correct value

Actual Result

The Next Donation Date is blank.

Workaround

Set the value in the npe03__Installments__c field to null on all Open ended Recurring Donations using a Data Loader tool or Developer Console

W-7984522

Please follow this Known Issue in the Trailblazer Community for updates


Fix crash with -OO Python command line

Fix crash with -OO Python command line (__doc__ is None is this case and not str)
Add a Travis job in this case for prevent future related error.

Thank you for working on this by the way.  I have almost no experience with running Python with the -OO flags

Happy to help!
The change with -OO is that __doc__ become None in place of str, so trying use it as a str will raise errors.
There is no more errors on dask with -OO: the build still fail, but it is because -OO errors on bokeh  and  graphviz packages. So I set the Travis build as allowed failure.

Overall this looks fine to me. Two things:

Why do you run with -00? I'm just curious what the benefit here is, I have no experience with this.
Perhaps instead of allowing failure, just skip the tests that fail (as is done with other dependencies). I'm concerned that we'll test it but never check it, as it always is expected to fail.

-OO is usefull only in some case and have two main effects:

It reduce the file size, this help to save disk space when it is precious (ex embedded applications) and also make Python loading faster.
Removing docstring from some files can help to hide some confidential informations. (And help to justify the use of Python even in some companies where confidentiality is important).
In all cases, this is only for production applications, where nobody need to look at the code.

In my case, this mainly help me to have a decent loading time for my software at work (That call a lot of libraries well documented), and this also reassure some managers of my company to not have some information to easy to reach (Without this, they not allowed me to use Python).
I will look to skip failing -OO tests from other libraries.

OK, cool.  So it looks like you've managed to get everything passing.  I'm glad to see this.
Like @jcrist I don't have much personal experience with -OO mode.  However, I do appreciate that companies live in a reasonably constrained world and I'm very happy to see Dask be made more amenable to those constraints.
Nothing here seems like a problem to me.  The only question I have is whether or not we want to have Travis test -OO mode on every build of every PR.  We have only a certain amount of testing time with them and this is a non-trivial increase.  These tests may be more appropriate as a daily cron job, which is newly available on travis.ci: https://docs.travis-ci.com/user/cron-jobs/
Thoughts?

The daily cron job is a good idea.
I skipped some tests, but I have difficulties with test files that raise error on import.

All external package related errors skipped.

I've asked Travis-CI for Cron support

I removed the -OO job from .travis.yml, you can merge it.
The env for the Cron Job is:
PYTHON=3.5 NUMPY=1.11.0 PANDAS=0.18.1 COVERAGE='false' PYTHONOPTIMIZE=2 XTRATESTARGS=--ignore=dask/diagnostics

So, cron jobs aren't as simple as previously thought.
I recommend that we add the -OO flag to a couple of the pre-existing builds, notably PY27 coverage="false" and PY34

Ah ha, feedback from Travis-ci folks:
Just wanted to let you know of the environment variable that gets set automatically: $TRAVIS_EVENT_TYPE. This variable indicates how the build was triggered, and should be one of push, pull_request, api, cron.
You could perform
after_install:

"[[ $TRAVIS_EVENT_TYPE = cron ]] && LongRunningCommand"

OK, merging for now.  It would be nice to switch this out to a cron job some time, but I don't currently have the bandwidth to manage this and I'd like to get this in for the next release.


Syncing among devices always requires sign-in[Bug]

Describe the bug
I've been using Stylebot on several PCs and Macs, syncing styles using google drive seems always require a re-sign-in.
BTW, the login window seems not a standard browser window, and it's not possible to auto-fill.
Browser
Microsoft Edge 103.0.1264.77 release x64, on windows11 21H2 22000.795

I'm having the same issue (I think), though it's happening in two different browsers in the same machine: Firefox and Brave. Brave is a little better behaved in that the extension seems to store the credentials throughout the same session, and only asks me to sign in again if I restart the browser. Firefox, on the other hand, asks me to sign in every single time I try to sync, which is rather annoying.
Browsers and operating system:

Firefox 104.0
Brave 1.43.89 (Chromium: 105.0.5195.102)
Ubuntu 20.04.5 LTS

Happens for me too and has been happening ever since I can remember. Copying text I wrote in my review in the Chrome Store:
The only problem I have with it now is the manual syncing to Google Drive. It works, but it always asks me to login to Google first. If I sync again immediately after login it works, but a VERY short time afterward, or after I close and reopen the browser. it forgets my login and I have to login again to sync. Is there any way to persist the login to Google for longer, so I don't have to constantly sign in to Google each time I want to manusync? Just save the login and keep it for 30 days or something like other apps. Or even better, automatically sync in the background?

Noticed that it's opening in its own window, so it doesn't matter that you're already logged in to your google account in the browser, and ended up here after googling the issue.
Would be pretty great if the syncing worked like Violentmonkey, you log in once, and it syncs at regular intervals with a manual option to sync faster.

It seems to work quite well for me in Chrome, though I don't fully understand what special handling the Chrome browser has. I think this could be done by storing the access token as a cookie, that should at least make it prompt you less often. If there is interest I can work on implementing this, it shouldn't be too hard!


ECR: support removing leading indentation and trailing newline

Fixes #2980
This is an alternative implementation to #2985
@beno I hope you don't mind I decided to try to implement this, but I think the needed changes were really few, and there's no need to introduce more classes nor use regex for this. To do this one just has to look at at most one token ahead, and check if its string value needs to be adjusted. Please check the code, I might have made a mistake or maybe I didn't implement it correctly (I tried a few templates and they seemed to work exactly like ERB).
This now supports all of ERB idioms, as you can see in the specs. Additionally, one can also use <%-= ... %>, which removes leading indentation from it, and I guess because of how it's done this also works for <%-# ... %>.

I find this to be a less functional (-% is now illegal to use?)  much more impenetrable and messy implementation that favours an ugly procedural style over OO principles, but if this is what you prefer I guess it'll have to do.
I also wonder if this implementation correctly respects all line semantics, but I'm not  going to check. Thanks for solving this.

I agree. Skipping trailing and leading linefeeds can be considered as mere modifiers and we should avoid new types, as well as regular expressions —they're slow and may quickly increase compile time— to achieve this.
Yet, maybe the lexer could foresee a second char, so we could properly parse -℅>?

@beno I fixed the -% issue.
I don't try to use OOP for everything, every programming style has its uses and pros/cons. In this case I want ECR parsing to be super fast, and creating many objects and using regex is slow.


cmd/go: missing import stack for 'no buildable source files' error

Some packages that my code depends on went through breaking changes, which caused the disappearance of "github.com/gonum/blas/goblas". When I build my code, I get the error
brendan:~/Documents/mygo/src/github.com/reggo/reggo/supervised/nnet$ go test
go build github.com/gonum/blas/goblas: no buildable Go source files in /Users/brendan/Documents/mygo/src/github.com/gonum/blas/goblas
FAIL	github.com/reggo/reggo/supervised/nnet [build failed]

Which is exactly the error one would expect. However, there is no explicit dependence of supervised/nnet on gonum/blas/goblas, and I had to manually hunt through the import path to find the actual dependency. Could this error be enhanced to show which package tries to import a non-existant package? I'm thinking something along the lines of
go build github.com/gonum/blas/goblas: no buildable Go source files in
/Users/brendan/Documents/mygo/src/github.com/gonum/blas/goblas
 (imported by /Users/brendan/Documents/mygo/src/github.com/reggo/reggo/common/regtest)

See also #11456.