Calculate assignment without abstains (if one candidate) (issue #2182)

Follow-up for issue #2182 and PR #2192:

Added a new variable to each assignment poll: without_abstain.
if this variable is set true and there is only one candidate in the assignment options, the percentages will be returned with the base (votesvalid or votescast) reduced by amount of abstains. votes.yes + votes.no .
The option may only be toggled if there is only one candidate (button on polll result page).
calculation is effective on projector and result view, but not (yet) on pdf creation (this is still created in python)

To discuss:
- Is base = Votescast - abstains a valid calculation?

How to handle polls with two candidates and two posts?
How to handle poll #n when there is only one candidate left, but assignment.options has had more?

To do:

Avoid reloading of whole poll, reload numbers and percentages instead.

I would like to have a non database solution, means the percent base should be calculated on the fly.

I reinserted it because @emanuelschuetze wanted "if the option is set, it should be set for all clients." Such a distribution of requirements doesn't work without database. I can do either, but as it seems, some discussion is needed.

I do not understand what "for all clients" mean. If we use a config option (as in motion) then all clients can calculate the percent base according to the same algorithm.

What was meant:
Once this option is set (by e.g. admin), in every calculation it should show with the new percent base. So that every display and every pdf printout shows the same value.

Another rework (assignment and motions) after discussion.
server side:

poll option config values changed to "YES_NO, "YES_NO_ABSTAIN", "DISABLED" (removed "all votes (including invalid)")
poll.yesno (bool) and poll.yesnoabstain (bool) were merged to poll.pollmethod (string) to avoid situations where both are true.
assignment pdf percent values are disabled for now. We will move to js pdf creation soon.

client side:

percentage calculations are now based on sums of 'yes+no', 'yes+no+abstains' or 'sum of yes of all candidates', depending on the setting. If one of them is negative, percentages should not be calculated.
(in)valid votes are renamed to "(in)valid ballot" and don't show "100%" anymore. To discuss whether this is the correct name. We want to distinguish the number of papers from the votes (as the number is not always the sum of the votes)

For the percentages, we are now independent from the (optional) entries for votescast, votesvalid, votesinvalid.
@emanuelschuetze ready for testing

rebased on master, ready for testing @emanuelschuetze

Other TODOs after discussion:

[ ] rename the current config so that it is clear that the count is per candidate
[ ] reintroduce the option to base the 100% on votesvalid
[ ] reintroduce a calculation that shows how votesvalid compare to votescast.
[ ] find a short, catchy wording for  "if several candidates && option != (100%= all votesvalid), then 100% will be sum of Yes of all candidates"

all TODOs are done. Some (especially formulations) might depend on taste. @emanuelschuetze

Retested. Some minor remarks:

Bug: valid/invalid/votescast are still empty in pdf
rename "total ballots" -> "casted ballots"
remove percentages for invalid/total ballots if config option "valid votes" is selected.
remove the config option "all ballots" (because not practically relevant that invalid ballots contains to 100% basis)
Bug if you use Yes-election (e.g. 3 candidates for 2 posts) + config "YNA": 100% basis has to be the sum of all votes of all candidates! Curently each candidate gets 100%.
Wording improvements for config options, use the follwing strings:

Yes/No/Abstain per candidate
Yes/No per candidate
All valid ballots
Disabled (no percents)

Update help text, suggestion:
"For Yes/No/Abstain and Yes/No the 100% basis depends on the election method: If 'one option per candidate' is selected, the sum of all votes of all candidates is 100%. Otherwise the sum of all votes per candidate is 100%."

Retested:

Bug: valid/invalid/votescast are still empty in pdf

Now, there are no results in PDF.

rename "total ballots" -> "casted ballots"

in assignment poll form is still "total ballots".

remove percentages for invalid/total ballots if config option "valid votes" is selected.

ok.

remove the config option "all ballots" (because not practically relevant that invalid ballots contains to 100% basis)

as discussed, we keep this option because some organisations need it.

Bug if you use Yes-election (e.g. 3 candidates for 2 posts) + config "YNA": 100% basis has to be
the sum of all votes of all candidates! Curently each candidate gets 100%.

Ok now.

Wording improvements for config options, use the follwing strings: [..]

Ok.

Update help text, suggestion:

Ok. In manual we will explain it more verbose...
Summary: 2 issues are still open! Rest looks good.

Now, there are no results in PDF.

My fault: I forgot to publish the results. Now all votes are listed in PDF result table (without percents which are readded if pdf is converted to pdfmake in the next weeks)

@matakuka Still open: Rename "total ballots" to "casted ballots".
@normanjaeckel Ready for review.

@matakuka One last thing:

in motion detail view: remove percent for invalid votes if option 'all valid votes' is selected.

Retested:
All done now. Thanks.
@normanjaeckel Ready for your review.

(just a rebase on top of current master)

Please allow maintainer edit (checkbox in the right sidebar).

@matakuka As discussed: wait until #2379 is merged and then rebase and use the same (generic) logic as current list of speaker slide (implemented in multiprojector pr)

Ready for review and merge.

Please add CHANGELOG entry and rebase.

@normanjaeckel ping, ready for merge

Hey my commits/changes were lost. I do not want to do all the work again and again.

So, the work is now done again. Please read carefully messages and commit list before you push force on the branch.

I'm sorry. I'm not used to having others directly committing into my branch (and thus pulling my own branch before a rebase).

No problem. This is a new GitHub feature. :-)


⚠ TADA Wallet Web API has degraded performance

In 56842cf, TADA Wallet Web API ($BRIDGE_API_WALLET_WEB_URL) experienced degraded performance:

HTTP code: 502
Response time: 5066 ms

Resolved: TADA Wallet Web API performance has improved in 1f41ab6.


A few days ago messer stopped working

I am running messer in a facebook chat group with 3 people. It worked fine until a few days ago. Then I started to get this error message when people send a message to the chat group:
> Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
    at c:\Users\mika\AppData\Roaming\npm\node_modules\facebook-chat-api\utils.js:843:42
    at tryCatcher (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\util.js:26:23)
    at Function.Promise.attempt.Promise.try (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\method.js:31:24)
    at c:\Users\mika\AppData\Roaming\npm\node_modules\facebook-chat-api\utils.js:813:24
    at tryCatcher (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\util.js:26:23)
    at Promise._settlePromiseFromHandler (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\promise.js:510:31)
    at Promise._settlePromiseAt (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\promise.js:584:18)
    at Promise._settlePromises (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\promise.js:700:14)
    at Async._drainQueue (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\async.js:123:16)
    at Async._drainQueues (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (c:\Users\mika\AppData\Roaming\npm\node_modules\bluebird\js\main\async.js:15:14)
    at runCallback (timers.js:756:18)
    at tryOnImmediate (timers.js:717:5)
    at processImmediate [as _immediateCallback] (timers.js:697:5)

I tried to upgrade node.js from 9.3.0 to 9.4.0 and reinstalled messer and deleted the appstate.json file. The facebook user which logs into messer works fine from the browser.

hey @Canardian , are you still experiencing this?


[Request] Bypass timer [Uploaded | Ul]

Example::
http://uploaded.net/file/arkji8jt
http://ul.to/file/arkji8jt
THX!

Up,
Really needed, pls.
THX!)


Artifacts on geometric avatar

Gitea version (or commit ref):
Git version: 1.13.0+dev-484-g1d47a2575 (try.gitea.io)
Can you reproduce the bug at https://try.gitea.io:

[x] Yes: https://try.gitea.io/knut

Description
Hello everyone. I want to bring your attention to a rather minor, but optically very unpleasing bug:
When creating an account, I noticed that the avatar had bad-looking artifacts after uploading (see attached screenshots). I suspect that this is due to a scaling algorithm that performs poorly on geometric shapes like circles.
I’ve attached the original image and a screenshot for reference.
Thank you!
Screenshots
Screenshot from codeberg-test (another instance where this also occurs):

Original avatar:

looks like it's present in v1.12.x too

this issue is has to do how we resize things ...
https://github.com/go-gitea/gitea/blob/43c303d35c74562bf2eaf221d46f7ef1539179a6/modules/avatar/avatar.go#L92
Wikipedia has interesting infos: https://en.wikipedia.org/wiki/Image_scaling
I thin we just have to switch from NearestNeighbor to Lanczos3/Bilinear/Bicubic...
-> https://github.com/nfnt/resize
or switch to a better resize lib

source: https://codeberg.org/Codeberg/Community/issues/243


Update loadgen and rng seeds

use loadgen v3.0 and add corresponding changes. not verified.

@freedomtan and @mohitmundhragithub to check if it goes as expected for submission mode. If yes, then we can merge this. If no, let's add rng seeds changes first. And branch out.

it seems to be working as expected.

it seems to be working as expected.

Thanks. it works as expected on my device too. I'll merge it.


next.config.js with multiple plugins

Hi,
I'm trying to use typescript & css plugin like this:
const withTypescript = require('@zeit/next-typescript');
const withCss = require('@zeit/next-css');
module.exports = withTypescript();
module.exports = withCss();

but it's not working (I guess module.exports assignments are wrong/overwriting).
Thanks in advance

