Support for expressions with template arguments.

Currently, the following code fails to compile:
template<int X, int Y> bool foo() { return X == Y; }

int main()
{
    foo<3,4>();
    ASSERT(foo<3,4>());
}

This code can be seen in action on compiler explorer.
This is due to foo<3,4>() being seen as two arguments when passed to a macro, specifically foo<3 and 4>(). This can be worked around with an extra set of parenthesis. Working around this in the library would be difficult, but should be possible. Decomposition would need to overload operator, to handle the error message string, and additional diagnostic variables. The top level macros would then consume a single variadic argument pack.

Hi @cra2801, I think I see what you're proposing. It'd be a cool enhancement, it will add a lot of complexity to the expression decomposer but I think it could work. I will try to play around with it when I get the chance!

Supporting this would involve further complicating an already intricate expression decomposition system and I'm concerned about possible impact on build times. Possibly the sort of thing that would make sense to optionally enable/disable, but that'd probably involve maintaining two expression decomposition systems. I'm going to mark this as a backlog enhancement for now.

You cna draft a small macro to take any token like (SOME, STUFF) into SOME,THING. I use it in TTS.
Here is a small version:
// Remove parens around macro token if any are present
#define TTS_REMOVE_PARENS(x)              TTS_EVAL((TTS_REMOVE_PARENS_I x), x)
#define TTS_REMOVE_PARENS_I(...)          1, 1
#define TTS_APPLY(macro, args)            TTS_APPLY_I(macro, args)
#define TTS_APPLY_I(macro, args)          macro args
#define TTS_EVAL_I(test, x)               TTS_MAYBE_STRIP_PARENS(TTS_TEST_ARITY test, x)
#define TTS_EVAL(test, x)                 TTS_EVAL_I(test, x)
#define TTS_TEST_ARITY(...)               TTS_APPLY(TTS_TEST_ARITY_I, (__VA_ARGS__, 2, 1))
#define TTS_TEST_ARITY_I(a, b, c, ...)    c
#define TTS_MAYBE_STRIP_PARENS(cond, x)   TTS_MAYBE_STRIP_PARENS_I(cond, x)
#define TTS_MAYBE_STRIP_PARENS_I(cond, x) TTS_CAT(TTS_MAYBE_STRIP_PARENS_, cond)(x)
#define TTS_MAYBE_STRIP_PARENS_1(x)       x
#define TTS_MAYBE_STRIP_PARENS_2(x)       TTS_APPLY(TTS_MAYBE_STRIP_PARENS_2_I, x)
#define TTS_MAYBE_STRIP_PARENS_2_I(...)   __VA_ARGS__

Thus you can ask people to put () in their expression and pass the macro argument through TTS_REMOVE_PARENS.
If no parens is there, the token are left untouched.

Care must be taken to not remove the braces of a fold expression.


[InputBase] all text input required not working when readOnly or disabled is true.

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Steps to reproduce 🕹
Link to live example:
Steps:

set readonly or disabled properties true and required property set true on TextField
Form submit trigger TextField on 1.
Warning popup not working event TextField is empty

Current behavior 😯
Onsubmit working when TextField component set readonly and empty string.
Expected behavior 🤔

