how to use bindgen-generated types in a cxx rust callback?

Hi,
I'm trying to use PcapPlusPlus from Rust and am having trouble with every combination of bindgen, cxx, and auto-cxx... I think I'm pretty close with my latest bindgen+cxx approach but I'm stuck with an error that I can't figure out how to get past.
  error[cxxbridge]: unsupported type
     ┌─ src/main.rs:35:54
     │
  35 │         fn onMessageReadyCallback(side: i8, tcpData: &crate::ffi_pcpp::TcpStreamData, userCookie: *mut ::std::os::raw::c_void);
     │                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported type

I've boiled the problem down to this demo: https://github.com/ian-p-cooke/cxx-issue
Is it possible for a C++ library to invoke a function defined in Rust via a function pointer and pass Rust a reference to a C++ class that you created bindgen binding for?
what I need is a C++ function with the signature
typedef void(*       OnTcpMessageReady) (int8_t side, const TcpStreamData &tcpData, void *userCookie)

which I'm attemting to do by using cxx to bind to a Rust function with signature
fn onMessageReadyCallback(side: i8, tcpData: &crate::root::pcpp::TcpStreamData, userCookie: *mut ::std::os::raw::c_void) {

where crate::root::pcpp::TcpStreamData was generated by bindgen.
P.S.
I know the c_void mapping doesn't work either so that's my next problem.

It should work if you do:
diff --git a/include/pcap_reader.hpp b/include/pcap_reader.hpp
index 3fc1267..6c55caa 100644
--- a/include/pcap_reader.hpp
+++ b/include/pcap_reader.hpp
@@ -2,6 +2,7 @@
 #include "rust/cxx.h"

 struct UserCookie;
+using c_void = void;

 void read_pcap(rust::Str fileName,

diff --git a/src/main.rs b/src/main.rs
index e66a894..d28f565 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,17 +14,9 @@ unsafe impl ExternType for root::pcpp::ConnectionData {
     type Kind = cxx::kind::Opaque;
 }

-#[cxx::bridge(namespace = "pcpp")]
-mod ffi_ppcp {
-    extern "C++" {
-        type TcpStreamData = crate::root::pcpp::TcpStreamData;
-        type ConnectionData = crate::root::pcpp::ConnectionData;
-    }
-}
-
-struct UserCookie;
+pub struct UserCookie;

-fn onMessageReadyCallback(side: i8, tcpData: &crate::root::pcpp::TcpStreamData, userCookie: *mut ::std::os::raw::c_void) {
+fn onMessageReadyCallback(side: i8, tcpData: &crate::root::pcpp::TcpStreamData, userCookie: *mut ffi::c_void) {
     println!("onMessageReadyCallback!");
 }

@@ -32,11 +24,19 @@ fn onMessageReadyCallback(side: i8, tcpData: &crate::root::pcpp::TcpStreamData,
 mod ffi {
     extern "Rust" {
         type UserCookie;
-        fn onMessageReadyCallback(side: i8, tcpData: &crate::ffi_pcpp::TcpStreamData, userCookie: *mut ::std::os::raw::c_void);
+        unsafe fn onMessageReadyCallback(side: i8, tcpData: &TcpStreamData, userCookie: *mut c_void);
+    }
+
+    #[namespace = "pcpp"]
+    extern "C++" {
+        include!("demo/include/pcapplusplus/TcpReassembly.h");
+        type TcpStreamData = crate::root::pcpp::TcpStreamData;
+        type ConnectionData = crate::root::pcpp::ConnectionData;
     }

     extern "C++" {
         include!("demo/include/pcap_reader.hpp");
+        type c_void;
         unsafe fn read_pcap(fileName: &str,
                             userCookie: &mut UserCookie,

thank you!  I did keep banging on it until I came up with https://github.com/ian-p-cooke/cxx-issue/commit/8629228641070d0da695b299d6fd7d2d0f05c358
I like your solution to some things better though so in my main project I'll incorporate yours.
I found the namespace attribute in some issue which was the 'aha!' moment for me.
I never read https://cxx.rs/attributes.html sigh that's what I get for skimming docs.
thank you also for showing me how to handle the void problem.


Test intermittently failing because to2.ProveOVHdr failing due to finalizer clearing xA

I am running go test in an external  (shell-script) loop - and getting a failure like once out of every 5 or 10 cycles. It is a:
TO2.ProveOVHdr payload signature verification failed: cryptographic verification failed
...in to2.ProveOVHdr verification. Keys look consistent between sign and verify, but payload is not - xA is getting cleared between the signing and verifying. Adding some debug as such...
        // The lifetime of xA is until the transport has marshaled and sent the proof. Therefore, the
        // best option for clearing the secret is to set a finalizer (unfortunately).
        proof := s1.Tag()
        runtime.SetFinalizer(proof, func(proof *cose.Sign1Tag[ovhProof, []byte]) {
                fmt.Printf("*** FINALIZER CLEARING!!!!\n")
                clear(proof.Payload.Val.KeyExchangeA)
        })

...has proven that the finalizer is getting called between signing and verifying in these cases.
I am a bit unclear on when/how this finalizer is supposed to be called, and why it may be triggered prematurely - once and a while...

Thank you for making progress on this flaking test! I think we're just missing a runtime.KeepAlive in one spot of TO2. I will find it.

I just got another failure.
I did notice that you added the defer clear - but never removed the old Runtime Finalizer. It appears as though the finalizer cleared in the case I ran:
*** SIGN OVHPROOF with key RSA2048 Fingerprint: 1dc0424e52b976c298d2988ee973541b2ae1be46822a5b1222827f19ade94987
*** FINALIZER CLEARING!!!!
*** FINALIZER CLEARING!!!!
*** VERIFY OVHPROOF with key RSA2048 Fingerprint: 1dc0424e52b976c298d2988ee973541b2ae1be46822a5b1222827f19ade94987
*** KeyExchangeA Set to [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

 defer clear(proveOVHdr.Payload.Val.KeyExchangeA)
... is still in sendHelloDevice, but...
        runtime.SetFinalizer(proof, func(proof *cose.Sign1Tag[ovhProof, []byte]) {
                fmt.Printf("*** FINALIZER CLEARING!!!!\n")
                clear(proof.Payload.Val.KeyExchangeA)
        })

... is still in proveOVHHdr.


Trouble with WAS and Docker.

Currently, I am working on getting a somewhat modular loading system for nodes in the Docker implementation of ComfyUI here. Any directory in the custom_nodes location will get scanned for a requirements.txt and will be installed through pip.
I am using the WAS suite as a test since it seems like a good place to start. The pip install part seems to be fine but ComfyUI will not start with WAS. It will return the error:
webui-docker-comfy-1  | python: can't open file '/data/config/comfy/custom_nodes/was-node-suite-comfyui/main.py': [Errno 2] No such file or directory
webui-docker-comfy-1 exited with code 2

I'm not quite sure what is happening since I don't know python and I don't see a main.py file in this repository.
I have made sure to give permissions to the entire custom_nodes directory and its subdirectories/files.
Maybe you know what's going on here?

I haven't really used docker so I am not sure if it is related or not. But from the looks of it the script you are using is trying to load a main.py, which naturally doesn't exist. WAS Suite isn't a stand alone program so it doesn't have a main execution point.

Quite coincidentally, it turns out that the mounting for the paths in the container were simply just broken. Someone had already made a PR to fix it, it just wasn't merged yet. It was merged today and it works without me needing to change anything.


How to do ensemble at testing with beam search?

Hi @sgrvinod, thanks for your code.
When using beam search, how de we perform ensemble testing (testing multiple models and average predictions across models). Should we add all the log softmax output and then divide them by the number of models?

@sgrvinod im waiting for you reply


Deck of many crashes server

crash-2024-02-06_21.12.50-server.txt
Every time the deck of many is pulled from , it crashes
Mod Version : 1.2.1
Mana and artifice version : <IP_ADDRESS>

It seems like this only happens on servers, a fix would be really cool

I've been trying for about 2 hours now and I can't seem to reproduce the error...
I do believe you that the problem exists, but I have no idea how you did it
You just used the Dec and then the server crashes?

It could possibly be one of the outcomes of the deck of many, but every time I used it it broke


Fix typo

I'm assuming the last example should return false :)

@lucapette First of all, thank you for your contribution! It's highly appreciated. No, tie it on. is a palindrome, however, so this PR is invalid. I'll explain why below. :)
For sentences all punctuation (?,.,!,,,etc.) is removed and the white space does not need to be correct, only the single letters need to be in the correct order when read backwards.
So for "No, tie it on." we have the following steps in verifying it is a palindrome.
1. No, tie it on.                 // Original sentence
2. No tie it on                   // Remove punctuation
3. Notieiton                      // Remove all white space
4. notieitoN                      // Reverse it
5. notieiton                      // lowercase it
6. notieiton == notieiton

So the steps are:

Remove punctuation
Remove all white space
Lowercase it
Reverse the string

Now we can apply step 1, 2, and 4 to the original string and check if they're equal (Step 6 above). If they are, it's a palindrome.

Wikipedia states  the following:

A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward, such as madam or “taco cat” or racecar. Sentence-length palindromes may be written when allowances are made for adjustments to capital letters, punctuation, and word dividers, such as "A man, a plan, a canal, Panama!", "Was it a car or a cat I saw?" or "No 'x' in Nixon".
– https://en.wikipedia.org/wiki/Palindrome

So it may seem like a typo, but it's actually correct. 😄

@kevingimbel thank you for explaining this to me. I had no idea :)

@lucapette you're one of today's lucky 10000! :D


Changing options that affect spacing after a ztable which uses it causes the layout to not converge.

Using the example from the ztable tests, and adding tight: true:
#zero.ztable(
  columns: 4,
  align: center,
  format: (auto,) * 4,
  $n$, $α$, $β$, $γ$,
  table.hline(),
  $Alpha$, "1.2+-2", "2e3", "1+-2e4",
  $Beta$, "12+-23", "66e98", "-17+-2e-4",
  $Gamma$, "0+-.2", "1e7", "-.23(2)e-4",
)

#zero.set-num(tight: true)

I've added red strokes around table.cell elements and blue strokes around box elements for clarity. I believe the multiple passes over tables causes some trickery with the measurements. This mismatch of measurements only occurs for ztables before the changed option.

Oh boy, this should not happen. It's due to fixing #9 actually.
The root of all this evil is eventually state.set()/get() which is used to simulate set rules for num. Much will be improved with user-defined types because then no additional introspection iterations are necessary (I talked to Laurenz about that).
Remains the question what we can do now ...
I would tend to undo the fix for #9 for now and tackle it again later (when num is a proper type).

Actually I think it could just be fixed by keeping (or rather re-inserting) the state: state to the construction of the cells during the final pass.
  show table.cell: it => {
    if is-normal-cell(it, format) { it }
    else {
      table.cell(
-       call-num(it, format, col-widths: col-widths.at(it.x)),
+       call-num(it, format, col-widths: col-widths.at(it.x), state: state),
        align: it.align,
        x: it.x, y: it.y,
        inset: it.inset,
      )
    }
  }

That appears to fix it from the current mainline state.


Can I random text as command and let my own parser decide what action to take

Instead of defining the list of commands is there a way to accept any text and let my own parser decide what to do?

I have the same question, can anyone help?


⚠ Bofrost.lu has degraded performance

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

HTTP code: 200
Response time: 2682 ms

Resolved: Bofrost.lu performance has improved in a0e3a8b after 22 minutes.


Like button

As a User I want to be able to click a like button so that I can show that I like the art.
Acceptance Criteria :
-[ ] Option for a user to like individual item
-[ ] Option to unlike an item if action was erroneous

[ ] Only logged in users can make action

completed


Makefile: Remove unnecessary -no-pie for older GCC support

Currently, if:

GCC doesn't supports -no-pie: Build error
GCC supports -no-pie

GCC is not configured with --enable-default-pie: No-op
GCC is configured with --enable-default-pie:
Slightly worse performance because we still generate -fpie code
(-pie affects linker, -fpie affects compiler)

So instead of probing for existence of -fno-pie -no-pie, remove it altogether.
Fixes #540: Build breakage on Debian 8 with gcc 4.9.

@a3f thanks for reviewing this issue


GH-35015: [Go] Fix parquet memory leak

Rationale for this change
Some memory leaks resulted in partially skipped memory checks in pqarrow package.
This PR brings the checks back.
What changes are included in this PR?
Releases in proper places.
Are these changes tested?
Yes, the tests from #35015 are fully enabled now.
Are there any user-facing changes?
No.

Closes: #35015

recreating because of the force-push


Trying to access proposal of update market results in no proposal found

Description
Proposal VMP-20: CHANGE TARGETSTAKEPARAMETERS.SCALINGFACTOR FROM 1 TO 0.05 ON ETH/USD-PERP cannot be accessed through the governance page.
Results in PROPOSAL NOT FOUND The proposal you are looking for is not here, it may have been enacted before the last chain restore. You could check the Vega forums/discord instead for information about it.
https://governance.vega.xyz/proposals/283c0e0cf60573eda0952cc63567aaf0024f33d62c892fb5d83c801955b1d647

Handled in :
https://github.com/vegaprotocol/vega/issues/10132


CI is failing

CI is failing

................EE.....                                           [23](https://github.com/PrestaShop/ps-project-metrics/runs/5517147185?check_suite_focus=true#step:6:23) / 23 (100%)

Time: 00:00.3[30](https://github.com/PrestaShop/ps-project-metrics/runs/5517147185?check_suite_focus=true#step:6:30), Memory: 16.00 MB

There were 2 errors:

1) App\Tests\Helper\ReviewStatsServiceTest::testGetDeveloperStatsFromMatks
Undefined array key 0

/home/runner/work/ps-project-metrics/ps-project-metrics/tests/Helper/ReviewStatsServiceTest.php:43

2) App\Tests\Helper\ReviewStatsServiceTest::testGetDeveloperStatsFromPierreRambaud
Undefined array key 0

/home/runner/work/ps-project-metrics/ps-project-metrics/tests/Helper/ReviewStatsServiceTest.php:57

ERRORS!


Unable to build on CentOS 6.5

This issue may be related to issue #2177.
My system is

Cent OS 6.5
node v0.10.36
npm 1.4.28

It is important to note that libgnome-keyring-dev is not available from the Cent OS 6 repos, so I was unable to install it. I was able to install gnome-keyring, but that obviously doesn't have the development headers.
I originally tried to download and run the latest rpm, but I was given the following output.
$ atom
/usr/local/share/atom/atom: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/local/share/atom/atom)
/usr/local/share/atom/atom: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/local/share/atom/atom)
/usr/local/share/atom/atom: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/share/atom/atom)
/usr/local/share/atom/atom: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/local/share/atom/libchromiumcontent.so)
/usr/local/share/atom/atom: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/share/atom/libchromiumcontent.so)
/usr/local/share/atom/atom: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/share/atom/libgcrypt.so.11)
/usr/local/share/atom/atom: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /usr/local/share/atom/libgcrypt.so.11)