Line 3 is replaced by line 4.
Look at the source code for these plugins to see what they return for a better understanding.
`module.exports = withTypescript(withCss(/optional parameters/));

Thanks!
(Now I'm facing the options['importLoaders'] should NOT have additional properties error, but that's not related here I think...)

Np! I think https://github.com/zeit/next-plugins/issues would be a better place to report any issues.


Service worker

Would adding a service worker js be useful to make the app offline capable? :thinking:
Pros :+1:

Makes app work offline :sunglasses:

Cons :-1:

Adds little more complexity to code :hammer_and_wrench:  :computer:
Not supported by all browsers :frowning_face:
May not notice much difference if developing on local host

If you think it's worth adding, happy to make PR :smile:

Hey @fozy81 :) in general, heck yeah, absolutely!
Making Hoodie Client Service Worker compatible is a bit of a challenge, something I want to tackle for the next big milestone.
I’d say maybe to not add it to this repository directly, but if you want to create a fork and we can link to that fork, that would work? That way we can keep this very simple but at the same time show people how to make the app work offline with Service Worker?

@gr2m I've add the basic service worker here: https://github.com/fozy81/hoodie-app-tracker
with some of your code copied from hoodie-camp-tutorial :+1: .
So should give people a favour of offline web app.
Couple issues:

Some console log errors: No response when fetching hoodie/store/api/user files
I've not written any tests for this
One existing test is failing...Subtest: App Tracker...Callback was already called.

Testing web apps is very hard, I created the selsa package to implement some best practises, but at the end of the day, it’s using Selenium and Selenium tends to break regularly, unfortunately. I don’t blame them, they are taking on an incredible hard task :)
But maybe for our case, we should drop it and use something like https://github.com/GoogleChrome/puppeteer. I’m also eager to try https://www.cypress.io :)

I'll take a look...may take a little while to dive into the details.

Update: I've tried out cypress - mainly because it has brilliant docs. I've added a couple of tests, mainly copied from an example test file for todoMVC and from the existing tests. Should be straightforward to convert the existing tests to cypress. So will work my way through them and see how it goes. A good learning experience if nothing else. Testing in JS is new to me, so starting to glimpse the magic involved in writing testing libraries for browsers/web apps...

awesome :) I'm open to migrate to Cypress

Hi, I've written some tests using Cypress (see summary below), added a manifest.json and got service worker running. In general works offline okay. Could add on/offline indicator. Also trims white space from input items, and converts createdAt date/time to Date object before sorting, allowing sorting to be consistent for testing.
One test failing - can't sign-out(?). Anything other tests needed? Or any other suggestions?

Hoodie Tracker About Page
About page
✓ should allow me to visit About page
Hoodie Tracker Account Page
Account page
✓ should allow me visit Account page
✓ should allow me to create an account
✓ should sign me in when account is created
✓ should allow me to delete account
...Error: Database "user/5fsfadx" does not exist...
x) should allow me to sign out
Hoodie Tracker Home Page
Visit home page
✓ should load index.html successfully
When page is initially opened
✓ should focus on the item input field
No Items
✓ should hide item table
Add items
✓ should allow me to add items
✓ should clear text input field when an item is added
✓ should trim text input
✓ should show remove all button
Table of items
✓ should allow me to edit an item
✓ should allow me to delete an item

happy to help look into the sign out error. I’ll have some time on Friday for Open Source work, looking forward to see how the Cypress setup works :)

Thanks, that's great. No pressure - whenever you find time. Cypress seems very nice.

Hi @gr2m
Here's the forked tracker app with service worker hosted on now/zeit:
https://hoodie-app-tracker.now.sh/
Also passing Chrome PWA tests :fireworks: :+1:

forked code is here:
https://github.com/fozy81/hoodie-app-tracker

I’m so sorry I didn’t get back to you earlier, I’m a bit overwhelmed with my inboxes :( This looks great though! Some people were asking about Hoodie + ServiceWorker at Offline Camp, too, I’ll point them to your fork!
I’m checking out your fork now, we should definitely mention it in the hoodie-app-tracker README – or even make it the default app altogether 😁

wow, this is really great work Tim! Also great work on adding Cypress! I wonder if we can run the tests somehow automatically in npm test? Do you know if they can be run headless so we can run the tests on Travis CI?
If you like, we can start a pull request from you fork :) I would suggest we document the addition of Service Worker in the README and also the about page. (The about page in the app needs some updates anyway :) )
What do you think?

No problem, thanks for getting back. I appreciate maintaining open source projects takes a lot of time.
I removed the package.json script to run 'npm test' but can put that back in to run cypress headlessly. Shouldn't be a problem for Travis CI. Just got one failing test currently. I think it is to do with running locally (can't sign-out).
Should the old tests be removed? Are they still useful - anything missing from Cypress tests? Cypress is aimed at integration testing not so much at unit testing/code coverage.
I'll create a pull request, and update the readme with mention of the service worker, app manifest (only really works for Chrome atm) and how to run Cypress tests (both headless and with browser).

Should the old tests be removed?

Yes, please. I’m so excited and hopeful for a future without Selenium :)

Cypress is aimed at integration testing not so much at unit testing/code coverage.

For end-user applications I don’t see much point in unit tests or code coverage, doing the end-to-end tests is perfect. We just want to check if all user-facing features work.
When I have the feeling that I need unit tests in an app, it’s usually a sign that there is something worth extracting into its own library, which then can have full test coverage.

only really works for Chrome atm

Oh I didn’t test it with other browsers yet. I assume that if ServiceWorkers is not supported in the browser, it will just work as before?

Great, thanks for the feedback. I'll remove the old tests. Your thoughts on unit testing mirrored what i was thinking but just wanted to check.
Service worker - yep, if service worker not supported then will work as before.

only really works on Chrome atm

The extra features provided by the manifest.json i.e. adding an icon to android home screen/apps and having a splash page when app is loading. But some manifest features do work by default on Firefox too. I think the manifest is worth including because it makes the app really nice on android phones and maybe iOS someday...
I'll get to work polishing this up! 👍

Features added in pull request https://github.com/hoodiehq/hoodie-app-tracker/pull/161


Webpack!

Introducing faster activation times and smaller extension downloads!
Activation time with pipeline configuration enabled:

Before: 9736ms (not a typo, not sure what happened here), 1492ms, 1366ms
After: 215ms, 252ms, 292ms

Extension size:

Before: 9.86MB
After: 2.04MB

So we have very snappy activation time now and a 75% smaller download size :).
I need to do further manual testing for configure pipeline on ADO repositories to make sure nothing regressed due to the amount of package upgrades that needed to happen in that area (I've verified that I get a valid access token back but didn't want to test actual pipeline creation on my Microsoft account, hehe). Once I'm reasonably certain that it's still working, I'll merge.
Definitively fixes #215. I see a comment there about brittle webpacking with the language server so I'll make sure to follow up on that.
Fixes #381
TODO:

[x] Fix azureDevOpsClient authentication

Fix azureDevOpsClient authentication

Sooooo this never worked......you can't use a token for management.core.azure.net on Azure DevOps, which is what the old code was trying to do.
I am still unfamiliar with MSAL but preliminary investigation shows that fixing this is way out of the scope of this PR.


Go To File very slow on large codebase when typing compared to pasting.

Type: Performance Issue
I work on a relatively large code-base  ("rg" command I can see run that lists the files returns 85k results). I've extensively optimized the files.exclude and have that about as small as it can be. I use a remote ssh server. I have noticed that "go to file" has become quite slow recently. What is interesting is that for the same search string, it is < 0.5s if I paste in a string "e.g. src/Run.cpp", but if I type the string one letter at a time as fast as I can, the search is > 5s. This is repeatable - as long as I don't open a file, I can rerun the same search and it is continuously slow.
I am hoping to find a way to speed this up, since using "go to file" and typing a result is the main way I navigate my codebase.
VS Code version: Code 1.83.1 (Universal) (f1b07bd25dfad64b0167beb15359ae573aecd2cc, 2023-10-10T23:46:55.789Z)
OS version: Darwin arm64 22.6.0
Modes:
Connection to 'ssh-remote+cruise' could not be established
Remote OS version: Linux x64 5.15.0-1044-gcp
Connection to 'SSH: cruise' could not be established  Canceled
Connection to 'SSH: cruise' could not be established  Canceled
Connection to 'SSH: cruise' could not be established  Canceled

System Info

Item
Value

CPUs
Apple M1 Pro (10 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
3, 5, 5

Memory (System)
32.00GB (1.87GB free)

Process Argv
--crash-reporter-id c23c453f-0a6a-447d-ad6e-702bd42fc864

Screen Reader
no

VM
0%

Connection to 'ssh-remote+cruise' could not be established

Item
Value

Remote
SSH: cruise

OS
Linux x64 5.15.0-1044-gcp

CPUs
Intel(R) Xeon(R) CPU @ 2.30GHz (32 x 2299)

Memory (System)
117.91GB (85.70GB free)

VM
0%

Connection to 'SSH: cruise' could not be established  Canceled
Connection to 'SSH: cruise' could not be established  Canceled
Connection to 'SSH: cruise' could not be established  Canceled

Workspace Info

|  Remote: SSH: cruise
Connection to 'SSH: cruise' could not be established  Canceled
Connection to 'SSH: cruise' could not be established  Canceled
Connection to 'SSH: cruise' could not be established  Canceled;

It looks like you're getting SSH errors in your description. What type of logs do you get from the Extension Host (Remote) output channel?

sorry, i should've gotten rid of those errors. they were from long before i ran the search. those errors happen just from initial startup errors when i first log into the machine, but they are gone by the time i perform the search.
I set log level to Trace, and went to Extension Host (Remote) channel, and here's what it looks like as I perform the search:
 - Sibling clauses: {}
2023-10-24 01:19:03.561 [error] HttpError: Bad credentials
	at /home/brian.pierce/.vscode-server/extensions/stackbuild.bazel-stack-vscode-1.9.8/node_modules/@octokit/request/dist-node/index.js:66:23
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-10-24 01:19:03.561 [trace] forwarded error to extension? false {"extensionIdentifier":{"value":"StackBuild.bazel-stack-vscode","_lower":"stackbuild.bazel-stack-vscode"},"stack":"HttpError: Bad credentials\n\tat /home/brian.pierce/.vscode-server/extensions/stackbuild.bazel-stack-vscode-1.9.8/node_modules/@octokit/request/dist-node/index.js:66:23\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}
2023-10-24 01:19:04.534 [debug] ExtHostSearch /home/brian.pierce/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/node_modules/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g '!**/.git' -g '!**/.svn' -g '!**/.hg' -g '!**/CVS' -g '!**/.DS_Store' -g '!**/Thumbs.db' -g '!**/*.pyc' -g '!/.cache/**' -g '!/.mypy_cache/**' -g '!/build/**' -g '!/bazel-out/**' -g '!/.venv/**' -g '!/third_party/org_tensorflow/**' -g '!/third_party/boost/**' -g '!**/*.bag' -g '!**/*.bin' -g '!**/*.engine' -g '!**/*.jpg' -g '!**/*.manifest' -g '!**/*.mlir' -g '!**/*.out' -g '!**/*.par' -g '!**/*.parquet' -g '!**/*.pb' -g '!**/*.pkl' -g '!**/*.png' -g '!**/*.pt' -g '!**/*.rst' -g '!**/*.vec' -g '!**/*.whl' -g '!**/.cache/**' -g '!**/.mypy_cache/**' -g '!**/.venv/**' -g '!/cruise/mla/imagination/ncsdk/dependencies/**' -g '!/cruise/silicon/crmla/csim/**' -g '!/ros/src/controls_stack/controls_scenarios/**/*.yaml' -g '!/ros/src/drivers/**' -g '!/ros/src/localizer_scenarios/**/*.yaml' -g '!/ros/src/matrix/sim_driver/scenarios/**' -g '!/ros/src/perception_scenarios/**/*.yaml' -g '!/ros/src/planning_simulator_scenarios/**/*.yaml' -g '!/ros/src/semantic_database_pipeline/src/semantic_database_pipeline/semantic_map_asserts/**' -g '!/ros/src/simulator_scenarios/**/*.yaml' -g '!/third_party/**' -g '!**/node_modules' -g '!**/bower_components' -g '!**/*.code-search' --no-ignore-parent --no-config
 - cwd: /home/brian.pierce/workspaces/work1/src/github.robot.car/cruise/cruise
 - Sibling clauses: {}
2023-10-24 01:19:06.930 [error] HttpError: Bad credentials
	at /home/brian.pierce/.vscode-server/extensions/stackbuild.bazel-stack-vscode-1.9.8/node_modules/@octokit/request/dist-node/index.js:66:23
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-10-24 01:19:06.930 [trace] forwarded error to extension? false {"extensionIdentifier":{"value":"StackBuild.bazel-stack-vscode","_lower":"stackbuild.bazel-stack-vscode"},"stack":"HttpError: Bad credentials\n\tat /home/brian.pierce/.vscode-server/extensions/stackbuild.bazel-stack-vscode-1.9.8/node_modules/@octokit/request/dist-node/index.js:66:23\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}
2023-10-24 01:19:10.033 [error] HttpError: Bad credentials
	at /home/brian.pierce/.vscode-server/extensions/stackbuild.bazel-stack-vscode-1.9.8/node_modules/@octokit/request/dist-node/index.js:66:23
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-10-24 01:19:10.033 [trace] forwarded error to extension? false {"extensionIdentifier":{"value":"StackBuild.bazel-stack-vscode","_lower":"stackbuild.bazel-stack-vscode"},"stack":"HttpError: Bad credentials\n\tat /home/brian.pierce/.vscode-server/extensions/stackbuild.bazel-stack-vscode-1.9.8/node_modules/@octokit/request/dist-node/index.js:66:23\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}

What happens if you try to run the rg executable that comes with vscode? The path should be in your logs as /home/brian.pierce/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/node_modules/@vscode/ripgrep/bin/rg.

I have run exactly the command that I saw above in a terminal. For example, I ran
$ time /home/brian.pierce/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/node_modules/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g '!**/.git' -g '!**/.svn' -g '!**/.hg' -g '!**/CVS' -g '!**/.DS_Store' -g '!**/Thumbs.db' -g '!**/*.pyc' -g '!/.cache/**' -g '!/.mypy_cache/**' -g '!/build/**' -g '!/bazel-out/**' -g '!/.venv/**' -g '!/third_party/org_tensorflow/**' -g '!/third_party/boost/**' -g '!**/*.bag' -g '!**/*.bin' -g '!**/*.engine' -g '!**/*.jpg' -g '!**/*.manifest' -g '!**/*.mlir' -g '!**/*.out' -g '!**/*.par' -g '!**/*.parquet' -g '!**/*.pb' -g '!**/*.pkl' -g '!**/*.png' -g '!**/*.pt' -g '!**/*.rst' -g '!**/*.vec' -g '!**/*.whl' -g '!**/.cache/**' -g '!**/.mypy_cache/**' -g '!**/.venv/**'  --no-ignore-parent --no-config > /dev/null

I added the > /dev/null to avoid the lag due to just printing all the files on my terminal.
I see timings like
real    0m0.381s
user    0m2.772s
sys     0m1.814s

And it would be faster on subsequent runs.
To me, this shows that the slowdown is happening in vscode's processing of my search query against the file list, not the generation of the file list itself.
Another data point support that claim is the difference in timing between pasting the search string vs typing the search string. If i paste the string, searching is extremely fast. I can then immediately type the same string and the search is slow. Presumably the rg command shouldn't need to be run both times, and if it is, it would be faster the second time due to caching of the OS.

If you disable all extension except remote-ssh, do you still get slow performance?

I just tried that using the Disable All Extensions command.  The performance seems unaffected, it's still very fast if I paste and very slow if I type.

@andreamah please let me know if you need any more information from me to help debugging!
If it helps, I reproduced the problem using an open source repo: https://github.com/tensorflow/tensorflow
I cloned that to my desktop and took this video of the difference between typing vs pasting a search query. On my private repo the search time is even more exaggerated, but hopefully this gives a flavor of the issue.
https://github.com/microsoft/vscode/assets/2482596/8af75153-b48f-4e9e-a971-96b5d2635179

I tried out the latest Insiders build, and it seems like all of the slow-down issues are gone. It's possible the difference is due to some change in my settings I didn't properly copy over, but I'm wondering if the latest insiders has some changes to go-to-file functionality that explains the difference.

Hmm, nothing on the performance side of Go To File should have changed. I can close this for now and we can re-open if something comes up again.

I got the same problem. It seems to be related to "search canceled" logic. It's easy to reproduce if I try to type a long word and I got this log.

VSCode version: 1.85.1


ExtHostDocumentSaveParticipant unit test failure

From https://github.com/microsoft/vscode/commit/a8b389f38bd538f70357ba1a0b1f9878ece555d6
https://dev.azure.com/monacotools/Monaco/_build/results?buildId=201611&view=logs&j=55ac390b-ffb1-50ea-3650-525dd9a3fd80&t=3a692518-c3cf-5f6a-c273-72f71dc185fb&l=10146
1) ExtHostDocumentSaveParticipant
       event delivery, overall timeout:

      + expected - actual

       [
         1
         2
      -  3
       ]

  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected

    [
      1,
      2,
  +   3
    ]
      at Context.<anonymous> (file:///Users/runner/work/1/s/out-build/vs/workbench/api/test/browser/extHostDocumentSaveParticipant.test.js:125:20)

Obsolete - we added this to investigate an issue which turns out to be caused by an extension. No need for this logging after all


Impro 1770

Addresses #1273 / IMPRO-1770
Description
Added new default grid_spacing values to construct_yx_coords() then modified unit tests that relied on the previous test grid setup to either use the new values or set up a grid using the domain_corner and grid_spacing arguments. Hard coded default grid setup removed from set_up_test_cubes.py.
Testing:

[x] Ran tests and they passed OK
[x] Added new tests for the new feature(s)

 Here is an overview of what got changed by this pull request:

Issues
======
- Added 1

Clones added
============
- improver_tests/utilities/test_TemporalInterpolation.py  2

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Clones added
============
- improver_tests/utilities/test_TemporalInterpolation.py  2

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Clones added
============
- improver_tests/utilities/test_TemporalInterpolation.py  2

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Clones added
============
- improver_tests/utilities/test_TemporalInterpolation.py  4

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Clones added
============
- improver_tests/utilities/test_TemporalInterpolation.py  4

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Clones added
============
- improver_tests/utilities/test_TemporalInterpolation.py  4

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Clones added
============
- improver_tests/utilities/test_TemporalInterpolation.py  4

See the complete overview on Codacy


double-beep: Blacklist (?:Opti\W*)?Farms\W*Keto

double-beep requests the blacklist of the keyword (?:Opti\W*)?Farms\W*Keto. See the MS search here and the Stack Exchange search here.

(?:Opti\W*)?Farms\W*Keto has been seen in 141 true positives, 0 false positives, and 0 NAAs.

Approved by Makyen in Charcoal HQ


Feature request: Omnisharp server project/solution free scan mode.

From @Fritzoid on May 25, 2018 12:3
Hi,
I'm not sure im putting this in the right place, but couldnt find anywhere better.
I wish there was a way to tell vscode/omnisharp to ignore projects (.csproj) and solutions (.sln) when scanning csharp code.  This would be very useful when working with very large c# codebases where the .sln and .csproj not necessarily reflect the true hierarchy of the system.
Right now, it seems to start by finding .sln files and loading corresponding projects etc. You can then switch between the solutions and the projects in that solution get loaded. At least I cant find a way of making it satisfy my wishes. :) There might be a way to do what i want today, but can't fogure out how.
So, I wish that when I open a folder, i could tell it to just find every csharp file under that folder and subfolders recursively, load it and index it etc. So that the end product is one big pile of symbols you can jump around in.
I dont care about being able to build it or anything like that, it would just be great for learning and navigating a huge code base.
br
Frederic
Copied from original issue: OmniSharp/omnisharp-vscode#2344

I've moved this because I think it's more relevant to the omnisharp-roslyn repo, where the OmniSharp server is located.
If I understand your question correctly, I think you might be running into a known issue of OmniSharp. Essentially, when OmniSharp is launched with a folder path, it will do one of two things:

If it finds solution files in the folder it will try to use them, picking the first one.
If there are no solution files in that folder, it will crawl the directories looking for .csproj files and load all of them.

Please correct me if I'm wrong, but I think you want the behavior of the second point above, but you have solution files present, so you get the behavior of the first point. Is that right?

Got it -- thanks! This request is still more relevant with this repo.
Note that if we were to implement what you've described, it might not be as useful as you'd like. Many features would not be reliable because there would be no way to identify what references or compiler options are needed.

Yes, thats true. But maybe the server could start with the cs files, so that all symbols are seen first. It could then load the sln prj files and figure it all out.

@Fritzoid: I think that would be very tricky to implement, but it's not a bad idea.

Yes, Its tricky. It probably changes the main loop a lot. Maybe it could be done by ensuring scanning continues between projects no matter what and loose files are picked up.

Please correct me if I'm wrong, but I think you want the behavior of the second point above, but you have solution files present, so you get the behavior of the first point. Is that right?

That is the behavior I'd really like.
Basically, I'd want to be able to say "don't mind any solution files, just use projects", getting an experience similar to how things would work if I delete any solution file.
I don't think it's very uncommon either: many repos have a solution (for those that prefer full VS) and then other devs working on the same workspace, but prefering like VS Code, and being in the later camp, I get pretty frustrated some times seeing things break because something regarding the solution.
Any chance something like that is in the pipe?
(Noticed https://github.com/OmniSharp/omnisharp-vscode/pull/2053 recently: maybe get it to support "null", to revert back to just using directory structure as a fallback).

Hm I'd also love to see a project and solution free fallback for example to some rsp alike file format for specifiying the compiler options at least a minimal set sufficient for liniting and autocompletion eg (/r /unsafe /target ) etc. Would allow to use on non omnisharp, vscode and alike projects still use liniting and autocompleteion services provided by omnisharp eg (omnisharp-vim)
For simple things the noisy sln and csproj files are way to complicated and without gui tools it is nearly not pussible to just specifiy specific assemblies (.dll) to link in instead of pulling in whole projects. and project trees. The closest are the rsp files which can be used in csx scripting mode which if usable also for non csx projects and solutions would already be a start.

need this +1
I'd like to switch to none-solution mode because sometimes I want to ignore some projects temporarily, if there's a solution file, all projects within it will be processed inspite of the FileOptions.userExcludeSearchPatterns setting in omnisharp.json.


⚠ SceneTime has degraded performance

In dc0250e, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 1023 ms

Resolved: SceneTime performance has improved in e48ad3d after 16 minutes.


Build ESPHome Web firmware for Pico W

Add a firmware for Pico for ESPHome Web

@jesserockz it looks like the ESPHome Action builder looks for firmware-factory.bin and can't find it for the Pico. Could you take a look.

FileNotFoundError: [Errno 2] No such file or directory: '/github/workspace/esphome-web/.esphome/build/esphome-web/.pioenvs/esphome-web/firmware-factory.bin'


Some modules which read main from package.json cannot be imported

Some modules (such as joi) expect to be able to require() their root directory containing only a package.json and follow the value of main, as in node and webpack.
Fuse-box emits ~/index.js instead of ~/lib/index.js or ./index.js.
joi/lib/schema.js:
...
const Joi = require('../'); // expects ./index.js, gets ~/index.js
...

joi/package.json
{
  ...
  "main": "lib/index.js",
  ...
}

I got the same issue
Using hapi : joi dependency is breaking everything

FuseBox v4 Major Upgrade
As of today, the latest major version of FuseBox v4 is available in fuse-box@next. FuseBox has undergone a full re-write from scratch, learning from its mistakes in the previous versions.
There are a lot of improvements, speed and config wise.
Get started here
We are still working on the documentation and polishing before the major release. We are getting very close. And we need help testing.
npm install fuse-box@next

Most of the issues that I am closing have been resolved, however, if you find that your issue is still relevant in v4 don't hesitate to re-open or (better) create a new one with v4 configuration.


Address some warnings

@BusyJay PTAL (causing CI failure on master).

LGTM.

Added another fix, PTAL @hicqu and @BusyJay


feat: token create event handling and txn history improvements

Handle listing token create events
Better caching of the transaction history list (useQuery)

I tested the feature on the local network.

@jgryffindor can you deploy this in QA for testing, please?


Fails to apply fixes on quick edit & save

Info

OS and language server: MacOS Catalina, LSP-eslint

Repro
File: test.js
const a = 1;

Place cursor after semicolon
Press backspace to delete semicolon and immediately save document

Expected: Semicolon is added by fix-on-save feature of eslint server
Actual: Semicolon doesn't get added. Saving document again does add the semicolon.
Works as expected in VSCode.
(Of course, repro requires semi rule to be enabled. I can provide repo with everything set up if needed.)
Logs
Log from LSP (I've modified logging code to also log request/notification params):
LSP:  --> textDocument/didChange
LSP:      {'contentChanges': [{'text': 'const a = 1\n'}], 'textDocument': {'version': 3, 'uri': 'file:///test.js'}}
LSP:  ==> textDocument/willSaveWaitUntil
LSP:      {'reason': 1, 'textDocument': {'uri': 'file:///test.js'}}
LSP: timeout on textDocument/willSaveWaitUntil
LSP: <--  textDocument/publishDiagnostics
LSP:      {'diagnostics': [{'range': {'start': {'line': 0, 'character': 6}, 'end': {'line': 0, 'character': 7}}, 'code': 'no-unused-vars', 'source': 'eslint', 'message': "'a' is assigned a value but never used.", 'severity': 1}, {'range': {'start': {'line': 0, 'character': 11}, 'end': {'line': 0, 'character': 11}}, 'code': 'semi', 'source': 'eslint', 'message': 'Missing semicolon.', 'severity': 1}], 'uri': 'file:///test.js'}
LSP: <--  eslint/status
LSP:      {'state': 1}
LSP: Unhandled notification eslint/status
LSP:      [{'range': {'start': {'line': 0, 'character': 11}, 'end': {'line': 0, 'character': 11}}, 'newText': ';'}]
LSP:  --> textDocument/codeAction
LSP:      {'range': {'start': {'line': 0, 'character': 11}, 'end': {'line': 0, 'character': 11}}, 'context': {'diagnostics': [{'range': {'start': {'line': 0, 'character': 11}, 'end': {'line': 0, 'character': 11}}, 'code': 'semi', 'source': 'eslint', 'message': 'Missing semicolon.', 'severity': 1}]}, 'textDocument': {'uri': 'file:///test.js'}}
LSP:      [{'kind': 'quickfix', 'title': 'Fix this semi problem', 'command': {'title': 'Fix this semi problem', 'command': 'eslint.applySingleFix', 'arguments': ['semi']}}, {'kind': 'quickfix', 'title': 'Disable semi for this line', 'command': {'title': 'Disable semi for this line', 'command': 'eslint.applyDisableLine', 'arguments': ['semi']}}, {'kind': 'quickfix', 'title': 'Disable semi for the entire file', 'command': {'title': 'Disable semi for the entire file', 'command': 'eslint.applyDisableFile', 'arguments': ['semi']}}, {'kind': 'quickfix', 'title': 'Show documentation for semi', 'command': {'title': 'Show documentation for semi', 'command': 'eslint.openRuleDoc', 'arguments': ['semi']}}]
LSP:  --> textDocument/didSave
LSP:      {'textDocument': {'uri': 'file:///test.js'}}

Log from VSCode:
[Trace - 8:01:04 PM] Sending notification 'textDocument/didChange'.
Params: {
    "textDocument": {
        "uri": "file:///test.js",
        "version": 25
    },
    "contentChanges": [
        {
            "text": "const a = 1\n"
        }
    ]
}

[Trace - 8:01:04 PM] Sending request 'textDocument/willSaveWaitUntil - (13)'.
Params: {
    "textDocument": {
        "uri": "file:///test.js"
    },
    "reason": 1
}

[Trace - 8:01:04 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///test.js",
    "diagnostics": [
        {
            "message": "'a' is assigned a value but never used.",
            "severity": 1,
            "source": "eslint",
            "range": {
                "start": {
                    "line": 0,
                    "character": 6
                },
                "end": {
                    "line": 0,
                    "character": 7
                }
            },
            "code": "no-unused-vars"
        },
        {
            "message": "Missing semicolon.",
            "severity": 1,
            "source": "eslint",
            "range": {
                "start": {
                    "line": 0,
                    "character": 11
                },
                "end": {
                    "line": 0,
                    "character": 11
                }
            },
            "code": "semi"
        }
    ]
}

[Trace - 8:01:04 PM] Received notification 'eslint/status'.
Params: {
    "state": 1
}

[Trace - 8:01:04 PM] Received response 'textDocument/willSaveWaitUntil - (13)' in 18ms.
Result: [
    {
        "range": {
            "start": {
                "line": 0,
                "character": 11
            },
            "end": {
                "line": 0,
                "character": 11
            }
        },
        "newText": ";"
    }
]

[Trace - 8:01:04 PM] Sending notification 'textDocument/didChange'.
Params: {
    "textDocument": {
        "uri": "file:///test.js",
        "version": 26
    },
    "contentChanges": [
        {
            "text": "const a = 1;\n"
        }
    ]
}

[Trace - 8:01:04 PM] Sending notification 'textDocument/didSave'.
Params: {
    "textDocument": {
        "uri": "file:///test.js",
        "version": 26
    }
}

[Trace - 8:01:04 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///test.js",
    "diagnostics": [
        {
            "message": "'a' is assigned a value but never used.",
            "severity": 1,
            "source": "eslint",
            "range": {
                "start": {
                    "line": 0,
                    "character": 6
                },
                "end": {
                    "line": 0,
                    "character": 7
                }
            },
            "code": "no-unused-vars"
        }
    ]
}

[Trace - 8:01:04 PM] Received notification 'eslint/status'.
Params: {
    "state": 1
}

Here is a log from subsequent document save, when it works:
LSP:  ==> textDocument/willSaveWaitUntil
LSP:      {'textDocument': {'uri': 'file:///test.js'}, 'reason': 1}
LSP:  --> textDocument/didChange
LSP:      {'textDocument': {'uri': 'file:///test.js', 'version': 10}, 'contentChanges': [{'text': 'const a = 1;\n'}]}
LSP:      [{'newText': ';', 'range': {'end': {'line': 0, 'character': 11}, 'start': {'line': 0, 'character': 11}}}]
LSP: <--  textDocument/publishDiagnostics
LSP:      {'uri': 'file:///test.js', 'diagnostics': [{'code': 'no-unused-vars', 'message': "'a' is assigned a value but never used.", 'source': 'eslint', 'severity': 1, 'range': {'end': {'line': 0, 'character': 7}, 'start': {'line': 0, 'character': 6}}}]}
LSP: <--  eslint/status
LSP:      {'state': 1}
LSP: Unhandled notification eslint/status
LSP:  --> textDocument/didSave
LSP:      {'textDocument': {'uri': 'file:///test.js'}}

Order of requests/responses seems to be a bit messed up, probably due to threading.

I wonder if that's because willSaveWaitUntil blocks the thread while eslint wants to send to some diagnostic notifications before responding to willSaveWaitUntil...

I believe diagnostics should be read by one of LSP's own worker threads, so the server shouldn't feel blocked by that. I wonder if you could try extending the timeout?
Interesting problem with a simple repro, thanks for reporting - hope to have some time to help soon!

Extending the timeout just makes it freeze for longer.

I was thinking that maybe there is a deadlock due to eslint server sending some message in the middle of handling willSaveWaitUntil and expects a response before responding to willSaveWaitUntil.

My suspicion is that calls to the ST3 API all go through the same thread. So we could deadlock at e.g.     view = window.find_open_file(update.file_path) in plugin/diagnostics.py:255.
Could you try changing this line in plugin/diagnostics.py:255
global_events.subscribe("document.diagnostics",
                        lambda update: handle_diagnostics(update))

into this?
global_events.subscribe("document.diagnostics",
                        lambda update: sublime.set_timeout_async(lambda: handle_diagnostics(update), 0))

I think printf-debugging where the diagnostics exactly get stuck might lead us to the problem.

Nice, that change actually fixes deadlock. eslint server still fails to fix the code (add semicolon), but there is no freeze.

@rwols you pinpointed it, even window.is_valid() was enough for a diagnostics push to break the sync request.
I did a quick hack storing all incoming server notifications (like diagnostics) and handling them after the sync request, that also seems to make the willSaveWaitUntil work most of the time.

... to make the willSaveWaitUntil work most of the time.

Same with the suggestion provided by @rwols. It fixes the freeze but works most of the time to actually handle code fix.

I did a quick hack storing all incoming server notifications (like diagnostics) and handling them after the sync request

I think we would need to handle them within the willSaveWaitUntil for the fix-on-save to actually work reliably.

@rchl could you these changes in plugin/core/rpc.py with eslint? This runs all handlers on the ST3 alternative thread. It seems to work OK on my end.
diff --git a/plugin/core/rpc.py b/plugin/core/rpc.py
index 1ecbf7b..45f6bfd 100644
--- a/plugin/core/rpc.py
+++ b/plugin/core/rpc.py
@@ -11,6 +11,24 @@ try:
 except ImportError:
     pass

+try:
+    import sublime  # type: ignore
+except ImportError:
+
+    class sublime:  # type: ignore
+
+        @classmethod
+        def set_timeout_async(cls, func: 'Callable[[], None]', timeout: float) -> None:
+            from time import sleep
+            from threading import Thread
+
+            def do_it() -> None:
+                func()
+
+            single_run = Thread(target=do_it)
+            single_run.start()
+
+
 from .logging import debug, exception_log
 from .protocol import Request, Notification, Response
 from .types import Settings
@@ -72,7 +90,13 @@ def try_terminate_process(process: 'subprocess.Popen') -> None:
 class Client(object):
     def __init__(self, transport: Transport, settings: Settings) -> None:
         self.transport = transport  # type: Optional[Transport]
-        self.transport.start(self.receive_payload, self.on_transport_closed)
+        self.transport.start(
+            # This needs to run on the alternative ST3 thread, otherwise there's the possibility of a deadlock when
+            # handling a notification from the server while doing a blocking request. This is because whatever Python
+            # thread we're on, all ST3 API calls go through the thread that spawned the Python threads. In our case that
+            # should be the main ST3 thread. We want these handlers to run on the alternate ST3 thread.
+            lambda msg: sublime.set_timeout_async(lambda: self.receive_payload(msg), 0),
+            lambda: sublime.set_timeout_async(self.on_transport_closed, 0))
         self.request_id = 0
         self._response_handlers = {}  # type: Dict[int, Tuple[Optional[Callable], Optional[Callable[[Any], None]]]]
         self._request_handlers = {}  # type: Dict[str, Callable]
@@ -163,6 +187,7 @@ class Client(object):
             self.transport.send(message)

     def receive_payload(self, message: str) -> None:
+        # Keep in mind: this method runs on the alternative ST3 thread, not the main ST3 thread.
         payload = None
         try:
             payload = json.loads(message)
@@ -186,6 +211,7 @@ class Client(object):
             exception_log("Error handling server payload", err)

     def on_transport_closed(self) -> None:
+        # Keep in mind: this method runs on the alternative ST3 thread, not the main ST3 thread.
         self._error_display_handler("Communication to server closed, exiting")
         # Differentiate between normal exit and server crash?
         if not self.exiting:

@rwols that, unfortunately, triggers deadlock again with the LSP: timeout on textDocument/willSaveWaitUntil message.

With the fallback variant of set_timeout_async it works without deadlocking but still not 100% reliably (deleting semicolon and immediately saving sometimes doesn't add back semicolon).

Bummer that my proposed solution doesn't work :( !

It was a great start, thank you for that.
And then I've tried also using same solution in windows.py and that seems to fix the problem completely!
diff --git a/plugin/core/windows.py b/plugin/core/windows.py
index 294017b..913628b 100644
--- a/plugin/core/windows.py
+++ b/plugin/core/windows.py
@@ -22,6 +22,18 @@ except ImportError:
     pass
     Protocol = object  # type: ignore

+class sublime:  # type: ignore
+    @classmethod
+    def set_timeout_async(cls, func: 'Callable[[], None]', timeout: float) -> None:
+        from time import sleep
+        from threading import Thread
+
+        def do_it() -> None:
+            func()
+
+        single_run = Thread(target=do_it)
+        single_run.start()
+

 class SublimeLike(Protocol):

@@ -258,7 +270,7 @@ class WindowDocumentHandler(object):
                     "version": buffer_version
                 }

-            self._sublime.set_timeout_async(
+            sublime.set_timeout_async(
                 lambda: self.purge_did_change(buffer_id, buffer_version), 500)

     def purge_changes(self, view: ViewLike) -> None:
@@ -532,7 +544,7 @@ class WindowManager(object):
                     self._handle_window_closed()
                 else:
                     # in case the window is invalidated after the last view is closed
-                    self._sublime.set_timeout_async(lambda: self._check_window_closed(), 100)
+                    sublime.set_timeout_async(lambda: self._check_window_closed(), 100)

     def _check_window_closed(self) -> None:
         # debug('window {} check window closed closing={}, valid={}'.format(

Of course it's a hack but shouldn't be hard to turn it into a clean solution.

I'd like to tackle this problem unless @tomv564 is already working on it

Here is a repro of the eslint issue with two lines of logging from the server:

willSaveWaitUntil says the document still had a semicolon and no fixes
validateSingle runs against updated document content (semicolon deleted)

LSP:  --> textDocument/didChange
LSP:  ==> textDocument/willSaveWaitUntil
eslint: No fixes returned, semi = true
eslint: validateSingle: const a = 1
LSP: <--  textDocument/publishDiagnostics
LSP:      {'uri': 'file:///Users/tomv/Projects/tomv564/js-test/index.js', 'diagnostics': [{'source': 'eslint', 'message': "'a' is assigned a value but never used.", 'code': 'no-unused-vars', 'severity': 1, 'range': {'start': {'line': 0, 'character': 6}, 'end': {'line': 0, 'character': 7}}}, {'source': 'eslint', 'message': 'Missing semicolon.', 'code': 'semi', 'severity': 1, 'range': {'start': {'line': 0, 'character': 11}, 'end': {'line': 0, 'character': 11}}}]}
LSP:      []
LSP:  --> textDocument/didSave

If I understand the issue correctly, I'd like to declare the current behaviour "good enough" instead of investing more time into it.

It's expected the editor will freeze while saving, but testing shows the editor recovers within 1 second after response/timeout.
LSP itself may cause the freeze if handling diagnostics but in the end you're in the same situation for 1 second as if you tried to interact with the editor yourself.

As the issue with the eslint server was already demonstrated, are we ok to close?

The issue is IMO absolute unacceptable. It makes the editor feel slow and like it's constantly freezing. The perceived difference between saving with and without this issue is very noticeable.
I would be fine with resolving it but only due to the fact that the whole format-on-save feature was re-done as code actions so we should not waste time on fixing old implementation. But I'm afraid that code action implementation would still have the same issue as it will need to be:

sync
run before save

And to be clear, I'm saying that the freezing issue is a problem. The problem with not always fixing the code we could live with.

Ok, thanks for commenting. Would it be okay if we open a new issue about freezing, and could you help with a screen recording there? I have a feeling the issue manifests itself stronger than I see it on my own setup.

I can provide all that (not at the moment though).
But it's a matter of freezing for 1s when saving vs. instant saving. Saving files normally doesn't introduce any delay, so the difference is very noticeable when it happens. And it would be a little bit hard to visualize that in a screen recording maybe.

I can also reproduce it, though I'm still figuring out how to reproduce this consistently. Also #787 prevents the blocking UI. But I understand that it is a lot of code without tests to back it up.
I'm working on a little test server written in python so that we may test the entire chain of real classes.

I have an idea to remove the blocking requests entirely using a combination of on_pre_save and on_post_save and some view settings, I'll try making the PR tonight.

I consider this fixed now that #787 is merged.


version bump to validate pypi access and start work again

What is the purpose of this merge? Just curious :)


Error response from daemon: pull access denied for mynamespace-replaceme/goldpinger, repository does not exist or may require 'docker login'

In your README "Example YAML", the docker image does not exist.
Error response from daemon: pull access denied for mynamespace-replaceme/goldpinger, repository does not exist or may require 'docker login'

That's because that repository does not exist. Apparently Bloomberg is not publishing the binaries.
You can just compile yourself or use a random one from docker hub, like image: "gokulpch/goldpinger:1.0.2" (which I found but have no affiliation whatsoever with the author)
I also had some RBAC permission issues, so this is my whole working YAML file:
The last section should be improved to harden security, but I am still using it in a test cluster.
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: goldpinger
  labels:
    app: goldpinger
spec:
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: goldpinger
  template:
    metadata:
      labels:
        app: goldpinger
    spec:
      containers:
        - name: goldpinger
          env:
            - name: HOST
              value: "<IP_ADDRESS>"
            - name: PORT
              value: "80"
            # # kubeconfig needs to match the location of what's injected in the secret
            # # if not specified goldpinger will default to using in-cluster config
            # - name: KUBECONFIG
            #   value: "./kube/config"
            # refresh interval (seconds) tells goldpinger to call every other instance with that frequency (set to 0 to disable)
            - name: REFRESH_INTERVAL
              value: "30"
            # injecting real hostname will make for easier to understand graphs/metrics
            - name: HOSTNAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
          image: "gokulpch/goldpinger:1.0.2"
          ports:
            - containerPort: 80
              name: http
---
apiVersion: v1
kind: Service
metadata:
  name: goldpinger
  labels:
    app: goldpinger
spec:
  type: NodePort
  ports:
    - port: 80
      nodePort: 30080
      name: http
  selector:
    app: goldpinger
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: default-view
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: view
subjects:
  - kind: ServiceAccount
    name: default
    namespace: default

@gjcarneiro @marcosdiez that's correct, we are not providing docker images for security reasons, and are encouraging building them from the source yourself. That's why the template has the mynamespace-replaceme/goldpinger portion of it.
@marcosdiez we should probably add an authorization rule in the example config to get people started even more easily.

I honestly don't understand this "for security reasons".  If everyone did this, we wouldn't have any docker images.  Even Kubernetes itself publishes docker images (gcr.io/google_containers/hyperkube).  Imagine if everyone had to build their own hyperkube image?...

@gjcarneiro Unfortunately it's currently our policy to encourage people to build their own images for compliance and security vulnerability management.


Support for mingw/msys/cygwin for node-gyp

The authors claims that mingw is not a viable target for node-gyp on windows I believe to be patently false.
I would like to patch node-gyp to allow it to correctly build msys compatible make files, for versions of nodejs built with the msys/gcc toolchain.
From my research so far, this is not only possible, but partially already supported. Two things need to happen:

Stop assuming that only msvs is supported on windows
Add an msys make target with the following properties:
a) support /c/
b) No colons are allowed in e.g. /C:/
link to appropriate msys versions of libraries.

If those conditions are met, it appears that node-gyp generates/builds just fine on msys nodejs, contrary to the author's wild claims to the contrary.
Referencing these old tickets in case there's anything of value/relevance in them:
https://github.com/nodejs/node-gyp/issues/194
https://github.com/nodejs/node-gyp/issues/280
https://github.com/nodejs/node-gyp/issues/660

If it's a few small unobtrusive changes, that might be fine.  If it's going to take major surgery and ongoing maintenance effort, the answer is 'no'.
Building node with mingw isn't supported so there is only marginal value in supporting it in node-gyp.  You won't be able to load a mingw-compiled add-on in a msvs-compiled node, or vice versa.
If you are serious about this, you should upstream your changes to nodejs/node first.

contrary to the author's wild claims to the contrary

Lay off the condescension, will you?  What are you, a twelve year old?

Major surgery etc are unlikely to occur. Unless linux becomes an unsupported platform (in which case I'm likely to ditch nodejs entirely), gcc support is available, and while gcc support is available, mingw support is not much of an effort.
There might be some retraining required down-stream (if people are doing awful things with their node-gyp files).
As for upstream, the version I'm using is based on a patch engine that somebody else is reponsible for (credit to Alexey Pawlow https://github.com/Alexpux).
I'm unsure what his effort on this issue is. His stuff works fine.
As for 'condescension', all it took me was a minor bit of googling and a bit of playing around to figure this stuff out so far. The node-gyp authors can't have even tried.

Yeah, because we're well aware of the cost/benefit ratio.  The point stands that as long as upstream node doesn't support mingw, supporting it in node-gyp is of extremely marginal utility.
You are welcome to open a pull request but if I deem it too invasive or too much of a maintenance headache, I'll have no qualms about rejecting it.

'Just works' support for msys is fairly big benefit. Dealing with required admin access to machines/bulky msvs compilers with large buggy .NET dependencies is a fairly major drawback.

As long as this is an issue:

You won't be able to load a mingw-compiled add-on in a msvs-compiled node, or vice versa.

mingw will always be a fringe thing.  I would be more supportive of clang-cl support, it's ABI-compatible with msvs.

This is getting very off-topic, but, M\maybe. But I'm not aware of any clang-cl based runtimes - sure that's a nice idea, but where's my pacman on windows and my bash?
Also, I've not followed up with the windows 10 linux subsystem, but I'd think that'd make stuff like this more prevalent, not less. Perhaps eventually msys2 morphs into another compatibility layer there?

But I'm not aware of any clang-cl based runtimes

I don't know what you mean by that.  clang-cl is a front-end to clang that emits msvs-compatible machine code (same C++ name mangling, calling conventions, etc.)
mingw uses its own name mangling scheme that makes interoperability impossible.

At any rate, you seem to be more intent on talking about why its a bad idea, I'll focus on actually coding, thanks.

You go, kid.  And I, I'll go close out the issue.

Um, why close it? I'm still working on this.

You rather clearly indicated the discussion ran its course.  Looking forward to the PR.

Ah, ok. I have to go to work here in a bit. I was under the impression it should stay open until there was a PR.

Also, I've not followed up with the windows 10 linux subsystem, but I'd think that'd make stuff like this more prevalent, not less.

If you're in the subsystem you have full access to gcc, what's the usecase for using mingw?

I would like to patch node-gyp to allow it to correctly build msys compatible make files, for versions of nodejs built with the msys/gcc toolchain.
it appears that node-gyp generates/builds just fine on msys nodejs,

Have you tried contributing your msys nodejs support into nodejs?

Dealing with required admin access to machines/bulky msvs compilers with large buggy .NET dependencies is a fairly major drawback.

Have you tried http://landinghub.visualstudio.com/visual-cpp-build-tools ?

In short:

Not in it.
Not mine.
Not applicable to me.

Quick update - there is a symbol mangling issue which is caused by something in the build system.
As I've spent a fair amount of time learning now how gyp works, and basically that all node-gyp is, is an addon on top of that, my conclusion is that it probably makes sense to build a new gyp addon tool, an alternative to node-gyp. Maybe ultimately it makes sense to port whatever build tool changes I make back to node-gyp, but for now I'm thinking node-gyp is the wrong approach.
As for node packages which require node-gyp to build, an immediate solution would be to use npm's facilities to forcefully replace node-gyp with an alternative, through linking or custom npm repositories.

Some good news, I have it working.
By that I mean, I have patches that produce correct build files for nodejs on mingw, and I have the hello world example building.
Now comes the hard part of building reproduce-able patches.

@smaudet did a PR ever result from this?

still interested in this

Any updates ? Support mingw/msys/cygwin make senses to me.

Any updates ? Support mingw/msys/cygwin make senses to me.

you need to compile node in mingw first, apparently.

This is currently blocking me from installing anything to do with napi, such as the re2 package on windows 😕
I have clang installed in msys2 but it still asks for VS 2017.

https://opensourcepack.blogspot.com/2013/06/nodejs-with-posix-path-support.html Ah look, it seems you need to uses mys python
https://github.com/nodejs/node-gyp/issues/194 this is quite unfortunate, but someone was trying to patch mingw python to support the msys enviroment... not sure if that's stable enough


Use a faster format for images in VLMs

This improves the performance in a significant way when dealing with higher batch sizes on GPU servers which have lots of 'small' cores and the operations are run in sync in the same core.
For sharing some numbers, on an H100 when running xtuner/llava-llama-3-8b-v1_1-hf (with int8 KV cache quantization), the timings go from ~6 seconds to ~3 seconds at bs=16. Its almost doubling the performance (and reducing the unutilized GPU times).

This has no affect on quality since images are already compressed at different stages of the pipeline! At the worst case, i don't think this should be the default and should be customized but that'd be a more intrusive change.

This has no affect on quality since images are already compressed at different stages of the pipeline! At the worst case, i don't think this should be the default and should be customized but that'd be a more intrusive change.

Are you sure the VLM does not see difference between having or not a background ?


Installation issue

Hi
I try toinstall Garo Wallbox Home Assistant Integration v1.0.11
On my new Home Assistant Home Assistant 2023.7.0
Supervisor 2023.07.1. Operating System 10.3. Frontend 20230705.0 - latest
My Garo boxes (2 of them) runs SW version 1.3.7
I get the error message “Unexpected error creating device.”  when I enter the IP address 192.168.xx.yy  in the configuration dialog
I can reach the Garo Wallbox web interface from my browser via 192.168.xx.yy:8080/serialweb on my local LAN
What have I missed – it´s probably something simple ?!?
Grateful for any help and suggestions

SOLVED. Probably my bad, did not properly install the integration, just pulled it to HACS - rookie mistake


Exception at "Solvency" page on fresh Peatio installation

You need to run rake solvency:liability_proof to resolve it. We just need to update the documentation.


Model error ( All OpenAI models)

I have been trying to use the models in OpenAI over the past few days, but unfortunately none of them seem to be working. I would appreciate any help in troubleshooting this issue so I can get the models working again.

The error text is the following:

Error code: 401 - {'error': {'message': 'The OpenAI account associated with this API key has been deactivated. If you are the developer for this OpenAI app, please check your email for more information. If you are seeing this error while using another app or site, please reach out to them for more help.', 'type': 'invalid_request_error', 'param': None, 'code': 'account_deactivated'}}

I have the same issue. It would be great to have feedback on this. Thank u


Shell component: search should retain value

Introduction
When the search_target is provided in the shell component, the ?search= query parameter value should be used as the text input value when present. Currently the search input is cleared on every page load.
Actual behavior
Notice that the search input field is empty when the ?search= query parameter is present.
Screenshots

Expected behavior
The search value should be in the text box rather than being blank. This is standard UI behavior (e.g. search for something on Github, when the results are returned the textbox is not cleared out).

Hello and welcome to SQLPage, @E8y2FqZE !
Can you tell us more about what you are building ?
I'm not sure the framework (SQLPage) should prefill the text field when the search URL parameter is set, but I'm sure it should at least be possible for the application author to easily implement this behavior.
We should add a search_value parameter to the shell component.
This can be done here: https://github.com/lovasoa/SQLpage/blob/main/sqlpage/templates/shell.handlebars#L98
and should be documented here: https://github.com/lovasoa/SQLpage/blob/main/examples/official-site/sqlpage/migrations/01_documentation.sql#L748-L767
Can you open a pull request ?

Hi, see it that works #359
then I can update the doc

I'm closing this since we merged #362


Modularize with ES2015 and rollupjs

Decided to take a crack at the modularity dragon using ES2015 modules and rollupjs.
So here it is. This supports the entire current mithril API in theory, though there's a bunch of failing tests that I'll need to fix. Sending this to generate discussion and ensure this is an approach that is worth pursuing further.
I also cleaned up most of the ESLint issues in mithril.js during the process, but to keep from going crazy I modified the .eslintrc to make it better match the reality of the library. I'm not sure if those settings are aspirational or what but they seem totally at odds with the code as it is. In order to rewrite as little code as possible I've side-stepped that issue for now.
It's a little premature to talk end-user size, but after uglifying and gzipping this version of mithril ends up comparable in size to v0.2.2-rc1. :+1:
TODO

[ ] Get sign-off that this is actually wanted
[ ] Fix 102 test failures
[ ] Integrate w/ Gruntfile, maybe? (I prefer it as an NPM script though)
[ ] Clean-up remaining ESLint/formatting issues
[ ] Flatten into a single commit
[ ] :shipit:

This is related to #651, #665, and #802.

(The test claiming it is passing is a lie, ignore it)

To be honest, modularizing is something I'm doing w/ the rewrite, so I don't know if it's worth putting a lot of effort in modularizing the current codebase

Fair enough, I know I've asked before but I'd love to see your work on the rewrite! 😉


Add health check for SMT engine disk storage

There is no health check for low disk storage. If the disk storage gets too low, then SMT engines will be negatively impacted. We can use DiskStorageHealthCheck from the AspNetCore.HealthChecks.System library.

This is done through Alerts and Prometheus.  It is currently working as of this week (the email was improperly configured).  Errors come as emails and look like this:

This needs no further action at this time.

It would be easier to just check the disk space, especially since there is already a health check library that can do it.

Ok - it will be a redundant check, but I can see the value.

In order to use this health check, we have to reference a specific drive by string (e.g. "C://"). How will this work in containers? Is this workable, @johnml1135?

I am assuming that the main paths /var/lib/serval and /var/lib/machine would need to be monitored.  They are defined in appsettings.json:
  "DataFile": {
    "FilesDirectory": "/var/lib/serval/files"
  }

and
  "SmtTransferEngine": {
    "EnginesDir": "/var/lib/machine/engines"
  }


weird behavior of mouse click

I exclusively use Wolf with mouse, and I have noticed a weird interaction of the mouse click.
Based on my observation, a mouse click will only be registered IF i move my mouse after i click.
https://github.com/user-attachments/assets/19a2c16f-570a-46de-a348-4ac163ee9c76
https://github.com/user-attachments/assets/967bc44e-1b8b-46b5-8f32-e51fe18f1a35
I created a simple web to explain this behavior, the first video is where i demonstrate the weird behavior in Wolf environment.
Notice that after I click the mouse the web output nothing and the click is registered only after i move the mouse (on the video i use the monitor as the mouse surface to move the mouse).
Compare the behavior with the second video where the mouse click is registered right after.
Hopefully I'm making sense, let me know if further clarification is needed!

I think I know what the issue is, I'm just leaving a note here; I'll test it out tomorrow.
We are missing a call to
pointer.frame()

in here.

I can replicate your issue and it should be fixed in https://github.com/games-on-whales/wolf/pull/121 you can give it a go by pulling
ghcr.io/games-on-whales/wolf:dev-mouse-sensitivity

feel free to re-open if that doesn't fix it!

awesome! Can confirm it is fixed in wolf:dev-mouse-sensitivity


Snazzywindow placement option not working

/**
 * Choose where you want the info window to be displayed, relative to the marker.
 */
placement: 'top' | 'bottom' | 'left' | 'right';

Only top works.

Checkout the multiple marker example where all 4 positions are used at once.


libsodium.so for armv6

Hi team,
testing walitid-walletkit by using  docker-compose, in authentification step I have a problem with this message: "Caused by: java.lang.UnsatisfiedLinkError: Unable to load library '/tmp/resource-loader10237632198594109884/armv6/libsodium.so':". Any help, thanks in advance.

Related to https://github.com/terl/lazysodium-java/issues/115

I've updated the lazysodium version in the SSI Kit and included the new SSI Kit version in the Wallet Kit. Should be fixed now.


Option for the number of results in lab mr list and lab issue list

An option could set other values than the default of 10.

It's already implemented : lab issue list -n 30


remove duplicate testing lab in Hyderabad

fixes covid19india/covid19india-react#867

This file is autogenerated. No point in fixing it here. Will report to the sheet owner.

@JunaidBabu if possible could you assign this issue covid19india/covid19india-react#867 to the sheet owner


Make cubos-engine a library and add empty sample

Closes #92

"entry.hpp" doesn't feel quite right, maybe just a self titled file like cubos/cubos.hpp? Or something like engine.hpp...
Otherwise all good I think

also we might want to separate the init function from the window loop, maybe put that in something like "cubos::run()". Workflow would be cubos::init(), setup objects/resources, cubos::run() for example


No named parameter with the name 'primary'.

Describe the bug
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-000210183AFA401E }
{ platform:macOS, arch:x86_64, id:00006000-000210183AFA401E }
../../.pub-cache/hosted/pub.flutter-io.cn/group_button-5.3.3/lib/src/group_button_item.dart:92:9: Error: No named parameter with the name 'primary'.
primary: _getBackgroundColor(theme),
^^^^^^^
../../flutter/packages/flutter/lib/src/material/elevated_button.dart:151:22: Context: Found this candidate, but the arguments don't match.
static ButtonStyle styleFrom({
^^^^^^^^^
Target kernel_snapshot failed: Exception
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **
To Reproduce
Steps to reproduce the behavior:
flutter build macos
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: macos
Browser [e.g. chrome, safari]
Version [e.g. 22]
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.18.0-11.0.pre.74, on macOS 14.2 23C64 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.82.2)
[✓] VS Code (version 1.85.0)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!
Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

I have tested the example under the project, it reports same info:
example % flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-000210183AFA401E }
{ platform:macOS, arch:x86_64, id:00006000-000210183AFA401E }
../lib/src/group_button_item.dart:92:9: Error: No named parameter with the name 'primary'.
primary: _getBackgroundColor(theme),
^^^^^^^
../../../../../../flutter/packages/flutter/lib/src/material/elevated_button.dart:151:22: Context: Found this candidate, but the arguments don't match.
static ButtonStyle styleFrom({
^^^^^^^^^
Target kernel_snapshot failed: Exception
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **
Building macOS application...
Error: Build process failed

I have the same problem.  Is this an issue with the latest flutter 3.18.0 upgrade?

Fix with this merged PR
And version 5.3.4


Populate map more strict

Test cases for https://github.com/stleary/JSON-java/pull/354
This also reorganizes some test objects to be placed into a sub-package easier eyeballing of test cases vs test objects.

@johnjaylward getting test errors after merging this commit and JSON-Java https://github.com/stleary/JSON-java/pull/354. Can you investigate?

Sure

Fixed in #77.
The problem was that gradle was running the tests twice in the same classloader. So the single was modified from the expected values the second time around. the updated config should fix that.


Graceful shutdown + worker threads crashes node process

Hi, thanks for awesome lib.
I've tried to play around with worker threads example combined with graceful shutdown. And find out that it crashes process on exit.
Config:

Linux kernel 5.6.X
uWebSockets.js 18.1.0
Node 14.3.0

Here's code that's mostly taken from examples dir.
const uWS = require('uWebSockets.js');
const { Worker, isMainThread, threadId, parentPort } = require('worker_threads');
const os = require('os');

const port = 9001;

if (isMainThread) {
    const workers = os.cpus().map(() => {
        return new Worker(__filename);
    });
    const cleanup = function cleanup() {
        workers.forEach((worker) => {
            worker.postMessage('cleanup');
        });
    };
    process.on('SIGTERM', cleanup);
    process.on('SIGINT', cleanup);
} else {
    let listenSocket;

    const app = uWS.App({}).listen(port, (token) => {
        listenSocket = token;
        if (token) {
            console.info(`${threadId} listening on ${port}`);
        } else {
            console.error(`${threadId} failed listening on ${port}`);
        }
    });

    parentPort.on('message', (value) => {
        if (value === 'cleanup') {
            shutdown();
            process.exit(0);
        }
    });

    function shutdown() {
        if (listenSocket) {
            uWS.us_listen_socket_close(listenSocket);
            listenSocket = null;
        }
    }
}

It launches without any errors, all threads listening. But when you send SIGINT for example node crashes with following core dump:
uv loop at [0x7f40b93f7ad8] has open handles:
[0x7f40940b9b10] prepare (active)
        Close callback: (nil)
        Data: 0x7f40940c1ad0
        (First field): 0x7f40940de240
[0x7f40940b9b90] check (active)
        Close callback: (nil)
        Data: 0x7f40940c1ad0
        (First field): 0x7f40940de240
[0x7f40940de300] timer (active)
        Close callback: 0x800000000000000
        Data: 0x7f40940de240
        (First field): 0x7f40940cce40
[0x7f40940f14e0] async (active)
        Close callback: 0x1
        Data: 0x7f40940f1420
uv loop at [0x7f40b93f7ad8] has 4 open handles in total
node[78601]: ../src/debug_utils.cc:322:void node::CheckedUvLoopClose(uv_loop_t*): Assertion `0 && "uv_loop_close() while having open handles"' failed.
uv loop at [0x7f408bbfdad8] has open handles:
[0x7f407c0bf030] prepare (active)
        Close callback: (nil)
        Data: 0x7f407c0c1b20
        (First field): 0x7f407c0ba740
