Some long UTF8 characters causing cursor to drift

Neovim:
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/config -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/src -I/usr/local/include -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/deps-build/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/src/nvim/auto -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/include
Compiled by<EMAIL_ADDRESS>
Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.3/share/nvim"

Code:
Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:57:51.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

The problem is quite subtle but when the editor encounters UTF8 characters longer than 2*8bits, the cursor is drifted forward by 1 position.

Here character ᵩ has UTF8 code E1 B5 A9.
This drift affects x and D operations in normal mode also.
Plain nvim seems to be fine with that so I suppose it's a problem with the plugin?
(2*8bits-characters like φ(CF 86) works also fine.)

Multibyte characters again 😭 Looks like bytecalc is wrong again. Curious, ᵩ is 3 bytelength but, japanese/chinese/korean which are 3 bytelength too are working fine

Guess it's caused by that ᵩ has width 1 instead of 2 for CJK characters?
Could packages like ts-wcwidth be helpful?

Hi.
Sorry for getting ahead of myself.
I tried ts-wcwidth myself and it seems to work with this patch:
diff --git a/src/utils.ts b/src/utils.ts
index 6beab4b..71f493e 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,5 +1,6 @@
 import { Diff } from "fast-diff";
 import { TextEditor } from "vscode";
+import wcwidth from 'ts-wcwidth';

 export interface EditRange {
     start: number;
@@ -221,18 +222,12 @@ export function convertByteNumToCharNum(line: string, col: number, byteWorkaroun
     }

     let currCharNum = 0;
-    let totalBytes = 0;
-    while (totalBytes < col) {
-        let bytes = getBytesFromCodePoint(line.codePointAt(currCharNum));
-        // VIM treats 2 bytes as 1 char pos (https://github.com/asvetliakov/vscode-neovim/issues/127)
-        if (byteWorkaround && bytes === 2) {
-            bytes = 1;
-        }
-        totalBytes += byteWorkaround ? (bytes >= 2 ? 2 : bytes) : bytes;
-        currCharNum++;
-        if (currCharNum >= line.length) {
-            return currCharNum;
+    if (byteWorkaround) {
+        while (wcwidth(line.substring(0, currCharNum)) < col) {
+            currCharNum++;
         }
+    } else {
+        currCharNum = col;
     }
     return currCharNum;
 }
@@ -241,20 +236,7 @@ export function convertCharNumToByteNum(line: string, col: number): number {
     if (col === 0 || !line) {
         return 0;
     }
-
-    let currCharNum = 0;
-    let totalBytes = 0;
-    while (currCharNum < col) {
-        // VIM treats 2 bytes as 1 char pos for grid_cursor_goto/grid_lines (https://github.com/asvetliakov/vscode-neovim/issues/127)
-        // but for setting cursor we must use original byte length
-        const bytes = getBytesFromCodePoint(line.codePointAt(currCharNum));
-        totalBytes += bytes;
-        currCharNum++;
-        if (currCharNum >= line.length) {
-            return currCharNum;
-        }
-    }
-    return totalBytes;
+    return wcwidth(line.substring(0, col))
 }

 export function getStartColForHL(line: string, byteCol: number): number {

Thank you for the investigation... The problem is:
ᵩ1
测1

Each time the cursor moves neovim sends grid_cursor_goto event with [screenLine, screenCol]
for first line navigating to 1 receives [0, 1] . For second line navigating to 1 receives [1, 2]
Both ᵩ and 测 are 3 bytes symbols, so yeah, looks like need to use wcwidth here instead
Additionally there are calls to nvim_win_set_cursor which are byte-based instead (used to set cursor by mouse click)
Also it's better to use wcwidth for single characters because something like wcwidth(line.substring(...)) will iterate from beginning again and again. This is not problem normally but this function can be called very often and we want to avoid any hungry work here, even if it takes no more than 1ms

Didn't test esc at the end of the line, as you said, didn't work.

Thanks for explanation and the fix!


Fix centos9 image SHA

Bazel requires the exact SHA of the arch it uses instead of the parent SHA.

@nyoxi given the comment i wrote in the previous PR and this one (having to have the arch SHA) - might be worth to change into tag name instead of digest?


Bump dep openssh-mux-client to v0.16

Signed-off-by: Jiahao XU<EMAIL_ADDRESS>

This change is

Closed in favor of #101


chore (Algebra.Order.Group.Abs): split file into unbundled and bundled material

Currently Algebra.Order.Group.Abs imports OrderedCommMonoid and other bundled algebra classes despite much of the file using unbundled ordered algebra typeclasses. We split into Algebra.Order.Group.Unbundled.Abs and Algebra.Order.Group.Abs to separate the bundled and unbundled parts of the file and minimize imports downstream.

Thanks!
bors merge


Demo required

plz show some graphs to show what it could do. 🥺

my python version is 3.8
just clone it then use pip install -r requirements.txt
finally, run manage.py runserver to start everything
you can use your postman to test apis


Is it possible to setEmail with this wrapper ?

Hello,
Thanks for this wrapper it's useful ! I want to know how can i set an email for onesignal with this ? Is it possible ?
Thanks,

This is just a wrapper around official OneSignal Web Rest Api. There is no endpoint for setting an email on this documentation, so no, it is not possible to set an email unfortunately.


Update list-of-prerequisite-checks.md

Current wording might be interpreted that it is not supported to upgrade SQL Native Client. This clarifies that Configuration Manager will not upgrade the client as per issue #1150.
Summarize the change in the pull request title
Describe your change, specifically why you think it's needed.
Fixes #Issue_Number (if necessary)

@davidpaMSFT : Thanks for your contribution! The author, @aczechowski, has been notified to review your proposed change.

@davidpaMSFT : Thanks for your contribution! The author, @aczechowski, has been notified to review your proposed change.

Thanks @davidpaMSFT for the contribution, I like your rewording. #sign-off
Note to reviewer: this PR doesn't fix the linked issue, so please don't close it. 😄
Once merged, this should be live with the next daily publishing process. Right now that should be tomorrow (Wednesday, 13 February) around 11:00 Pacific time. No further action needed from you.


Issues deploying to heroku

I am trying to deploy the app to Heroku following the instructions, but when I get to this step:
heroku run python <project_name>/manage.py syncdb --noinput I get an error message "ImportError: No module named storages". Even after manually installing django_storages through pip in heroku, the same error shows up.

I have something very similar @theskumar my pip freeze is over there. Do we absolutely need to set the aws configs? https://github.com/pydanny/cookiecutter-django/issues/2328


[DOC]: AirPlay listener can cause startup issues for Conductor UI on Macs

What are you missing in the docs
Anyone wanting to run via the docker documents (where Conductor UI starts on 5000) may run into issues with AirPlay already listening on port 5000.
Proposed text
Notice for Mac users:  AirPlay often listens on port 5000, so you may need to change the conductor-ui port from 5000 to 5001 (or your port of choice).

Thanks for reporting this.
@peterlau Can you please add this to the documentation for the UI?


Empty/failing update source can cause infinite loops of retires

Describe the bug
When processing an update source that fails and does not produce any data, the update process is immediately restarted. If it happens during a regular update, the process is started again for all sources. It causes unnecessary CPU usage, but may also exhaust some rate limiting or stop a service from starting (if it waits for the updates to be done).
To Reproduce
Steps to reproduce the behavior:

Choose a service and configure a new update source that will fail during processing.
For example, choose a YARA service and add the source: https://github.com/Neo23x0/signature-base (or just craft a source that will cause yara to fail)
Observe the updater logs.
After downloading a new update source, it will fail to import the file and retry.
After a few seconds/minutes, you will see that the updating process is looped.

Note: Previously, I managed to enable debug logging and saw some comments that the <update_dir>/<source_name>/ is missing. For some reason, my setup doesn't want to respect debug log settings now, so I cannot ensure - but it may be important as then the reproduction may not work for existing sources.
Note2: I think that regex filtering out all data should also work as a reproduce.
Expected behavior

Only the failed source should be retried, not all.
Retries should be limited and delayed.

Screenshots
Environment (please complete the following information if pertinent):

Assemblyline Version: 4.4.0.stable79

Additional context
In this case, filtering not-supported rules with a regex doesn't work as a workaround, but it's a thing for another issue.

A part of the inventory check function should cause it to only retry missing sources. Each service can define their inventory check in different ways but I believe YARA should be following the default behaviour.
As for imposing a retry limit or delay, this is something that we could add.

Hi there! We currently have a bunch of services with dev releases that should have a patch to resolve this.
Would you mind testing it out on your deployment? Since you mentioned YARA, version 4.4.1.dev44 would be a good test candidate.

Hi, unfortunately, I don't have any working environment with configured to use dev branch currently - if I find time, I'll set up one and test.
BTW, I have also noticed that sometimes (after recreating update container, and creating a new service instance at the same time?), AL seems to trigger updates twice almost at the same time. My impression was that they were processed concurrently, but maybe they were just shortly after each other. Effectively slowing down starting the service as it was first waiting for the update container to be ready & getting first updates, and shortly after that getting a new update. Does it sound true, or have I observed it wrongly?

Sounds like you're talking about when the updater starts up, it first performs a local update check (basically checks to see if we already have data that we can send to the service instance ie. previous imported signatures) and then the source update check (where it tries to pull from the external sources).
Usually if a service is configured to wait_for_update, then what should happen is that the updater is started first and upon having a bundle it can send to services, it will tell Scaler that the service instance is ready to be scaled. If let's say an updater doesn't have anything to send to a service from the local update check (ie. Signatures index is wiped or nothing cached in persistent storage), then it should tell the Scaler that the service shouldn't be scaled up at all (because otherwise, why would you wait_for_update?):
https://github.com/CybercentreCanada/assemblyline-v4-service/blob/1c557fec76efbc2f09040444912d34b40a2fcf13/assemblyline_v4_service/updater/updater.py#L277
At least based on what you described, that's what it sounds like but I could be off the mark 😅

That should actually be resolved in this PR:
https://github.com/CybercentreCanada/assemblyline-v4-service/pull/719
What happened was the the local thread would do it's inventory check and task the source thread to perform updates (if it deemed data from sources are missing), but it only gave it 60s until the next check. So if the source thread didn't finish what it needed to do within that span, then the local thread would keep re-tasking the source thread (depending on the conditions of the inventory check).
I've only really noticed the issue in ConfigExtractor because of venv creation so I can imagine it can happen to other services that take a long time to process the file(s) from a source.

Should be resolved in the latest release. If the issue still persists, feel free to reopen the issue 😀


Crunchyroll: it doesn't create a folder while it does with YouTube

Please follow the guide below

You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your issue (like this: [x])
Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.10.29. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

[x] I've verified and I assure that I'm running youtube-dl 2018.10.29

Before submitting an issue make sure you have:

[x] At least skimmed through the README, most notably the FAQ and BUGS sections
[x] Searched the bugtracker for similar issues including closed ones
[x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

[x] Bug report (encountered problems with youtube-dl)
[ ] Site support request (request for adding support for a new site)
[ ] Feature request (request for a new functionality)
[ ] Question
[ ] Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-o', 'C:\User\MyUser\Desktop\%(series)s\%(title)s.%(ext)s', '-f', 'best[height=480]', '--hls-prefer-native', '--proxy', '', '--sub-lang', 'enUS', '--write-sub', '--sub-format', 'ass', '--embed-subs', 'https://www.crunchyroll.com/golden-time/episode-1-springtime-645007']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.10.29
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-92292-ge95987f6ca, ffprobe N-92292-ge95987f6ca, rtmpdump 2.5
[debug] Proxy map: {}
[crunchyroll] 645007: Downloading webpage
[crunchyroll] 645007: Downloading audio-jaJP m3u8 information
[crunchyroll] 645007: Downloading audio-jaJP-hardsub-esLA m3u8 information
[crunchyroll] 645007: Downloading audio-jaJP-hardsub-frFR m3u8 information
[crunchyroll] 645007: Downloading audio-jaJP-hardsub-esES m3u8 information
[crunchyroll] 645007: Downloading audio-jaJP-hardsub-ptBR m3u8 information
[crunchyroll] 645007: Downloading audio-jaJP-hardsub-enUS m3u8 information
[crunchyroll] 645007: Downloading audio-jaJP-hardsub-deDE m3u8 information
[crunchyroll] 645007: Downloading media info
[info] Writing video subtitles to: C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.enUS.ass
[debug] Invoking downloader on 'https://v.vrv.co/evs/4d295c7a5e8cff2c5d9f6d90439b0120/assets/ek5lstn4ugth1nh_1812683.mp4/index-v1-a1.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly92LnZydi5jby9ldnMvNGQyOTVjN2E1ZThjZmYyYzVkOWY2ZDkwNDM5YjAxMjAvYXNzZXRzLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDEzMzc0MzZ9fX1dfQ__&Signature=eVteNm7qsbhVHlN5iKyxOUnuA0YHfEYs8l7icSqFCyXhyXffDIWkwgOQRFwYA38L15ufI~EPCuzBi2DSzoQ7hLpoLoPe5X9jVhgTAvEOR~9oujiDzWr4docMoYUFj6XhD4blMajWbGQ5CxTncoN~WQFSbKlUGCw62DqFY~ja5Vmz1UGFNhp4zizloKfZYVX-5mVMvxjOXu~dIMeYg8Ce-7NZ~omCP37zw~88K35y0yWexwNvAc~WtGzbJjdAEWdNVQwh0GaTyIh5LO~pmp4y2d3thJhofDOFA~V4u24BoJpir-XUZlwuDeXvZELsgmUwajjKZDcM3HjfOKtbuA4gEg__&Key-Pair-Id=APKAJKQQ2INNHTYFB44A'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 144
[download] Destination: C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.mp4
[download] 100% of 206.65MiB in 07:13
[debug] ffmpeg command line: ffprobe -show_streams "file:C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.mp4"
[ffmpeg] Fixing malformed AAC bitstream in "C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.mp4"
[debug] ffmpeg command line: ffmpeg -y -i "file:C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.mp4" -c copy -f mp4 "-bsf:a" aac_adtstoasc "file:C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.temp.mp4"
[ffmpeg] Embedding subtitles in 'C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.mp4'
[debug] ffmpeg command line: ffmpeg -y -i "file:C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.mp4" -i "file:C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.enUS.ass" -map 0 -c copy -map "-0:s" "-c:s" mov_text -map "1:0" "-metadata:s:s:0" "language=eng" "file:C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.temp.mp4"
Deleting original file C:\User\MyUser\Desktop\Golden Time\Golden Time Episode 1 – Springtime.enUS.ass (pass -k to keep)

---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://www.youtube.com/watch?v=BaW_jenozKc
- Single video: https://youtu.be/BaW_jenozKc
- Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc

Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.

---

### Description of your *issue*, suggested solution and other information

First of all sorry for my English. I'm foreign. Now, the problem is that if I want to download an episode (or a series) I want to create a folder for the files downloaded. So I made a command like this (YouTube) `-o "C:\Users\MyUser\Desktop\%(uploader)s\%(title)s.%(ext)s"` and it works, creating a folder named with the Uploader and inside all the files downloaded ( [here](https://pastebin.com/snhXmXj5)'s the verbose). I wanted to make something similar with Crunchyroll, I tried with `-o "C:\Users\MyUser\Desktop\%(series)s\%(title)s.%(ext)s"` and it seems like it is going well, but it doesn't create any folder.

As clearly seen from your log folder C:\User\MyUser\Desktop\Golden Time has been successfully created.


Interactive interface

Added an interactive interface with a REPL frontend (could later also accept commands over a socket).
Also wrapped the image importers and Metadata importer to handle multiple sources.

The idea behind multiple inputs is so that we can load data from multiple flights and process it together, though technically we could also receive data from multiple sources in real time.


feat: Textfield multiline and pass - Closes #227.

Closes Issue #227
Added a new attribute (uif-multiline) for the uif-textfield directive to render the directive as a multi-line text area.
Added a new attribute (uif-type) for the uif-textfield directive to render the directive as a password input.

Hi thank you! It looks better than the previous PR, but there are still some things missing:

New uif-type attribute added, yet no error checking (guideline 007)
No demos added with new use cases... these must be added with descriptions

Could you please work on these?

Sure thing.
Is it alright if I leave it to default to "text" if it's not set?

Yes please, default = text. Thanks.

Is this finished? It doesn't appear so... but confused as the title says it closes an issue...

It's not ready. I've raised two issues, you raised before, but are not solved yet.

I'm going to close this until the PR is ready to be merged... open PR's make it seem like they are waiting to be merged and keeping track of what's ready is ripe for a mistake.

@florinszilagyi It would be a shame if it wouldn't be merged as you are almost there. Are you able to fix the last two issues and submit a new PR?

I'll try to make a new PR this week.
Thanks


Update README.md

Add example on how to use tileboard event an notification in HomeAssistant to help other newbies like me!

Thank you!

It's a pleasure, I really like the project :) I'm shitty in programming but I kill in documentation haha! happy to help!


Add Dhcp4/6 subnet pool option data resources

Description

Add Dhcp4/6 subnet pool option data resources

Issues Resolved

n/a

Check List

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

Released as: 1.3.0


Error Scrapping

Hello, I have this error, i load the autoload from folder src.
Uncaught exception 'ErrorException' with message 'Exceeded maximum retries trying to get CF clearance!

Which site are you trying to request?

http://gnula.nu/

Can you provide the code that you used?
I tried with this one and seems to work:
use CloudflareBypass\RequestMethod\CFCurl;

$curl_cf_wrapper = new CFCurl(array(
    'cache'         => true,   // Caching now enabled by default; stores clearance tokens in Cache folder
    'max_attempts'  => 5       // Max attempts to try and get CF clearance
));

$ch = curl_init("http://gnula.nu/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36');
$response = $curl_cf_wrapper->exec($ch);

curl_getinfo($ch, CURLINFO_HTTP_CODE); // 200

I'm going to buff up the tests a little so they test multiple sites instead of one. Tests should run the script in no cache mode, but there should also be tests in caching mode too. I'll let you know when a pull request is there @railken

@risklife Your issue should be fixed now.
Let me know if this is the case so I can close the issue. 👍


undefined is not an object (evaluating '_reactNative.UIManager.RNSVGRenderable.NativeProps')

Hi there,
I've created a new React Native project (RN 0.30.0, React 15.2.1, Node 4.4.0) and installed this package as follows:
$ react-native init PathJSChartsDemo
$ cd PathJSChartsDemo
$ npm install --save react-native-pathjs-charts
$ rnpm link

I then imported Bar and added the example and data the index.ios.js file:
import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';
import {Bar} from 'react-native-pathjs-charts';

class PathJSChartsDemo extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Bar
          data={sampleData.bar.data}
          options={sampleData.bar.options}
          accessorKey='v'/>
      </View>
    );
  }
}

const sampleData = {
    bar: {
        data: [
            [{
                "v": 49,......

I noticed that rnpm link completes with no output, in case that's relevant. When running the app I get the error in the issue title. The top of the stack is createNativeComponent.ios.js:36 in react-native-svg/lib. Do you have any ideas what I might be doing wrong?
Thanks!
James

I'm seeing this problem too with the latest version. I've noticed that there's no output as well and when I created the library two months ago, the linking worked fine. I was able to get linking to work today by targeting through rnpm link react-native-svg (which is the only native library reference). However, now I'm getting some other issues. So, I'll keep working the issue. @webmariner - try the rnpm link react-native-svg and see if you can get it working. I'm going to chew on this to figure out what's going on.

Ok, here's what I figured out:

React-Native link is no longer finding sub-dependencies
To work with 0.30, you need the latest react-native-svg

Updating this fixed running on both iOS and Android. Give it a try now after an update on NPM. The latest version that fixes this is 0.0.20 (on NPM).
Reference #3

Hi! I removed and reinstalled both this and react-native-svg via npm, then did rnpm link, and hey presto I now have a chart. Thanks for your help! 👍


GPTCache doesn't seem to work with LlamaIndex

So I've been trying to get GPTCache to work with LlamaIndex. While Langchain has a documented integration with GPTCache - https://python.langchain.com/en/latest/modules/models/llms/examples/llm_caching.html#gptcache , when I try to use it in my own code which uses GPTSimpleVectorIndex, it is unable to persist the question/answer pair in the cache.
Here's my code.
import langchain
from flask import Flask, render_template, request, Response, jsonify
import os
import logging
import sys
import time

from llama_index import GPTSimpleVectorIndex, QuestionAnswerPrompt
from langchain import PromptTemplate, LLMChain
from langchain.llms import OpenAI
from gptcache import Cache
from gptcache.adapter.api import init_similar_cache
from langchain.cache import GPTCache

logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
app = Flask(__name__)
# run_with_ngrok(app)
os.environ['OPENAI_API_KEY'] = "MY OPENAPI KEY"

def init_gptcache(cache_obj: Cache):
    init_similar_cache(cache_obj=cache_obj, data_dir=f"similar_cache_ikgpt")

langchain.llm_cache = GPTCache(init_gptcache)

class ChatGPTService:
    __instance = None
    index = None

    @staticmethod
    def get_instance():
        """Static method to fetch the current instance of the class."""
        if ChatGPTService.__instance is None:
            ChatGPTService()
        return ChatGPTService.__instance

    def __init__(self):
        """Virtually private constructor."""
        if ChatGPTService.__instance is not None:
            raise Exception("This class is a singleton!")
        else:
            ChatGPTService.__instance = self

    def load_index(self):
        if self.index is None:
            start_time = time.time()
            self.index = GPTSimpleVectorIndex.load_from_disk("static/latest_index.json")
            end_time = time.time()
            print("Time taken to load index: ", end_time - start_time)

        return self.index

    def generate_response(self, prompt):
        index = self.__instance.load_index()

        QA_PROMPT_TMPL = (
            "Context:\n"
            "---------------------\n"
            "{context_str}"
            "\n---------------------\n"
            "Question:\n"
            "{query_str}"
            "\n---------------------\n"
            "Instructions:\n"
            "Please provide an answer to the question that is truthful and directly related to the information presented in the context above."
            "If the answer is not in the context, please respond with \"I don't know\".\n"
        )

        QA_PROMPT = QuestionAnswerPrompt(QA_PROMPT_TMPL)

        start_time = time.time()
        # index is a GPTSimpleVectorIndex object provided by LlamaIndex
        response = index.query(prompt,
                               text_qa_template=QA_PROMPT,
                               )
        end_time = time.time()

        print("Time taken to generate response: ", end_time - start_time)
        return str(response)

The error (which is a warning) in the logs looks like this
WARNING:root:failed to save the data to cache, error: GPTCache._update_cache_callback() got an unexpected keyword argument 'prompt'
failed to save the data to cache, error: GPTCache._update_cache_callback() got an unexpected keyword argument 'prompt'

Looks like when we do index.query it seems to be sending an additional args 'prompt' to GPTCache. Am I missing something obvious or is there something specific we need to do to support GPTCache (considering langchain supports it).

@ashwinr1980 you can refer to this document, https://gptcache.readthedocs.io/en/latest/bootcamp/llama_index/webpage_qa.html


Required and Repeated fields

Add support for repeated fields on OpenAPI + proto
Add support for required fields on proto (they're already implemented on OpenAPI)

I'll hold off on these changes until #22 goes in, since that might change some of the internal details.


SplashScreen in Android

I used this plugin in my app, and it works, it blanks page view when it is in background (task manager is open).
I'd like to show a splashscreen in the page area, instead a white page. Is it possible for Android?
Thank you very much!

This plugin uses a built in flag in Android. It would need an entire new implementation to do this.
I'd rather just keep using the built in FLAG_SECURE even if it's not quite as pretty.


Levels don't have names, which scripts depend on

What is going on?
The levels are currently named "Level1" and "Level2".
What should happen?
The Levels should have distinct names to them.
Further Information
The Problem here lies in other scripts, which take in account that the level number is in the name of the level.
A possible fix for that would be a class that keeps track of all levels, their names and their levelnumber like so:
levels = ["Cool level name", "Another level name"]
Steps to reproduce

Go ingame
Hit "play"
Observe that the Levelnames are "Level1" and "Level2".

Working on it in #48


Build Error: External Dependency Resolution Issue

Describe the bug
The build process fails with an error message "Cannot resolve "@aws-sdk/credential-providers" from "/opt/buildhome/repo/node_modules/mongodb/lib/deps.js" and externals are not allowed!"
Steps to reproduce

Build a Nuxt.js application.

Expected behavior
The build process should complete successfully.
Additional Information

This error occurs during the build phase (Building application).
The error message indicates that the @aws-sdk/credential-providers package cannot be found.

Possible Causes

Missing dependency: The @aws-sdk/credential-providers package might not be installed in your project.
Incorrect configuration: There might be an issue with the configuration of external dependencies (indicated by "externals are not allowed!").

17:43:23.356 [error] Cannot resolve "@aws-sdk/credential-providers" from "/opt/buildhome/repo/node_modules/mongodb/lib/deps.js" and externals are not allowed!
17:43:23.357   at Object.resolveId (node_modules/nitropack/dist/nitro.mjs:1966:17)
17:43:23.357   at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:19674:28)
17:43:23.357   at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18355:26)
17:43:23.357   at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18758:15)
17:43:23.357   at async node_modules/@rollup/plugin-commonjs/dist/es/index.js:785:16
17:43:23.357   at async Promise.all (index 3)
17:43:23.357   at async node_modules/@rollup/plugin-commonjs/dist/es/index.js:777:32
17:43:23.358   at async rewriteRequireExpressionsAndGetImportBlock (node_modules/@rollup/plugin-commonjs/dist/es/index.js:1354:28)
17:43:23.358   at async transformCommonjs (node_modules/@rollup/plugin-commonjs/dist/es/index.js:1933:23)
17:43:23.358   at async transform (node_modules/rollup/dist/es/shared/node-entry.js:18676:16)
17:43:23.358
17:43:23.358 [error] Cannot resolve "@aws-sdk/credential-providers" from "/opt/buildhome/repo/node_modules/mongodb/lib/deps.js" and externals are not allowed!
17:43:23.516 Failed: Error while executing user command. Exited with error code: 1
17:43:23.526 Failed: build command exited with code: 1
17:43:24.946 Failed: error occurred while running build command

"dependencies": {
    "@firebase/app-types": "^0.9.1",
    "@iconify-json/heroicons": "^1.1.20",
    "@iconify-json/simple-icons": "^1.1.97",
    "@mongodb-js/zstd": "^1.2.0",
    "@nuxt/content": "^2.12.1",
    "@nuxt/fonts": "^0.5.1",
    "@nuxt/ui-pro": "^1.1.0",
    "@nuxthub/core": "^0.5.18",
    "@pinecone-database/pinecone": "^2.2.1",
    "fast-xml-parser": "^4.3.6",
    "firebase": "^10.10.0",
    "firebase-admin": "^11.11.1",
    "firebase-functions": "^4.8.2",
    "mongoose": "^8.4.0",
    "nuxt": "^3.11.1",
    "nuxt-vuefire": "^1.0.2",
    "openai": "^4.47.1",
    "vuefire": "^3.1.23"
  },

Hey @chihebnabil
Edge workers are not yet compatible with Mongo, that is the main reason for failing to build. Checkout https://nitro.unjs.io/deploy/workers#mongodb

@farnabaz What a bummer!, thank you :smile:


Optimize matrix updates

Rather than updating the local and model matrices every time one of their components changes, only update them next time you need to draw them, if the values are stale.

Definitely feel like I saw seeing the effects of this in the abaddon demo video.  Things looked a little choppy at times.


Clarification on how the markTokenset feature works

In the README, it says that:

Allows marking a category as a custom tokenset so that it will appear as a separate tokenset in Figma. This is useful if you want to combine many base tokens into a "global" set for example.

This is exactly what I want to do. However, it seems like Figma Tokens might not support this anymore? E,g, in Figma Tokens, it seems that every tokenset is a separate JSON, and markTokenset  in the same JSON does not have any effect.
I might be doing something wrong, so looking for clarification whether this is supposed to work or not. Thanks!

Hey, thanks for bringing this to my attention.
It seems as though the tokenset meta information since the last update is now stored in the Figma Tokens plugin itself, so there's no way to create a JSON file from the outside as input to the plugin that populates the tokens in separate tokensets.
I'll ask Jan if he can advise, maybe there's a way still to do this or perhaps he'd consider a meta prop in his JSON format for us to allow doing this again.

Yeah, the alternative I've thought about would be to export separate JSON files from style-dictionary through filtering, but it would simplify setting up sync if there were less JSON files.

I'm not sure if you can specify multiple JSON files in the plugin as input source?

Seems to imply it's just 1 JSON file path.

What you could do is export it like you're doing, you get it all in 1 token set, and then you can create the other tokensets that you need and just Cut & Paste the JSON pieces in plugin. It's a bit of manual work of course, not sure how many sets you've got or how big your JSON is.

Interesting, I haven't actually set up the sync yet - thought that it is possible to specify that for each tokenset, but it does seem to be global. I wonder how it's set up in the reverse direction (i.e. syncing from figma to github), how does is store the tokens then? Might be that the tokenset feature only supports exteranl sync and not manually importing the JSON, which, while a bit weird, would eventually work for me as well.

It seems I misunderstood. There's no regression from the Figma Tokens Plugin, I was reading the JSON from my own project but I forgot I ran the token-transformer over it and transform to style-dictionary format (so basically doing the reverse of what style-dictionary-to-figma does), so the tokensets info is removed there. My bad!
The way this is supposed to work is as follows,
You start with style-dictionary JSON, for example:
{
  "colors": {
    "tokenset": "set-core",
    "accent": {
      "base": {
        "type": "color",
        "value": "#F8C307"
      },
      "bright": {
        "type": "color",
        "value": "#FFD63B"
      }
    }
  }
}

This will be processed by style-dictionary-to-figma to give you the following output (roughly speaking, there will be more metadata as well):
{
  "set-core": {
    "colors": {
      "accent": {
        "base": {
          "type": "color",
          "value": "#F8C307"
        },
        "bright": {
          "type": "color",
          "value": "#FFD63B"
        }
      }
    }
  }
}

This JSON is the interpreted by the Figma Tokens Plugin, it takes the uppermost property in the JSON as the tokenset, and then what is nested inside will be displayed under that tokenset in the plugin "JSON" tab like so:
{
  "colors": {
    "accent": {
      "base": {
        "type": "color",
        "value": "#F8C307"
      },
      "bright": {
        "type": "color",
        "value": "#FFD63B"
      }
    }
  }
}

This works only via the sync feature, right? I.e. it is not possible to paste that second JSON (the output of style-dictionary-to-figma w/ tokensets) to Figma Tokens manually, as that manual JSON editing expects the third format already?

Yeah I'll add a blockquote note about needing to use the FT sync feature for this.
Perhaps it could be an idea to add a flag to the transformer that outputs every tokenset in a separate JSON file (the third snippet, multiple), so you can copy paste into the tokensets JSON in the plugin? Would that be useful to you? I'd still recommend using the sync feature though but I'd be happy to add this flag if it adds value to you right now.

This could be useful, but no need to implement anything for me yet. Not sure this can be done in this transformer, as it doesn't deal with writing files at all currently, that is handled by SD? I might be able to do this on my own by running this formatter multiple times with different filters. Planning to get the sync up and running as well soon, so this need would be too temporary to spend too much time on it :)


Updating training script in basic_interactive notebook

Issue link
RHOAIENG-6475
What changes have been made
When running GPU utilising workloads using the basic_interactive demo notebook I encountered a lot of errors while running the training script provided in the notebook. As it was added more than a year ago and may be out of date I have updated the notebook to use ray train using these examples: Text classification, Hugging Face Transformers + Ray Train
I have also updated the hf_interactive notebook which was using the same training script.
Verification steps

Install RHOAI with the CodeFlare components set to Managed
Ensure that your cluster has GPU nodes as required.
Within a data science project workbench clone this branch and install codeflare sdk

git clone https://github.com/Fiona-Waters/codeflare-sdk.git -b udpate-notebook-script
cd codeflare-sdk
pip install poetry
poetry install

Run the basic_interactive notebook and ensure that it works as expected.
Note that aws credentials are required and you will need to create and use an s3 bucket while running the training script. See this PR for instructions.

Checks

[ ] I've made sure the tests are passing.
Testing Strategy

[ ] Unit tests
[X] Manual tests
[ ] Testing is not required for this change

/retest

/retest

This PR just needs a rebase and it should pass the e2e test

/lgtm

/approve


Feature 193 release dropdown menu

Pull Request Testing

[x] Describe testing already performed for these changes:
I've added dropdown menus to the release note section. The below files have been changed so the dropdown menus will work:
config.py
requirements.txt file.
METdataio/.github/workflows/documentation.yml

I have tested all of the dropdown menus.

[x] Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Please open a couple of the dropdown menus.  Let me know if there are any problems or inconsistencies.  All should be running smoothly.  Here is the link:
https://metdataio.readthedocs.io/en/feature_193_release_dropdown_menu/Users_Guide/release-notes.html

[x] Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No errors]

[x] Do these changes include sufficient testing updates? [No]

[x] Will this PR result in changes to the test suite? [No]
If yes, describe the new output and/or changes to the existing output:

[x] Please complete this pull request review by [4/4/23]. Date is negotiable.

Pull Request Checklist
See the METplus Workflow for details.

[x] Review the source issue metadata (required labels, projects, and milestone).
[x] Complete the PR definition above.
[x] Ensure the PR title matches the feature or bugfix branch name.
[x] Define the PR metadata, as permissions allow.
Select: Reviewer(s)
Select: Organization level software support Project or Repository level development cycle Project
Select: Milestone as the version that will include these changes
[x] After submitting the PR, select Development issue with the original issue number.
[ ] After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
[ ] Close the linked issue and delete your feature or bugfix branch from GitHub.

@jprestop, @bikegeek or @fisherhucar  I do not have permission to merge this pull request, could one of you squash and merge this pull request.  I'm done with the branch and the issue.  Thanks!


Removed duplicate audio_analysis method in client.Spotify()

Removed duplicate audio_analysis method in client.Spotify()

Spotify.user_playlist_tracks() requires a playlist_id parameter. Removed optionality from playlist_id

Hey! I am hosting a new master branch for this repo since the old creator has been MIA for 2 years. Hoping to get this repo back on it's feet and in good standing. I've been working on updating tests and adding all new functionality and have merged some of the PR's that I thought were sufficient for merging. If your PR didn't make it, resubmit it please.
Thanks!
https://github.com/Harrison97/spotipy


[Bug][GitHub] GraphQL API gets different data from REST API

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
I tried to use the data from a repository with GraphQL and I got completely different data.
REST API works fine.
Maybe the difference is that REST API gets the default branch, while GraphQL gets the "master" or "main" branch.
What do you expect to happen
GraphQL to return the same data of REST API, using the default branch for a repo.
How to reproduce
Select GraphQL API for GitHub and collect data
Anything else
No response
Version
1.0.5 beta
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

What kind of data were you collecting? commits? Could you provide more details? It is really hard to understand what was wrong with the current information. I don't know how to reproduce the problem and where to look 😂

All data related to contributors is different.Yes I was getting commits.You can find the charts with different data in the Components metrics dashboard.
Da: "Klesh Wong" @.***
A: "apache/incubator-devlake" @.***
Cc: "Gabriele Nosso" @.,"Author" @.
Data: Sat, 27 Apr 2024 19:59:19 -0700
Oggetto: Re: [apache/incubator-devlake] [Bug][GitHub] GraphQL API gets different data from REST API (Issue #7396)
What kind of data were you collecting? commits? Could you provide more details? It is really hard to understand what was wrong with the current information. I don't know how to reproduce the problem and where to look 😂
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Hi @gabrielenosso , there are many (known or unknown) differences between the results of GitHub's GraphQL or REST APIs. Considering

the cost to make them consistent, and the long-term maintenance cost (because the API results change)
AND we encourage users to use GraphQL and might not support REST APIs in the future because it's 10x+ slower than GraphQL.

I prefer not changing the status quo here.

I would also prefer to use GraphQL API.. point is the information I get in Grafana are not from the default branch of the repository...
Da: "Louis.z" @.***
A: "apache/incubator-devlake" @.***
Cc: "Gabriele Nosso" @.,"Mention" @.
Data: Sun, 28 Apr 2024 03:15:28 -0700
Oggetto: Re: [apache/incubator-devlake] [Bug][GitHub] GraphQL API gets different data from REST API (Issue #7396)
Hi @gabrielenosso , there are many (known or unknown) differences between the results of GitHub's GraphQL or REST APIs. Considering
the cost to make them consistent, and the long-term maintenance cost (because the API results change)
AND we encourage users to use GraphQL and might not support REST APIs in the future because it's 10x+ slower than GraphQL.
I prefer not changing the status quo here.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Hi @gabrielenosso , got it. Do you mean your default branch is not the main or master branch?


[GHSA-j5g2-q29x-cw3h] SimpleSAMLphp vulnerable to XXE in parsing SAML messages

Updates

Affected products
Source code location

Comments
The vulnerability exists in the simplesamlphp/saml2 package, not in the simplesamlphp/simplesamlphp package. It is possible to update simplesamlphp/saml2 without updating simplesamlphp/simplesamlphp. A simple composer update will work and pull in the updated simplesamlphp/saml2. In that case even older versions of simplesamlphp/simplesamlphp are safe.

Hi there @tvdijen! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.
This change will be reviewed by our Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory

The SimpleSAMLphp developers do not agree with this change.
You cannot assume everyone uses composer. Many of our users rely on our pre-built tarball and it is crucial that they update. We created this advisory deliberately like this.

The problem is that this advisory generates composer audit errors for people who do use composer, and also creates conflicts for people who use roave/security-advisories (https://github.com/Roave/SecurityAdvisories). They both use this advisory. I am forced to remove roave/security-advisories from my dependencies because of the conflict with simplesamlphp <2.0.15, even though I am not vulnerable at all!

So you're running an old an unsupported version of SimpleSAMLphp and backport security-fixes by updating the dependencies? Even if you do use composer, it's generally bad practise to bypass the lock-file and composer update. It will leave you with an untested set of dependencies and is likely break things sooner or later. SimpleSAMLphp may follow semantic versioning, but there's no guarantee that all our secondary and tertiary dependencies do.

We require SimpleSAMLphp as a package in our own application. Composer always ignores lockfiles from dependencies. If that is not a supported use-case then you should probably not publish simplesamlphp/simplesamlphp as a package on packagist.
That said, if I have an updated simplesamlphp/saml2 then simplesamlphp/simplesamlphp <2.0.15 is not vulnerable to this XXE, right? Then this security advisory is not valid as it is.

👋 Hi @sandermarechal, thank you for your concern about GHSA-j5g2-q29x-cw3h, but I'm going to leave the advisory as it currently is. It's valid for the maintainers of https://github.com/simplesamlphp/simplesamlphp to want to warn users about a vulnerability for which they may need to take action.

@sandermarechal and @tvdijen I showed this thread to some of my colleagues, and I came to realize that I was too hasty in closing the pull request. I'm commenting in the thread to continue the conversation and explore options for alerting users of a possible vulnerable dependency while minimizing unnecessary alerts. There are a few courses of action that could occur, each with pros and cons, and I want to get your input on each of them.

Leave the advisory as is -- this is what I did initially. This helps alert users of simplesamlphp/simplesamlphp that there may be an issue with their package, but the alerts go to users of the Composer package, and we can't target alerts only toward users of the tarball.
Change the advisory to list simplesamlphp/saml2 as the affected product, as @sandermarechal suggested. This is slightly more accurate, but simplesamlphp/saml2 is already listed as affected in GHSA-2x65-fpch-2fcm, so listing simplesamlphp/saml2 in GHSA-j5g2-q29x-cw3h is unnecessary.
Withdraw the global advisory for GHSA-j5g2-q29x-cw3h with a message that the underlying information is accurate, but the alerts on the Composer package are not accurate because the vulnerability primarily affects users of the SimpleSAMLphp tarball. This option doesn't affect the repository advisory (https://github.com/simplesamlphp/simplesamlphp/security/advisories/GHSA-j5g2-q29x-cw3h) at all but withdraws the alerts from the simplesamlphp/simplesamlphp Composer package. Some users might be confused about why the advisory was withdrawn if the underlying issue is valid, but the GitHub Advisory Database issues similar withdrawals for legitimate advisories under other circumstances, e.g. when an advisory is valid but duplicates another advisory.

I'm curious to hear what both of you think of these options and which one is the best for reaching users of SimpleSAMLphp who need to see information about CVE-2024-52596 while minimizing unnecessary alerts.

I never asked for the advisory to be published in the GitHub Advisory Database or for Dependabot-alerts to be sent in the first place.. It's out of my control.
So option 3: It would be helpful if this behaviour was configurable when creating a repository advisory.
This way I can inform my tarball-users and I don't have to bother anyone with unnecessary alerts.

@shelbyc @tvdijen Another option may be to use a different "ecosystem" tag. Right now the ecosystem is listed as "Composer", which is why composer, packagist and roave/security-advisors picked this up automatically. I tried suggesting a different ecosustem using the github suggestion UI, but "ecosystem" is a required select box, and "Composer" is the only option that comes even close. Maybe ecosystem should not be a required field? Or maybe "tarball" or "download" or "Github release" should be an ecosystem?

General consensus: we need more flexibility on different levels

GHSA-j5g2-q29x-cw3h has been withdrawn with a message that, although the underlying information is valid, those who are affected are users of the tarball, not users of the Composer package.
@sandermarechal I'm not sure if Another option may be to use a different "ecosystem" tag. was directed to me, but for the global GitHub Advisory Database we limit our scope to our supported ecosystems. Using a different ecosystem tag is a good approach for repository advisories, and we see examples of this in repository advisories that can't be published to the global database.
Also, do you still want credit on the global advisory? If so, I can get help from colleagues to make that happen.
@tvdijen I'm happy to pass along your feedback about wanting greater flexibility in the repository advisory publication process. For now, it is possible to do something similar to what @sandermarechal suggested, and use the Other ecosystem to specify something like Tarball in the repository advisory. Here is an example of a repository advisory that clarifies which parts of the software are affected: https://github.com/argoproj/argo-helm/security/advisories/GHSA-fgrf-2886-4q7m


Feature request: Go to tag references

From clicking on the file, go to each of the occurrences of a tag in the file.

Move cursor to the line of occurrence is still desired.
I use this extension to organize code in a large project. Sometime I'll put two tags in one file, so if the click can bring me to the line, it's gonna be perfect.

I did some research, it looks like we need a custom command rather than "vscode.open", remember the line number during searching for tags and reveal the line in the custom command.
A reference implementation can be found in the TODO tree extension here: https://github.com/Gruntfuggly/todo-tree/blob/master/extension.js#L877

I use this extension to organize code in a large project. Sometime I'll put two tags in one file, so if the click can bring me to the line, it's gonna be perfect.
Dude, that's awesome. I'd be curious to hear about our use case at some point. Maybe we could chat on the phone or do a screen share for 15 minutes whenever you're free.

@oldhu I've been feeling similarly as well. My navigation has been suffering because of this feature not being available. I've just started a new position so I'm putting more energy into that right now, but once things settle I would be more than willing to implement this myself.
If you'd entertain submitting a pr I would also support that. I'll read through some of the examples you posted this weekend and post a high level outline on what would need to be done.

Is this feature still being considered?  Being able to jump to the line with the tag would make this 100% perfect!

I would love to at some point. I've just been busy with work recently. if you have a pull request, I would be more than willing to take a look at it. I think think this would really increase the usability of the extension.

I have a POC that I will submit, it is not production worthy yet as it does not handle YAML headers (I had to rework that section) and it also does not always jump to the line when it is opening a new file.  I find double clicking works but not sure why I need to click twice on the file name.

You can see from the pull request the proposed changes, I am essentially adding the LineNum(X) in the tree right before the filename.  I tried a few different UX's and this one seems to work the best.  A better approach maybe to add the additional processing of a new type of tag - for example "@@" that could simplify the change and only add this functionality of infile tagging/jumping to line.

Awesome! I’ll take a peek at the pr!


Fix issue #257

This commit checks if the body is empty during clojure coercion.
If it's empty, the body is set to nil. Previously, the test assumed
the body would return as an empty string but the expected behavior
per the convo in the issue is that nil should be returned.

Awesome, thanks!


Fix link to WIT groups in space

And remove an obsolete and unused links entry for WIT groups.
Previously the link to list all work item type groups used to be
http:///api/spacetemplates/00000000-0000-0000-0000-000000000002/workitemtypegroups/

Now it is
http:///api/spacetemplates/00000000-0000-0000-0000-000000000002/workitemtypegroups

NOTICE: the missing trailing /.

[test]


custom entry-file

Hi! I'm wanted to use this fantastic tool on a home-made component-library but I have no index.html.
So my proposal is to add a new Option, like --input "path to entry-file",  in order to support custom entry-point.
src git:(master) npx vite-bundle-visualizer
vite v3.1.7 building for production...
✓ 0 modules transformed.
Could not resolve entry module (index.html).
file:///Users/dummy/cat/node_modules/rollup/dist/es/shared/rollup.js:1858
        base = Object.assign(new Error(base.message), base);
                             ^

Error: Could not resolve entry module (index.html).
    at error (file:///Users/dummy/cat/bygr-frontend-tools/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
    at ModuleLoader.loadEntryModule (file:///Users/dummy/cat/node_modules/rollup/dist/es/shared/rollup.js:22369:20)
    at async Promise.all (index 0) {
  code: 'UNRESOLVED_ENTRY'
}

This tool is always trying to call your vite build command with visualizer plugin, maybe you can try redirect to target directory?
Or you can provide a demo project, I would try to figure out.

I have 2 vite config files in the project. It would be nice to able to use an input argument to point to the vite config file.

I have 2 vite config files in the project. It would be nice to able to use an input argument to point to the vite config file.

Released in https://www.npmjs.com/package/vite-bundle-visualizer/v/0.8.0

Hey @KusStar
In my case, vite generates two js files( due to import MyWorker from "../worker?sharedworker";), but the report generated is only for index.js
Do you have a Idea of how can I generate a report for the worker file?
✓ 151 modules transformed.
dist/index.html                              3.91 kB │ gzip:  1.37 kB
dist/assets/logo-2c341a38.png                8.14 kB
dist/assets/apple-touch-icon-8057b775.png    8.35 kB
dist/assets/worker-6b9ccd69.js             381.47 kB
dist/assets/index-99b91fd2.css               2.73 kB │ gzip:  1.08 kB
dist/assets/index-c9b13b5d.js              202.35 kB │ gzip: 65.91 kB
✓ built in 1.67s

Thanks for the great module!

v0.9.0 supports custom entry file with --entry custom-entry

Hey @KusStar
In my case, vite generates two js files( due to import MyWorker from "../worker?sharedworker";), but the report generated is only for index.js
Do you have a Idea of how can I generate a report for the worker file?
✓ 151 modules transformed.
dist/index.html                              3.91 kB │ gzip:  1.37 kB
dist/assets/logo-2c341a38.png                8.14 kB
dist/assets/apple-touch-icon-8057b775.png    8.35 kB
dist/assets/worker-6b9ccd69.js             381.47 kB
dist/assets/index-99b91fd2.css               2.73 kB │ gzip:  1.08 kB
dist/assets/index-c9b13b5d.js              202.35 kB │ gzip: 65.91 kB
✓ built in 1.67s

Thanks for the great module!

You can try to use --entry option to visualize the worker bundle, if won't work, draft a new issue.


[PromptLab] Error when clicking on the menu bar command

Extension
https://www.raycast.com/HelloImSteven/promptlab
Description
When clicking on the menu bar icon, I see this error pop up after a few seconds:

Steps To Reproduce

Click on the menu bar icon and wait a few seconds.

Current Behaviour
Error pops up.
Expected Behaviour
No errors being displayed.

This is a limitation in Raycast, as far as I can tell. It's been reported as a bug in the official slack channel.

What's causing this?

There's a timeout for menu bar commands that happens regardless of whether the menu is actively opened or not, and extension developers have no control over it. It happens with all of the menubar commands I've got set up (Pomodoro, Text Shortcuts, Color Picker).

I don't get the same error when click on the Unread Notifications menu bar command of the GitHub extension.

Hm that one uses a 15 minute interval, while PromptLab (and presumably the others I listed) don't have any update interval. That might be a workaround for now. I'd assume that the error still appears after 15 minutes, but I can't test that right now.

This should be fixed with the latest Raycast update.

Yes, it's fixed. Thanks!


Omnipose error: Omnipose not running

Referencing this PR here as well
There is an error in the logger code that makes python crash here
https://github.com/MouseLand/cellpose/pull/434/files#diff-b58d8d01b3d308c1c513773b6c90ef942d2495462adbfa7b1b78d7aea6d15df1

Hi @carsen-stringer, Just letting you know that this is a rather critical issue as V1.0 basically won't run with Omnipose

sorry this is fixed in the github version and there will be a new release soon


Add gene search parameters

Code looked good while I was resolving merge conflicts when adding in main. Needs testing.

Back to throwing errors: I think you only want one copy of the error in the returned array rather than two. I didn't catch this earlier.

{
  "data": {
    "gene": null
  },
  "errors": [
    {
      "message": "Gene with primaryIdentifier 'cicar.ICC4958.gnm2.ann1.Ca_' not found",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "gene"
      ],
      "extensions": {
        "code": "BAD_USER_INPUT",
        "stacktrace": [
          "GraphQLError: Gene with primaryIdentifier 'cicar.ICC4958.gnm2.ann1.Ca_' not found",
          "    at inputError (file:///home/shokin/graphql-server/dist/utils/input-error.js:4:11)",
          "    at Object.gene (file:///home/shokin/graphql-server/dist/resolvers/intermine/gene.js:8:17)",
          "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
        ]
      }
    },
    {
      "message": "Gene with primaryIdentifier 'cicar.ICC4958.gnm2.ann1.Ca_' not found",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "gene"
      ],
      "extensions": {
        "code": "BAD_USER_INPUT",
        "stacktrace": [
          "GraphQLError: Gene with primaryIdentifier 'cicar.ICC4958.gnm2.ann1.Ca_' not found",
          "    at inputError (file:///home/shokin/graphql-server/dist/utils/input-error.js:4:11)",
          "    at Object.gene (file:///home/shokin/graphql-server/dist/resolvers/intermine/gene.js:8:17)",
          "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
        ]
      }
    }
  ]
}

Otherwise my random testing of queries looks good. Gene linkouts still look good, Location linkouts look good.

Interesting. Apparently this issue is present in main as well so I don't think it's a blocker for this PR. Time to do some code archeology...

Yeah we can mop it up later. I'll approve.

It appears this is an issue with Apollo Explorer. If I make the same request via curl then the result only contains the error once:
curl --request POST \
    --header 'content-type: application/json' \
    --url http://localhost:4000/ \
    --data '{"query":"query Query($identifier: ID!) {\n  gene(identifier: $identifier) {\n    identifier\n    name\n  }\n}","variables":{"identifier":"cicar.ICC4958.gnm2.ann1.Ca_"}}'

{
  "errors":[
    {
      "message":"Gene with primaryIdentifier 'cicar.ICC4958.gnm2.ann1.Ca_' not found",
      "locations":[
        {
          "line":2,
          "column":3
        }
      ],
      "path":[
        "gene"
      ],
      "extensions":{
        "code":"BAD_USER_INPUT",
        "stacktrace":[
          "GraphQLError: Gene with primaryIdentifier 'cicar.ICC4958.gnm2.ann1.Ca_' not found",
          "    at inputError (file:///home/alan/Projects/ncgr/lis-legfed/legumeinfo/graphql/graphql-server/dist/utils/input-error.js:4:11)",
          "    at Object.gene (file:///home/alan/Projects/ncgr/lis-legfed/legumeinfo/graphql/graphql-server/dist/resolvers/intermine/gene.js:8:17)",
          "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
        ]
      }
    }
  ],
  "data":{
    "gene":null
  }
}

Using the network monitor in my web  browser, I see that Apollo Explorer makes this same request. If I load the request in its own window, the result only contains 1 error. So something in Apollo Explorer is causing it to show the error twice, i.e. there's nothing wrong on the server side!

Weird! Very weird! I suppose we should report it to Apollo but then we'd have to make a simple test case to show it which sounds like actual work. :) Nice work sussing that out!


Add Updating RNW App to New RNW Version Instructions

Do we have a page/section devoted to updating RNW apps on the website? If not, I think this would be a good addition. If we do and I missed it, is there a change we could make to have this section be more visible?
I also just investigated the rn-upgrade-helper tool which now has support for Windows. Including information about this tool could also be helpful in that section.

There's something on the core repo's docs: https://reactnative.dev/docs/upgrading
And the samples have some guidance: https://github.com/microsoft/react-native-windows-samples/blob/main/samples/README.md#upgrade-procedure
(but that's not discoverable for people working on their own apps)
If we have guidance different from core (and I think we do?), we definitely should cover that in the website.

We've been including a blurb in the version release notes. That's a good place to start.

@jonthysell assigning this one your way since you're head is already in this space. Looking to create a landing page on the website for people asking questions about upgrading.


is there a way to  excluding  CSS variable when transfrom px to rem？

Hi! You can use PX instead of px

// px is converted to rem
.convert {
font-size: 16px; // converted to 1rem
}
// Px or PX is ignored by postcss-pxtorem but still accepted by browsers
.ignore {
border: 1Px solid; // ignored
border-width: 2PX; // ignored
}
Is there any possible to support this, not auto change unit but transform the value?? just like the old plugin i used px2rem-postcss
.ignore {
border: 1px solid; /px/
border-width: 2px;  /px/
}
Thanks


linux-firmware - rt8129 - error -ENODEV: unknown chip XID 688, contact r8169 maintainers (see MAINTAINERS file)

Describe the bug
The module is loaded, but It is not supported.
Steps To Reproduce
Steps to reproduce the behavior:

Boot the system
You don't have Network Interface Controller

Expected behavior
Should work...
Notify maintainers
@jmbaur
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
nix-shell -p nix-info --run "nix-info -m"
install: cannot remove '/tmp/env-vars': Operation not permitted
 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.4, NixOS, 24.05 (Uakari), 24.05.5860.89172919243d`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - channels(root): `"nixos-24.05, nixos-unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

PCI Output
06:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 0c)
	DeviceName: Realtek RTL8125D LAN
	Subsystem: ASUSTeK Computer Inc. Device [1043:88e1]
	Kernel modules: r8169

The kernel + linux-firmware + Nvidia drivers are installed from nixos-unstable. The rest of the entire system is in 24.05.

Add a :+1

It looks like the RTL8125D isn't supported by the kernel yet<EMAIL_ADDRESS>

For an update on this, the fix is in the latest RC for 6.13.  Nixos-24.11 has 6.6, so the fix will probably be in nixos-25.05.
In case somebody else finds this, a workaround is to use a 10€ USB ethernet dongle (I only realized this an hour into attempting to backport the patch to 6.6).

For an update on this, the fix is in the latest RC for 6.13. Nixos-24.11 has 6.6, so the fix will probably be in nixos-25.05.
In case somebody else finds this, a workaround is to use a 10€ USB ethernet dongle (I only realized this an hour into attempting to backport the patch to 6.6).

You can apply a workaround using the unstable kernel, I don't have the equipment right now, but when I got it, I will test it.

Well, I suspect I personally can't use the unstable kernel because I need both zfs and nvidia to work on this machine, and those two things seem to be regularly broken with newish kernels.  But in principle, yes, unstable kernel would do the trick.

I don't know if ZFS it works, but I'm using an NVIDIA unstable kernel module driver, It works very well.

Bad news.
uname -a
Linux tank0 6.12.5 #1-NixOS SMP PREEMPT_DYNAMIC Sat Dec 14 19:04:17 UTC 2024 x86_64 GNU/Linux
udo dmesg |grep XID
[   10.807821] r8169 0000:06:00.0: error -ENODEV: unknown chip XID 688, contact r8169 maintainers (see MAINTAINERS file)

Right, but that's 6.12.  The fix is only in the rcs for 6.13.


Add require 'time' to remote_config.rb

Summary
It seems better to call require 'time' before using rfc2822 because it is one of the additional methods of the Time extended by time.rb.
Bug
When I used .rubocop.yml inferiting a remote configration file, the following error occured:
$ ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]

$ rubocop -V
0.37.0 (using Parser <IP_ADDRESS>, running on ruby 2.2.4 x86_64-darwin15)

$ rubocop
undefined method `rfc2822' for 2016-03-02 19:36:38 +0900:Time
/Users/necojackarc/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rubocop-0.37.0/lib/rubocop/remote_config.rb:23:in `file'
/Users/necojackarc/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rubocop-0.37.0/lib/rubocop/config_loader.rb:69:in `block in base_configs'
/Users/necojackarc/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rubocop-0.37.0/lib/rubocop/config_loader.rb:67:in `map'
/Users/necojackarc/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rubocop-0.37.0/lib/rubocop/config_loader.rb:67:in `base_configs'
/Users/necojackarc/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rubocop-0.37.0/lib/rubocop/config_loader.rb:172:in `resolve_inheritance'
/Users/necojackarc/.rbenv/versions/2.2.4/lib/ruby/gems/2.2

According to a document, we need require 'time' before calling the Time#rfc2822, but there is no require 'time' as far as I can see.

time.rb

When ‘time’ is required, Time is extended with additional methods for parsing and converting Times.

Features

This library extends the Time class with the following conversions between date strings and Time objects:

date-time defined by RFC 2822
HTTP-date defined by RFC 2616
dateTime defined by XML Schema Part 2: Datatypes (ISO 8601)
various formats handled by Date._parse
custom formats handled by Date._strptime

Class: Time (Ruby 2_2_3)

Issue
However, there is something weird; specs cover the related lines correctly.
So, I checked whether time was already required or not:
From: /Users/necojackarc/work/rubocop/spec/rubocop/remote_config_spec.rb @ line 42 :

    37:       assert_not_requested :get, remote_config_url
    38:     end
    39:
    40:     it 'downloads the file if cache lifetime has been reached' do
    41:       require 'pry'
 => 42:       binding.pry
    43:       FileUtils.touch cached_file_path, mtime: Time.now - ((60 * 60) * 30)
    44:
    45:       expect(subject).to eq(cached_file_path)
    46:       assert_requested :get, remote_config_url
    47:     end

[1] pry(#<RSpec::ExampleGroups::RuboCopRemoteConfig::File>)> require "time"
=> false

It's already required, so I happen to think some stuff requires it without our realizing.
We might need to identify the cause of this weird thing before merging this PR.

We might need to identify the cause of this weird thing before merging this PR.

It could be one of the gems which we rely on. Personally, I'm not interesting in tracking down exactly where it is coming from. Any library we rely on could easily require any file from stdlib.

Yeah, no need to fret over this too much.

Thank you for merging my PR!
I must have been too anxious.
As you said, it doesn’t matter :smile:


Linear Rate test

Test for the LinearRate controller

Due to refactoring of caliper-core structure, I'll be closing this PR and opening a separate one to accommodate caliper-core changes


Fixed C++ errors due to PLCrashReporter

@RobertWalsh @jeremyanticouni Let's wait for build to finish before accepting PR. Or at least confirm that it's build environment issue not the code.
We have not updated PLCrashreporter in long time. Has any of us looked into if there has been changes that we need to get?


[IRGen] Pack extra data pattern structs.

Previously, the extra data pattern structs for struct and enums were not packed.
On 32 bit, this resulted in an extra data pattern struct which was 4 bytes too large whenever there was an odd number of fields in the struct.  The result was writing past the end of the allocated struct.  That bug only caused occasional crashes because (1) for the most part there was additional space beyond the end of the allocation intended for the struct metadata in the bump allocator and (2) while half of the trailing flags field would be overwritten, because those bits of the trailing flags being nonzero did not have an observable effect since those bits of the trailing flags field are not yet used.
Here, the structs are marked packed, resulting in the appropriate size for the extra data pattern structs on 32 bit platforms.
rdar://problem/68997282

@swift-ci please test

@swift-ci please test asan

@swift-ci please clean test windows platform

@swift-ci please asan test

Build failed
Swift Test OS X Platform
Git Sha - ea93c3d1b97edaf28a73600c9e7211b08e3fdb02

@swift-ci please test

@swift-ci please asan test

Build failed
Swift Test OS X Platform
Git Sha - 264dcf297a976f21c5616431633e25b34c39711e

@swift-ci please test

@swift-ci please asan test

@swift-ci please asan test

Build failed
Swift Test Linux Platform
Git Sha - a39d91672819a405f9189090c11bdcdfedd723c4

Build failed
Swift Test OS X Platform
Git Sha - a39d91672819a405f9189090c11bdcdfedd723c4

@swift-ci please test

@swift-ci please test

@swift-ci please asan test

Build failed
Swift Test OS X Platform
Git Sha - 3b13850d88e700f1e33dde1c6a6a4e954e72ca98

Build failed
Swift Test Linux Platform
Git Sha - 3b13850d88e700f1e33dde1c6a6a4e954e72ca98

@swift-ci please test


rename enablePullModel to createBlankClusterSecrets

[x] I have taken backward compatibility into consideration.

This PR is for syncing the change that was made here: https://github.com/stolostron/multicloud-integrations/commit/3955192214349476129814b0b3552a018200fca2#diff-5ed0ce67df310078a6a20eff17f2f91b00ecce4da99c01a86211014521b3379d

/hold - wait for 2.8.1


UnauthorizedAccessException on Linux PassiveMode

As discussed on dotnet/corefx#42621 I was trying out attaching to a Linux process to dump a stack trace (as the in-proc methods from Desktop Framework are not available), but I'm having issues with security
Unhandled Exception: System.UnauthorizedAccessException: Access to the path '/proc/24461/mem' is denied. ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at Microsoft.Diagnostics.Runtime.Linux.LinuxLiveDataReader.OpenMemFile()
   at Microsoft.Diagnostics.Runtime.Linux.LinuxLiveDataReader.ReadMemory(UInt64 address, IntPtr buffer, Int32 bytesRequested, Int32& bytesRead)
   at Microsoft.Diagnostics.Runtime.DacInterface.DacDataTargetWrapper.ReadVirtual(IntPtr self, UInt64 address, IntPtr buffer, Int32 bytesRequested, Int32& bytesRead)
   at Microsoft.Diagnostics.Runtime.DacLibrary..ctor(DataTarget dataTarget, String dacDll)
   at Microsoft.Diagnostics.Runtime.DataTarget.ConstructRuntime(ClrInfo clrInfo, String dac)
   at Program.Main(String[] args) in /home/xxx/private/build/guard/Program.cs:line 23

OS is Ubuntu 18.04.3 LTS 64 bit and I'm running both the process that is attaching and the one that is attached under the same user (but different shells). I'm not a Linux expert and searching for those dotnet-centric errors is not leading to any results of what to do to get proc/mem access to my own processes.
I'm aware that I'll probably have to give up on PassiveMode and do dumps to avoid torn stack traces, but considering there is no issue explaining how to resolve this security problem I thought I'd create one to document how to get PassiveMode working in case other people run into it.
/cc @leculver

I wonder if calling process_vm_readv like PR https://github.com/microsoft/clrmd/pull/304 does would have different (more relaxed) security implications.  I'm not sure if I'll be able to tackle it this week, but I'd like to investigate if this is something we should be doing differently here.

The permission required by process_vm_readv is exactly the same as that required to perform a ptrace or read from /proc/[pid]/mem. UnauthorizedAccessException should be a reasonable exception and we just need to document it.

Any idea why I do not have that permission against my own processes and/or how to grant that permission as a non-root user? Do you have any idea/keywords to search for? I've tried but didn't come up with something useable.
Note that I'm migrating an application previously using the StackTrace(Thread) constructor for logging unresponsive threads and was told to try this library instead. If this isn't a scenario that can be enabled with standard user rights I'll have to go back to CoreFX/CoreCLR and ask for looking into an alternative approach.

Do you have any idea/keywords to search for?

Yes, the CAP_SYS_PTRACE capability.

The best workaround I can think of is to create a dump file with dotnet-dump and inspect it. You'll be able to create dumps programmatically if dotnet-dump is to be published as Nuget packages. dotnet/diagnostics#343

The best workaround I can think of is to create a dump file with dotnet-dump and inspect it. You'll be able to create dumps programmatically if the dumper is to be published as Nuget packages. dotnet/diagnostics#343

The best workaround I can think of is to create a dump file with dotnet-dump and inspect it. You'll be able to create dumps programmatically if the dumper is published as Nuget packages. dotnet/diagnostics#343

Yes that is an option I came across yesterday as well, it works for my usecase and I'll probably be using this for now. But if dotnet-dump can use proc/pid/mem to read (which it is doing according to the docs, see implementation details) I should be able to get it working for clrmd ... unless dotnet-dump only works when coreclr is installed machine-wide because it needs to configure file system capabilities on the dump tool?
What I've tried by now is

do not run my test code from two distinct shells, let the test code start a secondary copy of itself instead (using Process.Start)
I did see coreclr calling prctl(PR_SET_PTRACER, childpid, 0, 0, 0) for creating dumps and tried to add a P/Invoke to do the same

Still running into the UnauthorizedAccessException. Its not high priority to resolve since for now I'll go with making a dump and then have clrmd take the stack trace from there, but it'd be nice for the future if this could be figured out and documented how you have to setup your tooling to resolve this.

The second parameter of the prctl signature in your test code is incorrect. The declaration should be
static extern int prctl(int option, UIntPtr arg2, UIntPtr arg3, UIntPtr arg4, UIntPtr arg5);

and the call should be
prctl(PR_SET_PTRACER, (UIntPtr)p.Id, UIntPtr.Zero, UIntPtr.Zero, UIntPtr.Zero)

After the fix it runs well on WSL.
Yes this is a solution worth documenting if the user has full control over the process being inspected (as in your scenario).

Awesome, yes this works and avoids the exception. Thanks a lot for taking time looking into the problem. I should have known better than copy/pasting a P/Invoke call without double checking what they were doing with it, in hindsight its obvious that I was passing a pointer to an integer while coreclr was passing an integer.
Adding PR to document it so the issue can be closed, I'm sure it can be formulated better so feel free to reformulate and discard the PR if you want to.

Thanks @NextTurn!


Use urlopen instead of urlretrieve

urlretrieve of urllib does not respect corporate proxy settings for some reason. urllib2 in python 2.7 works as intended. This PR changes urlretrieve to urlopen and saves the file manually.

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[ ] The PR has modified HISTORY.rst with an appropriate description of the change (see Modifying change log).

Command Guidelines

[ ] Each command and parameter has a meaningful description.
[ ] Each new command has a test.

(see Authoring Command Modules)

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Codecov Report

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

@@           Coverage Diff           @@
##           master    #3161   +/-   ##
=======================================
  Coverage   70.97%   70.97%
=======================================
  Files         362      362
  Lines       23910    23910
  Branches     3652     3652
=======================================
  Hits        16970    16970
  Misses       5856     5856
  Partials     1084     1084

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 b80a9d5...8aa7501. Read the comment docs.

Ping @derekbekoe

I will verify this change with a few scenarios before merging in.

@kaskavalci On Python 3.5.2, I got this error message:
# python install.py
-- Verifying Python version.
-- Python version 3.5.2 okay.
-- Verifying native dependencies.
-- Executing: 'dpkg -s libssl-dev libffi-dev python3-dev build-essential'
-- One or more of the following native dependencies are not currently installed and may be required.
"apt-get update && apt-get install -y libssl-dev libffi-dev python3-dev build-essential"

===> Missing native dependencies. Attempt to continue anyway? (y/N): y

===> In what directory would you like to place the install? (leave blank to use '/root/lib/azure-cli'):
-- Creating directory '/root/lib/azure-cli'.
-- We will install at '/root/lib/azure-cli'.

===> In what directory would you like to place the 'az' executable? (leave blank to use '/root/bin'):
-- Creating directory '/root/bin'.
-- The executable will be in '/root/bin'.
-- Downloading virtualenv package from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.0.0.tar.gz.
Traceback (most recent call last):
  File "i.py", line 370, in <module>
    main()
  File "i.py", line 355, in main
    create_virtualenv(tmp_dir, install_dir)
  File "i.py", line 122, in create_virtualenv
    with open(download_location, 'w') as f: f.write(response.read())
TypeError: write() argument must be str, not bytes
root@7efcebc9f836:/#

Also, the file named install in the same directory should have INSTALL_SCRIPT_SHA256 updated whenever install.py is updated (shasum -a 256 install.py will get you the hash).

@kaskavalci If this helps, these are the steps to repro in as few lines as possible.
It fails on Python 3.5.2.
import tempfile
try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen

VIRTUALENV_DOWNLOAD_URL = 'https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.0.0.tar.gz'
response = urlopen(VIRTUALENV_DOWNLOAD_URL)
_, download_location = tempfile.mkstemp()
with open(download_location, 'w') as f: f.write(response.read())

Hi @derekbekoe thanks for comments. I made the necessary changes.

ping @derekbekoe

Ping @derekbekoe

I will take a look at testing this on different OSs and platforms later today.
The PR looks good but I want to make sure it doesn't inadvertently break on one of our supported platforms before merging.

Thanks for the PR @kaskavalci!
I verified the change on macOS, Ubuntu 14.04/16.04, Debian 7/8, CentOS 7.1/7.2, RedHat 7.2, OpenSUSE 13.2, Bash on Windows.
The install script will be updated in the next release (mid next week).


[SUGGESTION] Fabric seasons compat

Shouldn't be that hard to do, either.

To add on to this I've noticed that fabric seasons actually works just fine with the mod, although corn kernels specifically don't seem to have fabric seasons functionality for some reason.


webui /folder/add api

/folder/add allows adding same folder repeatedly

It should be fixed on contract level not api

Brm did you test that? It looks like you just moved the if statement around and try catched the whole thing instead of only part.

tested


[CERT-TEST-FAILURE] Test_TC_OO_2_3 failure (websockets.exceptions.ConnectionClosedError)

Feature Area
Other
Test Case
TC_OO_2_3
Reproduction steps
Running the Test_TC_OO_2_3 on Telink LightingApp (Thread-commissioned) with
scripts/tests/yaml/chiptool.py tests Test_TC_OO_2_3 --nodeId $LIGHTING_NODE_ID

The step 131 interrupts with an error, dropping websocket connection:
websockets.exceptions.ConnectionClosedError: no close frame received or sent
By default on the previous step 130 the wait interval is set to 40sec. I've tried decreasing timeout 40->20sec and it finished like normally would. Also tried doing that in differrent setup and Thread network, identical behavior.
Logs are in attached file.
Also tried playing with _KEEP_ALIVE_TIMEOUT_IN_SECONDS value in scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py , didn't help much
Could you confirm the issue must be on my side or is it a common and known thing to other platforms as well?
Test_TC_OO_2_3.log
Bug prevalence
Each time I do this
GitHub hash of the SDK that was being used
433e6769389c5e127e8d88418d1dae3150e39534
Platform
python, other
Anything else?
No response

@woody-apple @bzbarsky-apple
Figured out that variables secs_since_valid_ping and secs_since_valid_hangup in connectedhomeip/third_party/libwebsockets/repo/lib/core/context.c changed the behavior, test passed.
I've tried following values:
	context->default_retry.secs_since_valid_ping = 360;
	context->default_retry.secs_since_valid_hangup = 370;
Just after ~300sec after test starts chip-tool doubles "LWS_CALLBACK_SERVER_WRITEABLE" log print and almost immediately closes connection and LWS_CALLBACK_WSI_DESTROY appears, and it's gone.
With the above changes I don't see "SERVER_WRITEABLE" twice and it works as in previous test steps.
I've met differrent values (ex. 400 for both) for these two in some other libwebsocket implementations but I believe there must be a proper way to fix that in Matter apart from my "hotfix" in third_party lib as submodule...
I would be happy for any advice on that, thanks in advance!

@interfer Thank you for finding that!
It looks like the default values are 300 and 310s respectively.  The question is why there is no response to the ping, right?
But if we want to configure this in our code and we think the timeout is on the server side we can try to do that in examples/common/websocket-server/WebSocketServer.cpp where it sets up the lws_context_creation_info.  In particular, we should be able to point its retry_and_idle_policy member to a lws_retry_bo_t that has the values we want, and see if that helps.
The problem is that we can't just set non-default values for the ping/hangup bits.  We have to also set retry_ms_table, conceal_count, and jitter_percent.  I guess we can copy those values from the defaults in third_party/libwebsockets/repo/lib/core/context.c, but seems pretty clunky.  :(
And fundamentally: this setup sounds like it sends a ping and only times out if the ping is unanswered.  Why is the ping unanswered?

@bzbarsky-apple Thanks for the response!
Not sure if it's 100% relevant but compared the Linux lighting-app (paired onnetwork) output in that scenario:
[1700044624.881205][98253:98253] CHIP:TOO: LWS_CALLBACK_SERVER_WRITEABLE
[1700044624.882424][98253:98253] CHIP:TOO: LWS_CALLBACK_WS_PEER_INITIATED_CLOSE
[1700044624.882494][98253:98253] CHIP:TOO: LWS_CALLBACK_CLOSED
[1700044624.882534][98253:98253] CHIP:TOO: LWS_CALLBACK_WSI_DESTROY

And normally (like when I decreased for ex. 40->20s  wait interval in test-step) Telink app would also work just like that.
But when it fails chip-tool would show this:
...* 130-th step of "Waiting for 40000ms" *
 [1699651222.917848][33047:33047] CHIP:TOO: LWS_CALLBACK_SERVER_WRITEABLE
 [1699651232.582908][33047:33047] CHIP:TOO: LWS_CALLBACK_SERVER_WRITEABLE
 [1699651242.582904][33047:33047] CHIP:TOO: LWS_CALLBACK_CLOSED
 [1699651242.582926][33047:33047] CHIP:TOO: LWS_CALLBACK_WSI_DESTROY

After 1st "LWS_CALLBACK_SERVER_WRITEABLE" in a few sec appears the duplicated and I assume the connection with initial one is lost and ping left unanswered therefore. And there's no message LWS_CALLBACK_WS_PEER_INITIATED_CLOSE also...
I added debug logs for WS to scripts/tests/yaml/chiptool.py and the client tells that connection is closed (if I get it the right way) :
130. Running Wait 40000ms130. Running Wait 40000ms
[PostProcessCheckType.IM_STATUS check] The test expects no error and no error occurred.

***** Test Step 131 : 24c:Reads OnOff attribute from DUT 131. Running 24c:Reads OnOff attribute from DUT> TEXT 'json:{ "cluster": "onoff", "command": "read", "..._specifier": "on-off" }' [166 bytes]
DEBUG:websockets.client:> TEXT 'json:{ "cluster": "onoff", "command": "read", "..._specifier": "on-off" }' [166 bytes]
< PING '' [0 bytes]
DEBUG:websockets.client:< PING '' [0 bytes]
> PONG '' [0 bytes]DEBUG:websockets.client:> PONG '' [0 bytes]
% sending keepalive ping
DEBUG:websockets.client:% sending keepalive ping
> PING 69 5e 35 c7 [binary, 4 bytes]
DEBUG:websockets.client:> PING 69 5e 35 c7 [binary, 4 bytes]
= connection is CLOSED
DEBUG:websockets.client:= connection is CLOSED! failing connection with code 1006
DEBUG:websockets.client:! failing connection with code 1006
! failing connection with code 1006
DEBUG:websockets.client:! failing connection with code 1006
! failing connection with code 1006
DEBUG:websockets.client:! failing connection with code 1006

That's why I guess it's the server side and would like to hear the advice on how to make more functional fix here and less clumsy. Please, correct me if I go in the wrong direction :)
Should I try to implement the suggested above changes to examples/common/websocket-server/WebSocketServer.cpp with lws_context_creation_info ?

If you can test those, that would be great, yes.  That should change the server behavior.

@bzbarsky-apple Could You please take a look at my suggested changes in PR?
I didn't change retry_ms_table, conceal_count, and jitter_percent as they are set by default in lib's context.c and app works fine now. Tested with chip-tool on Telink Lighting-app Thread commissioned.
Used this issue as a reference, some things became clear to me from there, may be useful to others next time.

as they are set by default in lib's context.c

@interfer Where does that happen?  It looked to me like the values from your provided struct would be used, and if you're not initializing them chances are you get either garbage or 0 values, no?

@bzbarsky-apple I replied in PR comment, they will be initialized from default_table


Adapt swap_ranges to C++ 20

Adapted swap_ranges to C++ 20 and added container overloads. (range and sentinel). Added container tests.
Any background context you want to provide?
Issue #4822
Issue #3646
Issue #1668

Can one of the admins verify this patch?

add to whitelist

retest cscs


added sending video photos and documents

(https://drive.google.com/file/d/1Bk7gm0By7g-mCjCxsIkAovgeYJjxxiIl/view?usp=sharing)
see this link if you have any doubts

people can check this now


GH-20109 : Fix sass Slash as Division deprecated

Summary
Fix sass deprecated warning when running make run.
Run:
$ npm install -g sass-migrator
$ sass-migrator division **/*.scss

Ticket Link
Fix https://github.com/mattermost/mattermost-server/issues/20109
Release Note
NONE

Hello @jbattistispiria,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@jgilliam17 please just do a smoke test keeping in mind the font sizes in some places around the app.

Thanks for that fix! I didn't realize it would be that easy to fix that warning since I assumed it was caused by some ancient dependency that I was afraid to update 😛

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

/update-branch

/update-branch

Thanks @jbattistispiria
Tested, looks good to merge.
-Verified font size in the app - no issues

E2E report, no PR related failures.


Wrong target to scan

Describe the bug
Input one target ip, but scaned so many...
CLI Arguments
# Paste Here
![image](https://user-images.githubusercontent.com/12765050/89617199-58978e00-d8bc-11ea-8843-2096d653b56c.png)

Example Target IP
zmap <IP_ADDRESS> -p 10001 --probe-module=udp -b ./wblist

Environment:

OS: [CentOS7]

# uname -a
# Linux www 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
# zmap --version
# zmap 2.1.1

Hope help.

You should place IP address you want to scan at the end not as the first argument.


How to calculate response length?

Question
Hello,
I'm currently trying to implement a HEAD endpoint, using the Swift OpenAPI generator & runtime. I'm using the following snippet, but I'm aware that it's far from ideal:
package func head(
    _ input: Operations.head.Input
) async throws -> Operations.head.Output {
    let result = MyCodableJSONObject()

    /// NOTE1: is there an other way to calculate this?
    var headerFields = HTTPFields()
    let res =
        try OpenAPIRuntime.Converter(
            configuration: .init()
        )
        .setResponseBodyAsJSON(
            result,
            headerFields: &headerFields,
            contentType: ""
        )

    var length: Int64 = 0
    switch res.length {
    case .known(let value):
        length = value
    case .unknown:
        break
    }
    /// NOTE2: int64 -> int conversion is not good...
    return .ok(.init(headers: .init(Content_hyphen_Length: Int(length))))
}

Is there a better way to calculate the Content-Length header for HEAD requests? 🤔
Many thanks.
Tib

Hi @tib,
Converter, setResponseBodyAsJSON, are SPIs that you shouldn't be calling directly. They're there only for the generated code to call.
Can you describe what you're trying to do first, and we can help you achieve it without using SPIs, which are not guaranteed to be stable?

I'm simply trying to implement a HEAD response and return the Content-Length.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD
I'm using a JSON response for the GET query (MyCodableJSONObject) and I'm trying to calculate the lenght of that response, so I can use the number in my HEAD handler.
I was not able to find a corresponding calculate method that I could use for this purpose.
I'm looking for a solution something like this (maybe a bit more generic, since this only works with JSON responses):
import HTTPTypes
@_spi(Generated) import OpenAPIRuntime

extension APIGateway {

    func calculateContentLength<T: Encodable>(_ value: T) throws -> Int64 {
        var headerFields = HTTPFields()
        let res =
            try OpenAPIRuntime.Converter(
                configuration: .init()
            )
            .setResponseBodyAsJSON(
                value,
                headerFields: &headerFields,
                contentType: ""
            )

        switch res.length {
        case .known(let value):
            return value
        case .unknown:
            return 0
        }
    }
}

Could you share the OpenAPI definition for the operation you're implementing?
From the top of my head, a ServerMiddleware that throws away response bodies should do the trick, and in it you can verify that the content-length is present (it should be there already: https://github.com/apple/swift-openapi-runtime/blob/76951d77a0609599d2dc233e7e40808a74767c6a/Sources/OpenAPIRuntime/Conversion/CurrencyExtensions.swift#L604).
That said, HEAD request support might be something we need to add first class support for. Would that help you here?

Hi @tib, are you still interested in this? I think we should consider adding first class support for HEAD requests.

Yes, this is still an issue for us. 👍

@tib Can you share the OpenAPI doc (or at least the snippet) that includes the operation you'd like to implement HEAD for? Just to make sure we focus on the right example.

openapi: 3.1.0
info:
  title: Example API
  description: 'Example'
  contact:
    name: Binary Birds
    url: https://binarybirds.com
    email<EMAIL_ADDRESS>  version: 1.0.0
tags:
- name: Example
  description: ''
servers:
- url: http://localhost:8080
  description: dev
paths:
  /example:
    head:
      tags:
      - Example
      summary: Example head
      description: Example head request
      operationId: headOperation
      responses:
        200:
          $ref: '#/components/responses/ExampleResponse'

components:
  schemas:
    ExampleContentLength:
      type: integer
      description: Content length

  responses:
    ExampleResponse:
      description: Ok
      headers:
        Content-Length:
          $ref: '#/components/headers/Content-Length'
  headers:
    Content-Length:
      schema:
        $ref: '#/components/schemas/ExampleContentLength'
      description: Content length header

Interesting, so what's the reason to include $ref: '#/components/responses/ExampleResponse' in the 200 response, if it'll never get returned, because it's a HEAD request? Should it be a GET instead, and the ask here would be that all GET requests also support HEAD requests? (Maybe that should be done by the concrete transport, not sure.)

@adam-fowler @joannis @0xTim What's the current handling of HEAD requests in Vapor and Hummingbird? Is this something that should be handled by the transport?

You can add a flag to the Hummingbird router to auto generate head endpoints (It'll run endpoint but don't return body).

Great - if Vapor has something similar, then I'd prefer to leave this to the transports to handle.