After that failed and I found issue 2177 I tried to compile Atom on my local machine.
I followed all of the guides, multiple times, but I am still unable to successfully build Atom from source. The output I get when attempting to build is as follows:
$ script/build
Node: v0.10.36
npm: v1.4.28
Installing build modules...
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/memory:83,
                 from ../node_modules/native-mate/vendor/base-minimal/src/base/threading/thread_collision_warner.h:8,
                 from ../node_modules/native-mate/vendor/base-minimal/src/base/memory/ref_counted.h:13,
                 from ../node_modules/native-mate/vendor/base-minimal/src/base/callback_internal.h:14,
                 from ../node_modules/native-mate/vendor/base-minimal/src/base/callback.h:14,
                 from ../node_modules/native-mate/vendor/base-minimal/src/base/bind_helpers.h:147,
                 from ../node_modules/native-mate/vendor/base-minimal/src/base/bind_internal.h:13,
                 from ../node_modules/native-mate/vendor/base-minimal/src/base/bind.h:13,
                 from ../node_modules/native-mate/vendor/src/native_mate/object_template_builder.h:8,
                 from ../node_modules/native-mate/vendor/src/native_mate/dictionary.h:9,
                 from ../node_modules/native-mate/vendor/src/native_mate/dictionary.cc:5:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In member function ‘virtual void* std::_Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)’:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In member function ‘virtual void* std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)’:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:204: error: cannot use typeid with -fno-rtti
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In constructor ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, _Alloc, _Args&& ...)’:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:861: error: cannot use typeid with -fno-rtti
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In function ‘_Del* std::get_deleter(const std::__shared_ptr<_Tp2, _Lp>&)’:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:1005: error: cannot use typeid with -fno-rtti
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
make: *** [Release/obj.target/native_mate/node_modules/native-mate/vendor/src/native_mate/dictionary.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-504.3.3.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/zach/Downloads/atom/build/node_modules/grunt-atom-shell-installer/node_modules/asar/node_modules/chromium-pickle
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

npm ERR<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is most likely a problem with the chromium-pickle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls chromium-pickle
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-504.3.3.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "--userconfig=/home/zach/Downloads/atom/.npmrc" "install" "--loglevel" "error"
npm ERR! cwd /home/zach/Downloads/atom/build
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

I looked to see if I could build with a more verbose output, but I was unable to find any options.
I was wondering if anyone has any success or solutions?

I have same errors, it came from atom-shell but it seems like there is nobody who find solutions . I hope some people will help us.

Isn't this the same issue as #2177?

Really? this issue end without solution, just a lost guy who speak about NW, don t think i haven t search, all existing issues about atom or atom-shell on CentOS aren t solved they are just close because "CentOS isn t the most popular linux distribution so we don t care"

Ubuntu is a popular Linux distro, so if software is developed on dependencies that exist in Ubuntu and don't exist in CentOS, then the software being developed will not work on CentOS. I am sure that CentOS 7 would have the dependencies needed to build Atom, but as far as popularity goes, CentOS 6 is much more popular than CentOS 7 because most of the industry is is still using RHEL 6.
It is kinda sad that a lot of software only support Ubuntu/Debian distros, but that is the way it is.

If you upgrade your compiler to gcc 4.8 by installing devtoolset-2 (see: http://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos ) -- you should be able to get past the build error, however, you'll still run into the runtime problem described in #2177 .

That is a good point. When I was initially trying to solve this problem, I did install devtoolset-2. It does fix the build errors, but none of the devtoolset's came with a libstdc++.so.6 that contained GLIBCXX_3.4.14 or GLIBCXX_3.4.15.

Still no solution? This is sad

also having this issue

I am using Centos 6.8. The editor is not working.
$ atom .
/usr/share/atom/atom: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/share/atom/atom)
/usr/share/atom/atom: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by /usr/share/atom/atom)
/usr/share/atom/atom: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/share/atom/atom)
/usr/share/atom/atom: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/share/atom/libnode.so)

$ cat /etc/centos-release
CentOS release 6.8 (Final)


EGFR kinase data

This PR provides a notebook to filter the already curated ChEMBL database for the EGFR kinase.
TODOS

[x] Create a EGFR specific data (csv to be added to the releases).
[x] Create a EGFR subset for testing (e.g. in experiments-binding-affinity repo).
[x] Add a PR template while we're at it.

Status

[x] Ready to go

@schallerdavid , I just added the EGFR subset to the release using the notebook generated in this PR; I thought it wouldn't make sense to create a new release for it, since it's based on ChEMBL29.


Adding new resources- LoginDeatils, Version

Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve. e.g., Fixes #01]
Check List

[ X] New functionality includes testing.

[ ] All tests pass for Python 2.7+ & 3.4+($ tox).

[ ] New functionality has been documented in the README if applicable.

[ X] New functionality has been thoroughly documented in the examples (please include helpful comments).

[ ] Changes are documented in the CHANGELOG.

Incorporating these comments in a new PR. Hence closing this one.


How to use state history when modifying arrays.

I am having a go at swapping out my old implementation to use aurelia-store. My current implementation is is essentially a copy of what you did here: https://github.com/zewa666/aurelia-hoc-store
I am interested in having the state history work from the beginning but can't quite get my head round it.
I would find it super helpful if you could show how the same code above would work (including undo) if one was using aurelia-store instead.
Just a suggestion, if I can't get it right i'll just carry on with using the pattern you prescribed in the post (which may be better for me as newbie to get the concepts down anyway).
Happy to talk outside of here if it helps.
Many thanks, 4imble

Closing this for now


Create deno.yml

I just recently found out about AndroRAT and can anyone help me with the installation I don't understand and I could really use help. Thank you

i can help;


Publish a version that accepts Cabal 3.6