[0x7f407c0bf0b0] check (active)
        Close callback: (nil)
        Data: 0x7f407c0c1b20
        (First field): 0x7f407c0ba740
[0x7f407c0ba800] timer (active)
        Close callback: 0x800000000000000
        Data: 0x7f407c0ba740
uv loop at [0x7f408b3fbad8] has open handles:
[0x7f40740bb850] prepare (active)
        Close callback: (nil)
        Data: 0x7f40740a2950
        (First field): 0x7f40740c6eb0
[0x7f40740cb470] check (active)
        Close callback: (nil)
        Data: 0x7f40740a2950
        (First field): 0x7f40740c6eb0
[0x7f40740c6f70] timer (active)
        Close callback: 0x800000000000000
        Data: 0x7f40740c6eb0
[0x7f407c0c9ff0] async (active)
[0x7f40740d2c60] async (active)
        Close callback: 0x7f407c09b601
        Close callback: 0x7f407409b701
        Data: 0x7f407c0c9f30
        Data: 0x7f40740d2ba0
uv loop at [0x7f408bbfdad8] has 4 open handles in total
uv loop at [0x7f408b3fbad8] has 4 open handles in total
uv loop at [0x7f40b9bf9ad8] has open handles:
[0x7f409c0b9a90] prepare (active)
node[78601]: ../src/debug_utils.cc:322:void node::CheckedUvLoopClose(uv_loop_t*): Assertion `0 && "uv_loop_close() while having open handles"' failed.
        Close callback: (nil)
node[78601]: ../src/debug_utils.cc:322:void node::CheckedUvLoopClose(uv_loop_t*): Assertion `0 && "uv_loop_close() while having open handles"' failed.
        Data: 0x7f409c0c1ff0
        (First field): 0x7f409c0c5fe0
