Default reporter gets corrupted with 2>/dev/null

STR
Example: repo https://github.com/vladikoff/issue-tap-reporter-bad-formatting
clone, npm install and run ./run.sh
Expected (run node_modules/.bin/tap example-test.js)
node_modules/.bin/tap example-test.js
example-test.js ....................................... 4/4
total ................................................. 4/4

  4 passing (389.584ms)

  ok

Actual (run ./run.sh)
➜  tap-rep git:(master) ./run.sh
example-test.js ....example-test.js ....................................... 4/4
total ................................................. 4/4

  4 passing (399.759ms)

  ok

^ the test name above is repeated

Good catch!  It was deciding to do fancy stdout stuff based on stdout being a tty, but then would only do the beginningOfLine ansi code if both stdout and stderr were tty's.  Should be fixed now.

Thank you!


added css effects issue #308 resolved

Hey there i have updated the source code for the awesome effects i created
please merge this to repo
this is yash
participant at GSSOC'22
#308 and #306 resolved

Done @arpit456jain @VidhiBhatt01


panic: runtime error: invalid memory address or nil pointer dereference

The code that I am writing is this:
What I am trying to do is to get a list of dialogs. But sometime panic error happens due to some network error.
package main

import (
	"github.com/cjongseok/mtproto"
	"context"
	"os"
	"fmt"
	"github.com/cjongseok/slog"
	"math/rand"
	"reflect"
)

func main() {
	// the acc we are using is: (telegram acc new three)
	caller := setUpLoggingNConnectNGetCaller()
	getDialogs(caller)                                                        // === line 16 ===
}

func getDialogs(caller *mtproto.RPCaller) *mtproto.PredMessagesDialogs {
	emptyPeer := &mtproto.TypeInputPeer{Value: &mtproto.TypeInputPeer_InputPeerEmpty{InputPeerEmpty: &mtproto.PredInputPeerEmpty{}}}
	var response *mtproto.TypeMessagesDialogs
	r, err := caller.MessagesGetDialogs(context.Background(), &mtproto.ReqMessagesGetDialogs{       //  === line 22 ===
		OffsetDate: 0, OffsetId: 0, OffsetPeer: emptyPeer,
	})
	if err != nil {
		fmt.Println("Can not get dialogs due to error:", err)
	}
	response = r

	dialogs := response.GetMessagesDialogs().GetDialogs()
	for _, item := range dialogs {
		fmt.Println(reflect.TypeOf(item.GetValue()))
		fmt.Println()
	}

	return response.GetMessagesDialogs()
}

func setUpLoggingNConnectNGetCaller() *mtproto.RPCaller {
	// set up logging
	logf, err := os.OpenFile("ss.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
	if err != nil {
		fmt.Printf("error opening file: %v", err)
	}
	defer logf.Close()
	slog.SetLogOutput(logf)

	appVersion := "0.1"
	deviceModel := "SHIT"
	systemVersion := "0.2"
	language := "en"
	config, _ := mtproto.NewConfiguration(appVersion, deviceModel, systemVersion, language, 0, 0, "credentials.json")
	manager, _ := mtproto.NewManager(config)

	// Sign-in by key
	mconn, _ := manager.LoadAuthentication()
	caller := mtproto.RPCaller{RPC: mconn}
	return &caller
}

The error that happens is this:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7a61be]

goroutine 1 [running]:
kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto.(*Conn).LogPrefix(0x0, 0xc49d80, 0x0)
        /home/kasra/go/src/kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto/conn.go:363 +0x2e
kasra/doingstuff_on_tg/vendor/github.com/cjongseok/slog.logprefix(0xc49d80, 0x0, 0x0, 0x12bc180)
        /home/kasra/go/src/kasra/doingstuff_on_tg/vendor/github.com/cjongseok/slog/slog.go:128 +0x29a
kasra/doingstuff_on_tg/vendor/github.com/cjongseok/slog.Logln(0xc49d80, 0x0, 0xc420093860, 0x2, 0x2)
        /home/kasra/go/src/kasra/doingstuff_on_tg/vendor/github.com/cjongseok/slog/slog.go:165 +0x6d
kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto.(*Conn).Session(0x0, 0x1)
        /home/kasra/go/src/kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto/conn.go:151 +0xdc
kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto.(*Conn).InvokeNonBlocked(0x0, 0xd09ac0, 0xc420250580, 0xc420093d70)
        /home/kasra/go/src/kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto/conn.go:130 +0x90
kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto.(*Conn).InvokeBlocked(0x0, 0xd09ac0, 0xc420250580, 0x7f1b32e68d90, 0x0, 0x2, 0xdf8475800)
        /home/kasra/go/src/kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto/conn.go:114 +0x5d
kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto.RPCaller.MessagesGetDialogs(0xd04060, 0x0, 0xd25760, 0xc4200d4050, 0xc420250580, 0xc88ace, 0x2, 0xdf8475800)
        /home/kasra/go/src/kasra/doingstuff_on_tg/vendor/github.com/cjongseok/mtproto/procs.tl.go:424 +0x57
main.getDialogs(0xc4202482f0, 0xc4200b8058)
        /home/kasra/go/src/kasra/doingstuff_on_tg/_accounts_/main.go:22 +0x127
main.main()
        /home/kasra/go/src/kasra/doingstuff_on_tg/_accounts_/main.go:16 +0x27
exit status 2

How can I handle this kind of error?  (I have put comment after line 22 and 16 of my code to make it clear)
As you can see I have received the error in err variable and checked it but I still get this panic.
Not to mention that I dont ALWAYS get this panic, It just happens sometimes due to network errors, How can I handle this one?

@amir3code Thanks for your interest in this repository. It seems sometimes manager.LoadAuthentication() returns nil conn. Can you check it with
mconn, err := manager.LoadAuthentication()
if err != nil {
  fmt.Println(err)
}

instead of
mconn, _ := manager.LoadAuthentication()

For more evidences please share the log file ss.log after removing your credentials.

I now have a ss.log file but it is crowded and over 1 megabyte! I will try to incorporate your change and post the log file in the next two days.
BTW, one question.
Is there any way to distinguish between a Super Group and a Channel? because they are both returned with the type Channel.

Actually I have no idea for the problem. Although I checked responses from not only MessagesGetAllChats() but ChannelsGetFullChannel(), I couldn't get any difference between channel and group.

Yeah yeah they are both the same unfortunately.
I have another question, How should I tell that for example MessagesGetAllChats method wants nothing in its arguments, how can I know that?
For example I have written the same as the simple shell file you told me:
func getDialogsAllTest(caller *mtproto.RPCaller) *mtproto.TypeMessagesDialogs {
	r, _ := caller.MessagesGetAllChats(context.Background(), &mtproto.ReqMessagesGetAllChats{})
	return r
}

The struct ReqMessagesGetAllChats should have nothing as argument for creation, right? but I see that It accepts one argument (assuming that XXX* are not necessary) ...
func getDialogsAllTest(caller *mtproto.RPCaller) *mtproto.TypeMessagesDialogs {
	r, _ := caller.MessagesGetAllChats(context.Background(), &mtproto.ReqMessagesGetAllChats{
		ExceptIds:            nil,
		XXX_NoUnkeyedLiteral: struct{}{},
		XXX_unrecognized:     nil,
		XXX_sizecache:        0,
	})
	return r
}

And that is ExceptIds. How should I tell that I do not have to fill this parameter. Is it all try and error or there is a documentation? How did you figured these out? Thanks for your time.

Right it is all try and error. You can find some old methods in Telegram API document, but its version is too old (document: 23, cjongseok/mtproto: 71, latest: 91). Another documentation source is tdlib document. It is quite recent, but you know there is a interface gap between tdlib and tl-schema.


WebcamVideoStream.read should return tuple like cv.VideoCapture does

https://github.com/jrosebr1/imutils/blob/df65a77087548b5952431cc8006d66bcca7b1abc/imutils/video/webcamvideostream.py#L38
someone just showed up freenode's #opencv with this.

This PR fixes this issue: https://github.com/jrosebr1/imutils/pull/202


^D not exiting folie -r

Johns-MacBook-Pro:Blue Pill john$ folie -r
Select the serial port:
1: /dev/cu.Bluetooth-Incoming-Port
2: /dev/cu.usbmodem1411
3: /dev/cu.usbmodem1421
3
Enter '!help' for additional help, or ctrl-d to quit.
device not configured
^D
^D

The device was an STM32duino node. Accessing 2: /dev/cu.usbmodem1411 was successful.

Hm, the "device not configured" message is puzzling. It should say "[Connected ...]".
You should still be able to force an exit with ctrl-c in this unconnected state.

^C does indeed close folie. I thought you would like to see "device not configured". STM32duino does enumerate very strangely. It isn't a major issue, more a fyi.


UniSharp/laravel-filemanager error (Trying to get property of non-object)