Hi @andreasabel, could we have a version that supports Cabal 3.6 on Hackage? :)

@tchoutri I just released 1.0.9.  Can you please check if it works for you?

@andreasabel It does, thank you very much!

Great!


Add context menu to file explorer sidebar

Closes #621
This PR adds a context menu to the file explorer sidebar that allows the following actions:

Create a new file
Create a new directory
Rename a file/directory
Move a file/directory to the trash

The inputs for what the name should be used are taken in through the palette input. This is simpler to implement than something like vscode's method of editing the filename in the sidebar.
This does however raise further the probable existing issues around files being renamed out from under Lapce, and new files being created. As well, there's more potential now for cross platform issues where P
Notes:

Expands the layout height of the FileExplorerFileList to take up the full height of the sidebar. This is in order to capture right clicks in the empty space below the files. This would have to be changed around (such as moving right click handling up a 'layer') if there were other areas added to the file explorer sidebar later on, but would not be hard to do.
Minor: get_node_by_index is renamed get_node_by_index_mut and an immutable version is added

Thanks so much for working on this.
I think it would be better if the file/folder name is in the sidebar, which gives you a direct visual confirmation of where the file/folder is.

(It closed and then reopened because I accidentally pushed nothing at first)
Okay, I reworked the PR to allow naming/renaming the file directly in the sidebar. It isn't perfect and has some issues that should be fixed/improved-upon in the future, but I think it is in a workable state?
 Could look better with some more work
(Potential features/improvements/issues):

Feature: Doesn't show an icon while typing the file's name. VSCode automatically updates the icon when you type the extension even before the rename.
Improvement: We should maybe have a limit on what the filename input can take, so people don't accidentally copy&paste a thousand lines of text into the rename box
Improvement: Should maybe stop certain characters from being inputted (such as tabs)
Improvement: It would look nicer to put the new-file naming box directly after the folders rather than at the top?
Improvement: It should scroll the naming box into view if it isn't already
Improvement: I think it would be good to make the font it uses match the ui font for consistency with the sidebar
Improvement: It would also be nice to decrease the vertical height a bit, which would make it feel less out of place
Issue: Refuses file list updates until after the file has been created or renamed

This is needed due to using indexes, which could get messed with by updating the children.

We can get around this by either switching to not using indices or making sure that the indices are kept valid (such as moving them as needed)
but that's more complexity, when I kinda just want to get this PR finished

This does mean there is a bug if a file is created whilst naming a file, and so it won't appear.
Might be able to work around this by requesting it to reread files?


Make fields non nullable

Description
This PR marks the fields that are non nullable in the ORD spec.
Related issue(s)
https://github.com/kyma-incubator/compass/pull/3809

/hold cancel


yoyo and delay

Hi!
I have an issue with a Tween that have a delay and yoyo = true. The repeat is called while the element  is coming back with the yoyo.
My code:
var $square = document.querySelector('.square');

var t = new mojs.Tween({
  yoyo: true,
  repeat: 10,
  delay: 1000,
  duration: 800,
  onUpdate: function (progress) {
    $square.style.transform = 'translateX(' + progress * 100 + 'px)';
  }
});
t.run();

A demo is available here http://jsbin.com/fulebobodu/edit?html,css,js,output
Also with repeat: 10, I see 11 times my tween. It's a bit confusing.

Hi @vdaguenet!
Sorry for the delay, and thanks for the issue. That's definitely a bug and I do understand it's origin.
Will fix shorty.
Re: repeat.
The option describes how many times a tween should repeat after it was completed.
Tween will run once regardless the repeat option, so if you set repeat of 10, it will run 11 (1 + 10) times in total.
Thanks for the alert!

Fixed with [6c4cc6e].
Will make release shortly.


Error validating custom provider file because of MIME type mismatch

Learned about this today and wanted to test with a custom provider using https://lmstudio.ai, I used the docs to code the provider, but when I upload the file it is rejected duo to MIME type mismatch (as seen in the image). Not sure if relevant, but I am running this on Windows 10.

I checked with a copy-paste of the example(s) given and had the same issue with them.

Yes this seems like an issue in how different browsers decide what MIME type a Python script is, because it's not well documented. I could add another type, but, to prevent further issues, I've just removed the MIME type acceptance check entirely. Try now pip install chainforge --upgrade
https://pypi.org/project/chainforge/<IP_ADDRESS>/

Error creating a new directory 'provider_scripts' at filepath C:\Users<user>\AppData\Roaming\Python\Python311\site-packages\chainforge\cache\provider_scripts: [WinError 3] O sistema não conseguiu localizar o caminho especificado: 'C:\Users\\AppData\Roaming\Python\Python311\site-packages\chainforge\cache\provider_scripts'

I manually created the folders and then got another error related with charmap

Error saving script 'provider_scripts' at filepath C:\Users<user>\AppData\Roaming\Python\Python311\site-packages\chainforge\cache\provider_scripts: 'charmap' codec can't encode character '\U0001f432' in position 258: character maps to

but then I realized it was because of the emoji I picked, I used a emoticon instead and it worked flawlessly. Thank you.


SBOL Designer Doesn't Recognize Attachments

After verifying that I am correctly logged in to the Utah SynbioHub Registry and going to the proper collection for my toggle switch, I am still unable to view any of my submitted parts for the toggle switch.  I think the issue is that all of my parts were submitted to the collection as attachments, and while I can see components in SBOL designer, all of my genebank files were categorized as attachments and are not present on SBOL designer. They are still not present when I select All part for Part Role and None for Role refinement.

Oops.  You should never submit parts as attachments.  This is not the correct way.  You need to submit the parts using the Submit page.
Attachments are only for images, data, etc.
BTW: did you submit GenBank or FASTA for your parts?  If GenBank, you should resubmit the parts.  If FASTA, you can build your parts using SBOLDesigner and attach a sequence to each part as you build them in SBOLDesigner.  This will allow you to indicate their Role, etc.

On Sep 6, 2017, at 5:03 PM, dwootton<EMAIL_ADDRESS>wrote:
After verifying that I am correctly logged in to the Utah SynbioHub Registry and going to the proper collection for my toggle switch, I am still unable to view any of my submitted parts for the toggle switch. I think the issue is that all of my parts were submitted to the collection as attachments, and while I can see components in SBOL designer, all of my genebank files were categorized as attachments and are not present on SBOL designer. They are still not present when I select All part for Part Role and None for Role refinement.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/SynBioDex/SBOLDesigner/issues/171, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD9_ZJZaGmj-Kx7rFcPFzwIBWWiOOIks5sfx0TgaJpZM4PPDen.

When I go through the formal submission process (hitting the submit button, going to submit existing collection, selecting the private collection, and submitting the file) the file will still upload as an attachment. This is still the case when I select 'overwrite existing object'.
When I delete the attachment from the collection and try to re add it using submit, the component never appears in my collection. It doesn't appear as an attachment or component- it just never appears.
I submitted GenBank standard files (.gb). I'm generating these files using snapgene (a plasmid editor that recognizes features on submitted DNA sequences). Could this be part of the error?

This is very odd. Could you send me an example file to<EMAIL_ADDRESS>Chris
Sent from my iPhone

On Sep 6, 2017, at 6:07 PM, dwootton<EMAIL_ADDRESS>wrote:
When I go through the formal submission process (hitting the submit button, going to submit existing collection, selecting the private collection, and submitting the file) the file will still upload as an attachment. This is still the case when I select 'overwrite existing object'.
When I delete the attachment from the collection and try to re add it using submit, the component never appears in my collection. It doesn't appear as an attachment or component- it just never appears.
I submitted GenBank standard files (.gb). I'm generating these files using snapgene (a plasmid editor that recognizes features on submitted DNA sequences). Could this be part of the error?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Is this still a bug related to SBOLDesigner?  If not, feel free to close.


lib directory autoloading issue

After installing Lookbook @unikitty has run into some odd autoloading behaviour in their lib directory. More details here: https://github.com/ViewComponent/lookbook/issues/383#issuecomment-1491493541

I've just tried beta.4 and got the same error as with beta.8, so it looks like the changes in beta.5 aren't to blame.

Okay thanks @unikitty37, appreciate you giving it a try. I haven't been able to replicate any lib directory strangeness here yet but I'll keep trying :-)

I'm going to close this down for now as I'm afraid I've not been able to replicate and haven't heard any other reports of anything that might be related. It may be some conflict with a project-specfic autoloader config and Lookbook's own autoloader but I'm not sure I can make any more progress on it without a more concrete example.
Please do reopen if there is anything to add to this at any time or if anyone else runs into a similar issue.


Cannot update Bookstack