[0x7f409c0c0500] check (active)
        Close callback: (nil)
        Data: 0x7f409c0c1ff0
        (First field): 0x7f409c0c5fe0
[0x7f409c0c60a0] timer (active)
        Close callback: 0x800000000000000
        Data: 0x7f409c0c5fe0
[0x7f409c0c9fc0] async (active)
        Close callback: 0x7f409c09b501
        Data: 0x7f409c0c9f00
uv loop at [0x7f40b9bf9ad8] has 4 open handles in total
uv loop at [0x7f408bffead8] has open handles:
[0x7f40840ba1f0] prepare (active)
        Close callback: (nil)
node[78601]: ../src/debug_utils.cc:322:void node::CheckedUvLoopClose(uv_loop_t*): Assertion `0 && "uv_loop_close() while having open handles"' failed.
        Data: 0x7f40840c1d00
        (First field): 0x7f40840cc3e0
[0x7f40840c0430] check (active)
        Close callback: (nil)
        Data: 0x7f40840c1d00
        (First field): 0x7f40840cc3e0
[0x7f40840cc4a0] timer (active)
        Close callback: 0x800000000000000
        Data: 0x7f40840cc3e0
[0x7f40840ce520] async (active)
        Close callback: 0x7f408409b701
        Data: 0x7f40840ce460
uv loop at [0x7f408bffead8] has 4 open handles in total
node[78601]: ../src/debug_utils.cc:322:void node::CheckedUvLoopClose(uv_loop_t*): Assertion `0 && "uv_loop_close() while having open handles"' failed.
uv loop at [0x7f40b97f8ad8] has open handles:
[0x7f40a00c0c70] prepare (active)
        Close callback: (nil)
        Data: 0x7f40a00c1920
        (First field): 0x7f40a00bf880
