Advise on verifying state machines with kani

Hi! Thank you for developing such a great tool!
This is not a request for particular feature. I tried to find a place where to ask questions on kani and I didnt find either of zulip/discord/gh discussions set up so I'm asking here.
I'm trying to verify a protocol which is represented by a number of instances of one state machine. I believe my problem is that the state of this state machine includes collections such as hashmaps, sets and vectors which make verification using kani quite complicated. I was able to move forward past initial struggles by replacing all hash based structures by their emulation on vectors (most of it is based on vector_map crate from one of your examples). I still get poor verification performance  (understandably). Loop unwinding can take really long time (I got up to an hour) and even when it succeeds cmbc fails with out of memory error. Judging by logs most of the unwinding takes place on some vector internals (std alloc, raw vec, std ptr, etc). From what I can see unwinding process doesnt make any benefits from setting -j argument. I tried to tweak unwinding strategy and I couldnt find a sweet spot. Either it fails with an error that harness reached an iteration that was not reached during unwinding or unwinding takes long time with a following cbmc OOM.
What would be the best way to proceed? Is there a way I could replace Vec from std with a stub? In the blog post about stubbing I see only particular functions being replaced and in general I'm not sure what can be the shape of contract that can replace an entire vec. Would be interested in any advice on moving this forward. Thanks in advance!
Worth noting I dont have any relevant unsafe code so if disabling some safety related verification targets can help that would be good. Idea I have now is to replace vectors with fixed size array of Option<T> so it doesnt have to go deep into most of alloc/ptr internals. Not sure if it is a good idea, but thats what I have left

Hi @LizardWizzard. Thanks for trying out Kani!
Vectors can indeed choke Kani's solver. The general strategies I use to address performance issues are:

Try to reduce the amount of non-determinism (introduced using kani::any()). Perhaps even try to eliminate non-determinism entirely, replacing all kani::any() calls with constants, and see if you can get it to converge. Then start introducing non-determinism back to identify where non-determinism is hurting performance.
Try to reduce the input size. For example, if the harness generates non-deterministic vectors of size 10, see if cutting down the size can help. Similarly, if the inputs are 64-bit wide, see if reducing their widths to 8 bits helps.
Try stubbing. Unfortunately, stubbing types (like Vec) isn't supported, but perhaps check if it's possible to stub other functions in the call graph that may be contributing to the poor performance.

Is it possible to share the code? We may be able to suggest workarounds or identify improvements we can make to Kani/CBMC.

Thanks for your response @zhassan-aws!

Yep, I'm trying with constant input without any calls to kani::any, though I'm hoping to use kani::any in the future
As far as I can see that shouldnt be applicable with constant input
Is there a way I can see which function generates the most hassle for kani? Something that looks like cargo-llvm-lines would've been ideal. For now the only option I see is to inspect unwinding logs and factor out most popular function. Is there a better way? Maybe I can contribute something in that regard if the scope looks manageable

Is it possible to share the code? We may be able to suggest workarounds or identify improvements we can make to Kani/CBMC.

Yep, I'm currently in progress of moving everything to arrayvec based collections hoping that it'll make things better, once I finish I'll post an update here with a repo.
Sadly full state machine definition is quite large, all code that can be reached by the harness is above 1k loc (with handrolled fixed size array based collections even more), so maybe thats just too big for kani to chew at once, though I'm ok if the process can eventually succeed even if it takes very long time

Is there a way I can see which function generates the most hassle for kani?

You can pass:
--enable-unstable --cbmc-args --write-solver-stats-to <NAME OF JSON FILE>.json

to dump a statistics log from CBMC. I'm not sure how reliable/helpul it is at the moment though.

I finished transition to arrayvec based maps and sets, however that only lead to cbmc crash caused by internal invariant violation. Here is the error I've got:
Unwinding loop _RNvMNtNtCsd3BvQT1zweK_17accord_playground8protocol7harnessNtB2_7Harness3run.0 iteration 4 file src/protocol/mod.rs line 159 column 33 function protocol::harness::Harness::run thread 0
Unwinding loop _RNvMNtNtCsd3BvQT1zweK_17accord_playground8protocol7harnessNtB2_7Harness3run.0 iteration 5 file src/protocol/mod.rs line 159 column 33 function protocol::harness::Harness::run thread 0
Unwinding loop _RNvMNtNtCsd3BvQT1zweK_17accord_playground8protocol7harnessNtB2_7Harness3run.0 iteration 6 file src/protocol/mod.rs line 159 column 33 function protocol::harness::Harness::run thread 0
--- begin invariant violation report ---
Invariant check failed
File: /tmp/tmp.uBRU9YPKKn/src/util/simplify_utils.cpp:345 function: bits2expr
Condition: el_size_opt.has_value() && *el_size_opt > 0
Reason: Check return value
Backtrace:
cbmc(+0xa16f7e) [0x55a138216f7e]
cbmc(+0xa17f0a) [0x55a138217f0a]
cbmc(+0x69abf) [0x55a137869abf]
cbmc(+0xac1743) [0x55a1382c1743]
cbmc(+0xabff5f) [0x55a1382bff5f]
cbmc(+0xac0d4a) [0x55a1382c0d4a]
cbmc(+0xa882bd) [0x55a1382882bd]
cbmc(+0xa8702f) [0x55a13828702f]
cbmc(+0xabd0b2) [0x55a1382bd0b2]
cbmc(+0xa85127) [0x55a138285127]
cbmc(+0xa85feb) [0x55a138285feb]
cbmc(+0xa8a69a) [0x55a13828a69a]
cbmc(+0xa8a7b9) [0x55a13828a7b9]
cbmc(+0x6375c9) [0x55a137e375c9]
cbmc(+0x637636) [0x55a137e37636]
cbmc(+0x637636) [0x55a137e37636]
cbmc(+0x637636) [0x55a137e37636]
cbmc(+0x637636) [0x55a137e37636]
cbmc(+0x32dd1d) [0x55a137b2dd1d]
cbmc(+0x3e18ec) [0x55a137be18ec]
cbmc(+0x3e1dd5) [0x55a137be1dd5]
cbmc(+0x3e267a) [0x55a137be267a]
cbmc(+0x3921ea) [0x55a137b921ea]
cbmc(+0x395c6e) [0x55a137b95c6e]
cbmc(+0x3980c2) [0x55a137b980c2]
cbmc(+0x39627e) [0x55a137b9627e]
cbmc(+0x3292fc) [0x55a137b292fc]
cbmc(+0x3c5ff3) [0x55a137bc5ff3]
cbmc(+0x3c6463) [0x55a137bc6463]
cbmc(+0x1ece0e) [0x55a1379ece0e]
cbmc(+0x3c64b4) [0x55a137bc64b4]
cbmc(+0x3c6755) [0x55a137bc6755]
cbmc(+0x3c73dc) [0x55a137bc73dc]
cbmc(+0x1c26d3) [0x55a1379c26d3]
cbmc(+0x1c1c4b) [0x55a1379c1c4b]
cbmc(+0x72c50) [0x55a137872c50]
cbmc(+0x7089f) [0x55a13787089f]
cbmc(+0x67a58) [0x55a137867a58]
cbmc(+0x53c34) [0x55a137853c34]
/lib64/libc.so.6(+0x27b8a) [0x7f1781768b8a]
/lib64/libc.so.6(__libc_start_main+0x8b) [0x7f1781768c4b]
cbmc(+0x696fa) [0x55a1378696fa]

--- end invariant violation report ---
Unwinding loop _RNvMNtNtCsd3BvQT1zweK_17accord_playground8protocol7harnessNtB2_7Harness3run.5 iteration 1 file src/protocol/mod.rs line 230 column 33 function protocol::harness::Harness::run thread 0

CBMC failed with status 134
VERIFICATION:- FAILED

Summary:
Verification failed for - protocol::verification::one_transaction
Complete - 0 successfully verified harnesses, 1 failures, 1 total.

Failure happened after 11 minutes and ~65G memory used by cbmc.
The exact commit this is happened on: https://github.com/LizardWizzard/accord-playground/commit/327cc59bf4109e98b796fbf268c4b4eec926077e
Command I used to run kani:
cargo kani --harness one_transaction --features verification --enable-unstable --cbmc-args --write-solver-stats-to one_transaction_stat.json

Kani version is 0.45.0.
Worth noting that at this point code doesnt pass unit tests with known error. So I'd expect kani to report that.
Cbmc generated a coredump, though it is truncated because heap size was huge at the moment of failure. Is there a way kani can use custom cbmc binary? I can try to build cbmc with debug symbols so backtrace is more helpful
I'd appreciate any help/advice on how to move this forward

I suspect the crash is resulting from some overflow as indicated by the extremely high memory usage. I doubt CBMC is able to produce any meaningful result with such high memory usage.
Thanks for sending the code. I'll take a look at it and see if anything can be done.


TopShelf not installing service

I have this code, that when I run, the console says "Configuration Result:
[Success] Name Stuff, [Success] Description Sample Topshelf Host, [Success] ServiceName Stuff
Topshelf v<IP_ADDRESS>, .NET Framework v4.0.30319.42000
Doing stuff
Service started
The Stuff service is now running, press Control+C to exit."
So I went looking for a service named "Stuff" inside the service manager, while the console window was still up. Didn't find anything. What am I doing wrong?
Problem Code.txt

try: yourservice.exe install
It looks like above you just ran the service, which defaults to console mode for debug/testing.

Haha... yep. That was it.


Fix -Wnon-virtual-dtor warning

Fixes a -Wnon-virtual-dtor warning in byuuML.
In file included from byuuML/byuuML.cc:4:
byuuML/byuuML.hh:71:9: warning: 'byuuML::reader' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
  class reader {
        ^
1 warning generated.

Thanks for the fix!

@SolraBizna In case you are interested we have been using byuuML in the jgemu bsnes fork for a while now, thanks a lot for making this!
https://gitlab.com/jgemu/bsnes

Yes, it was very convenient to have this available when nall was being removed. It was an easy decision to use byuuML over attempting to convert code that relied heavily on nall strings. Now the codebase has been translated to the C++ standard library completely, and has become much more standards-compliant overall :).

