bug: which-key considers empty lazy.nvim key bindings as conflicts

Did you check docs and existing issues?

[X] I have read all the which-key.nvim docs
[X] I have searched the existing issues of which-key.nvim
[X] I have searched the exsiting issues of plugins related to this issue

Neovim version (nvim -v)
0.8.3
Operating system/version
macOS 13.2.1
Describe the bug
The default which-key's checkhealth behaviour displays spurious warnings about conflicting bindings, when lazy.nvim happens to bind some keys for lazy-loading. This is surprising, because I'd expect that which-key would be able to ignore those with ignore_missing set to true as those keybindings should not have any label attached (or maybe they do, and then, perhaps, it's a problem on lazy.nvim's side).
This is related to https://github.com/folke/which-key.nvim/issues/405, but the other way around. It's nice that Lazy.nvim's keymaps with an action show up in which-key, but it would also be nice if those keymaps that do not have an action beyond lazy-loading could be automatically ignored.
Steps To Reproduce

Use the following Lazy.nvim plugin spec:{ 'tpope/vim-unimpaired',
  keys = {'[', ']'},
},
{ 'folke/which-key.nvim',
  config = function() require'which-key'.setup{ignore_missing=true} end,
},

Run :checkhealth which_key

You'll see:
which_key: health#which_key#check
========================================================================
## WhichKey: checking conflicting keymaps
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"]"**
  - INFO: rhs: ` `
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"["**
  - INFO: rhs: ` `

