Try to connect to Lego Boost

Dear Kawasaki,
I found your bluepy-scratch-link project and got it up and running folowing your README. My goal is to control the Lego Boost robot from scratch 3.
I found one very small issue at line 198 (del(self))
close(self) did not work for me, I chaged it to self.close() and it works.
Then, connecting from Chrom+scratch works fine.
Next step was that in function matches(self,dev,filters) the conversion from string s to type UUID dit not work when trying to cast to int() first. so I changed "given_uuid = UUID(int(s))" to just be "given_uuid = UUID(s)". works.
(btw: I can create a pull request later, if required).
Can you try to confirm these bugs and check if you micro:bit works with my fixes as well?
Now the next big thing:
Scratch requests a service with UUID 00001623-1212-efde-1623-785feabcd123 nad if I sniff to the boost device using gatttool, I can see that it advertises exactly this ID. But so far I have no clue how to make use of this.
Last action I can observe is, that the line "service_class_uuid = dev.getValueText(0x3)" results in NONE and the next sanity check bailes out. So either dev is not filled properly, or the access by getValueText() is not robust to find the right string.
Can you help me adapting your script to Lego boost? I can supply you with scans and details, work on the code and test it.
best,
friso

It looks that more users want to link Lego Boost with Scratch via Linux. To make bluepy-scratch-link to support it, I cherry picked works by @mdevel1 in LEGO_Boost_fixes branch of mdevel1/blupy-scratch-link repo. I took the liberty to do minor changes in those commits to make code simpler, keep letters per line within 80 and improve commit messages more readable. Anyway, all of those changes are good and make the bluepy-scratch-link more stable for other devices than LEGO Boost. Thank you so much @mdevel1 .
I hope that LEGO Boost users to try out bluepy-scratch-link and provide feedbacks. Does it control motors well? How about sensors?

Dear @kawasaki,
Just tried your 'dev' branch with Lego Boost and a CSR bluetooth adapter:

bluepy-scratch-link keeps the MoveHub connected (blue light is ON)
on scratux: I wrote a small program to control the led color and motor A (or AB) but it does not work). Attached is the log file produced by bluepy-scratch-link.
However MoveHub stays connected.
Best Regards,
Laurent

debug_20200519.log

@laurentchar Thank you for the trial and the report! Now I have started to look into those logs.

Hi @laurentchar, thank you again for the logs. It is a fun to analyze them. Still I have not yet fully understood why Lego Boost does not work via bluepy-scratch-link. Just I share what I found.
The discovery and connection steps look ok. After that Lego Boost reported available devices to Scratch and bluepy-scratch-link. In the blupy-scratch-link debug log, I found following logs that Lego Boost sent out. It looks all of the available devices are listed including LED. Port numbers look valid, starting from 0, and up to 0x46.
BLE notification: 14 b"\x0f\x00\x04\x00\x01'\x00\x00\x00\x00\x10\x00\x00\x00\x10"  // HUB_ATTACHED_IO ATTACHED port=0 MOTORINT
BLE notification: 14 b"\x0f\x00\x04\x01\x01'\x00\x00\x00\x00\x10\x00\x00\x00\x10"  // HUB_ATTACHED_IO ATTACHED port=1 MOTORINT
BLE notification: 14 b'\x0f\x00\x04\x02\x01%\x00\x00\x00\x00\x10\x00\x00\x00\x10'  // HUB_ATTACHED_IO ATTACHED port=2 COLOR
BLE notification: 14 b'\x0f\x00\x04\x03\x01&\x00\x00\x00\x00\x10\x00\x00\x00\x10'  // HUB_ATTACHED_IO ATTACHED port=3 MOTOREXT
BLE notification: 14 b"\t\x00\x04\x10\x02'\x00\x00\x01"                            // HUB_ATTACHED_IO ATTACHED_VIRTUAL port=0x10
BLE notification: 14 b'\x0f\x00\x042\x01\x17\x00\x00\x00\x00\x01\x06\x00\x00 '     // HUB_ATTACHED_IO ATTACHED port=0x32 LED
BLE notification: 14 b'\x0f\x00\x04:\x01(\x00\x00\x00\x00\x10\x00\x00\x01\x02'     // HUB_ATTACHED_IO ATTACHED port=0x3A TILT
BLE notification: 14 b'\x0f\x00\x04;\x01\x15\x00\x02\x00\x00\x00\x00\x00\x01\x00'  // HUB_ATTACHED_IO ATTACHED port=0x3B CURRENT
BLE notification: 14 b'\x0f\x00\x04<\x01\x14\x00\x02\x00\x00\x00\x00\x00\x01\x00'  // HUB_ATTACHED_IO ATTACHED port=0x3C VOLTAGE
BLE notification: 14 b'\x0f\x00\x04F\x01B\x00\x01\x00\x00\x00\x00\x00\x00\x10'     // HUB_ATTACHED_IO ATTACHED port=0x46 ?(0x42)

Bluepy-scratch-link sent out these information to Scratch as notifications, then Scratch should be aware of LED. After that, Scratch sent out data to set LED color.
{'serviceId': '00001623-1212-efde-1623-785feabcd123', 'characteristicId': '00001624-1212-efde-1623-785feabcd123', 'message': 'CgCB/xFRAf8eAA==', 'encoding': 'base64'}  // b'\n\x00\x81\xff\x11Q\x01\xff\x1e\x00'  setLED: OUTPUT port=0xff execution=0x11 subCommand=WRITE_DIRECT_MODE_DATA ...
However, the sent out data specifies port number 0xFF. This looks weird. It was already reported that LED has port 0x32. Then, this implies that the bluepy-scratch-link failed to notify the device list to Scratch.
I will need some more investigation to understand the cause. For further investigation, I can think of two actions.
First action is to add debug prints on Scratch side: (scratch-vm:src/extensions/scratch3_boost/index.js handles the Lego Boost extension). And modify bluepy-scratch-link to emulate Lego Boost based on the log provided. This will help me to do some trial with my local environment. I will need some more days (or weeks?) to try this out.
Second action is to try out other notification methods by bluepy-scratch-link. In the @mdevel1 's LEGO_Boost_fixes  branch, some notification send out methods are tried. I prepared "boost" branch in my bluepy-scratch-link repo which try out another notification method. @laurentchar , if you have time to afford, could you try my boost branch?
Another interesting part of the log was that Lego Boost reported firmware version. As far as I analyze the log, the firmware version of the Lego Boost Move Hub was <IP_ADDRESS>6.
{'jsonrpc': '2.0', 'result': {'message': 'CQABAwYXAAAg', 'encode': 'base64'}}  // b'\t\x00\x01\x03\x06\x17\x00\x00 ':   // HUB_PROPERTIES FW_VERSION <IP_ADDRESS>6
On the internet, I found Lego Boost firmware version <IP_ADDRESS>4 was discussed in Jun 2019. then version <IP_ADDRESS>6 look rather old. But so far this old firmware is not the trouble cause, probably.

Firmware version is reported as: b'\t\x00\x01\x03\x06\x17\x00\x00\0x20 ':
This is version <IP_ADDRESS>7 (the latest one).
(https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#ver-no)

@laurentchar You are right, I overlooked the last 0x20 since it was printed as white space in the log file. The firmware is pretty new and looks good.

This weekend, I spent some time and implemented dirty Lego Boost simulator on the bluepy-scratch-link. It returns the messages what real Lego Boost returns to Scratch. The debug log by @laurentchar was a great help. Now I can play with Scratch Lego Boost extension even though I do not have Lego Boost :)
Using the simulator, I tried to connect Scratch to the Lego Boost and observed what is going on on Scratch side using browser console log. And I found that the recent commit 2c7a10f ("BLESession.notify: Send out notifications at once to avoid interruption") caused a syntax error on the Scratch side.

SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data scratch-link-websocket.js:82

The commit merges multiple notifications in bluepy-scrach-link and send them to Scratch as one shot. This sends out multiple JSONs to Scratch. However, Scratch side expects single JSON. Then this resulted in the error.
I referred the websocket send() API document. Each message string should be sent out in each "frame", and the message string should be implemented as iterator or asynchronous iterator. I tried to pass multiple notifications to send() using iter(), it resulted in another new error. Maybe I need to pack those multiple notificactions as asynchronous iterator. It looks that it will add some complications.
At this moment, I think it is easier to revert the commit 2c7a10f. I reverted it, and confirmed that the Syntax Error on the Scratch side disappears. I tried to trigger "set color light to" block in the Scratch, and confirmed that bluepy-scratch-link received a write request:

request: {"jsonrpc":"2.0","method":"write","params":{"serviceId":"00001623-1212-efde-1623-785feabcd123","characteristicId":"00001624-1212-efde-1623-785feabcd123","message":"CgCBMhFRAQD//w==","encoding":"base64"},"id":16} // b'\n\x00\x812\x11Q\x01\x00\xff\xff'  setLED: OUTPUT port=0x32 execution=0x11 subCommand=WRITE_DIRECT_MODE_DATA ...

This time, port ID is not 0xff. It has correct port ID 0x32. Looks good.
@laurentchar , could you try out "boost" branch? The branch does not have the commit which caused the Syntax Error. I expect it will work better. At least it can control LED, I expect.

Dear @kawasaki
I tried the "boost" branch.
I started scratch-link.py, scratux and wireshark (on locahost).
Scratux was connected to scratch-link.py and scratch-link.py was connected to Lego Boost (LED became blue).
Then I wrote a simple scratux program (set LED color) and ran it.
Nothing changed on Lego Boost (LED stayed blue). I also noticed that scratux-link.py log file was not reporting any activity when the scratux program started and ran.
Attached is the full logs of the session (wireshark dumps: use SSL keys provided, scratch-link.log).
Thank you.
Laurent
debug_20200602.gz

The wireshark traces match the scratch-link.py log file until the wireshark line #74 (request: { ... "id":4} with message 'CgBBAQIBAAAAAQ==' i.e. 0a 00 41 01 02 01 00 00  00 01)
Starting from wireshark line #76 ("CgBBAAIBAAAAAQ==", i.e. 0a 00 41 00 02 01 00 00  00 01) scratch-link.py log file does not report any messages/transactions.
When scratch program starts (setLED color): this is wireshark line #116 ("CgCBMhFRAQD//w==", i.e. 0a 00 81 32 11 51 01 00 ff ff setLight to 0x00FFFF=cyan) and it does not change the MoveHub LED color.