I did wonder. I'm really glad y'all have found it useful.
nall was fine when the C++ Standard Library still sucked, but in the post-C++11 era it's just baggage. Converting bsnes to use standard stuff is boring, but valuable, work.


nats_jetstream - Unknown revision error

Hi,
When I try to do go get github.com/cloudevents/sdk-go/protocol/nats_jetstream/v2.
I'm facing this error:
go: downloading github.com/cloudevents/sdk-go/protocol/nats_jetstream/v2 v2.0.0-20210811165601-e0fe15f9daeb
go get: github.com/cloudevents/sdk-go/protocol/nats_jetstream/v2@none updating to
<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>invalid version: unknown revision<PHONE_NUMBER>00

I suppose, the problem is with this line - https://github.com/cloudevents/sdk-go/blob/main/protocol/nats_jetstream/v2/go.mod#L8
Could somebody guide me on this? Thanks!

in go, v2.0.0-00010101000000-000000000000 means it is using the v2 of the lib, but it using the replace directive. I need to release the next version and that will unblock you. Doing that now. Thanks!

Sure thing, thank you! I'm closing this issue as I can see the changes in the new release.


Fixing extra space in vcprojs from cmake

@jasonsandlin,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


🚨 issue (security): Critical security configurations have been removed

          **🚨 issue (security):** Critical security configurations have been removed

Important security settings like SECURE_SSL_REDIRECT, SESSION_COOKIE_SECURE, CSRF_COOKIE_SECURE, and HSTS configurations have been removed. These are crucial for production security. Consider restoring these security configurations.
Originally posted by @sourcery-ai[bot] in https://github.com/CrzyHAX91/dropshipv2/pull/9#discussion_r1866185710

`# settings.py
Default CSP Policy
CSP_DEFAULT_SRC = ("'self'",)
Allow loading scripts from self and specific domains
CSP_SCRIPT_SRC = ("'self'", "https://trusted-scripts.example.com")
Allow loading styles from self, Google Fonts, etc.
CSP_STYLE_SRC = ("'self'", "https://fonts.googleapis.com")
Allow loading images from self and specific domains
CSP_IMG_SRC = ("'self'", "https://cdn.example.com")
Allow loading fonts from self and specific domains
CSP_FONT_SRC = ("'self'", "https://fonts.gstatic.com")
Allow connecting to APIs (e.g., WebSockets, AJAX requests)
CSP_CONNECT_SRC = ("'self'", "https://api.example.com")
Allow embedding frames from trusted domains (if necessary)
CSP_FRAME_SRC = ("'self'", "https://embed.example.com")
Optional: Enable CSP violation reporting
CSP_REPORT_URI = "https://your-csp-report-endpoint.com"
`


Icons are no longer colored

Environment data

VS Code version: 1.59 Insiders
Jupyter Extension version (available under the Extensions sidebar): 2021.8.1033311975
Python Extension version (available under the Extensions sidebar): v2021.6.944021595
OS (Windows | Mac | Linux distro) and version: Windows 10
Python and/or Anaconda version: Python 3.9.6
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Jupyter server running: Local | Remote | N/A  local

Expected behaviour
Colored icons like I see while editing on .py file

Actual behaviour
All icons are gray on jupyter notebook

Steps to reproduce:

Logs

Output for Jupyter in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

I believe this is a result from https://github.com/microsoft/vscode/issues/126514, will need to add a css class to inherit icon colors

This should be fixed now:

cc @jrieken


Process PullRequestReviewCommentEvent properly

The PullRequestReviewCommentEvent occurs frequently enough that it would be nice to have a "translated" version of it on the live feed.
To resolve this, you'll need to:

Inspect the structure of a PullRequestReviewCommentEvent; see the Activity API for GitHub's REST API and the REST Endpoint that we hit
Add a case statement for PullRequestReviewCommentEvent in GitHubEventAction.tsx
Process the relevant parameters for the statement that we'd like to generate. I would like to see something like:

@mattxwang commented on pull request #309 in uclaacm/website

Where the author, pull request, and repository are linked.
The relevant file is here:
https://github.com/uclaacm/opensource/blob/7c44795e44d802be8422e79b7ba42f8ab42f8398/components/GitHubEventAction.tsx#L12

Found this nice documentation and sample:
https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads?query=PullRequestReviewCommentEvent#pull_request_review_comment

Just made a test comment on the PR and this is what came in on the wire:
`{
"id": "18373219017",
"type": "IssueCommentEvent",
"actor": {
"id": 16793430,
"login": "devtayls",
"display_login": "devtayls",
"gravatar_id": "",
"url": "https://api.github.com/users/devtayls",
"avatar_url": "https://avatars.githubusercontent.com/u/16793430?"
},
"repo": {
"id": 364504742,
"name": "uclaacm/opensource",
"url": "https://api.github.com/repos/uclaacm/opensource"
},
"payload": {
"action": "created",
"issue": {
"url": "https://api.github.com/repos/uclaacm/opensource/issues/13",
"repository_url": "https://api.github.com/repos/uclaacm/opensource",
"labels_url": "https://api.github.com/repos/uclaacm/opensource/issues/13/labels{/name}",
"comments_url": "https://api.github.com/repos/uclaacm/opensource/issues/13/comments",
"events_url": "https://api.github.com/repos/uclaacm/opensource/issues/13/events",
"html_url": "https://github.com/uclaacm/opensource/pull/13",
"id":<PHONE_NUMBER>,
"node_id": "PR_kwDOFbnmps4s_sbo",
"number": 13,
"title": "Feat(events): add PullRequestReviewComment",
"user": {
"login": "devtayls",
"id": 16793430,
"node_id": "MDQ6VXNlcjE2NzkzNDMw",
"avatar_url": "https://avatars.githubusercontent.com/u/16793430?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/devtayls",
"html_url": "https://github.com/devtayls",
"followers_url": "https://api.github.com/users/devtayls/followers",
"following_url": "https://api.github.com/users/devtayls/following{/other_user}",
"gists_url": "https://api.github.com/users/devtayls/gists{/gist_id}",
"starred_url": "https://api.github.com/users/devtayls/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/devtayls/subscriptions",
"organizations_url": "https://api.github.com/users/devtayls/orgs",
"repos_url": "https://api.github.com/users/devtayls/repos",
"events_url": "https://api.github.com/users/devtayls/events{/privacy}",
"received_events_url": "https://api.github.com/users/devtayls/received_events",
"type": "User",
"site_admin": false
},
"labels": [
    ],
    "state": "open",
    "locked": false,
    "assignee": null,
    "assignees": [

    ],
    "milestone": null,
    "comments": 1,
    "created_at": "2021-10-11T04:09:39Z",
    "updated_at": "2021-10-11T04:16:59Z",
    "closed_at": null,
    "author_association": "NONE",
    "active_lock_reason": null,
    "pull_request": {
      "url": "https://api.github.com/repos/uclaacm/opensource/pulls/13",
      "html_url": "https://github.com/uclaacm/opensource/pull/13",
      "diff_url": "https://github.com/uclaacm/opensource/pull/13.diff",
      "patch_url": "https://github.com/uclaacm/opensource/pull/13.patch"
    },
    "body": "Addresses issue #10 \r\n\r\nAdds `PullRequestReviewComment` to the list of events in `GithubEventAction.tsx` \r\n\r\n",
    "reactions": {
      "url": "https://api.github.com/repos/uclaacm/opensource/issues/13/reactions",
      "total_count": 0,
      "+1": 0,
      "-1": 0,
      "laugh": 0,
      "hooray": 0,
      "confused": 0,
      "heart": 0,
      "rocket": 0,
      "eyes": 0
    },
    "timeline_url": "https://api.github.com/repos/uclaacm/opensource/issues/13/timeline",
    "performed_via_github_app": null
  },
  "comment": {
    "url": "https://api.github.com/repos/uclaacm/opensource/issues/comments/939666941",
    "html_url": "https://github.com/uclaacm/opensource/pull/13#issuecomment-939666941",
    "issue_url": "https://api.github.com/repos/uclaacm/opensource/issues/13",
    "id": 939666941,
    "node_id": "IC_kwDOFbnmps44Ai39",
    "user": {
      "login": "devtayls",
      "id": 16793430,
      "node_id": "MDQ6VXNlcjE2NzkzNDMw",
      "avatar_url": "https://avatars.githubusercontent.com/u/16793430?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/devtayls",
      "html_url": "https://github.com/devtayls",
      "followers_url": "https://api.github.com/users/devtayls/followers",
      "following_url": "https://api.github.com/users/devtayls/following{/other_user}",
      "gists_url": "https://api.github.com/users/devtayls/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/devtayls/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/devtayls/subscriptions",
      "organizations_url": "https://api.github.com/users/devtayls/orgs",
      "repos_url": "https://api.github.com/users/devtayls/repos",
      "events_url": "https://api.github.com/users/devtayls/events{/privacy}",
      "received_events_url": "https://api.github.com/users/devtayls/received_events",
      "type": "User",
      "site_admin": false
    },
    "created_at": "2021-10-11T04:16:59Z",
    "updated_at": "2021-10-11T04:16:59Z",
    "author_association": "NONE",
    "body": "test comment",
    "reactions": {
      "url": "https://api.github.com/repos/uclaacm/opensource/issues/comments/939666941/reactions",
      "total_count": 0,
      "+1": 0,
      "-1": 0,
      "laugh": 0,
      "hooray": 0,
      "confused": 0,
      "heart": 0,
      "rocket": 0,
      "eyes": 0
    },
    "performed_via_github_app": null
  }
},
"public": true,
"created_at": "2021-10-11T04:16:59Z",
"org": {
  "id": 8324381,
  "login": "uclaacm",
  "gravatar_id": "",
  "url": "https://api.github.com/orgs/uclaacm",
  "avatar_url": "https://avatars.githubusercontent.com/u/8324381?"
}

},`


This system does not appear to be a Raspberry Pi