[0x7f40a00c0cf0] check (active)
        Close callback: (nil)
        Data: 0x7f40a00c1920
        (First field): 0x7f40a00bf880
[0x7f40a00bf940] timer (active)
        Close callback: 0x800000000000000
        Data: 0x7f40a00bf880
[0x7f40a00ce710] async (active)
        Close callback: 0x7f40a009b401
        Data: 0x7f40a00ce650
uv loop at [0x7f40b97f8ad8] has 4 open handles in total
uv loop at [0x7f40b8bf5ad8] has open handles:
[0x7f408c0b9f50] prepare (active)
node[78601]: ../src/debug_utils.cc:322:void node::CheckedUvLoopClose(uv_loop_t*): Assertion `0 && "uv_loop_close() while having open handles"' failed.
uv loop at [0x7f408affaad8] has open handles:
[0x7f40780d6b70] prepare (active)
        Close callback: (nil)
 1: 0x558615d2b370 node::Abort() [node]
uv loop at [0x7f40b8ff6ad8] has open handles:
[0x7f40980c4b20] prepare (active)
 1: 0x558615d2b370 node::Abort() [node]
uv loop at [0x7f40b87f4ad8] has open handles:
[0x7f40900b9c30] prepare (active)
 1: 0x558615d2b370 node::Abort() [node]
uv loop at [0x7f40b9ffaad8] has open handles:
[0x7f40a80bfe30] prepare (active)
 1: 0x558615d2b370 node::Abort() [node]
uv loop at [0x7f408b7fcad8] has open handles:
[0x7f40800d67c0] prepare (active)
 1: 0x558615d2b370 node::Abort() [node]
        Close callback: (nil)
 1: 0x558615d2b370 node::Abort() [node]
        Data: 0x7f408c0c3ba0
 2: 0x558615d2b3f3  [node]
        Close callback: (nil)
 2: 0x558615d2b3f3  [node]
        Close callback: (nil)
 3: 0x558615da74bf  [node]
 4: 0x558615caf908 node::worker::Worker::Run() [node]
 2: 0x558615d2b3f3  [node]
        Close callback: (nil)
 2: 0x558615d2b3f3  [node]
        Data: 0x7f40780d4460
 2: 0x558615d2b3f3  [node]
 3: 0x558615da74bf  [node]
 4: 0x558615caf908 node::worker::Worker::Run() [node]
 5: 0x558615cb0125  [node]
 6: 0x7f40c29b9fa7  [/lib64/libpthread.so.0]
 7: 0x7f40c3701dbf clone [/lib64/libc.so.6]
        Data: 0x7f4090077860
        Close callback: (nil)

PS: this also reproduces even if you don't listen anything in workers and just require uws it causes crash when process.exit is called.
const uWS = require('uWebSockets.js'); // comment this and there will be no crash
const { Worker, isMainThread, threadId, parentPort } = require('worker_threads');
const os = require('os');

if (isMainThread) {
    const workers = os.cpus().map(() => {
        return new Worker(__filename);
    });
    const cleanup = function cleanup() {
        workers.forEach((worker) => {
            worker.postMessage('cleanup');
        });
    };
    process.on('SIGTERM', cleanup);
    process.on('SIGINT', cleanup);
    setTimeout(() => {
        process.exit(0);
    }, 5000);
} else {
    parentPort.on('message', (value) => {
        if (value === 'cleanup') {
            process.exit(0);
        }
    });
}

Is it expected or am I missing something?

I use Cluster for this type of thing and have pretty solid setup including processing SIGTERM events and gracefully shutting down, havent tried worker_thread and wasnt aware it did the same thing as Cluster in handling requests to the same port, I could look into this more

I get the same results you do with the process exiting with errors. Not really sure what is going on with that but my recommendation would be to use Cluster for this, worker_threads  are more for spawning tasks to do cpu work? and Clusters  are for multiple node processes to handle requests.  I will look into this but WorkerThreads are definitely recommended over Cluster. With WorkerThreads there's a clear idea what Node.js does, while Cluster I have no idea what Node.js does and there could be bigger issues.

Whatever Cluster is doing it is doing it right because it does not crash with error, I think it may be doing something to prevent that error, I mean thats what its for to fork node processes to serve requests, but you could probably figure out more what is going on

I updated that code above to show how I use it to auto reload on file change, just update require('uWebSockets.js') to however you have it installed and you should be able to run the code with no issue, try updating the file while app is running to trigger graceful shutdown and reload

I get all kinds of similar issues only starting a basic worker threads example and letting it close down (no server started or anything). This should be fixed and pushed harder as a main feature.

@hst-m In your example you should free uWS instance inside shutdown before killing worker (cluster is a bunch of processes afaik).
In SkeLLLa`s example it can help too but as soon as any worker gets request we can't free uWS in worker, that handled it, for some time.
After uWS.us_listen_socket_close(socket) thread still handles requests (imo it shouldn't but I'm too dumb to dig into C++).
Sample log of dumb test script and reloading of localhost:3000 (same happens under wrk load for all threads):
Thread dumb ID: log msg
703999:  /
703999:  /favicon.ico
703999:  socket close
703999:  /
703999:  /favicon.ico
...
703999:  /
703999:  /favicon.ico