below code`ll be create popup and onsubmit function not working when TextField is empty.
<Form>
    <TextField required readOnly />
</Form>

Context 🔦
No response
Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Thanks for reporting this. It seems that we're not following the spec here (https://www.w3.org/TR/2011/WD-html5-20110525/common-input-element-attributes.html#attr-input-readonly). Would you like to work on a fix?

hey @michaldudak can you assign the issue to me, i want to work

looks like it is expected behaviour, even if html input is used we are not getting any popup.
csb: https://codesandbox.io/s/bold-breeze-s1v9i8?file=/src/App.js

Ah, sorry, I misunderstood the issue.
It does work as in the spec.
By the way <TextField readOnly /> is not the correct way to make a textbox readonly.
See the demo in our docs:
<TextField
  InputProps={{
    readOnly: true,
  }}
/>


Handle custom auth for desktop app

We add a custom protocol that can be used as the redirect URI, this is because we want to allow users to use there default browser for auth rather than the electron chromium window. Right now we only allow microsoft login auth to open in the default browser.

To test this PR with msal

setup azure ad app registration
set redirect URI to be headlamp://redirect choosing the desktop auth flow
Right now headlamp communicates the auth_token or an auth_code(in case of PKCE flow) via the auth_token and auth_code event type, To get these on the renderer side you can just use the global desktopApi receive function and listen for these events from your auth flow

Moving to the next milestone.

@joaquimrocha i think this will require a fresh review


Shouldn't different end-points show the same load?

I thought that the new bottom-up calculator would produce equal load results for equal end-points. For this LES the results are quite different for the first and second end-point.
Also, it fails to calculate... 😢

Also, it fails to calculate...

Related to #919. Will look into it shortly.

Also, it fails to calculate... 😢

I'll get the core issue resolved, but until then you can temporarily work around this by selecting a different week.

I thought that the new bottom-up calculator would produce equal load results for equal end-points. For this LES the results are quite different for the first and second end-point.

None of the three endpoints are identical. They have differing numbers of buildings and heat-pumps. Check out LES491 which corrects the differences; the loads are the same on all three endpoints.

None of the three endpoints are identical.

Sorry about that! I think the app broke while I was changing them to be identical...


Bump python-velbus version

Description:
bump the python-velbus version to 2.0.32 this will allow us to use all channels of the glaspanels (non-edge-lit)
in previous versions this could cause the velbus integretion to not find these components
Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

If the code communicates with devices, web services, or third-party tools:

[x] The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
[x] New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
[x] Untested files have been added to .coveragerc.

👍


Improve decription to add taxon specificity

Current descriptions are too generic, and likely there will be naming conflicts in the future.

done


runtime: lots of time spent in sweepone

Here is repro program:
http://play.golang.org/p/giKY6IcWjU
If you run it as-is, it runs for 1.357s and profile looks as:
21.94%  test  test               [.] runtime.memclr
12.24%  test  test               [.] runtime.MSpanList_IsEmpty
11.02%  test  test               [.] runtime.xchg
7.94%  test  test               [.] MHeap_AllocLocked
5.19%  test  test               [.] runtime.MSpan_Sweep
If you uncomment "y = make([]byte, 1<<30)" line, it runs for 26.696s and profile looks as:
37.52%  test  test               [.] runtime.sweepone
27.15%  test  test               [.] runtime.xadd
24.96%  test  test               [.] markroot
1.96%  test  test               [.] runtime.memclr
0.75%  test  test               [.] runtime.xchg
The problem is that the program creates 131221 spans when the live set is 1GB and the heap grows to 2GB. Later the live set drops to 1MB and GCs become very frequent, but each GC has to iterate over all of 131221 spans in sweepone and markroot. The total time spent in span handling becomes 90%.
This was reported on golang-nuts:
https://groups.google.com/forum/#!topic/golang-nuts/-Dq4WkivD2E
We need to either (1) re-partition allspans so that we don't iterate over the dead part, or (2) remove and deallocate dead spans from allspans after some time of inactivity.

I can't reproduce this after https://go-review.googlesource.com/2349 was applied.
However, I think we're seeing this issue in production on one of the services at my job. I'll report back after I've grabbed some data.

I just tried @dvyukov's test program on latest master and it runs in 1.3s and has the same profile with and without the "y = ..." line.
@DanielMorsing, are you still seeing this issue?

No, the issue in production turned out to be a case of some spurious allocations being made by application code.
I still think we're doing excessive sweeping, but it runs concurrently with mutator code, so the effects aren't as apparent. Should be easier to figure out what's happening after https://go-review.googlesource.com/#/c/9506/ was applied.

@aclements I guess you now need a different program to trigger this issue. Probably now GC collects the large span before the program allocates sufficient amount of small spans.

No repro program, so no issue.

Such approach to bug handling is kind of discouraging.
Catch a new repro program:
package main

import (
	"fmt"
	"os"
	"runtime"
	"time"
)

var z []byte
var x [][]byte

func main() {
	t0 := time.Now()
	if len(os.Args) > 1 {
		for i := 0; i < 1<<20; i++ {
			x = append(x, make([]byte, 1<<13))
		}
		x = nil
		runtime.GC()
	}
	fmt.Println(time.Since(t0))
	t0 = time.Now()
	for i := 0; i < 1e5; i++ {
		z = make([]byte, 1<<13)
	}
	fmt.Println(time.Since(t0))
}

$ ./test
2.245µs
582.776723ms

$ ./test 1
3.470712076s
19.764293403s

That's 34x slowdown.

This didn't happen in time.

Missed again.

Just to expand on the original report a bit, when the heap is full of dead spans like in this test case, half of the time in sweepone is spent just incrementing the sweepidx and the other half is spent in cache misses just to check the span state (and determine that it's dead). This particular test amplifies this because it drives so many GC cycles in the second phase and, since the number of spans never goes down from the peak, between the closely spaced GC cycles in the second phase, sweeping has to sweep all of the dead spans.
This isn't going to happen for 1.7, but my hope for 1.8 is that we can eliminate proportional sweeping entirely, which will fix this problem at its root.

ping @aclements, is this still going to make 1.8?


Allows local Linux setup

Description
Using host.docker.internal to access the host machine does not work on Linux. This naively fixes it. Code changes must also be made to sparkswap/lnd-engine.

Comments addressed. Pending: testing on Mac.

 Linux Local Regtest Setup


⚠ Bofrost.lu has degraded performance

In 7105727, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1240 ms

Resolved: Bofrost.lu performance has improved in a382e33 after 7 minutes.


schedule job to delete old events/files

closes #1016

Coverage increased (+0.07%) to 81.642% when pulling 3014002f7a94ba3afa6eb61e6628e14aacb36dd6 on 1016-cleanup-files into bf071725b2d5f36dba469de821ad1fdd477bb3c4 on alma.

Coverage increased (+0.07%) to 81.642% when pulling 3014002f7a94ba3afa6eb61e6628e14aacb36dd6 on 1016-cleanup-files into bf071725b2d5f36dba469de821ad1fdd477bb3c4 on alma.


UI bug with plant app

When clicking on an input, it pushes everything into the top..
just reporting it, up to you if u wanna fix it.

@karimcambridge what device you're using?

Pixel 2, Android Pie

@karimcambridge thanks, I'll take a look


How do you manage mutli sound track ?

Hello everyone,
I'm facing a problem with Plyr and my app, some of the videos I use come from the web and I have no control over them.
Some videos are in MKV or MP4 format, and I think because of the multiple sound tracks in them, there is no sound at all.
Is there anything you've already seen?
Thank you 🙏

I don't know if you figured something out since, but having multiple sound tracks should not cause issues at all. I think the issue might be the audio codec used for the audio; webbrowsers do not support a lot of them.
If it is DTS, you can check this compatibility table:
https://developer.dolby.com/platforms/html5/browser-support/
For other format, I suggest taking a look to this:
https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Audio_codecs
You can check the codec used with different tools, like mkvmerge (from mkvtoolnix) or even vlc


Add support for listing tasks to gdb in gdbstub

This is supposed to fix #2818
This adds all the required commands in the gdbstub (via UART) to:

List all tasks/threads (including their name and CPU)
Get a backtrace for them
Switch to them to analyze them more carefully

To tease the current support, you can now do this:
Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d8281  PS      : 0x00060030  A0      : 0x800e1a6a  A1      : 0x3ffda250
0x400d8281: devXXX(HttpdConnData*) at /esp/app/main/HTTPServer.cpp:712

A2      : 0x00000000  A3      : 0x3ffe43b3  A4      : 0x00000007  A5      : 0x0000ff00
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000038  A9      : 0x00000038
A10     : 0x00000001  A11     : 0x00000001  A12     : 0x3ffc2618  A13     : 0x3ffc2610
A14     : 0x3ffe43a9  A15     : 0x000000c0  SAR     : 0x00000019  EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000  LBEG    : 0x400012c5  LEND    : 0x400012d5  LCOUNT  : 0xfffffff5

Backtrace: 0x400d8281:0x3ffda250 0x400e1a67:0x3ffda270 0x400e1e67:0x3ffda2a0 0x400e1205:0x3ffda2e0
0x400d8281: devXXX(HttpdConnData*) at /esp/app/main/HTTPServer.cpp:712

0x400e1a67: httpdProcessRequest at /esp/app/components/libesphttpd/core/httpd.c:833

0x400e1e67: httpdRecvCb at /esp/app/components/libesphttpd/core/httpd.c:920

0x400e1205: platHttpServerTask at /esp/app/components/libesphttpd/core/httpd-freertos.c:772

Entering gdb stub now.
$T04#b8GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-build_apple-darwin16.3.0 --target=xtensa-esp32-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /esp/app/build/nvse.elf...done.
Remote debugging using /dev/cu.SLAB_USBtoUART
0x400d8281 in devXXX (connData=<optimized out>) at /esp/app/main/HTTPServer.cpp:712
712	    *(int*)0 = 0; // Crash here
(gdb) bt
#0  0x400d8281 in devXXX (connData=<optimized out>) at /esp/app/main/HTTPServer.cpp:712
#1  0x400e1a6a in httpdProcessRequest (pInstance=0x3ffd93f8, conn=0x3ffe4388) at /esp/app/components/libesphttpd/core/httpd.c:649
#2  0x400e1e6a in httpdRecvCb (pInstance=0x3ffd93f8, conn=0x3ffe4388,
    data=0x3ffd8bf1 "POST /devXXX HTTP/1.1\r\nHost: <IP_ADDRESS>\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:63.0) Gecko/20100101 Firefox/63.0\r\nAccept: */*\r\nAccept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en"...,
    len=452) at /esp/app/components/libesphttpd/core/httpd.c:920
#3  0x400e1208 in platHttpServerTask (pvParameters=0x3ffd8bd4) at /esp/app/components/libesphttpd/core/httpd-freertos.c:505
(gdb) i th 1
  Id   Target Id         Frame
* 1    Remote target     0x400d8281 in devXXX (connData=<optimized out>) at /esp/app/main/HTTPServer.cpp:712
(gdb) i th 2
  Id   Target Id         Frame
  2    Thread 1 (IDLE1 CPUx) 0x40144846 in esp_pm_impl_waiti () at /esp/esp-idf/components/esp32/pm_esp32.c:487
(gdb) i th 3
  Id   Target Id         Frame
  3    Thread 2 (IDLE0 CPUx) 0x40144846 in esp_pm_impl_waiti () at /esp/esp-idf/components/esp32/pm_esp32.c:487
(gdb) i th 4
  Id   Target Id         Frame
  4    Thread 3 (uart CPUx) xEventGroupWaitBits (xEventGroup=0x3ffb6e88, uxBitsToWaitFor=1, xClearOnExit=1, xWaitForAllBits=1, xTicksToWait=<optimized out>) at /esp/esp-idf/components/freertos/event_groups.c:445
(gdb) thr apply 3 bt

Thread 3 (Thread 2):
#0  0x401447da in esp_pm_impl_waiti () at /esp/esp-idf/components/esp32/pm_esp32.c:487
#1  0x400d2c76 in esp_vApplicationIdleHook () at /esp/esp-idf/components/esp32/freertos_hooks.c:63
#2  0x4008f13c in prvIdleTask (pvParameters=<optimized out>) at /esp/esp-idf/components/freertos/tasks.c:3412

This is a large change with many redundant code since I could not access the other components static's / internal stuff.
Mainly, I've duplicated the dumpHwRegfile function to support Xtensa's XtSolFrame, made a backup of the current panic handler (since as soon as gdb detects there are threads, it switches them, so the gdbregfile is lost), and dealt with FreeRTOS's TCB structure.
I didn't want to copy all the TCB structure declaration (I only needed a the top of the stack which is guaranteed to be the first element in the structure). So I declared a dummy structure with just a single element, and I'm using this. I'm not using uxTaskSnapshotAll here since this does not give the task name and CPU id. Instead, I'm using uxTaskGetSystemState that gives everything (name, TCB/handle, cpu id).
I've added all protections for address validity checking (copied from espcoredump.py and coredump.c)
There is still a bug within gdb when it's receiving a dump with a code that's built with -Os (with inlining) but it has already been reported in your forum, and it's unrelated to this work (it also happens when doing coredump).
Please let me know if you need more changes.

Here it is.
First, if configUSE_TRACE_FACILITY is not selected in menuconfig, the FreeRTOS part is ignored (effectively working like initial code).
Then, the code tries to use the FreeRTOS uxTaskGetSystemState function (only once). If it crashes here, the reentrant calling of the exception is detected and reenteredHandler is set to -1, preventing listing/switching task from GDB.
This should keep it working as a best effort forensic analysis.

@igrr or @Spritetm, any news ?

Summary of the changes:

I've applied all changes asked
I've merged the common code in the Xt frame to GDB reg file (so it's smaller)
Fixed a probable bug when re-entering the handler to avoid incoherent GDB behavior if it received a correct packet just before the ESP32 crashed again (unlikely)
Tested with a simple design, and it's working perfectly well

@igrr @projectgus @X-Ryl669 Changes seem to be OK.
One more thing... It should not be implemented in this PR. It is planned along with other core dump improvements/fixes. Registers for the task currently running on other CPU are not saved onto the stack, so they will have invalid values. Special mechanism needs to be implemented to retrieve them from other CPU upon entering panic handler.

The only way to do that would be to trigger an interrupt on the other CPU.
If I've understood the Xtensa lSA (the only interrupt that could be triggered is a software level interrupt via the XTHAL_SET_INTSET macro (wsr.intset assembly instruction).
However, it's not clear to me if interrupts are shared between CPU.
If it's the case, then a CPU shoud register an interrupt handler 1 and the other CPU should register int handler 2.
Else, I don't see a way for CPU to communicate (feel free to correct me if I'm wrong)
The handler role would be to save the exception frame to the memory and set a flag so the other cpu can busy loop on it.
I'm still thinking about how to allow live debugging with this and using software interrupt might be a solution, except that it's not clearly explained how it's implemented underneath.

@X-Ryl669

The only way to do that would be to trigger an interrupt on the other CPU.

Yes. ESP32 supports interrupts between xtensa cores. The idea is to use CPU_INTR_FROM_CPU_x to force CPUx to take interrupt. As I wrote above this problem also affects core dump functionality and is planned for the one of nearest future releases.

Would it sum up to adding a new reason in cross_int.c (something like REASON_DUMP), or is it too high level ?
I'm wondering if the objective is to stop the other CPU ASAP, or to get a good task dump.
If it's the latter, then it's very easy to request a yield from the other CPU via crossint, that'll save the current thread's register in FreeRTOS.
If it's the former, I wonder that the panic handler code will have to be modified to also capture the exception/register in the CPU_INTR/cross core code, that's a lot of additional instructions for cross core interruptions in general if it does not need it.
Are we allowed to add more interruption clause like DPORT_CPU_INTR_FROM_CPU_4_REG for this instead so we can only capture the exception frame upon that specific interruption ?
Typically, IIUC, we'd like to set up a dport interrupt with a ETS_DPORT_INUM set to 2 for example (since 1 is used in the dport_panic_highint_hdl for usual dport access) and test for it to trigger another function than panicHandler (line 116). That function would save the CPU's frame on the IRAM memory and set a bit to tell the other CPU it's done dumping and then return, right ?
In that case, please consider allowing more action in this (new) handler, like:

Dumping the current registers/frame (what's described above)
Setting a debug breakpoint/watchpoint
Clearing a debug b/w point
Replacing the current registers/frame with one provided

That would permit one CPU to debug the other CPU in live within GDB directly from UART or WIFI!

This will likely be implemented by extending the existing level 4 interrupt handler to allow doing other "stuff", such as saving the interrupt frame somewhere. This has to be at least level 4 interrupt, so you can interrupt the other CPU even if it is inside a FreeRTOS critical section.

That would permit one CPU to debug the other CPU in live within GDB directly from UART or WIFI!

Not to disencourage you from trying this, but there are other issues to solve. For example, with this approach the "debuggee" CPU can not be allowed to halt inside a critical section. If it does, then the "debugger" CPU can immediately deadlock if it tries to take the enter a critical section with the same spinlock. Also in the current FreeRTOS CPU0 is responsible for advancing tick count, so debuggee CPU can only be CPU1.

I guess such debugging stub shouldn't be using FreeRTOS. It should be only interrupt based.
Typically, in user code (probably in a FreeRTOS task), the user would trigger an exception (debug break for example).
The exception handler will capture the registers value and store in a static area (for both CPU, using the scheme discussed above).
GDB can already set the memory and retrieve it with the current stub and the "only" thing missing is to be able to set debug/watchpoint and resume.
When listing tasks the current CPU might hold a spinlock, but the code above does not lock, so it's manipulating the task list / snapshotting that might get corrupted.
The tasklist is only missing what the other CPU is currently doing, and I guess it's possible to have it dumps its registers' list without deadlocking (via a high level exception).
Then GDB can ask to set up a debug break/watchpoint (we should be able to deal with this as interrupt too when they happen)
Then GDB can ask to continue/resume. In that case, we should get out of the ISR and let the program resume. Provided the user has set up a debug break/watchpoint, an interrupt will happen when it's hit, and we're back to the GDB stub code.
We could also have a FreeRTOS task that's listening to GDB command on the serial link to catch "Ctrl+C" (not sure how it's done) and in that case, it would trigger the interrupt to re-enter GDB stub.
I don't see in this scheme when FreeRTOS is in the way or where it could deadlock.
But for this to work, one CPU should be able to set the debug break/watchpoint of the other CPU (this is not possible without crossint/dport code I guess) or we'll miss some break.
Also, at first, the GDB stub handler should talk using serial port, but in the future it could be using TCP/IP too since GDB supports this.
However, this might prove a lot more challenging to implement without FreeRTOS/Lwip in the way, so a kind of ISR/task communication will be required for this to happen (typically, the ISR should post the next message to send to GDB in a queue and resume to the GDB's task that'll pump the message and send it to GDB).

Is the current change in master finished and OK ?
In that case, we should close this PR.

@X-Ryl669 yes, changes were cherry-picked in the commit above. Thanks for the contribution, and please let us know if you have another suggestions or contributions for debugging improvements.


Postfix/sendmail replacement

What Operating System are you seeing this problem on?
Ubuntu 20.04
What Hardware is this system running?
AMD EPYC
KumoMTA version
2023.12.28-63cde9c7
Did you try the latest release to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version that I tried
Describe the bug
Hi,
we want to replace our servers from postfix to kumo. But there is an importing missing feature.
PHP mail Function is using under Linux the "sendmail" command to send mails to the local mta.
How it is possible to tell sendmail to use kumo?
To Reproduce
No response
Configuration
default
Expected Behavior
No response
Anything else?
No response

More Infos about sendmail and php:
https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path

We intentionally do not provide a drop-in replacement for the sendmail command.
Injection of mail from the local system can be achieved using other tools that speak SMTP (we like Swaks for ad-hoc CLI injection), or, if you are willing to write a little bit of code, that speak our HTTP REST Injection API.
For PHP, I do not recommend using the mail function if you are operating at any kind of scale. Instead, I would suggest looking at libraries such as PHPMailer and configuring them to talk to the local SMTP port.

Is it fair to assume that what you really want to do is use KumoMTA to send email from PHP? If so, Wez's suggestion above to use PHPMailer is a very good one. if not, please expand on your question.

Hi, we want to replace postfix by KumoMTA for our  server infrastructure. PHP was only an example for the need of sendmail wrapper.  We have no influence on the PHP scripts, so the mail() feature cannot be replaced by libraries.
cronjob daemon also uses sendmail to send systemmails

I found a useful wrapper:
https://github.com/sercxanto/small_scripts/blob/master/sendmail_wrapper.py

That really just adds a processing layer that eventually just calls the Python SMTP library instead of the PHP one.
It sounds like what you want is the ability to redirect a sendmail call to use KumoMTA with the same parameters instead.

I found a much simpler alternative to that wrapper in https://stackoverflow.com/a/43146560/149111
Building out a full-fledged drop-in replacement for the sendmail executable isn't on our roadmap at this time.
We could be influenced by sponsorship to build it out, but given that it is relatively straightforward to script this functionality, I suspect most folks will look at scripting it for themselves.

Okay, i modified the code with an important sendmail arg "-f"
`!/usr/bin/env python
# -*- coding: utf-8 -*-

