AmmoJS Driver

@InfiniteLee reading through your branch (https://github.com/donmccurdy/aframe-physics-system/compare/master...InfiniteLee:feature/ammo_driver) and leaving some comments and questions here.

What's the full (minified and/or gzipped) size of AmmoJS? I think that may determine the value keeping CannonJS support.
In ammo-driver.js, the exports are defined inside of a promise .then() callback. I can't see why that would be necessary... maybe have the driver init() method return a promise, instead? Or is there another issue I've missed?
Do you expect to keep using CannonJS for anything, or move entirely to AmmoJS? Any early comparison takeaways?
How does debugDrawMode work? Does that let us implement drawing in three.js, or does AmmoJS use the GL context itself?

hey @donmccurdy - sorry been out of town for the past couple of weeks so haven't been working on this stuff. But I'm back now.

The current ammo.js builds are here: https://github.com/kripken/ammo.js/tree/master/builds and you can see the sizes of the wasm and asm builds. It looks like the recent version of emscripten has brought both versions to about the same size of eachother, 1.6-1.7 MB. That said, the actual size we use for aframe-physics-system might be smaller, as it's possible to remove unused bindings from ammo and recompile to make the builds smaller (https://github.com/kripken/ammo.js#reducing-build-size). It also might be bigger if we decide there's more features we want to expose from bullet or not.

No, this is probably just my lack of experience in js showing (and me just trying to do the fastest thing possible). I'll try having the init() return a promise and see how that goes.

Assuming we're ok with the size of the ammo.js build, its probably ok just to switch over assuming I can get feature parity. The last thing I was having issues with was getting constraints to work in Ammo the same way they work for Cannon (necessary for aframe-super-hands-component to work correctly), and that's been tricky.

Bullet/Ammo only provides a virtual interface for debug drawing with a handful of methods which it expects to be implemented on the game engine side. I've done this with three.js via https://github.com/InfiniteLee/ammo-debug-drawer. If one wanted a pure GL implementation, they could implement their own debug-drawer similar to the one I made, but using gl calls instead of three.js ones. (considered doing that, but I wasn't sure how to resolve doing direct gl stuff at the same time as having something like three doing it's own gl calls simultaneously, so keeping everything in three made it simple, especially if you wanted to support rendering depth/order).

Added by @InfiniteLee in #125.
Thanks again @InfiniteLee, excited to make this available for more A-Frame users! :)


Fail to use an environment variable in python.defaultInterpreterPath on Windows

Environment data

VS Code version: 1.43.1
Extension version (available under the Extensions sidebar): 2020.3.69010
OS and version: Windows 10 64-bit
Python version: 3.8.2

Expected behaviour
An environment variable in python.pythonPath is respected across all platforms.
Actual behaviour
Works on Linux (via Remote SSH), but fails on Windows.
Steps to reproduce:

Specify "python.pythonPath": "{env:PYTHON_FOR_VSCODE}" in settings.json.
Set a Windows environment variable PYTHON_FOR_VSCODE to point to an installed Python interpreter, in my case C:\Tools\Python3\python.exe.
Restart VSCode, and open a hello.py.
The yellow prompt "Select Python Interpreter" persists.

When it's clicked, a combobox comes to say current: {env:PYTHON_FOR_VSCODE}, and lists my locally installed Python interpreters, including C:\Tools\Python3\python.exe. Choosing it works fine, but defeats the purpose of using an environment variable.
In VSCode's Terminal, %PYTHON_FOR_VSCODE% --version runs as expected.

Hi @wdscxsj 👋
We're deprecating python.pythonPath setting with https://github.com/microsoft/vscode-python/issues/10375, moving it out of settings, so we don't plan to support this enhancement.
 We plan to store settings in a VSCode storage instead of settings.json files, so you should no longer face this once https://github.com/microsoft/vscode-python/issues/10375 gets in. Closing this in favor of that.

@karrtikr OK... Actually my setting "python.pythonPath": "{env:PYTHON_FOR_VSCODE}" was intended to use a preconfigured "default Python" for each machine my VSCode could connect to. It covers the folder/project mode as well as the single file case. Will #10375 work in both cases?

I see. In that case, consider the workaround:
If no interpreter is specified in settings, we check the PATH environment variable to autoselect the interpreter. You can append the preconfigured "default Python" to PATH environment variable instead of storing it in PYTHON_FOR_VSCODE, and it'll automatically be picked up if don't have python.pythonPath present in settings.

Sure, that's good enough. Actually it's been a surprise to me that the first Python on PATH is not automatically picked.

I just realized that the original bug you described will still be applicable for #10375 . I am reopening the issue and changing the title accordingly.

Thanks a lot for your active work!
In sum, please help with a configuration of default (no-confirmation) Python that works across multiple hosts and under both folder mode and single file mode. My original idea of per-host PYTHON_FOR_VSCODE only works in theory.

You need to put the $ for "python.pythonPath": "${env:PYTHON_FOR_VSCODE}" to work, I think you missed that. Closing this as it's working as intended.


"workon" command has no effect after second call

my system: windows 10:
> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      19041  0

powershell version: Version          : 5.1.19041.1023
I use pyenv-win to install: 3.8.10
And put the "VirtualEnvWrapper.psm1" at: "$mydocuments\WindowsPowerShell\Modules".
Added these to Profile.ps1:
$PowerShellPath = Split-Path $PROFILE.CurrentUserAllHosts
Import-Module $PowerShellPath\Modules\VirtualEnvWrapper.psm1

Restarted powershell, execute mkvirtualenv t1, I can enter (t1) virtualenv.
then execute deactivate, virtualenv is deactivated, all is good.
Then I type workon t1 again, prompt does not have (t1) prefix, and the python command is still the global one, at this point, if I execute deactivate, this is reported as not recognized.
I have to edit the VirtualEnvWrapper.psm1:
In the function function Workon, change this line:
    Import-Module $activate_path

To this:
    & $activate_path

Now everything works, I can workon t1, deactivate, workon t1, all is good.
Just don't know the root cause, I'm completely noob with powershell.

Having to use the call operator suggests that a change of scope has occurred. What directory is your 'Envs' directory stored in?
I'm getting different behavior for PS 7 and PS 5 depending on whether I invoke them in Windows Terminal or standalone. Location of 'Envs' is one of them.

I did not put any explicit environment to change the "Envs", it's at: $env:USERPROFILE/Envs
But I do have a "HOME" env var globally, which points to a subdirectory of $env:USERPROFILE, and in powershell, there is a $home variable pointing to $env:USERPROFILE, not sure if this can be the root cause.

Hi @zeroxia
I will check this issue tomorrow morning.
Regards

you can also just use the same activation as in mkvirtualenv at line 103ff:
  $VEnvScritpsPath = Join-Path $NewEnv "Scripts"
  $ActivatepPath = Join-Path $VEnvScritpsPath "activate.ps1"
  . $ActivatepPath

The Import-Module fct only executes once per shell session apparently.


Implement ErrorBoundary and Loading states for our components

Some of our components have a loading state, but not all of them. Having a good loading state will prevent layout shift and tells the user that something will show up.
Error boundaries contain errors and prevent them from breaking the entire page, we should implement those too https://reactjs.org/docs/error-boundaries.html

I added storybook stories for error / loading state testing and opened individual bugs for loading state / error improvements.  See #280, #417, #418, #419, #421, #422
I'm going to close this and open a new bug just about ErrorBoundary which I think is its own task.


Customizable Rollups: SObject row was retrieved via SOQL without querying the requested field