I was able to get (uWebSockets.js 18.13.0 playing around with timeouts between uWS.us_listen_socket_close(socket), uWS.free() and thread termination):

corrupted double-linked list
uv loop at [0x...] has open handles:...
Segmentation fault
Bus error

In some cases it worked fine when delay between last handled request and uWS.free() was long enough (I guess some timeout in native land closes sockets).

Math.random() > 1 ? 'cleanup' : 'apptest' - fast auto shutdown (works) or thread socket closing on request to localhost:3000 with timeout shutdown (works under condition described in previous paragraph), random was used to mix both types of threads to find workaround.
Hope it helps.

@lostrepo I don't know what uWS.free does but looks like it gets called automatically on process exit for uWS.js:
https://github.com/uNetworking/uWebSockets.js/blob/master/src/uws.js#L28

looks like this issue is caused by worker threads not calling uWS.free() because process.on('exit') event only gets called for processes? adding in a uWS.free() in the worker before process.exit(0) fixes the problem

@hst-m In your case timing doesn't matter since you create uWS instance for each 'forked' process (cluster stuff).
In case of worker_threads I don't understand what the flow is.
It happens if we receive connections when we close listen sockets (they still get and handle new connections after closing socket). If we call uWS.free() after some timeout after last connection to listen socket it sometimes works and sometimes doesn't.