I'm using UniSharp/laravel-filemanager with tinyMCE 4. When I click file explorer button. I gives out error in a bootstrap model. And the error is
Trying to get property of non-object (View: F:\moonlight\resources\views\public\tour\single.blade.php)
It is requesting for route`(single.tour) which looks like:
Route::group(['middleware' => ['web']], function () {     Route::get('{category}/{slug}','GetPublicController@singleTour')             ->where('category', '[A-Za-z\d\-\_]+')             ->where('slug', '[A-Za-z\d\-\_]+')             ->name('single.tour'); });
when I comment out or remove the above route file explorer works perfectly. I have used this package in my previous projects but never had this problem and I am not using Sentinal ACL package like previous issue.

@bantawa04 You might need to add auth middleware into your routing.

Gave shot to your suggestion still same error.
Route::group(['middleware' => ['auth']], function () {       Route::get('{category}/{slug}','GetPublicController@singleTour') ->where('category', '[A-Za-z\d\-\_]+') ->where('slug', '[A-Za-z\d\-\_]+') ->name('single.tour');  });

This might not be a routing issue. Please paste the line which throws the exception from your view.


Luis Recognizer package

Fixes #741
Description
This PR adds the bot-ai-luis package.
Specific Changes
Contains the port of the relevant part of the Luis recognizer, excluding all obsolete components
Reduces nesting in some implementations. (External recognizer scenario)
Adds the ability to test against the real endpoint or mock the responses
Testing

Style fixes in progress

@munozemilio What do the "//TO-DO: Enable once the class Dialog Recognizer is ported" mean?


Implement DisplayName to InputBase

Is your feature request related to a problem? Please describe.
When I localize the validation attributes I have something like this: "The field '{0}' is required!" (The field 'CheckInDate' is required!)
But it gets the property name, rather than the Display attribute's value. (The field 'Check-in date' is required!)
Describe the solution you'd like
So after some research, I see that the Blazor team added the DisplayName (in .NET 5) parameter to show its value instead of the property's name.
https://docs.microsoft.com/en-us/aspnet/core/blazor/forms-validation?view=aspnetcore-5.0#display-name-support

@henon can this be planned because it is a necessary feature for internalization?

Do you want to try to PR this? Should be trivial right?

Do you want to try to PR this? Should be trivial right?

Okay, I will try.

Hi team
Any progress on this?

Not used MudBlazor in a while (because of other projects from work) but I tested to see if this is done and I can confirm they did a great job here is some proof:


Empty device names break DataNamer

If a file named something like 0.h5 is present in a data folder, DataNamer.m will fail at parsing it with regexp.
https://github.com/BBN-Q/Qlab/blob/b217fc4de23cdba1e4edd846b51157c9f3062bd8/common/util/DataNamer.m#L34
I may submit a PR fixing this later today.

We always take PRs :smile:


The concept of "process ID" is confusing

Currently, a Process has two different "ID"s:
message Process {
	string id = 1 [(gogoproto.customname) = "ID"];
	int64 pid = 2;
	..
}

https://github.com/docker/containerd/blob/2ef399b315ee728e2936ca24f0523bf553210355/api/execution/execution.proto#L76-L77

type
example value
raison d'etre
also known as..

string
"init"
The int64 PID is not determined when a new process is being started, until returned by runc.  So this string-typed process ID is needed for determining the name of the directory for the new process.  (e.g. "/run/containerd/shim/foo/processes/init/")
"pid" in ctr exec CLI, "process-id" in shim executor

int64
42
This is the raw PID really needed

For avoiding confusion, I suggest renaming the string-typed process ID, or just eliminating it
Plan 1: rename
e.g. StateDirName, RuntimeStateDirName,  InternalID, ..
Plan 2: eliminate
IIUC, it is also possible to just eliminate the string-typed process ID.
For determining the name of the directory for the new process, containerd can just use some random string.
At least, I think it is not needed for StartProcessRequest.
Plan 3: do nothing but just improve godoc
If this plan is adopted, the naming convention for the string-typed process ID should be clarified. ("init" for the init, but what for other processes?)

The other processes are named by the client. It's part of the GRPC input for StartProcessRequest
We could rename pid to systemID?

@mlaventure
Why client needs to name the process ID?
IIUC, server can determine some random name for creating the directory, and just return PID number to the client.
(Get|Signal|Delete)Process can just use PID number. (server can map PID number to a directory name, using symlinks or some database)

system PIDs get reassigned, so they can't be used as unique values.
We could generate a random string to use, but I assumed that a client adding a process might as well name it for easy reference later (and have a name more palatable than a random serie of characters). I just find this way more user friendly.
In the end, both IDs are needed as we can rely on the system PID after a restart of the daemon, we could rename the non system ID to "Name" too

This identifies the process object. This is a pretty standard design for something that may out live PID.
We may actually be able to identify by on disk bundle location, as that should be theoretically unique per node.

Now that we have all the processes under a single shim we are going to remove the concept of a process id and just use the pid of the process.
We needed this more when we had a new shim per process but now that one shim manages the entire container this is not needed so we will be remove it.

thank you :+1:


Additional words/phrases that should receive the :glare: response.

SudoBot does a great job :glare:'ing at people who use the word bruh.  I propose that we expand this reaction to include pog and do be fire.
Any additional meme words/phrases would also be appreciated.

Maybe poggers and kek?


New GH Action: CreateOrUpdateStagingDeployCash

This issue is currently HELD on https://github.com/Expensify/Expensify/issues/157003
Details
Implements a new Github Action to create or update the StagingDeployCash issue.
Fixed Issues
Fixes https://github.com/Expensify/Expensify/issues/155140
Tests

[x] Create a properly-formatted StagingDeployCash ✅ https://github.com/Expensify/Expensify.cash/issues/1712
[x] Close the existing StagingDeployCash ✅
[ ] Run this action in a test workflow. It should create a new StagingDeployCash. Verify that it is created correctly, looks correct, contains the correct PRList, etc...
[ ] Re-run the test workflow, and it should add the listed pull requests and deploy blockers to the StagingDeployCash that was created in the previous step.

Tested On

[ ] Github

Okay, got pretty far with this. I think right now it's failing to create the action because we're listing applausebot as the assignee, but you can only assign a user to an issue if they have write access to that repo. So we probably just need to give applausebot write access to Expensify.cash.

Just for ease of record-keeping, this is how this was tested:
- name: Create or Update StagingDeployCash
  uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@74b813a5ae14aa327319d49ef6d87a21ab6d75db
  with:
      NPM_VERSION: '1.0.2-25'
      GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
      NEW_PULL_REQUESTS: 'https://github.com/Expensify/Expensify.cash/pull/1,https://github.com/Expensify/Expensify.cash/pull/2'
      NEW_DEPLOY_BLOCKERS: 'https://github.com/Expensify/Expensify.cash/issues/123,https://github.com/Expensify/Expensify/issues/12345'

And when the issue was first created, this was the result:

As expected, the NEW_PULL_REQUESTS and NEW_DEPLOY_BLOCKERS fields were unused (they are meant for the update use case. Now I'm going to re-run the test workflow, and I'm expecting that https://github.com/Expensify/Expensify.cash/issues/1732 should be updated to include the new PR and a new section with the deploy blocker.

Okay, had to fix a couple more bugs but now the update part is working too:
https://github.com/Expensify/Expensify.cash/issues/1732

Okay, this PR is now ready for review 👍


check for the existance of a “Mark as unread” button

Fixes #1673
This adds a check before adding a “Mark as unread” button before attempting to add another one which stops situations like this

I guess the only other place really is here where the side bar gets observed. I guess this could be changed to
		} else if (pageDetect.isPR() || pageDetect.isIssue()) {
			await domLoaded;
			await markRead(location.href);

+			const markUnreadButtonExists = select('.rgh-btn-mark-unread');
+			if (!markUnreadButtonExists) {
				// The sidebar changes when new comments are added or the issue status changes
				observeEl('.discussion-sidebar', addMarkUnreadButton);
+			}
		} else if (pageDetect.isIssueList()) {

I checked the code and that's indeed the best point. The observer is removed at every page change so the condition must be inside the observer listener (i.e. where you placed it)
Thanks for the fix!


Add encoder and decoder for java.time.YearMonth

The default implementation will encode/decode YearMonth instances to/from strings of the form "2017-04" for example.

Codecov Report

Merging #628 into master will increase coverage by 0.26%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #628      +/-   ##
==========================================
+ Coverage   83.48%   83.75%   +0.26%
==========================================
  Files          70       70
  Lines        2071     2080       +9
  Branches      150      151       +1
==========================================
+ Hits         1729     1742      +13
+ Misses        342      338       -4

Impacted Files
Coverage Δ

...main/scala/io/circe/java8/time/TimeInstances.scala
100% <100%> (ø)
:arrow_up:

...re/shared/src/main/scala/io/circe/KeyDecoder.scala
45.94% <0%> (+2.7%)
:arrow_up:

...d/src/main/scala/io/circe/NonEmptySeqDecoder.scala
100% <0%> (+9.09%)
:arrow_up:

...rc/main/scala/io/circe/shapes/SizedInstances.scala
92.85% <0%> (+14.28%)
:arrow_up:

Continue to review full report at Codecov.

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

Looks good, thanks!


Update tests

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (4a6a5df) to head (046cd87).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            5         5
  Lines          203       203
=========================================
  Hits           203       203

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Link to the site from the demo?

That would just make it a little easier to find the project code. :+1:

Agreed. Just need to make some time to do this.

Annnnd done!