@laurentchar Thank you very much for trying the boost branch. Now I have started investigating the log.
The event recorded in the logs related to the write message CgBBAQIBAAAAAQ==' i.e. 0a 00 41 01 02 01 00 00 00 01.  This indicates the request from scratch to Lego Boost to start sending notifications from the motor at port 1. Scratch-link log records that this message was received from Scratch, but it does not record the log after it sent to Lego Boost. Now I guess that deadlock happens within two threads of Scratch link. Will take a close look further.

According to the debug log by bluepy-scratch-link, it looks that the eternal wait is happening within "self.session.perip.waitForNotifications(1.0)" at line 357 of scratch_link.py, probably. The argument 1.0 specifies to return within 1.0 second. Then I do not expect it blocks eternally, but it looks happening.
@laurentchar I have pushed another commit to the 'boost' branch to add some debug prints. Could you try it again and share the debug print by scratch_link.py?  It will clarify if the line 357 causes eternal loop or not. If bluepy causes the eternal loop, I will need to think about debug within bluepy, or try other python BLE modules. If bluepy does not cause the eternal loop, still I am missing dead lock cause within bluepy-scratch-link.

Dear  @kawasaki
Here is the log file using your commit d0dd06cdc074f49adafa1d9faef239af432a2da2 on branch 'boost'.
The scratch program contains only a 'setLight 50%' (cyan).
(1) Running the scratch program worked the first time: LED turned cyan.
(2) Then I changed the color parameter to 1% or 80% and re-ran the scratch program but it failed (LED stayed cyan).
debug_20200606.tar.gz

I restarted scratch_link.py several times but coudn't change the LED color anymore.
When MoveHub connects to scratch_link.py (LED turns blue) the last debug line is:
notification: {"jsonrpc": "2.0", "method": "characteristicDidChange", "params": {"serviceId": "00001623-1212-efde-1623-785feabcd123", "characteristicId": "00001624-1212-efde-1623-785feabcd123", "encoding": "base64", "message": "DwAEAgElAAAAABAAAAAQ"}}
handle write request
getting lock for c.write()

When I start the scratch program nothing happen anymore (LED does not change, no more log from scratch_link.py).

@laurentchar Thank you for the log. It always helps.
I confirmed that the dead lock happens in bluepy-scratch-link, and I think I understand the reason. It one thought that the dead lock happened in bluepy, but actually it happened in the callback function that bluepy-scratch-link implemented.
There are two threads in bluepy-scratch-link: one for websocket, and the other for BLE handling. As an exception, I made the BLE thread to send webocket only for notification sending, but this part looks causing the deadlock. I will try to clean this implementation using queue.

@laurentchar I have made another commit to the 'boost' branch tip. The BLE thread no longer touches websocket. The notifications are passed from BLE thread to websocket loop thread through queue. I wish this fixes the daedlock issue. Not 100% sure, but please give it a try.

@kawasaki Thank you for your commit.
I tried the 780dcba1583ab6e86b037e1ca0cfe4b707a16f21 commit ('boost' branch).
Attached is the log from bluepy-scratch-link and wireshark traces on localhost.
debug_20200607.tar.gz
The scratch program (change LED color) does not work (MoveHub LED does not change color).

Hi @laurentchar , thank you for the log. I feel sorry that it didn't go well. I misunderstood the root cause. Still the dead lock happens, and I think the latest log indicates that dead lock might happen in bluepy. Then next action will be to add debug logs in bluepy.
This co-work between you and me is a kind of fun for me, but I wonder if you are ok to continue this style of work. I have not yet still understood the root cause, and it will need more catch-balls between you and me (several more, or dozen more). Next action will need to ask you to edit some files on your machine (bluepy related files). If you think this is too much for you, please let me know.
I still wish to make Lego Boost connected with Scratch on Linux... If you can continue the effort, I would like to ask you following actions:

I made another commit to the boost branch. This commit does not aim to fix the issue but get more information. It prints stack trace of all threads.
On top of this, if you can do, please find out btle.py in your system, edit it and try the bluepy-scratch-link. In my system, it is placed at /usr/lib/python3.x/site-package/bluepy/btle.py. To edit the btle.py: root privilege is required. Following two edits will enrich the debug log and will tell us what is going on in bluepy.
Line 20: Change "Debugging = False" with "Debugging = True"
Line 346: Add "DBG("readline") with same indent as line 347

Best wish and cheers

Hi @kawasaki , yes I want to continue to debug the issue :) I am ready for hundred more tries.
Here is the log with commit 66c7803a3be1432ae3c52383bc4af4ca464c6186 and additions to the btle.py.
This time I had problems to connect to MoveHub from Scratux (it get disconnected several times). When scratux was connected to MoveHub the scratch program did not turn the LED color.
debug_20200608.tar.gz

@laurentchar Thank you for the strong help! It is encouraging :)
I have took a look in the latest log. It indicates that the self._helper.stdout.readline() call did not return and caused the deadlock. Let me have some time to dig in further and think about the next action.

This is a note what I found today: the scratch_link.py stopped at waitForNotifications() in bluepy btle.py. And the last log indicated that the process stopped at self._helper.stdout.readline(). This line tries to read standard output of bluepy-helper process until line terminator '\n'. This readline() stops probably because the bluepy-helper has not yet output the line terminator '\n'. In other words, bluepy-helper has not yet completed to output single message for bluepy. But bluepy started reading the bluepy-helper standard out because the line sefl._poller.poll returned the file descriptor returned non zero value, it means that bluepy-helper started writing something to standard out. In short, bluepy-helper started to write out a message to bluepy, but has not yet completed.
I took a look in bluepy-helper.c. It uses Gnome Glib event handling framework and uses standard in and standard out for communication with bluepy. It defines some helper functions to send out messages to standard out: resp_begin(), send_uint(), send_str(), and resp_end(). The function resp_begin() start writing to the standard out, and the function resp_end() complete writing a message with '\n'. This resp_begin() and resp_end() are paired at all places in bluepy-helper.c. For some of those pairs, logic between begin and end is very simple and not to cause stop. However, some of them have loops with link list. If the link is broken, the loop can be broken, and then it explains why '\n' is not written.
Next action is to understand status of bluepy-helper at the bluepy-scratch hang. For this purpose, I can think of three actions: 1) Linux /proc status check can be a help. 2) Also, debug print in bluepy-helper can be a tool for further understanding. 3) Wireshark dump on BLE protocol can be the other tool for understanding.
Before asking actions, I would like to spend some more time to confirm which action is valid.

@laurentchar Thanks for the log. The backtrace is not much what I expected. It tells that the event loop of the blupy-helper is still working, and does not imply it is hanging. I will think about another approach.

I took a close look at the bluepy log output, and noticed a weird thing.
readline
Got: 'rsp=$ntfy\x1ehnd=hE\x1ed=b0A004700020100000001\n'
readline
readline
Got: 'rsp=$ntfy\x1ehnd=hE\x1ed=b08004500FFFFFFFF\n'
readline
Got: "rsp=$find\x1ehnd=hD\x1eprops=h1E\x1evhnd=hE\x1euuid='00001624-1212-efde-1623-785feabcd123\n"

"readline" log and "Got: *" log should be paired. One "readline" log is not paired with "Got: *", then it indicates that readline() caused the hang. This was known. The weird thing is that, two more "readline" log and "Got: *" log pairs are printed after the single "readline" log. It means that after the hang, two messages were sent from bluepy-helper to bluepy. This indicates that bluepy-helper does not hang even after the bluepy hang. Also it implies two threads may have called readline() almost same timing and might have caused inconsistent file descriptor status.
I checked how two bluepy-scratch-link threads call bluepy APIs and how those calls are connected to readline() calls. And I noticed that bluepy-scratch-link's websocket thread calls bluepy  getCharaceteriscits() and getServiceByUUID() APIs without lock guard and they may result in readline() call and may conflict readline() call by bluepy notification handler thread. I misunderstood that these APIs do not need the lock guard.
To avoid this conflict, I added lock guard to getCharaceteriscits() and getServiceByUUID() calls.
@laurentchar Could you try the latest 'boost' branch of bluepy-schratch-link? Its hash is 5dcbbfa.

Dear @kawasaki
Good news commit 5dcbbfa7a7f40b961b47a792bfe36b54a6e164b9 works!
Thank you very much.
MoveHub is a bit slow to start (a 1 or 2-second latency between the green button press in scratux and the program execution on MoveHub).
As an example I noticed that "turn motor_AB" does turn motor A then motor B. The latency between the start motor_A and motor_B causes MoveHub to not start straight. But this is probably an issue in scratux and the Lego Boost extension. I will dig more.
Laurent

@laurentchar At last! Thank you very much for the good news and your strong support :)
Hmm, about the latency, I'm not so sure but bluepy-scratch-link could be the cause. There are a couple of timeout constants in bluepy-scratch-link, and one of them is set to 1 second. If the BLE device sends out many notifications frequently, this 1 second wait is not a problem (micro:bit has no problem). But if Lego Boost does not send out the notifications often, this 1 second wait can be the cause of the long latency.
I modified the wait time from 1 second to 1 millisecond, and pushed to the 'boost' branch. Could you try the commit 9ba1396. I'm not so sure, but I think it's worth trying.

The 1 ms wait time seems to be a bit better (but it is hard to tell).
To start/stop motor_AB I will probably change the scratux Boost extension to use the dedicated AB port (0x10) instead of the motor_A + motor_B sequence.

@laurentchar Thanks for trying. Wish your work on scratux goes well. I also took a look in Lego boost Scratch extension. It looks that it sends out separated messages to Lego Boost for each motor A and B. If this can be handled as one shot, it may solve the problem.
I have pushed the fixes for Lego Boost to the master branch. I'm happy that we made this progress so far. Thank you again for your support.
Still the two motors control challenge is left. I would like to keep this github issue open.