There are reports of several orgs receiving the following error when Customizable Rollups run after the NPSP 3.151 release:
SObject row was retrieved via SOQL without querying the requested field
The pattern seems to be orgs who have modified User Defined Rollups (or standard) in the Customizable Rollup UI (old references are being maintained and while no longer being queried, are still referenced). [See Issue 3945(https://github.com/SalesforceFoundation/Cumulus/issues/3945) for original reported issue and Pull Request].
Sample Stacktrace:
Stacktrace available at the time of saving the record - Class.npsp.CRLP_Operation_SVC.doRollupOperation: line 172, column 1 Class.npsp.CRLP_RollupAccount_SVC.processRollups: line 79, column 1 Class.npsp.CRLP_RollupProcessor_SVC.completeRollupForParent: line 303, column 1 Class.npsp.CRLP_RollupProcessor_SVC.startRollupProcess: line 115, column 1 Class.npsp.CRLP_RollupQueueable.runRollupsForIds: line 149, column 1 Class.npsp.CRLP_RollupQueueable.execute: line 73, column 1
--
Steps to Repeat

Create scratch org with previous version of NPSP (3.150)
Create field on Opportunity

Name = Amount This Year
Type = Formula (Currency)
Formula: IF(YEAR( TODAY()), Amount, 0)

Create field on Account

Name = Total Amount This Year
Type = Currency (16,2)

Create User Defined Rollup in NPSP Settings → Donations → User Defined Rollups

Opportunity Field = Amount This Year
Rollup Operation = SUM
Target Object = Account
Target Field = Total Amount This Year
Create Rollup

Enable Customizable Rollups
Inspect the CMT record for that User Defined Rollup. Confirm the following:
Now edit the Rollup using the NPSP Settings User Interface and switch to the following values:

Change Operation to Sum
Change Time Frame to Years Ago and Years Ago to This Year.
Make Sure the Date Field = Close Date
Change the Amount field to Amount
Hit Save.

Inspect the CMT record now and confirm that the values have changed, but that the Opp This Year field is still referenced in Field to Roll Up and  Amount Field.
Create a new Account (Name = Salesforce.org )
Create a new Opportunity

Name = Test Opp 1
Account = Salesforce.org (http://salesforce.org/)
Amount = 1000
Close Date = 1/1/2019
Stage = Closed Won

Confirm that the Total Amount This Year field on the Account = 1.

(Regression)

Nos upgrade to NPSP 3.151 using MetaDeploy: install.salesforce.org (http://install.salesforce.org/)
Create a new Opportunity

Name = Test Opp 2
Account = Salesforce.org (http://salesforce.org/)
Amount = 500
Close Date = 4/1/2019
Stage = Closed Won

Confirm the following error in NPSP Settings → System Tools →  Error Log
SObject row was retrieved via SOQL without querying the requested field: Opportunity.Amount_This_Year__c Rollups State:

--
My full Investigation will be linked to the Work Item.

**lurch: add

Tracking W-032542

Included in beta release 3.158 (Beta 5)

Included in production release 3.158


core: serialize simple POJO data into query string for GET and HEAD requests

Closes #175

Great! I just needed this! Thank you!


[Error] Unexpected token

Hello 👋.
I'm trying to build a CLI tool, and it works perfectly when I use it with Node.js on my computer.
But with pkg, it's another story. When I'm trying to compile the CLI, I'm getting a weird issue:
> Error! Unexpected token (36:74)
  /Users/travis/build/Trowler/Trowler/node_modules/prompts/lib/index.js

This is the Travis build, but I get the same error on my computer
If you need more information (such as debug output) on the build, you can check the Travis-Ci build

i have same bug!
 pkg -t latest-linux-x64 -o ./app.dev ./app.js

><EMAIL_ADDRESS>> Error! Unexpected token

error with:
 markup = renderToString(                     <Provider store={store}>                         <RouterContext {...renderProps} />                     </Provider>                 );
And fix with: https://stackoverflow.com/questions/44961697/react-express-unexpected-token-in-call-to-rendertostring
but still bug with: {...{},new_key:'new_value'} and fix with Object.assign
.........


Fix an example in documentation.

Hi!
I've noted that example in docs is not relevant, there is no such trait like use Robo\Task\Exec and seems use Robo\Task\Base\loadShortcuts is enough.

thnks


system error with oneset mask width slider >0

i've managed to let it work on Windows 10 but if i try to generate audio with the oneset mask slider higher than 0 i get this error:
soundfile.LibsndfileError: Error opening 'C:\Users\xxxx\AppData\Local\Temp\tmptlcxs7uq.wav': System error.
With slider at 0 everything works and is amazing, i tested all presets and i only have to move that slider to 0 if is not already.
any clue ? thanks

just as a note dont know if is related, i had to manually install madmom cloning from its git (else it goves error in win10), also i had to upgrade numpy to version 23 cause with 22  i was getting errors on startup.

hmm, this sounds like either a madmom or sndfile problem. what's the full call stack? is this libsndfile error happening inside madmom?

Here's the full stack printed from powershell, looks something related to libsnd
Traceback (most recent call last):
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\gradio\routes.py", line 442, in run_predict
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\gradio\blocks.py", line 1389, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\gradio\blocks.py", line 1094, in call_function
prediction = await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\anyio\to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\anyio_backends_asyncio.py", line 807, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\gradio\utils.py", line 703, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\vampnet\app.py", line 219, in vamp
return _vamp(data, return_mask=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\vampnet\app.py", line 136, in _vamp
mask, pmask.onset_mask(sig, z, interface, width=data[onset_mask_width])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\vampnet\vampnet\mask.py", line 201, in onset_mask
sig.write(f.name)
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\audiotools\core\audio_signal.py", line 602, in write
soundfile.write(str(audio_path), self.audio_data[0].numpy().T, self.sample_rate)
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\soundfile.py", line 343, in write
with SoundFile(file, 'w', samplerate, channels,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\soundfile.py", line 658, in init
self._file = self._open(file, mode_int, closefd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\soundfile.py", line 1216, in _open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening 'C:\Users\xxxxx\AppData\Local\Temp\tmpcfwf7po5.wav': System error.
INFO:httpx:HTTP Request: POST http://<IP_ADDRESS>:7860/api/predict "HTTP/1.1 500 Internal Server Error"
INFO:httpx:HTTP Request: POST http://<IP_ADDRESS>:7860/reset "HTTP/1.1 200 OK"

this could be it: https://stackoverflow.com/questions/23212435/permission-denied-to-write-to-my-temporary-file

Hi there,
i've just modified this line
https://github.com/hugofloresgarcia/vampnet/blob/a66dc9cb8aa8494f8d8ed53ac1e5bf99a6d6483e/vampnet/mask.py#L199
with
with tempfile.NamedTemporaryFile(suffix='.wav',delete=False) as f:
and it works!
it's probably going to grow temp folder overtime, not that clever solution but given my near 0 python knowledge i'm ok with this for now :)
Thanks for the hint!
I have another question, assuming i would like to create my own mask, i would like to make that when i click generate instead of creating the mask file it will load a mask.wav file from vampnet\assets folder, would you be so kind so point me where i should act in the code more or less ?


Staging: configure domain name

We'd like to use staging.accessibilityexchange.ca for the staging deploy. The domain is registered with Gandi.net. Let me know what needs to happen in terms of DNS configuration.

Resolved.


[ERROR] Error connecting to environment 1 Org Local Fabric: Error: Unable to connect to network

Hello,
When I tried to launch the 1 Org Local Fabric I had the following errors :
[ERROR] Error connecting to environment 1 Org Local Fabric: Error: Unable to connect to network, There are no channels with V1 capabilities enabled.
I check docker permissions there are ok.
I didn't succeed to find connection.ymal file in order to set "grpcs://" and "https://" as explained in this link :  https://stackoverflow.com/questions/55219497/error-initializing-the-network-channel-from-node-sdk-in-hyperledger-fabric
Thanks in advance for your help, don't hesitate if you need more details,
Laura
Here the logs details :
[04/11/2020 à 08:42:58] [INFO] fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["fabric-ca-client", "enroll", "-u", "http://admin:adminpw@localhost:17050", "--caname", "ca", "-M", "/network/wallets/Org1/admin"], "delta": "0:02:11.289437", "end": "2020-11-04 07:42:58.318780", "msg": "non-zero return code", "rc": 1, "start": "2020-11-04 07:40:47.029343", "stderr": "2020/11/04 07:40:47 [INFO] Created a default configuration file at /root/.fabric-ca-client/fabric-ca-client-config.yaml\n2020/11/04 07:40:47 [INFO] generating key: &{A:ecdsa S:256}\n2020/11/04 07:40:47 [INFO] encoded CSR\nError: POST failure of request: POST http://localhost:17050/enroll\n{"hosts":["laura-HP-Pro-x2-612-G1"],"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIIBTDCB8wIBADBdMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xp\nbmExFDASBgNVBAoTC0h5cGVybGVkZ2VyMQ8wDQYDVQQLEwZGYWJyaWMxDjAMBgNV\nBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHo4Dv1nu4Bk8KkJc\ndQj2y0HLIW+CKXfBV6rY9h3JVAz266Adob2X45xGO+ATpxIuEWKK3q9Huz81/ibM\nipKX96A0MDIGCSqGSIb3DQEJDjElMCMwIQYDVR0RBBowGIIWbGF1cmEtSFAtUHJv\nLXgyLTYxMi1HMTAKBggqhkjOPQQDAgNIADBFAiEAs1Ui5zh6czrnarDGe6sfacj6\ntjl39DlvjEGjpExvxR4CIGQN1dolU/mhNNEaYI26h7kPGwnPJqfVS0z/F5dYc3jw\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","CAName":"ca"}: Post http://localhost:17050/enroll: dial tcp <IP_ADDRESS>:17050: connect: connection timed out", "stderr_lines": ["2020/11/04 07:40:47 [INFO] Created a default configuration file at /root/.fabric-ca-client/fabric-ca-client-config.yaml", "2020/11/04 07:40:47 [INFO] generating key: &{A:ecdsa S:256}", "2020/11/04 07:40:47 [INFO] encoded CSR", "Error: POST failure of request: POST http://localhost:17050/enroll", "{"hosts":["laura-HP-Pro-x2-612-G1"],"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIIBTDCB8wIBADBdMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xp\nbmExFDASBgNVBAoTC0h5cGVybGVkZ2VyMQ8wDQYDVQQLEwZGYWJyaWMxDjAMBgNV\nBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHo4Dv1nu4Bk8KkJc\ndQj2y0HLIW+CKXfBV6rY9h3JVAz266Adob2X45xGO+ATpxIuEWKK3q9Huz81/ibM\nipKX96A0MDIGCSqGSIb3DQEJDjElMCMwIQYDVR0RBBowGIIWbGF1cmEtSFAtUHJv\nLXgyLTYxMi1HMTAKBggqhkjOPQQDAgNIADBFAiEAs1Ui5zh6czrnarDGe6sfacj6\ntjl39DlvjEGjpExvxR4CIGQN1dolU/mhNNEaYI26h7kPGwnPJqfVS0z/F5dYc3jw\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","CAName":"ca"}: Post http://localhost:17050/enroll: dial tcp <IP_ADDRESS>:17050: connect: connection timed out"], "stdout": "", "stdout_lines": []}
[04/11/2020 à 08:42:58] [INFO] PLAY RECAP *********************************************************************
[04/11/2020 à 08:42:58] [INFO] localhost                  : ok=21   changed=7    unreachable=0    failed=1    skipped=2    rescued=0    ignored=0
[04/11/2020 à 08:43:01] [ERROR] Failed to start 1 Org Local Fabric: Error: Failed to execute command "/bin/sh" with  arguments "generate.sh" return code 2
[04/11/2020 à 08:44:46] [ERROR] Error connecting to environment 1 Org Local Fabric: Error: Unable to connect to network, There are no channels with V1 capabilities enabled.
[04/11/2020 à 08:56:46] [INFO] connecting to fabric environment
[04/11/2020 à 08:56:46] [ERROR] Error connecting to environment 1 Org Local Fabric: Error: Unable to connect to network, There are no channels with V1 capabilities enabled.

Hello Laura,
These are issues related to IBM Blockchain Extension of VSCode and how "1 Org Local Fabric" network is stood up by the extension.  Please check https://github.com/IBM-Blockchain/blockchain-vscode-extension.


Test setup

This is a first step to use electron only when needed in the tests, see #2408.
The idea comes from @fewieden see this comment.
All tests using node-fetch and the translations test can run in server-only-mode instead using electron. So I make them work for this and moved all the remaining electron tests to a new category electron (from e2e) hoping we can shift more electron tests to e2e in the future.
I also changed logger.js again to be silent in the tests.
Tested all changes running mm in server-only mode and running with electron on a pi3.
Some dependencies were updated too.

Codecov Report

Merging #2664 (c3c5307) into develop (60e0377) will decrease coverage by 1.06%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           develop    #2664      +/-   ##
===========================================
- Coverage    71.01%   69.94%   -1.07%
===========================================
  Files           17       17
  Lines          890      895       +5
===========================================
- Hits           632      626       -6
- Misses         258      269      +11

Impacted Files
Coverage Δ

js/logger.js
50.00% <30.00%> (-35.72%)
:arrow_down:

js/app.js
69.74% <100.00%> (-0.60%)
:arrow_down:

js/server.js
85.10% <100.00%> (-6.01%)
:arrow_down:

js/defaults.js
85.71% <0.00%> (-14.29%)
:arrow_down:

Continue to review full report at Codecov.

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


Request for Weights of TinyLLaVA Model Built on Tinyllama with Siglip

Thank you for the excellent work! While checking the Model Performance table, I noticed that several listed models haven't been released yet. Could you please share the weights for the TinyLLaVA model, built using TinyLlama-1.1B-Chat-v1.0 and google/siglip-so400m-patch14-384? Thank you!

The weights have been published at 'https://huggingface.co/bczhou/TinyLLaVA-1.5B', but the new version of the code might not be compatible. You can use the code from the 'tinyllava_bench' branch.


Enhance README

We need to upgrade the README, as it is being used also for the homepage of the API/docs site. It would be good to have:

Some background on what balanced ternary is
Motivation behind wanting to use it
A UML diagram showing how everything inherits from AbstractDevice
Some Github tables, i.e tests passing in table format etc.
A link to the articles on Medium about the project

When adding to the README, lets make sure to add badges for codecoverage per the coverage reports created by #21, and for tests passing per the tests created with #20, #16, #8, and the eventual resolution of #3


1.0.0 on NPM?

According to package.json you've released version 1.0.0. However, the latest on NPM is still 0.10.2. Is 1.0.0 not official?

@jorrit this is the version we plan to release to npm but want some time to let any bugs surface in the new interface. If you're able to use it from git, that'd be great!

Thanks for your quick reply. I will try. My suggestion is to release a 1.0.0-beta or 1.0.0-rc to NPM, which is the more common way to let people know that you have finished a new release and are looking for some final tests.

@jorrit ah that's a good suggestion. Will do.

Done


Cannot obtain ip-address (Ubuntu 18.04)

I cannot get an ip-address when connecting to vtrust-flash (tried with 2 different androis devices)
Looked in other issues for similar problems and tried the stuff that solved those, but still no luck.
(did stop systemd-resolved service with: sudo systemctl stop systemd-resolved.service)
Logs:
Wifi log:
Backing up NetworkManager.cfg...
Restarting NetworkManager...
sudo: ifconfig: command not found
Backing up /etc/dnsmasq.conf...
Writing dnsmasq config file...
Creating new /etc/dnsmasq.conf...
Writing hostapd config file...
Configuring AP interface...
sudo: ifconfig: command not found
Applying iptables rules...
Starting DNSMASQ server...
dnsmasq: failed to create listening socket for port 53: Address already in use
Error: Device for nexthop is not up.
Starting AP on wlp3s0 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlp3s0 with hwaddr 24:0a:64:ae:46:67 and ssid "vtrust-flash"
wlp3s0: interface state UNINITIALIZED->ENABLED
wlp3s0: AP-ENABLED
wlp3s0: STA e8:b4:c8:15:88:aa IEEE 802.11: authenticated
wlp3s0: STA e8:b4:c8:15:88:aa IEEE 802.11: associated (aid 1)
wlp3s0: AP-STA-CONNECTED e8:b4:c8:15:88:aa
wlp3s0: STA e8:b4:c8:15:88:aa RADIUS: starting accounting session C7D20C1F0FC7573B
wlp3s0: STA e8:b4:c8:15:88:aa WPA: pairwise key handshake completed (RSN)
wlp3s0: AP-STA-DISCONNECTED e8:b4:c8:15:88:aa
wlp3s0: STA e8:b4:c8:15:88:aa IEEE 802.11: disassociated
wlp3s0: STA e8:b4:c8:15:88:aa IEEE 802.11: authenticated
wlp3s0: STA e8:b4:c8:15:88:aa IEEE 802.11: associated (aid 1)
wlp3s0: AP-STA-CONNECTED e8:b4:c8:15:88:aa
wlp3s0: STA e8:b4:c8:15:88:aa RADIUS: starting accounting session C7D20C1F0FC7573B
wlp3s0: STA e8:b4:c8:15:88:aa WPA: pairwise key handshake completed (RSN)
wlp3s0: AP-STA-DISCONNECTED e8:b4:c8:15:88:aa
wlp3s0: STA e8:b4:c8:15:88:aa IEEE 802.11: disassociated
MQTT log:
1553701616: mosquitto version 1.4.15 (build date Wed, 13 Feb 2019 00:27:01 +0000) starting
1553701616: Using default config.
1553701616: Opening ipv4 listen socket on port 1883.
1553701616: Error: Address already in use
Web log:
Listening on port 80

dnsmasq: failed to create listening socket for port 53: Address already in use

Find out what's occupying that port with sudo lsof -i :53

I think the same issue as described in #155.

sudo lsof -i :53 before running the script:
COMMAND   PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 588 systemd-resolve   12u  IPv4  19098      0t0  UDP localhost:domain
systemd-r 588 systemd-resolve   13u  IPv4  19099      0t0  TCP localhost:domain
I stopped the service with: sudo service systemd-resolved stop
sudo lasof -i :53 returned blank now
Ran the script with: sudo ./start_flash.sh
log wifi:
Backing up NetworkManager.cfg...
Restarting NetworkManager...
sudo: ifconfig: command not found
Backing up /etc/dnsmasq.conf...
Writing dnsmasq config file...
Creating new /etc/dnsmasq.conf...
Writing hostapd config file...
Configuring AP interface...
sudo: ifconfig: command not found
Applying iptables rules...
Starting DNSMASQ server...
dnsmasq: failed to create listening socket for port 53: Address already in use
Error: Device for nexthop is not up.
Starting AP on wlp3s0 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlp3s0 with hwaddr 24:0a:64:ae:46:67 and ssid "vtrust-flash"
wlp3s0: interface state UNINITIALIZED->ENABLED
wlp3s0: AP-ENABLED
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: authenticated
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: associated (aid 1)
wlp3s0: AP-STA-CONNECTED 6c:c7:ec:9b:24:01
wlp3s0: STA 6c:c7:ec:9b:24:01 RADIUS: starting accounting session 64C7C9A27596B4AA
wlp3s0: STA 6c:c7:ec:9b:24:01 WPA: pairwise key handshake completed (RSN)
wlp3s0: AP-STA-DISCONNECTED 6c:c7:ec:9b:24:01
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: disassociated
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
and result of sudo lsof -i :53 :
COMMAND    PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 3466 systemd-resolve   12u  IPv4  70377      0t0  UDP localhost:domain
systemd-r 3466 systemd-resolve   13u  IPv4  70378      0t0  TCP localhost:domain
Backing up NetworkManager.cfg...
Restarting NetworkManager...
sudo: ifconfig: command not found
...
This made me thinking.
Ubuntu 18.04 is using netplan instead off NetworkManager.
I'll try to change my config to NetworkManager ans see if this goes better.

I forced Ubuntu to use NetworkManager:
created etc/netplan/01-network-manager-all.yaml with
Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
Installed net-tools to get ifconfig back (Ubuntu is using IP)
But error regarding to port 53 is still there (even if I stop the service with: sudo service systemd-resolved stop before running the flash script)
Wifi log:
Backing up NetworkManager.cfg...
Restarting NetworkManager...
Backing up /etc/dnsmasq.conf...
Writing dnsmasq config file...
Creating new /etc/dnsmasq.conf...
Writing hostapd config file...
Configuring AP interface...
Applying iptables rules...
Starting DNSMASQ server...
dnsmasq: failed to create listening socket for port 53: Address already in use
Starting AP on wlp3s0 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlp3s0 with hwaddr 24:0a:64:ae:46:67 and ssid "vtrust-flash"
wlp3s0: interface state UNINITIALIZED->ENABLED
wlp3s0: AP-ENABLED
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: authenticated
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: associated (aid 1)
wlp3s0: AP-STA-CONNECTED 6c:c7:ec:9b:24:01
wlp3s0: STA 6c:c7:ec:9b:24:01 RADIUS: starting accounting session 4727817A8071E9CA
wlp3s0: STA 6c:c7:ec:9b:24:01 WPA: pairwise key handshake completed (RSN)
wlp3s0: AP-STA-DISCONNECTED 6c:c7:ec:9b:24:01
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: disassociated
wlp3s0: STA 6c:c7:ec:9b:24:01 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
I guess I'll have to find a Debian distribution to try.

Installed Debian on the machine.
I got the AP working after some problems with dependencies which were not installed (net-tools, hostapd, ...)
BUT
the switch is connecting to the AP, but nothing else happens.
(red light was blinking first, now light is always on)
Wifi log:
Backing up NetworkManager.cfg...
Restarting NetworkManager...
Backing up /etc/dnsmasq.conf...
Writing dnsmasq config file...
Creating new /etc/dnsmasq.conf...
Writing hostapd config file...
Configuring AP interface...
Applying iptables rules...
Starting DNSMASQ server...
Starting AP on wlp3s0 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlp3s0 with hwaddr 24:0a:64:xxxxxxx and ssid "vtrust-flash"
wlp3s0: interface state UNINITIALIZED->ENABLED
wlp3s0: AP-ENABLED
wlp3s0: STA 6c:xxxxx 1 IEEE 802.11: authenticated
wlp3s0: STA 6c:xxxxx IEEE 802.11: associated (aid 1)
wlp3s0: AP-STA-CONNECTED 6c:c7:ec:9b:24:01
wlp3s0: STA 6c:xxxxx RADIUS: starting accounting session 5C9CA4A1-00000000
wlp3s0: STA 6c:xxxxx WPA: pairwise key handshake completed (RSN)
wlp3s0: STA dc:4f:22:xxxxx IEEE 802.11: authenticated
wlp3s0: STA dc:4f:22:xxxxx IEEE 802.11: associated (aid 2)
wlp3s0: AP-STA-CONNECTED dc:4f:22:xxxxx
wlp3s0: STA dc:4f:22:xxxxx RADIUS: starting accounting session 5C9CA4A1-00000001
wlp3s0: STA dc:4f:22:xxxxx WPA: pairwise key handshake completed (RSN)
wlp3s0: STA dc:4f:22:xxxxx WPA: group key handshake completed (RSN)
wlp3s0: STA 6c:xxxxx WPA: group key handshake completed (RSN)
wlp3s0: AP-STA-DISCONNECTED 6c:xxxxx
wlp3s0: STA 6c:xxxxx IEEE 802.11: disassociated
wlp3s0: STA 6c:xxxxx IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
wlp3s0: STA dc:4f:22:xxxxx WPA: group key handshake completed (RSN)
wlp3s0: STA dc:4f:22:xxxxx WPA: group key handshake completed (RSN)
dc:4f:22:xxxxx= the tuya device
Weblog:
Listening on port 80
mqttlog:
1553769633: mosquitto version 1.4.10 (build date Wed, 13 Feb 2019 00:45:38 +0000) starting
1553769633: Using default config.
1553769633: Opening ipv4 listen socket on port 1883.
1553769633: Opening ipv6 listen socket on port 1883.
smartconfiglog:
Put Device in Learn Mode! Sending SmartConfig Packets now
Sending SSID                  vtrust-flash
Sending wifiPassword          flashmeifyoucan
SmartConfig in progress
..........

Firmware off the device: 1.0.4

Try putting the device in pairing mode before running ./start_flash.
I was banging my head against the wall with the timing of my device.

put device in pairing mode.
started flash script
device paired and started updating within 10 seconds.

Try putting the device in pairing mode before running ./start_flash.
I was banging my head against the wall with the timing of my device.
1. put device in pairing mode.

2. started flash script

3. device paired and started updating within 10 seconds.

Tried this, but still no updates. Devices pairs, but seems to do nothing after that.

Device pairing is a good sign. Can you capture your network activity with tcpdump or Wireshark?

Also, please post device details including model and firmware version.
Have you already added the device to the official app? If so, try running nc -u -l -k -p 6666 | strings on your regular network to verify that these devices are compatible; you should see some JSON.
If not, try nc -u -l -k -p 6667, if you see garbage (encrypted content) then unfortunately you may be affected by the recent patch to close our firmware options. If that's the case, you won't be able to flash OTA, but you can still flash the old fashion way, physically connecting to the MCU's serial port. We are still investigating the new patch, and any data you can gather would be tremendously helpful in developing a workaround.

I'm working on an alternative for generating a new AP. Please consider trying it out and report back if it resolves your issues git clone -b create-ap https://github.com/kueblc/tuya-convert.git

I'll try to do some more testing Wednesday or Thursday.

Hello everyone,
I was able to successfully use tuya-convert on a Ubuntu 18.04 live usb, but I had to make some changes.
config.txt -> WLAN value must be changed to wlp1s0 (or another, wlan0 is not the name used in Ubuntu 18.04 I assume, I checked it using iwconfig)
script/setup_ap.sh -> go to line 72 echo "Starting DNSMASQ server..." and after that add sudo service systemd-resolved stop (otherwise you get the error port 53 is already in use, as stated in #152 )
Then, setup_ap.sh uses ifconfig which is not installed by default on Ubuntu 18.04 so I had to install it using sudo apt-get install net-tools
Try now again and you should be able to start the script, get an IP assigned on the device you connect to the just created WiFi network, and then start the flash procedure successfully.

Hi @ema987
Would you be able to test if the create-ap branch works for you on Ubuntu 18.04?
git clone -b create-ap https://github.com/kueblc/tuya-convert.git

I tested the create-ap version on Debian.
Had to kill DNSMASQ before running the script.
The result stays the same. Switch gets connected, but rest in this state. no update...
TCPDUMP which is related to Tuya:
7:35:49.078140 ARP, Request who-has <IP_ADDRESS> tell <IP_ADDRESS>, length 46
07:35:49.078165 ARP, Request who-has <IP_ADDRESS> tell <IP_ADDRESS>, length 46
07:35:49.506905 IP <IP_ADDRESS>.38924 > <IP_ADDRESS>.10001: UDP, length 144
07:35:49.554053 ARP, Request who-has <IP_ADDRESS> tell gateway, length 46
07:35:50.552832 ARP, Request who-has <IP_ADDRESS> tell gateway, length 46
07:35:50.853067 IP6 ptr-fvmht5owv11wqz2yt1q.18120a2.ip6.access.telenet.be.56401 > gent01.dnsresv6.prd.telenet-ops.be.domain: 25950+ A? accscdn.m.taobao.com. (38)
07:35:50.853120 IP6 ptr-fvmht5owv11wqz2yt1q.18120a2.ip6.access.telenet.be.56401 > gent02.dnsresv6.prd.telenet-ops.be.domain: 25950+ A? accscdn.m.taobao.com. (38)
07:35:50.853215 IP Debian.1014 > gent.dnscache01.telenet-ops.be.domain: 25950+ A? accscdn.m.taobao.com. (38)
07:35:50.853265 IP Debian.1014 > gent.dnscache02.telenet-ops.be.domain: 25950+ A? accscdn.m.taobao.com. (38)
07:35:50.853407 IP6 ptr-fvmht5owv11wqz2yt1q.18120a2.ip6.access.telenet.be.56024 > gent01.dnsresv6.prd.telenet-ops.be.domain: 64191+ PTR? <IP_ADDRESS>.<IP_ADDRESS>.<IP_ADDRESS>.<IP_ADDRESS>.<IP_ADDRESS>.<IP_ADDRESS>.<IP_ADDRESS>.2.0.a.2.ip6.arpa.

Hi @ema987
Would you be able to test if the create-ap branch works for you on Ubuntu 18.04?
git clone -b create-ap https://github.com/kueblc/tuya-convert.git

Hello @kueblc, unfortunately I have no more devices which I can convert :(
I can try to see if my phone which I use to connect to the AP gets the IP assigned, if that is enough.

nc -u -l -k -p 6667
����e&���pOn�DD��DL��l�>b�p�G������mts��#׫ߧ�
�A;�э/���ي �̆>S$���^�1"�����X��[#i~�����[�@�x.����!���_�w��
�6ɻA�ο�}�v��j�4��f�ۃ��"��i���U^C
I guess this is not good news ...

You're right @jurgen272, unfortunately this means your device has been patched by Tuya and will no longer work with tuya-convert in its current form. We're investigating possible workarounds.
At this point if you still want to flash your device, you'll have to do it the "old fashion way" by physically opening the device and flashing over serial. If you do, please make a backup of the firmware as this would help us understand the changes.
@ema987 No problem, just checking to see if using create_ap helps people with AP issues.

@kueblc
I just tried out create_ap branch and it worked on three Lohas bulbs using Lubuntu 18.04  (basically Ubuntu)!
Here are a few minor things of note:

dnsmasq is still installed, but apt-get complains about it failing to start up since port 53 is in use.  I ignored this
start_flash.sh appears to try to launch screen, but in my case, never seemed to work for some reason, causing me to miss that something wasn't working.  I did verify screen is installed, but haven't tried to debug any further.
The problem is that my Ubuntu machine was still connected to a 5 GHz internet connection, and when create_ap tried to create the AP, it was trying to do so at 5 GHz.  I had assumed it would just try to do it at 2.4 GHz.  I simply had to tell it to disconnect from the 5 GHz network and everything started up after that. This got me to wondering - would the AP bridge the Tuya device to the internet if I'd had a wired connection?  If so, that could have been bad - perhaps worth a warning somewhere?
I assume it's normal to have a challenging time getting the bulbs to connect up to the convert software.  Even after doing three of them, with the third going on the first try, I'm not sure what the magic formula is to have it connect successfully.  I just kept re-trying and eventually it worked.

I have all the logs from the failed and successful attempts, as well as the backed-up firmware if there is a strong interest.
Thanks so much for this utility - much nicer than trying to get the cover off the bulbs and wiring to them!

@mrand great, thank you for trying it out!

I changed WLAN to wlp1s0 in config.txt.  I didn't even try it without that since iwconfig showed wlp1s0

Good. Perhaps install_prereq should run iwconfig and let the user know if they need to change config?

start_flash.sh appears to try to launch screen, but in my case, never seemed to work for some reason

The screen instances are terminals running in the background. You normally won't see these but you can manually connect to them if you want to see what's going on live, or just check the logs afterwards.

The problem is that my Ubuntu machine was still connected to a 5 GHz internet connection, and when create_ap tried to create the AP, it was trying to do so at 5 GHz

Great to note, thanks! Hadn't considered this, perhaps a note in the README would suffice.

This got me to wondering - would the AP bridge the Tuya device to the internet if I'd had a wired connection?  If so, that could have been bad

Yes that would be bad, no, this branch does not permit internet access from vtrust-flash. You can test this by connecting with another device and trying any site. You should be able to run this branch without any internet connection whatsoever.

I have all the logs from the failed and successful attempts, as well as the backed-up firmware if there is a strong interest.

Do you know if an update is available for the device? If so, the firmware backup would be helpful in our efforts to develop a workaround for the patch.
Thanks for the detailed feedback! Very helpful

@kueblc How would I know if there was an

Good. Perhaps install_prereq should run iwconfig and let the user know if they need to change config?

Yes.  Or at a bare minimum, a mention in the documentation.

The screen instances are terminals running in the background. You normally won't see these but you can manually connect to them if you want to see what's going on live, or just check the logs afterwards.

I somehow missed that.  When it didn't work, I just started going through the logs.

Do you know if an update is available for the device? If so, the firmware backup would be helpful in our efforts to develop a workaround for the patch.

Hmmm...  not sure how I'd know since I didn't look for updates before flashing them.  All of them say BootVersion: 4.  If you think the firmware files would help, let me know the best way to get them to you.
I did forget to mention that my ability to flash also didn't seem to be impacted by this crash:
Traceback (most recent call last):
  File "./fake-registration-server.py", line 129, in <module>
    main()
  File "./fake-registration-server.py", line 125, in main
    tornado.ioloop.IOLoop.current().start()
  File "/usr/local/lib/python3.6/dist-packages/tornado/platform/asyncio.py", line 148, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 427, in run_forever
    self._run_once()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 1404, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.6/selectors.py", line 445, in select
    fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt

Disable systemd-resolve, it normally takes up port 53

This has already been discussed and implemented

I could not flash my KLSP1 (Koogeek Smart Plug) using Ubuntu 18.04.3 LTS and noticed my phone got no IP. So found this issue, tried this suggestion, and now flashing works:

script/setup_ap.sh -> go to line 72 echo "Starting DNSMASQ server..." and after that add sudo service systemd-resolved stop (otherwise you get the error port 53 is already in use, as stated in #152 )

As pointed out by @ema987 in a comment above. Apparently running sudo systemctl stop systemd-resolved before ./start_flash.sh is not enough.


Output Filename not overridable

As seen in the code, the output filename is hard-wired to "test_" (+pagenumber).
This is somewhat inconvenient and should be configurable in the output options.
This feature is listed in the Todo's

Ups, will fix it ASAP.

I could write that feature but running your test results in an "Error: File is not a PDF]":
npm test

<EMAIL_ADDRESS>test /vagrant/node-pdf2img
./node_modules/.bin/mocha --reporter spec

Split and covert pdf into images
/[MY_PATH]/node-pdf2img/test/test.pdf
[Error: File is not a PDF]
Could you please fix that ?


Jeffrey Martinez Technical Assessment

Created pull request on the Technical Assessment

Configurations & How to run the Application
Before anything make sure to use these configurations: Ruby 3.1.4 and Node 20.5.0
To Migrate and seed the database, make sure to run these commands to populate data.
Initialize the postgresql database
rails db:create
Will create the tables with the properties
rails db:migrate
Will populate the tables with data
rails db:seed
Keep In MIND!
Integrated TailwindCSS to create a better user experience readjusting the UI Elements. The TailwindCSS Ruby gem automatically creates files such as application.tailwind.css and the bin/dev file.
To start the application, you MUST run this command instead of rails server
bin/dev
My Process
The TopNews Application uses devise which enhances and secures user authentication. To adjust any of the views from the user such as signing up and signing in, as well as forget password view. Run this command to generate the Devise initializer:
rails generate devise:install
Run this command to generate the devise views which would generate within the app/views/ .
rails generate devise:views
If you wanted to customize the Users controllers and readjust the code for the user authentication, you can run this command to generate the users controller:
rails generate devise:controllers users
Devise Helper Methods
Because Devise gem is heavy on user authentication, it provides built-in helper methods that we could use within the entire application such as  user_signed_in? and current_user
Fetching the Data
There are two ways we could have accomplished fetching the data. Using the HTTParty gem Or using net/http which accomplishes the same task on fetching the data, parsing it, thus allowing us to render it into the view for our users to see. (You would be able to see that code within the PagesController, Lines 12-18)
Adding a Story into Favorites
Models
To full this functionality, we could have taken a wide range of approaches such as creating another table or an algorithm. Let’s take a simple approach on setting up Models and relationships.
Let’s first adjust the User model (Line 6) to have a relationship to the Star Model by having a has_many relationship.
has_many :stars
Now create the Star Model (Line 2-6) and make sure that you have a belongs_to relationship as well as validations when we create a new star.
belongs_to :user
validates :story_id, presence: true
validates :story_title, presence: true
validates :story_url, presence: true

Routes
Whenever the user is clicking on add to favorites or the star icon, we are not retrieving data. We are creating a post request to create and add this to our favorites list. That being said we need to reconfigure our config/routes.rb to add a post and a get to view our starred_stories (Lines 4-5):
post ‘pages/toggle_star/:id’, to: ‘pages#toggle_star’, as ‘toggle_star’
get ‘pages/starred_stories’, to: ‘pages#starred_stories’, as: ‘starred_stories’

Pages Controller
Now that we have configured our routes and models, we will add our code to our toggle_star and starred_stories actions.
Let’s start with the toggle_star action.
In here we first want to retrieve the story that has been clicked on by the user, and verify if that story is within the current users’ stars. Using and if statement we can check if that star does exist. If it does, then we are trying to delete it, but if it is not within the stars, we want to create a new star with the appropriate properties such as the story_is, story_title, and the story_url. After we check if the story has been created or deleted, we want to make sure that the changes take effect immediately without having to refresh the page. We use the redirect_to helper to allow us to redirect us to our root_path which would refresh it for us (Lines 21-37).
Now let’s work on our starred_stories action
This action is very simple in where we just want to retrieve the stars from the current user. This instance variable will be used within our views to map over and render each story that has been selected as a favorite, which later then can be removed from there as well (Lines 39-41).
Views
Before we even get inside of the views and describe what is in, we must make sure that you have both files created within the views/pages/ directory, which are the home.html.erb (which is where you will render the buttons for each story), and the starred_stories.html.erb (which will allow the user to view all your favorite stories).
Home.html.erb
Creating an if statement would allow us to check if the story exists within the current_user’s stars. Depending on the logic, we either want to render a button that would add to favorites, or a button that would remove from favorites (Lines 29-33). Also, it is best practice to have a link to view all the favorite stories such as in the navbar or within the same page (Line 43-47).
Starred_stories.html.erb
The purpose of this view is to allow users to view their favorites on a different page. If all of these were within the same page, this could cause some clutter and may confuse the user which is the favorite story and which is not. We can check if there are any starred_stories, and if so, we would iterate through and display each story its proper details, just in case if the user would like to go back and view the article, as well the name of the individual who added it to their favorites.
My Suggestion
Installing the Slim Gem - it allows faster rendering by eliminating the closing tags from the erb.html. It is easier to troubleshoot design by making everything much more simple and “slim”. Here is an example:
views/partials/_navbar.html.erb

<%= link_to 'Top News', root_path, class: "no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125" %>

<%= link_to 'Home', root_path, class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125"%>

<% if user_signed_in? %>
<%= link_to 'Starred Stories', starred_stories_path, class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125" %>
<%= link_to 'Sign Out', destroy_user_session_path, class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125", method: :delete %>
<% else %>
<%= link_to 'Sign In', new_user_session_path, class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125" %>
<% end %>

Using the Slim Gem
.flex.justify-between.w-full.items-center.py-5.bg-blue-200
  .pl-8
    = link_to 'Top News', root_path, class: "no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125"
  .pr-8
    = link_to 'Home', root_path,  class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125"
    - if user_signed_in?
      = link_to 'Starred Stories', starred_stories_path,  class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125"
      = link_to 'Sign Out', destroy_user_session_path,  class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125",  method: :delete
    - else
      = link_to 'Sign In', new_user_session_path,  class: "p-5 no-underline hover:text-blue-700 text-lg transform transition duration-200 hover:scale-125"

Here is some resources you could use to configure and be able to use the slim gem:
Slim Template Github
Slim Gem Github Readme


1.4.0-alpha.0

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 72.051%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1606

Relevant Lines:
2087

💛  - Coveralls


slow to update

love git pitch and love the idea. UX frustration I have is when making changes, I make them rapidly and test, like any other coding. the issue is that it takes a few minutes at minimum to update to git-pitch, making the slide building process painful if you're doing anything with more complex markdown.  Is there a simple way to view or preview the content in real time?

Hi @tuxedogold really glad you are enjoying using GitPitch and thanks for your feedback.
So if you are experiencing a delay of a couple of minutes before seeing your changes reflected in your online presentation then I suspect you are developing your presentation in your master branch. If you developed your presentation in a feature branch (any branch other than master) then you would see your updates almost instantly. The reason for this is explained on by the GitPitch Caching Policy page in the Wiki.
Personally, I always develop in a feature branch and then simply merge the final result into master when I'm ready to publish/share etc.
You do however have one more option which is to develop locally. You can find details on how to do that using GitPitch on the Develop / Testing Locally page in the Wiki.
Hopefully one or both of these options will make things better or you as you develop your presentations.

Assuming issue caused by developing presentation content in master. Issue explained and resolved by  caching policy and feature-branch best practices. Closing this issue as resolved.


In addition to .yml allow to choose other file formats like .json

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Summary 💡
Currently, Toolpad pages are written down in a .yml file. While setting up a project, can I choose a different file format like JSON?
Examples 🌈
No response
Motivation 🔦
No response

which step let user to choose ?

What's the supported output formats? If possible, JSX output would be very useful as it's much easier to read and modify compared to yml or json.
I believe that it might be an argument to toolpad dev, not sure exposing it in the UI is a good idea.

What's the supported output formats? If possible, JSX output would be very useful as it's much easier to read and modify compared to yml or json. I believe that it might be an argument to toolpad dev, not sure exposing it in the UI is a good idea.

Thanks! We're tracking code export in https://github.com/mui/mui-toolpad/issues/316, you may choose to upvote that/express your opinion around in the comments there.

While adding a json mode wouldn't be super hard to do since all json is also valid yaml, I don't believe it makes sense to take on this added complexity without any concrete use cases.
Since all valid json is also valid yaml, if the goal is to be able to generate a Toolpad project as JSON files, then this is already possible.


TSCTestSupport: support more complex file systems

File systems are not guaranteed to be uniformly accessible through a
singular view.  Always use the current working directory to determine
the of the temporary directory as the path may not be viable for
conversion to a relative path.  This is mandatory for resolving
assumptions in the swift-package-manager test suite.

@swift-ci please test

I think that I might be able to get away without this.  Closing for now.


Struct field attribute to skip field

Is your feature request related to a problem? Please describe.
Currently all fields of a struct are parsed. This means that the field type needs to be declared in the same file. This is problematic when referencing types that are declared in other files. It is impossible to use structs as opaque pointers to wrap other (non-visible) structs.
Describe the solution you'd like
It would be great to have the following syntax:
use crate::some_mod::CustomType;

pub struct WorksInRustAndDart {
    a_string: String,         // Visible in Dart
    #[skip_field]
    hidden_field: CustomType, // Not visible in Dart
}

Describe alternatives you've considered
Other alternatives would involve unsafe pointer manipulation, let's not go there.
Additional context

Alternatively, this could be implemented by looking at the visibility of the fields (like it's done for the structs and the functions): Any field that is not marked as pub will be skipped.
This would be far easier to implement, but comes at the cost of being a breaking change.

I think this would be a nice feature to have. I'm wondering how this would work for structs in parameter positions? Should we enforce that the field's type implement Default or raise an error if a function receiving that struct as a parameter is detected?

Good point. My intention was to use the struct as an opaque pointer, but obviously that means it can only be created in Rust, not on the Dart side. Maybe this would require a completely different mechanism then.

Sounds interesting. Notice that in your example, if you pass WorksInRustAndDart from Rust to Dart (i.e. return value), Dart will never receive the data of hidden_field. I am not sure whether this is what you need.

looking at the visibility of the fields (like it's done for the structs and the functions): Any field that is not marked as pub will be skipped. This would be far easier to implement, but comes at the cost of being a breaking change.

No it is not a breaking change. Currently everything should be pub (or at least pub(crate), otherwise the generated Rust code will not compile, which is enforced by the compiler.
Feel free to make a PR! ;)

This won't be needed if #243 gets implemented.

#260 was implemented recently, so this might still have some relevance.


"we will remove the need to upload node_modules in a later step"

Within Step 1 - Activity 1 - 9. it states "we will remove the need to upload node_modules in a later step", however this is never addressed.

second-joke


librc-misc: remove leftover dead variable/assignment

I was looking at some of the warnings emitted when building with -Wall and this one was easy
enough. It's likely a leftover from the previous commit b2f5531194 ("librc-misc: convert snprintf calls to xasprintf".

As an aside, the only other warnings I see are all in librc.c which doesn't seem to have gotten any xasprintf love yet. Any hard rules to follow when converting, other than changing the stack array to a pointer and freeing when the buffer goes out of scope?

Sorry I missed this pr.
If you are still interested in helping convert to xasprintf, you are right about the rules for it. Just make sure to free() the buffer when it goes out of scope.


Update various dependencies

Change logs:

Django 2.0.3: https://docs.djangoproject.com/en/2.0/releases/2.0.3/
boto3 1.6.3: https://github.com/boto/boto3/blob/develop/.changes/
pytest 3.4.2: https://docs.pytest.org/en/latest/changelog.html
freezegun 0.3.10: https://github.com/spulec/freezegun/blob/master/CHANGELOG
flake8-import-order 0.17.1: https://github.com/PyCQA/flake8-import-order/blob/master/CHANGELOG.rst
raven 6.6.0: https://github.com/getsentry/raven-python/blob/master/CHANGELOG.md

Codecov Report

Merging #861 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #861   +/-   ##
========================================
  Coverage    96.64%   96.64%
========================================
  Files          159      159
  Lines         4707     4707
  Branches       455      455
========================================
  Hits          4549     4549
  Misses          99       99
  Partials        59       59

Continue to review full report at Codecov.

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


Extended Shortcut Bug Fixes

Commit e80f2dcaffa06908be449879ca892370d4f3f427 is already merged in #1306, but is showing up again for some reason.
Mnemonics should work after this commit:

If the current input begins with Keys.Alt as the only modifier, and no simple shortcut is handled and there is no extended shortcut that begins with the input as the first part, MainForm.ProcessMnemonic() will be called, and if it returns true, meaning the mnemonic is defined and worked, the input will not be registered as a first part of an extended shortcut sequence.

Character input with AltGr should work:

If the current input has Keys.Control | Keys.Alt with an optional Keys.Shift as the modifier, and no simple shortcut is handled and the virtual key code and the keyboard state corresponds to a non-null character, the input will not be treated as a first part of an extended shortcut sequence, regardless of whether there is a shortcut that begins with the specific keys as the first part, and the input will not be processed in MainForm.ProcessCmdKey().

Edit: closes #1302

I see, e80f2dc turned into 6e9da15.
Usage of MainForm.HandleShortcutManually() has changed a bit:

Return value is the same way as MainForm.ProcessCmdKey(), so that now passing its return value directly when using inside ProcessCmdKey() should behave more correctly.
The ref argument previousKeys should not be used after calling the method now, since its value gets altered in the method. Previously the value was not altered so it could be used after the method, but that caused the method behave slightly differently from MainForm.ProcessCmdKey(), as well as the variable passed as previousKeys had to be set to None manually. Dropping the previous key usage was necessary in order to make this method follow the changes MainForm.ProcessCmdKey() has gone through.

I have the feeling this should be thoroughly tested. Aside from the char conversion that I don't fully trust, I see for example ProcessMnemonic is manually called, but before reaching that point there are more things happening: IsInputKey, ProcessDialogKey, IsInputChar and several others that controls or plugins may be overriding (although not so common together with the Alt key).

Control.PreProcessMessage()

Msg is WM_KEYDOWN or WM_SYSKEYDOWN

Control.ProcessCmdKey() is first called. If it returns false ->
Control.IsInputKey() is called. This method checks if the pressed keys are regular input keys. If this returns false ->
Control.ProcessDialogKey() is called.

Form.ProcessDialogKey() only checks for Enter and ESC key presses, and skips if either Ctrl or Alt is pressed.
ContainerControl.ProcessDialogKey() only checks for Tab and arrow keys, and also skips if Ctrl or Alt is pressed.
Control.ProcessDialogKey() calls the method on its parent, if not null.
If false, Control.PreProcessMessage() exits, sending char messages.

Msg is WM_CHAR or WM_SYSCHAR

If Msg is WM_SYSCHAR or Control.IsInputChar() returns false ->
Control.ProcessDialogChar() is called. This calls Control.ProcessMnemonic().

In the case when I'm directly calling ProcessMnemonic(), ProcessDialogKey() is redundant since Alt is pressed, meaning IsInputKey() is redundant as well. The WM_SYSKEYDOWN message gets translated by TranslateMessage(), into WM_SYSCHAR, since Alt is pressed. This also skips the call to IsInputChar(), making it directly call ProcessDialogChar(), which calls ProcessMnemonic() if "(this.IsMdiChild && (int) charCode != 32)".
(I could also call ProcessDialogChar() instead of ProcessMnemonic().)
Since we're dealing with MainForm, we know that there are no overrides of ProcessDialogKey() and ProcessDialogChar(), and that there are no parent controls of MainForm, so they method being have to bubble up is not the case either.
In terms of the logic in MainForm.GetUndefinedShortcutType(), I've tested it in Swedish (Finland) keyboard.

As for ToUnicode() method:
Our objective is to let character inputs pass through WM_KEYDOWN.
When WM_KEYDOWN or WM_SYSKEYDOWN messages are unhandled (i.e. our ProcessCmdKey() should return false), the message is passed to TranslateMessage.
TranslateMessage() function either calls ToUnicode or ToAscii.

I don't know which... but it shouldn't matter I think, and if it does matter, ToUnicode() should be better because it seems to handle multibyte chars better (?) when I read the documentation. Correct me on this part.
When the method returns a non-zero value, WM_CHAR or WM_SYSCHAR is dispatched, letting the character to be input.

This means that the key inputs that returns non-zero values on ToUnicode() are character inputs and can be dispatched to WM_CHAR or WM_SYSCHAR, and we want these to be passed through WM_KEYDOWN (i.e. ProcessCmdKey()).
Therefore I let those with Ctrl+Alt modifiers, which return non-zero values, pass through ProcessCmdKey() and be treated the same as invalid shortcuts (which are keys with no modifiers except Shift, meaning a possible character input as well).

#1316 reverted changes

Just updated to FD 5.2.0 and I see the Advanced shortcuts features was pulled from that release. That's too bad, I was really expecting to try them out. How is it going, guys?


Full size posters

📝 Provide a description of the new feature
Would it be possible to display posters at full size?

➕ Additional Information
No response

You have to change https://github.com/afonsojramos/discrakt/blob/1d4312c5c9a73bb435912bfa1256a7db042f8aff/src/trakt.rs#L137 to "https://image.tmdb.org/t/p/w500{}",
and also delete these lines, as the image will still be cropped to 1:1 ratio when using small_image:
https://github.com/afonsojramos/discrakt/blob/1d4312c5c9a73bb435912bfa1256a7db042f8aff/src/discord.rs#L130-L131

Considering that they are cropped to a 1:1 ratio I don't believe we should change this for everyone.


Debugging UI gets crowded

VSCode Version: Insiders
OS Version: macOS

Steps to Reproduce:

Start a debugging session
Add a bunch of breakpoints

A couple ideas on how to handle this better.

There seems to be a lot of wasted space for the variables section. We could move watchers up as breakpoints moves up.
I wonder how often watchers are used compared to breakpoints. My gut says breakpoints are much more. Maybe we switch those two UI elements.

you can resize thme manually

@waderyan thanks for feedback - let me try to describe the reasoning behind the currenty layout

breakpoints is a special view which always has the size of the number of breakpoints up to 10. The reasons for this is that breakpoints are not expandle and are always a flat list
Other views are adaptive and have a default size based on how important they are (variables most, then call stack then watch experssions). Each of this views can be resized and the size is persisted across vscode sessions for better customization

Now onto your comments

Vasted space in variables -> you might feel like that but I have hear users complaining the opposite and maybe for more complex apps it makes more sense
Your outline is not the default you have reduced the initial size of the call stack
Watchers are used less but due to the implementation that a breakpoint view is expanding as it is added it needs to be at the end. Also breaking the muscle memory of users is not recommended


Add pre-commit for the repo

Now the CI/Nightly always checks for the pre-commit.
For local commit, it is recommended to do the following steps to install a hook. So that every time one do commit, it will trigger the hook to format the code.
pip install pre-commit
pre-commit install

The CI has failures, it is expected. The tests will be passed when the upstream pr is merged.


HDDS-8168. Make deadlines inside MoveManager for move commands configurable

What changes were proposed in this pull request?
MoveManager currently has a hardcoded deadline of 60 minutes. We should make this configurable, and that configuration should be present in ContainerBalancerConfiguration.
Move is replication + deletion. Replication involves copying between two datanodes so it's generally more expensive than deletion. So we probably need to have an additional configuration for deciding how much time out of the total move deadline is allowed for replication. The rest will be allowed for deletion. Move deadline's configuration is "hdds.container.balancer.move.timeout".
Changes introduced:

Added a new configuration "hdds.container.balancer.move.replication.timeout". Made MoveManager use this configuration.
Added validations for this configuration in ContainerBalancer.
Added this configuration to ContainerBalancerConfigurationProto.
Other small changes.

What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8168
How was this patch tested?
Added unit tests

DU is run in a DN every 60 minutes by default (hdds.datanode.du.refresh.period). That means SCM gets updated information on a DN's free space every 60 minutes. This information is used by Container Balancer to compare DNs based on their space utilisation (free space divided by total space). Container Balancer is stateless between iterations - all the space utilisation information is recalculated every iteration. So, it's good to have a default Container Balancer iteration interval that's greater than the DU interval. It prevents balancer from making moves with the same stale information that was used in the previous iteration.
If we increase moveTimeout to 90 minutes, then at the latest we expect moves to complete close to the 90th minute. In the worst case, DU will run before moves have completed. This means if our Container Balancer iteration interval is close to (and greater than) 90 minutes, it'll start a new iteration that does not account for moves made by the previous iteration because DU hasn't calculated the latest space yet. That's why I think the iteration interval should be greater than 90 + 60 minutes. 160 minutes seems like a good default to me. If anyone wants to make it more aggressive, they can enable trigger.du.before.move.enable and reduce the iteration interval.

@SaketaChalamchala can you please take a look?

Considering improvements made in HDDS-6577, it's probably best to have the iteration interval default to 70 minutes, same as before. We can revisit these values later if needed.


How to preview live code in the sublime text

I recently saw a video on Youtube and the youtuber  had the live preview in the sublime text.He typed a code and it appeared in the preview right below the code.Any help???

Same problem, on Linux, alt+m has no effect and Command Palette doesn't display the Toggle menu


Weapon Sway

I think weapon sway will go nicely with the rest of the features.

There's no FPS-specific stuff in the project yet, but if I work on it, then this will definitely be something I add.

I decided to add it anyway - check the latest commit!

Thank you! :D


fix nil pointer dereference in scheduler.go

I found there may exist a bug when I am doing project3b. Before discussing this problem, we should know that:
When a region [a, c) was splitted into two regions [a, b) and [b, c), both the new region will send RegionHeartbeat to scheduler to update the region info. When scheduler handle the heartbeat, it will remove the old region [a, c) first, and add the new region. Thus it will cause a duration that there only exist a region, either [a, b) or [b, c). Knowing this, let's discuss further.
Consider there are some regions like:
["", b), [c, d) ..... [x, z) ....

Then region ["", b) and [x, z) were splitted into ["", a) [a, b) and [x, y) [y, z). After a while, new region [a, b) and [y, z) send hearBeat to scheduler, scheduler remove old region ["", b) and [x, z), and add new region [a, b) and [y, z). At this moment, scheduler_task receives a SchedulerAskSplitTask(actually, it was a old task, because former split task has been applied), MockSchedulerClient.AskSplit will be called, and continue call GetRegionByID which will return nil, thus nil pointer was dereferenced in sentense if util.IsEpochStale(region.RegionEpoch, curRegion.RegionEpoch).
This problem was caused due to the heartbeat message of the second new region reaches to scheduler faster than the first new region.

 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.

@Connor1996


Secret is not created after deploying clusterissuer in step 2

[Enter feedback here]
After completing step 2. ClusterIssuer Resource, secret is not created.
I used following yaml, as there is indentation issue in yaml provided in the document
#!/bin/bash
kubectl apply -f - <<EOF
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
    name: letsencrypt-staging
    spec:
        acme:
        # You must replace this email address with your own.
        # Let's Encrypt will use this to contact you about expiring
        # certificates, and issues related to your account.
            email<EMAIL_ADDRESS>        # ACME server URL for Let’s Encrypt’s staging environment.
        # The staging environment will not issue trusted certificates but is
        # used to ensure that the verification process is working properly
        # before moving to production
            server: https://acme-staging-v02.api.letsencrypt.org/directory
            privateKeySecretRef:
        # Secret resource used to store the account's private key.
                name: example-issuer-account-key
        # Enable the HTTP-01 challenge provider
        # you prove ownership of a domain by ensuring that a particular
        # file is present at the domain
            http01: {}
EOF

Cluster issuer is created.
insan@azcli:~/aks-practice/letsencrypt$ kubectl get clusterissuer
NAME                  AGE
letsencrypt-staging   19m

But there is no secret which has name "example-issuer-account-key"  in cert-manager
insan@azcli:~/aks-practice/letsencrypt$ kubectl get secret --namespace cert-manager
NAME                                  TYPE                                  DATA   AGE
cert-manager-cainjector-token-d2rn6   kubernetes.io/service-account-token   3      20m
cert-manager-token-6mmvm              kubernetes.io/service-account-token   3      20m
cert-manager-webhook-ca               Opaque                                3      20m
cert-manager-webhook-token-dpsxd      kubernetes.io/service-account-token   3      20m
default-token-gwxsk                   kubernetes.io/service-account-token   3      20m
sh.helm.release.v1.cert-manager.v1    helm.sh/release.v1                    1      20m

I think cert-manager version in this document is very old and it might be issue of deprecated version.
Could you please check and update the document with functioning example?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f53838fc-1654-fc18-7e45-7d556193f77e
Version Independent ID: 4f92bd5b-4b91-b03d-4f1d-8c31d45af0ef
Content: Use LetsEncrypt.org certificates with Application Gateway
Content Source: articles/application-gateway/ingress-controller-letsencrypt-certificate-application-gateway.md
Service: application-gateway
GitHub Login: @Caya
Microsoft Alias: caya

@insankim, Thanks for reaching out. We will investigate and update this thread.

I am closing issues that have not been updated in over a year. I will cross reference and research them individually. I am recording each issue and compiling a list of articles to review. If you feel there is an urgent need to address something related to this GitHub issue, please open a new issue and I will reply in the new thread. Please also reference this GitHub issue number in the new issue. Thanks. #please-close


LspLog: one fix, one improvement

When the file does not exist the message is added to a buffer to eventually be written to the file. When this happens, the message is timestamped twice.

When println receives an exception, it would be great if the stack trace was printed rather than only the getMessage.

This commit address these two things

Related to the investigation of: https://github.com/awslabs/smithy-language-server/issues/68

feel free to squash


Example of encapsulating Device/Factory in an agnostic way.

I may be completely off-base with what this project is attempting to accomplish, but I'm having an issue figuring out how to create an application that interacts with the underlying graphics provider agnostically.
The first issue is that, in every example, the entirety of the application takes place either in a single function or in a single critical path. In most systems/engines, the graphics device will be encapsulated in a struct say a RenderManager so that it can be referenced at various points during the application's lifetime to create the necessary resources. Since neither the Factory nor the Device trait meet the requirements necessary to be trait objects, this seems to be impossible in gfx-rs currently. Therefore, I'm required to implement several concrete implementations of my RenderManager for each backend type rather than simply allowing me to type-parameterize my struct.
Is there an example available that shows the encapsulation of the Device/Factory capabilities in a platform agnostic way?

Could be solved, technically, by just implementing Factory, Device and CommandBuffer.

@kvark, hey thanks for the reply both here and in the Gitter earlier. Would you mind elaborating on what you mean in this context? My understanding was that the Factory trait was implemented by each specific backend (gfx_device_gl::Factory, gfx_device_vulkan::Factory, etc). In order to create a struct that stores the factory, I must explicitly state the type, which seems to indicate that any struct that needs to store the factory would need 1 implementation for each back end.

@dkushner what I meant is a generic implementation that just route the calls, i.e.:
struct Graphics<D, F, C> {
   device: D,
   factory: F,
   encoder: Encoder<D::Resources, C>,
}
impl<...> Device for Graphics {...}
impl<...> Factory<> for Graphics {...}
// something for Encoder

Thanks @kvark, will give this implementation a try and report back my results. Thanks for the simply stunning work on this library and your continued efforts to improve it!

@dkushner now you can basically add B: gfx_hal::Backend type parameter to all your render-related structures and then pick RenderManager<vulkan::Backend> or RenderManager<dx12::Backend> or any other available backend at start of you program.

@omni-viral: Excellent news! I'll see about restructuring my project to test this out. Looking at the latest docs for 0.16.1 I don't see those struct/traits mentioned. Understanding, of course, that these new HAL/LL features are subject to constant change, what would be the best way to start using them? Is there a current release out there with these changes or should I just be using master?

@dkushner no, the hal wasn't realised yet, so you probably need to use git dependency. If I understand the situation, you have the same possibilities in 0.16 (it's pretty easy to abstract around different backends). But 0.16 doesn't have modern GAPI support.

Closing due to inactivity and the fact pre-ll got deprecated


fix:依赖版本错误

Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires longlang/phpkafka ^1.2.3, found longlang/phpkafka[dev-master, v1.0.0, ..., v1.2.2] but it does not match the constraint.

https://packagist.org/packages/longlang/phpkafka

https://packagist.org/packages/longlang/phpkafka

git这边还是1.2.2，尴尬了

https://packagist.org/packages/longlang/phpkafka

git这边还是1.2.2，尴尬了

release 和 tag 都算

好的。composer先用的阿里云的源报错，改成(https://packagist.org)之后就好了，或许是阿里云的源没同步好


fix: Should rotate agent log

Checklist

[x] npm test passes
[x] tests and/or benchmarks are included
[x] documentation is changed or added
[x] commit message follows commit guidelines

Affected core subsystem(s)

DayRotator
Description of change

because schedule is running under app worker,
agent log is the only differece between app worker and agent worker.

app worker -> egg-web.log
agent worker -> egg-agent.log

+1

2.2.2