In order to support Worker threads, addons need to clean up any resources they may have allocated when such a thread exists. This can be achieved through the usage of the AddEnvironmentCleanupHook() function

It looks like the add-on needs this one instead of using on close

I have tested the above, and if you remove uWS.free and process.on('exit') and instead call that stuff inside AddEnvironmentCleanupHook it shuts down properly.
So I will make this change in next release and hopefully it will work better for everyone.

Can everyone who had this issue try the latest binaries:
npm install uNetworking/uWebSockets.js#binaries


HttpReq - basic auth utility method

I've just wasted an afternoon rediscovering the exact format of the basic authentication header (I am very clever).
It'd be nice to add a basicAuth( String user, String password ) method in HttpReq that sets the header correctly.

On second thoughts, once we start adding util stuff like this where do you stop?
Let's just focus on the bare-bones of functionality enablement, not providing functionality ourselves.


Availability of GFF annotation files

Hi @niconm89,
Thank you for your amazing repo and your super detailed README files. I am super interested in using the data you generated for the drosophila species. So, I am wondering if you have the GFF annotation files available somewhere or if you can share those with me.
I'm specially interested in the gene annotation.
Best regards,

Hi @simonorozcoarias , thank you for your interest in this repository. I still need to complete the loading of commands and READMEs.
I can give your access to the data through this link.
Hi @simonorozcoarias,
Thank you for reaching out and showing interest in our repository. I'm still in the process of completing the loading of commands and READMEs. Meanwhile, I'm happy to provide you with access to the data via this link.
Feel free to explore the data and don't hesitate to reach out if you have any further questions or need assistance.
Best,
Nicolás