I'm trying to install this software on a Raspberry PI 4 4GB.
when I execute the command:
sudo pip3 install --no-binary :all: https://github.com/FutureSharks/rpi-security/archive/1.5.zip
I get this error:
File "/tmp/pip-install-ys2_2iay/picamera/setup.py", line 109, in run
raise ValueError('This system does not appear to be a Raspberry Pi')
ValueError: This system does not appear to be a Raspberry Pi
Is there anything I'm doing wrong?

Many thanks

How is it related to Telegram Bot API?

@rowland-cook I have created raspberry pi docker image if you are interested - please see my comments on - https://github.com/tdlib/telegram-bot-api/issues/65

@lukaszraczylo How is this related to the question except accidental "Raspberry Pi" mention?

@levlam you are right, I missed the picamera setup part 👍


Atom goes black when moved to another monitor

Prerequisites

[X] Put an X between the brackets on this line if you have done all of the following:

Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description
Screen goes black when moved off monitor which Atom was opened on. Sometimes if "Open in New Window" causes the window to automatically appear on a different monitor, then it is fine. But moving a screen originating from one monitor always causes it to go black when moved to another.

Steps to Reproduce

Open Atom
Right click file and go to "Open in New Window"
Drag screen to other monitor.

Expected behavior: Screen looks normal.
Actual behavior: Screen is black.
Reproduces how often: 100%
Versions
Atom 1.13.1
Xubuntu 14.04.5 LTS kernel 4.4.0-57-generic nvidia drivers
8 monitors, 4 GeForce GTS 550 Ti

Atom 1.0.19

You are on a version of Atom that is more than a year and a half old.  Please update to the latest version of Atom, currently 1.13.1.  If this still occurs, then open a new issue.  Thanks!

Upgraded to 1.13.1. Same issue.

A workaround is moving the main window to the monitor that I want a new window on, opening a new file on that monitor, then moving the main window back to the original monitor.

Do you also get this if you do the same thing with Chrome?

Actually, I did. To fix it, I turned off "Hardware Acceleration" in the Chrome settings. Does Atom have a "Hardware Acceleration" option like Chrome?

Looks like atom --disable-gpu fixes it.

Cool, thanks for the update @ebrian.

@50Wliu Hopefully somebody finds it useful. I'm sure I'm not the only one with multiple GPUs around here. I've also experienced this issue (the Chrome issue) on a few systems, all different hardware. The only thing in common was > 1 GPUs running Linux using proprietary NVIDIA drivers.
Not really sure who is responsible for this bug then. I guess it's either the Chrome engine guys, Xorg guys, or NVIDIA driver guys.

Yeah if it happens in Chrome there's a good chance it happens in Atom - and
other Electron based apps as they use the Chromium fork of Chrome to render
the UI etc.
Are you able to run any 3D games across monitors like that? It's possible
it's a limitation in DirectX or the graphics drivers. I would imagine down
at that level this is a horrible problem to try and solve.
On Fri, Feb 3, 2017 at 2:33 PM Brian Seymour<EMAIL_ADDRESS>wrote:

@50Wliu https://github.com/50Wliu Hopefully somebody finds it useful.
I'm sure I'm not the only one with multiple GPUs around here. I've also
experienced this issue (the Chrome issue) on a few systems, all different
hardware. The only thing in common was > 1 GPUs running Linux using
proprietary NVIDIA drivers.
Not really sure who is responsible for this bug then. I guess it's either
the Chrome engine guys, Xorg guys, or NVIDIA driver guys.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/atom/atom/issues/13737#issuecomment-277380974, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAHQpzwfRoYWb-wB7kwO7kJg1_oo-Xirks5rY6tRgaJpZM4L2upU
.


[WIP] Trace tests to pattern source

Codecov Report

Merging #305 into master will increase coverage by 0.41%.
The diff coverage is 76.66%.

@@             Coverage Diff              @@
##             master     #305      +/-   ##
============================================
+ Coverage     80.47%   80.88%   +0.41%
- Complexity      536      561      +25
============================================
  Files            69       73       +4
  Lines          1603     1690      +87
  Branches        254      274      +20
============================================
+ Hits           1290     1367      +77
- Misses          213      216       +3
- Partials        100      107       +7

Impacted Files
Coverage Δ
Complexity Δ

...idationpipeline/testablesourcefinder/Decompiler.kt
100% <100%> (ø)
3 <3> (?)

...eline/testablesourcefinder/TestableSourceFinder.kt
54.54% <54.54%> (ø)
2 <2> (?)

...pipeline/testablesourcefinder/PatternNameFinder.kt
75% <75%> (ø)
5 <5> (?)

...line/testablesourcefinder/MethodSourceRetriever.kt
88.88% <88.88%> (ø)
2 <2> (?)

...ne/githubinteractor/githubapi/JsonObjectBuilder.kt
100% <0%> (ø)
3% <0%> (ø)
:arrow_down:

.../githubinteractor/webhookevents/CheckSuiteEvent.kt
100% <0%> (ø)
6% <0%> (ø)
:arrow_down:

... and 3 more

Continue to review full report at Codecov.

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


customize

please i need a help.
can someone help me set my local tile server to the osrm-frontend ?

I have a similar demand: I want to display the routing result of osrm-backend and show my own map (consisting of raster .tiff and vector .osm). Both of them is based in local directory.

@martinledoux @bryanibit I think it is too late to answer this question, but it is good to share it for future askers. We need to change in the file src/leaflet_options.js in the module.exports we need to define our routing server path in the following code:
  services: [{
    label: 'Car (fastest)',
    path: 'https://router.project-osrm.org/route/v1'
  }],

As @adhamenaya notes, the current docs explain how to configure osrm-frontend with a local tile store, including an example pointing to localhost:
https://github.com/Project-OSRM/osrm-frontend#changing-backends

Hey @bryanibit, If you're using raster data, it means you're changing the weight of the segment. So you might be displaying along with distance and duration can you help me  #302


Integrate dtls1.3 in s_client and s_server

Another dtls 1.3 specific update. It is dependent on https://github.com/openssl/openssl/pull/22259

Ping @openssl/committers for second review

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

I wonder whether "branch:master" is the right label for this? Do we need a new "branch:feature" label instead?

Could you please fix the CI issues?

Done ✅

Ping @t8m

This pull request is ready to merge

Pushed to the feature/dtls-1.3 branch

Note that I squashed the "fix docnits" commit into the other documentation commit before merge.


Error in SWB workspaces page

Looking into this asap

Should all be fixed now, please let me know if otherwise, or close this ticket if so :)


Create Github Action to publish Docker image

Following this guide: https://docs.github.com/en/actions/guides/publishing-docker-images
Example:
https://github.com/aSemy/google-ddns/releases/tag/v0.0.1
https://github.com/aSemy/google-ddns/pkgs/container/google-ddns
How to create a release:

Create a tag e.g. git tag v0.0.1
Push the tag e.g. git push origin v0.0.1
Create a release https://github.com/conorcunningham/google-ddns/releases/new
The Github Action will build and release a new Docker image

@conorcunningham Can you run through the steps to create a tag and release please? :) I'd like to update the docs and add an example so it's super easy to use this project

@aSemy Sure, I can take a look at this, hopefully this week. Sorry for the tardy reply, but you know, life, kids the universe etc.

@aSemy Better late than never. I tagged and released v0.0.3.


chore: Update build script to output detailed build failures

The build script is failing silently and making it impossible to debug the results.  I tested adding --stream to the build script and it actually seems to be working a little better and at least started showing when errors were logged to the console.
My most common build error is the node-sass binding warning where Sass can't compile because node-sass expects a different version of npm.  These errors aren't showing up in the command line at all without --stream.  It shows lerna success messages but no compiled assets.

[ ] Test case: Error messaging

Add an error to your Sass or JS.
npm run build <component>
The output from the build should show details about the failure.

[x] Test case: Node-sass binding error

If you have nvm installed: nvm use 8 (or any version other than what your node-sass is bound to)
npm run build
The output from the build should show details about the node-sass binding error.

[x] Test case: Build one component

npm run build pfe-cta

[x] Test case: Build multiple components

npm run build pfe-cta pfe-card pfe-band

[ ] Test case: Build all components

npm run build

Ready-for-merge Checklist

[x] Expected files: all files in this pull request are related to one request or issue (no stragglers or scope-creep).
[x] Repository compiles and tests pass.

Merging
Please squash when merging and ensure your commit message uses conventional commit formatting.
Be sure to share your updates with the<EMAIL_ADDRESS>mailing list!

@heyMP Yeah, that's right.  It shouldn't exit, just output the error to the logs.  It's set to continue on fail.

It wasn't even doing that without the --stream flag

Last build passed: https://github.com/patternfly/patternfly-elements/actions/runs/575927118


No files generated and no preview shown

Describe the bug
No code files generated when prompt has finished and no preview of the output is shown.
Link to the Bolt URL that caused the error
http://localhost:5173/chat/24
Steps to reproduce
See video attached
Expected behavior
Expecting the files to be shown in the file explorer on the right, and for the preview to show the generated output.
Screen Recording / Screenshot
https://github.com/user-attachments/assets/2f5eaac7-7fb7-4210-878a-4828bbccb320
Platform

OS: macOS
Browser: Vivaldi (Chrome-based)
Version: Latest pull

Additional context
No response

I see you are using Llama 3.2 3b. Unfortunately from my testing any model smaller than 7 billion parameters doesn't seem to be able to handle the large Bolt.new prompt. So this isn't an issue with the app rather it's the LLM just not being capable enough to produce the necessary output to work with the webcontainer.
If you want something pretty lightweight that still kicks butt, I would try qwen2.5-coder:7b!

Hey @coleam00 thank you. I made this change and increased the context parameter, but I'm still getting the same issue.

Which model are you using @SouthPenninesDT? Smaller models will struggle with this even with the extra context length unfortunately.

Hi, I'm using qwen2.5-coder:7b
On Fri, 8 Nov 2024, 01:51 Cole Medin, @.***> wrote:

Which model are you using @SouthPenninesDT
https://github.com/SouthPenninesDT? Smaller models will struggle with
this even with the extra context length unfortunately.
—
Reply to this email directly, view it on GitHub
https://github.com/coleam00/bolt.new-any-llm/issues/203#issuecomment-2463595957,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASY3I4YTBWJ37NJFYYXFIZTZ7QKJVAVCNFSM6AAAAABRK5AXBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRTGU4TKOJVG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

Huh, I definitely get good results with Qwen 2.5 coder! Sometimes local LLMs still hallucinate though and it's best to just try another time or two, that honestly usually fixes it for me.

No worries @coleam00. I'll try again, thanks for coming back to me this is a great project!

You are welcome, thank you @SouthPenninesDT!


⚠ Slack has degraded performance

In ecb77b0, Slack (https://status.slack.com/api/v2.0.0/current) experienced degraded performance:

HTTP code: 200
Response time: 37 ms

Resolved: Slack performance has improved in 9560951.


Ebitengine changes working directory when you have resources?

Ebitengine Version
v2.6.6
Operating System

[ ] Windows
[X] macOS
[ ] Linux
[ ] FreeBSD
[ ] OpenBSD
[ ] Android
[ ] iOS
[ ] Nintendo Switch
[ ] PlayStation 5
[ ] Xbox
[ ] Web Browsers

Go Version (go version)
1.21.4
What steps will reproduce the problem?
Given this app and a resources/ folder at the same level as main.go:
package main

import (
	"embed"
	"fmt"
	"os"
)

//go:embed resources/*
var resourcesFs embed.FS

func init() {
	wd, _ := os.Getwd()
	fmt.Println("init wd", wd)
}

func main() {
	wd, _ := os.Getwd()
	fmt.Println("main wd", wd)
}

The printed working directory is to my executable.
If you import ebitengine and run, I.e.:
package main

import (
	"embed"
	"fmt"
	"os"

	"github.com/hajimehoshi/ebiten/v2"
)

//go:embed resources/*
var resourcesFs embed.FS

func init() {
	wd, _ := os.Getwd()
	fmt.Println("init wd", wd)
}

func main() {
	wd, _ := os.Getwd()
	fmt.Println("main wd", wd)

	key := ebiten.KeyF1
	fmt.Println("ebit key", key)
}

Now the printed working directory is to the executable/resources.
If you renamed your local resources/ dir to something else (like resources2/) and rerun, now the working directory is back to the executable.
What is the expected result?
The working directory is always the path to my executable's parent regardless of whether ebitengine is imported.
What happens instead?
With ebitengine imported the working directory is now the path to my parent + /resources.
Anything else you feel useful to add?
No response

Now the printed working directory is to the executable/resources.

Could you write the result? What are the results in init and main?

I couldn't reproduce the issue
% go run .
init wd /Users/hajimehoshi/test/test
main wd /Users/hajimehoshi/test/test
ebit key F1

% neofetch
                    'c<EMAIL_ADDRESS>                 ,xNMM.          -------------------------------------
               .OMMMMo           OS: macOS 14.2.1 23C71 arm64
               OMMM0,            Host: Mac15,6
     .;loddo:' loolloddol;.      Kernel: 23.2.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 46 days, 9 hours, 40 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 77 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1800x1169
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Light)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: tmux
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Apple M3 Pro
    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Apple M3 Pro
     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 3434MiB / 18432MiB
       .cooc,.    .,coo:.

Thanks for looking into it -- indeed,
go run .

works fine for me as well. My test app is named "res" and I hit the issue when I do
go build
./res

I simplified the test app above, but without the the ebiten import included my output is
init wd /Users/spaceblack/Documents/dev/go/res

and with it included my output is
init wd /Users/spaceblack/Documents/dev/go/res/resources

Been poking at the source -- I see
internal/glfw/cocoa_init_darwin_m has a function  changeToResourcesDirectory but I'm not sure if it's getting triggered, I don't see what's calling glfwPlatformInit. If you have any pointers let me know and I'll look at it.

I failed to reproduce this even with go build.

Been poking at the source -- I see
internal/glfw/cocoa_init_darwin_m has a function changeToResourcesDirectory but I'm not sure if it's getting triggered, I don't see what's calling glfwPlatformInit. If you have any pointers let me know and I'll look at it.

This logic should be intentional, though this should not happen when the binary is not in a .app directory. I was wondering why this happens in your environment.
https://github.com/glfw/glfw/commit/7302f761d95c3170d4a62d7b7c0ce56bfb701f65
glfwPlatformInit is called at:
https://github.com/hajimehoshi/ebiten/blob/34cdb202769e84bdb1367bf66e2e1aabeef4a420/internal/glfw/init_unix.c#L296

Thanks much for the help, unfortunately I don't know anything about macOS dev but after reading up on bundles, so far one thing has caught my eye:
CFBundleGetMainBundle says

CFBundle creates a main bundle whenever it possibly can, even for unbundled apps.

That has certainly been my experience. As long as there is an executable and a Resources folder present (actually I've been using "resources"; I thought macOS was case sensitive but in this case it seems to be ignored) then the parent is identified as a bundle. The go run . command does not return a main bundle with a Resources folder because it is compiled and run from a temp directory without a resources folder.
Of course, none of that explains why you (and presumably everyone else) is not having this issue occur. But based on my reading of the docs, what is happening on my system seems reasonable. Unfortunately I don't see any details around what "creates a bundle whenever it possibly can." All I can find are the rules around bundles, which would seem to exclude my case, and that one line, which is broadly inclusive but not specific enough for me to say I'm seeing what should be correct behavior.
I have another Mac I might try this on, otherwise I can't think of anything to do but try to find more info around how CFBundleGetMainBundle() is working.


Create SECURITY.md

Hi @GhostsOfHiroshima, could you please complete the file with this project info. As I saw in the file is default text that isn't related ti this project.


Add Cross WOC Banner or Poster

Is your feature request related to a problem? Please describe.
Add Cross WOC Banner or Poster
Describe the solution you'd like
Add Cross WOC to  Banner or Poster

@Ayush7614 Sure, Go for it.


Update badge URL after renaming repository

Why is this needed?

Why is this needed?
Edit: I know it's CI related, but the CI already works on master. So just trying to understand.

We want the badge in the README.md to be relevant :)

Why is this needed?
Edit: I know it's CI related, but the CI already works on master. So just trying to understand.

We want the badge in the README.md to be relevant :)

What is this badge? Sorry I accidentaly closed the PR.

I assume it's what makes this badge work:


DRILL-5888: Remove dependency of SSLConfig on hadoop.security package…

…. This allows jdbc-all-jar to be built without hadoop dependencies.
The original  code used Hadoop's SSLFactory.Mode enum. The same enum is now replicated in
the SSLConfig class.
@arina-ielchiieva  please review

Yes. The property is consumed by SSLConfig which uses that to construct a key name that is looked up in the hadoop config.

Thanks Arina. I removed the unused imports.

One more thing, I have noticed that TestSSLConfig#testInvalidHadoopKeystore() contains the following line
String hadoopSSLFileProp = MessageFormat
         .format(HADOOP_SSL_CONF_TPL_KEY, SSLFactory.Mode.SERVER.toString().toLowerCase());		         .format(HADOOP_SSL_CONF_TPL_KEY, SSLFactory.Mode.SERVER.toString().toLowerCase());

Do we need to replace SSLFactory.Mode.SERVER.toString() here as well?

Yes, I will remove it. Thanks !

+1, LGTM.


ResourceLoader crashes upon upgrading to 1.1.1

Describe the bug
With the default Windows app SDK version of 1.0.3 from the C++/WinRT WinUI 3 in desktop template, instantiating a ResourceLoader works and loads Strings/en-US/Resources.resw normally. After upgrading the SDK to 1.1.1, such an instantiation produces "an application internal exception" of impl::error_out_of_bounds and crashes the app.
Steps to reproduce the bug

Create an unpackaged C++/WinRT WinUI 3 in desktop app.
Create Strings/en-US/Resources.resw.
Upgrade Windows app SDK NuGet package to 1.1.1.
Insiantiate a ResourceLoader.
Debug the app.

Expected behavior
The ResourceLoader is instantiated successfully and the app can proceed.
Screenshots

NuGet package version
1.1.1
Packaging type
Unpackaged
Windows version
Windows 11 version 21H2 (22000)
IDE
Visual Studio 2022
Additional context
No response

Do you have the 1.1.1 runtimes installed? Think this is just another manifestation of #2592.

Do you have the 1.1.1 runtimes installed? Think this is just another manifestation of #2592.

I did go to great lengths to get the latest rumtime packages to install successfully, the output showed it managed to load the runtime package and it did go into the app code until the line that instantiates the ResourceLoader is reached.

Ah ok. Can you zip up/attach your sample project? (just drop the zip into this issue)

SDKTest.zip

I just found out about ResourceLoader::GetForViewIndependentUse but it also throws 0x00000004 "The system cannot open the file", if I change the project to packaged it works.

Indeed what I missed was that I was using "system MRT" with a class name of winrt::Windows::ApplicationModel::Resources::ResourceLoader, after changing to using MRTCore's winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceLoader it can now run. I would suggest giving this a mention somewhere in the documentation, unless it's already been done and I have also missed it. 😅


Created AddTransaction component and basic form structure.

I've added a new component:

AddTransaction.jsx

This component is ready to useState for the transaction name and amount (The transactionName will be the category at present but can be changed accordingly once more elements are added and the transactionAmount is the number the user enters).
This has been tested by adding the  to App.jsx with a valid import path - this works ✅


RMET-3602 ::: Updated libs for 16KB page alignment

Description
Update mlkit and camera libraries to latest version, that have their shared libraries (.so files) 16KB-aligned.
The actual fix is in https://github.com/OutSystems/cordova-outsystems-barcode/pull/33 - this is more to make sure the dependency versions are aligned.
Context

https://outsystemsrd.atlassian.net/browse/RMET-3602
https://outsystemsrd.atlassian.net/wiki/spaces/RDME/pages/4426137659/iOS+18+Android+15+Assessment
https://developer.android.com/guide/practices/page-sizes