Greeting.
This is the first time I am trying to update bookstack, and I keep getting an error that says it isn't able to connect to github because of a certificate failure.
I ran this command in my bookstack web directory as said on the "How to update" page:
git pull origin release && composer install --no-dev && php artisan migrate
You can see the error below:
Update failed (The "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed)
It then asks me if I want to try reinstalling the package instead. This ends up in the same since it can't connect probably to github.
I am hosting bookstack on a Ubuntu 18.04 VM.
And before asking, yes, the machine does have a working internet connection.

Hi @7uppi,

Is the rest of the machine up to date? (Up-to-date apt packages?)
Do you have any anti-virus installed at all?
If you attempt again now do you get the exact same error?

Hi @ssddanbrown

* Is the rest of the machine up to date? (Up-to-date apt packages?)

Yes it is. I also restarted the machine before trying to update bookstack just to be sure that every service was probably restarted after upgrading.

* Do you have any anti-virus installed at all?

No antivirus on the machine.

* If you attempt again now do you get the exact same error?

Yup.
I did find this on github, and tried to do what he said worked for him. That also worked for me, so I guess something was wrong with the certificate store on the machine.
However, I now have another problem.
When composer is done installing what is needed and php artisan begins, I get this:
`> Illuminate\Foundation\ComposerScripts::postAutoloadDump

@php artisan package:discover --ansi

In Application.php line 679:
Class 'Barryvdh\Debugbar\ServiceProvider' not found
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1`
What causes this?
I got some permission errors to begin with, where it said what it didn't have permission to (vendor and logs), and gave it permission.
Thanks

Looks like some dev packages got cached at some point. You could try running just composer install (Without the --no-dev part) and see if that gets you further.

It got me a little further. I did however just try to close port 80 traffic and give the webserver full access to every directory in /var/www/bookstack (my bookstack installation). That worked like a charm, and now it is updated.
That does bring me to my next question. How should permissions be on the individual files and folders? I mean, the bookstack docs says the webserver should only server the public folder. Does that mean I can just remove access from other directories?

How should permissions be on the individual files and folders?

Everything in the /var/www/bookstack directory should be owned by the www-data user. You can set this for all files and directories in /var/www/bookstack with this command: sudo chown -R www-data:www-data /var/www/bookstack. It recursively sets the owner of everything to www-data, allowing the webserver to read and write to everything there. It's needed for things like writing logs and saving images.

the bookstack docs says the webserver should only serve the public folder. Does that mean I can just remove access from other directories?

The directory that your webserver serves should be /var/www/bookstack/public. If you're using Apache, you'd set that as something like:
Alias "/bookstack" "/var/www/bookstack/public"
<Directory /var/www/bookstack/public/>
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

This way, people on the internet can only access the items in bookstack/public but files there can still reference other files in the bookstack directory.

@codemicro @ssddanbrown
That was all. Thank you very much!


BDD-based guard simplifier

Switch back to the two node AND and OR representation.
One sad part is the library for minimizing guards generates sum-of-products
form. @sampsyo is there a name for the "minimal" logical expression for a
given logic equation? Any simple, well-known ways to do this?

use "detached mutability" pattern in go_insertion
use simple Guard::And and Guard::Or
BDD based guard simplification

Wow, this is super super cool. I like the idea of trying to minimize these guard expressions; it's a nice, clean pass that's not intertwined with anything else. And rad that there is a solid BDD crate out there!

One sad part is the library for minimizing guards generates sum-of-products form. @sampsyo is there a name for the "minimal" logical expression for a given logic equation? Any simple, well-known ways to do this?

To clarify, does "some-of-products form" the same as disjunctive normal form (DNF)? And I assume the problem with this is that it is certainly going to be larger than the BDD (because no "sharing"; it's a tree and not a graph) and also not necessarily any smaller than the original tree?
I don't know of a term or straightforward way to get the minimal Boolean expression for an arbitrary expression. In the limit, it seems like this reduces to logic synthesis? If we wanted to structurally program FPGA LUTs directly, it seems like we would want to take the reduced BDD and map that directly to LUTs. Barring that, maybe the thing to do is to use variables to get the "sharing" that BDDs allow? So, like, I know this is not a BDD, but a dag representing (a or b) and (a or b) could get serialized to:
x = a or b
x and x

So, introducing temporary variables allows sharing that is not possible in a straight-up Boolean expression.
It would be cool to see if this has an impact on the benchmarks when run as a post-processing pass, right before SV generation. There is a chance it might benefit Verilator execution but have less of an effect on Vivado synthesis, because I can imagine that something like Vivado might attempt to minimize Boolean expressions along the way. But who knows! Even if it doesn't improve Vivado's results at all, it might improve execution time.


reviewdog use default flags

What this PR does:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

Codecov Report

Merging #167 (9b3433d) into develop (b6f255b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #167   +/-   ##
========================================
  Coverage    40.60%   40.60%
========================================
  Files           35       35
  Lines         1692     1692
========================================
  Hits           687      687
  Misses         903      903
  Partials       102      102

Continue to review full report at Codecov.

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


Update to 2022.2, with .xz tarballs instead of .bz2

Checklist

[x] Used a personal fork of the feedstock to propose changes
x ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin, please rerender


Add federation configuration for prometheus

Is this a BUG REPORT or FEATURE REQUEST?
FEATURE REQUEST:
Add federation configuration for prometheus so that it can collect the data from prometheus running on remote location.

Merged via #894


fix(parsing): fix #36 by checking (non-)mandatory metrics

Due to the missing (non-)mandatory strategy being implemented through #35, this PR fixes the "non-sticky" non-mandatory metrics issue raised in #34 by @ViperGeek.
It also fixes the case in which the mandatory metrics were not part of the input vector (from the URL fragment/hash), which has been discovered during dev of the current fix.

https://redhatproductsecurity.github.io/cvss-v4-calculator/ works great!  Thanks all.
I'll sync the https://github.com/FIRSTdotorg/cvss-v4-calculator fork later today and refresh first.org/cvss/calculator/v4-0


feat: Embed a JSON encoder

Adds a custom implementation of a JSON encoder. Doesn't use protocols, as consolidating takes a lot of time.
This way we don't care if a project has a JSON library available.
Closes #4

@ajayvigneshk In case you want to give it a try before merging!

Works well @jfpedroza !
All TODO items are done 🎉 !

Great. Time to add more TODO items.


[Bug]: TTS works in Safari but not in Chrome with Browser-based tts

What happened?
We setup TTS (Browser-based) on librechat v0.7.4-rc1 and it works on safari browser but it does not work on Chrome.
In Chrome the button is also enabled and can be pressed but after a short time (roughly 5 seconds) it will unselect again and there is no text inserted in the message field.
I checked the logs (with enabled debug logs) in the browser and backend of librechat but there is nothing present
We also verified that the microphone is enabled/works in chrome. The permission to use the microphone for the librechat url is also given.
Any ideas where to look or try? What kind of API/javascript library are you using for STT?
It's happening also on different machines.
Steps to Reproduce

Setup TTS on librechat
Use Chrome (we use Version 126.0.6478.127) and try to record TTS with Browser
Text is not present in input field

What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Screenshots
No response
Code of Conduct

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

Hey there,
I think there's a bit of a mix-up between STT and TTS. Since Chrome only uses cloud-based TTS, you'll need to turn on "Use cloud-based browser" in the advanced mode
Is STT working for you? If not, could you give me some more details on how to reproduce the bug? I've tried it myself and it seems to be working fine


nz-slider issues

Reproduction link
https://codesandbox.io/s/elated-feynman-szkn1
Steps to reproduce
You can find in 'What happening' section
What is expected?
You can find in 'What happening' section
What is actually happening?
1.If there can be more properties that allows display some forbidden region，such as bellow:
<nz-slider [nzMin]="0" [nzMax]="100" [availableRegion]="[10,50]"> // in this case, [availableRegion] means active value region can be between 10 and 50,but the slider itself displays a whole 0 to 100 line for beauty.
2.In sandbox case above, sometimes the highlight area displays on wrong slider.You can try drag the first slider to some value such as 25,then drag the second slider to 75, and you'll see. And the sliders in for-statement in templates just acts only one time when the if statement activated after init, I also wander why.
3.As the sandbox case above, can there be a new component such as NzSliderGroup to work like it?

Environment
Info

ng-zorro-antd
9.3.0

Browser
chrome / firefox

Another bug!!!
If you'll set nzMin=-10 and nzMax =10 for example and ngModel value will be 0, position of slider won't be at the middle of slider as expected, it will be on the start (-10).

Hi, are there any updates on this bug?


Problem with symbols encoding

Im trying to make a simple query:
SELECT
    $timeSeries as t,
    avg(response_time)
FROM logs.nginx
GROUP BY t
WHERE $timeFilter

This transformed into:
SELECT     (intDiv(toUInt32(time_iso), 5) * 5) * 1000 as t,     avg(response_time) FROM logs.nginx GROUP BY t WHERE log_date >= toDate(1501751601) AND time_iso >= toDateTime(1501751601)
And I got an error:
Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 120: WHERE log_date >= toDate(1501751601) AND time_iso >= toDateTime(1501751601) FORMAT JSON, expected end of query, e.what() = DB::Exception

In tabix.io this query is OK

Hi @Foxsa
Could you provide me with your browser type and version and datasource version?

Browser Google Chromium
Version 59.0.3071.109 (Developer Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit)
datasource version 0.0.2 from Grafana store

At first i thought that problem is in > characters. But it's just GitHub format. There is an error in the request. You can't do GROUP BY before WHERE statement in that request. See documentation http://clickhouse.readthedocs.io/en/latest/reference_ru.html#SELECT
So all you need - just swap WHERE and GROUP BY like next:
SELECT
    $timeSeries as t,
    avg(response_time)
FROM logs.nginx
WHERE $timeFilter
GROUP BY t

I hope it helps

In tabix.io this query is OK
I am wondering - how? :-)

Ok, now it works, i.e. without errors.
My mistake, fixed it copying to tabix
But now grafana not drawing plot, only strange horisontal lines

It's because you fetched data without ordering by time. Now you need to add:
SELECT
    $timeSeries as t,
    avg(response_time)
FROM logs.nginx
WHERE $timeFilter
GROUP BY t
ORDER BY t

Take a look at documentation https://github.com/Vertamedia/clickhouse-grafana#raw-sql-editor

Oh, thank you again!  Plz, close the issue if problem solved


Make the timezone for budgets only  UTC

Description
What problem are you trying to solve?
Budgets should be using UTC so that there's no surprise behavior depending on what nodes the Karpenter pod is running on

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#unsupported-timezone-specification K8s doesn't support this, I am  wondering if there is a historical reason for that?

My guess is that it's easier to harden/validate a spec when it's not a magic pre-pended string. 1.27+ allows a timezone as a separate spec field.

https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#unsupported-timezone-specification K8s doesn't support specifying timezone in cron syntax, I am wondering if there is a historical reason for that?

You specify a timezone using the timezone field, which makes the data available to clients that know how Kubernetes API fields work but can't parse Cron format.
But also, the support for timezones using the embedded specification was added accidentally when we bumped a library version. Let's not copy that accident.

Budgets should be using UTC so that there's no surprise behavior depending on what nodes the Karpenter pod is running on

To be clear, the pod filesystem is what defines what the timezone is, so this is more of an issue of what image is used when building the Karpenter library. Regardless, I think this is a good safety behavior to make sure that our budgets are just always UTC, regardless of environment.

the pod filesystem is what defines what the timezone is

That's not the whole story. OCI runtime spec v1.1.0 supports time namespaces, and we can expect Kubernetes to allow setting time namespaces for Pods at some point. Also, you can set the kernel timezone for the node overall.

That's not the whole story. OCI runtime spec v1.1.0 supports time namespaces,

Ah, yep. That's interesting. So seems like there is even more reason to do this for consistency.

Also, you can set the kernel timezone for the node overall.

This one is interesting. I see how you can do this. But how does this affect your container timezone?

timezone file into a container, regardless of the container image used

Sure, I totally agree. I'm not sure why you would do that for Karpenter unless you were just trying to mess with stuff, but in either case, I'm assuming that we both agree here? The go code that we have written should just reason in terms of UTC so that there is no confusion regardless of whatever timezone the entire container is running in.
If we wanted to support timezones with our crontabs, we could so through some other mechanism, like a timezone field in the budgets.


completions undefined

Latest version client.completions isnt working, says method undefined by client :) Downgrading fixed it