Thank you @kawasaki and @laurentchar for your work on getting bluepy-scratch-link to work with LEGO Boost!
This works well on Ubuntu Studio 20.04 with an Asus USB-BT-400 (4.0 with LE) USB adapter.
Side note: installed firmware as explained in https://askubuntu.com/a/848403/641633
For young children to use this without depending on adults, it is more convenient to make it work without using sudo with this one-time setup:
$ sudo apt-get install libcap2-bin
$ cd /usr/local/lib/python3.8/dist-packages/bluepy/
$ sudo setcap 'cap_net_raw,cap_net_admin+eip' bluepy-helper
$ /opt/bluepy-scratch-link/scratch_link.py

I think this would be good to add to the README.md ─ without it, scratch_link.py fails to enable the low energy mode:
Failed to execute management command 'le on' (code: 20, error: Permission Denied)

It is also necessary for each user to have their own copy of bluepy-scratch-link and run ./gencert.sh in it, and keep ownership fo the bluepy-scratch-link directory.
There are some rough edges about connecting to the LEGO Boost brick: each time it takes 2 attempts:

Run bluepy-scratch-link
Open a project in scratch.mit.edu and try to add LEGO Boost blocks
Click on Start Searching
Press the button on the LEGO Boost brick
Help dialog shows up because connection fails. Click Try again
Click on Start Searching
Press the button on the LEGO Boost brick
It should work this time, now we can Go to editor

Please let me know if there's something I can do to investigate the connectivity issue.

Thank you @miguev for the valuable comments. I agree that those points are room to improve. Let me have some time to think about next actions.

Hi @miguev The comments on sudo and multiple users support are not specific to Lego Boost. I opened other issues to separate discussion.
The 2 attempts required at connection looks unique to Lego Boost. Could you take debug trace with -d option of scratcy_link.py? I would like to take a look in it.
Also, I wonder if you see "turn motor_AB" results in different motor start timing between motor A and motor B. @laurentchar reported it with scratux in his environment.

Hi @kawasaki here it is the debug output from the second time I could reproduce the issue in my previous comment today:
connected-on-second-try.txt
First time I tried, the connection was successful on the first try, this is the debug output from that time:
connected-on-first-try.txt
Also, the first thing I found today is that having multiple Bluetooth adapters may cause trouble if the "first" one does not support LE. When I tried the above today, I had my old 2.0 adapter plugged in, and this is what happened:
unable-to-connect.txt
This might be a problem with old laptops with integrated Bluetooth that don't support LE.

Forgot to mention: I too see that "turn motor_AB" results in exactly the same behavior @laurentchar reported: motor A starts first, and maybe half a second later motor B starts.

@miguev Thanks for the debug outputs!  Will look at it closer this weekend.
I have not though much about multiple Bluetooth adapters. Will need some thought.
Thanks for letting me know that you see "delayed motor start" symptom. I will think what I can do for it. I would like to clarify if it is caused by scratch-link, or caused by scratch extension.

The debug log "connected-on-second-try.txt" tells that BLE device scan happened twice, for each click "Starting Search". The found device list for the first scan does not include the Lego boost, but that of the second scan includes the Lego boost. Scan itself looks working well. I'm not so sure, but I guess the too short scan time can be the cause of the failure. I would like to extend the scan time from 1 second to 10 seconds, and see if it will make the Lego boost scan more robust.
Regarding the multiple Bluetooth adapters, it looks easy to support using bluepy. I have implemented a code to support up to 3 adapters.
@miguev I have pushed trial code in the "dev" branch of this github repo. Two changes in the branch address "2 attempts required" issue and "multiple Bluetooth adapters" issue. Could you try the branch in your system and check if the issues solved?

Tried "dev" branch and found I can connect to LEGO Boost on the first try consistently. It also works with multiple Bluetooth adapters, at least the first time around. These are logs from 2 different PCs:
scratch_link_1st_try.txt
scratch_link_1st_try.txt
The (possibly new) issue happens when, without interrupting execution of scratch_link.py, the button to Disconnect is used within Scratch. After that, it becomes hard or impossible to reconnect. On a PC with only one Bluetooth adapter, it may succeed after 2 or 3 tries:
scratch_link_2_tries.txt
scratch_link_3_tries.txt
On a PC with only two Bluetooth adapters, it seems to get stuck always trying to use only one of them:
scratch_link_no_go_after_disconnect.txt

@miguev Thank you for the detailed report! It is good that the problems on first connection and multiple adapters looks resolved.
Regarding the reconnect after disconnect, I walked through the logs. The logs at reconnect steps imply that rescan did not find the LEGO Boost. The first connection was ok, but after that it fails. So far, I do not have clear understanding about the cause, but my guess is that sudden disconnect by PC might have surprised the LEGO Boost, then rescan may fail to find out the LEGO Boost. Cleaner disconnection or some wait between disconnect ant rescan might help. I will think about trial code.

@miguev I have pushed some more changes to the "dev" branch to address the reconnect issue. The changes cleans up BLE connection when Scratch disconnect button is pushed. Could you try it in your environment?

I have merged the changes to the master branch. I guess and wish the left work is the only "turn motor_AB results in motor A starts first, and around half a second later motor B starts".

Hi @jacquesdt   Thank you for sharing your experience! Good to know that the bluepy-scratch-link works on your PC.
The 2.5GB memory usage by bluepy-scratch-link is too large and weird. In my environment, memory usage is a few MB order. I observed that when I repeat micro:bit connection and disconnection, the memory usage increases by +70MB. Such memory increase is not ideal and will need investigation, but I'm not sure if this is the cause of the 2.5GB memory usage. If you observe the large memory consumption with the master branch, information sharing will be appreciated.

Thanks, will do.  Just so I get some idea what kind of information to try collect: I imagine the console log will be needed, but probably you'll need other things as well?  What sorts of things should I go looking for?  I'll try run scratch_link through valgrind massiv - it's worth a shot.

@jacquesdt That's the good question:)  And thank you for sharing the idea to utilize "psutil". It looks handy. One idea I have now is to add memory usage infomration to all debug log messages so that the log can tell when memory usage increases. (Same manner, I want to add time stamp to the debug messages to make it easier to understand performance issue or dead lock.)
Now I'm kind of busy. It make take some weeks for me to work on that memory size debug log idea.

@kawasaki I checked out master branch and spent a good hour yesterday mucking about with Scratch and Boost - memory use was fine.  Whatever I saw in boost branch doesn't seem to be there anymore.
We spent some time fiddling with the proximity sensor - I'm not sure how it works, but I'm guessing it's based on some kind of "differential" signal.  We saw odd behaviour: the sensor does work, but it's as if the polling frequency is very low.  If I tell the Boost "rover" to stop when it sees any colour brick, then it ploughs into my brick wall and continues to push it backwards without ever stopping.  If instead I pick the rover up and slowly move the brick wall towards it, then it does stop.  Does anyone know the basic principles on which the sensor works?
On a more general note, my motivation for using Scratch was that the Boost "programming language" seemed extremely limited.  Yesterday I spent some time on the internet and discovered that there is in fact a "Creative Canvas" mode with a really large set of functionality.  Interestingly, this is larger than what LEGO reports on their own website.  It's also larger than what is available via the BOOST puglin for Scratch.  I thought that LEGO itself would be supporting the Scratch effort, but I guess that is not the case.
In terms of moving LEGO Boost away from the App and into Python land, I see there is PyBricks.  I can't quite figure out whether this is an "official" repo supported by LEGO - it seems not to be.  I also see that LEGO seems to have released the specification of v3.x of their Wireless protocol which surprises me a little (but in a good way).

Hi @jacquesdt

In terms of moving LEGO Boost away from the App and into Python land, I see there is PyBricks.

The pylgbst library is very good. https://github.com/undera/pylgbst] #pylgbst #undera/pylgbst

@jacquesdt @laurentchar Interesting report and discussion :)  I myself do not have Boost and difficult to comment. Yes, it is great that LEGO opens the protocol so that everybody can play with it. Some other programming environments look fun!
One point I wonder about Scratch-link is overhead of communication between scratch and BT/BLE devices. To control the motor on the device based on input by the sensors on the device, the communication path "from the sensor to scratch" and "back from scratch to the motor" is not efficient. If the program can be downloaded on the BT/BLE device, program can control the sensor and the motor without communication overhead, and it should be much faster and be more smooth/accurate control. As far as I play with micro:bit and Scratch-link, this overhead is not visible, but I'm not sure if other Scratch-link supported devices have the communication overhead issue (it may be what @jacquesdt saw with the sensor). If the devices can have program in it, it will be the better way for such realtime-ish programming. (Scratch and Scratch-link are good for kids who used to Scratch to expand their target area, but not good at realtime control, probably)

This issue is quite old and most of the issues discussed in this issue were already addressed. Thank you for all of the contributors. I think it's ok to close this issue now. The latest version has BLE latency issue fix, and it may resolve the staggered motor start issue, hopefully.
Another issue #20 about Lego boost is now open. Comments by Lego boost users will be appreciated. Anyway, let me close this :)


Add RDM day blurb

Replace the TBD for those who read over the weekend.

https://snoopycrimecop.github.io/www.openmicroscopy.org/events/ome-community-meeting-2021/day2/

LGTM


Client error handling?

Per 6901, JSON pointer error handling is up to the implementation. I see that Pointer is used here primarily to implement Patch, but would it be possible to make it so that an error could be handled by the user of Hana?
Specifically, in cases where there's no value at (an intermediate) index there's a lot of room to do useful things like fill in empty objects.
Also, - to refer to "the next item of an array" raises an error, where a client implementation might want to handle that somehow. (And Patch might want to add at /list/-)
If so, I'll volunteer a PR.

Yes, I think this is fine.  Can you send a PR with a suggested implementation?  I'm not sure what you have in mind exactly, so I'd like to see the code! :)


Outlook Email tool - Not able to get the full content of the email body

Electron build - 2fa0a18069
Steps to reproduce the problem:

Start a chat with Tildy.
Add Outlook Mail tool.
Ask To list some mail.