Amazing, thank you!!!
Best,
Simon.


[NEW]: Alter icons and style direction itens

please add ss of your changes

All right now??

All right now??

add the screenshots of the UI change

there was a bug in your code so I reverted the change


CAMEL-8708: SOAP marshaling shouldn't fail for Faults that lack an op…

…tional Detail element

The next time can you build the code with checkstyle, see
http://camel.apache.org/building
As it reports formatting issues etc.

Code has been merged. Do mind closing this

Thanks for merging.
Sorry about the formating, I will run checkstyle next time.


[BUTTON IDEA]:Button with Sound

1. Name of button: Button with sound
2. Description: Produces a confirmation sound on clicking
3. Button Type (Animated, Special, etc...):simple
4. Will you work on it?:yes

Hi @palakyadav1807 thank you for your idea but we need to implement the buttons with CSS only, so this idea can not be implemented.

Really sorry , i am new to open source
On Fri, 2 Oct 2020, 11:58 Shahed Nasser<EMAIL_ADDRESS>wrote:

Hi @palakyadav1807 https://github.com/palakyadav1807 thank you for your
idea but we need to implement the buttons with CSS only, so this idea can
not be implemented.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/shahednasser/sbuttons/issues/516#issuecomment-702551851,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQGLKNYB3TV6RCDGY4XGGTLSIVXJBANCNFSM4SBKDZPA
.