import smtplib
from sys import stdin
from email.mime.text import MIMEText
import email
import sys
import getopt
s = smtplib.SMTP('localhost:25')
mail = email.message_from_string(stdin.read())
mailf = mail['from']
argv = sys.argv[1:]
try:
    options, args = getopt.getopt(argv, "f:")
except:
    print("Error Message ")

for name, value in options:
    if name in ['-f']:
        mailf = value
        print(value)

s.sendmail(
    mailf or<EMAIL_ADDRESS>
    mail['to'] or mail['bcc'],
    mail.as_string()
)
s.quit()

Yes, but if you want to replace postfix by kumo it is a must have.

I found a stable solution. Called msmtp.
More Infos: https://marlam.de/msmtp/msmtp.html
perhaps you can add the hint to the docu.


add class_name option to Contract.create

Hey! first of all thx for great work on this gem.
So i think Ethereum::Contract.create should accept class_name additionally to just name because if i have contract in my truffle project with same name as my model it will simple replace it.
For example i have AmazingCoin it my truffle project and AmazingCoin in my rails app when i will call Ethereum::Contract.create(name: "AmazingCoin", truffle: { paths: [ './coin' ]} ...) it will replace my Rails model and make it inaccessible.
So it think good solution here is to add additional parameter to create, such as class_name. If class_name  passed, we obviously create class with class_name instead of just name, otherwise use name as class name . Will u accept pr if i make one?

I noticed this too, and it's not good. The gem creates the contract class as a global constant. The simplest fix would be to create it on the Ethereum::Contract class. I have this potential solution I've been using in production. Any thoughts?

Yeah this make sense! i think you should make PR :) but i wonder it there any case when we want to customize class name?

Adding the option to name the class through an argument sounds like a good feature to have to me. Nonetheless I've opened a PR for what we discussed here: https://github.com/EthWorks/ethereum.rb/pull/75


Fix python patches

Built on top of https://github.com/biocore/qiita/pull/1277
This PR modifies the python patches that were using the queue system to use now the Transaction object.
Tests expected to fail.

Closing as the latest changes in the transaction are note reflected here, and starting on this file is no longer the best approach.


Replace Eigen vectors of strings with std::vectorstd::string

Submission Checklist

[X] Run unit tests: ./runTests.py src/test/unit
[X] Run cpplint: make cpplint
[X] Declare copyright holder and open-source license: see below

Summary
This changes the Eigen::Matrix<std::string, Dynamic, 1> containers to std::vector<std::string> for stan::mcmc::chains, as suggested in the first point of #1479.
How to Verify
Current tests should pass.
Side Effects
It's not clear to me if other interfaces use this header directly (at least rstan shouldn't be affected, from by inspection), and what guarantees we make about not chaning this.
The only potentially breaking change is that now param_names() returns a const std::vector<std::string>& rather than const Eigen::Matrix<std::string, Dynamic, 1>&, which means that indexing the resulting container will have to use operator[] instead of operator().
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Marco Colombo
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

I'm not authorized to merge, and in any case my last push should be reviewed.

You have maintainer permission on the stan-dev repos, so you should be able to merge if there's not an outstanding review required.

On Dec 16, 2019, at 4:35 AM, Marco Colombo<EMAIL_ADDRESS>wrote:
I'm not authorized to merge, and in any case my last push should be reviewed.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub, or unsubscribe.


Create HelloDarknesMyOldFreind