Notice that only Body preview is provided which is truncated version of the email body.

There is also no link that would take us to the actual email made available in the response.
Expected Behavior:
There should be a way to read the full email content.

There is a getMessageDetails tool that will be able to get the full body.

When testing with the latest version of the tool , we see the "Read Email" link that opens up email outlook client for the email.

@g-linville Do we want to continue to also show the Body Preview which we used to show before?

@sangee2004 I'm a little surprised that it didn't display the body preview. I'll tweak its prompt in order to encourage it to do so.

@sangee2004 I adjusted the prompt that we give to the LLM with the mail tools, so it should start printing the body preview again.

@g-linville When testing with the latest version , i am seeing the link to email missing and only body preview is present.

@sangee2004 the LLM should now include the email links without you having to ask it to do so.

Tested with the latest version of outlook email tool.
I see the Body preview and email link now. But email list is not  formatted correctly.

@g-linville Reopening to get the formatting issues addressed.

The formatting should look good now.

Formatting of the emails look good now.


Clarify that a rawdata directory is not a prescription

https://github.com/bids-standard/bids-specification/blob/40f4fbb0649a8dab65f4327df342251ad841bfb8/src/common-principles.md?plain=1#L289-L291
although this sentence might make it seem as if it were. (re: discussion at sprint)

I suppose we could just add

(Note that rawdata here is an arbitrarily-chosen name. BIDS specifies the contents of a dataset, not the names of directories containing datasets.)


need to use symlinks for nested indirection

Git does not like symlinks, however this is the easiest way I can think of to cause nested package.json to be seen as a the package used for resolving "exports". node_modules/esm-logger/ should be a symlink pointing to node_modules/logger/esm/ and likewise for cjs-logger.
Right now they are raw files and so they don't realpath to node_modules/logger/esm/package.json during resolution.

I guess the only way to test this would be to create a shell script (written in Bash) that would create these symlinks for us so that we can test this programmatically.

Quick note: having an options object with preserveSymlinks was an 💡 brought up in IRC just now. Also skepticism about Git not supporting symlinks.

git supports symlinks, but not well due to windows, you can just use node to create the symlinks using fs.symlink however most attempts will fail unless the machine is in dev mode.
I'm not sure what options would mean here though.

Module.resolvePackageRoot(specifier)
Module.resolvePackageRoot(specifier, options)

I'm not sure what options would mean here though.

Optional 2nd argument:

options

base <string[]> | <URL> | default: equivalent of __dirname
preserveSymlinks <boolean> | default: getOptionValue('--preserve-symlinks')

We never branch on preserveSymlinks to my knowledge except in the CLI, I'd be wary of introducing programs that use both since you could easily use the wrong form for the current running application. Perhaps getting overall feedback on if we should allow mixed modes of operation at all in core would be a better first approach than jumping straight to using preserveSymlinks as an option. Keeping the second argument an options bag seems fine though.


Update Hub and huggingface_hub docs

This PR does two things

Updates the add a model guide based on feedback
Does a general cleanup/update/simplification of huggingface_hub README.

Was actually thinking of bumping up the black character limit to 119 like transformers, it greatly improves readability imo

hmm those are .md files

hmm those are .md files

Yes, I was talking about the Python files, not the files here. Bouncing back on your comment that 80 characters isn't necessarily more readable!


WebSocket connection to 'wss://rancher.xyz.com/v3/subscribe?sockId=1' failed: Error during WebSocket handshake: Unexpected response code: 400

Hello,
we had a working Single Node Rancher installation (no reverse proxy in between), but all of the sudden I'm getting Websocket errors after pulling a new 2.0.5 Rancher Image, so I decided to go to the latest Version (2.1) but still the same errors.
I'm using a Wildcard Certificate issued by Entrust, running  openssl s_client -showcerts -CAfile /etc/rancher/entrust_root.cer -connect rancher.xyz.com:443 is successful.
Rancher versions:
rancher/rancher:latest
rancher/rancher-agent:v2.1.0
Infrastructure Stack versions:
healthcheck:
ipsec:
network-services:
scheduler:
kubernetes (if applicable):
Docker version: (docker version,docker info preferred)
[root@c1tranchervap01 rancher]# docker info
Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 17.12.1-ce
Storage Driver: overlay2
 Backing Filesystem: xfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9b55aab90508bd389d7654c4baf173a981477d55
runc version: 9f9c96235cc97674e935002fc3d78361b696a69e
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-862.3.3.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.696GiB
Name: c1tranchervap01.ert.com
ID: 4UNZ:5QNW:YUH6:4PSI:PQW3:AC7X:MZU5:3XG5:YTRJ:IRLO:3HUE:VKEQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 <IP_ADDRESS>/8
Live Restore Enabled: false

Operating system and kernel: (cat /etc/os-release, uname -r preferred)
[root@c1tranchervap01 rancher]# uname -r
3.10.0-862.3.3.el7.x86_64

Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
VM on Xen
Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
Single Node with public signed Certificates
docker run --name rancher -d --restart=unless-stopped -v /var/lib/rancher:/var/lib/rancher -v /etc/rancher/cert_l1_g2.pem:/etc/rancher/ssl/cert.pem -v /etc/rancher/key.pem:/etc/rancher/ssl/key.pem -p 80:80 -p 443:443 rancher/rancher:latest --no-cacerts
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Steps to Reproduce:
Running Rancher on a single node installation with public singed wildcard certificate.
Results:
On the rancher UI I'm getting Websocket errors (Javascript Console Output 0:259281 WebSocket connection to 'wss://rancher.xyz.com/v3/subscribe?sockId=1' failed: Error during WebSocket handshake: Unexpected response code: 400)
docker logs rancher
2018/10/16 06:12:01 [ERROR] Error during subscribe websocket: could not find connection header with token 'upgrade'
2018/10/16 06:12:01 [ERROR] Unknown error: websocket: could not find connection header with token 'upgrade'

Trying to deploy a new Kubernetes Cluster
docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.1.0 --server https://rancher.xyz.com --token 9ssb76l479jfjn4p9ddxc48tcq22xhwdlq4rjk52mhbjxb9ghmwb2b --etcd --controlplane
Docker logs on first deployed node
time="2018-10-16T06:13:46Z" level=info msg="Connecting to proxy" url="wss://rancher.ert.com/v3/connect/register"
time="2018-10-16T06:13:46Z" level=error msg="Failed to connect to proxy" error="websocket: bad handshake"
time="2018-10-16T06:13:46Z" level=error msg="Failed to connect to proxy" error="websocket: bad handshake"

More Information:
curl  https://rancher.xyz.com/v3/settings/cacerts {"baseType":"setting","created":"2018-06-26T14:31:10Z","createdTS":1530023470000,"creatorId":null,"customized":false,"default":"","id":"cacerts","links":{"remove":"https://rancher.xyz.com/v3/settings/cacerts","self":"https://rancher.xyz.com/v3/settings/cacerts","update":"https://rancher.xyz.com/v3/settings/cacerts"},"name":"cacerts","type":"setting","uuid":"92481b1f-794d-11e8-be4f-0242ac110002","value":""}
Regards,
Christian

Just as Information:
This is one of the Request Headers from the Browser
So as far as I can see, the Connection: Upgrade Header and Upgrade: Websocket Header is sent to the server which is checked in gorilla\websocket\server.go line 100
GET wss://rancher.xyz.com/v3/subscribe?sockId=1 HTTP/1.1
Host: rancher.xyz.com
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.102 Safari/537.36 Vivaldi/2.0.1309.40
Upgrade: websocket
Origin: https://rancher.xyz.com
Sec-WebSocket-Version: 13
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,de;q=0.8
Cookie: CSRF=6a6de6199d; R_SESS=token-k4zt4:vv5rtdcpk7m5jkgtllbhswpf6p89jds6kbz9zs7rxrb8rzv29w5nkh
Sec-WebSocket-Key: 76uwyzrjj/G3gtXHqEjjhA==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

Regards,
Christian

Ok, our Network guys deployed a new WAN Version of the Riverbed WAN Accelerator which was in between. I got an exception for the rancher server and now it's working.
Issue can be closed!
Thank you all for your great work!


debug 3.2.0 with low severity ReDos

What happened
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4<4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1.
What did you expect to happen
Please upgrade debug to latest.

I updated some packages in the beta branch, but since this isn’t any functional change it won’t be released until some feature change.

Thanks for the rapid response.
Its ok. We found a work around to install manually.
The issues seems to be that iobroker automatically updates packages but only if there are no npm warnungs.
So the update is kind of blocked there. Fortunately there is an option to do that manually in the Node-RED palette.


R squared

I added a method "CoefficentOfDetermination" which calculates the R^2 value.  Currently the method "RSquared" calculates r^2 (the square of the correlation between the model and data), now r^2 is equal to R^2 when the model was created via least squares linear regression.  However in other cases r^2 is not equal to R^2.
I was not sure whether to replace the old implementation of "RSquared" or write a new method. According to Wikipedia some people use r^2 to determine how good a least squares line fit would have been; thus rewriting "RSquared" might be a breaking change; thus I opted, for now, to write a new method (although maybe we should add a "rSquared" method and mark "RSquared" as obsolete(??)).
I also added three unit tests.

Thanks for bringing this up.
The current implementation could be considered as a bug, if the documentation had not explicitly mentioned the correlation.
Although closer to common mathematical notation, having both rSquared and RSquared is not an option form an API viewpoint for me. What about RSquared and CorrelationSquared as "desired" naming?

Finally merged. Thanks again!


Do not taint empty strings

What does this PR do?
Prevent tainting empty strings
Motivation
Empty strings shares the same pointer. This leads to identify as tainted all empty strings when one empty string has been tainted.
Checklist

[x] Unit tests have been updated and pass

what about replace and trim methods?


Docker Hub images are outdated

The Dockerfile previously added in https://github.com/TelescopeJS/Telescope/pull/962 was removed some time later, so Docker Hub builds have been failing for some six months. See https://hub.docker.com/r/telescopeapp/telescope/builds/

Hey @ze-phyr-us! Thanks for the heads up. We've never really used it, do you need it? We can re-upload the Dockerfile again if requested