completions scheduled to be deprecated.
We can use chat method instead of it.
https://github.com/alexrudall/ruby-openai/blob/f9046a317294ade235c211a34cbb103a965a5e80/lib/openai/client.rb#L25-L27
https://github.com/alexrudall/ruby-openai/pull/350

OpenAI has new Instruct models now, namely gpt-3.5-turbo-instruct. This model cannot be called via chat but needs to be called via the completions API. Can we bring it back, pls?

@ZeroMax-dev @renatomserra it's back in v6.5, thanks for flagging


Added documentation for the Server's Build folder

Because some spots can be a bit challenging to follow for those that haven't really messed with it much, I just added some documentation for the Server's Build folder.

I will try to add more documentation.
Thanks!


Multiple ConfigServicePropertySourceLocator bean after restart.

After calling restart, a new ConfigServicePropertySourceLocator is created and the old one is kept. The problem is they are all invoked after restart so if I POST to restart 10 times, I get 11 beans and eleven invocations which is very weird.

Breakpoint at SpringApplication#addInitializers(ApplicationContextInitializer<?>... initializers)
this = {SpringApplication@2244}
initializers = {ApplicationContextInitializer[2]@6093}
 0 = {PropertySourceBootstrapConfiguration$$EnhancerBySpringCGLIB$$56dce074@6097}
 1 = {EnvironmentDecryptApplicationInitializer@6098}
this.initializers = {ArrayList@3671}  size = 10
 0 = {DelegatingApplicationContextInitializer@3784}
 1 = {ContextIdApplicationContextInitializer@3785}
 2 = {ConfigurationWarningsApplicationContextInitializer@3786}
 3 = {ServerPortInfoApplicationContextInitializer@3787}
 4 = {SharedMetadataReaderFactoryContextInitializer@3788}
 5 = {AutoConfigurationReportLoggingInitializer@3789}
 6 = {BootstrapApplicationListener$AncestorInitializer@3678}
 7 = {PropertySourceBootstrapConfiguration$$EnhancerBySpringCGLIB$$56dce074@3705}
 8 = {EnvironmentDecryptApplicationInitializer@3706}
 9 = {BootstrapApplicationListener$DelegatingEnvironmentDecryptApplicationInitializer@3715}

As you can see, it is about to add another instance of PropertySourceBootstrapConfiguration to the initializer list.

Thanks for the report

Is it still a problem with Finchley.RELEASE?

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


How we can use this with SAML based instance?

Hii,
I am trying to deployed this project with SAML based amazon connect instance but we can't use this with SAML based amazon connect instance. It is possible to use this with SAML based connect instance.

Hello This is the issue which we are getting, it is forking the github repository but not creating the amplify app.
Any reasons why it is happening we are having a go live an urgent response will be much appreciated


organise imports via eslint

We had a nice recent change

https://github.com/LavaMoat/LavaMoat/pull/1038

we could enhance our setup further from running source.organizeImports locally (VSCode) on save
to running our own ESLint sort rules as we see fit
to include in our setup: pre-commit(husky) > lint-staged(eslint, prettier)
examples of plugins and rules: https://github.com/leotm/react-native-template-new-architecture/blob/master/.eslintrc.js

simple-import-sort (or sort-imports, import/order)
sort-keys-fix
typescript-sort-keys
sort-vars

nb: would likely would need to switch off sorting in VSCode if causing conflicts

https://gist.github.com/phatnguyenuit/149094cb3a28e30f5f4c891d264bf7e6


feat: helmfile.yaml layering enhancements

The current  Layering system didn't work as documented, as it relies on helmfile to template each "part" of your helmfile.yaml THEN merge them one by one.
The reality was that helmfile template all the parts of your helmfile.yaml at once, and then merge those YAML documents. In https://github.com/roboll/helmfile/issues/388#issuecomment-436186278, @sruon was making a GREAT point that we may need to change helmfile to render templates earlier - that is to evaluate a template per each helmfile.yaml part separated by ---. Sorry I missed my expertise to follow your great idea last year @sruon  😭
Anyways, this, in combination with the wrong documentation, has made so many people confused. To finally overcome this situation, here's a fairly large PR that introduces the 2 enhancements:

bases: for easier layering without go template expressions, especially {{ readFunc "path/to/file" }}s. This is the first commit of this PR.
helmfile.yaml is splited by the separator --- at first. Each part is then rendered as a go template(double-render applies as before). Finally, All the results are merged in the order of occurence. I assume this as an enhanced version of @sruon's work. This is the second commit of this PR.

Resolves #388
Resolve #584
Resolves #585 (HELMFILE_EXPERIMENTA=true -f helmfile.yaml helmfile disables the whole-file templating, treating the helmfile.yaml as a regular YAML file as the file ext. denotes. Use helmfile.yaml.gotmpl or helmfile.gotmpl to enable)
Fixes #568 (Use bases or readFile rather than not importing implicitly with helmfile.d

Awesome!

Thanks for reviewing!

trying to use bases: as documented, in 0.63, and completely does not work. Is this PR above to fix it? is there a document update to come as well?

@bitsofinfo This PR includes the documentation update as well. Do you see any error messages?


getting "Unknown order sent" error every time I call cancelOrder