Expected Behavior
which-key should not report any warnings.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "folke/which-key.nvim",
    config = function() require'which-key'.setup{ignore_missing=true} end,
  },
  -- add any other plugins here
  { 'tpope/vim-unimpaired',
      keys = {'[', ']'},
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

hello I am very new to nvim and started using lazyvim also having this problem is there any workaround to pass this error , doing checkhealth with error upsetting

hello I am very new to nvim and started using lazyvim also having this problem is there any workaround to pass this error , doing checkhealth with error upsetting

the same issue occurs with macOS 14.1.1 and Ubuntu 22.04.3 LTS

hello I am very new to nvim and started using lazyvim also having this problem is there any workaround to pass this error , doing checkhealth with error upsetting

macOS 14.2.1

Same here too.  I personally like that functionality and would love to keep it if possible 😃

hello I am very new to nvim and started using lazyvim also having this problem is there any workaround to pass this error , doing checkhealth with error upsetting

Try launching nvim -V1 and running the :checkhealth, it should show the command after `

Allright, I've added the same health check again in v3, but with some clearer explanation of what actually was checked.

This is part of v3. For more details see https://github.com/folke/which-key.nvim/pull/624


Stateless Mode

@vaadin-bot commented on Fri Jan 28 2011
Originally by @jojule

The proposal outlines a new operation mode for Vaadin applications where HttpSession or server-side state is not needed for applications at all. This is an optional operation mode that could widen the scope of application where Vaadin could be used, not a default or recommended mode of operation.
Enabling
Set parameter stateless = true in web.xml for the ApplicationServlet.
Implementation
After each http-request, the application state is serialized and removed from the HttpSession. The serialized application state sent along UIDL to the client. Client stores the application state in a javascript variable. Whenever the client contacts the server, it also sends the application state along the request parameters.
Security
The implementation must guarantee that the client can not modify the application state. This is done by maintaining a random salt in server and adding a SHA-2 checksum calculated from the serialized state+salt in the end of the state.
For many applications, the state might not contain any secrets that can not be revealed to the client. Still in some cases the developer chooses to store some server-side secrects (such as password for DB connection). In order to keep the state secret, the state is encrypted with a random key stored in the server using AES-256.
Open question: how the key and salt are stored and shared between the servers in clustered configurations?
Optimizations
The serialization state size can grow quite large. Thus the state should be compressed with GZIP before sending to client.
The effect of encryption to performance should be measured and if the effect is noticeable, a parameter for turning encryption off should be added to web.xml. Still the encryption must be on by default.
Quick tests show for a really small application, state can be around 8kb, but it can be compressed to 3.5kb with GZIP. Each additional TextField (with a random caption ("foo" + Math.random()) adds the size of the serialized session by 134 bytes. When GZIP is used, the state size per TextField goes down to 13 bytes and thus is just the size of the captions.
Research if using a stored seed copy of an app after init() as a seed to compression algorithm would make the compression more efficient. One way to initialize the compression dictionary is to use http://download.oracle.com/javase/1.5.0/docs/api/java/util/zip/Deflater.html#setDictionary(byte[]).
Use cases

Use in large public facing web-sites where per user session is not allowed. The use would mostly be small embedded mini-applications
Clustering environments where sticky sessions are not available. (While as Google App Engine is such an environment, the current memcached based server-side session sharing is probably better option for most applications)
Embedding small mini-applications with the new embedding mechanism to any web pages without burden of session management for the server.

Feasibility
Stateless mode could be useful and practical for really small applications with only a bit of state. A practical limit for the (compressed) state size could be some tens of kilobytes.
Serialization time for an application with some 1000 UI components (textfields) resulting to 152kb of (uncompressed, unencrypted, unsigned) state is 3ms in 2.4GHz core duo MacBook. By adding more components, we measured the serialization time to be proportional to the number of components in the application. Guesstimate for overhead including both serialization, deserialization, compression, encryption and signing is around 0.01ms / component in the application.
Simple applications embedded to public facing web-sites are the most likely users of the stateless mode. These applications include registration forms, small calendars, insurance calculators, questionaires and such mini-applications. For these applications the number of components is typically something between 10-100. If we guesstimate the average to be 30 components, we may estimate that overhead for such application is 0,3ms of server CPU time and 10kB of combined in+out data transfer per http-request. Lets assume that an user causes in average 15 UIDL ajax requests per day. A public facing system with 1 million daily users would add just 5% overhead to one server CPU for serializations. A more visible cost would be the additional 150GB of combined I+O bandwidths needed (in Amazon EC2 this would cost about 15 USD / day).
This implementation should probably be ad add-on to Vaadin implemented on top of vaadin/flow#7207

@vaadin-bot commented on Fri Dec 09 2016
Originally by @jojule

The feasibility study numbers might be underestimated.
I measured the effect of dictionary pre-seeding with the simple address book tutorial app (but only with one row of data in table). When editing an address in form, the serialized data is 21050 bytes. It compresses down to 6758 bytes with default java.util.zip.Deflater. If another application state snapshot is created just after init and it is used for dictionary seeding, the compressed size goes down to 3071 bytes.
Total time for serialization (including serialization, compression and dictionary seeding) is 3ms on my 2.4GHz core 2 duo MacBook. The compression is actually quite slow as the serialization was just 0.5ms with the same setup.
Added also AES-256 encryption. It adds just 0.2ms on top of the compression.
Even with these numbers the additional CPU load is not a problem for low complexity applications.

@vaadin-bot commented on Fri Dec 09 2016
Originally by kynao

Regarding the opened question: "how the key and salt are stored and shared between the servers in clustered configurations? "
Why not using OrientDB (http://www.orientechnologies.com/) released under Apache 2.0 licence. OrientDB is a free java opensource NoSQL DB with transaction support, really fast, lightweight, actively maintained with capabilites in both document/graph/object orientations but still supporting SQL. Clustering features are almost done.
Any opinions ?

@vaadin-bot commented on Fri Dec 09 2016
Originally by @hezamu

Replying to kynao:

Regarding the opened question: "how the key and salt are stored and shared between the servers in clustered configurations? "

All clustering solutions offer a way to share data between nodes, but IMO we don't want to rely on those.
This means that we need an external solution for the problem. OrientDB would work, but something like memcached might be simpler and easier.

@vaadin-bot commented on Fri Dec 09 2016
Originally by @jojule

Sharing the server.side secrets should not depend on any external solution. The most simple solution would be to just include a passphrase in server configuration and use that to generate the secrets. Web.xml, code and anything else stored in the war would probably be a bad place as it is too easy to just forget that they are there and thus too easy to leak them. These secrets should be regarded in the same way as SSL certificate private keys. That said - we could easily generate them from the certificate private key if SSL is used.

@vaadin-bot commented on Fri Dec 09 2016
Originally by kynao

Replying to Muurimaa:

Replying to kynao:

Regarding the opened question: "how the key and salt are stored and shared between the servers in clustered configurations? "

All clustering solutions offer a way to share data between nodes, but IMO we don't want to rely on those.
This means that we need an external solution for the problem. OrientDB would work, but something like memcached might be simpler and easier.

I read much things for which finally a dedicated db is more suited than memcache but i'm not sure it's the right place to discuss of this, maybe in the forum instead ? I 'also not sure orientdb is a complicated thing :), maybe we could invite Luca (orientdb author) to discuss with us if you want.

@vaadin-bot commented on Fri Dec 09 2016
Originally by Jani Laakso

Security tip: You must add also timestamp into serialized state and compare against this timestamp on the Vaadin server, so client cannot revive / duplicate old states.
Here's an wild idea: How about setting up a "Vaadin state proxy server" to some trustworthy service like Amazon? Clients (browsers) would always connect into Amazon server and Amazon would act as a proxy with request / response cycle regarding the real Vaadin servers and take care of state persistence in the middle. This way browser would not need to store state at all, only cookie is required. Of course this adds more latency but networks are very fast. In practice this means offloading states of Vaadin servers into one big server. Obviously using browsers to store the state is the best solution, this idea is just for brainstorming other possibilities.
Note, Henri & Joonas: I have some experience regarding OrientDB but I do not understand how it relates to this feature?
PS. This feature is really nice!

@vaadin-bot commented on Fri Dec 09 2016
Originally by Jani Laakso

Java serialization is quite slow and inefficient. Consider e.g. Kryo which is interesting product, I've toyed with it few months ago with my transparent persistency framework.
Kryo also comes with DeltaCompressor, which caches bytes for objects that were serialized for a specific receiver. Subsequent serialization for the same receiver results only in bytes that describe the delta from the last serialization. This can greatly reduce the number of bytes needed to serialize an object that seldom changes dramatically. This feature would drastically reduce bandwidth requirements because server would send only deltas back to clients.
If using Kryo is not an option, we might be able to create diffs on the server and send only those back to client. Of course this would require either sending initial serialization data + deltas from client to server and periodically sending full serialization data back to client (in case cumulative deltas are growing too large) or somehow merging deltas back to serialized state data on the client. Using simple diff would work, this should be reasonably simple to merge on the client side.
More information here: http://code.google.com/p/kryo/wiki/BenchmarksAndComparisons

@vaadin-bot commented on Fri Dec 09 2016
Originally by Funtick

@Jani Laakso: KRYO can't deserialize java.lang.Locale ;)
@all I have success with Sticky and Non-Sticky(!!!) serializations with Infinispan Memcached, VAADIN v. 6.8.9, Tomcat 6.x, and http://code.google.com/p/memcached-session-manager/
However, I encountered problems such as... com.vaadin.event.Action class not implementing "equals()", com.vaadin.event.ListenerMethod not outputting properly cause of serialization/deserialization exception, trickiest errors with inner ENUMs, serializing  "Method", SimpleFileUpload field using ByteArrayOutputBuffer and etc.
Just want to tell "non-sticky" does indeed work (and it will load session from persistence storage at the beginning of each UIDL, even in a single-member cluster).
However, I am waiting for surprises... such as with "equals()" method implementation...
Thanks

The original issue concerns Java UI state, so let me transfer it back to the Flow repo.
Meanwhile, the Hilla framework (the former Java endpoints + TypeScript client-side UI approach mentioned above) already supports stateless authentication, see https://hilla.dev/docs/security/spring-stateless


Support tracing::instrument(err) on functions returning async_graphql::Result

Currently when trying to add err tracing on functions that return an async_graphql::Result like so
#[tracing::instrument(err)]
async fn model(&self, ctx: &Context<'_>, id: Uuid) -> Result<bool> {
    Ok(true)
}

it'll fail to compile because of
error[E0277]: `async_graphql::Error` doesn't implement `std::fmt::Display`

Trying to impl Display for Error conflicts with the existing impl<T: Display> From<T> for Error, so not sure if this can be solved at all. Repro: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=64f7bec41e3a9eb9f085bb5720dd2228
  = note: conflicting implementation in crate `core`:
          - impl<T> From<T> for T;

It seems anyhow implements AsRef<dyn Error + 'static> for Error instead of impl<T: Display> From<T> for Error which works around this conflict.
In the future it might also be solvable by using negative_impls.

Maybe you can use the tracing extension to do this.😁
https://docs.rs/async-graphql/2.9.15/async_graphql/extensions/struct.Tracing.html
Error can't implement Display, this is more troublesome. 😂

Oh, tracing extension is a thing :sweat_smile: Have to look into it, thanks for the pointer!

Oh, tracing extension is a thing :sweat_smile: Have to look into it, thanks for the pointer!

I will close this issue, if you have other questions, please feel free to open it.

@sunli829 Thanks.
Just a hint: issues can only get reopened by issue authors if they close it themselves, otherwise it needs to be reopened by owners/members/collaborators.

@sunli829 Thanks.
Just a hint: issues can only get reopened by issue authors if they close it themselves, otherwise it needs to be reopened by owners/members/collaborators.

Ah, thank you for telling me this. 😁

@stoically can you help me to use tracing extension? I have this issue: https://github.com/async-graphql/async-graphql/issues/1009


added condition to render key initiative component conditionally for …

added condition to render key initiative component conditionally for all projects

Fixes #1


panic: interface conversion: interface {} is string, not float64

When i try to apply followong terraform the plugin does crash

terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
}
}
}
provider "proxmox" {
pm_api_url          = "https://cleanedup:8006/api2/json"
pm_api_token_id     = "cleanedup"
pm_api_token_secret = "cleanedup"
pm_tls_insecure     = true
}
resource "proxmox_vm_qemu" "vm-instance" {
name                = "vm-instance"
target_node         = "pve01"
clone               = "ubuntu-2404-template"
full_clone          = true
cores               = 2
memory              = 2048
disk {
    size            = "32G"
    type            = "scsi"
    storage         = "local-lvm"
    discard         = "on"
}

network {
    model     = "virtio"
    bridge    = "vmbr1"
    firewall  = false
    link_down = false
}

}

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:

create

Terraform will perform the following actions:
proxmox_vm_qemu.vm-instance will be created

resource "proxmox_vm_qemu" "vm-instance" {

additional_wait           = 5

automatic_reboot          = true

balloon                   = 0

bios                      = "seabios"

boot                      = (known after apply)

bootdisk                  = (known after apply)

clone                     = "ubuntu-2404-template"

clone_wait                = 10

cores                     = 2

cpu                       = "host"

default_ipv4_address      = (known after apply)

define_connection_info    = true

force_create              = false

full_clone                = true

guest_agent_ready_timeout = 100

hotplug                   = "network,disk,usb"

id                        = (known after apply)

kvm                       = true

memory                    = 2048

name                      = "vm-instance"

nameserver                = (known after apply)

onboot                    = false

oncreate                  = true

preprovision              = true

reboot_required           = (known after apply)

scsihw                    = "lsi"

searchdomain              = (known after apply)

sockets                   = 1

ssh_host                  = (known after apply)

ssh_port                  = (known after apply)

tablet                    = true

target_node               = "pve01"

unused_disk               = (known after apply)

vcpus                     = 0

vlan                      = -1

vmid                      = (known after apply)

disk {

backup             = true
cache              = "none"
discard            = "on"
file               = (known after apply)
format             = (known after apply)
iops               = 0
iops_max           = 0
iops_max_length    = 0
iops_rd            = 0
iops_rd_max        = 0
iops_rd_max_length = 0
iops_wr            = 0
iops_wr_max        = 0
iops_wr_max_length = 0
iothread           = 0
mbps               = 0
mbps_rd            = 0
mbps_rd_max        = 0
mbps_wr            = 0
mbps_wr_max        = 0
media              = (known after apply)
replicate          = 0
size               = "32G"
slot               = (known after apply)
ssd                = 0
storage            = "local-lvm"
storage_type       = (known after apply)
type               = "scsi"
volume             = (known after apply)
}

network {

bridge    = "vmbr1"
firewall  = false
link_down = false
macaddr   = (known after apply)
model     = "virtio"
queues    = (known after apply)
rate      = (known after apply)
tag       = -1
}
}

Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
proxmox_vm_qemu.vm-instance: Creating...
╷
│ Error: Plugin did not respond
│
│   with proxmox_vm_qemu.vm-instance,
│   on main.tf line 16, in resource "proxmox_vm_qemu" "vm-instance":
│   16: resource "proxmox_vm_qemu" "vm-instance" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The
│ plugin logs may contain more details.
╵
Stack trace from the terraform-provider-proxmox_v2.9.14.exe plugin:
panic: interface conversion: interface {} is string, not float64
goroutine 106 [running]:
github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc0003006c0, 0x0?)
github.com/Telmate/proxmox-api-go@v0.0.0-20230319185744-e7cde7198cdf/proxmox/config_qemu.go:584 +0x4605
github.com/Telmate/terraform-provider-proxmox/proxmox.prepareDiskSize(0x0?, 0xc0003125c0?, 0xb?, 0x0?)
github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:1737 +0xeb
github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc000274900, {0xa58680?, 0xc0003351d0})
github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:1059 +0x1cb2
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xcda800?, {0xcda800?, 0xc000108b70?}, 0xd?, {0xa58680?, 0xc0003351d0?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:695 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0003dc7e0, {0xcda800, 0xc000108b70}, 0xc000596ea0, 0xc000274a80, {0xa58680, 0xc0003351d0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:837 +0xa85
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000464c60, {0xcda800?, 0xc000108a50?}, 0xc0004f4230)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/grpc_provider.go:1021 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc00011a3c0, {0xcda800?, 0xc00018a390?}, 0xc000210070)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xb5f460?, 0xc00011a3c0}, {0xcda800, 0xc00018a390}, 0xc000210000, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00047e000, {0xcde3e0, 0xc0005841a0}, 0xc0003a2000, 0xc000480c00, 0x11a0880, 0x0)
google.golang.org/grpc@v1.53.0/server.go:1336 +0xd23
google.golang.org/grpc.(*Server).handleStream(0xc00047e000, {0xcde3e0, 0xc0005841a0}, 0xc0003a2000, 0x0)
google.golang.org/grpc@v1.53.0/server.go:1704 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/grpc@v1.53.0/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.53.0/server.go:963 +0x28a
Error: The terraform-provider-proxmox_v2.9.14.exe plugin crashed!

I get the same error, although the VM is created and i can manually start it up fine.
When i enable debug logging, it looks like the type error is in the response from proxmox, where the "memory" is is formatted as a string unlike e.g. "cores".
This is the my first time trying out both proxmox and terraform, so I might be wrong.
2024-12-28T21:32:51.406+0100 [INFO]  provider.terraform-provider-proxmox_v2.9.14: 2024/12/28 21:32:51 >>>>>>>>>> REQUEST:
GET /api2/json/nodes/proxmox/qemu/106/config HTTP/1.1
Host: <IP_ADDRESS>:8006
User-Agent: Go-http-client/1.1
Accept: application/json
Authorization: PVEAPIToken=terraform@pam!provision=<api_key>
Accept-Encoding: gzip
: timestamp="2024-12-28T21:32:51.406+0100"

2024-12-28T21:32:51.429+0100 [INFO]  provider.terraform-provider-proxmox_v2.9.14: 2024/12/28 21:32:51 <<<<<<<<<< RESULT:
HTTP/1.1 200 OK
Content-Length: 564
Cache-Control: max-age=0
Connection: Keep-Alive
Content-Type: application/json;charset=UTF-8
Date: Sat, 28 Dec 2024 20:32:54 GMT
Expires: Sat, 28 Dec 2024 20:32:54 GMT
Pragma: no-cache
Server: pve-api-daemon/3.0
{"data":{"smbios1":"uuid=9bfe0eea-c057-41bc-a578-cf0878b084aa","scsihw":"virtio-scsi-single","ostype":"l26","cpu":"x86-64-v2-AES","cores":2,"scsi0":"local-lvm:vm-106-disk-0,iothread=1,size=32G","sockets":1,"name":"vm-instance","numa":0,"net0":"virtio=BC:24:11:71:7B:97,bridge=vmbr1,firewall=1","boot":"order=scsi0;ide2;net0","vmgenid":"29bb7a0c-5a9f-4591-b5d4-a0d39c00df92","ide2":"local:iso/alpine-standard-3.21.0-x86_64.iso,media=cdrom,size=240M","digest":"365b655838eb76e1d38a1b4215fab1a9e4b9b391","meta":"creation-qemu=9.0.2,ctime=1735416692","memory":"2048"}}: timestamp="2024-12-28T21:32:51.429+0100"

I had a try at it again, where i set up a proxy between terraform and proxmox, that changed the value of "memory" from string to integer for requests to the endpoint /nodes/proxmox/qemu/<vm_id>/config. And it worked!
This could easily be handled by the provider, but isn't this an error that should be fixed in Proxmox?


Dynamic parameter specification

Prehistory
I was trying to create a little personal framework that would auto-generate standard CRUD endpoints for me (just like DjangoRestFramework does). The huge problem was that there was no way to specify the number, names, types of parameters other than using function signature. Apparently some people were also wondering how to define the interface dynamically (here for example). Following the answer from the link, I had to use makefun.with_signature decorator to make it somewhat work, like shown below.

The actual thing
So I made extra_parameters and exclude_parameters decorators; modified your util function responsible for signature parsing, so that it takes those decorators into consideration as well.
Here is how that code from the picture looks now

Hi, @Borisoid.
Good PR!
I have met same issue. I found non invasive solution inspired by merge-args.
redefine_defaults changes the signature as you need it
Here the code:
#!/usr/bin/env python3

import functools
import inspect
import sys
import types

PY38 = sys.version_info >= (3, 8)

def _blank():  # pragma: no cover
    pass

def redefine_defaults(f, remove_varkw=False, **kwargs):
    """"
      f: function
      remove_varkw: remove **kwargs from signature
      kwargs: defalts to redefine
    """"
    spec = inspect.getfullargspec(f)

    if spec.defaults:
        pos_args = spec.args[:-len(spec.defaults)]
        kw_args = spec.args[-len(spec.defaults):]
        defaults = spec.defaults
    else:
        pos_args = spec.args
        kw_args = []
        defaults = []

    new_posargs = []
    new_kwargs = []
    new_defaults = []
    new_kwonlyargs = []

    for arg_name in pos_args:
        if arg_name not in kwargs:
            new_posargs.append(arg_name)

    assert len(kw_args) == len(defaults)
    for arg_name, arg_default in zip(kw_args, defaults):
        if arg_name in kwargs:
            arg_default = kwargs[arg_name]
        new_kwargs.append(arg_name)
        new_defaults.append(arg_default)

    for arg_name, arg_default in kwargs.items():
        if arg_name not in new_kwargs and arg_name not in new_posargs:
            new_kwargs.append(arg_name)
            new_defaults.append(arg_default)

    for arg_name in spec.kwonlyargs:
        if arg_name in new_posargs or arg_name in new_kwargs:
            continue
        new_kwonlyargs.append(arg_name)

    varnames = list(new_posargs)
    if spec.varargs:
        varnames.append(spec.varargs)

    varnames.extend(new_kwargs)
    if spec.varkw and not remove_varkw:
        varnames.append(spec.varkw)

    passer_args = [len(new_posargs) + len(new_kwargs)]
    if PY38:
        passer_args.append(f.__code__.co_posonlyargcount)

    co_flags = f.__code__.co_flags
    if remove_varkw:
        co_flags = co_flags & (~inspect.CO_VARKEYWORDS)

    passer_args.extend([
        len(new_kwonlyargs),
        _blank.__code__.co_nlocals,
        _blank.__code__.co_stacksize,
        co_flags,
        _blank.__code__.co_code, (), (),
        tuple(varnames), f.__code__.co_filename,
        f.__code__.co_name,
        f.__code__.co_firstlineno,
        f.__code__.co_lnotab
    ])
    passer_code = types.CodeType(*passer_args)
    passer = types.FunctionType(passer_code, globals())
    passer.__defaults__ = tuple(new_defaults)

    g = types.FunctionType(
        f.__code__,
        f.__globals__,
        name=f.__name__,
        argdefs=tuple(new_defaults),
        closure=f.__closure__
    )
    g = functools.update_wrapper(g, f)
    g.__kwdefaults__ = f.__kwdefaults__
    g.__wrapped__ = passer
    g.__defaults__ = tuple(new_defaults)
    # TODO rewrite annotations
    return g

def some_func(x='will_depend', **kwargs):
    print(f'{kwargs}')

def print_sig(f):
    signature = inspect.signature(f)
    print(f'signature for {f.__name__} {signature}')

def main():
    some_func()
    other_func = redefine_defaults(some_func, remove_varkw=True, y='new_depends', m='mmm', x='redefine_depends_for_x')
    other_func(m='mmmm')
    print(some_func is other_func)

    print_sig(some_func)
    print_sig(other_func)

if __name__ == '__main__':
    main()

Hi, @ariloulaleelay!
Yes, this is another way to do it, however both this solution and makefun.with_signature that I wrote about are just "hacs" that trick inspect.signature() into returning the signature you want instead of the actual one. I just find such approach too convoluted and straight up ugly. Especially for FastAPI that tempts to be as developer-friendly as possible. The thing that confuses me the most is that FastAPI claims that it can help you develop faster, but forces you to explicitly type out each endpoint not letting you generate them with code. And if you want to make it more flexible, you have to spend time "hacking" signatures. There must be the native way of doing this, I think.


Timeout by getting response

Hi @mac-zhou,
I am very glad that you try to connect locally!
I try to connect with a normal python script with my comfee ac (Midea build)
When I try to connect I get always in lan.py line 40
response = sock.recv(512)
I get always an timeout.
2020-05-19 00:07:36,137 Finalize request data: aa20ac00000000000003410000ff03ff00020000000000000000000000000004e9
2020-05-19 00:08:02,701 Connect the Device <IP_ADDRESS>:6444 TimeOut.

I checked my ac. IP and Port is open.
my script looks like this:
#!/usr/bin/env python3
from msmart.device import device as midea_device

device_ip = "<IP_ADDRESS>"
device_id = "19791209312906"

client = midea_device(device_ip, int(device_id))
device = client.setup()
device.refresh()

Can you help me investigating?

this looks like your device does not support.
your ac does not accept and not send respone, so timeout.
do you add your ac device to midea cloud?

Hi,
ah ok.
Yes the device is added in my account.
It is strange that some devices are not supporting this.

please  update and show me the full log.

update msmart to 0.1.15 and try it

Hi. Thanks! I will try it after my holiday 😊

#!/usr/bin/env python3
from msmart.device import device as midea_device
device_ip = "<IP_ADDRESS>"
device_id = "19791209312906"
client = midea_device(device_ip, int(device_id))
device = client.setup()
device.refresh()
Where you can get this info?

device.refresh() always times out for me. But device.apply() works:
doing client setup
doing device refresh
DEBUG:msmart.packet_builder:Finalize request data: aa20ac00000000000003410000ff03ff00020000000000000000000000000004e9
DEBUG:msmart.lan:Sending to <IP_ADDRESS>:6444 5a5a01116800200000000000000000000000000063f50000000e0000000000000000000000000000c7ec8e4276f8accc266a4648044169534ef900b4addf8808145b702d1c28520aec9d938eeaae3d871b99ce4b7e20a37b61b56a801f9b5692bab9a43ce8b51302.
INFO:msmart.lan:Connect the Device <IP_ADDRESS>:6444 TimeOut for 10s. don't care about a small amount of this. if many maybe not support.
DEBUG:msmart.device:refresh - Recieved from <IP_ADDRESS>, 63f50000000e:
{'id': '63f50000000e', 'power_state': False, 'target_temperature': 17, 'operational_mode': <operational_mode_enum.auto: 1>, 'fan_speed': <fan_speed_enum.Auto: 102>, 'swing_mode': <swing_mode_enum.Off: 0>, 'eco_mode': False, 'turbo_mode': False}
starting apply
0x09 byte was 2
DEBUG:msmart.packet_builder:Finalize request data: aa23ac0000000000000240014e6603ff000000000000000000000000000000000000ee4a
DEBUG:msmart.lan:Sending to <IP_ADDRESS>:6444 5a5a01116800200000000000000000000000000063f50000000e0000000000000000000000000000250f89dd022fc29133505735f7fc51204bdfb3e16e33d88768cc4c3d0658937d4325a4241fa335585c581b4ef5e5d803e275cd61403198ad871c4c4bedbdca4b.
DEBUG:msmart.lan:Received from <IP_ADDRESS>:6444 5a5a01116800200000000000000000000000000063f50000000e0000000000000000000000000000250f89dd022fc29133505735f7fc51204bdfb3e16e33d88768cc4c3d0658937d4325a4241fa335585c581b4ef5e5d803e275cd61403198ad871c4c4bedbdca4b.
DEBUG:msmart.device:apply - Recieved from <IP_ADDRESS>, 63f50000000e:

#!/usr/bin/env python3
from msmart.device import device as midea_device
device_ip = "<IP_ADDRESS>"
device_id = "19791209312906"
client = midea_device(device_ip, int(device_id))
device = client.setup()
device.refresh()

Where you can get this info? Where i get information about device (port, device_id)?

Friends?

#!/usr/bin/env python3
from msmart.device import device as midea_device
device_ip = "<IP_ADDRESS>"
device_id = "19791209312906"
client = midea_device(device_ip, int(device_id))
device = client.setup()
device.refresh()

Where you can get this info? Where i get information about device (port, device_id)?

Friends?

Take a look here: https://github.com/mac-zhou/midea-ac-py

@mac-zhou I get now this reply:
2020-06-01 12:38:58,537 Finalize request data: aa20ac00000000000003410000ff03ff00020000000000000000000000000004e9
2020-06-01 12:38:58,668 Sending to <IP_ADDRESS>:6444 5a5a0111680020000000000000000000000000008a32000000120000000000000000000000000000c7ec8e4276f8accc266a4648044169534ef900b4addf8808145b702d1c28520aec9d938eeaae3d871b99ce4b7e20a37b8adf0877d99082a8ef1520af41ac7520.
2020-06-01 12:39:08,671 Connect the Device <IP_ADDRESS>:6444 TimeOut for 10s. don't care about a small amount of this. if many maybe not support.
2020-06-01 12:39:08,672 refresh - Recieved from <IP_ADDRESS>, 8a3200000012:

sending does also not work:
2020-06-01 12:49:47,773 Finalize request data: aa23ac000000000000024001376603ff000000000000000000000000000000000000e966
2020-06-01 12:49:48,053 Sending to <IP_ADDRESS>:6444 5a5a0111680020000000000000000000000000008a320000001200000000000000000000000000007e30d0ebfbcbc57767ed00bf427a59904bdfb3e16e33d88768cc4c3d0658937d2b505d2d83d43b50be0fc550af0e618611660af83cd55c3e82ffd30f59eb0374.
2020-06-01 12:49:58,058 Connect the Device <IP_ADDRESS>:6444 TimeOut for 10s. don't care about a small amount of this. if many maybe not support.
2020-06-01 12:49:58,058 apply - Recieved from <IP_ADDRESS>, 8a3200000012:

it seems timeouts happen when the request sent is malformed. When I tried flipping some bits to implement #8 , I was getting timeouts on device::apply and the AC had no response. When I removed my changes, device::apply changes the AC state correctly and receives a response.
Also, even when a response was received from the device, the unpadding code was truncating all of it. I also had to comment out the unpadding to get a response that the device class could parse correctly.

@aa755 The question is: what are the bits, that are malformed the request...
How can I get the info what are the correct bits?

Logging communication with the cloud version may be a way because the cloud version works flawlessly (for me) at least in the Celsius mode. It would be great if @mac-zhou provides some insights between the relation between the cloud data format and the LAN data format.

@aa755 The question is: what are the bits, that are malformed the request...
How can I get the info what are the correct bits?

when you control the device with app, you need to capture traffic the device.
save the capture file and show me

Logging communication with the cloud version may be a way because the cloud version works flawlessly (for me) at least in the Celsius mode. It would be great if @mac-zhou provides some insights between the relation between the cloud data format and the LAN data format. It seems the formats are very similar.

i am in china, cloud version is not work for me. you need to capture traffic the device.

@aa755 The question is: what are the bits, that are malformed the request...

How can I get the info what are the correct bits?

when you control the device with app, you need to capture traffic the device.
save the capture file and show me

Do you need the wlan traffic or the Internet traffic?
Thank you 😊

@aa755 The question is: what are the bits, that are malformed the request...

How can I get the info what are the correct bits?

when you control the device with app, you need to capture traffic the device.
save the capture file and show me

Do you need the wlan traffic or the Internet traffic?
Thank you 😊

wlan traffic is the best

Hi,
I filtered the IP of the ac (dest and src).
With the app, I turned the ac on, changed to temperature 20 celsius, turned ac off.
ac-only.pcap.zip

Hi,
I filtered the IP of the ac (dest and src).
With the app, I turned the ac on, changed to temperature 20 celsius, turned ac off.
ac-only.pcap.zip

all packet is the HTTPS data
the midea protocol filter is tcp && data[:2] == 5a5a

@slydlake perhaps you need to turn off internet/WAN in your router before capturing traffic

@slydlake perhaps you need to turn off internet/WAN in your router before capturing traffic

It's not about WAN.
the protocol is also run on WAN.

Hi,
I filtered the IP of the ac (dest and src).
With the app, I turned the ac on, changed to temperature 20 celsius, turned ac off.
ac-only.pcap.zip

all packets is the HTTPS data
the midea protocol filter is tcp && data[:2] == 5a5a

with this filter I get no data
With "data[:2] == 5a5a" I can only see UDP Data send from my iPhone (app)
Do you need this? Or did I something wrong by catpuring??

check device's 6444 port is open
as far as i know, the new version of ios app is not connect device via LAN. so the better is to use  a Android phone
you can downgrade the version of android app
you can capturing traffic between phone and device.

Port ist open
Unfortunately I have only Apple Devices...
Is the current android version using LAN?

A friend was just in my home.
I tried her android phone. But it's the same result, only UDP Data with this filter...

I think it uses cloud when internet is on and LAN otherwise. Thats why I said you should turn off internet in your router

@aa755 Just tried without WAN. Does not work. App cannot connect. So I think that the app only works over WAN.

is there some tcp packets from phone and device?
mac_zhou
在 2020年6月2日，22:50，slydlake<EMAIL_ADDRESS>写道：

A friend was just in my home.
I tried her android phone. But it's the same result, only UDP Data with this filter...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/mac-zhou/midea-msmart/issues/4#issuecomment-637593298, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA4KC7YKTQN6VPXEYSAVVN3RUUGULANCNFSM4NEPFPNQ.

i don’t know.
i china we use app name “美的美居”.
what is your device’s Brand and Model?
maybe you can try midea air app version v<IP_ADDRESS>0 or
https://apps.apple.com/nl/app/carrier-air-conditioner/id1078542632
mac_zhou
在 2020年6月2日，22:39，slydlake<EMAIL_ADDRESS>写道：

Port ist open
Unfortunately I have only Apple Devices...
Is the current android version using LAN?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/mac-zhou/midea-msmart/issues/4#issuecomment-637586081, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA4KC74ELB6SGFT4ZHT43FDRUUFJTANCNFSM4NEPFPNQ.

Hi,
I filtered the IP of the ac (dest and src).
With the app, I turned the ac on, changed to temperature 20 celsius, turned ac off.
ac-only.pcap.zip

oh，I just made a mistake.
your device is running the new protocol version.
the packets filter is tcp.segment_data[:2]  == 8370 wireshark decode as TLS
I can't decrypt this version‘s packet

Yes. TCP Packages from iPhone are here attached.
Filter: (iPhoneIP.src && TCP) || (iPhoneIP.dst && TCP)
I used now the media air app.
iphone with media app.pcap.zip

My ac is Comfee MPPF1-12CRN7. It's the same like Comfee SOGNIDORO-09E

same issue here from a user of my loxone Plugin. See log:
09.06 20:58 msmart.packet_builder DEBUG    Finalize request data: aa23ac0000000000000240422c6603ff0003000000000000000000000000000000000511
09.06 20:58 msmart.lan   DEBUG    Sending to <IP_ADDRESS>:6444 5a5a011168002000000000000000000000000000cb42000000120000000000000000000000000000bdaf2d37af1de4c663502e68918efeda523eb5f406fc76826270d99f559bdd3917521e93fb9b3c010d79654c539f9b4ce1cb2ca4057fd0fb7a496879cfc607ad.
09.06 20:58 msmart.lan   INFO     Connect the Device <IP_ADDRESS>:6444 TimeOut for 10s. don't care about a small amount of this. if many maybe not support.
09.06 20:58 msmart.device DEBUG    apply - Recieved from <IP_ADDRESS>, cb4200000012:

seems that there is no received data.  Appliance Is a Midea Blanc-Series.
do you have any idea whats wrong?

In the recording in the post just above, I did not change any AC setting in the app so all communication may just be status queries. Here is a new capture where I rapidly change the AC settings:
phone_ac_comm_protocol_settings_changes.zip
The packets are larger here.

update msmart to 0.1.16 and run midea-discover -d
then show me the output
I probably know how to solve your issues

In the recording in the post just above, I did not change any AC setting in the app so all communication may just be status queries. Here is a new capture where I rapidly change the AC settings:
phone_ac_comm_protocol_settings_changes.zip
The packets are larger here.

it looks like the change below?

DEBUG:msmart.packet_builder:Finalize request data: aa20ac00000000000003410000ff03ff00020000000000000000000000001fd8f6
DEBUG:msmart.lan:Sending to <IP_ADDRESS>:6444 5a5a0111680020000000000000000000000000007fed0000000e0000000000000000000000000000c7ec8e4276f8accc266a4648044169530928fada958bd49cae6294115aabef32137826d34fdb8e6c28cf085101c06d7d41d5c35f37917a5df50091c99e4d624b.
INFO:msmart.lan:Connect the Device <IP_ADDRESS>:6444 TimeOut for 10s. don't care about a small amount of this. if many maybe not support.
DEBUG:msmart.device:refresh - Recieved from <IP_ADDRESS>, 7fed0000000e:
INFO:msmart.cli:Found a unsupported '0xac' at <IP_ADDRESS> - id:<PHONE_NUMBER>9663 - sn: P0000000Q1BC0F2BA61C110000 - ssid: net_ac_1C11
DEBUG:msmart.packet_builder:Finalize request data: aa20ac00000000000003410000ff03ff000200000000000000000000000029bb09
DEBUG:msmart.lan:Sending to <IP_ADDRESS>:6444 5a5a01116800200000000000000000000000000063f50000000e0000000000000000000000000000c7ec8e4276f8accc266a46480441695393f5bd30e9aeb629c7a26b6159c09396fca5cf91d6d609ef6fbf6e4bfe2e9340250d930e061c567ef50967eb3f0c3efb.
INFO:msmart.lan:Connect the Device <IP_ADDRESS>:6444 TimeOut for 10s. don't care about a small amount of this. if many maybe not support.
DEBUG:msmart.device:refresh - Recieved from <IP_ADDRESS>, 63f50000000e:
INFO:msmart.cli:Found a unsupported '0xac' at <IP_ADDRESS> - id:<PHONE_NUMBER>1683 - sn: P0000000Q1BC0F2BAA9B3B0000 - ssid: net_ac_9B3B

it looks like the change below?

Thanks for looking into this. Here's another capture where I changed the AC settings in the beginning and left the app open for a while. The app seems to poll every 10s using 2 TCP packets, one of length 57 and another of length 104. The responses are of length 57 and 88 respectively.
mix_change_query_filtered.zip

length 57 maybe is Heartbeat
length 88 is the response
length 104 is the command

Thanks for looking into this. Here's another capture where I changed the AC settings in the beginning and left the app open for a while. The app seems to poll every 10s using 2 TCP packets, one of length 57 and another of length 104. The responses are of length 57 and 88 respectively.
mix_change_query_filtered.zip

I just updated my code
you can clone this repo and install manually python3 setup.py install
and the try midea-discover -d again

Ok, that worked, thanks!
[abhishek@optiplex midea-msmart]$ midea-discover -d
INFO:msmart.cli:Debug mode active
INFO:msmart.cli:Discovering devices with UDP Broadcast, press CTRL-C to quit...
DEBUG:msmart.packet_builder:Finalize request data: aa20ac00000000000003418100ff03ff000200000000000000000000000010b2aa
DEBUG:msmart.lan:Sending to <IP_ADDRESS>:6444 5a5a01116800200000000000000000000000000063f50000000e00000000000000000000000000006b000a76e27eed2c3647e57d8602df8b83803207ac5603efb04d91076733b9bba2ba5dd3770133d9ba3ec377e480772b1cf591303c81e4636fa8375c2c1ec375.
DEBUG:msmart.lan:Received from <IP_ADDRESS>:6444 5a5a01116800200000000000000000000000000063f50000000e00000000000000000000000000006b000a76e27eed2c3647e57d8602df8b83803207ac5603efb04d91076733b9bba2ba5dd3770133d9ba3ec377e480772b1cf591303c81e4636fa8375c2c1ec375.
DEBUG:msmart.device:refresh - Recieved from <IP_ADDRESS>, 63f50000000e: aa1eac00000000000003c0004b667f7f00000000046358000000000000d233
DEBUG:msmart.command:Appliance response data: c0004b667f7f00000000046358000000000000d233
DEBUG:msmart.command:indoor_temperature: 24.5 .
DEBUG:msmart.command:outdoor_temperature: 19.0 .
INFO:msmart.cli:Found a supported '0xac' at <IP_ADDRESS> - id:<PHONE_NUMBER>1683 - sn: P0000000Q1BC0F2BAA9B3B0000 - ssid: net_ac_9B3B

Do I understand it the right way. Midea use two different "protocols" for local communication?
midea-discover -d is not working on my host. I get
ERROR:msmart.security:aes_decrypt error: ValueError('Padding is incorrect.')
When I dump the traffic between my iphone and the Midea AC all data starts with 8370.

i can't parser data that starts with 8370


re: project forge feedback

Hiya folks 👋
re: https://github.com/dotnet-foundation/project-maturity-model/blob/master/README.md
Overall I quite like what's proposed, well done. As for the project forge I've got some specific things that I'd like to see the foundation help champion. Over at https://www.arewewebyet.org/ the rust ecosystem is doing a similar approach. If you aren't familiar with it please become familiar with it. I'd love to see this website for dotnet. I think the .net foundation should run the website/the initiative and use it to nudge the community to step up/lift the ecosystem.

Over in the Haskell ecosystem they are also doing something similar - https://github.com/Gabriel439/post-rfc/blob/master/sotu.md

Like!
Ya, we should do something like what you've shared/proposed. Totally makes sense to incorporate this approach.
/cc @jskeet, @benaadams, @jongalloway


Change how JUnit 5 test parallelization is configured

Description
Changes how JUnit 5 test parallelization is configured in POM files to always enable parallelization. This is done as even with parallelization enabled JUnit 5 defaults to using same_thread configuration which is effectively single-threaded test execution. Now, test parallelization is configured by setting the default mode, concurrent for playback testing and same_thread for live testing, but this allows for @Execution(ExecutionMode.CONCURRENT) to override behavior during live testing to run tests in parallel even if the default mode is same_thread.
All locations configuring live testing to run in parallel have been updated to pass concurrent mode.
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
API changes are not detected in this pull request.


Weird connections made after returning to already visited systems.

After returning to a system (in this case, Cuba) a weird connection pops up.  Easy to delete but somewhat annoying.
http://i.imgur.com/Lv9JfDK.png

THX! I´ll check


Get docs set up on readthedocs or github

Okay, I think that the basic RTD setup is done in #33 https://laserfun.readthedocs.io/en/latest/


Qt tor integration

mwc713 now supports TOR.
 The tor address should be displayed on the receive tab and send should work.

Currently for TOR we have indicators and we have support on listener side.
Need to do:

At settings add Autostart for TOR.  In this case foreign API will be stared automatically and foreign API secret will be empty. If foreign API is running, it will be reused.

Send Page should recognize tor address and verify if Tor is running

@cgilliard
I can do start/stop  pretty quickly and it make mwc713 go out of sync (tor will start even my last command was stop).  mwc713 should  be in sync or produce some errors and not start/stop

Some notes for testing of TOR:
Should be pretty straight forward. It is much like mwcmqs from the user perspective. You have a receive address (added to the receive tab) and you can send from another wallet to that address. There is also a start/stop in the listener tab.
The main thing you might notice is that TOR is sometimes not reliable. It will more frequently go into the disconnected state. We have reconnect logic, but sometimes it takes a while. What I've noticed is that in many cases, when you disconnect, you will actually be connected and sending a transaction to a "disconnected" tor listener will cause it to instantly "recover". We may get better about detecting actual disconnected state, but for now I think this is fine.

Have tested MWC Send & Receive using TOR on both Windows and MAC OS platforms successfully.

Jim verified on Linux platform, hence closing this ticket.


Failing to install version 3.0.0 from npm

I cannot install the release of 3.0.0 via npm:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for<EMAIL_ADDRESS>npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

Any ideas?

3.0 has not been published to npm and no one active has permissions to do that it this point.
you can install arbitrary tags or commits from github using: https://medium.com/@jonchurch/use-github-branch-as-dependency-in-package-json-5eb609c81f1a

I see, thanks!

Please, let us know when this version becomes available via npm. Thanks!

Here's how we're managing at the moment (excerpt of package.json):
[...]
"dependencies": {
    "apn": "git+https://github.com/node-apn/node-apn.git#3.0.0",
    [...]
}

Maybe it helps someone.

since we can't update this repo, the Parse Community is in work on upgrading our fork
https://github.com/parse-community/node-apn
https://www.npmjs.com/package/@parse/node-apn

@acinader
Great, that's awesome!
Please, let us know when the adaptation process is finished in order to upgrade to the latest version.

Is there any update on this?

Still seeing this error.....


chore(openrtb) Add Site and Regs support

Hey @massintha, awesome stuff!!!!
Soon some of the main contributors of the repository will review the your PR /cc @giorgosera @stelios313
Cheers

@massintha excellent stuff indeed. I am travelling at the moment but I'll have a look as soon as possible. Thanks for the contributions.

No problem, thanks for keeping me posted

@massintha added some (minor to medium priority) comments in the PR., Please have a look and if fixed we can bump the version and release it.

@massintha looks good to me. If you don't have any additions I'll merge and release to npm this afternoon.
Excellent contributions thanks :)

The new release is on NPM.


Changed the Comma Delimiter to Semicolon

Changed "," to ";" in the ConfigKeys files for some of the trailing file types.
Seems like someone meant to make it ";" but accidentally used "," instead. Unless it was intentional to, for example, group *.otf, *.woff, *.woff2, *.less (found in ConfigKeys.php) as one file group type instead of as separate file types. I have to figure the original intention was as separate file types, and hence, the use of a ";" for each instead.

Thanks @szepeviktor for the squash assist ;-)


docker swarm: non-overlapping IPv4 address pool

Is there a way to use docker swarm with openvpn?
I want to create 3 scaleway instances.
1 x master (openvpn-server, public ip)
2 x worker (openvpn-client, no public ip)
workers should route internet traffic through master.
I connected the worker with the master, then:
MASTER_IP=$(scw inspect $MASTER_SERVER | jq -r '.[0].private_ip')
master: docker swarm init --listen-addr $MASTER_IP --advertise-addr $MASTER_IP
worker: docker swarm join --token TOKEN $MASTER_IP:2377
master: docker network create --driver=overlay --attachable --subnet=<IP_ADDRESS>/16 mynet
scw exec -w $MASTER_SERVER docker service create \
    --name helloworld \
    --publish 80:80 \
    --network mynet \
    --constraint node.role!=manager \
    dockercloud/hello-world

error: starting container failed: error creating external connectivity network: could not find an available, non-overlapping IPv4 address pool amongthe defaults to assign to the network
I have tried so many thing (ip tables, route add...) but i can't get it to work. is this even possible to use docker swarm on top of openvpn?

solved it by adding ip route add XX.XX.XX.XX via $route_vpn_gateway (with all public ip-ranges)
ip route add <IP_ADDRESS>/8 via $route_vpn_gateway
ip route add <IP_ADDRESS>/7 via $route_vpn_gateway
ip route add <IP_ADDRESS>/6 via $route_vpn_gateway
ip route add <IP_ADDRESS>/7 via $route_vpn_gateway
ip route add <IP_ADDRESS>/8 via $route_vpn_gateway
ip route add <IP_ADDRESS>/6 via $route_vpn_gateway
ip route add <IP_ADDRESS>/4 via $route_vpn_gateway
ip route add <IP_ADDRESS>/3 via $route_vpn_gateway
ip route add <IP_ADDRESS>/3 via $route_vpn_gateway
...
...
ip route del <IP_ADDRESS>/1 via $route_vpn_gateway
ip route del <IP_ADDRESS>/1 via $route_vpn_gateway


nixos/cupsd: passwordless admin for wheel with polkit

Motivation for this change
cc @matthewbauer
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Notify maintainers
cc @

Looks alright, definitely annoying to do this everytime!
I think almost everyone wants this on, but there may be some cases where you don't. Maybe we need a polkit.passwordlessWheel option or something similar.

Glad we share this :smile: I think it would be in line with the nixos style things for there to be an option for this. Will add.

I bet there are more polkit rules out there for other things as well.

I did some scraping in vms (opensuse, ubuntu, fedora.) and package sources. I was mostly trying to figure what ubuntu has done to get this because they're most known for it. Couldn't figure it out though, it seems they have separate users for cups with the help of some patches.

Ooh, found the whole rules ubuntu uses

https://gist.github.com/worldofpeace/fb4809f137652c55c619539257f67a9b
https://packages.ubuntu.com/eoan/i386/policykit-desktop-privileges

(has a hard time controlling self now :rofl: )


fix: remove theme logic

Types of Changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

[ ] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
[ ] New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] All new and existing tests passed

Description
[Place a meaningful description here.]

:tada: This PR is included in version 6.13.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


allow time in integrate_ode calls to be autodiff variables

Description
The integrate functions currently do now allow to have the initial time or the time vector to be varying. However, in some applications in can be useful to allow the observation time to be varying.
Example
Right now the initial time and the time vector passed to the integrate_ode function must be data (double) and it would be good to relax this.
Expected Output
Same output as before, just allow more cases to be handled by the integrate calls.
Additional Information
Any additional information goes here.
Current Math Version
v2.18.0

@wds15: I just renamed the issue. Is the title still descriptive? It used to be "allow time as varying in integrate_ode calls"

Sure...title is better like this. Btw, this feature is important to get lag times in pk models going.

Just to be clear, this would allow either the initial time or the times or both to be autodiff variables? Are there specialization for each of those cases? (So are we looking at 4 different implementations?)

This has been merged. So closing.


Api

Feature - Site API
The Site API will provide a way for sites to build an API driven change log. It will keep track of user's reading locations, published notes, and will provide a way to query all of this.

Howdy from Release Ninja! You should write a release note targeted at a semi-technical end user who is
not familiar with the code base. Include at least 1 image, wherever possible. Review the help article if
you are not familiar with Release Ninja.
When your pull request is ready, do one of the following:

Notify Release Team
Don't notify anyone because it's a small change or doesn't concern them
Whatever you do though, make sure you :tada:

Howdy from Release Ninja! I just created a note and sent out emails to<EMAIL_ADDRESS><EMAIL_ADDRESS>:tada:

Howdy from Release Ninja! I just created a note and sent out emails to<EMAIL_ADDRESS><EMAIL_ADDRESS>:tada:


refactor(traverse)!: remove TraverseCtx::is_static

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#7760  👈 (View in Graphite)
#7759
#7758
#7745
#7757
#7756
#7755
#7754
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


Flask integration repeatedly causes RecursionError after some time

After some time the Flask server with the Sentry integration becomes unresponsive and publishes hundreds of similar errors to Sentry.
Stack trace:
RecursionError: maximum recursion depth exceeded while calling a Python object
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 48, in __call__
    for event in iterable:

  ... continues on for 839 times in total ...

  File "raven/middleware.py", line 48, in __call__
    for event in iterable:
  File "raven/middleware.py", line 35, in __call__
    iterable = self.application(environ, start_response)
  File "flask/app.py", line 1812, in wsgi_app
    ctx = self.request_context(environ)
  File "flask/app.py", line 1773, in request_context
    return RequestContext(self, environ)
  File "flask/ctx.py", line 224, in __init__
    self.url_adapter = app.create_url_adapter(self.request)
  File "flask/app.py", line 1602, in create_url_adapter
    server_name=self.config['SERVER_NAME'])
  File "werkzeug/routing.py", line 1327, in bind_to_environ
    query_args=query_args)
  File "werkzeug/routing.py", line 1241, in bind
    url_scheme, path_info, default_method, query_args)

Using Python 3.5.0, Flask 0.10.1, and raven-python 5.12.0.

IRC revealed that this is unrelated to raven.

Problem description and solution if anyone digs up this non-issue:
App was initialized like so:
uwsgi --need-app --socket <IP_ADDRESS>:3031 --enable-threads --lazy \
    -b 30000 --single-interpreter --lazy --die-on-term \
    --module app.main --callable wsgi_main

With a "main" function of:
import logging

from raven.contrib.flask import Sentry

from app import app
from app import config

sentry = None

def wsgi_main(environ, start_response):
    global sentry

    app.config.update(config.flask)

    if config.flask['SENTRY_DSN']:
        sentry = Sentry(
            app, dsn=config.flask['SENTRY_DSN'],
            logging=True, level=logging.ERROR
        )

    return app(environ, start_response)

The problem is that wsgi_main is called on every request, so Sentry wraps itself each time. The fix is to simply check if Sentry has been initialized already. Example:
import logging

from raven.contrib.flask import Sentry

from app import app
from app import config

sentry = None

def wsgi_main(environ, start_response):
    global sentry

    app.config.update(config.flask)

    # change below
    if not sentry and config.flask['SENTRY_DSN']:
        sentry = Sentry(
            app, dsn=config.flask['SENTRY_DSN'],
            logging=True, level=logging.ERROR
        )

    return app(environ, start_response)


Improve Display and Debug impls of Error

It is sometimes more useful to have a string of the errno name ("INVAL") than the docs ("Invalid argument." This PR updates witx-bindgen to create functions for errno_name(u16) -> &'static str and renames strerror to errno_docs(u16) -> &'static str. The name is used in Error's Display impl, and both are provided in the Debug impl.

👍

👍


driver: on FreeBSD, use lld, not gold

This is equivalent to passing -use-ld=lld to the driver.

See also apple/swift-driver#1211.

@swift-ci smoke test


feat: remove_dead_function

To improve DX, a developer may make a function like this:
local function DebugPrint(...)
    if _G.DEBUG then
        print(...)
    end
end

When combined with remove_unused_if_branch, compute_expression, and inject_global_value, it can make writing debug prints and similar code a lot simpler.

local function DebugPrint(...)
    if _G.DEBUG then
        print(...)
    end
end

local function OtherFunction()
    -- actual code here
end

DebugPrint("a debug print here")
OtherFunction()

would bundle down to
local function OtherFunction()
    -- actual code here
end

OtherFunction()

This is related to #5, this needs to be done first before this can be achieved to have more robust variable tracking.

Thanks for taking the time to submit this issue! I will link it to this other issue: https://github.com/seaofvoices/darklua/issues/44
It is a trivial sub-case of constant function inlining, where the function is simply empty 😄 It is not really a duplicate but I'll still close it as it will get done using the same rule. I'll add a comment to the issue to remember to support that use case!


Does not clear screen after exiting; hence subsequent commands overlay present text

https://user-images.githubusercontent.com/58091631/112747826-83a42e80-8fc0-11eb-8796-228ce2c5e77f.mp4

And I encountered the same thing, it would be nice if it restored the terminal screen text after exiting kiro.

Yeah, sure would be


ft: added find_projects api and deleting buffers when changing repo

I added a get_last_project API because when I changed directories, the LazyGit instance in ToggleTerm didn’t update its root path. It kept pointing to the previous repository.
To fix this, I created this API to get the current project path. Now, before launching LazyGit, I can update ToggleTerm's directory to match the current project path.

I added find_projects api that when you calling
require("project_nvim").find_projects("/path/to/your/dir")
it will detect folders that has .git folder then add it to history list
but this function depends on fd and plenary


Add shim to inject gradle plugin for all projects

For gradle projects, LicenseFinder depends on the license-gradle-plugin. If a project author does not add this plugin to the gradle build plugins then LicenseFinder is unable to scan the gradle project.
The change in this PR, inserts a ~/.gradle/init.gradle which inserts a hook to install the plugin without requiring the gradle project to explicitly add it to their plugins list. The effect of this change is that the docker image is then able to scan gradle projects that do not include this plugin.
Documentation on using gradle initialization scripts can be found here.

The build seems to be failing with the following error:
Failures:

  1) Gradle Dependencies are shown in reports for a project with an kotlin build.gradle.kts file

     Failure/Error: expect(java_developer).to be_seeing_line 'kotlin-stdlib, 1.2.61, "Apache 2.0"'

       expected `#<LicenseFinder::TestingDSL::User:0x00000000041e3af8 @output="/tmp/build/923e368a/LicenseFinder/lib/l...in `load'\n\tfrom /usr/share/rvm/gems/ruby-2.5.7/bin/license_finder:23:in `<main>'\n", @exit_code=1>.seeing_line?("kotlin-stdlib, 1.2.61, \"Apache 2.0\"")` to return true, got false

     # ./features/features/package_managers/gradle_spec.rb:40:in `block (2 levels) in <top (required)>'

Finished in 11 minutes 14 seconds (files took 0.63438 seconds to load)

96 examples, 1 failure

Failed examples:

rspec ./features/features/package_managers/gradle_spec.rb:37 # Gradle Dependencies are shown in reports for a project with an kotlin build.gradle.kts file

I tried running this test locally and was able to reproduce the failure. After printing the @output of the command execution it's reporting the following error:
モ bundle exec rspec features/features/package_managers/gradle_spec.rb:37
Run options: include {:locations=>{"./features/features/package_managers/gradle_spec.rb"=>[37]}}

Gradle Dependencies
lib/license_finder/package_managers/gradle.rb:19:in `block in current_packages': Command 'gradle downloadLicenses' failed to execute:  (RuntimeError)
FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.jetbrains.kotlin.gradle.internal.KotlinSourceSetProviderImplKt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 549ms

I then switched to the master branch and re-ran this test and was able to reproduce the error. It looks like the failing build is due to a change outside the scope of this PR.
* What went wrong:
Could not initialize class org.jetbrains.kotlin.gradle.internal.KotlinSourceSetProviderImplKt

I believe the failure is related to this line but it's not clear to me how to fix this unrelated test failure. WDYT?

I was unable to reproduce the failure locally. For me, the tests pass locally 🤣 . But I was able to hijack into the container that ran the tests and was able to get more information on the failure and it was failing for a different reason than the one you highlighted in your earlier message.
I see this error in the hijacked container:
/tmp/build/147dbc28/LicenseFinder/lib/license_finder/package_managers/gradle.rb:19:in `block in current_packages': Command 'gradle downloadLicenses' failed to execute:  (RuntimeError)
FAILURE: Build failed with an exception.

* Where:
Build file '/tmp/projects/my_app/kts-build-file-gradle/build.gradle.kts' line: 4

* What went wrong:
An exception occurred applying plugin request [id: 'com.github.hierynomus.license', version: '0.15.0']
> Failed to apply plugin [id 'com.github.hierynomus.license-base']
   > Cannot add extension with name 'license', as there is an extension already registered with that name.

   * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 682ms
from /usr/share/rvm/gems/ruby-2.3.8/gems/with_env-1.1.0/lib/with_env.rb:9:in `with_env'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/package_managers/gradle.rb:16:in `current_packages'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/package_manager.rb:101:in `current_packages_with_relations'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/scanner.rb:36:in `each'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/scanner.rb:36:in `flat_map'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/scanner.rb:36:in `active_packages'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/core.rb:83:in `current_packages'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/core.rb:78:in `decision_applier'
from /usr/share/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/forwardable.rb:202:in `any_packages?'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/license_aggregator.rb:17:in `block in any_packages?'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/license_aggregator.rb:15:in `map'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/license_aggregator.rb:15:in `any_packages?'
from /tmp/build/147dbc28/LicenseFinder/lib/license_finder/cli/main.rb:108:in `action_items'
from /usr/share/rvm/gems/ruby-2.3.8/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
from /usr/share/rvm/gems/ruby-2.3.8/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/share/rvm/gems/ruby-2.3.8/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
from /usr/share/rvm/gems/ruby-2.3.8/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
from /tmp/build/147dbc28/LicenseFinder/bin/license_finder:6:in `<top (required)>'
from /usr/share/rvm/gems/ruby-2.3.8/bin/license_finder:23:in `load'
from /usr/share/rvm/gems/ruby-2.3.8/bin/license_finder:23:in `<main>'

I actually think it is failing for this line (ie the line below the one you specified). I believe that it is failing for a double declaration of the 'com.github.hierynomus.license' plugin. So I think if we theoretically removed that plugin declaration, the test will pass. But I don't understand why it only fails for kotlin and not for non-kotlin gradle.

Thank you for taking the time to help me @xtreme-debbie-chen.
It looks like I still need to resolve the jruby job. I'll close this PR for now until I have the full pipeline passing.


Updating Nested Data With GORM

This is an amazing library. It has saved me loads of hours. However, I am failing to understand how to updated nested data. Clearly I am doing something incorrect. Any help would be greatly appreciated.
Your Question

I am trying to update data with GORM. I have multi-levels of data...eg
customers => customer_sites => customer_site_contacts
This application is a multi-tenant application, so when updating, to be safe, i add the tenant id in the where clause.
A json payload could look something like this.
{
"id": "358d3a0b-1e25-49e5-9723-22d199b6ffcd",
"clientId": "d97a96ca-6b05-423a-814c-7c4ba2a5ebe4",
"name": "Test Update",
"address": "test again",
"lat": 0,
"lon": 0,
"sites": [
{
"id": "f971230f-cdc7-4a2a-a041-f163bc6e8a81",
"name": "test site",
"address": "site address",
"lat": 21,
"lon": -115,
"radius": 0.25,
"customerId": "358d3a0b-1e25-49e5-9723-22d199b6ffcd",
"clientId": "d97a96ca-6b05-423a-814c-7c4ba2a5ebe4",
"contacts": [
{
"id": "3ec2d742-f11a-4370-a741-3ab5e8657950",
"name": "testy testerson",
"email"<EMAIL_ADDRESS>"phone": "555-555-5555",
"contactType": 0,
"customerSiteId": "f971230f-cdc7-4a2a-a041-f163bc6e8a81",
"clientId": "d97a96ca-6b05-423a-814c-7c4ba2a5ebe4"
}
]
}
],
"customerContacts": []
}
updateData is the struct version of the above payload.
I am using this call to update/create everything
DB.Debug().Session(&gorm.Session{FullSaveAssociations: true}).Where("client_id = ?, 'the client id').Save(updateData)
I also have create hooks where I create a uuid (column id) for any model being added to the database.
What is happening is that the site and contact are being re-inserted, and the customer is being updated.
The document you expected this should be explained
https://gorm.io/docs/associations.html
Expected answer
What I would expect to see is everything to be updated, instead of inserted.
If there are any nested objects without an id, those would end up being created.
If I use the the SkipHooks property, everything is updated, however, nothing will be created.
This question - https://github.com/go-gorm/gorm/issues/3487 is basically exactly what I am trying to do, however, my nested data is being inserted instead of updated. Like these users, I cannot write specific code as I have written a generic GormRepo.
Thank You,
Neal

Hello @doppl-neal
You should set site/customer's id to be unique, then it will be updated instead of to be reinserted.

Hello @doppl-neal
You should set site/customer's id to be unique, then it will be updated instead of to be reinserted.

@jinzhu thank you for your response. I will try that, however, ID is set to be primary key so that implicitly states that it is unique.

@jinzhu thank you for your response. I will try that, however, ID is set to be primary key so that implicitly states that it is unique.

@jinzhu using a tag to set the id to be unique does not appear to work.
type Base struct {
ID        string    gorm:"primaryKey;unique;type:uuid;default:uuid_generate_v4();" json:"id"
CreatedAt time.Time gorm:"type:timestamp without time zone;not null;"
UpdatedAt time.Time gorm:"type:timestamp without time zone;not null;"
}
Here is the payload for this update:
{
"id": "358d3a0b-1e25-49e5-9723-22d199b6ffcd",
"clientId": "d97a96ca-6b05-423a-814c-7c4ba2a5ebe4",
"name": "Test Update",
"address": "test again23",
"lat": 0,
"lon": 0,
"customerContacts": [
{
"id": "05d7398d-edcf-4b89-9217-d52b43c5d022",
"name": "check test",
"email"<EMAIL_ADDRESS>"phone": "555555555",
"contactType": 0,
"customerId": "358d3a0b-1e25-49e5-9723-22d199b6ffcd",
"clientId": "d97a96ca-6b05-423a-814c-7c4ba2a5ebe4"
}
]
}
Here is the log from GORM:
{"l":"debug","sha":"","t":1611676429,"caller":"/go/src/app/pkg/entity/dopplBaseEntity.go:35","m":"**** new UUID *** 663ba9a9-26d7-4e89-beba-c38f1c2c0200"}
2021/01/26 15:53:49 /go/src/app/pkg/providers/gormRepository.go:121
[0.615ms] [rows:1] INSERT INTO "customer_contacts" ("name","email","phone","contact_type_id","client_customer_id","created_at","updated_at","doppl_client_id","id") VALUES ('check test','blha@blah.com','555555555',0,'358d3a0b-1e25-49e5-9723-22d199b6ffcd','2021-01-26 15:53:49.478','2021-01-26 15:53:49.478','d97a96ca-6b05-423a-814c-7c4ba2a5ebe4','663ba9a9-26d7-4e89-beba-c38f1c2c0200') ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name","email"="excluded"."email","phone"="excluded"."phone","contact_type_id"="excluded"."contact_type_id","client_customer_id"="excluded"."client_customer_id","created_at"="excluded"."created_at","updated_at"="excluded"."updated_at","doppl_client_id"="excluded"."doppl_client_id" RETURNING "id"
2021/01/26 15:53:49 /go/src/app/pkg/providers/gormRepository.go:121
[2.296ms] [rows:1] UPDATE "client_customers" SET "name"='Test Update',"address"='test again23',"doppl_client_id"='d97a96ca-6b05-423a-814c-7c4ba2a5ebe4',"updated_at"='2021-01-26 15:53:49.478' WHERE doppl_client_id = 'd97a96ca-6b05-423a-814c-7c4ba2a5ebe4' AND "id" = '358d3a0b-1e25-49e5-9723-22d199b6ffcd'

@jinzhu using a tag to set the id to be unique does not appear to work.
type Base struct {
ID        string    gorm:"primaryKey;unique;type:uuid;default:uuid_generate_v4();" json:"id"
CreatedAt time.Time gorm:"type:timestamp without time zone;not null;"
UpdatedAt time.Time gorm:"type:timestamp without time zone;not null;"
}
Here is the payload for this update:
{
"id": "358d3a0b-1e25-49e5-9723-22d199b6ffcd",
"clientId": "d97a96ca-6b05-423a-814c-7c4ba2a5ebe4",
"name": "Test Update",
"address": "test again23",
"lat": 0,
"lon": 0,
"customerContacts": [
{
"id": "05d7398d-edcf-4b89-9217-d52b43c5d022",
"name": "check test",
"email"<EMAIL_ADDRESS>"phone": "555555555",
"contactType": 0,
"customerId": "358d3a0b-1e25-49e5-9723-22d199b6ffcd",
"clientId": "d97a96ca-6b05-423a-814c-7c4ba2a5ebe4"
}
]
}
Here is the log from GORM:
{"l":"debug","sha":"","t":1611676429,"caller":"/go/src/app/pkg/entity/dopplBaseEntity.go:35","m":"**** new UUID *** 663ba9a9-26d7-4e89-beba-c38f1c2c0200"}
2021/01/26 15:53:49 /go/src/app/pkg/providers/gormRepository.go:121
[0.615ms] [rows:1] INSERT INTO "customer_contacts" ("name","email","phone","contact_type_id","client_customer_id","created_at","updated_at","doppl_client_id","id") VALUES ('check test','blha@blah.com','555555555',0,'358d3a0b-1e25-49e5-9723-22d199b6ffcd','2021-01-26 15:53:49.478','2021-01-26 15:53:49.478','d97a96ca-6b05-423a-814c-7c4ba2a5ebe4','663ba9a9-26d7-4e89-beba-c38f1c2c0200') ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name","email"="excluded"."email","phone"="excluded"."phone","contact_type_id"="excluded"."contact_type_id","client_customer_id"="excluded"."client_customer_id","created_at"="excluded"."created_at","updated_at"="excluded"."updated_at","doppl_client_id"="excluded"."doppl_client_id" RETURNING "id"
2021/01/26 15:53:49 /go/src/app/pkg/providers/gormRepository.go:121
[2.296ms] [rows:1] UPDATE "client_customers" SET "name"='Test Update',"address"='test again23',"doppl_client_id"='d97a96ca-6b05-423a-814c-7c4ba2a5ebe4',"updated_at"='2021-01-26 15:53:49.478' WHERE doppl_client_id = 'd97a96ca-6b05-423a-814c-7c4ba2a5ebe4' AND "id" = '358d3a0b-1e25-49e5-9723-22d199b6ffcd'

Hello @doppl-neal
Would you mind to create a reproducible GORM playground PR?

Hello @doppl-neal
Would you mind to create a reproducible GORM playground PR?


bitwarden_rs-vault: 2.18.1b -> 2.19.0

Motivation for this change
https://github.com/dani-garcia/bw_web_builds/releases/tag/v2.19.0
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

This PR supersedes #113811

Result of nixpkgs-review pr 117932 run on x86_64-linux 1

1 package built:

bitwarden_rs-vault


I can't setup the plugin on a private repository

I've installed the plugin but I couldn't use it with gitlab page.
Can I use it with https://gitlab.com/?
I don't know what is the error, or where I could see the log for figure it out.
I've create a token with API scope, then I've try to setup de URL as https://gitlab.com/<group or user>/<project-name> as well https://gitlab.com, but it doesn't work.
OS: ubuntu 20.04

Hi Jonathan,
https://gitlab.com should be sufficient. Can you make sure you put all other information in correctly?
There should also be an error log which you should be able to see in the Console-Tab under View -> Toggle DevTools.

I'm looking this and this lines.

I think that loadBranches() should be invoke every time we modified the form, on handleChange.
With that fix, I think that all will be solved, at least visually. What do you think @riedeljan ?

Thank you so much for all the detail first!
I'll debug a little this afternoon - haven't worked for insomnia for the last months and end up with other strange errors now. Will let you know as soon as I can tell more :)

Thank you so much for all the details!
I just started out with a fresh installation of insomnia as I didn't use it for the past months.
I tried pulling an existing - back then working - repository and ended up with the same ref is empty error as you did  - although a ref was provided in my case and branch autocompletion worked out as expected. 🤔
I'll dig into it this evening - haven't read my own codebase for a few months now. Will let you know as soon as possible!

Did you try entering a workspace file name? The defaulting to config.json doesn't seem to work. Entering it manually solved my problems straight away.

Thank you so much for all the details!
I just started out with a fresh installation of insomnia as I didn't use it for the past months. I tried pulling an existing - back then working - repository and ended up with the same ref is empty error as you did - although a ref was provided in my case and branch autocompletion worked out as expected. thinking
I'll dig into it this evening - haven't read my own codebase for a few months now. Will let you know as soon as possible!

I think that you "hit" exactly when loadBranches starts. In my case, It was invoked and It won't be invoked any more due to the trigger (componentDidMount)

Did you try entering a workspace file name? The defaulting to config.json doesn't seem to work. Entering it manually solved my problems straight away.

Yes, I've also tried that but it doesn't work.
Do you test it out with a "private repo" ?

Yes, I've also tried that but it doesn't work.
Do you test it out with a "private repo" ?
Maybe something change on gitlab, because any other "git-related" plugin doesn't work

Yep, I tried it with a private repo within an up to date private instance. Will test with gitlab.com too.

At some points the ref param gets messed up for me too - will fix this asap - but branches load without issues on a fresh private project on gitlab.com.
Although I noted the main branch only showed in the API response after I created an empty config.json from within Gitlab.

Nice to hear!
Yeah, we've got multiple issues here.

I already implemented a fix locally for the default configuration file name.
Up next I'll make sure the plugin handles responses for empty repos correctly.
Last but not least I'll fix the ref-mess.

Will probably all be done this evening, thank's for your help so far!
What exactly do you mean with support for multiple session? Maybe just open up a new ticket with your exact wishes, so we can have a separate conversation there. :)

Hi @JonathanLoscalzo!
First up, sorry, the last weeks became surprisingly busy. I just merged fixes for (hopefully ;)) all problems listed in my last comment and published to NPM. Insomnia Plugin-Hub update might take a few days as they seem to run it manually or so.. However feel free to install directly from NPM or build the plugin yourself.
I appreciate any feedback whether the fix works :)


BF: Riot on iOS11 sends images as HEIC format, which nothing else can display

vector-im/riot-ios#1521
Force compression for HEIC images so that the kit creates JPEG images for them.

Any progress here?


[VL] Fix generated spilled file already created

The current judgement of whether a new filename of local shuffle spill has already been created is wrong. Should use "O_EXCL" in the read flag to judge if the file has been created.

Thanks Rong! Is this a fix for #2987 or not?

Thanks Rong! Is this a fix for #2987 or not?

Yes, I suspect this is the root cause. But I still can't reproduce using sbin/gluten-it.sh queries --local --preset=velox --benchmark-type=ds --error-on-memleak --disable-aqe --off-heap-size=5g -s=100.0 --shuffle-partitions=72 --threads=8 --iterations=1 --queries=q67 --enable-history --enable-ui

@zhztheplayer This cannot fix #2987, but can be a potential risk.
I will merge this one first.

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query
log/native_2990_time.csv
log/native_master_09_04_2023_91e503689_time.csv
difference
percentage

q1
43.57
43.59
0.015
100.03%

q2
25.36
25.35
-0.004
99.98%

q3
36.74
37.25
0.514
101.40%

q4
42.42
41.49
-0.935
97.80%

q5
67.79
69.88
2.088
103.08%

q6
5.03
6.68
1.650
132.78%

q7
84.95
84.77
-0.184
99.78%

q8
78.55
79.84
1.293
101.65%

q9
115.41
114.99
-0.414
99.64%

q10
49.86
47.14
-2.721
94.54%

q11
18.64
19.18
0.534
102.87%

q12
24.76
25.77
1.015
104.10%

q13
50.92
50.00
-0.916
98.20%

q14
15.31
17.11
1.799
111.76%

q15
29.10
30.02
0.917
103.15%

q16
17.21
16.03
-1.177
93.16%

q17
121.10
120.15
-0.948
99.22%

q18
163.25
161.53
-1.727
98.94%

q19
12.63
12.03
-0.602
95.24%

q20
34.36
27.19
-7.173
79.13%

q21
241.85
237.60
-4.258
98.24%

q22
15.34
15.75
0.410
102.67%

total
1294.14
1283.32
-10.824
99.16%


[ISSUE] unable to give input (UI isnt working fine)

after giving the first prompt to devika: "make a python app that generate ultra secure random passwords" she ask me later for Please provide an upper limit for the length of the generated passwords.
until here is everything fine, the problem is that the UI is having some bug because when devika ask me for some input, im not able to write anything in the input box (it appears a forbidden sign), so is impossible to give the input to continue.
using ollama with llama3 model and also tried with dolphin-llama3 (is happenining with every model i tried)
see pictures attached below

fixed


Ideas: jqfmt, vet and lint

Hi, something similar to gofmt would be nice and make it possible to write IDE extensions that does auto formatting. I guess one tricky bit would be to allow preserves some formatting like some new lines etc?
Vet and lint might be nice also but haven't thought so much about what kind of errors they could find.

This is an interesting idea and I have considered for the design before, but currently I don't have strong motivation for implementing this. The main target of the project is for cli user and library user. Once I actually wanted to reformat builtin.jq using gojq itself, but such thing is a minor use-case compared to other languages (unfortunately!) and does not meet the maintenance cost.

This is an interesting idea and I have considered for the design before, but currently I don't have strong motivation for implementing this. The main target of the project is for cli user and library user. Once I actually wanted to reformat builtin.jq using gojq itself, but such thing is a minor use-case compared to other languages (unfortunately!) and does not meet the maintenance cost.

Hi, @wader. I took a stab at jqfmt here: https://github.com/noperator/jqfmt. Let me know what you think!

Thanks 🙂 Do I gather correctly that you've implemented a walkable AST in jqjq?

Thanks 🙂 Do I gather correctly that you've implemented a walkable AST in jqjq?

By walkable do you mean if there is a function like walk(<AST>; <function to call for each node>)? then no it does not, but the eval code might be interesting to look at? jq-lsp do have something like that https://github.com/wader/jq-lsp/blob/master/lsp/lsp.jq#L213 but it works as generator that outputs all node and their scope.
If you want to see how how jqjq's internal AST looks like (it's inspired by gojq's AST) you can use --parse:
$ ./jqjq --parse '123 | type'
{
  "op": "|",
  "left": {
    "term": {
      "number": "123",
      "type": "TermTypeNumber"
    }
  },
  "right": {
    "term": {
      "type": "TermTypeFunc",
      "func": {
        "name": "type"
      }
    }
  }
}

(same can be done with fq using gojq's parser fq -n '"123 | type" | _query_fromstring' and there is also _query_tostring and bunch more functions, might be useful for playing around)
Note that jqjq's lexer and parser current it very much written to handle only valid syntax. If something goes wrong it will do a bad job at explaining what went wrong and where, so probably not great for building a linter or formatter at the moment. But i did start writing some code turn a AST back into a string some time ago https://github.com/wader/jqjq/commit/9aa94ff523d2079a02161ee27c01eedfb454d06b


How to run on colab?

Hello. I don't have powerful hardware (GTX 1050Ti) so I need to run this on colab. However, I am unable to install this on colab. Please tell me how to do it, thank you!

Sorry I didn't try to use it in the colab. Maybe you need to refer to the instruction of colab on how to run your personal project with colab.


[BUG]

For retinanet, I see there's only one metric available which is Foreground acc:

my question is: why you treat all anchor as foreground? what is a rational threshold for foreground?
I'm training on a nuclei dataset and I only have 1 foreground class which is "Positive". In my situation, it seems its never learning here.

We only measure the accuracy of foreground anchors since they are scarce.
We did not treat  all anchors as foreground.
On Wed, Dec 4, 2019 at 4:41 PM edwardyangxin<EMAIL_ADDRESS>wrote:

For retinanet, I see there's only one metric available which is Foreground
acc:
[image: image]
https://user-images.githubusercontent.com/13101725/70126475-11fdee00-16b4-11ea-9942-0e55fe3239ec.png
my question is: why you treat all anchor as foreground? what is a rational
threshold for foreground?
I'm training on a nuclei dataset and I only have 1 foreground class which
is "Positive". In my situation, it seems its never learning here.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/TuSimple/simpledet/issues/265?email_source=notifications&email_token=ABGODH5S3N3756RRES7Z7L3QW5UKFA5CNFSM4JVE6RJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H55YVDQ,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGODH3T76SPFGHKW6SBTATQW5UKFANCNFSM4JVE6RJA
.

thanks for your quick reply:)
I don't know if I get it right. For my situation, with only 1 foreground class, I can set threshold parameter as 0.5 for calculating accuracy metric.  Is it a rational choice? Otherwise, I always get 100% accuracy:(

We only measure the accuracy of foreground anchors since they are scarce. We did not treat all anchors as foreground.
…
On Wed, Dec 4, 2019 at 4:41 PM edwardyangxin @.***> wrote: For retinanet, I see there's only one metric available which is Foreground acc: [image: image] https://user-images.githubusercontent.com/13101725/70126475-11fdee00-16b4-11ea-9942-0e55fe3239ec.png my question is: why you treat all anchor as foreground? what is a rational threshold for foreground? I'm training on a nuclei dataset and I only have 1 foreground class which is "Positive". In my situation, it seems its never learning here. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#265?email_source=notifications&email_token=ABGODH5S3N3756RRES7Z7L3QW5UKFA5CNFSM4JVE6RJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H55YVDQ>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGODH3T76SPFGHKW6SBTATQW5UKFANCNFSM4JVE6RJA .

If you use all the detected after NMS with a score >= 0.5, then 0.5 is
a good threshold.
For the COCO dataset, we evaluate all boxes with scores >= 0.05, so the
threshold is 0.05.
On Wed, Dec 4, 2019 at 8:07 PM edwardyangxin<EMAIL_ADDRESS>wrote:

thanks for your quick reply:)
I don't know if I get it right. For my situation, with only 1 foreground
class, I can set threshold parameter as 0.5 for calculating accuracy
metric. Is it a rational choice? Otherwise, I always get 100% accuracy:(
We only measure the accuracy of foreground anchors since they are scarce.
We did not treat all anchors as foreground.
… <#m_8728754230831242186_>
On Wed, Dec 4, 2019 at 4:41 PM edwardyangxin @.***> wrote: For
retinanet, I see there's only one metric available which is Foreground acc:
[image: image]
https://user-images.githubusercontent.com/13101725/70126475-11fdee00-16b4-11ea-9942-0e55fe3239ec.png
my question is: why you treat all anchor as foreground? what is a rational
threshold for foreground? I'm training on a nuclei dataset and I only have
1 foreground class which is "Positive". In my situation, it seems its never
learning here. — You are receiving this because you are subscribed to this
thread. Reply to this email directly, view it on GitHub <#265
https://github.com/TuSimple/simpledet/issues/265?email_source=notifications&email_token=ABGODH5S3N3756RRES7Z7L3QW5UKFA5CNFSM4JVE6RJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H55YVDQ>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGODH3T76SPFGHKW6SBTATQW5UKFANCNFSM4JVE6RJA
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/TuSimple/simpledet/issues/265?email_source=notifications&email_token=ABGODH5TZFSYOYBVKSOTCZTQW6MO5A5CNFSM4JVE6RJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF4ZGXY#issuecomment-561615711,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGODH2EX6ELS4FJSNHISJTQW6MO5ANCNFSM4JVE6RJA
.


Hooks priority execution

Is your feature request related to a problem? Please describe.
In current version there is no way to define order when execute hooks
Describe the solution you'd like
I will be cool if its easy to define the priority into each hook
Describe alternatives you've considered
Something like this @BeforeUpdate({priority: 10}), the default priority could be 0, and the higher the priority the sooner the hook will be executed

In current version there is no way to define order when execute hooks

Hooks are executed in the same order as you define them. Or does it not work for you this way?

Moreover, you can always define one "meta hook" which will orchestrate multiple methods. I don't think we need more than that.

Dou you have an example, of how to create a meta hook ?

Just create one hook, the rest are regular methods/functions that you call from inside it.


Error: Call to undefined method Carbon\Carbon::all()

Hi,
I updated Composer and updated last version of laravel-messenger.
My config is:

Laravel Framework version 5.1.41 (LTS)

Composer config:  "cmgmyr/messenger": "~2.0"   -> I do composer update and....

Removing cmgmyr/messenger (2.11)
Installing cmgmyr/messenger (2.12)

That is to say, I have 2.12 version.
The error is:
FatalThrowableError in Messagable.php line 75:
Call to undefined method Carbon\Carbon::all()
The code is:
$participants = Models::participant()->where('user_id', $this->id)->pluck('last_read', 'thread_id');
    /**
     * @todo: see if we can fix this more in the future.
     * Illuminate\Foundation is not available through composer, only in laravel/framework which
     * I don't want to include as a dependency for this package...it's overkill. So let's
     * exclude this check in the testing environment.
     */
    if (getenv('APP_ENV') == 'testing' || !str_contains(\Illuminate\Foundation\Application::VERSION, '5.0')) {
        $participants = $participants->all();   <----- LINE 75
    }

If I do:  dd($participants) I see..
Carbon {#1690 ▼
+"date": "2016-04-06 17:20:45.000000"
+"timezone_type": 3
+"timezone": "Europe/Madrid"
}
My temporary solution is install 2.11 version. Its work.
Thanks

Thanks for reporting. I'm going to look into this.

This is due to recent change of lists to pluck, for some reason carbon date overrides it.

@mpijierro this should be fixed in all version of Laravel. Can you please double check on your side? You can update your composer.json file to point to dev-master. This will be officially tagged shortly.

@cmgmyr I updated to dev-master (2.12). Everything works fine again.
Thank you very much, great job!

this has now been released in 2.13


Semester Project: Topics - Gloria

For our project on children's literature and texts, a primary topical focus will be understanding the representation of specific themes or cultural phenomena within children's books across time or media. Meanwhile will involve exploring emerging trends, such as the rise of interactive digital books or the impact of modern cultural movements (like inclusivity or climate awareness) on children's literature.
Defining the scope:
Emerging Trends: Discover and analyze new themes or trends in children’s literature, such as STEM-focused books, climate change awareness, or books that address social justice issues.
Approach:
Literature Review: Start by identifying key works and studies in the field to provide a foundation.
Textual Analysis: Examine specific texts and their content, language, and illustrations to evaluate how themes are communicated.
Media Comparisons: Compare representations across different media formats (traditional books, audiobooks, apps) and assess the impact on children's engagement and understanding.
Interviews/Surveys: If possible, include insights from educators, parents, or children on the impact of these materials.


Implicit super types specification

We allow the ModelManager to specify implicit super types for class declarations (currently via a map).  The map based approach has a couple of issues:

It doesn't work well when multiple system namespaces have been added as the return value is a type name without a namespace
It is not clear whether we should only allow implicit super types when there is no explicit super type
Should we allow implicit super types for types that are not defined in a system model file?

This is also related to the ClassDeclaration.isSystemCoreType method.

One approach would be for ClassDeclaration.getSuperType to delegate to its ModelManager. This would allow sub-classes of ModelManager to override the ClassDeclarations explicit super type based on decorators, namespace, maps etc.

What's the use case for implicit super types? The only example I have in mind is when you write e.g., asset Foo { ... } there is an implicit Asset super type.