Well, Docker is a very convenient method of deploying anything, including Telescope :)
It may help more people try out Telescope without having to touch their system. I certainly did, before deciding to deploy it in production (again using Docker).
See for instance this guide http://spartatek.se/meteor_blog/docker/2016/01/12/running-telescope.html
Getting Telescope up and running is as simple as
docker run --name mongo -d mongo --smallfiles
docker run --name telescope --link mongo:db -e ROOT_URL=http://localhost -e MONGO_URL=mongodb://db -p 3000:80 -d telescopeapp/telescope:devel

Ok, nice! We usually recommend deploying Telescope with Meteor Up, which uses Docker under the hood. I didn't know you could do like this 👍
File added! 🐳

Thanks!


Updating dmlc-core version?

I notice that the dmlc-core repo (which XGBoost imports as a submodule) has recently fixed the CSV parser.
I'd like to eventually see the submodule updated; is there any compatibility issue we'd run into if we did this?

I guess just try it and rely on unit tests but no issues I am directly aware of.


Outdated instruction in CONTRIBUTING.md

Running the tests section is referencing folder "tests" which existed in the root directory in v0.8.10 but seems to have moved in v1.0.0-prerelease1.
https://github.com/beakerbrowser/beaker/blob/master/CONTRIBUTING.md#running-the-tests

Ah thanks for the heads up, we gotta couple outdated documents there. I'll update soon.


Add support for using repository.credentials

Adds support for using the repository.credentials key, also called "credential templates" in Argo - very much implemented in the same way that InitialRepositories is.

Addresses #83

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks for the PR @jacobsee! I will have a look this week.


RFC files pointing to wrong revision

Files that are different than in yangModels repository:
iana-if-type.yang
ietf-l3vpn-svc.yang

This is because the https://yangcatalog.org/private/IETFYANGRFC.json iana-if-type.yang and ietf-l3vpn-svc.yang have two different revisions. the one on yangcatalog private points to the older revision vs. the one on github is a symlink pointing to newer revision.

This issue was fixed


⚠ SceneTime has degraded performance

In 37dac05, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 8189 ms

Resolved: SceneTime performance has improved in b350620 after 10 minutes.


Synchronized API

I wanna embed translations in source code and always load them. In this case I don't need async API - it makes app more complex. Can you provide sync API?

There is already a synchronous api, you can use translate.instant('key') to retrieve


Investigate where enrichment information is located now

We need to investigate where the demographic/enrichment information is located now.  Fully rolled into AGOL at this point?
@LindsayThomas

@lindsayking Where are we on this?

@LindsayThomas and I talked with geoenrichment team.  Although the way we have been accessing the geoenrichment service is not wrong, we were told we could use authentication method in http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000009z000000 for the geoenrichment service.

@lindsayking @NikkiGolding We have updated information on this. I am closed this issue and opening a new one with all the details.


How to add a same parameter to every single request with override

May I ask one thing about How to add the same parameter in every single request in Alamofire without adding each request?
Thanks in advance.
I am looking forward to your supporting.
With Best Regards,

This really depends on the type of parameter you want to add. If it's something like a header, then a RequestAdapter is exactly what you need, just add the header to every request you see. If it's a body or query parameter, that's a different issue.

Thank you so much for your information.
I would like to add as a body parameter.
Could you support simple code, if possible?
Thanks in advance!
I am looking forward to your supporting
With Best Regards,

For a common body parameter, it really depends on how you're making your requests and what the parameter structure is. If you're using Encodable types a generic wrapper that customizes encode(to:) may work. If you're using parameter dictionaries like Alamofire's Parameters type, you can simply pass those into a method which adds the common parameter.

@jshier I think creating a generic wrappers doesn't handle the case when you need to pass access Token as query parameters. If the token expires, it needs to be updated it in RequestAdapter. Is there any way to update query parameters in RequestAdapter?

There's no automatic way @anishparajuli555 built into Alamofire directly. You can always add additional query parameters to the URL by directly modifying the URLRequest in the RequestAdapter. As @jshier mentioned, it really depends on how you've created your network stack. You could either modify that value when creating URLRequestConvertible objects, or when passing through to the RequestAdapter.
You make a very valid point that RequestAdapter is not really designed to optimize for query parameter modification, and you'd be correct. It's certainly easier to make header modifications and other mutable property changes on URLRequest without having to rebuild the entire request. However, such are the Apple APIs.


Adding empty string as a value and making column search param optional

For now in request body when adding a column, "search": {"value": "","regex": false} is required. For cases where search is handled differently this is an unused parameter that is required in a body. It should be optional.
I added fix where this parameter if is not in the body column, default value is empty string

Thank you  👍


Added writeBinaryGltf stage and updated removePipelineExtras

Will create a separate pull request for addPipelineExtras after this.

For the removePipelineExtras spec, is it valid if I run removePipelineExtras one in the beforeAll function, and then run my tests on the resulting glTF object? Or is it better if I run the function in each test?

Coverage increased (+1.3%) to 89.189% when pulling a4f765d9f8ee169d9f51fe691a4976a79bb92d11 on writeBinaryGltf into 8eea3f881456931bcdcf002b3a120967abde74ac on master.

As we discussed in a previous PR, when we load binary glTF, we basically have to create a buffer for each buffer view.  In order to avoid writing out inefficient glTF assets, we planned to add a stage to basically merge buffers together.  It looks like this is done in writeBinaryGltf.js.  How hard is it to decouple this from writing binary glTF so it is just a general purpose pipeline stage like the others, e.g., removing unused objects?

@leerichard42 did you verify a few different output binary glTF assets by visualizing them with: http://cesiumjs.org/convertmodel.html
Please test ones with animations and skins.
For test models, see https://github.com/KhronosGroup/glTF/tree/master/sampleModels
A simple manual test could just read a binary glTF asset and then output it, verify it still renders OK, and that we didn't do anything to make the asset inefficient.

That's all my comments.  Really fantastic progress here!

Separating the merge buffers stage should be simple, so I will add that. I've been testing with the box model, but I will test with others. I think there might be a problem with the RiggedSimple binary sample model, because the special binary buffer has id KHR_binary_glTF rather than just binary_glTF.

Coverage increased (+1.5%) to 89.396% when pulling a11dc2d5ed38a9db5d1495cbb35c1de18bf51e7d on writeBinaryGltf into 8eea3f881456931bcdcf002b3a120967abde74ac on master.

Updated - I didn't replace the clone module yet due to the constructor issue, but I've separated the merge buffers stage.

Separating the merge buffers stage should be simple, so I will add that. I've been testing with the box model, but I will test with others. I think there might be a problem with the RiggedSimple binary sample model, because the special binary buffer has id KHR_binary_glTF rather than just binary_glTF.

Sounds like bad sample data.  Drag and drop the original COLLADA file here and test with that.  Could you also make a pull request into the glTF repo to fix the sample model and any others if you find other issues?

Actually, it looks like Cesium.clone when I try to deep clone the gltf object with loaded sources, because the Node Buffer class doesn't have a default constructor. Is there a workaround for this?

@mramato what do you think?  For more context, see https://github.com/AnalyticalGraphicsInc/gltf-pipeline/pull/39#discussion_r57883631.

@leerichard42 this looks good, just make the RiggedSimple updates please, and we'll see about clone.
You are welcome to start on our next stage: #40.

@mramato what do you think? For more context, see #39 (comment).

I would just go with the node module.  It's a popular module and will handle Node specific cases that Cesium's simple clone function does not.  However, it looks like it's only used in tests, so it should be a dev dependency and not a regular dependency.

Sounds good, thanks @mramato.
@leerichard42 let me know when this is ready to merge.

Updated the dependency! I tried to convert the COLLADA files, and I think the converter is actually where the KHR_binary_gltf id is added - when I convert boxTextured, whose .glb file previously worked, it adds the KHR_binary_gltf id to the resulting .glb scene.

@tfili I thought we fixed our converter so it names the buffer in a binary glTF file "binary_glTF".  @leerichard42 says it is still naming it "KHR_binary_gltf".

It was fixed in PR https://github.com/AnalyticalGraphicsInc/agi-asset-pipeline/issues/242.
It looks like the online converter didn't get the update. Working on addressing this now.

@tfili did we deploy the updated converter?

Yep. I tested and got the correct output.

@leerichard42 can you please test the animated/skinned models now that the converter is fixed?

Yes, writing glTF and binary glTF work now with .glb as input! I will make a pull request into the glTF repo to fix the files now.

Update: It looks like RiggedSimple was the only file with that problem, and everything else was fine.

Sounds great, thanks @leerichard42!


Improve engine log capture

      ❨?❩

Why are the changes needed?

limit error size with kyuubi.session.engine.startup.error.max.size
update error immediately when detecting errors at the very first line ASAP
Using Exception: instead of Exception to search each line to filter better
add the engine log address in the exception message in  case of error bootstraping

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

cc @pan3793 @ulysses-you  thanks for reviewing


docs: Update Matrix & IRC to sync with code changes.

Amends the matrix/irc docs to sync with the code changes made some time ago in zulip/python-zulip-api#413
Testing Plan:
I've not tested how this renders, as I wanted to get the text out ASAP given the delays and 1.9 imminence. Happy to test given a pointer to the methods, as I'm out of the loop atm.

Merged, thanks @neiljp!
Not sure what the Travis error was, but seemed pretty unrelated.


config: add switch of online config change feature

What have you changed?
Add switch of online config change feature, and adjust the startup process for online config change feature.
What is the type of the changes?

Improvement (a change which is an improvement to an existing feature)

Does this PR affect documentation (docs) or should it be mentioned in the release notes?
No
Does this PR affect tidb-ansible?
No

PTAL again @overvenus @zhangjinpeng1987 @rleungx

/run-unit-test

/run-unit-test

/release

/run-all-tests

PTAL again @zhangjinpeng1987

/release

/run-all-tests

/run-all-tests

/run-all-tests


Add information about element type/id, and link(s)