Type of changes

[X] Fix (non-breaking change which fixes an issue)
[ ] Feature (non-breaking change which adds functionality)
[ ] Refactor (cosmetic changes)
[ ] Breaking change (change that would cause existing functionality to not work as expected)

Platforms affected

[X] Android
[ ] iOS
[ ] JavaScript

Tests
Refer to https://github.com/OutSystems/cordova-outsystems-barcode/pull/33
Checklist

[ ] Pull request title follows the format RNMT-XXXX <title>
[ ] Code follows code style of this project
[ ] CHANGELOG.md file is correctly updated
[ ] Changes require an update to the documentation

[ ] Documentation has been updated accordingly

@OS-pedrogustavobilro we should also update the version of the library in the pom.xml file so we can update and test it in the Cordova plugin.

@alexgerardojacinto can't reply directly to your comment don't know why.
I updated the dependencies on the cordova plugin, since it was already declared there, so technically we don't need to generate a new .aar - Just pointing to the branch of this PR is enough https://github.com/OutSystems/cordova-outsystems-barcode/pull/33

@alexgerardojacinto can't reply directly to your comment don't know why.
I updated the dependencies on the cordova plugin, since it was already declared there, so technically we don't need to generate a new .aar - Just pointing to the branch of this PR is enough OutSystems/cordova-outsystems-barcode#33

@OS-pedrogustavobilro we will need to generate a new .aar with these changes so that we can update the .aar version that is referenced in the Cordova plugin. We don't need to generate the .aar right now, but we should update the version of the library in the pom.xml file.


feat(traverse): CombinedTraverse type to compose Traverses

Implements the CombinedTraverse type discussed in https://github.com/oxc-project/oxc/pull/3216#issuecomment-2103070633. This type and the accompanying combine_traverses! macro allow composing multiple traverses/transforms with minimal boilerplate.
I am actually not sure if this is a good idea or not. The API is nice I think, but it may blow up compile times.

#3219  👈
main

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

Join @overlookmotel and the rest of your teammates on  Graphite

Can we combine multiple Traversers ( >2 )?

Can we combine multiple Traversers ( >2 )?

Yes!
let all_five = combine_traverses!(
    MyTraverse1::new(),
    MyTraverse2::new(),
    MyTraverse3::new(),
    MyTraverse4::new(),
    MyTraverse5::new(),
);

https://github.com/oxc-project/oxc/blob/2ff2eb883ca485ef1895b3a142d69ac307e8d5f8/crates/oxc_traverse/src/lib.rs#L210-L287

Crazy! Let's hop on a call every time we gonna add 3000 lines of code 😛

Crazy!

Can I take that as "no way we're going to merge this nonsense"?
Well I did say "I am actually not sure if this is a good idea". It's just responding to Dunqing's request for a less verbose API in #3216.
And the joy of codegens is you can generate 3000 lines of code in about 20 mins! 😆

Let's refine the infra once all tests passes so we have the whole picture of the current infra.


[BE-4328] Fixes convertion of subqueries in on condition of join.

Associated Bodo PR: https://github.com/Bodo-inc/Bodo/pull/4989
The original PR fixed the issue of incorrect rexInputRefs being created whenever there were sub queries in the joins. However, there were additional issues when converting the value of the subquerry itself that were not caught.

@keatoooon Do you know why CI is failing? I'd like to wait to approve until after CI is working.

CI failure was due to a style issue, but the style tester doesn't fail locally, going to re-run and see if it fixes it.


Remove conditionals from Maxpool kernels coming from support of shallow depths

@mywoodstock, is this issue still relevant? Esp. after maxpool 2.0 + other improvements?
cc: @acejkov


SOAP or HTTP request body encryption between two Zuul proxies

Hello. I am facing a problem with Zuul "pre" filter.
In my solution I have two proxies. One proxy runs at the client side, and another inside of our data-center. The client issues SOAP messages in their own server to the first Zuul proxy, and that proxy forwards the request to the second Zuul proxy which is in our data center. The second Zuul proxy forwards these SOAP requests to the real Spring-WS node.
Everything works fine until some point. I can forward all SOAP and HTTP requests, and have written good "post" filters to alter response body so that everything fits the architecture design and request flows.
The only problem is, I want to encrypt the body of the SOAP requests between these two Zuul proxies. Whatever I have done today doesn't work.
I created two "pre" filters at both of the proxies. The client side "pre" filter encrypts the body, and the server side proxy must decrypt it and forward to the service registry for proper handling.
I tried example from this URL:
https://github.com/spring-cloud-samples/sample-zuul-filters/blob/master/src/main/java/org/springframework/cloud/samplezuulfilters/UppercaseRequestEntityFilter.java
I handle the request at the server side Zuul proxy and see that actually body is not changed in the first proxy.
I this this code for altering request body at the first proxy:
@Override
    public Object run() {

        try {
            RequestContext context = getCurrentContext();
            InputStream in = (InputStream) context.get("requestEntity");
            if (in == null) {
                in = context.getRequest().getInputStream();
            }
            String body = StreamUtils.copyToString(in, Charset.forName("UTF-8"));
            // body = "request body modified via set('requestEntity'): "+ body;
            body = body.toUpperCase();
            context.set("requestEntity", new ByteArrayInputStream(body.getBytes("UTF-8")));
        }
        catch (IOException e) {
            rethrowRuntimeException(e);
        }
        return null;
    }