These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., [https://zoom.us/postattendee?id=0'', 'https://pusulam.okyanuskoleji.k12.tr/AnaSayfa.html#OnlineDers/Ogrenci/DersProgrami']

Hello İm Turkish İm new İm Kid Ok İ dont Know This İm sorry :(


[bug]

Version
Build/Run method

[x] Docker
[ ] PKG
[ ] Manually built (git clone - npm install - npm run build )

Zwave2Mqtt version: 3.2.2
Openzwave Version: 1.6.1133
Describe the bug
Remove Failed Node command missing
Readme.md says

Remove a failed node
If a node is missing or marked as dead. There is a way to cleanup the controller by executing Remove Failed Node. This will forcebly delete the node from the controller. It can only succeed if:

Node has ben first marked as failed using Has node failed
Marked as Dead by the controller
Alive and Sleeping nodes cannot be deleted.

However Remove Failed Node does not appear in controller or node command dropdown:

To Reproduce
Steps to reproduce the behavior:

Go to 'Control Panel'
Click on 'Controller actions'
Command doesn't exist
Click on 'Node actions'
Command doesn't exist

Expected behavior
Command is expected to exist, or readme.md needs to be updated.

I thought it was missing too awhile back, but noticed I had to "scroll down" with my mouse wheel, or hit the down arrow on my keyboard to see it:


Photography/SolarEclipse/PlanningResources: weather

| How to give yourself the best chance of clear skies for April 8's solar eclipse / Space |

#3590 moved to #3582


/usr/bin/oc doesn't exist the change_oc fails to create it.

looks like if /usr/bin/oc doesn't exist the change fails and no error is caught .
Solution is to add sudo touch /usr/bin/oc

resolved in https://github.com/austincunningham/change_oc/pull/16


Syracuse, NY (/syracuse)

closes #1294

both of these emails need to be corrected on the link:
<EMAIL_ADDRESS><EMAIL_ADDRESS>


M2 Setup:upgrade keep executing db_schema every time

Not sure if this is only in my environment but any time I run  mr setup:upgrade keep executing db_schema every time and this is causing fatal error because it tried creating the foreign key again.
Eg.
<table name="custom_table" resource="default" engine="innodb" comment="custom Table">
        <column xsi:type="int" name="ct_id" padding="10" unsigned="false" nullable="false" identity="true"
                comment="ID"/>
        <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="true" identity="false"
                comment="Customer Id"/>
        <column xsi:type="varchar" name="phone_number" nullable="false" length="255" comment="Phone Number"/>
        <column xsi:type="varchar" name="contact_pref" nullable="false" length="255" comment="Contact Preference"/>
        <column xsi:type="varchar" name="verification_token" nullable="false" length="255"
                comment="Verification Token"/>

        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="ct_id"/>
        </constraint>

 <constraint xsi:type="foreign" referenceId="custom_table_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID"
                    table="custom_table"
                    column="customer_id" referenceTable="customer_entity" referenceColumn="entity_id"
                    onDelete="CASCADE"/>
</table>

And this yields
SQLSTATE[HY000]: General error: 1826 Duplicate FOREIGN KEY constraint name 'mvp_dev_dec/modulegroup_custom_table_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID', query was: ALTER TABLE ....
The same code just works fine from direct ubuntu dev environment.

Did you generate your whitelist after running a setup:upgrade with db schema?
Your db schema whitelist file must be kept up to date or it will try to regenerate your constraints
https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/migration-commands.html#create-whitelist

@navarr That was the issue, now its working ok. Though I wonder why this wasn't an issue with AWS RDS Aurora DB.

@Elamurugan-Nallathambi As to why you encountered the issue here but not there, I'm not sure I can say, but since this is clearly a Magento application issue (and it seems you've solved the underlying issue) I'm going to go ahead and close this out. Cheers!


Change %H for level/lead for StringSub to default to 2 digit precision

%H used in datetime automatically enters the date with 2 digit precision. When setting values for lead or level (input is int), %H defaults to 1 digit. The user can set %2H or %HH to force 2 digit precision. The default behavior of %H should pad 2 digit precision. If the user needs to force 1 digit precision, they can do so by using %1H.

May be related to #276.
Currently for offset items (lead, level, etc.) StringSub formats %H %M and %S with one digit precision and only outputs the full number of the value, not relative to the other items. For example, if 120 seconds is formatted, %M will output 2 and %S will output 120. We should align this with the datetime functionality so that %M%S would output 0200.
Are there % options for what datetime expects to specify the full number of minutes instead of relative to the hour? For example, 90 minutes formatted with %H%M should be 0130, but we may want to output 90, the full number of minutes.

Here is the list of supported % options for python strftime: http://strftime.org
There is no option to specify all minutes (i.e. 90). %s can currently be used to specify total seconds and %S to specify relative seconds. We should come up with a good way to notation that we want full minutes (> 59) and hours (>23)

See 2nd section from this page: https://stackoverflow.com/questions/8906926/formatting-timedelta-objects
There are suggestions to writing a string formatter for timedelta objects by defining our own keywords or % identifiers.

The most common format for specifying level or lead has been hours which can go above 23, so it seems like %H should still be used for this (default 2 digit precision, %1H, %3H, etc. to designate other precision. However, this differs from the strftime %H (0-23).

We discussed in an engineering meeting that the current implementation of handling H, M, and S (each outputs the full number of units, not relative to next highest unit) is sufficient for the use cases we will likely encounter. We can revisit if we come across another use case that requires more support.
The change will likely go in the format_one_time_item function in the string sub code. We will need to write pytests to check various inputs to this function to ensure everything works smoothly.

Added pytest for testing format_one_time_item. Can be expanded in the future if the functionality of %H etc needs to be expanded


Always ouput execute-* process logs

The execute-* log is currently hidden if there is no error. This always
outputs the logs.
Your pull request should…

[ ] have a concise title
[ ] close an accompanying issue if one exists
[ ] be against the correct branch
[ ] include migration scripts and documentation, if appropriate
[ ] pass automated tests
[ ] have a clean commit history
[ ] have proper commit messages (title and body) for all commits

As discussed in the dev meeting, this now logs as debug messages.


alpha 3

Updates to FluentKit 1.0.0 Alpha 3:
https://github.com/vapor/fluent-kit/releases/tag/1.0.0-alpha.3

Hey @tanner0101, you just merged a pull request, have a coin!
You now have 1358 coins.


Require can be converted to custom Error code

Custom error codes can be used instead of strings.
https://github.com/pimlicolabs/erc20-paymaster-contracts/blob/60c3ea1c2d75069f9aa7f8d35bc08545a2edb34b/src/PimlicoERC20Paymaster.sol#L67-L70
Suggested Change:
error PimlicoERC20Paymaster__PriceMarkUpTooHigh();

if(_priceMarkup >= 120e4){
   revert PimlicoERC20Paymaster__PriceMarkUpTooHigh();
}

By using custom error codes instead of strings, less gas is used.

If this change is necessary, I would like to work on this.


Error when initializing data

Hi,When I execute update-attack.py file, initialization data error, what is the cause ?

Closing due to inactivity


Compose Context into HttpRequest

See #18569 for reference.
Allos users to pass context data as a part of an HttpRequest. Evaluate if it's preferable to use a simpler data structure like a map instead of the tree-like Context.

For now, we've added the ability to provide an instance of Context as a member of HttpRequest. Let's keep the idea of using a simpler structure in mind.


Connection URL support for Cluster constructor

Currently to pass multiple startup nodes it can only be done by passing them as separate items in the array.
This PR adds support to allow for multiple hosts to be configured if they appear in a URL string.
Discussion points
I've tried to be light touch and assume as little as possible but a few points to think over:

If a url of rediss://node-1,node-2 was given would you assume all connections are using tls?
If a url contained options redis://node-1,node-2/1?key=value should it copy all options over to all nodes?
Should we add | string to Cluster constructer to allow it to be created using a URL string. Redis.Cluster("redis://node-1")

At the moment it does none of these and just takes what is supplied and continues to keep all assumptions made by ioredis as I've only added a parsing check for commas and then separate them into their own startupNode.
Happy to discuss your thoughts on the approach.
Resolves https://github.com/redis/ioredis/issues/1519

@luin Sorry if this is not the right approach but do I need to tag you or someone else to start the review process? I wasn't sure after reading the contribution section of the README.md.

@luin just bumping this in hope it can be reviewed. If you need anything further from me please do let me know.


Pages:- Create Post page

VVV Important page
-posts the recipe of the user along with image

initialised


Retry delay

Would be nice to be able to be able to specify a delay between retries.
Maybe something like
protocol Job {
    func nextRetry(attempt: Int) -> Date
}
extension Job {
    func nextRetry(attempt: Int) -> Date { return Date() }
}

That would allow you to implement exponential backoff etc

Agreed, this is a good idea. Unfortunately this would be a break change (unless we can find a different way to accomplish it) so would need to wait for Queues v2.

Wouldn't the default implementation in the protocol make it backwards compatible? 🤔

@tanner0101 would need to weigh in here but I'm pretty sure any public protocol addition regardless of default implementation is semvar major

@jdmcd if it has a default impl that's fine for semver minor. Going by Vapor's semver rules at least, other projects might be more strict.

Oh fantastic! In this case then I think it'd be a great addition.

I just had a dream about this kinda feature for queues haha. I think it'd be super helpful as well like an exponential back off sort of retry. Similar to how stripe retries failed webhooks

Totally agreed, I think this would be great! Unfortunately I don't have a ton of bandwidth to implement it myself but if anyone else wants to I'm more than happy to provide guidance + reviews!

@jdmcd I think you can close this issue now


feat: FindMojangDir & FindPreviewDir WSL support via wslpath

Thanks @stirante for the WSL support implementation via wslpath
I've added support for locating the com.mojang folder when running Regolith in WSL, both for typical release Minecraft Bedrock and for preview Minecraft Beta.
In doing so, I've abstracted both functions to a single, more generic func comMojangDir(preview bool) which will set itself up for Minecraft Bedrock and Minecraft Beta given the preview boolean parameter; the functions were almost identical and DRY says don't do that.
While these could have been removed from the OS-specific compatibility and merged into one, this reverts the last commit and unnecessarily adds complexity.
*Draft as I want to go over the code and run practical tests

Looks like we don't need that:


Make the system extensible with new properties added

You should make it possible for anybody to add any plugin to the system as a new property violation checker (PVC)! Maybe looking at this might help:
https://javascript.plainenglish.io/how-to-build-a-plugin-system-with-node-js-68c097eb3a2e
https://www.youtube.com/watch?v=yuEKbs934e0
https://fusebit.io/blog/build-a-plugin-system-with-node/?utm_source=www.google.com&utm_medium=referral&utm_campaign=none

Also this might be helpful:
https://github.com/e0ipso/plugnplay


fix typo

s/they will some up with a/they will come up with a/g

Hello,
From the title and the description of your merge request, it appears you are requesting that a typo should be corrected. However that does not coincide with the number of files you have included in the merge request.
Could you please clarify what you are requesting?
Regards,
-Doug

Hi Doug, you can close this pull request as I can no longer locate the typo, and I inadvertently included all the files.  Sorry for the confusion.
Steve


org.openqa.selenium.WebDriverException: com.opera.core.systems.scope.exceptions.ResponseNotReceivedException: No response in a timely fashion

Hello,
We are getting the following exception when we run our Selenium tests on Windows:
org.openqa.selenium.WebDriverException: com.opera.core.systems.scope.exceptions.ResponseNotReceivedException: No response in a timely fashion
Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 12:59:39'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_02'
Driver info: driver.version: OperaDriver
Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 12:59:39'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_02'
Driver info: driver.version: OperaDriver
at com.opera.core.systems.OperaDriver.start(OperaDriver.java:358)
at com.opera.core.systems.OperaDriver.<init>(OperaDriver.java:312)
at com.opera.core.systems.OperaDriver.<init>(OperaDriver.java:213)
...
Caused by: com.opera.core.systems.scope.exceptions.ResponseNotReceivedException: No response in a timely fashion
Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 12:59:39'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_02'
Driver info: driver.version: OperaDriver
at com.opera.core.systems.WaitState.pollResultItem(WaitState.java:435)
at com.opera.core.systems.WaitState.waitAndParseResult(WaitState.java:464)
at com.opera.core.systems.WaitState.waitForHandshake(WaitState.java:665)
at com.opera.core.systems.ScopeServices.waitForHandshake(ScopeServices.java:323)
at com.opera.core.systems.ScopeServices.init(ScopeServices.java:210)
at com.opera.core.systems.OperaDriver.init(OperaDriver.java:377)
at com.opera.core.systems.OperaDriver.start(OperaDriver.java:354)
... 30 more

It happens every time we run the tests via Ant (TestNG) and randomly from Eclipse (TestNG).
It does not happen on OSX or Linux.
Environment:
OS: Windows 7
Selenium: 2.15.0
OperaDriver: HEAD
Can you help?
Thanks,
Craig

This happens right after OperaDriver attempts to start Opera, correct?  There's a 30 second handshake timeout when you start Opera.  Does starting Opera take over 30 seconds on your Windows setup?

I'm sorry but the priorities have changed at my workplace and I'm no longer working on this. I'm happy for you to close it. Sorry to waste your time.


Yield before calling put in pages sagas

Also had to fix the resetPageData action since it wasn't actually working before, since we didn't yield the put. Ah, typos.
Signed-off-by: Victor Porof<EMAIL_ADDRESS>

Coverage decreased (-0.3%) to 34.657% when pulling 7427e65765b422c9a038393249d7d13029e077e8 on victorporof:fix-yield-typo into e5af840dd03e092b03e20d1d39913e4e2b4176bd on mozilla:master.

Coverage decreased (-0.01%) to 34.921% when pulling 5877e9e29eaff3b97e5004283f71e57e295f64b1 on victorporof:fix-yield-typo into e5af840dd03e092b03e20d1d39913e4e2b4176bd on mozilla:master.


@googlebot I signed it!

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA
Individual signers

It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.

Corporate signers

Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
The email used to register you as an authorized contributor must also be attached to your GitHub account.

ℹ Googlers: Go here for more info.

Originally posted by @google-cla in https://github.com/google/it-cert-automation-practice/pull/7988#issuecomment-699272239

go to https://cla.developers.google.com/ site and verify your Github account to be able to contribute to open source projects of google and after verifying it just write @googlebot I signed it! in comment section.

@googlebot I signed it!

@googlebot I signed it!

@googlebot I signed it!

@googlebot I signed it!

I signed it!


[Android] Add locale support based on the language of running Android.

This is the first step of enabling locale pak support, including:
(1) Add repack script and actions to repack locale paks (eg, zh-CN.pak)
(2) Enable loading locale pak based on system language, this will fallback
to default locale packed in xwalk.pak when the locale pak is not provided.
(3) Enable XWalkCoreShell to support this. One same test is openning
http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_color
and checking the webkit string ('submit') based on Android's language.
The change does not affect other components (runtime, library...), and supporting
for other components will be added in future patches.
BUG=https://crosswalk-project.org/jira/browse/XWALK-1632

Close expired pull request


Next Friend Request form missing next friend name

(MC 319)

This was found on MoreETCWork branch, not tested on Main yet.


DX: RuleSet - convert null handling to soft-warning

closes #5537

Coverage decreased (-0.04%) to 91.863% when pulling 52d0a202a5e91ff38b318e36c6875d045a0d5c28 on keradus:2.18_RuleSet_soft_null_warning into 76af6ebe7cd4fa51c6e2de5b540286642229fa0b on FriendsOfPHP:2.18.


Sum type fold boilerplate

🚀 Feature request
Current Behavior
Writing a custom fold for every custom sum type is annoying. Is it possible to do better? For example:
type Empty = "empty";
type NonEmpty = "non-empty";
type ValueState = Empty | NonEmpty;

const emptyState: ValueState = "empty";
const nonEmptyState: ValueState = "non-empty";

// this bit is essentially dull and mechanical
const foldValueState = <A>(fns: {
  empty: (_: Empty) => A;
  nonEmpty: (_: NonEmpty) => A;
}) => (state: ValueState): A => {
  switch (state) {
    case "empty":
      return fns.empty(state);
    case "non-empty":
      return fns.nonEmpty(state);
    default:
      return unsafeAssertNever(state);
  }
};

Desired Behavior
Better ergonomics for writing the fold.
e.g. foldSumType2
const foldSumType2 = <A, B>(isA: Refinement<A | B, A>, isB: Refinement<A | B, B>) => <C>(fns: {
  onA: (a: A) => C;
  onB: (b: B) => C;
}) => (value: A | B) => {
  if (isA(value)) {
    return fns.onA(value);
  }

  if (isB(value)) {
    return fns.onB(value);
  }

  return unsafeAssertNever(value);
};

// simple contrived example

const fold = foldSumType2(isEmptyState, isNonEmptyState);
const isEmptyValueState = fold({ isA: constTrue, isB: constFalse });

This works ok, but it's sad that the record of case functions has keys like isA, isB etc. Ideally, you would specify meaningful names at the point of invoking foldSumType2. E.g.
foldSumType2("isEmpty", isEmptyState, "isNonEmpty", isNonEmptyState)({
  isEmpty: constTrue,
  isNonEmpty: constFalse,
})

Anyone got any sneaky type-level jiggery-pokery to make something like that work?

I do this in two ways, depending on the underlying data type. What's most important to me is that TypeScript complains if I'm missing a branch when folding or have too many, and these two ways help me achieve that.
With sum types:
// See https://stackoverflow.com/a/50125960/84816
export type DiscriminateUnion<T, K extends keyof T, V extends T[K]> = T extends Record<K, V>
  ? T
  : never;

export type MkPattern<T extends Record<K, string>, K extends keyof T, A> = {
  [V in T[K]]: (x: DiscriminateUnion<T, K, V>) => A;
};

type A = { type: 'A', message: string }
type B =  { type: 'B', origin: string }
export type Exception = A | B

export function foldException<A>(e: Exception, pattern: MkPattern<Exception, "type", A>): A {
  return (pattern[e.type] as any)(e);
}

I often also have an accompanying function foldException_ that is curried: foldException_(exception)(pattern).
With plain enum kind of types (that don't have a payload):
export type Style = "light" | "dark"

export function foldStyle<A>(style: Style, pattern: { [K in Style]: () => A }) {
  return pattern[style]();
}

I'm sure this could be simplified further and I would actually greatly appreciate this to be somewhat standardised like you suggest.

@grossbart's solution looks cool!
I would like to point out fp-ts-codegen playground as well, it creates common functions given an ADT.

One (very slight) annoyance with @grossbart DiscriminateUnion is that it requires every inhabitant of the sum type to be a type with a key on it. Imo, it would be better to not have that requirement, but that's subjective. foldSumTypeN just works through the Refinements in the order given, so there's no need to have a discriminator key on each case.

@leemhenson  How would you discriminate between values without a discriminant member?
i.e. if you had a type like:
type MySum = number | string;

how can you write a fold which allows you to supply functions for each type?
A first thought might be to convert the union to a tuple, but there's many issues with this approach outlined here: https://github.com/microsoft/TypeScript/issues/13298 (this whole thread discussion contains a lot of other info).
FWIW, I have a similar technique I've been using, which is slightly more concise, but limits the discrimant name: https://gist.github.com/pfgray/93b2330cf8abde662aa2fe99494bb9b0, which is used like:
type These<A, B> = ADT<{
  left: {left: A},
  right: {right: B},
  both: {left: A, right: B}
}>

and then a match function to fold over:
declare const myThese: These<string, number>;

pipe(
  myThese,
  match({
    left: ({left}) => 'Value is left',
    right: ({right}) => 'Value is right',
    both: ({left, right}) => 'Value is both'
  })
)

How would you discriminate between values without a discriminant member?

Sequential use of Refinement fns, e.g. foldSumType2 as mentioned above. Unless I'm misunderstanding the question!


Implement SA1119

Fixes #88.
This is a very tricky one. I tried it on Json.Net. It found a lot of violations but they all seem correct. The Code Fix was able to fix them all at once.
I am mostly compatible with StyleCop I think except for the one thing mentioned in #88. because of readability I don't report diagnostics for parenthised expressions in BinaryExpresions.

I rebased a few improvements ans bug fixes

I'm not merging this for now because I'd like to see this issue resolved. I'll post some additional comments in the code regarding less important "tweaks" that I would have just done myself during the merge, in case you want to fix them.
:exclamation: This diagnostic uses WellKnownDiagnosticTags.Unnecessary, which results in the diagnostic span getting grayed out in the editor. In the current implementation, the "location" for this diagnostic is the complete expression, where the actual unnecessary region is just the parentheses. During my experimentation, I attempted to use the additionalLocations parameter to Diagnostic.Create in order to specify two regions which are both unnecessary but belong to the same diagnostic instance:
private Diagnostic CreateDiagnostic(ParenthesizedExpressionSyntax syntax)
{
    Location primaryLocation = syntax.OpenParenToken.GetLocation();
    Location[] secondaryLocations = { syntax.CloseParenToken.GetLocation() };

    return Diagnostic.Create(Descriptor, primaryLocation, additionalLocations: secondaryLocations);
}

Unfortunately this did not have the expected result. Instead, I believe you will need to do the following:

Report SA1119 for only the open parenthesis.

Define a new diagnostic in the same analyzer:

Use DiagnosticSeverity.Hidden
Use the tags WellKnownDiagnosticTags.NotConfigurable and WellKnownDiagnosticTags.Unnecessary
Do not include the diagnostic in the array returned by SupportedDiagnostics. Hopefully this will cause Roslyn to not call the code at all when SA1119 is disabled. Since a NotConfigurable diagnostic is always enabled, it would override the setting for SA1119 and run this code anyway, even if the SA1119 portion was not shown in the editor UI.

Report the new hidden diagnostic for the closing parenthesis.

Update the code fix provider to trigger on just the SA1119 open parenthesis. The updated code might look like this (replacing the current call to FindNode through the declaration of syntax):
SyntaxToken openParenToken = root.FindToken(diagnostic.Location.SourceSpan.Start);
if (openParenToken.IsMissing || !openParenToken.IsKind(SyntaxKind.OpenParenToken))
    continue;

ParenthesizedExpressionSyntax syntax = openParenToken.Parent as ParenthesizedExpressionSyntax;

This is what it looks like with your changes:

You can barely see that the closing parenthesis is faded out. Im not sure if I like that better.
The code fix actually works without changing anything.

I believe that is a more accurate representation. However, if you want to do even more (shouldn't be much more than you just did), you could do the following:

Leave the hidden diagnostic you defined as it is.
Remove the WellKnownDiagnosticTags.Unnecessary tag from the main SA1119.
Report 3 diagnostics:

SA1119 is reported for the entire expression. Nothing is grayed out, and the green squiggle goes under the entire expression.
Report the hidden diagnostic for the close parenthesis, like you do now.
Report an additional instance of the same hidden diagnostic for the open parenthesis.

I believe you will like the UI of this much more.

I will do that. Actually it is not as trivial because I have to change a lot of unit tests too

:question: I thought you shouldn't need to change the tests, because the first character of the location where the SA1119 diagnostic is reported stays the same.

But the diagnostic now reports 3 diagnostics. 2 start at the same position but they are different and one is at the closing parenthesis

:frowning: Sorry about that.
Do you agree this is the right approach for the user experience?

Done.

Unfortunately I'm out of time today :disappointed: , but it shouldn't take me too long to review this again when I have more time. :+1:


Missing features

I don't mind testing and reporting back with the results if you add all the features from the current bash script. Currently, it is missing these exclusions.

https://github.com/RX64d/Debloat-without-linux-PC-Tuning/releases/tag/v0.0.2

This is still missing these exclusions.


Crash when shift clicking TE Portable Tank in Mob Relocator GUI

https://pastebin.com/raw/Rs9kQCjb
It seems that i can put tank in this slot

Using

industrialforegoing-1.11.2-0.3-14
CodeChickenLib-1.11.2-<IP_ADDRESS>4-universal
CoFHCore-1.11.2-<IP_ADDRESS>-universal
jei_1.11.2-<IP_ADDRESS>1
Tesla-1.11-<IP_ADDRESS>
tesla-core-lib-1.11.2-0.7.1
ThermalDynamics-1.11.2-<IP_ADDRESS>-universal
ThermalExpansion-1.11.2-<IP_ADDRESS>-universal
ThermalFoundation-1.11.2-<IP_ADDRESS>-universal

That slot id for power, does it happen when you put it in the right slot?

I can't put both the tank and bucket in liquid slot.

Not only Mob Relocator, but also all the machine that has power slot will crashing Minecraft if i put tank in power slot

Fixed in https://minecraft.curseforge.com/projects/tesla-core-lib/files/2447283


Support for lib target with different name than crate.

Hi there, :wave:
I'm trying to use this tool with rustls/webpki. That crate started as a fork of another crate, and so while the crate has the name rustls-webpki we configure the [lib] target with the name webpki.
When running check-external-types with this crate (using tip of main for both this tool and rustls-webpki) I get an error like:
Running rustdoc to produce json doc output...
[src/main.rs:101] err = Error {
    context: "error at src/main.rs:171:14",
    source: Error {
        context: "error at src/cargo.rs:72:65",
        source: Os {
            code: 2,
            kind: NotFound,
            message: "No such file or directory",
        },
    },
}
error at src/main.rs:171:14: error at src/cargo.rs:72:65: No such file or directory (os error 2)

The not found path isn't printed in the error context, but in this case it's looking for a file with the path "/home/daniel/Code/Rust/webpki/target/doc/rustls_webpki.json" to be produced by the rustdoc invocation, when the actual path produced by rustdoc due to the lib name config is "/home/daniel/Code/Rust/webpki/target/doc/webpki.json".
Would you be open to a PR that adds an additional command line argument to specify the lib name?
Alternatively, it looks like this information might also be present in the cargo metadata JSON, but digging it out might be a little gnarly (If I dig into the packages array to find the name == "rustls-webpki" entry, then there is an entry in the targets array where kind is [ "lib" ] and the target's name is webpki).

Hello 👋
I'm definitely open to a PR to fix this. Using cargo metadata would be preferable if possible, but falling back to reading the Cargo.toml also seems acceptable. At some point, it would be nice to add the tool's config directly to the Cargo.toml (see #48), so we'll be reading Cargo.toml at that point anyway.


Replace soon-to-be-deprecated fields

There are several fields that are using deprecated fields, which should be fixed e.g.
commons.js:1696 Error: You are accessing BasePackage#data which is now deprecated in favor of referencing schema fields directly on the BasePackage instance.
Deprecated since Version 10
Backwards-compatible support will be removed in Version 12
    at logCompatibilityWarning (commons.js:1685)
    at System.get data [as data] (commons.js:11720)
    at heart.js:1
    at new Promise (<anonymous>)
    at Object.fn (heart.js:1)
    at Function.#call (foundry.js:724)
    at Function.callAll (foundry.js:681)
    at Game.setupGame (foundry.js:7854)
    at async Game._initializeGameView (foundry.js:8899)
    at async Game.initialize (foundry.js:7727)

Fixed in v0.8.3


[SVE] TC-MCORE-FS-1.3: Timeout too low for device discovery & commissioning from DUT

Reproduction steps
In TC-MCORE-FS-1.3, a TH_SERVER_NO_UID (an example app with no unique ID) is commissioned onto TH's fabric, and DUT_FSA's aggregator parts list is checked before the commissioning window on TH_SERVER_NO_UID is opened using TH's fabric (this is in response to CommissionerControlCluster::CommissionNode command as part of reverse commissioning between TH and DUT). Right after that, the DUT is expected to discover and commission TH_SERVER_NO_UID and just 2s after that, the DUT's parts list is reread to determine whether the new device has been made available as a bridged node.
This timeout is pretty short because right after issuing the CommissionerControlCluster::ReverseOpenCommissioningWindow command, the DUT is expected to discover the newly advertised _matterc._udp service, resolve its address, establish PASE, install the DUT_FSA's fabric, subscribe (& perform other necessary interactions during onboarding) before making it available as a newly accessible bridged node on the DUT_FSA's aggregator parts list, and some of these operations can take a bit of time.
Bug prevalence
Almost always on our DUT
GitHub hash of the SDK that was being used
56c0bd8
Platform
other
Platform Version(s)
No response
Type
Test Improvement
Testing
Hardware validated, Platform validated
(Optional) If manually tested please explain why this is only manually tested
No response
Anything else?
No response

@samadDotDev can you update the PR with the comments ?


[Enhancement] array_agg supports distinct (backport #29907)

[Enhancement] array_agg supports distinct

Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.1
[ ] 3.0
[ ] 2.5
[ ] 2.4

[FE Incremental Coverage Report]
:disappointed: fail : 46 / 62 (74.19%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/SplitAggregateRule.java
0
5
00.00%
[282, 283, 284, 288, 289]

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/RewriteMultiDistinctRule.java
1
7
14.29%
[88, 188, 189, 190, 192, 193]

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/RewriteMultiDistinctByCTERule.java
1
2
50.00%
[288]

:large_blue_circle:
com/starrocks/sql/analyzer/FunctionAnalyzer.java
3
4
75.00%
[165]

:large_blue_circle:
com/starrocks/sql/analyzer/ExpressionAnalyzer.java
12
15
80.00%
[872, 879, 880]

:large_blue_circle:
com/starrocks/catalog/FunctionSet.java
19
19
100.00%
[]

:large_blue_circle:
com/starrocks/sql/plan/PlanFragmentBuilder.java
6
6
100.00%
[]

:large_blue_circle:
com/starrocks/sql/analyzer/DecimalV3FunctionAnalyzer.java
1
1
100.00%
[]

:large_blue_circle:
com/starrocks/sql/analyzer/AstToStringBuilder.java
1
1
100.00%
[]

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/GroupByCountDistinctRewriteRule.java
2
2
100.00%
[]

[BE Incremental Coverage Report]
:disappointed: fail : 19 / 49 (38.78%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exprs/agg/array_agg.h
8
37
21.62%
[35, 37, 38, 50, 52, 54, 57, 58, 61, 63, 64, 65, 66, 67, 68, 70, 71, 74, 75, 77, 80, 81, 84, 86, 87, 88, 90, 91, 92]

:large_blue_circle:
src/exec/aggregator.cpp
2
3
66.67%
[398]

:large_blue_circle:
src/exprs/agg/factory/aggregate_resolver_avg.cpp
9
9
100.00%
[]

[BE Incremental Coverage Report]
:disappointed: fail : 19 / 49 (38.78%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exprs/agg/array_agg.h
8
37
21.62%
[35, 37, 38, 50, 52, 54, 57, 58, 61, 63, 64, 65, 66, 67, 68, 70, 71, 74, 75, 77, 80, 81, 84, 86, 87, 88, 90, 91, 92]

:large_blue_circle:
src/exec/aggregator.cpp
2
3
66.67%
[398]

:large_blue_circle:
src/exprs/agg/factory/aggregate_resolver_avg.cpp
9
9
100.00%
[]

[BE Incremental Coverage Report]
:disappointed: fail : 19 / 49 (38.78%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exprs/agg/array_agg.h
8
37
21.62%
[35, 37, 38, 50, 52, 54, 57, 58, 61, 63, 64, 65, 66, 67, 68, 70, 71, 74, 75, 77, 80, 81, 84, 86, 87, 88, 90, 91, 92]

:large_blue_circle:
src/exec/aggregator.cpp
2
3
66.67%
[398]

:large_blue_circle:
src/exprs/agg/factory/aggregate_resolver_avg.cpp
9
9
100.00%
[]

[FE Incremental Coverage Report]
:disappointed: fail : 50 / 66 (75.76%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/SplitAggregateRule.java
0
5
00.00%
[282, 283, 284, 288, 289]

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/RewriteMultiDistinctRule.java
1
7
14.29%
[88, 188, 189, 190, 192, 193]

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/RewriteMultiDistinctByCTERule.java
1
2
50.00%
[288]

:large_blue_circle:
com/starrocks/sql/analyzer/FunctionAnalyzer.java
3
4
75.00%
[165]

:large_blue_circle:
com/starrocks/sql/analyzer/ExpressionAnalyzer.java
16
19
84.21%
[881, 888, 889]

:large_blue_circle:
com/starrocks/catalog/FunctionSet.java
19
19
100.00%
[]

:large_blue_circle:
com/starrocks/sql/plan/PlanFragmentBuilder.java
6
6
100.00%
[]

:large_blue_circle:
com/starrocks/sql/analyzer/DecimalV3FunctionAnalyzer.java
1
1
100.00%
[]

:large_blue_circle:
com/starrocks/sql/analyzer/AstToStringBuilder.java
1
1
100.00%
[]

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/GroupByCountDistinctRewriteRule.java
2
2
100.00%
[]


Edit Distance in DP

💥 Proposal
Find minimum number of edits ( Insert, Remove, Replace) required to convert one string to another.
Suppose we have string1 and string2
Input:   string1 = "adft", string2 = "adsft"
Output:  1
We can convert string1 into string2 by inserting a 's'.
Input:   string1 = "cat", string2 = "car"
Output:  1
We can convert string1 into string2 by replacing 't' with 'r'.
Input:   string1 = "sundays", string2 = "monday"
Output:  3
Have you read the Contributing Guidelines on Pull Requests?
Yes
Language Supported:

C [@nutanaarohi123]
CPP [@Joshitha18]
Python [@santushtisharma10]
C#
Java [@AltCtrlDel1999]
GO
JavaScript

I would like to work on it in C++ @Kajol-Kumari @Abhijit2505

I would like to work this in Java @Joshitha18 @Abhijit2505

@Joshitha18 edit your proposal with more information.

@plazzy99 check it

@Joshitha18 go with C++
Happy Coding!

I want to work on this in java

I want to work on Java...Can u please assign me. @Kajol-Kumari @Abhijit2505 @plazzy99

Hey @salonilakhotia as @AltCtrlDel1999 has already commented to take up with java we can't assign it to you for java. Please feel free to take up any other language.
@AltCtrlDel1999 please go with java.

@SKAUL05 @Kajol-Kumari I would like to work on this issue in Python

@SKAUL05 @Kajol-Kumari I would like to work on this issue in Python

@santushtisharma10 go ahead with python.

I would like to work on this issue in C.pls assign the task. @SKAUL05

I would like to work on this issue in C.pls assign the task. @SKAUL05

Go AHead


Symbol not visible with Windows 10 dark theme

As in the title, the result icons in the right column are not visible when using Windows 10 dark theme. The icons only appear when the mouse is hovering over the result.

Thanks for the report! Ill take a look at this today.


Storage Adapters

With this PR the place where JWTs are storaged can be determinated using storage adapters.
Storage adapters must implement StorageAdapterInterface.
There are two adapters already implemented, LocalStorageAdapter and MemoryStorageAdapter and by default LocalStorageAdapter is used.
Other adapters can be implemented and used in the client
const client = ApiProvider.get('bedita', {
    baseUrl: 'https://api-bedita.example.com',
    clientId: '123456',
    clientSecret: 'abcdefg',
    storageAdapter: new InnoDbAdapter(), // where class InnoDbAdapter implements StorageAdapterInterface
});

The StorageAdapterInterface defines async methods using Promise to better adapt to any storage used.

Codecov Report

Merging #24 (06ea780) into beta (cbb93c3) will decrease coverage by 1.73%.
The diff coverage is 71.71%.

@@            Coverage Diff             @@
##             beta      #24      +/-   ##
==========================================
- Coverage   85.13%   83.40%   -1.74%
==========================================
  Files          12       15       +3
  Lines        1083     1223     +140
  Branches      105      118      +13
==========================================
+ Hits          922     1020      +98
- Misses         63       92      +29
- Partials       98      111      +13

Impacted Files
Coverage Δ

src/services/adapters/storage-adapter-interface.ts
0.00% <0.00%> (ø)

src/index.ts
80.00% <75.00%> (-3.34%)
:arrow_down:

src/interceptors/auth-interceptor.ts
90.19% <80.00%> (+1.96%)
:arrow_up:

src/services/storage-service.ts
91.60% <80.00%> (+0.45%)
:arrow_up:

src/interceptors/refresh-auth-interceptor.ts
93.02% <85.71%> (+4.65%)
:arrow_up:

src/services/adapters/memory-storage-adapter.ts
86.66% <86.66%> (ø)

src/services/adapters/local-storage-adapter.ts
86.84% <86.84%> (ø)

src/bedita-api-client.ts
86.78% <92.85%> (-0.24%)
:arrow_down:

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


Introduce react-query with the current member name

This introduces the react-query package to the project and uses the currently-signed-in user's member name as an example. This particular PR showcases how much more efficient react-query can make our web app in terms of network request load.
Before, every link you clicked on would trigger another API call to lookup the name of the currently-logged-in user by their EOS account name. That's a lot of API calls for data we already have. Now (and without the introduction of a bunch of redux boilerplate) it looks it up once--when the user logs in. And when they sign out, the cache is cleared.
There are a lot of places in our app that we can take advantage of this. For example, in lists of members in invitations lists, we can set up a slightly more advanced implementation to keep a cache of all other user names and reduce fetch load there too.
react-query will serve us well in other ways too--pagination comes to mind...or infinite scroll. And it really does replace the need much of the time for solutions like redux when dealing with fetched information.
More here: https://react-query.tanstack.com/

Oh, I should mention the incredible dev tools too. It will show you the cache, the state of various queries, when things are fetching under the hood, etc. Great co-pilot. It can be accessed by clicking on the react-query icon bottom left of the web app window.
Once the React app is deployed in PROD mode, it is disabled.
Also, there's NextJS and SSR support...but I haven't played with that part of it yet.


OCM-2649 | fix: add 'rosa verify network' help message

$ rosa verify -h
Verify resources are configured correctly for cluster install

Usage:
  rosa verify [command]

Available Commands:
  network          Verify VPC subnets are configured correctly
  openshift-client Verify OpenShift client tools
  permissions      Verify AWS permissions are ok for non-STS cluster install
  quota            Verify AWS quota is ok for cluster install
  rosa-client      Verify ROSA client tools

Flags:
  -h, --help   help for verify

Global Flags:
      --color string   Surround certain characters with escape sequences to display them in color on the terminal. Allowed options are [auto never always] (default "auto")
      --debug          Enable debug mode.

Use "rosa verify [command] --help" for more information about a command.

/lgtm


⚠ Coffeenow has degraded performance

In 84ba0bd, Coffeenow (https://coffeenow.ph) experienced degraded performance:

HTTP code: 200
Response time: 7803 ms

Resolved: Coffeenow performance has improved in 10f00fd after 17 minutes.


Branch fix app name

Codecov Report
Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines
Patch %
Lines

src/main/java/seedu/address/MainApp.java
0.00%
1 Missing :warning:

Files with missing lines
Coverage Δ
Complexity Δ

src/main/java/seedu/address/MainApp.java
0.00% <0.00%> (ø)
0.00 <0.00> (ø)


Add gvlid value for OperaAds adapter

🏷 Type of documentation

[x] update bid adapter

📋 Checklist

[x] Related pull requests in prebid.js or server are linked -> prebid js PR10585

@yuansi-piao - please resolve the conflict and we'll get this merged.

@yuansi-piao can you resolve the merge conflicts and the one issue? Then this is good to merge

Fixing merge conflicts by opening a new PR https://github.com/prebid/prebid.github.io/pull/5225
Closing this one.


Add Colorful

A curated list of awesome resources to choose your next color scheme.

Please read the instructions for creating a new list, contributing guidelines and the awesome manifest.
Especially this part:

Wait at least a couple of weeks after creating a list before submitting to give it a chance to mature.

Ping me here in a few weeks and I'll reopen ;)


Added Views • News Redesigned

Added my app Views • News Redesigned to the apps which are currently using this library

Thank you @aidev1065! Happy to hear you're using WhatsNew 😄 🎉


Add try catch for MalformedRequestBodyException to allow return of 40…

…0 status

@jerv13 mhmm, I think it would be better to let the new Expressive 1.1 error handler catch this exception and generate the error response through error response generator, so that the developers can easily customize the error message, format and such.

Thanks for your contribution @jerv13, but a similar change had been proposed already (by me, actually) and was changed after review to the behavior you see now.
Since the request is effectively invalid once the malformed body has been encountered, we prefer to let the exception bubble up and either be handled by the developer explicitly, or automatically end up resulting in an error response, rather than allowing it to continue through the middleware pipeline.


Add stuff to Resources

Which platform(s) does your issue occur on?
BOTH
Hi,
I need to add code to AndroidManifest.xml and add some file to values, I've tried to copy with before-prepare and after-prepare > AndroidManifest.xml is updated correctly but the change is not exposed to the runtime!
Do you have any suggestion ?
Thanks

Finally I found the .. it is to go to tools/assets/App_Resources/Android/src/main


Vision Elements

Vision Elements is a seperate project that aims to solve more specific and opinionated issues such as:

State management
Pagination
Filling
Borders

This should only require a few changes:

[ ] Removal of fill and borders - no major change because both are marked with @ApiStatus.Experimental
[ ] GuiLike (or similar) interface?

Some of these features would be too disjointed unless integrated directly into the library.

Could this be repurposed to contain only reusable Gui components? e.g. pagination (can't think of anything else)

The required changes would also change

This should only require a few changes:

[ ]  Removal of fill and borders - no major change because both are marked with @ApiStatus.Experimental

Probably don't need to go.

[ ]  GuiLike (or similar) interface?

Depends on if the components have their own APIs?
For example, with pagination, would we have an API like (ignore the API, just the get the idea and the return type of the factory)
public final class PaginatedGui {
    private PaginatedGui() {}

    public static Gui.Chest create(...);
}

public final class PaginatedGui implements GuiLike {
    public static PaginatedGui create(...);

    public void setPage(int page);
}

If we were to choose GuiLike (and presumably ButtonLike), we could do so without changing the type in the new slot methods without breaking the binary or source interfaces (since they aren't stable as of pre 1.1).


Add new Language - Update index.mdx

This PR adds a new translation to Português (pt-BR)
can view here

Wow, thank you so much ❤


V3->V4/5 slow performance of QpEncoder->_encodeString

When migrating from V3 to V4 or V5 library we've encountered a major performance issue, while sending our html newsletter (65kB). Processing of each email jumped from 2 seconds to about 6 seconds.
Profiler took me to the QpEncoder->_encodeString, which reads only 4 bytes by default. Increasing default value from 4 to 1024 (as suggested by some other user) puts this back to normal performance.
Why does it read only 4 bytes by default and if increasing this value to 1024 producess any side effects?

Is there any progress on this issue? Or workaround/configuration change to make latest version perform with the same speed as V3?
Any respone would be appreciated.

FreeBSD 8.1, PHP 5.3.16
source&destination charsets are both UTF-8
loaded extensions: Core, date, ereg, libxml, pcre, Reflection, SPL, hash, session, apache2handler, bcmath, bz2, ctype, curl, dom, ftp, standard, iconv, json, mbstring, mcrypt, mysqlnd, mysqli, pcntl, PDO, pdo_mysql, posix, mysql, soap, tokenizer, xml, xmlreader, xmlwriter, zlib, filter, gd, openssl, SimpleXML, xmlrpc, zip, fileinfo, memcached, memcache, geoip, imap, Phar, mhasha

if you can move up to php > 5.4.7, the issue is solved (switched to cbased
qpencoder)
Regards
On Tue, May 5, 2015 at 6:49 AM, zevnikrok<EMAIL_ADDRESS>wrote:

FreeBSD 8.1, PHP 5.3.16
source&destination charsets are both UTF-8
loaded extensions: Core, date, ereg, libxml, pcre, Reflection, SPL, hash,
session, apache2handler, bcmath, bz2, ctype, curl, dom, ftp, standard,
iconv, json, mbstring, mcrypt, mysqlnd, mysqli, pcntl, PDO, pdo_mysql,
posix, mysql, soap, tokenizer, xml, xmlreader, xmlwriter, zlib, filter, gd,
openssl, SimpleXML, xmlrpc, zip, fileinfo, memcached, memcache, geoip,
imap, Phar, mhasha
—
Reply to this email directly or view it on GitHub
https://github.com/swiftmailer/swiftmailer/issues/550#issuecomment-98948995
.

--
Xavier De Cock
GPG Fingerprint: 93CA EE3F 9F57 5BE1 AE4A  794D 3C74 CA9E E7A5 0C1B
GPG Id: 0xE7A50C1B

I can also see this problem |  PHP 5.6.13-1 (opcache curl igbinary intl memcache pdo_mysql readline tidy xsl mysqlnd gd imagick mcrypt mysqli pdo_sqlite redis twig blackfire pdo geoip imap memcached mysql pspell sqlite3 xmlrpc)
44567 Calls (QpEncoder->_nextSequence) for 18 e-mails

I will try this again with $this->message = Swift_Message::newInstance(); $this->message->setEncoder(Swift_Encoding::get8BitEncoding());  ...

Unfortunately I still haven't been able to migrate to newer version.

@zevnikrok maybe you can test my fork https://github.com/voku/swiftmailer so that I know if there is a performance improvment with this changes? thx.
-> compare -> https://github.com/swiftmailer/swiftmailer/compare/5.x...voku:5.x

with "Swift_CharacterStream_MbCharacterStream" (https://github.com/giggsey/swiftmailer/commit/30da017ff51eed9f152b765b019693883dd989b4) I could increase the performance about ~60% ...

@voku Can you submit a PR for the changes? I would be much easier to review and test. Thanks.


Initialize instance variables

Fixes #1 by initialize _vars and _all_vars as instance variables and not as class attributes.

Thank you so much for this.
I think I've been unconsciously interpreting the class attributes as defaults. Baffling, since I use them correctly for singletons and such.
Either way, this is extremely helpful.


Library Compilation Issues

Addresses #640

Support for new GLIBC: Fixed issue with _BSD_SOURCE, now defined in C/CXXFLAGS
Changed order of linking
Added std:isnan
Fixed typo (_BSG_SOURCE  -> _BSD_SOURCE)

@mrutt92, LGTY?

One other issue I've run into is the use of let in examples/regression.mk. Seems that ubuntu uses dash as its default shell, and let is a bash builtin.

Yep - not sure there's something I can do about that right now?

Instead of let "total+=1"; \ use total=$((total+1)); \ according to stack overflow.

Cool. Submit a PR?

Sure


[SPARK-8446] [SQL] Add helper functions for testing SparkPlan physical operators

This patch introduces SparkPlanTest, a base class for unit tests of SparkPlan physical operators.  This is analogous to Spark SQL's existing QueryTest, which does something similar for end-to-end tests with actual queries.
These helper methods provide nicer error output when tests fail and help developers to avoid writing lots of boilerplate in order to execute manually constructed physical plans.

Merged build triggered.

Merged build started.

Test build #35149 has started for   PR 6885 at commit c60a44d.

Test build #35149 has finished for   PR 6885 at commit c60a44d.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
class SortSuite extends SparkPlanTest
class SparkPlanTest extends SparkFunSuite

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #35174 has started for   PR 6885 at commit a80f9b0.

@marmbrus, I've updated this patch based on your PR and have removed a bit of dead code.  What are your thoughts on backporting this to at least 1.4 so that we can use it when writing regression tests?

Merged build triggered.

Merged build started.

+1 on backporting to branch-1.4

Test build #35177 has started for   PR 6885 at commit f8ce275.

Test build #35177 has finished for   PR 6885 at commit f8ce275.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
class SortSuite extends SparkPlanTest
class SparkPlanTest extends SparkFunSuite

Merged build finished. Test FAILed.

That Python test failure looks like it's caused by a flaky test or an environment issue, not any changes in this patch.
@marmbrus, did you have any other review comments or is this good to merge?  If you'd like, I can handle the backport cherry-pick.

Test build #35174 has finished for   PR 6885 at commit a80f9b0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

LGTM

Thanks!  Merged to master and branch-1.4


url_for_pagination cannot handle nested resources

I was trying to set up a nested resource:
e.g.
resources "/documents", DocumentController, only: [:index, :create, :show] do
    resources "/pages", DocumentPageController, only: [:index]
end

and creating a special view:
defmodule MyApp.API.DocumentPageView do
  use JSONAPI.View, type: "document_pages"

but in the link section the url_for_pagination (and therefore all default links) point to the /api/v1/document_pages instead of /api/v1/documents/1/document_pages.
Is there a way how to point the helper to the right URL without hardcoding?

I don't know if you are still looking for a solution to this but there is a way to do this (I think). It is perhaps not the cleanest way but it works:
In your controller:
def index(conn, %{user_id: user_id}) do
  user = YourApp.Users.get_user!(user_id)
  messages = YourApp.Messages.get_messages_for_user(user)

  render(conn, "index.json", data: messages, nested_path: "/users/#{user_id}")
end

in your view file:
def url_for(_, conn) do
  if Map.has_key?(conn.assigns, :nested_path) do
    "#{conn.assigns.nested_path}#{namespace()}/#{type()}"
  else
    "#{namespace()}/#{type()}"
  end
end

This will produce this json:
{
    "data": [],
    "included": [],
    "links": {
        "first": "/users/1/messages?page%5Bpage%5D=1",
        "last": "/users/1/messages?page%5Bpage%5D=0",
        "next": null,
        "prev": null,
        "self": "/users/1/messages"
    }
}

However, as an addition, I would like to add that it is questionable if you should nest resources in the context of a JSONapi anyway. See this discussion:
https://stackoverflow.com/questions/45574823/should-nested-relationships-be-reflected-in-urls-for-json-api


Clarify Batch documentation for describe_jobs

This change clarifies that the input to describe_jobs should be a list of strings rather than a space-separated string.

Codecov Report

Merging #1705 into develop will decrease coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1705      +/-   ##
===========================================
- Coverage    92.45%   92.42%   -0.04%
===========================================
  Files           53       53
  Lines         9871     9871
===========================================
- Hits          9126     9123       -3
- Misses         745      748       +3

Impacted Files
Coverage Δ

botocore/credentials.py
98.43% <0%> (-0.4%)
:arrow_down:

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 f447e18...af8dfdc. Read the comment docs.

Thanks for reporting.  Per our contributing guidelines the service-2.json files come from an upstream source so we can't accept PRs to those files.  I've cut a ticket internally to get our doc team to update this.  Thanks again.

The update is now live.


adding running app functionality

Feel free to adjust as you see fit.
This adds the ability to track whether an application is running. I have tested it on my box using netflix and bbc iplayer.

Good idea, thanks for the contribution. Merging and will update doc.


Miri reports "unsupported operation: unable to turn pointer into raw bytes" in futures-lite-1.12.0

failures:

---- src/stream.rs - stream::StreamExt::last (line 1325) stdout ----
Test executable failed (exit code 1).

stderr:
error: unsupported operation: unable to turn pointer into raw bytes
    --> /home/ben/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:1096:9
     |
1096 |         copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
     |
     = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support

     = note: inside `std::ptr::read::<std::option::Option<i32>>` at /home/ben/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:1096:9
     = note: inside `std::mem::replace::<std::option::Option<i32>>` at /home/ben/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/mem/mod.rs:904:22
     = note: inside `std::option::Option::<i32>::take` at /home/ben/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/option.rs:1557:9
note: inside `<futures_lite::stream::LastFuture<futures_lite::stream::Empty<i32>> as futures_lite::Future>::poll` at /tmp/futures-lite-1.12.0/src/stream.rs:2735:44
    --> /tmp/futures-lite-1.12.0/src/stream.rs:2735:44
     |
2735 |                 None => return Poll::Ready(this.last.take()),
     |                                            ^^^^^^^^^^^^^^^^
note: inside closure at src/stream.rs:11:20
    --> src/stream.rs:1333:20
     |
11   | assert_eq!(s.last().await, None);
     |                    ^^^^^^
     = note: inside `<std::future::from_generator::GenFuture<[static generator@src/stream.rs:6:24: 12:2]> as futures_lite::Future>::poll` at /home/ben/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/future/mod.rs:91:19
     = note: inside `spin_on::spin_on::<std::future::from_generator::GenFuture<[static generator@src/stream.rs:6:24: 12:2]>>` at /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/spin_on-0.1.1/src/lib.rs:78:38
note: inside `main::_doctest_main_src_stream_rs_1325_0` at src/stream.rs:6:1
    --> src/stream.rs:1328:1
     |
6    | / spin_on::spin_on(async {
7    | | let s = stream::iter(vec![1, 2, 3, 4]);
8    | | assert_eq!(s.last().await, Some(4));
9    | |
10   | | let s = stream::empty::<i32>();
11   | | assert_eq!(s.last().await, None);
12   | | });
     | |__^
note: inside `main` at src/stream.rs:13:3
    --> src/stream.rs:1335:3
     |
13   | } _doctest_main_src_stream_rs_1325_0() }
     |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to previous error

I'm very lost here. The only hypothesis I can come up with is that a dependency has written pointer bytes into that Option<i32>, but even if that is the case it doesn't make sense that Miri would report an unsupported operation. This should be a type validation failure, right?

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d70742104058788577a5ec1a412c31c0 is a minimal reproduction of this with only futures_core and no unsafe code. (I'll see if I can get it failing using AsyncIterator since apparently we have that in std)
This seems very cursed because the order the tests in main happen is important. If you swap them, miri passes. If you do the vec![4] one twice, and then the empty one, miri complains on the empty one. If you do it in 2 different fuzzing_block_on's, miri passes. If you use the array's into_iter, miri passes.

I don't pretend to understand this, but we've tried a few things. Option<u32>::Some(0) does not trip the bug. Result<u32, ()>::Err(()) trips it, but any Ok doesn't. Option<NonZeroU32> and Option<NonZeroU64> and Option<(u16,u16,u16)> don't. I'm at my wits end.

This might be an instance of https://github.com/rust-lang/rust/issues/87184? It would be the first instance of that Miri limitation in the real world.

Specifically it seems like a read of type Option<i32> is used to read data that has provenance. Moro only support reasing data with provenance when reading an entire pointer-sized chunk of data.
Arguably, under strict provenance, that is UB since it constitutes a ptr-to-int transmutation.

I suspect this is something about the two local variables in
async {
        LastFuture { last: &0u32 }.await;
        LastFuture { last: Option::<u32>::None }.await;
    }

being stored in overlapping parts of the generator, and somehow the initialization with Option::<u32>::None not overwriting the old data properly. But setting the discriminant to None should overwrite parts of that pointer which in Miri should clear all the provenance (that's the bug I linked above) so the story doesn't entirely work out.

This example shows what I would expect Miri to do in that case. That's still surprising, but note that you only get an uninit error when looking at the bytes of Option<i32> that are padding because the active variant is None -- so this is dubious at best.
In the async example, (a) the error is a different one (there still is provenance there!) and (b) it happens already when accessing the data as Option<i32>, not just when looking at the padding.

Hm, no, a partial overwrite of a pointer is not happening in this example. Odd.

Okay I think what actually happens is that the fields storing the LastFuture<&i32> and LastFuture<Option<i32>> are not at the same offset, they just overlap. LastFuture<&i32> is at offset 8 into the generator, LastFuture<Option<i32>> at offset 4. (They have different alignment, that's why layout computation ends up differing.)
It also looks like those things are initialized in-place (rather than constructed elsewhere and copied into the generator), but this is the part I am least sure about.
Now the following happens: when the first future is created, the underlying allocation looks like this:
alloc605 (stack variable, size: 16, align: 8) {
    00 __ __ __ __ __ __ __ ╾0x23534[a655]<untagged> (8 ptr bytes)╼
}

The first byte is the discriminant, then padding, then the pointer of type &i32.
Now we in-place initialize a None::<i32> at offset 4 in here. That writes just the discriminant, meaning the allocation is now
alloc605 (stack variable, size: 16, align: 8) {
    00 __ __ __ 00 00 00 00 ╾0x23534[a655]<untagged> (8 ptr bytes)╼ │ .░░░....╾──────╼
}

Finally, we read an Option<i32> at offset 4. That type has a ScalarPair layout, consisting of two 4-byte-sized pieces. We read the first scalar, and all is fine. We read the second scalar, and those are just 4 bytes of an 8-byte pointer, which is not representable in a Miri Scalar and hence we get an "unsupported" error. (That's [part of] what https://github.com/rust-lang/rust/issues/87184 is about.)
What I am not sure about is why the Deinit that @JakobDegen recently added doesn't remove the pointer. I also haven't seen the in-place initialization of the None::<i32> in the MIR trace. But still, all evidence indicates that this is what happens.

Resolving https://github.com/rust-lang/rust/issues/96158 will fix this problem, since then Miri will no longer (incorrectly) try to use the more efficient representation for types like Option<u32>.

Ah, I figured out the puzzle with the in-place init as well: it's not in-place init, it's that writing an 'uninit' Scalar forgets to clear the provenance.
If it had cleared the provenance, the unsupported error wouldn't have happened, and it would have just treated that memory as uninitialized. Here's the stand-alone reproducer for that (needs -Zmiri-disable-validity):
use std::mem::MaybeUninit;

fn main() { unsafe {
    let mut x = [MaybeUninit::<i32>::zeroed(); 3];
    // Put in a ptr into the last 8 bytes.
    x.as_mut_ptr().offset(1).cast::<&i32>().write_unaligned(&0);
    // Overwrite parts of that pointer with 'uninit' through a Scalar.
    let ptr = x.as_mut_ptr().offset(1).cast::<i32>();
    *ptr = MaybeUninit::uninit().assume_init();
    // Reading this back should hence work fine.
    let _c = *ptr;
} }

This is a nice find -- it uncovered two different rather subtle bugs, each one of which would have masked the other if it had been fixed at some point.

This is a nice find

you should have seen me absolutely losing it in the rust lang community discord for a good 2 hours trying to minimize this and work out what was going on
it was great fun, if being absolutely bewildered is your idea of fun, which mine is :D

@5225225 your minimized example was extremely helpful for me to further narrow this down, so thanks a ton for doing that legwork! I can only imagine how crazy this behavior must have seemed without a clear mental model of what happens inside Miri.
(Also I am not sure if my explanation of the problem above made much sense. I'm happy to explain more of you are curious, but we should probably take that to Zulip.)