I can't see any place in the iD editor that displays the OSM element's type/id.
This should be made visible, with a link to browse that object on the OSM website, in a new tab of the browser.
I suggest placing this link on the right side of the "All tags". There's ample enough space to fit it.
For there there we could have access to last edits (history), or notes...
Ideally we should also be able to configure our own set of URL templates (saved in our local broser sesssion, if there's no server-side storage for settings of logged in users) for special actions on various online QA tools or to load it in an external editor, such as with JOSM remote control (JOSM allows easier viewing of the history and comparing changes: the basic history on the web OSM site is almost unusable), but may be a few common preconfigured links could be proposed, for things that are still not easily accessible or easy to do from iD.

iD does have a "view on openstreetmap" link at the bottom of the inspector pane:

Also you can pull up an infobox with more info about an object, including its OSM id and type, by selecting the object, then press ⌘I  :

This does not address the issue that the id is not visible at all. And viewing the map is not the same as browsing the object.
the keyboard shortcut is also only for a Mac (and noone knows it as there's no hint about it). What is the real cost of having the id visible directly on the properties pane, and copiable from there for use in other tools?


RapidFloatingActionHelper.build  java.lang.NullPointerException

How to solve  this  problem? I can successfully run the demo example you give,but when i create a new project,it cause this problem.
I found if I download your file 'library' and use it in my project like  'compile project(':library')'  there is no such problem,however this problem exits when I use your library via gradle like this 'compile 'com.github.wangjiegulu:RapidFloatingActionButton:1.0.3' .Can you tell me why??

I meet the same problem...

Maybe you should  debug ... ,Though I meet the same problem ,which is my fault . So find it and   solve it ,

You need to initiate rfaLayout and rfaButton. In the author's code, he used AILayout to initiate this. I have googled that but found nothing. So instead I use a normal way to get the view:
 rfaLayout = (RapidFloatingActionLayout) findViewById(R.id.activity_main_rfal);
 rfaBtn = (RapidFloatingActionButton) findViewById(R.id.activity_main_rfab);

This should work then.


easier way to set viewport height and width

In other systems (selenium), testing the effects of responsive CSS, and getting consistent test results, generally, across multiple platforms required being able to set the viewports height and width. I don't see an easy way to set the viewport height and width (but maybe I missed it!) and it would be nice to have it.
To get this functionality right now, it seems like I ought to create a new target ID with a target.CreateTargetParams's Do called inside of a chrome.ActionFunc, then creating a client.Chrome instance by hand with the ID set equal to the new target id, and then calling CDP.AddTarget. Is that right?

Oh, hrm, I can't seem to make a client.Chrome instance by hand because I won't have the vers and other things that Client.loadProtocolInfo can access. So maybe I keep a Client around instead of using chromedp.WithURL and use Client.NewPage and then cast the returned Target back to a *client.Chrome?
Ugh, there must be a better way I'm missing.

Apologies for the (very late!) response. This can be done via https://godoc.org/github.com/chromedp/cdproto/emulation#SetDeviceMetricsOverride. In particular, running an action like Run(ctx, emulation.SetDeviceMetricsOverride(width, height, 1.0, false). This is the upstream definition of the command: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride

For a full example, here's how I rewrote TestCaptureScreenshot to be faster, and to check that the resulting PNG has the right dimensions:
func TestCaptureScreenshot(t *testing.T) {
        t.Parallel()

        ctx, cancel := testAllocate(t, "image.html")
        defer cancel()

        // set the viewport size, to know what screenshot size to expect
        width, height := 650, 450
        var buf []byte
        if err := Run(ctx, Tasks{
                emulation.SetDeviceMetricsOverride(int64(width), int64(height), 1.0, false),
                WaitVisible(`#icon-brankas`, ByID), // for image.html
                CaptureScreenshot(&buf),
        }); err != nil {
                t.Fatal(err)
        }

        config, format, err := image.DecodeConfig(bytes.NewReader(buf))
        if err != nil {
                t.Fatal(err)
        }
        if want := "png"; format != want {
                t.Fatalf("expected format to be %q, got %q", want, format)
        }
        if config.Width != width || config.Height != height {
                t.Fatalf("expected dimensions to be %d*%d, got %d*%d",
                        width, height, config.Width, config.Height)
        }
}

I'm going to close this issue for now. If you still have issues, feel free to reopen or file a new issue.

@martinrode You can set the window size with the chromedp.WindowSize option. It will set the initial window size of thebrowser window. The following CDP commands could be used to change the window size later :

Browser.getWindowForTarget: to get the window id
Browser.setWindowBounds: to set position and/or size of the browser window

Please note that I haven't tested them. And please note that the window size is not the same as the viewport size.


Only show users in the contacts like whatsapp

Hey! This is on your side to figure out, users UI and presentation/logic are out of scope of this library.


Access to Vite internals for plugins

Description
As a plugin author, I would like to have access to Vite internals from specific plugins.
For example, I need to implement a custom CSS plugin that replaces vite:css, and I need access to internal functionality like fileToUrl, publicFileToBuiltUrl, etc. from plugin/asset, in order to reuse as much functionality from Vite as possible.
Suggested solution
Export all vite/src/node/plugins, importing a plugin would be:
import asset from "vite/plugins/asset"
// or
import { asset, html } from "vite"
// or
import { asset, html } from "vite/plugins"

const url = asset.fileToUrl(id, config, ctx)

Alternative
No response
Additional context
Similar requests have been made:
https://github.com/vitejs/vite/issues/7162 -- export fileToUrl
I've noticed this issue in other plugins, where they've implemented their own trimmed down version of a functionality or simply copy/pasted the required functions.
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

I don't think Vite should expose all the internal utils so you can replicate and replace Vite's plugins. Vite's builtin plugins are not meant to be replaced too, and is intentionally opinionated. If you have a need for specific utility for a Vite plugin, it would be better if you can explain your usecase so we can consider exposing it.

The company I'm currently for has a CSS system built in Rust, similar to lightningcss. I wanted to move their current build system to Vite, but I cannot do it without integrating the CSS system.
Currently, I've written a draft plugin that replaces the CSS plugins from Vite, but I have to rewrite the "replace URLs" and "asset linking" functionality from internals.
I didn't know the plugins are intentionally opinionated, I hoped Vite was more flexible.
Thanks for your reply.

Yeah, sorry that you have to notice this late in development. We're working on a new philosophy docs at https://github.com/vitejs/vite/pull/12897 so hopefully it's clearer where Vite stands soon. Thanks for understanding!

Agree with @bluwy here. In this particular case, in the future, as part of the work to offer Lighting CSS in Vite Core https://github.com/vitejs/vite/pull/12807, some of the abstractions you are looking for may end up in a better shape to be exposed. We could evaluate again then, and finally give an answer to https://github.com/vitejs/vite/issues/7162 or close it.


Repeatable comment of data structure member isn't visible in refernce code

Describe the bug
In a normal use case, a repeatable comment at some address (e.g. 0x1000) will be displayed on every instruction that references this address (0x1000). However, if the address 0x1000 is a stucture member, a repeatable comment in that address will not be displayed in instructions that references this address.
To Reproduce
Steps to reproduce the behavior:

Compile attached source code (bug.c) from source with the command gcc bug.c -o bug
Open the compiled file in Ghidra
Create a structure with two dwords, named f1 and f2
Apply the created structrue to the address of s
Create a repeatable comment in the address of s.f2
Open main's function disaassembly code
See that the instuction that writes to s.f2 doesn't show the repeatable comment of s.f2 field

Expected behavior
The instuction that references s.f2 should display the repeatable comment of that field.
Screenshots
The first screenshot shows the repeatable comment in the address of s.f2

The second screenshot shows main's disassembly, and the cursor is in the instruction that writes to s.f2. The expected behavior is that the repeatble comment will be shown in that instruction, while in reality a "null" is shown.

Attachments
bug.zip
Zip file which contains:
bug.c - Source code of the program that can be used to reproduce the bug.
Environment (please complete the following information):

OS: Linux 5.4.0-53-generic #59-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
Java Version: <IP_ADDRESS>
Ghidra Version: 9.2

I looked at the code for this.  It is currently setup to only show repeatable comments for references to functions.    In this case, the reference to the structure is ignored.
It seems to me that also showing repeatable comments in this case would cause no harm.


Bug Resolved - Added navigate to top button

Closes issue number #158
https://user-images.githubusercontent.com/91081814/162171419-eb46fd30-aa92-421c-bf3b-7d2c189646f0.mp4

Thanks for contributing!


feat: Add support for roles created to explicitly assume their own role if desired

Description

Add support for roles created to explicitly assume their own role if desired

Motivation and Context

Allows for users to continue using the previous default behavior https://aws.amazon.com/blogs/security/announcing-an-update-to-iam-role-trust-policy-behavior/ if they so choose
Closes #278

Breaking Changes

No

How Has This Been Tested?

[x] I have updated at least one of the examples/* to demonstrate and validate my change(s)
[x] I have tested and validated these changes using one or more of the provided examples/* projects

[x] I have executed pre-commit run -a on my pull request

This PR is included in version 5.5.0 :tada:

@bryantbiggs showing issues on my side with 5.5
│ Error: Invalid template interpolation value
│
│   on .terraform/modules/base_system.argocd.argocd_iam_role_sa_cross_cluster/modules/iam-role-for-service-accounts-eks/main.tf line 24, in data "aws_iam_policy_document" "this":
│   24:         identifiers = ["arn:${local.partition}:iam::${local.account_id}:role${var.role_path}${var.role_name}"]
│     ├────────────────
│     │ var.role_path is null
│
│ The expression result is null. Cannot include a null value in a string template.
╵
╷
│ Error: Invalid template interpolation value
│
│   on .terraform/modules/base_system.argocd.argocd_iam_role_sa_cross_cluster/modules/iam-role-for-service-accounts-eks/main.tf line 24, in data "aws_iam_policy_document" "this":
│   24:         identifiers = ["arn:${local.partition}:iam::${local.account_id}:role${var.role_path}${var.role_name}"]
│     ├────────────────
│     │ var.role_name is null
│
│ The expression result is null. Cannot include a null value in a string template.

FYI we use role_name_prefix
module "argocd_iam_role_sa_cross_cluster" {
  source  = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
  version = "~> v5.5"

  role_name_prefix       = substr("${var.addon_context.eks_cluster_id}-argocd-sts-", 0, 38)
  max_session_duration   = "3600"
  force_detach_policies  = true
  allow_self_assume_role = true

  oidc_providers = {
    argocd = {
      provider_arn = var.addon_context.eks_oidc_provider_arn
      namespace_service_accounts = [
        "${var.namespace}:argocd-application-controller",
        "${var.namespace}:argocd-server",
      ]
    }
  }
}


chore(DDI-985): Added requirement prop

Renamed existing "optional" prop to "requirement".
Added code to display optional and required labels.

I think using RequirementType rather than RequirementText would be a better choice.

:tada: This PR is included in version 4.0.0-alpha.78 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0-alpha.119 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.0.0-alpha.6 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0-alpha.18 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Network set

Description
Adding support for Network set to be able to pull their status for example for monitoring purposes
Issues Resolved
None
Check List

[X] New functionality includes testing.

[X] All tests pass for go 1.11 + gofmt checks.

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

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

[X] Changes are documented in the CHANGELOG.

Merging the Network_Set resource to main branch


nickel: 0.2.0 -> 0.2.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/tweag/nickel/releases.
meta.description for nickel is: "Better configuration for less"
meta.homepage for nickel is: "https://nickel-lang.org/"
meta.changelog for nickel is: ""
Updates performed

Rust version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.2.1 with grep in /nix/store/mc7ly8561ry2ir0iaj64m14d7lrbbpkd-nickel-0.2.1
found 0.2.1 in filename of file in /nix/store/mc7ly8561ry2ir0iaj64m14d7lrbbpkd-nickel-0.2.1

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
nickel

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/mc7ly8561ry2ir0iaj64m14d7lrbbpkd-nickel-0.2.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A nickel https://github.com/r-ryantm/nixpkgs/archive/1cf6528627c6cfced7ee38313dbbc11ce9dbdb7a.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/mc7ly8561ry2ir0iaj64m14d7lrbbpkd-nickel-0.2.1
ls -la /nix/store/mc7ly8561ry2ir0iaj64m14d7lrbbpkd-nickel-0.2.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

nickel

Maintainer pings
cc @AndersonTorres for testing.

Result of nixpkgs-review pr 185991 run on x86_64-darwin 1

1 package built:

nickel


Delete Experiment

I have just tested this locally and the experiment ID does not seem to be passed down to the API call.


is there any known injection latency issue with having circular dependencies?

For ex : -
I have ControllerA & ControllerB in my application. ControllerA has ControllerB injected in it and ControllerB has ControllerB injected as in it.
Do you think that this can be the cause of delay in dependencies getting injected and as a result delaying the transition from one fragment to another?

The injector should be able to detect circular injection. Once it detects circular injection, it would stop. Otherwise it will fall to infinite loop. There are some test cases here
https://github.com/kejunxia/AndroidMvc/blob/master/library/poke/src/test/java/com/shipdream/lib/poke/TestCircularDependencies.java
When you say delay, do you feel the fragments are loaded slowly, or you met some race conditions that for example you called something before they are injected?
By the way, I think circular dependencies should be avoided since naturally it means the dependency chain can be broken down.  For example, when ControllerA depends on ControllerB and vise versa, it may imply that, ControllerA and ControllerB may have a shared dependency say xxxManager.

@kejunxia The fragments are loaded very slowly. I didn't find any race conditions yet.
I can easily extract the shared dependencies from the inter-dependent controllers but I would like to know of any known issue which can cause more than a second delay in between the transition of fragments.

The dependency injection has some overhead due to reflections. However I did a benchmark app here to compare it with Dagger as long as there are not a lot of deeply nested injection it's fine.
https://github.com/kejunxia/AndroidMvc/tree/master/samples/benchmark
Reasons of slow loading of fragments varies. Have you tried to log elapse time of dependency injection during the fragments being loaded? I am happy to dive in to help you if that's the cause of slow fragment loading.
I encountered fragment loading lag problem but not because of dependency injection. Usually when the fragments are loaded while some animations are being played, the animations will be laggy because they are using all on UI thread. Not sure if this what you encountered.
Another direction can be investigated is how large is the model of your controllers since they will be serialized and deserialized when the fragments are recreated.

@kejunxia

Usually when the fragments are loaded while some animations are being played, the animations will be laggy because they are using all on UI thread. Not sure if this what you encountered.

The Fragment with animations is working perfectly fine and the fragment that is taking time doesn't include any animations.

Another direction can be investigated is how large is the model of your controllers since they will be serialized and deserialized when the fragments are recreated.

I had encountered the problem with the size of the model in which I had database and smack (xmpp lib) objects but had removed it out of the controller model to solve the issue and now keep all our models lightweight. But recently we have injected a new component apart from the controllers. Are the attributes in the component also serialized? For example I have a DatabaseComponent which has an DatabaseManager Object in it, will that get serialized too?

@kejunxia -

However I did a benchmark app here to compare it with Dagger as long as there are not a lot of deeply nested injection it's fine.

How deeply nested injection are we talking about? We have 3 levels deep nesting, at max.

Only model of Controller will be serialized. Default serializing implementation is gson. If it's a performance issue for heavy models, it can be customized, please refer below in which you can specify what type of object will use given implementation to serialize state.
https://github.com/kejunxia/AndroidMvc/blob/master/samples/note/android/src/main/java/com/shipdream/lib/android/mvc/samples/note/view/NoteApp.java#L43
Try to finish onViewReady(onCreate) of fragments as quick as possible. Try to move heavy stuff into asynchronous calls. Initialising DB or other IO operations could be slow.

How deeply nested injection are we talking about? We have 3 levels deep nesting, at max. <
Sounds alright. Can you try to profile how long thing take to get injected in your slow fragments?

Sure. I will post the elapsed time soon.

@kejunxia
Here is the code I have written to log the elapsed time in a slow Fragment.
   @Override
   public void onCreate(Bundle savedInstanceState) {
       ts = System.currentTimeMillis();
       super.onCreate(savedInstanceState);
       Log.d(TAG, "Injection Elapsed Time " + (System.currentTimeMillis() - ts));
   }

Elapsed time varies from 1672ms to 1917ms.

That's indeed slow. Is this a direct child class of MvcFragment?
Is there any heavy lifting stuff in the onConstruct callback of the
injected controller(s)? Please try to profile the more detailed chunk you
think to cause the performance hit to narrow down.
On May 6, 2016 5:57 PM, "Venkatesh Rao"<EMAIL_ADDRESS>wrote:

@kejunxia https://github.com/kejunxia
Here is the code I have written to log the elapsed time in a slow
Fragment.
@Override
public void onCreate(Bundle savedInstanceState) {
ts = System.currentTimeMillis();
super.onCreate(savedInstanceState);
Log.d(TAG, "Injection Elapsed Time " + (System.currentTimeMillis() - ts));
}
Elapsed time varies from 1672ms to 1917ms.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/kejunxia/AndroidMvc/issues/46#issuecomment-217374100

yes that's a direct child class of MVCFragment.

Since onCreate does multiple things, register event bus, injection, and restoring state. I need to more break down to investigate the issue.
https://github.com/kejunxia/AndroidMvc/blob/master/library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/view/MvcFragment.java#L197
Does the fragment has a lot of onEvent callbacks?
Is the fragment slow on fresh load or restoring state?
If you can provide a mini project simulating the problem it will be helpful.

@kejunxia -

Does the fragment has a lot of onEvent callbacks?

Yes, the slow fragment has 16 onEvent callbacks. Even I suspect this to one of the cause in the latency.
Give me an hour or so, I will try to recreate the issue in a new project with a lot of onEvent callbacks.

Controllers now are supposed to have one-to-one relationship with a view

Please elaborate the one-to-one relationship between a view and a controller.

That means, every view has its own controller. For example, FragmentA has ControllerA, FragmentB has ControllerB. If FragmentB needs access something like current loggedUser instance which managed by ControllerA, then consider to break it out as a UserManager and injected into ControllerA and ControllerB.
Controllers are now more like ViewModel of a View which represents the state of a View and manages it.

Can you try if fragment load time is reduced after onEvent methods are removed

I will try doing that.
And also I am using 12 controllers in the Fragment, there is no one to one relationship as you have explained in the changelog. Do you think that can also be a potential cause for the latency.?

Maybe. 12 controllers may be an injection burden. If they have cross reference, the dependency graph size may multiples quickly. e.g. 12 controllers have averagely 3 injectable fields and each field also has 2 injectable fields. Then the total is 12 x 3 x 2 which is 96 fields need to be injected. Just an extreme example.
What do your controllers do? Controlling a widget like textview/imageview/etc or controlling the whole fragment as a page?
I will update the documents to reflect the change later. Currently the documents are out of date.

Controllers in my app are individual app based components. For example :- A fragment needs to fetch the configuration first and then get the content depending on the URLs specified in the response data. For the above case - We have two controllers - One to fetch the configuration and the other one to fetch content based on the response. A controller contains all the functions required for a particular component.

Would you please explain how to add this library locally in android studio as I want to add some Logs to check the delay in injection of controllers.

Copy the projects into your project, then add a source project dependency to your android project the by
compile project(':[your lib path]:android-mvc')
If you have you controllers as a separate java moulde add below
compile project(':[your lib path]:android-mvc-controller')
And don't forget to include modules in your settings.gradle
Also refer the sample projects

@kejunxia  - There are 149 injections in total in the slow fragment.

That's a considerable amount may slow down. Try to avoid circular depebdency. Though the framework can handle it but dectecting it still takes time to analyze and transverse those unnecessary circular reference graph.
In your previous use case, I think you can have a UrlManager manages base urls. Then each fragment has one conttoller just to control the fragment(view). Controllers need to acess the dynamic base url have the urlmanager injected.
So controllers won't depend on other  controllers but only managers which are a lower layer below controllers shared by controllers. In this way, there would be no circular reference. Dependent chain may be a little simpler and clearer.

The app has 40 controllers in total and there is a lot of interdependency among them. We will extract the managers from the controller and make the dependency chain simple.
Don't you think this should be made simpler than this?
We could have a default controller injected in the fragment and its implementation will be inside the controller/internal folder as it is now. Then we can access the controller in the fragment with this.controller.
For a controller depending on another controller we can have container based DI. All the controller should have access to a container which contains the controllers. We can call container.getController('controllerName') from dependent controller to access it.
I am not sure if this can be accommodated in the current design.

My thought is a controller should be the abstraction of a view(fragment). It's the controller of the view but not data.
Controller that controlling domain data was my original thought. And I found the flaws that is the same problem you are currently facing. Because this design doesn't split responsibilities clearly. They were only 2 layers in the app
Views
---------------------  depending on
Controllers
Because controllers are controlling domain data, it's inevitable controllers will reference other controllers. And then it will become messy quickly.
My current thought is view is abstracted by a controller+model. So views and controllers are one to one relation. Controller is the controller of a view state not domain data. When controllers need to share some logic/data. They consult managers. For example, UserManager that manages currently logged in user.
Another layer is service layer. Service abstract data access, say, in a controller it wants to show user's name on a view. It asks the UserManager, then UserManager access a UserService to get user data from database/server api/local storage/memory and etc. UserManager doesn't know where the data is from which is hidden by services. Which makes them easy to be mocked in testings. Or even a controller can access a service directly if the service data is only used by the controller. Otherwise resort to a shared manager.
So now the layers would be like this. Then there will be no messy and circular dependency. Say there 3 views, and 3 controllers. ViewA and ViewB need to interact with user data so their controller ControllerA, ControllerB share User manager which access user data by userService. ViewC's controller only need to place order, so it directly has an injected service for ordering.
Hope this graph helps.
---ViewA--------------ViewB------------- ViewC
------|--------------------|---------------------|--------------- View layer
ControllerA------ControllerB-------ControllerC
------|--------------------|---------------------|--------------- Controller layer
----- ------------------/-----------------------|
---------------|-------------------------------  |

-------UserManager -----------------------
---------------- Manager layer

-----User Service-------------------OrderService-------------- Service layer

---------------
---------------------------------------------------- Data layer

     Database / Clound / Local Preference / Files etc

In addition, you don't have to inject object by fields. You can use
MvcGraph#reference(Class, Annotation) to get an instance. Don't forgot to deference it if it has a state since otherwise it's state will be serialized in onSaveInstance even it's not used by any objects. Or if you want to auto deference it use MvcGraph#use(Class, Annotation, Consumer)

@venkatesh3007 just updated the document on the github home page
https://github.com/kejunxia/AndroidMvc

@kejunxia - Moved all the shared stuffs into managers. The latency issue is resolved in almost all the injections. However a couple of injections still take 100-150ms. I am looking into them. Thank you so much for your support.
I think this library can be really helpful to implement the concept of "atoms" for enabling Android Instant Apps.
Would love to discuss and contribute for further development of this project.

Happy to hear your project gets faster. Latency was expected by me because of the reflections. That's why I did a benchmark app to monitor the performance. Is your project very performance critical? I feel like upt to 100ms is ok for my projects as long as it's not in a loop.
Can you give me a little more details about "atoms" and instant apps you mentioned above? Not sure what you meant.

Go through this - https://developer.android.com/topic/instant-apps/index.html


Render comments as markdown

When reviewing tasks, I often need to include snippets of code. Currently, it looks terrible, as there is no formatting.
This PR changes comments to be rendered with markdown. It also sanitizes the output, since comments can also be entered by untrusted users.
If you agree with it, I would also like to add some basic syntax highlighting (highlight.js).

Ok :) Druhá možnost implementace by byla posílat to z backendu tak, jak to leží a běží v DB, ale na frontendu použít něco jako https://github.com/remarkjs/react-markdown.

Comments now contain html tags.

Forced refresh of the page (Ctrl + Shift + R in Chrome, depends on the browser) should fix it.


[smp]: delete idle, idle_all_features experiments

What does this PR do?
The quality_gate_idle and quality_gate_idle_all_features experiments duplicate the idle and idle_all_features experiments, respectively. To avoid confusion when displaying SMP Quality Gates reports, this commit deletes the idle and idle_all_features SMP experiments.
Motivation
Improve SMP Quality Gates report UX.
Describe how to test/QA your changes
Running CI should yield Regression Detector reports that no longer contain idle and idle_all_features experiments.
Possible Drawbacks / Trade-offs
Duplicating experiments is a hack to get around existing throughput and reliability limitations of SMP services as replicate counts increase: it is an expedient way to run more replicates of an experiment, but the output is harder to interpret by end users. We believe the cost of decreased usability is not worthwhile -- if our output confuses users, they won't use it, rendering improved statistical estimates from larger sample sizes irrelevant.
Additional Notes
n/a

/merge


Updated validations.py python script

Updated validations.py python script.
Fixed the behavior of validate_user function by adding a IF statement to check that the first character in the provided string is a letter.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it!


fix: losing aliasMap in 'partial' subqueries

ported from https://github.com/ovos/objection.js/pull/13
This fixes an issue with 'partial' subqueries that they lose aliasMap from q._context (QueryBuilder's "internal context") while generating nested where sql part. QueryBuilder.subqueryOf() used to grab context from "parent" query, but it doesn't anymore. (since 2019-02-13) https://github.com/Vincit/objection.js/commit/524e0bef5f75a280aa54d1ee30b6b36c304ea6ad
In our case, we were getting SQL errors where alias was necessary to make it work, but it was missing
ER_NON_UNIQ_ERROR: Column 'event_id' in IN/ALL/ANY subquery is ambiguous

Basically reintroducing what was deleted in https://github.com/Vincit/objection.js/commit/524e0bef5f75a280aa54d1ee30b6b36c304ea6ad (to fix https://github.com/Vincit/objection.js/issues/1205) but wrap merging context with a condition that it should only apply to "partial" subqueries + reverse the sequence that isPartial() is set before subqueryOf()

@lehni I've added a test which fails with
DBError: select `m1`.* from `model2` as `m1` where (`id_col` = (select `m2`.`id_col` from `model2` as `m2` where `m2`.`model2_prop2` = `model2`.`model2_prop2`)) order by `m1`.`model2_prop2` asc - SQLITE_ERROR: no such column: model2.model2_prop2

on the master branch.
Perhaps the ${query.tableRefFor(query.modelClass())}.model2_prop2 reference look weird, but it is useful e.g. for modifiers which add a where condition with subquery, referencing a column from parent query, but the alias which parent query uses is not known and cannot be hardcoded in the modifier.


Fixes #329

Replace the old sourceforge link to ant-contrib with a maven link.  Additionally, since the dependency is now fetched as a jar instead of a zip, remove the step which unzipped it to the proper location.

Note that the build still fails due to some failing tests (there are 5 failures, in the org.jetbrains.kotlin.android.xmlconverter.XmlConverterTest suite). I'll try to see if I can address these, but it may be beyond my comfort level with the library, since I've only started to familiarize myself with it.

Thank you for the contribution!


Handle failure to write cached-consensus nicely

There's no exception handling when oppy tries to write its cached-consensus document. We should just continue on without writing a cached-consensus and log the error if some error occurs.

Woops, this issue is wrong. This was actually fixed before the initial commit. Closing as it's no longer an issue.


Screen Recorder (added Quick Start)

Fixes
#593

Description

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New project (non-breaking change which adds functionality)

How Has This Been Tested?

Tech Stack used:

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have included a README.md file
[x] My project follows this structure: Domain Folder/ Project Name Folder/ Project files and Readme.md files
[x] I have added demonstration in the form of GIF/video file
[x] I am a GSSoC'22 Participant

@DragonUncaged hey buddy 2 PR linked with 1 issues. #595 and #594

@DragonUncaged hey buddy 2 PR linked with 1 issues. #595 and #594

i did that by mistake previously and edited it,


import docs from the getting started docs project

imported docs from the getting started docs
I have copied this setup from the crate/crash repository
needs crate/crate-docs-theme/pull/111 to be merged and released before this will run
note: this is a single page. we could improve these docs by expanding them. but that is out of scope for the current sprint

@chaudum pushed a fixup. please re-review. thanks!

@chaudum oops. the screenshot was the wrong one. I have pushed a fixup with the right one

thank you both!


Cleanup unused struct field and Fix typo

Cleanup unused struct field

Remove Pool field from CreateInstanceParams struct, because
this is given as a separate parameter to the CreateInstance function.

Fix typo

I also tested the application with this update, and everything works fine.


Prometheus Metrics

It looks like the controller sets itself up to export metrics, but this does not seam to be implemented yet. Would be a nice addition to the logs to monitor the deployment of the FQDNNetworkPolicies operator.

Hi @Starefossen,
Good idea!
Could you detail on what you would like?
Thanks for contributing.

Actually you can read all the exported metrics on :8080 for the manager.
And if you need, you've the Prom resource here: main/config/prometheus

Thanks a lot for the link. What I thought would be useful metrics are number of DNS queries, respond status and latency as well as requests to the Kube API ☺

Hi,
A new official GKE feature has been released: https://cloud.google.com/kubernetes-engine/docs/how-to/fqdn-network-policies
We encourage you to migrate to this official feature, as we will not be adding functionality to this project in the future.
Thank you

Hi @MrTrustor,
Maybe time to archive this project?
Thanks!

From the new docs:

FQDN network policy is a paid feature, but payment will not be required at this time until FQDN network policy becomes a generally available offering.

And the new FQD NetPol is only available for DPv2 clusters, and there is currently no migration path for existing clusters.

Hi Hans,
We are not deleting this project, and you are still free to use it/fork it if it fits your needs. We are focusing our resources into the officially supported feature which we believe provides a better user experience and is more robust.
I apologise for the inconvenience.


Support for named parameters in service factory

I'm using the service factory for developing a client. But it results in 'positional/anonymous arguments' instead of 'named arguments'.
Can you consider adding support for named parameters through the service factory?

Added a setUsedNamedArguments method to Service factory. Defaults to false unless set.
Thanks for the suggestion.

Thanks!