And this code for handling the request at the second proxy:
@Override
    public Object run() {
        RequestContext ctx = RequestContext.getCurrentContext();

        try (final InputStream inputStream = ctx.getRequest().getInputStream()) {
            //BufferedReader reader = ctx.getRequest().getReader();

            if (inputStream != null) {
                final String requestData = CharStreams.toString(new InputStreamReader(inputStream, "UTF-8"));
                System.out.println(requestData);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

The server side Zuul proxy handles the initial - unchanged body.
I tried ctx.setRequest and push in my own HttpServletRequest, didn't work either.

No one really answered this question, I had the same issue and found this through a Google search.
This worked for me
RequestContext context = getCurrentContext();
InputStream in = (InputStream) context.get("requestEntity");
if (in == null) {
in = context.getRequest().getInputStream();
}
String body = StreamUtils.copyToString(in, Charset.forName("UTF-8"));
body = "request body modified via request wrapper: "+ body;
byte[] bytes = body.getBytes("UTF-8");
context.setRequest(new HttpServletRequestWrapper(getCurrentContext().getRequest()) {
@Override
public ServletInputStream getInputStream() throws IOException {
return new ServletInputStreamWrapper(bytes);
}
			@Override
			public int getContentLength() {
				return bytes.length;
			}

			@Override
			public long getContentLengthLong() {
				return bytes.length;
			}
		});


Event types are any in the event store reducer, and when using EventTypesDetails

Describe the bug
Hi guys,
I'm just trying out your library, putting together a POC. When defining the reducer, or when using the EventTypesDetails type the resulting type is any. I've included my code below.
import { Aggregate, EventStore, EventType, EventTypesDetails } from '@castore/core';

const orderCreatedEventType = new EventType<'OrderCreated', { price: number }, { correlationId: string }>({
    type: 'OrderCreated',
});

const orderCompletedEventType = new EventType<'OrderCompleted', { price: number }, { correlationId: string }>({
    type: 'OrderCompleted',
});

type OrderAggregate = Aggregate & {
    price: number;
    status: 'created' | 'processed' | 'completed';
};

type OrderEventDetails = EventTypesDetails<[typeof orderCreatedEventType, typeof orderCompletedEventType]>;

export const userEventStore = new EventStore({
    eventStoreId: 'Order',
    eventStoreEvents: [orderCreatedEventType, orderCompletedEventType],
    reduce: (state: OrderAggregate, event) => {
        switch (event.type) {
            case 'OrderCreated':
                return { ...state, price: event.data.price, status: 'created' };
            case 'OrderCompleted':
                return { ...state, price: event.data.price, status: 'completed' };
            default:
                return state;
        }
    },
});

Expected behavior
I'm expecting the event argument in the reduce function to be strongly typed with the correct events. Similarly i'm expecting OrderEventDetails to be the correct type, instead it is any.
Additional context
I've tried on multiple versions of Typescript with the same issue occurring on all of them.

It works if you add these Types - still to much work as everything needs to be defined twice:
type orderCreatedEventDetail = EventDetail<'OrderCreated', { price: number }, { correlationId: string }>;
type orderCompletedEventDetail = EventDetail <'OrderCompleted', { price: number }, { correlationId: string }>;
type oderEventDetails = orderCreatedEventDetail | orderCompletedEventDetail;

reduce: (state: OrderAggregate, event: oderEventDetails) => {

an other option I have found is to use the zod-event helper:
const orderCompletedEventType =new ZodEventType({
   type: 'OrderCompleted',
  payloadSchema: z.object({price:z.number()}).strict(),
  metadataSchema: z.object({correlationId:z.string()}).strict()
});
// @ts-ignore: Object is possibly 'null'.
type orderCreatedEventDetail = typeof orderCompletedEventType._types.detail

not perfect but less duplicated content

Hey @Mattinton ! I don't have any issue on my side:

I have a small idea on where it might come from, I realised recently that we forgot to set ts-toolbelt as a dependency in castore/core (for the moment it's only a devDependency). Does it work if you add the dependency ?

@Mattinton I updated the package.json to include ts-toolbelt as a dependency in 1.19.1 ! Can you try with this version ?

@Mattinton Closing this issue to keep a clear view of the project ! Feel free to re-open it if the pb still arises !


DEV2-2537: IJ plugin should install the binaries from the self-hosted updsate service

Tested locally:
Was able to get the version, download and run TabNine
00:00:00 /home/assaf/.tabnine/4.4.277/x86_64-unknown-linux-musl/TabNine --client IntelliJIDEA --no-lsp true --cloud2_url=http://localhost:3000 --client-metadata pluginVersion=1.0.0 clientIsUltimate=false clientChannel=onprem pluginUserId=ca109c96-95ad-49dc-ae13-a36185156caa debounceValue=300 clientVersion=2019.3 clientApiVersion=IC-193.5233.102 ide-restart-counter=0

lgtm, well done for winning this battle with java 💪🏻

Thanks for the help ❤


是否有排序功能?

初次接触Hexo，打算使用您的主题制作一个帮助文档，请问在左边挂件显示的文章和分类是否可以自定义排序？

Oh, it default sorted by article title and category name, so you can let your article and category like this:
_posts/1-xxxx/1.1-xxxx.md
_posts/1-xxxx/1.2-xxxx.md
_posts/2-xxxx/2.1-xxxx.md
_posts/2-xxxx/2.2-xxxx.md

and so on, it will be sorted.

谢谢，期待推出文章与目录的排序功能~目前我找到了文章的排序插件，分类目录暂时未找到~

@zimaoxy 请问能告知一下插件名吗？
@zthxxx  顺便问一下，我已经按照序号给文章命名了，然而...总是会在出现一些错误，比如下图：

@zimaoxy 方便告知一下文章排序插件吗？我也在找但没找到~谢谢

@zimaoxy 谢谢。之所以删了回复是因为后面决定直接更改文件名来排序了~不过您的回复依旧很有帮助.

I have sorted my article title name but it seem no to work. The article order in categories sidebar  still be wrong, this are snapshoots of wrong in article Problem：Problem

@maksyuki
because it's order by Folder name or File name, rather than Title name in the MD front matter.
see this:

also recommend to using name format like 1-2-xxxx.md, if u want a order list.
using symbol - instead of . in file name

Thanks~


Fix bug for entirely empty chunks of rows

This PR adds a check that the set of valid dates isn't empty before attempting to use this to update the temporal bounds. This comes from a weird edge where a chunk of rows contains entirely "NA" and so every single entry is ignored
I haven't added a test to demonstrate that this works, if you think of an appropriate one let me know.

I guess a test would be to have an in-memory workbook with a couple of NA rows and then set the chunksize to 1 or 2 to keep it small?

Codecov Report

Merging #83 (79df8e5) into release/3.0.0 (b5b021a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@                Coverage Diff                @@
##           release/3.0.0      #83      +/-   ##
=================================================
+ Coverage          69.00%   69.02%   +0.02%
=================================================
  Files                 12       12
  Lines               3639     3642       +3
=================================================
+ Hits                2511     2514       +3
  Misses              1128     1128

Files Changed
Coverage Δ

safedata_validator/field.py
93.50% <100.00%> (+0.02%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Added a test for "NA" data entries for the DatetimeField. I had to change how the consistency checking is done as this was producing "Date or datetime data mixes ISO string and time formatted rows" errors when it shouldn't.
I also added a similar test + change to the consistency checking for the TimeField as this field uses a very similar logic.
Considered adding similar tests for the other fields but that felt like a real rabbit hole for an edge case.


Level Tutorial link changed to button

"Level Tutorial" is now styled with the next-button class. Closes #26

looks good! just one thing though: when the 'level tutorial' button is pressed, the appearance goes back to the way it was when it was a hyperlink, which might look a little weird:
before press:

after press:

do u think u can fix this issue? ty!

Fixed!


always use the bundle associated with the built branch for integratio…

…… (#678)

always use the bundle associated with the built branch for integration test executions

move logic to download custom bundle to staging makefile

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@danbudris can I merge?


Kubernetes agent didn't populate Kubernetes service to Rancher correctly

Rancher versions:
rancher/server: v1.6.11-rc3
kubernetes (if applicable): 1.8
when the call to Rancher API to add the kubernetes services fails for any reason the service doesn't get populated ever:
time="2017-10-11T19:00:33Z" level=info msg="Received event: [ADDED] for Service: default/tea-svc, Handling event."
time="2017-10-11T19:00:33Z" level=error msg="Error Handling event: [ADDED] for Service default/tea-svc: Post https://x.x.x.x:8080/v2-beta/externalserviceevents: EOF"

The only way to repopulate the service is to delete and recreate it:
time="2017-10-11T19:17:50Z" level=info msg="Received event: [DELETED] for Service: default/tea-svc, Handling event."
time="2017-10-11T19:18:01Z" level=info msg="Received event: [ADDED] for Service: default/tea-svc, Handling event."

We should add a retry to kubernetes agent for the service add event handler.

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.


tower --port option not recognized

I used to be able to boot up my app like so: tower --port 3000
I have not touched my install or config at all, but now it just wont boot
error: unknown option `--port'

So I did the drastic thing and completely nuked my nodejs/npm install and started over. This time I installed v0.6.12 in my local dir and I can happily install modules without sudo, however I still cannot boot the tower server.
Sidenote: In the --help option for the tower command there is no mention of server or port. Pretty big thing to omit

To boot the tower server, all you need to do is:
node server

You can also type:
tower server -p 3000

Let me know if that works.

Working. Thanks!


[Bug]: oc hook set creating symlink at "root" on Windows

Opencommit Version
1.1.39
Node Version
v18.13.0
NPM Version
9.6.3
What OS are you seeing the problem on?
Windows
What happened?
Running oc hook set will create the hook symlink file prepare-commit-msg at "root".
I'm running at oc version 1.1.39 and dev branch.
Expected Behavior
The hook symlink file should be created in the current git repo hook directory.
Current Behavior
Running oc hook set will create the hook symlink file prepare-commit-msg at C:\.git\hooks\prepare-commit-msg.

This can also be seen in the log output. Though it looks fine because the hook file is created, but it is created in the wrong place.
From what I could tell from the code, it's because there is a path separator at the start of SYMLINK_URL. So when creating the symlink, it creates \.git\hooks\prepare-commit-msg instead of .git\hooks\prepare-commit-msg.
Possible Solution
Remove the separator variable, because path.join already ensures the correct path separator is used.
I already tested this with the separator variable removed, npm run dev --hook set worked as expected, prepare-commit-msg is created at .git\hooks, and git commit also calls the hook.
Steps to Reproduce
Run oc hook set.
Relevant log output
┌  setting opencommit as 'prepare-commit-msg' hook at \.git\hooks\prepare-commit-msg
│
└  ✔ Hook set

thanks, removed the separator


Opening the app, the list of aliases is not updated

As in the title. I think that when the user opens the app, it's supposed to see an updated status of his aliases list, so the app should probably make a sync at the launching. The user needs to manually swipe down the list from the top, to see updated list of aliases created by SL keyboard, or by other client, or via web app.
TF build 20028.

Opening an app can have 2 scenarios:

App is killed: app is launched and it will load the latest list of aliases
App is in background: app goes back to foreground and it does nothing.

I think you're talking about the 2nd scenario. Can you confirm please?

Okay, I see. Real time sensitive apps like facebook, such behaviour is expected but in the case of a simple app like SL it's not really necessary in my opinion. Take the SL web app for example, an equivalent of what you are talking about is to have the web app refreshes itself every time you go back to SL tab from another tab.


Development: Rabi UI

I would love to hear your reviews and suggestions about this project. Please don't hesitate 😊

remove outline effect of search bar and search button

remove outline effect of search bar and search button

Done. It looks great now. Thanks.

Everything looks fine, these are some of my suggestions,

Add Text decoration: none  to anchor tags
You might wanna align the search Bar to little left, if possible, you could change the outline/Border color of the Search Icon

If you are talking about footer anchor tags, I have intentionally kept them like that because I want the user to understand that those are links and not text. ( I got this idea from React Day Bangalore)
I removed the outline of search components.

Thanks for reviewing.

Hi @tuhindas30,
Great work man!
Loved your Library, especially, your focus effect on input boxes or buttons. Bohot mast!
Few comments after nitpicking are:

give icons the same hover & focus effect. As they are clickable too.
add something to indicate an active item on your navigation bar.

Hi @tuhindas30,
Great work man!
Loved your Library, especially, your active/focus effect on input boxes or buttons. Border+ Box-shadow looks great. Bohot mast!
Few comments after nitpicking are:

give icons the same hover and active/focus effect and cursor: pointer As they are clickable too.
add something to indicate an active item on your navigation bar.

I have added a few comments on the code directly as well. Again, nothing very serious. Just some small stuff. :)

Hi @purvasheth,
Thanks for such a nice and beautiful compliment. I got elated somehow. I will surely try out your suggestions, they sounds interesting.

@tuhindas30 Beautifully written code! Very organized.
Just small suggestion to ensure consistency with units in components and code clean with removing commented out code if not required. These are just some good practices to follow.
Rest all is really awesome!

Thanks @py93 for reviewing my code. I will surely update the code and follow the practices in future.


feat(socketioxide): disconnect handler

Currently there is no way for the end user to execute code when the socket is disconnected.
Now, it will be possible to add an handler executed when the socket is disconnected:

Gracefully from the server
Gracefully from the client
When the transport closed or crashed

There will be a DisconnectReason enum provided so the user knows what caused the disconnect event.
Steps :

[x] on_disconnect handler on socketioxide Socket.
[x] DisconnectReason on engineioxide
[x] DisconnectReason on socketioxide
[ ] Errors provided for TransportError variant on the DisconnectReason

Is there currently (in version 0.3.0) at least a way to check, whether a given socket is open or closed? (I don't see any.)
I see that there is a way on the main branch (e.g. trying to send and using the returned result), but that is not yet released onto crates.io. When do you plan to release the next version?

I plan to release it as soon as PRs #59, #56 and this one are merged


Remove import React from code samples

In my testing yarn build is failing as React is already imported.

Pre-flight checklist

[x] I have read the Contributing Guidelines on pull requests.
[ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
[ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs

Hi! The examples here are JSX, not MDX. You should self-knowingly remove the import if you are in an MDX file, but if you are in a JSX file, not adding the import would error.

I see, thanks @Josh-Cena !


Clangd treats my .cpp files as c files: Reports errors when using any c++ functions

I have clangd set up and working properly for .c files. But When testing it with a c++ file, it seems to treat it as if it is still a c file.
It gives me autocompletion for some of the c++ headers, but whenever I use a function specific to c++ (like std::cout) it complains about it or gives me an error.
This is the line I get when trying to do #include
In included file: Error in C++ Standard Library usage [pp_hash_error]
Below are some screenshots of the error messages I get

I have tried putting -xc++ and -std=c++20 inside of a compile_flags.txt file to see if that makes a difference, but it just gives me this error.
Invalid argument '-std=c++20' not allowed with 'C' [drv_argument_not_allowed_with]
System information
Output of clangd --version:
clangd version 17.0.3 (https://github.com/llvm/llvm-project 888437e1b60011b8a375dd30928ec925b448da57)
Features: windows+grpc
Platform: x86_64-pc-windows-msvc
Editor/LSP plugin:
neovim: lsz_zero
Operating system:
Windows 10

Can you share a complete clangd log please?

[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.263] <<< {"id":2,"jsonrpc":"2.0","method":"shutdown"}\r\n\r\nI[21:50:09.263] <-- shutdown(2)\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'I[21:50:09.263] --> reply:shutdown(2) 0 ms\r\nV[21:50:09.263] >>> {"id":2,"jsonrpc":"2.0","result":null}\r\n\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.264] <<< {"jsonrpc":"2.0","method":"exit"}\r\n\r\nI[21:50:09.264] <-- exit\r\nI[21:50:09.264] LSP finished, exiting with status 0\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"I[21:50:09.792] clangd version 17.0.3 (https://github.com/llvm/llvm-project 888437e1b60011b8a375dd30928ec925b448da57)\r\nI[21:50:09.793] Features: windows+grpc\r\nI[21:50:09.793] PID: 13692\r\nI[21:50:09.793] Working directory: W:\test\r\nI[21:50:09.793] argv[0]: C:\Users\Ahmed\AppData\Local\nvim-data\mason\packages\clangd\clangd_17.0.3/bin/clangd.exe\r\nI[21:50:09.793] argv[1]: --header-insertion=never\r\nI[21:50:09.793] argv[2]: --log=verbose\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.796] User config file is C:\Users\Ahmed\AppData\Local\clangd\config.yaml\r\nI[21:50:09.797] Starting LSP over stdin/stdout\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.797] <<< {"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"offsetEncoding":["utf-8","utf-16"],"textDocument":{"callHierarchy":{"dynamicRegistration":false},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"dynamicRegistration":false,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true,"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits","sortText","filterText","insertText","textEdit","insertTextFormat","insertTextMode"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]},"contextSupport":true,"dynamicRegistration":false,"editsNearCursor":true,"insertTextMode":1},"declaration":{"linkSupport":true},"definition":{"linkSupport":true},"documentHighlight":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":false},"implementation":{"linkSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"references":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false,"prepareSupport":true},"semanticTokens":{"augmentsSyntaxTokens":true,"dynamicRegistration":false,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":true,"requests":{"full":{"delta":true},"range":false},"serverCancelSupport":false,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"linkSupport":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":false}},"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeWatchedFiles":{"dynamicRegistration":false,"relativePatternSupport":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":false,"hierarchicalWorkspaceSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceEdit":{"resourceOperations":["rename","create","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Neovim","version":"0.9.4"},"initializationOptions":{},"processId":6728,"rootPath":"W:\\test","rootUri":"file:///W:/test","trace":"off","workspaceFolders":[{"name":"W:/test","uri":"file:///W:/test"}]}}\r\n\r\nI[21:50:09.797] <-- initialize(1)\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"I[21:50:09.799] --> reply:initialize(1) 2 ms\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.799] >>> {"id":1,"jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"foldingRangeProvider":true,"hoverProvider":true,"implementationProvider":true,"inactiveRegionsProvider":true,"inlayHintProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","definition","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","usedAsMutablePointer","constructorOrDestructor","userDefined","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","modifier","operator","bracket","label","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"standardTypeHierarchyProvider":true,"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"offsetEncoding":"utf-8","serverInfo":{"name":"clangd","version":"clangd version 17.0.3 (https://github.com/llvm/llvm-project 888437e1b60011b8a375dd30928ec925b448da57) windows+grpc x86_64-pc-windows-msvc"}}}\r\n\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.800] <<< {"jsonrpc":"2.0","method":"initialized","params":{}}\r\n\r\nI[21:50:09.800] <-- initialized\r\nV[21:50:09.800] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"cpp","text":"#include \r\n\r\nint main() {\r\n    std::cout << \"Hello World\\n\";\r\n    return 0;\r\n}\r\n","uri":"file:///W:/test/test.cpp","version":0}}}\r\n\r\nI[21:50:09.800] <-- textDocument/didOpen\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.801] config note at C:\Users\Ahmed\AppData\Local\clangd\config.yaml:1:0: Parsing config fragment\r\nV[21:50:09.801] config note at C:\Users\Ahmed\AppData\Local\clangd\config.yaml:1:0: Parsed 1 fragments from file\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.801] Config fragment: compiling C:\Users\Ahmed\AppData\Local\clangd\config.yaml:1 -> 0x00000164B52D3C70 (trusted=true)\r\nI[21:50:09.801] --> textDocument/publishDiagnostics\r\nV[21:50:09.801] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Ahmed/AppData/Local/clangd/config.yaml"}}\r\n\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"I[21:50:09.801] Loaded compilation database from W:\test\compile_flags.txt\r\nV[21:50:09.801] Broadcasting compilation database from W:\test\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'I[21:50:09.802] ASTWorker building file W:\test\test.cpp version 0 with command \r\n[W:\test]\r\n"C:\\Users\\Ahmed\\AppData\\Local\\nvim-data\\mason\\packages\\clangd\\clangd_17.0.3\\bin\\clang-tool" -xc++ -I include -L lib -xc -Wunused-variable -Wall "-resource-dir=C:\\Users\\Ahmed\\AppData\\Local\\nvim-data\\mason\\packages\\clangd\\clangd_17.0.3\\lib\\clang\\17" -- "W:\\test\\test.cpp"\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.809] Ignored diagnostic. argument unused during compilation: '-Llib'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.810] Driver produced command: cc1 -cc1 -triple x86_64-pc-windows-msvc19.38.33133 -fsyntax-only -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic "-fcoverage-compilation-dir=W:\\test" -resource-dir "C:\\Users\\Ahmed\\AppData\\Local\\nvim-data\\mason\\packages\\clangd\\clangd_17.0.3\\lib\\clang\\17" -I include -internal-isystem "C:\\Users\\Ahmed\\AppData\\Local\\nvim-data\\mason\\packages\\clangd\\clangd_17.0.3\\lib\\clang\\17\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.38.33130\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.38.33130\\atlmfc\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.20348.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.20348.0\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.20348.0\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.20348.0\\winrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.20348.0\\cppwinrt" -Wunused-variable -Wall "-fdebug-compilation-dir=W:\\test" -ferror-limit 19 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.38.33133 -fdelayed-template-parsing -no-round-trip-args -faddrsig -x c "W:\\test\\test.cpp"\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.810] Building first preamble for W:\test\test.cpp version 0\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.827] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'namespace'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.842] Dropped diagnostic: W:\test\test.cpp: in included file: expected ';' after top level declarator\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.845] Dropped diagnostic: W:\test\test.cpp: in included file: expected function body after function declarator\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.846] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.846] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.846] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.846] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.847] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.847] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.847] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.847] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.848] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.848] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.848] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.848] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.848] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.849] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:09.849] Dropped diagnostic: W:\test\test.cpp: in included file: unknown type name 'FILE'\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"I[21:50:09.969] Built preamble of size 2720800 for file W:\test\test.cpp version 0 in 0.16 seconds\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'I[21:50:09.970] --> workspace/semanticTokens/refresh(0)\r\nV[21:50:09.970] >>> {"id":0,"jsonrpc":"2.0","method":"workspace/semanticTokens/refresh","params":null}\r\n\r\n'
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"I[21:50:09.970] Indexing c17 standard library in the context of W:\test\test.cpp\r\n"
[ERROR][2024-03-07 21:50:09] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	'V[21:50:09.970] <<< {"id":0,"jsonrpc":"2.0","result":null}\r\n\r\nI[21:50:09.970] <-- reply(0)\r\n'
[ERROR][2024-03-07 21:50:10] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:10.000] indexed preamble AST for W:\test\test.cpp version 0:\r\n  symbol slab: 4487 symbols, 1475288 bytes\r\n  ref slab: 0 symbols, 0 refs, 136 bytes\r\n  relations slab: 0 relations, 24 bytes\r\n"
[ERROR][2024-03-07 21:50:10] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:10.010] indexed file AST for W:\test\test.cpp version 0:\r\n  symbol slab: 1 symbols, 4456 bytes\r\n  ref slab: 1 symbols, 1 refs, 4256 bytes\r\n  relations slab: 0 relations, 24 bytes\r\nV[21:50:10.010] Build dynamic index for main-file symbols with estimated memory usage of 11536 bytes\r\n"
[ERROR][2024-03-07 21:50:10] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"I[21:50:10.010] --> textDocument/publishDiagnostics\r\nV[21:50:10.010] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_hash_error","message":"In included file: Error in C++ Standard Library usage","range":{"end":{"character":10,"line":0},"start":{"character":9,"line":0}},"relatedInformation":[{"location":{"range":{"end":{"character":6,"line":27},"start":{"character":1,"line":27}},"uri":"file:///C:/Program%20Files/Microsoft%20Visual%20Studio/2022/Community/VC/Tools/MSVC/14.38.33130/include/yvals_core.h"},"message":"Error occurred here"}],"severity":1,"source":"clang"},{"code":"fatal_too_many_errors","message":"Too many errors emitted, stopping now","range":{"end":{"character":0,"line":0},"start":{"character":0,"line":0}},"relatedInformation":[],"severity":1,"source":"clang"},{"code":"expected_semi_after_expr","message":"Expected ';' after expression (fix available)","range":{"end":{"character":9,"line":3},"start":{"character":7,"line":3}},"relatedInformation":[],"severity":1,"source":"clang"},{"code":"expected_expression","message":"Expected expression","range":{"end":{"character":9,"line":3},"start":{"character":7,"line":3}},"relatedInformation":[],"severity":1,"source":"clang"},{"code":"unused-includes","codeDescription":{"href":"https://clangd.llvm.org/guides/include-cleaner\"},\"message\":\"Included header iostream is not used directly (fix available)","range":{"end":{"character":19,"line":0},"start":{"character":0,"line":0}},"relatedInformation":[],"severity":2,"source":"clangd","tags":[1]}],"uri":"file:///W:/test/test.cpp","version":0}}\r\n\r\n"
[ERROR][2024-03-07 21:50:10] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:10.021] Build dynamic index for header symbols with estimated memory usage of 4357980 bytes\r\n"
[ERROR][2024-03-07 21:50:10] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"I[21:50:10.105] Indexed c17 standard library: 2697 symbols, 1058 filtered\r\n"
[ERROR][2024-03-07 21:50:10] .../vim/lsp/rpc.lua:734	"rpc"	"C:\Users\Ahmed\AppData\Local\nvim-data\mason\bin\clangd.CMD"	"stderr"	"V[21:50:10.126] Build dynamic index for header symbols with estimated memory usage of 4538460 bytes\r\n"

Are you able to compile your code with clang?

Yes, it compiles and runs perfectly fine with clang

Oh wait, I see what the problem is:

I[21:50:09.802] ASTWorker building file W:\test\test.cpp version 0 with command
[W:\test]
"C:\\Users\\Ahmed\\AppData\\Local\\nvim-data\\mason\\packages\\clangd\\clangd_17.0.3\\bin\\clang-tool" -xc++ -I include -L lib -xc -Wunused-variable -Wall "-resource-dir=C:\\Users\\Ahmed\\AppData\\Local\\nvim-data\\mason\\packages\\clangd\\clangd_17.0.3\\lib\\clang\\17" -- "W:\\test\\test.cpp"

There is an -xc in the compile command, and it comes after the -xc++. The later flags overrides the earlier one, so the file is processed in C mode.

Places to check for where the -xc flag may come from:

W:\test\compile_flags.txt
C:\Users\Ahmed\AppData\Local\clangd\config.yaml

Wow, you are a lifesaver man. I set that a long time ago and completely forgot about it. Thank you so much for the your help

I've encountered a similar issue, system is Ubuntu 20.04. The clangd version information is as follows:
clangd --version
clangd version 16.0.2 (https://github.com/llvm/llvm-project 18ddebe1a1a9bde349441631365f0472e9693520)
Features: linux+grpc
Platform: x86_64-unknown-linux-gnu

LSP Log:
[START][2024-07-04 11:17:14] LSP logging initiated
[ERROR][2024-07-04 11:17:14] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:14.813] clangd version 16.0.2 (https://github.com/llvm/llvm-project 18ddebe1a1a9bde349441631365f0472e9693520)\nI[11:17:14.813] Features: linux+grpc\nI[11:17:14.813] PID: 313699\nI[11:17:14.813] Working directory: /home/hmh/work/code/github/map/hdmap/hdmap_engine\nI[11:17:14.813] argv[0]: /home/hmh/.local/share/nvim/mason/bin/clangd\nI[11:17:14.813] Starting LSP over stdin/stdout\nI[11:17:14.815] <-- initialize(1)\nI[11:17:14.818] --> reply:initialize(1) 2 ms\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.057] <-- initialized\nI[11:17:15.058] <-- textDocument/didOpen\nI[11:17:15.059] Loaded compilation database from /home/hmh/work/code/github/map/hdmap/hdmap_engine/compile_commands.json\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.060] ASTWorker building file /home/hmh/work/code/github/map/hdmap/hdmap_engine/include/hdmap_engine/engine.h version 0 with command inferred from /home/hmh/work/code/github/map/ws/hdmap-ws/src/engine/include/hdmap_engine/3rd_party/odrSpiral/odrSpiral.c\n[/home/hmh/work/code/github/map/ws/hdmap-ws/build/hdmap_engine]\n/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DRCUTILS_ENABLE_FAULT_INJECTION -DSPDLOG_COMPILED_LIB -Dhdmap_engine_EXPORTS -I/home/hmh/work/code/github/map/ws/hdmap-ws/src/engine/include -I/home/hmh/work/code/github/map/ws/hdmap-ws/install/hdmap_common/include -isystem /opt/ros/foxy/include -fPIC -pthread -c -x c-header -resource-dir=/home/hmh/.local/share/nvim/mason/packages/clangd/clangd_16.0.2/lib/clang/16 -- /home/hmh/work/code/github/map/hdmap/hdmap_engine/include/hdmap_engine/engine.h\nI[11:17:15.061] <-- textDocument/documentSymbol(2)\nI[11:17:15.062] Loaded compilation database from /home/hmh/work/code/github/map/ws/hdmap-ws/src/engine/compile_commands.json\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.094] <-- textDocument/semanticTokens/full(3)\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.433] <-- textDocument/codeAction(4)\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.651] <-- textDocument/codeAction(5)\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.807] Indexing c17 standard library in the context of /home/hmh/work/code/github/map/hdmap/hdmap_engine/include/hdmap_engine/engine.h\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.876] Indexed c17 standard library: 2592 symbols, 7 filtered\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.961] Built preamble of size 17655536 for file /home/hmh/work/code/github/map/hdmap/hdmap_engine/include/hdmap_engine/engine.h version 0 in 0.90 seconds\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.961] --> workspace/semanticTokens/refresh(0)\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.962] <-- $/cancelRequest\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.962] <-- textDocument/semanticTokens/full(6)\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.962] <-- reply(0)\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.963] <-- textDocument/codeAction(7)\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.985] --> textDocument/publishDiagnostics\n"
[ERROR][2024-07-04 11:17:15] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:15.985] --> reply:textDocument/documentSymbol(2) 923 ms\nI[11:17:15.985] --> reply:textDocument/semanticTokens/full(3) 891 ms, error: Task was cancelled.\nI[11:17:15.985] --> reply:textDocument/codeAction(4) 552 ms\nI[11:17:15.985] --> reply:textDocument/codeAction(5) 334 ms\nI[11:17:15.985] --> reply:textDocument/semanticTokens/full(6) 23 ms\nI[11:17:15.986] --> reply:textDocument/codeAction(7) 22 ms\n"
[ERROR][2024-07-04 11:17:16] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:16.211] <-- textDocument/codeAction(8)\n"
[ERROR][2024-07-04 11:17:16] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:16.211] --> reply:textDocument/codeAction(8) 0 ms\n"
[ERROR][2024-07-04 11:17:16] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:16.724] <-- textDocument/codeAction(9)\n"
[ERROR][2024-07-04 11:17:16] .../vim/lsp/rpc.lua:770	"rpc"	"/home/hmh/.local/share/nvim/mason/bin/clangd"	"stderr"	"I[11:17:16.724] --> reply:textDocument/codeAction(9) 0 ms\n"

In a code project, not all .h files exhibit this problem. Some .h files don't show this error.
My solution is to create a .clangd file and add the following content, but I want to know how to resolve this issue from clangd's perspective.
# .clangd
CompileFlags:
 Add: [-x, c++-header]

@minhanghuang It looks like the codebase contains a mixture of C and C++ source files. (For example, /home/hmh/work/code/github/map/ws/hdmap-ws/src/engine/include/hdmap_engine/3rd_party/odrSpiral/odrSpiral.c is a C source file.) In such cases, clangd can make a wrong guess about the language of a .h file.
The current solution I would suggest is the one mentioned at the beginning of this FAQ answer: use CompDB to add entries for header files to compile_commands.json.

Thanks for the solution!


Ability to access walletUrl on selector.options.network

Description
I'm working on integrating wallet-selector on ui.multisafe repo.
I noticed that wallet-selector will return selector object that contains list of urls for network. (on selector.options.network) Since wallet-selector will be the entry point for choosing the wallet to be used, it would be ideal to reference all relevant configs/urls from wallet selector instead of maintaining separately on ui.multisafe repo. (So we have single source of truth in terms of network related urls)

Everything is good except would be appreciated if I can get access to walletUrl from above path. (From wallet-selector repo, resolveWalletUrl function returns walletUrl but it is not being exposed under network.
Acceptance Criteria
Please include walletUrl on selector.options.network. (Currently near-wallet and my-near-wallet)

@hcho112 Thanks for opening this issue!
The reason we don't expose walletUrl is because (to my understanding) its wallet specific. Only (My) NEAR Wallet requires this config. If you wish to maintain a single source of truth, you can define the walletUrl in the dApp side and override the option in setupNearWallet and setupMyNearWallet

I did a bit more digging on the multisafe repo. It looks like there's 2 use cases(?):

Adding balance: I'm guessing this is a Transfer NEAR action so signAndSendTransaction should be used to be wallet agnostic?
No account for Ledger public key: This looks like something we should look at handling better in the modal-ui package as part of the Ledger flow?

I can see why this configuration is useful outside of the use cases mentioned above though. Maybe it's a naming issue? It feels like the core purpose is to be a fallback wallet (since a browser wallet is "always available")

Hey @lewis-sqa
Thanks for quick feedback and my apologies for late feedback.
(I'm new to repository and I'm learning/discovering things as I go on. )
The reason why I requested to expose walletUrl was because many of existing codebase on ui.multisafe is heavily reply on near object:
const near = await connect(connectConfig);

Where connectConfig includes optional field walletUrl which can either be near-wallet and my-near-wallet. So the intention was to use reference the network configuration that is already established on wallet-selector.
However if conditionally exposing walletUrl is something that want to be avoided, I'm happy to manage it on dApp side.

Hey @hcho112,
Using the connect API from near-api-js in its current form is a little problematic in my opinion as it's highly coupled to a single wallet, (My) Near Wallet. This approach conflicts with the idea of Wallet Selector where we try to abstract over the various wallets in the ecosystem so that dApps can essentially say, "I want to sign this transaction using whatever wallet the user has selected". It's for this reason why we decided against exposing walletUrl and why we think it's best if this particular use case is handled in the dApp.
I'm going to go ahead and close this issue, but please feel free to reopen if there's more to discuss 🙂