I am getting:
{
  code: -2011,
  message: "Unknown order sent.",
  body: {
    code: -2011,
    msg: "Unknown order sent.",
  },
  requestUrl: "https://api.binance.com/api/v3/order?symbol=LTCBTC&orderId=1159416338&timestamp=1707324814066&recvWindow=5000&signature=XXXXXXXXXXXX",
  requestBody: undefined,
  requestOptions: {
    recvWindow: 5000,
    syncIntervalMs: 3600000,
    strictParamValidation: false,
    disableTimeSync: true,
    api_key: undefined,
    api_secret: undefined,
    baseUrl: "https://api.binance.com",
  },

every time I try to cancel a valid order.
Order is open in the official binance web client and after I call this it is actually cancelled. So why is that error thrown?
For now I just ignore it with a try catch, but why is it even getting thrown?

It's not the SDK that decides this should be an error. That code and message style response means that the exchange responded with that error in response to your request. Definitely seems weird, if the cancel order request actually worked based on what you see on the website. I would definitely report this to binance.
And just to check a really silly question, are you absolutely certain you're not accidentally calling cancel order twice, so only the second request fails?
If you can easily reproduce this, you could try reaching out to binance in their API community on telegram - it's typically where I ask/report things that seem unclear: https://t.me/binance_api_english
As with any telegram community, don't trust anyone that messages you directly of course (since that happens a lot in these groups sadly).

And just to check a really silly question, are you absolutely certain you're not accidentally calling cancel order twice, so only the second request fails?

That was my first thought as well, sadly no😅
Will put together a tiny reproduction.

Forgot to mention I am using bun as runtime. Will try with nodejs tomorrow

actually I just tried with this code
import { botSettings } from '../botSettings'
import { binanceClient } from './binanceClient'

const res = await binanceClient.cancelOrder({
  symbol: botSettings.symbol,
  orderId: XXXXXXX
})

console.log(res)

and it went through nicely so I suspect it was actually the duplicate call most likely or I called it after the order was filled.
Sorry for spamming


Shards reset when I rejoin

I keep having this issue where I can join with 600 shards and then leave with lets say 20k. When I join later on im back to 600 shards and then I just feel like it wasn't worth grinding those shards because they keep ressetting.
I don't know how I get a pic of the console log in here.

Could you provide more details please? Since this is a server issue the console log will not be necessary. Are you leaving and joining in quick succession, are you leaving immediately after rebirthing etc... I have not been able to reproduce this bug, and the code surrounding the Shards is solid.


fix: lets help the user know how to install kuberhealthy

if they are booting a cluster that does not have it installed

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign jstrachan
You can assign the PR to them by writing /assign @jstrachan in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/approve

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jstrachan
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [jstrachan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


feat(trip): add find trip orders fill optimization

Pull Request

Description

Type of Change

[x] ✨ New feature (non-breaking change which adds functionality)
[ ] 🛠 Bug fix (non-breaking change which fixes an issue)
[ ] ❌ Breaking change (fix or feature that would cause existing functionality
to change)
[ ] 🧹 Code refactor
[ ] ✅ Build configuration change
[ ] 📝 Documentation
[ ] 🗑 Chore

Task linked: CU-8689n1j1a Distribution logic of all orders


Feature Request: Destroy method

Need method(s) to cleanup the chart and restore the HTML elements back to their original (clean) state.

A work-around destroy looks like this:
//  Remove the pie charts canvases
$('.pie-chart canvas').remove();

//  Remove the pie chart data contexts, in case you want to rebuild them
$('.pie-chart').removeData('easyPieChart');

@evolross very helpful, thank you!


Feature - add functionality to run single or multiple tests from one test file

FEATURE
Add possibility to execute single or multiple tests cases from one test file, or exclude some of test cases from test execution.
Base on request: #330 , #243

PR includes
Updated code :

Added new class UnityUtils.rb. (no code style issues - tested via rubocop)
Updated implementation of configurator_builder.rb
Updated implementation of generatior.rb
Updated implementation or rules_tests.rb

Updated CeedlingPacket.md with new ceedling functionality.
Added 5 UT to cover new functionality. ( rubocop describe problems with to long name description)

Short description
This PR contains extension which enable execution of:

one
or multiple tests
or non if the passed test case name is not fitting passed by end user parameter after colon

Referring to #330 , #243, the new functionality can be enabled by calling:
ceedling test:<test_file_name> --test_case=<test_case_name>

and updating project.yml after adding:
:test_runner:
  :cmdline_args: true

The UNITY_USE_COMMAND_LINE_ARGS will be set automatically by Ceedling as part of setup, so end user does not need to care about more setup.
Mentioned above functionality is an wrapper for functionality already delivered in Unity component( (UnityParseOptions)[https://github.com/ThrowTheSwitch/Unity/blob/master/src/unity.c#L2266]), and have his own limitations and problems.
Limitations and problems:

Can be at current moment executed for single test file
it passed test case name is a part of test_file_name.c, all tests will be executed from mentioned file.( The problem is connected with test runner generator which add test file name as part of test_case).

Information about such of issues are added to documentation.

** How it works in real life **
If test file contains three test cases:
test_gpio.c
#include "unity.h"
#include "gpio_def.h"

void setUp(void) {}
void tearDown(void) {}

void test_gpio_start(void) {
  TEST_ASSERT_EQUAL(GPIO_OK, gpio_start(gpio13) ).
}

void test_gpio_configure_proper(void) {
  TEST_ASSERT_EQUAL(GPIO_OK, gpio_configure(gpio_13, NULL));
}

void test_gpio_configure_fail_pin_not_allowed(void) {
  TEST_ASSERT_EQUAL(GPIO_ERR, gpio_configure(gpio_max, NULL));
}

and you want to run only:

configure tests, you can call  ceedling test:gpio --test_case=configure
single test(require to be unique) call ceedling test:all --test_case=test_gpio_configure_fail_pin_not_allowed
all test cases from file ceedling test:gpio or ceedling test:all --test_case=gpio
to exclude test cases from test run with "configure" string, ```ceedling test:all --exclude_test_case

In case if test case name is not in the file name no test case will be executed.

@mvandervoord : Can I ask you for a looking at this in your free time? I have hope that this feature will help other people as helped me in my work.

Hi @mvandervoord,
If you will have time can you look at it, as I would like to expand a little bit more functionality of gdb_reported(to add possibility to collect results from tests which not crash from test_runner.c file) basing on this PR'st, but I'm not sure if it looks okay for you.

Hi @lukzeg -- I'm going to review this now. Before I even dive into it, I need to say three things:

I'm really glad this feature is being worked on.
I'm really thankful that you're working on it. You do great work.
This is perhaps the best commented PR I've seen in my life!


Updated index.html

Fixed some grammatical and punctuation error.

@PushpitaPikuDey Please make PR on develop branch.
We don't accept anything on master branch.
Closing this down.


[Payments] Implementation Documentation

@nicolasbrugneaux I forget what was the remaining work on this?
I remember we wanted documentation for two groups:

users of payments sdk
developers of sdk

Is there anything remaining here?

I'm not entirely sure anymore, the CLI is documented and there's a readme to collaborate, so that clears the developers of the sdk. But there's no documentation for the end users of the sdk


Merge ms

Codecov Report

Merging #262 into master will increase coverage by 0.01%.
The diff coverage is 77.77%.

@@            Coverage Diff             @@
##           master     #262      +/-   ##
==========================================
+ Coverage   67.01%   67.03%   +0.01%
==========================================
  Files         571      571
  Lines       43103    43097       -6
  Branches     4403     4401       -2
==========================================
+ Hits        28886    28888       +2
+ Misses      13107    13100       -7
+ Partials     1110     1109       -1

Impacted Files
Coverage Δ

lib/python/treadmill/reports.py
88.88% <ø> (ø)
:arrow_up:

...on/treadmill/tests/appcfg/runtime_manifest_test.py
93.51% <ø> (ø)
:arrow_up:

lib/python/treadmill/appcfg/manifest.py
76.72% <ø> (ø)
:arrow_up:

lib/python/treadmill/sproc/start_container.py
0% <0%> (ø)
:arrow_up:

lib/python/treadmill/runtime/linux/_run.py
84.87% <100%> (+0.12%)
:arrow_up:

lib/python/treadmill/runtime/linux/image/native.py
69.68% <100%> (+0.36%)
:arrow_up:

lib/python/treadmill/subproc.py
40.93% <100%> (+0.15%)
:arrow_up:

lib/python/treadmill/tests/subproc_test.py
89.47% <50%> (-2.2%)
:arrow_down:

Continue to review full report at Codecov.

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


[Data] Add data clear function

Add function to clear raw data in edge data.
This does not release the edge data handle.

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #173. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.


update channel to stable-v1

This is for Q2 release.

/hold
Need to release when all others are ready.

ref: https://github.com/IBM/operand-deployment-lifecycle-manager/pull/388


the error to use the package

when I use the package to compute psds scores, I was confronted with the error, which is

发生异常: ImportError
numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use 'numpy._import_array' to disable if you are certain you don't need it).
File "/mnt/lcy/fdy/utils/evaluation_v23.py", line 1, in
import sed_scores_eval
File "/mnt/lcy/fdy/main_gc.py", line 471, in
from utils.evaluation_v23 import v23_compute_psds_from_sed_scores_eval
ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use 'numpy._import_array' to disable if you are certain you don't need it).

I am wandering if the improper version of the numpy causes this error. If so, which version of the numpy is correct.
Thank you for your early reply!!!

Is that the complete traceback? Looks like most of it refers to your local file structure. Can you share the complete traceback you get from only calling import sed_scores_eval?


no module named apistar

Trying to install apistar inside a venv created with  python -m venv venv,  python -m apistar yields "no module named apistar"
Not sure what I am doing wrong, I recorded this from my terminal.  These should be steps to reproduce.
❯ python --version
Python 3.7.4
wurst [~/tmp]
❯ pip --version
pip 19.2.3 from /usr/lib/python3.7/site-packages/pip (python 3.7)
wurst [~/tmp]
❯ python -m venv venv
wurst [~/tmp]
❯ source venv/bin/activate
(venv) wurst [~/tmp]
❯ which pip
/home/wurst/tmp/venv/bin/pip
(venv) wurst [~/tmp]
❯ pip install apistar
Ignoring '--user', since user site-packages are not visible in this virtualenv.
Collecting apistar
  Using cached https://files.pythonhosted.org/packages/d6/0c/3066b856f661bc58b16c1a2ff4eeed25dc4f0d4618871b3454066dad89e0/apistar-0.7.2.tar.gz
Collecting click (from apistar)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting jinja2 (from apistar)
  Using cached https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl
Collecting requests (from apistar)
  Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting pyyaml (from apistar)
  Using cached https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz
Collecting typesystem (from apistar)
  Using cached https://files.pythonhosted.org/packages/bd/be/158f4a02dde348e16cec7ab9603df521d9175d37ff7d048f086d9b76eb7b/typesystem-0.2.4.tar.gz
Collecting MarkupSafe>=0.23 (from jinja2->apistar)
  Using cached https://files.pythonhosted.org/packages/98/7b/ff284bd8c80654e471b769062a9b43cc5d03e7a615048d96f4619df8d420/MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->apistar)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests->apistar)
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->apistar)
  Using cached https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->apistar)
  Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl
Installing collected packages: click, MarkupSafe, jinja2, chardet, idna, urllib3, certifi, requests, pyyaml, typesystem, apistar
  Running setup.py install for pyyaml ... done
  Running setup.py install for typesystem ... done
  Running setup.py install for apistar ... done
Successfully installed MarkupSafe-1.1.1 apistar certifi-2019.9.11 chardet-3.0.4 click-7.0 idna-2.8 jinja2-2.10.3 pyyaml requests-2.22.0 typesystem urllib3-1.25.6
(venv) wurst [~/tmp]
❯ python -m apistar
/home/wurst/tmp/venv/bin/python: No module named apistar
(venv) wurst [~/tmp]
❯ which apistar
/home/wurst/.local/bin/apistar
(venv) wurst [~/tmp]
❯ deactivate
wurst [~/tmp]
❯ exit

It seems apistar have got installed out of your virtualenv

@slipsnip The CLI is not usable yet as callable python module. See also https://github.com/encode/apistar/pull/666


Add rounding to the C++ version in order to fix a small but important difference to the C# version

I noticed a small but important-for-me discrepancy between the C++ and the C# versions.
The C# version (effectively) rounds in GetIntersectPoint, when the C++ version truncates.
Not entirely sure as to which one is more correct, but to me it seems that the rounding version might be. So I'm proposing that also the C++ version should do that.
The Delphi version was doing truncation, too, so changed it to do rounding as well. Didn't have a chance to test it in any way, though.
I do understand that both versions are just approximations, so I don't really care which way it is, but for me it would be really good if the C++ and the C# versions worked identically in this regard. So if The Right Thing To Do here is to change the C# version instead, and make it truncate, I'm perfectly fine with that.

I'm very happy with this in principle but I'm concerned it may impact performance (which I'll check before any merging).

Yes, as I feared, this would make roughly a 50% hit to performance.

In C++ or Delphi? If in C++, just because of adding the std::round call?
If in C++, what are you using as benchmark? I could try to reproduce and see if there's anything we can do.
Alternatively, I could create a new PR where the C# version truncates, too?

Yes, as I feared, this would make roughly a 50% hit to performance.

In C++ or Delphi? If in C++, just because of adding the std::round call?

C++.

If in C++, what are you using as benchmark?

See here.

Can reproduce: the rounding version runs some 50% slower on my machine, too.
But it's not like the additional time is spent doing rounding, is it? To me it looks like the results themselves change (which is indeed a goal of this PR), and processing the updated results just takes that much longer?
It seems to me like most of the time is spent in EdgesAdjacentInAEL – regardless of whether we round or not.
I'm not saying that's an acceptable reason for the benchmark program to become slower, or that you didn't know all this already. Just trying to make sure we're at least on the same page here?

Or is the above just my profiler not being reliable here... Hold on, will continue digging deeper into it.


Research Dataview support

Based on the idea in #3: I need to research whether or not it's doable and feasible to add Dataview support. It'd be nice if there was a route that accepts DQL queries and returns Dataview results.

(flyby) there are docs on integrating with dataview as a plugin developer here

Initial DV support for TABLE and LIST queries is in, will be included in the upcoming v0.14.
I'll add a follow-up ticket for TASK queries.


Add a note on minimal node size for a Weave Flux test.

As this are experiments, I was using 2 "default" nodes from terraform (n1-standard-1) and this is not large enough. Combined, the kube-system resources and flux and memcahcedand helloworld together consumed 700m to 800m and this was enough to just block the Rolling Upgrade strategy with a forever pending pods.  Switching to a cluster with 3 times a n1-standard-2 made the upgrade pass perfectly.

Thanks for the quick merge :-)


Cannot format buffer contents when unsaved to disk

Steps to reproduce:

Create a new file
Enter some ReScript code (don't save the file)
Hit format

The file is not formatted. (Might be due to the buffer being in memory and not yet written to disk?)

That was a while ago. Reopen if still valid.


Parameters<> helper only shows the last declared overload

Bug Report
🔎 Search Terms
Parameters, Overload
🕗 Version & Regression Information
5.0.4
⏯ Playground Link
Playground link with relevant code
💻 Code
interface X {
    a(x: string): void;
    a(x: number): void;
}

type T = Parameters<X["a"]>[0];

let n: T = 1; // works
let s: T = "a"; // ERROR: Type 'string' is not assignable to type 'number'

🙁 Actual behavior
When using the Parameters<T> helper type on a function with overloads, the resulting type considers only the very last overload.
I noticed this while trying to extract tpe type of the second argument of String.replace which can be both a string and a replacer function; only the replacer function is seen.
🙂 Expected behavior
I would expect the previous code to consider valid all types which can be used for the function's parameters.
In the given example T should be resolved as string | number.
Possibly related to https://github.com/microsoft/TypeScript/issues/53541

This is a design limitation. Parameters<> is a conditional type using type inference, and these have trouble with overloads. See Inferring Within Conditional Types:

When inferring from a type with multiple call signatures (such as the type of an overloaded function), inferences are made from the last signature (which, presumably, is the most permissive catch-all case). It is not possible to perform overload resolution based on a list of argument types.

Understood, thank you for your quick response.


added styling for header and search bar

added styling for header and search bar. shouldn't affect code, please review to see if changes made doesn't alter anything on the javascript side.

fixed issues with body styling, ill work on the styling for image search after this has been merged.


Login logout backend

Changed receiving data schema from api

Good job! However, please remove dead code and unused import next time before creating a pull request.


docs: spec tweaks

#27  👈
master

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

Join @rphmeier and the rest of your teammates on  Graphite


[Travis] add support for GCC 8, Clang 6, Clang 7

Addresses #430.

I think I messed up the PR, anyway 34e23c7 is the commit. The naming scheme changed in the package for llvm 7 so I wanted to save you the trouble.

Thanks for the PR! You seem to have created the PR from master instead of develop.

Merged as 45d35daabca7e6bb4f391f099898fbbd44098fc7, thanks!


Client::currentsong() indefinitely blocking

I just tried to use this library to query an mpd server for the current song played. However the currentsong() call blocks forever, even though the server replies correctly. I have not managed to find out why, so i am opening this issue.
Example Code:
match c.currentsong().unwrap() {
  Some(s) => {
    println!("{}", s.name.unwrap());
  },
   None => {}
}

Thank you very much for the info!
I'll try to look into it asap.

Could you also please give me some more background?
I'm interested in MPD version number and messages log.

OK MPD 0.19.0
currentsong
file: Massive_Attack/2003 - 100th Window/06. A Prayer For England.mp3
Last-Modified: 2007-07-30T18:16:07Z
Artist: Massive Attack
Title: A Prayer For England
Album: 100th Window
Track: 06
Date: 2003
Genre: Trip-Hop
Time: 349
Pos: 106
Id: 370
OK

Should be easy to see which messages were send by which end.

I could not reproduce the bug on my local machine. Does your code even connects to MPD? Do you run MPD and your code on the same machine?

Also, if you could run your example code with strace, it would help a lot.

Yes it does connect
Interestingly when running against a local test server, it does work.

execve("target/debug/mpdi3block", ["target/debug/mpdi3block"], [/* 72 vars */]) = 0
brk(0)                                  = 0x55ec60fde000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=137967, ...}) = 0
mmap(NULL, 137967, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1140bd1000
close(3)                                = 0
open("/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14576, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1140bd0000
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f11407ce000
mprotect(0x7f11407d1000, 2093056, PROT_NONE) = 0
mmap(0x7f11409d0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f11409d0000
close(3)                                = 0
open("/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3<EMAIL_ADDRESS>832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=146608, ...}) = 0
mmap(NULL, 2213008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f11405b1000
mprotect(0x7f11405c9000, 2093056, PROT_NONE) = 0
mmap(0x7f11407c8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f11407c8000
mmap(0x7f11407ca000, 13456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f11407ca000
close(3)                                = 0
open("/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=532440, ...}) = 0
mmap(NULL, 2185504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f114039b000
mprotect(0x7f11403b1000, 2093056, PROT_NONE) = 0
mmap(0x7f11405b0000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f11405b0000
close(3)                                = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\7\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1991416, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1140bcf000
mmap(NULL, 3815984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f113fff7000
mprotect(0x7f1140192000, 2093056, PROT_NONE) = 0
mmap(0x7f1140391000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19a000) = 0x7f1140391000
mmap(0x7f1140397000, 14896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1140397000
close(3)                                = 0
open("/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20U\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1038688, ...}) = 0
mmap(NULL, 3133720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f113fcf9000
mprotect(0x7f113fdf6000, 2093056, PROT_NONE) = 0
mmap(0x7f113fff5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfc000) = 0x7f113fff5000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1140bce000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1140bcc000
arch_prctl(ARCH_SET_FS, 0x7f1140bcc800) = 0
mprotect(0x7f1140391000, 16384, PROT_READ) = 0
mprotect(0x7f113fff5000, 4096, PROT_READ) = 0
mprotect(0x7f11407c8000, 4096, PROT_READ) = 0
mprotect(0x7f11409d0000, 4096, PROT_READ) = 0
mprotect(0x7f1140bf3000, 4096, PROT_READ) = 0
munmap(0x7f1140bd1000, 137967)          = 0
set_tid_address(0x7f1140bccad0)         = 15062
set_robust_list(0x7f1140bccae0, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7f11405b6be0, [], SA_RESTORER|SA_SIGINFO, 0x7f11405c1d60}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f11405b6c70, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f11405c1d60}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlink("/etc/je_malloc.conf", 0x7fffd38463d0, 4096) = -1 ENOENT (No such file or directory)
brk(0)                                  = 0x55ec60fde000
mmap(NULL, 4194304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f113f8f9000
munmap(0x7f113f8f9000, 4194304)         = 0
mmap(NULL, 8384512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f113f4fa000
munmap(0x7f113f4fa000, 3170304)         = 0
munmap(0x7f113fc00000, 1019904)         = 0
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
read(3, "0-1\n", 8192)                  = 4
close(3)                                = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f114002a680}, {SIG_DFL, [], 0}, 8) = 0
brk(0x55ec60fff000)                     = 0x55ec60fff000
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1140bf2000
read(3, "55ec5edad000-55ec5ee3e000 r-xp 0"..., 1024) = 1024
read(3, "-7f1140395000 r--p 0019a000 00:1"..., 1024) = 1024
read(3, "                 /usr/lib/libdl-"..., 1024) = 1024
close(3)                                = 0
munmap(0x7f1140bf2000, 4096)            = 0
sched_getaffinity(15062, 32, {3, 0})    = 16
mmap(0x7fffd3049000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fffd3049000
rt_sigaction(SIGSEGV, {0x55ec5edef9b0, [], SA_RESTORER|SA_STACK|SA_SIGINFO, 0x7f11405c1d60}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x55ec5edef9b0, [], SA_RESTORER|SA_STACK|SA_SIGINFO, 0x7f11405c1d60}, NULL, 8) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1140bf1000
sigaltstack({ss_sp=0x7f1140bf1000, ss_flags=0, ss_size=8192}, NULL) = 0
mmap(NULL, 4194304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f113f400000
open("/home/stephan/.mpdhosts", O_RDONLY|O_CLOEXEC) = 3
ioctl(3, FIOCLEX)                       = 0
read(3, "<IP_ADDRESS>:6601:Labor Lounge\n", 32) = 27
read(3, "", 5)                          = 0
write(1, "Connecting to Labor Lounge\n", 27Connecting to Labor Lounge
) = 27
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
ioctl(4, FIOCLEX)                       = 0
connect(4, {sa_family=AF_INET, sin_port=htons(6601), sin_addr=inet_addr("<IP_ADDRESS>")}, 16) = 0
read(4, "OK MPD 0.19.0\n", 65536)       = 14
write(1, "Done with Labor Lounge\n", 23Done with Labor Lounge
) = 23
write(1, "Trying host Labor Lounge\n", 25Trying host Labor Lounge
) = 25
sendto(4, "currentsong\n", 12, 0, NULL, 0) = 12
read(4, "file: R\303\266yksopp/The Understandin"..., 65536) = 257
read(4,

Uh oh, looks like an error in parser. Could you please give me the full song file name it stops at? The one starting with "R\303\266yksopp/The Understanding".

I cannot give you that, however the log i gave you last time causes exactly the same issue. I am currently not able to connect to that very mpd, but i think it is an interaction issuue between that very version and your code. If you (or i, possibly tomorrow) can get that very version, it should be possible to reproduce.

Do you play the same playlist with the same songs on local environment, where the code works?

I do not have access to the server i am having trouble with, but i can try getting access. This probably won't be before friday though

Ok then, I'll wait till then. As of now, I couldn't reproduce the bug (MPD 0.19.0, both remote and local server works, adding "o with umlaut" (ö) to the file name doesn't affect tests).

Just thought about a thing to check: what is the value of MTU between you and your server? As I can see, first request-respond series are quite short, and it hangs on the last read, which is longer than other responses. Sometimes small MTU can lead to such effects.

Just to be clear: I don' expect you to answer immediately, just listing a things I thought about. Feel free to check and answer when/if you can.

i did use netcat to connect to the server and issued the currentsong command manually, it did work. That is how i got the log. I then hosted a server using netcat, connected with your library to it and sent exactly what the server sent. Even with that i could reproduce the issue.

Hey, it just came to me. You can create TcpStream manually, set_read_timeout() on it and build client with Client::new(). It should at least make transmission fail on timeout.

that sounds like a pretty good idea, will definitely try that.

So, here are the details:
Network log: https://kilobyte22.de/files/rust-mpd-netlog.bin
strace of that very same execution: https://gist.github.com/Kilobyte22/4ca71fc938e5c164ac8f
Note this is is with timeout (5 seconds) enabled. The issue seems to not occur while no music is playing - at least not consistantly.

I am not sure, you may have missed my last reply.

Hey, I'm sorry for long silence. I've got your message, I was just too busy IRL. I don't think it's about line-endings, I thought about it, and there's no difference between working and not working examples in line endings. Special characters doesn't matter as well. As a matter of fact, I couldn't reproduce the bug, and as of now I'm low on theories.

Just out of curiousity, what version of rust are you using. I was using rustc 1.7.0-nightly (7ce713961 2015-12-11) until now, will upgrade to latest nightly now and report back.

rustc 1.7.0-nightly (81ae8be71 2015-12-09)

I could reproduce it with latest rust. The very same server runs multiple mpd instances. I could reproduce it on only one of them, but that was without music running. Could not actually test with music playing, will do when next possible. Will also talk to the admin about this, maybe we can figure it out or give you valuable detail.

Yes, that would be very useful, thank you! Meanwhile I'll also try to reproduce it with several mpd instances running on my server.

I have the same issue. If I wait a while it eventually works. Talking upwards of 1 minute for a response.
mpd version: 0.19.0
rustc 1.5.0
Would you like me to test anything now you have another user confirmed to have the issue?

@GTB3NW yes, could you please describe your setup? Like do you run mpd locally or remotely, single or multiple instances of mpd, internal network or via internet, VPN? I'd like to find anything common with @Kilobyte22's environment.

Local MPD, single instance. nc'd to the server and ran "currentsong" it works fine.
Here's the output of the command if you need reference:
OK MPD 0.19.0
currentsong
file: Justice/Audio, Video, Disco/06 On'n'On.flac
Last-Modified: 2014-10-22T18:20:48Z
Genre: Indie Rock
Composer: Gaspard Augé, Xavier de Rosnay
Title: On'n'On
MUSICBRAINZ_ALBUMARTISTID: 860b2707-6153-4e3a-aa57-74d2b42c55b5
Date: 2011
Disc: 1
AlbumArtistSort: Justice
MUSICBRAINZ_ALBUMID: 5bda6888-71a8-4fa7-9625-a88122e2435c
AlbumArtist: Justice
Album: Audio, Video, Disco
MUSICBRAINZ_ARTISTID: 860b2707-6153-4e3a-aa57-74d2b42c55b5
Artist: Justice
MUSICBRAINZ_TRACKID: 0e5d05c8-f89d-4420-99a7-f4e9a0c68fff
ArtistSort: Justice
Track: 6
Time: 271
Pos: 8
Id: 25
OK

Thank you very much! Can you tell me please on which line does Client::currentsong() method hangs? You can run your example code under strace to find it out.

Where it detaches is where it's hanging:
mmap(0x7ffdefe3a000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffdefe3a000
rt_sigaction(SIGSEGV, {0x561e9ab52a00, [], SA_RESTORER|SA_STACK|SA_SIGINFO, 0x7fab7e056d60}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x561e9ab52a00, [], SA_RESTORER|SA_STACK|SA_SIGINFO, 0x7fab7e056d60}, NULL, 8) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fab7e686000
sigaltstack({ss_sp=0x7fab7e686000, ss_flags=0, ss_size=8192}, NULL) = 0
mmap(NULL, 4194304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fab7cc00000
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
ioctl(3, FIOCLEX)                       = 0
connect(3, {sa_family=AF_INET, sin_port=htons(6600), sin_addr=inet_addr("<IP_ADDRESS>")}, 16) = 0
read(3, "OK MPD 0.19.0\n", 65536)       = 14
sendto(3, "currentsong\n", 12, 0, NULL, 0) = 12
read(3, "file: Justice/Audio, Video, Disc"..., 65536) = 564
read(3, ^CProcess 20172 detached
 <detached ...>

Thank you very much! You helped a lot! I think I have an idea to check. I'll post back when I check it.

Just as an FYI. After the 1 minute timeout the returned data just has null values, so:
println!("{}", song.file);

prints:
{}

Is the format of the currentsong request any different to the current queue/playlist? This is the first song returned when I run "playlistinfo" in nc:
file: Justice/✝/1-02 Let There Be Light.flac
Last-Modified: 2014-10-22T18:19:51Z
Genre: Electronic
AlbumArtist: Justice
Title: Let There Be Light
MUSICBRAINZ_ALBUMARTISTID: 860b2707-6153-4e3a-aa57-74d2b42c55b5
Date: 2007-06
Disc: 1
AlbumArtistSort: Justice
MUSICBRAINZ_ALBUMID: f1d8e333-c047-49eb-a6a7-e5b842895fe9
AlbumArtist: Justice
Album: ✝
MUSICBRAINZ_ARTISTID: 860b2707-6153-4e3a-aa57-74d2b42c55b5
Artist: Justice
MUSICBRAINZ_TRACKID: 5e10ccfe-eb20-4c51-95cb-b5edc143556e
ArtistSort: Justice
Track: 2
Time: 301
Pos: 0
Id: 11

@GTB3NW Hmm, both you and @Kilobyte22 get whole MPD song info read in the single first read() request (according to number of read bytes returned from read()), but after that Rust thinks there must be something after it, and it issues another read(), which hangs because MPD already sent everything it wants.
I tried to reproduce it on my laptop, and I see single read() request which reads whole MPD currentsong answer, and then no other reads after it, and it works OK.

Maybe the bug is actually in the rust standard library, possibly caused by mpd not sending utf-8 (not sure which encoding it uses)

As far as I can tell, MPD doesn't bother about encodings, it just passes around raw strings, as read from tags/file names. I have several songs with windows-1251 encoded tags, and it sends them as raw bytes, so I see strange symbols in ympd, which uses utf-8 only:

It still works with rust-mpd on my laptop, even when this song is being played, I just get some funky data in tags:
    tags: {
        "Album": "Social Song",
        "Artist": "\u{dd}\u{ea}\u{f1}\u{eb}\u{fe}\u{e7}\u{e8}\u{e2}\u{ed}\u{ee}! \u{d2}\u{ee}\u{eb}\u{fc}\u{ea}\u{ee} \u{e4}\u{eb}\u{ff} \u{ec}\u{ee}\u{e8}\u{f5} \u{e4}\u{f0}\u{f3}\u{e7}\u{e5}\u{e9} \u{e2}\u{ea}\u{ee}\u{ed}\u{f2}\u{e0}\u{ea}\u{f2}\u{e5} \u{f1}\u{e5}\u{e3}\u{ee}\u{e4}\u{ed}\u{ff} \u{e2}\u{fb}\u{f8}\u{e5}\u{e4}\u{f8}\u{e8}\u{e9} \u{ed}\u{ee}\u{e2}\u{fb}\u{e9} \u{f2}\u{f0}\u{e5}\u{ea} \u{dd}\u{ed}\u{e8}\u{e3}\u{ec}\u{fb}, \u{f1}\u{e0}\u{ec}\u{fb}\u{e9} \u{f1}\u{e2}\u{e5}\u{e6}\u{e8}\u{e9}",
        "Composer": "Alise Ketnere (Fox Lima) / Marcelo Amaral Pontello (Mark Joshua) J\u{e9}r\u{f4}me Pringault (J. Spring) / Rasa Veretenceviene (Rasa Serra)",
        "Date": "2010",
        "Genre": "New Age",
        "Title": "2010 (\u{ee}\u{f0}\u{e8}\u{e3}\u{e8}\u{ed}\u{e0}\u{eb}\u{fc}\u{ed}\u{ee}\u{e5} \u{ed}\u{e0}\u{e7}\u{e2}\u{e0}\u{ed}\u{e8}\u{e5}, \u{ff} \u{e4}\u{ee}\u{e1}\u{e0}\u{e2}\u{e8}\u{eb} \u{ee}\u{e1}\u{eb}\u{ee}\u{e6}\u{ea}\u{f3} \u{e2} \u{e0}\u{f3}\u{e4}\u{e8}\u{ee}, download & relax)",
        "Track": "1/1"
    }

Not sure about really invalid UTF-8 sequences, maybe my case contains de facte valid UTF-8 codepoints, which just don't make sense for us humans.

They don't have to be invalid. They can have a different meaning. UTF-8 characters can be longer than one byte. This way it can actually trick the program into thinking that for example that the line break is part of another character. I'm not sure if this is the case, would have to take a closer look at this.

I posted a question to Rust users forum: https://users.rust-lang.org/t/issues-with-std-io-lines-read-blocks-forever/4181
Hope they will provide some fresh ideas on the matter.

@Kilobyte22 it might be the case, but your own printout of a song info you have problems with looks like pretty much valid ASCII for me:
OK MPD 0.19.0
currentsong
file: Massive_Attack/2003 - 100th Window/06. A Prayer For England.mp3
Last-Modified: 2007-07-30T18:16:07Z
Artist: Massive Attack
Title: A Prayer For England
Album: 100th Window
Track: 06
Date: 2003
Genre: Trip-Hop
Time: 349
Pos: 106
Id: 370
OK

This disproves this theory, unless I miss something here?

That's what I thought of myself as well, but maybe I am missing something myself so I wanted to bring that up.

Even if there's an issue with that, would it affect the parsing of it? Like I pointed out MPD sends the data but rust-mpd doesn't parse it correctly. It's only incorrectly parsing it in the currentsong method, fetching queue etc it works fine. Would be a good start to look at any difference between the data MPD sends from the current playlist (queue) and the currentsong.

According to strace, it's pretty normal, that you get empty result, as it hangs immediately on the first try to read first reply line. That is, even the first read_line() never returns, and parser even don't get anything to parse.

The funky thing happens on read line operation, for sure.

BTW, just to be sure, on what OS does your MPD server and client runs?

Client: Arch Linux x86_64
Server: Linux, Unknown distribution. I suspect Debian though

One last question for now. Could one of you reproduce the bug with test program running under strace -e read,sendto -s 2000 so the whole read string is visible in a dump? Just to make sure what it reads up to the end of reply.

My client and server is on arch too.
I'd laugh if this was an arch specific bug.
I'll test when I'm back from work.

Oh ho, seems like I found the problem. It is a bug in v0.0.7, which is fixed in master now.
I've published updated version, so you it should be fixed once you update to 0.0.8.

After you update to 0.0.8, please confirm it resolved the bug. I will close the issue then.

Just curious, what was the issue?

The issue was in incorrect data reading sequence in currentsong() method, I rewritten ages ago and completely forgot about it. It just came to me to check library version, and just noticed the last version I published was 0.0.7, then I compared tag v0.0.7 with master and the bug was pretty obvious. Sorry it took so long to find it all out.

The bug was actually fixed by 31fef68b16993a3c5be501f1d2a11b5d4227c468 on Jun 26th, 2015.

Lmao, woops! Will test in an hour and let you know. Thanks! 😀

I should be able to test tomorrow as well

Sorry forgot to update you. Works great, thanks! :)

Yep, works fine for me as well, thanks for taking your time :)