text:
Feature request - local filters vs global filters (conditionally show actions, observables, computeds)

Currently, filters can be applied to show computeds, actions, observables.. but this is set within configureMakeLoggable which applies these filters globally.
Is it possible to override these global filters, locally for specific stores. This is very useful when having multiple stores but when we want to apply different filters to each of them.
Possible API could be when we mark a store loggable:
makeLoggable(this, {
  filters: {
    computeds: true,
    actions: true,
    observables: false,
  }
})

Thanks bunch!

Thank you for the suggestion, I'll add it 👍

Released as 0.8.5
Here is an example how to do it: https://github.com/kubk/mobx-log#log-observables--computeds--actions-of-a-specific-store
I've chosen this type of configuration:
    makeLoggable(this, {
      filters: {
        events: {
          computeds: true,
          observables: false,
          actions: false,
        },
      },
    });

It allows to separate computeds / observables / actions from store properties in the future:
class Store {
  counter = 1;

  constructor() {
    makeAutoObservable(this);
    makeLoggable(this, {
      filters: {
        events: {
          computeds: true,
          observables: true,
          actions: false,
        },
        properties: {
          counter: true,
        }
      }
    })
  }
}

authors: akkayy kubk

repo: kubk/mobx-log

license: MIT


text:
Adding Monit config to hw services

PR Overview:

Description of what this PR is for and high-level overview of what was changed

Documentation:
Have documentation changes been made? Options for this section are:

No documentation changes are needed
Doc changes have been included in this PR
Doc changes have be made in a different PR #link (and probably different repo)
Doc changes have NOT been made yet. Here's my very good reason why and a link to the Trello card describing the doc changes to be made

Integration Tests:

Have integration tests been added or changed?
If this PR is adding a new feature, it should have a test. Same options as the documentation section.

 Set up process monitoring for core services and hardware services using Monit

source: gharchive/pull-request

repo: kubos/kubos-linux-build

license_type: permissive

license_source: github-api


text:
favicon for kudo.dev

What would you like to be added:
We should add a favicon to kudo.dev.

Done

source: gharchive/issue

authors: alenkacz jbarrick-mesosphere

repo: kudobuilder/kudo


text:
fix lingo in docs: task, not step

What type of PR is this?
/kind documentation

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: voelzmo
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: jbarrick-mesosphere
If they are not already assigned, you can assign the PR to them by writing /assign @jbarrick-mesosphere in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

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

Hi @voelzmo. Thanks for your PR.
I'm waiting for a kudobuilder member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Needs approval from an approver in each of these files:

OWNERS [alenkacz]

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

/lgtm

thank you @voelzmo !

@voelzmo: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

test
dc9b418e992bf83d318f47b6ca9ea341207af19f
link
/test test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

authors: alenkacz kudo-ci voelzmo


text:
Update to Pydantic 2

This is a mostly-straightforward port to Pydantic 2. It takes advantage of Pydantic's new JSON schema mode feature, which can be set to "validation" or "serialization". Tests added and updated and documentation updated.

Hi
Great work here! ... any plans to release this in the short term?
Thanks!

I moved this work to a fork of this project. It's now being maintained:
https://pypi.org/project/openapi-pydantic/
That project now supports both versions of Pydantic.

@hathawsh since you're maintaining it, would you want to get a name transfer on pypi so that other projects relying on this could install it? https://peps.python.org/pep-0541/#how-to-request-a-name-transfer

Any plans to merge this and surface pydantic 2 changes?

@kuimono has not been responsive, so it's probably best for everyone to move to the newer project.

authors: hathawsh lordoffreaks mjspeck odubno

repo: kuimono/openapi-schema-pydantic


text:
Plugin usage with proxy

I couldnt get the plugin to work. I managed to fix it myself in SlackNotificationsCore.php
...
global $wgSlackIncomingWebhookUrl, $wgSlackFromName, $wgSlackRoomName, $wgSlackSendMethod, $wgExcludedPermission, $wgSitename, $wgSlackEmoji, $wgHTTPProxy;
...
curl_setopt($h, CURLOPT_PROXY, $wgHTTPProxy);

Where did you define the $wgHTTPProxy parameter? Did you set it up in the localSettings file? I could add this optional parameter to the plugin as an additional parameter for others with proxy to get it working.

Thank you for your reply! Yes i had to define it in LocalSettings.php.
BTW, I also had to set the option below or mediawiki gave "unknown error" when saving.
curl_setopt($h, CURLOPT_RETURNTRANSFER, true);
I'm not sure if this has anything to do with using a proxy though.

OK – I've added support for this in the latest push. Can you confirm that it's working? :)
I've also added information on bottom of the README file on how to add the proxy.

@wimaerts ^

Seems to work just fine, thnx!

authors: kulttuuri wimaerts

license: mit

license_source: bigquery


text:
Call _find_mocker with correct parameters

fixes https://github.com/kumoru/torment/issues/77

Yep, noticed this in my pylint branch but forgot to back-port.  We should get pylint setup in place of flake8 ASAP since it catches errors like this.

I'll cut a 3.0.1 tonight when I have time.  Try to get anything else merged you want before then.

authors: alunduil doublerr

repo: kumoru/torment


text:
[New game]: Planet game

🎮 Game Request
player needs to avoid junks and destroy asteroids
Point down the features
Game points will be awarded on the basis of tokens collected and missions completed
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @S-ishita ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇

authors: S-ishita kunjgit

repo: kunjgit/GameZone


text:
Added lady tiger hunter game

PR Description 📜
Please include summary related to the issue you have fixed and describe your PR in brief over here by specifying the issue number on which you were working below
Fixes #2267

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[ ] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for website preview in assets/images
[x] I have added entries for my game in main README.md
[x] I have added README.md in my folder
[ ] I have added working video of the game in README.md (optional)
[x] I have specified the respective issue number for which I have requested the new game.

Add your screenshots(Optional) 📸

Thank you soo much for contributing to our repository 💗

Thank you @deepshikha2708 ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Thank you  @deepshikha2708 , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀

Hey @deepshikha2708,
You can't work on a closed issue 👀!
Follow the proper guideline and make a new PR again 😀.
Happy Hacking 💗


text:
FSync

We need to implement FSync so stuff like vim works

RIP Kura (2018 - 2018).

authors: Dendrimer irfansharif

repo: kurafs/kura


text:
Add requestType to buildUrl to comply with change to Ember Data 1.0.0.beta.17

This commit https://github.com/thejameskyle/data/commit/ab93c00571d62504cb997d3a7944aa430575856f makes use of the requestType param for the BuildUrlMixin in order to determine how to build the request. The json-api-adapter was not passing this param to super, resulting in malformed request urls for findQuery (and possibly other find variants).

Ehhh...I seem to have forked from eneuhauser by mistake.  Will re-submit.

repo: kurko/ember-json-api


text:
FPU rounding module

Implementation of the rounding module for FPU.
This module excepts that input is in normalized form (unless the number is subnormal) and, in accordance with RISC-V specification, detects tininess after rounding. The flag that allows generation of a rounding module that assumes that input was already rounded is to be used by modules that are able to perform both their operation and rounding at the same time (adder/subtractor, for example). In that case, this module only checks for errors and special cases (one of the inputs was inf/nan).

Waiting with merge until reviews are addressed.

authors: Durchbruchswagen tilk

repo: kuznia-rdzeni/coreblocks


text:
tidy: include what you use

This change enables misc-include-cleaner, which can be used to clean up our includes. This would allow us to remove the clangd-diagnostics script, and rely entirely on clang-tidy.
In C++, you don't need to include a header for every symbol you use, since some may be included transitively. For instance, if you include a.h, which includes b.h, you don't need to also include b.h to reference symbol B. However, if in the future, a.h removes its dependency on b.h, then your file needs changing. This is one of the reasons transitive includes can make it harder to maintain a project.
The philosophy that all the clang tools follow is to keep headers in an Include What You Use state. This has the following practical benefits:

No platform-specific issues about transitive includes. The transitive includes differ per-platform, causing failures in CI when the right headers are not included.
Automatic integration with clang tooling. Clang tidy and clangd both have excellent integration with this paradigm, which means that our editors can automatically add the headers we need as we type.

Finally, note that the headers included this way have no compile time penalty, since they need to be included one way or another.

I forgot how hard it is to actually detect used includes properly. clang-tidy suggests I include bits/stat.h, which is a private header on linux. These are fundamental flaws with this system that I don't see getting solved without widespread adoption of this system (maybe in a few years this will be easier to use...)

repo: kuzudb/kuzu


text:
add eq param to length

add eq param to length

Thanks for the PR. This is basically just syntactic sugar instead of using length(..., max=x, min=x). I don't think this brings enough value in order to add this. I'm closing this for now.

authors: kvesteri weihaipy

repo: kvesteri/validators


text:
Extending functionality of the LiveSession experimental feature to en…

Extending functionality of the LiveSession experimental feature to enforce 4 eyes behaviour. Added reviewer to ExecutionRequest.kt and set it when approving a LiveSession Access, the reviewer is then the only user that can run commands in that session, while the author is the only one that can write

Hi @Askir, I work with Chris and have picked up developing this tool further to fit with our live session 4 eyes review use case. This change enforces the request author can only write sql and reviewer can only run what the author wrote.
I've done this by introducing an explicit reviewer field in the execution request object that's set when someone approves the request. I went with that approach since we envision the author inviting another user to review/join the session in the future.
Not sure if this fits with your vision for the tool going forward, but hope you'll consider it

Hey, thank you so much for the contribution!
I'll leave some thoughts about this feature here, honestly it's not 100% structured yet so there might be some conflicting ideas but I hope it helps us get a bit more aligned with how this should work:

I would like the live sessions executions to work similar to the current approval process. Meaning that it would ideally share the approval mechanism that the typical execution requests have:

If the connection is set up to require 2 approvals both are needed before the statement is executed even in a live session.
Same role and permission requirements apply to the live session executions.
This would make the reviewer field that you are adding obsolete I think.

Currently any execution/comment/review is tracked in the events table of the database. However the reviews relate to the parent execution request. This can probably stay this way. But I am not sure yet if the same review/approval entity  should be used for the live session requests, where the statement to be executed probably lives in some sort of pendingExecution entity in the events table.
If we only allow one pending execution at a time (which probably makes sense). The statement to be executed as well as the reviewers could be stored on the liveSession entity and one corresponding pendingExecution Event. As soon as this one is approved it would turn into a normal execution event with the corresponding review events.
If a statement is denied or canceled it could instead be turned into a canceledExecution event.
Instead of messing with the events itself it could also use some sort of event sourcing mechanism where the event chains always look like: liveSessionRequested -> liveSessionApproved -> pendingExecution -> approval review -> execution or pendingExecution -> denied review -> caneledExecution -> ...

Well as I said it's all a bit vague still, but I'd prefer to integrate it into the existing approval system or at least build a new one that accomodates the existing async execution requests as well as the live sessions.

authors: Askir dfidgett

repo: kviklet/kviklet


text:
Make the errors mapping table entries less cryptic

I've spent hours debugging the following panic message thrown when a value larger than the 8 bits defined in the timer and error vector constants (I was trying to put 0x320 in the timer vector field and 0x280 in the error vector field per what's specified on osdev.org) is plugged into the builder functions:
assertion failed: `(left == right)`
left: `3`
right: `0`

This message is coming from the bit crate, which performs an assert_eq! check to ensure that the bits are of the same length. Yet, it does absolutely nothing to inform the developer of what is being done wrong. So, I'm submitting this pull request to save other people the trouble by printing a more legible error message.

Thanks @kennystrawnmusic!

authors: kennystrawnmusic kwzhao


text:
Support plugins? (airline, nerdtree, ...)

Will this plugin ever support other plugins like airline, nerdtree, ...?

I think this question is reversed. I'm not sure what support would look like/means in this case? If it means can these icons be used in those plugins then I think the onus to add this would be on airline or other plugins to somehow adds this functionality themselves and make this plugin a dependency not really the other way around.
For the most part other consumers of the plugin like telescope.nvim, barbar.nvim, nvim-bufferline.lua, galaxyline.lua have implemented integrations themselves without anything needing to be done on this plugin's side. Both plugins you mention are written in vimscript and would need to special case using this plugin to nvim with access to lua 🤷🏿♂ which is possible but definitely something (IMO) for them to do if they wanted.

Oh okay, I'm asking because when I also install https://github.com/ryanoasis/vim-devicons, airline and nerdtree get icon support out of the box, I assumed it was done by https://github.com/ryanoasis/vim-devicons and not by nerdtree, airline, ... but I could be mistaken
Given it was "a fork of" that project, I was expecting it to work out of the box as well. I get that it's not easy because of vim<>lua

@entropitor I actually just dug through the devicons code base searching for nerdtree and airline and you're right vim-devicons specifically hooks into apis exposed by those plugins and integrates with them. Tbh only @kyazdani42 can give you a definitive answer but imo both those integrations each look to be quite a lot of vimscript, and really seem like they should have been done in the specific plugins not by vim-devicons since it seems to go beyond the remit of what is essentially an icon pack 🤷🏿♂ .  Looks like it would be very awkward at best to try and make either of those plugins work with this package.

Okay, that's a fair point. I was just wondering 👍

Hi, yes i agree with akinsho, although it's a 'fork', i would like to preserve a library like functionality for this plugin. Implementing code for other plugins would be too much work and i do not aim for that. Also i've written my own tree plugin and that's when i had to rewrite vim-devicons because it was too slow and did not match my requirement in term of usability. People are free to fork and extend this to support plugins like nerdtree or airline though :)

authors: akinsho entropitor kyazdani42


text:
Add support for Rails 6

This PR adds support for Rails 6 to the gemspec.
What do you think about removing the upper dependency or moving it to be less than  < 7?
I imagine the asset pipeline will be around until then, as I haven't seen any plans announced yet to fully remove it from Rails just yet, and imagine they would only do so after deprecating it (maybe in Rails 6.1?)

@kylefox If you'd like, I can help maintain the gem? ❤

Hey guys, I've merged it into master. I'm moving over the next few weeks but will work on getting it so I can publish a new version to RubyGems, in the meantime, check it out from master and let us know if there are any more issues.
cc @AnthonyClark

Hi friends! I've just pushed 2.1.0 to RubyGems with support for Rails 6. Thanks for the patience!

Thank you @king601 !

repo: kylefox/trix


text:
Skip reconcile when Istio CRDs are missing

Issue: https://github.com/kyma-incubator/reconciler/issues/1386
Check in reconciliation action if Istio Virtual Service or Gateway CRDs are missing on the cluster and in such a case skip the reconciliation.

/retest

/retest

/test pull-main-cli-integration-k3d pull-main-cli-integration-k3d-latest

/test pull-main-cli-kyma-release-upgrade-k3d

/retest

repo: kyma-incubator/reconciler


text:
test protecode

Description
Changes proposed in this pull request:

...
...
...

Related issue(s)

#3475

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

/ok-to-test

/test all

/ok-to-test

/test pre-master-tpi-protecode-guard

repo: kyma-incubator/third-party-images


text:
fix: remove children icon in the category that already exists

Description
How to reproduce?
Take a look at #2341
Add isEnabled to that feature
Related issue(s)
Closes #2341

config:
  features:
    EXTERNAL_NODES:
      isEnabled: true
      stage: SECONDARY
      nodes:
        - category: My Category
          icon: course-book
          children:
            - label: Example Node Label 1
              link: https://github.com/kyma-project/busola
            - label: Example Node Label 2
              link: https://github.com/kyma-project/busola
            - label: Example Node Label 3
              link: https://github.com/kyma-project/busola

/restest

/retest

repo: kyma-project/busola


text:
[AwsVpcPeering] region validation

Description
Currently if user apply invalid  AwsVpcPeering.spec.remoteRegion following error will appear in status condition
operation error EC2: DescribeVpcs, get identity: get credentials: failed
to refresh cached credentials, operation error STS: AssumeRole, https
response error StatusCode: 0, RequestID: , request send failed, Post
"https://sts.fake-region.amazonaws.com/": dial tcp: lookup
sts.fake-region.amazonaws.com: no such host
If possible we should introduce some AWS region validation on SKR side, otherwise KCP validation is fine as well.

@vandjelk Could we have SKR validation without the Cloud Manager SKR active component?

If we identify all regions, we can add XValidationRule on AwsVpcPeering API.
Something like this for example https://gist.github.com/rams3sh/4858d5150acba5383dd697fda54dda2c

Most of the regions occur in combination of 2 letter followed by "-" followed by a combination of direction based word , followed by a "-" and then a digit.
Ref : AWS' regions are listed here https://aws.amazon.com/about-aws/global-infrastructure/regions_az
General Regex - (af|ap|ca|eu|me|sa|us)-(central|north|(north(?:east|west))|south|south(?:east|west)|east|west)-\d+
Note: Availability Zone - Since AZ has a letter added to a  region, it can be of following regex:-
(af|ap|ca|eu|me|sa|us)-(central|north|(north(?:east|west))|south|south(?:east|west)|east|west)-\d+[a-z]{1}

We should anyway validate the regex against the region list provided in Regions and Zones - Amazon Elastic Compute Cloud

authors: ngrkajac vandjelk

repo: kyma-project/cloud-manager


text:
Verbose provisioning

Description
The provision call of the provision library is a blocking call giving no further in-between status. In case of strange behavior, it will be great to have a way of retrieving the internal logs of the command to be used as verbose logs. Maybe improve the interface to attach a log stream to the stdout of the client in case verbose logging is wanted.

Reasons
Often the provisioning call just executes giving no details on whats happening and even on the cloud provider side nothing is happening. So having a verbose mode indicating that a terraform-provider gets downloaded will help to understand whats going on.

Attachments

This was solved in https://github.com/kyma-project/hydroform/issues/252

authors: a-thaler clebs

repo: kyma-project/hydroform


text:
🛑 grazindafranco.com is down

In 78f967b, grazindafranco.com (https://grazindafranco.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: grazindafranco.com is back up in 61a5a72 after 1 day, 8 hours, 53 minutes.

repo: kyryl-bogach/upptime


text:
Add details to schema "diagnostic"

Adding text from discussion #3734.

I agree with @shahms in that we probably shouldn't add unchecked examples. The example this PR adds also doesn't add very much signal past what you can get from the descriptive text. I do find that the change to the descriptive text is helpful.

Thanks for the PR!

authors: kamahen zrlk

repo: kythe/kythe


text:
[Bug] Copy pasting command from documentation did not work

Page link
https://kyverno.io/docs/writing-policies/external-data-sources/
Description
On this page the command
kubectl get --raw /api/v1/namespaces | kyverno jp "items[*].{name: metadata.name, creationTime: metadata.creationTimestamp}"
is documented.
Copy pasting that did not work.
Expected behavior
I've expected to see the list provided in the documentation.
By changing the command a little bit to ... | kyverno jp query ..., it worked.
Slack discussion
No response

Thanks. Already fixed in main, awaiting pulling into prod:
https://main.kyverno.io/docs/writing-policies/external-data-sources/

repo: kyverno/website


text:
【質問】「放映中」や「番組表」が取得できません。

使用環境は、
【OS】Linux Mint 21.2 "Victoria" Cinnamon
【TVチューナカード】PLEX PX-Q3PE4
です。
Version 2.6.? のときからお世話になっております。
いつも開発ありがとうございます。
Version 2.6.? のバージョンの更新をしたところ、
動作しなくなってしまったので、
OSごとアップグレードしまして、
また新しく docker-mirakurun-epgstasion を導入させていただきます。
現在、
sudo docker-compose up -d
をして10時間経ったのですが、
依然、「放映中」や「番組表」の内容が表示されないので、困っている次第です。
http://DockerHostIP:8888
にて、
EPGStation v2.7.1
は起動します。
/home/docker/docker-mirakurun-epgstation/mirakurun/conf/channels.yml
は、以前の Version 2.6.? で動作していたファイルを流用いたしました。
$ recpt1 --b25 --strip 27 10 ~/test.ts
using B25...
enable B25 strip
C/N = 34.346776dB
(PID:60309)(CH:T27) Recording...
(PID:60309)(CH:T27) Recorded 10sec
として、録画ができていることも確認いたしました。
FFMPEG もインストール済みです。
他に考えられる欠点がございましたらお教えくださいませ。

その後、
/home/docker/docker-mirakurun-epgstation/mirakurun/conf/tuners.yml
も、以前の Version 2.6.? で動作していたファイルを流用してみましたが、
症状に変化がございませんでした。
他に何が問題でしょうか？

「PLEX PX-Q3PE4 docker-mirakurun-epgstation」でウェブ検索をかけたら、
解決できるウェブページを発見し、それで解決いたしました。
私の検索力がぜんぜん足りなかったようです。
お騒がせしてしまって申し訳ございませんでした。

「PLEX PX-Q3PE4 docker-mirakurun-epgstation」でウェブ検索をしたら、
有用なウェブページを発見し、解決いたしました。
私の検索力がぜんぜん足りなかったようです。
お騒がせして大変申し訳ございませんでした。


text:
Search for .desktop program files for nix installed programs.

The .desktop files of nix-installed programs are in ~/.nix-profile/share/applications/. I use ArchLinux and nix I use for some packages which packages which use from the arch repository is inconvenient for some reason.

You could override one of the xdg envs XDG_DATA_HOME/XDG_DATA_DIRS for ~/.nix-profile/share.

That path should already be in $XDG_DATA_DIRS (it is for me) and still no programs are showing up in the menu.

authors: WojAbuk l4l spikespaz


text:
Bodyform

Crated bodyform using  html and css files

[x]  Pull from master
[x] This feature is created in a branch bodyform
[x] fixed the syntax error
[x] Commit
[x] Push
[x] Create a PR in master (in Github)

Fixed the syntax error


text:
great work but can you tell us what it returns?

expressListRoutes({ prefix: '/api/v1' }, 'API:', router );
appears to log the routes
but can you be clear in your docs about what the function returns?
thanx

It doesn't return anything, I will update docs to say so :)

authors: ORESoftware labithiotis

repo: labithiotis/express-list-routes


text:
Add pre-commit hooks for Rust formatting, linting, and Python code quality

This PR introduces pre-commit hooks to ensure consistent code quality and formatting across the project. The following hooks were added:

Rust Hooks:

cargo fmt: Automatically formats Rust code according to the standard style.
cargo clippy: Lints Rust code to detect potential issues and improve code quality.

General Code Quality Hooks:

trailing-whitespace: Removes unnecessary trailing whitespace from files.
end-of-file-fixer: Ensures that files end with a newline.
check-yaml: Validates YAML file syntax.
check-added-large-files: Prevents large files from being accidentally committed to the repository.

Python Hooks:

ruff: Lints Python code and automatically fixes style issues.

Note: After this PR is merged, the contribution guide should be updated to include the new pre-commit hooks. Contributors will need to install and configure the pre-commit hooks locally to ensure proper formatting and linting before making any commits.

Does code formatting and linting checks also apply to the crate in the binding/python directory, in addition to the root directory?

Ref:

https://pre-commit.com/
https://pypi.org/project/pre-commit/

Prerequisites:

Install pre-commit using pip on dev environment

Thanks!

authors: jopemachine why-arong

repo: lablup/raftify


text:
Stormlib opens the wrong file.

Hi, someone reported a bug to me. It looks like stormlib supports a special file name, such as file00000001.blp. When a normal file name is exactly the same as it is, Stormlib considers it to be another file.
This is a map that can be reproduced. file00000002.blp should be a blp file, but stormlib thinks it is war3map.wtg.
icon_error.zip

The opening by special name is there if you don;t know the name. But yeah, because MPQ Editor shows that special name in the form of file########.ext, then sooner or later, someone had to add a file under that name.
I changed that behavior so that StormLib first checks whether the file name exists (no matter what file name is it). If it fails, then it looks for a file index.
Fixed in commit 4ad0bff21da0163917e1552960e6a43679586b89.

repo: ladislav-zezula/StormLib


text:
Hello, can you make a pure front-end, pure html/js version?

This makes it easier to review the code and deploy it yourself privately

Good thoughts, but how do you run external executables like pdftk or even powerpoint from a browser using pure frontend html/js?

https://pdf-lib.js.org/
https://mozilla.github.io/pdf.js/
As far as I know these two libraries can achieve.

This may only support pdf

These libraries are really cool. So, the pdf editing part is possible to be in the frontend.

Unfortunately, one of the key motivation of this project is to convert pptx to pdf using MS Office on windows, which is not yet possible to be replaced by web.

Okay, I understand, I thought this was for pdf.

repo: laekov/sealpdf

license: Unlicense


text:
X720 and jumbo frame

Issue Type

[x] Bug report
[ ] Feature proposal

Summary
Jumbo frames can't be handled by x720(i40e).
Bug report
I configured Lagopus with "--enable-jumbo-frame" and put "-mtu 2048" to the configuration file.
Then the console log says
i40e_dev_interrupt_handler(): ICR0: malicious programming detected.
Then the Lagopus does not forward any packets and does not count up tx counters.
With x520(ixgbe), It works fine.
Expected behavior
Lagopus can handle jumbo frames correctly.
Actual behavior
As the "Bug report" above.
Environment
master branch.
Ubuntu 16.04LTS.
x86 server.
Steps to reproduce
As the "Bug report" above.
Relevant logs
As the "Bug report" above.
Component
Dataplane.
Possible fixes
I will try to inspect and report it.

Do you use which version of lagopus (DPDK)?

Acrually, I'm using forked version of lagopus.
https://github.com/hirokazutakahashi/lagopus/commits/shownet
The branch is the current master branch of lagopus and some fixes.
I think the fixes don't affect the jumbo frame handling.
I'll try with the current master.

I know a similar problem when sending 9K JumboFrame with dpdk v17.11
(I tried connectx-5, x710, x540).
One of the answer to send JumboFrame is configuring with enable_scatter bit.
This bit enables sending the scattered packets (such as multi-segmented mbuf).
Probably, The enable_scatter bit is needed to send scattered packet is not discussed in dpdk official documentation (dpdk.org).

http://dpdk.org/doc/api/structrte__eth__rxmode.html#a1cb4dbcf9775db5b6ec710ba849572fa

But, the same problem was occurred. :(
So currently, I am dealing with the Larger-Data-Room mbuf. (call rte_pktmbuf_pool_create() with data_room_size=9K)

rte_pktmbuf_pool_create
http://dpdk.org/doc/api/rte__mbuf_8h.html#a593921f13307803b94bbb4e0932db962

Thank you.  Your 'shownet' branch uses DPDK 18.02.
I read i40e_dev_mtu_set() in DPDK 18.02.
MTU setting on running i40e NIC causes EBUSY.
Correct sequence I think:

link down
set MTU
link up
Sure, is ist correct?

authors: hirokazutakahashi iMasaruOki slankdev

repo: lagopus/lagopus


text:
Modify installer.sh to download the binaries of cairo instead of compiling it.

We can use the binaries from Starkware's repo directly: https://github.com/starkware-libs/cairo/releases
ATM we are downloading the repo and compiling.
Using the binary will reduce drastically the installation, since it needs first to install rust and then compiles all the targets of the cairo repo.

ATM the binary does not support Windows OS.

repo: lambdaclass/cairo-by-example


text:
feat: Implement hints on uint384 lib (Part 1)

lib where these hints come from can be found here (https://github.com/NethermindEth/research-basic-Cairo-operations-big-integers/blob/main/lib/uint384.cairo)
Contains 5 hints:
UINT384_UNSIGNED_DIV_REM
UINT384_SPLIT_128
ADD_NO_UINT384_CHECK
UINT384_UNSIGNED_DIV_REM_EXPANDED
UINT384_SQRT

Why are all the hint functions public
No real reason, they have all been public since the start, we can create an issue to change all of them to pub(crate)

repo: lambdaclass/cairo-rs


text:
Error: IlegalInputValue when run cairo program.

Describe the bug
I have a cairo program that performs a few pedersen hashes and check if a leaf is part of a merkle tree
The program work successfully with scarb cairo-run, but fail to run with the cairo1-vm, with the same parameters
To Reproduce
scarb cairo-run '[10, 11, "1129815197211541481934112806673325772687763881719835256646064516195041515616", "2786116088662035069066189777680990419908396521409751409107279532930231316343", "1715556295878999972957474070461491436465516895623517391664966219403971354436", 1, 8, ["1953494062994346031473676762198846975365628378496072945247633132004575093152", "126113334767614658176188594640568076708777092902948464648204141774749582367"], ["2786116088662035069066189777680990419908396521409751409107279532930231316343", "3144957507973559441671210571674558258320337923190994230670584137810138721781"]]'

Run completed successfully, returning []

./tools/cairo1-run ./target/dev/starkswirl.sierra.json \                                                                          git:(main|…1
    --layout recursive \
    --air_public_input public_input.json \
    --air_private_input private_input.json \
    --trace_file trace \
    --memory_file memory \
    --proof_mode \
    --args '10 11 1129815197211541481934112806673325772687763881719835256646064516195041515616 2786116088662035069066189777680990419908396521409751409107279532930231316343 1715556295878999972957474070461491436465516895623517391664966219403971354436 1 8 [1953494062994346031473676762198846975365628378496072945247633132004575093152 126113334767614658176188594640568076708777092902948464648204141774749582367] [2786116088662035069066189777680990419908396521409751409107279532930231316343 3144957507973559441671210571674558258320337923190994230670584137810138721781]'

Error: IlegalInputValue

The repo is public
Expected behavior
generate the artifacts
What version/commit are you on?
latest from main branch, 8b5d1c6
Additional context
I try it with the v1.0.0-rc3 and the error is different

Error: VirtualMachine(Memory(AddressNotRelocatable))

Running in proof_mode only allows Array<felt252> as input and output value, as stated in the crate's documentation. This is currently necessary to make cairo 1 programs provable

Sure. The program requires 2 span as input, so should be fine

Running in proof_mode only allows Array<felt252> as input and output value, as stated in the crate's documentation. This is currently necessary to make cairo 1 programs provable

Sure. The program requires 2 span as input, so should be fine

From how the cli command looks like it seems like the program receives 7 integer values followed by an array/span. The program should only receive a single array of felt values in order to be run in proof_mode

Running in proof_mode only allows Array<felt252> as input and output value, as stated in the crate's documentation. This is currently necessary to make cairo 1 programs provable

Sure. The program requires 2 span as input, so should be fine

From how the cli command looks like it seems like the program receives 7 integer values followed by an array/span. The program should only receive a single array of felt values in order to be run in proof_mode

ok, so I got it wrong. Now I understand.
I create a struct that represent my input
#[derive(Serde)]
pub struct Input {
    secret: felt252,
    nullifier: felt252,
    nullifier_hash: felt252,
    commitment: felt252,
    root: felt252,
    index: usize,
    last_pos: usize,
    peaks: Span<felt252>,
    proof: Span<felt252>
}

but how can I specify the two arrays from CLI ? In order to get deserialized I should mention the length, I think.
If I just send the same input as before without square brackets the deserialisation will fail, obviously

--args '10 11 1129815197211541481934112806673325772687763881719835256646064516195041515616 2786116088662035069066189777680990419908396521409751409107279532930231316343 1715556295878999972957474070461491436465516895623517391664966219403971354436 1 8 1953494062994346031473676762198846975365628378496072945247633132004575093152 126113334767614658176188594640568076708777092902948464648204141774749582367 2786116088662035069066189777680990419908396521409751409107279532930231316343 3144957507973559441671210571674558258320337923190994230670584137810138721781'

I figure it out, I have to prepend the arrays with their length. The deserialisation work but now I have another error
./tools/cairo1-run ./target/dev/starkswirl.sierra.json \                                                                        git:(main|✚2…5
    --layout recursive \
    --air_public_input public_input.json \
    --air_private_input private_input.json \
    --trace_file trace \
    --memory_file memory \
    --proof_mode \
    --args '[10 11 1129815197211541481934112806673325772687763881719835256646064516195041515616 2786116088662035069066189777680990419908396521409751409107279532930231316343 1715556295878999972957474070461491436465516895623517391664966219403971354436 1 8 2 1953494062994346031473676762198846975365628378496072945247633132004575093152 126113334767614658176188594640568076708777092902948464648204141774749582367 2 2786116088662035069066189777680990419908396521409751409107279532930231316343 3144957507973559441671210571674558258320337923190994230670584137810138721781]'

Error: VirtualMachine(Memory(AddressNotRelocatable))

Hi @FilipLaurentiu !
We will take a look at the error

Hi @FilipLaurentiu !
I was trying to recreate to error you were having, so I ran the same command.
cargo run ../../StarkSwirl/target/dev/starkswirl.sierra.json \
    --layout recursive \
    --air_public_input public_input.json \
    --air_private_input private_input.json \
    --trace_file trace \
    --memory_file memory \
    --proof_mode \
    --args '[10 11 1129815197211541481934112806673325772687763881719835256646064516195041515616 2786116088662035069066189777680990419908396521409751409107279532930231316343 1715556295878999972957474070461491436465516895623517391664966219403971354436 1 8 2 1953494062994346031473676762198846975365628378496072945247633132004575093152 126113334767614658176188594640568076708777092902948464648204141774749582367 2 2786116088662035069066189777680990419908396521409751409107279532930231316343 3144957507973559441671210571674558258320337923190994230670584137810138721781]'```

Though this time I got a different error:

`Run panicked with: [1 (''), 1569537929006189670479869870450564906403592805 ('Fail to deserialize')]`

Which seems to be an error thrown by the cairo code at lib.cairo, am I correct?

Done a little research about the error that got. Seems like the args used in the commands that README suggests in the main branch of your repo might be outdated. Your Input struct has 10 attributes be the number of args passed are 9, so there's a mismatch and fail's to deserialize.

Talking about the actual issue, try running the same command you've use but using --layout starknet_with_keccak. The thing is that there are some builtins not supported by the recursive layout which starknet_with_keccak do actually support.

Hey @FrancoGiachetta Thank you for taking a look. Yes, I added one more parameters in the last commit, probably this is why you get that error.
To make things clear, I can reproduce the error in one of your example from the repo
cd cairo1-run &&
 cargo run -r ../cairo_programs/cairo-1-programs/serialized_output/bytes31_ret.cairo \
 --air_public_input public_input.json \
 --air_private_input private_input.json \
 --trace_file trace \
 --memory_file memory \
 --proof_mode

Error:

VirtualMachine(Memory(AddressNotRelocatable))

Talking about the actual issue, running the same command you've used but using --layout starknet_with_keccak, with main's version 0145e17, returns an empty array as expected. The thing is that there are some builtins not supported by the recursive layout which starknet_with_keccak do actually support.

This seems to be the case, changing the layout to starknet_with_keccak will run without an error. But changing the layout of the program require changes to the verifier ? In my use case the proof will be verified on-chain by the herodotous integrity verifier

Exactly, I recommend you to get the sierra out of you .cario and check which builtins it is using, then you may want to check this this to see which of the layouts might fit to your use case. Talking about the verifier, it really depends on how complete you have it

Hi @FilipLaurentiu!
Regarding the verifier, I am not entirely sure of the current state of the Herodotus Integrity Verifier. The prover and verifier need to implement certain constraints to verify each built-in. I really don't know if the Herodotus verifier implements those built-in constraints, but it should. Maybe you can ask them directly.

To finish, here are the layouts that you could use:

starknet
starknet_with_keccak
recursive_large_output
recursive_with_poseidon
all_cairo

I would recommend you to use recursive_with_poseidon since it supports just the builtns you need.

@FilipLaurentiu If you don't mind I will pass this error as solved
Any problem just ping us

Thank you @pefontana @FrancoGiachetta for taking your time and help me. I think I am good now and I got a good understanding of what I should change for this to work.
Thanks !

authors: FilipLaurentiu FrancoGiachetta fmoletta pefontana

repo: lambdaclass/cairo-vm


text:
Separate VM from hint execution

Add structure HintVisibleVariables to hold references to data used by hints
Exchange VM reference for HintVisibleVariables in execute_hint

Codecov Report

Merging #337 (3feec93) into hint-refactor (8ad6b7f) will increase coverage by 0.00%.
The diff coverage is 99.44%.

@@               Coverage Diff               @@
##           hint-refactor     #337    +/-   ##
===============================================
  Coverage          98.13%   98.14%
===============================================
  Files                 40       40
  Lines              13119    13503   +384
===============================================
+ Hits               12874    13252   +378
- Misses               245      251     +6

Impacted Files
Coverage Δ

src/vm/hints/execute_hint.rs
99.12% <93.24%> (-0.88%)
:arrow_down:

src/vm/hints/usort.rs
99.13% <97.72%> (-0.87%)
:arrow_down:

src/vm/hints/blake2s_utils.rs
99.80% <100.00%> (+<0.01%)
:arrow_up:

src/vm/hints/dict_hint_utils.rs
100.00% <100.00%> (ø)

src/vm/hints/find_element_hint.rs
98.59% <100.00%> (+0.16%)
:arrow_up:

src/vm/hints/hint_utils.rs
88.98% <100.00%> (+0.33%)
:arrow_up:

src/vm/hints/keccak_utils.rs
96.07% <100.00%> (+0.33%)
:arrow_up:

src/vm/hints/math_utils.rs
99.71% <100.00%> (+0.01%)
:arrow_up:

src/vm/hints/memset_utils.rs
100.00% <100.00%> (ø)

src/vm/hints/pow_utils.rs
100.00% <100.00%> (ø)

... and 6 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

authors: codecov-commenter fmoletta


text:
[GH-549] Fix valtimer teleporting inside polygons

Motivation
Whenever you used valtimers teleport ability between two polygon obstacles you could get inside of a collider in the map
In a nutshell this error was due to how we process collision resolution with polygon and the fact that colliders in the map are composed of several polygons due to the fact that we can't have concave polygons.
Since the collition resolution algorithm always return the closest vector that would solve the collition this could result in a movement that gets you inside another polygon, resulting in ending up inside the obstacles.
The fix will work by filtering movements that would result in ending up inside another obstacle, something like:

This was the bug present on main:
https://github.com/lambdaclass/mirra_backend/assets/67444519/d97bfeaa-5d2c-42cc-9e2a-ec8ec70d5a37
Closes #549
08/05 update:
There was another case were an axis was invalid if the result would make the player to go outside the map
Summary of changes

Added line to polygon collision detection
Filter invalid axis when processing collision resolution with sat
Fixed cannon stones polygon vertex to remove hole in the middle

How to test it?
Start a game with valtimer and try to use the teleport inside a rock
Also try to walk to obstacles and check that it feels correct
Checklist

[x] Tested the changes locally.
[x] Reviewed the changes on GitHub, line by line.
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

@agustinesco please do a loadtest and paste the results

Ran a loadtest with 1000 players running and the cpu peaks at 20%
https://github.com/lambdaclass/mirra_backend/assets/106101218/5f179609-a3d7-47ea-81ef-8cfeeadcde78

I found this bug when I was testing the PR, do you have a hint of what could be the cause?
Screen.Recording.2024-05-07.at.14.21.46.mov
Also I left a comment about the rust code

hmmm nice catch there, i think this could be caused by two reasons:

This fix is not taking care of the external wall collision, so an edge outside of the map is considered as valid when it should
the specific stone you're bugged inside have a whole in it, so we should fix the polygon

@tvillegas98 yeah in fact the bug was that we were considering axis that were outside of the play area as valid to resolve the collision with a polygon, which is wrong. Fixed both rocks on the edges of the map! also the stairs on the left side of the map had the same error so i fixed them too

Hey @agustinesco I found this bug.
But let's merge this feature an please create a new issue for fixing it next week.
https://github.com/lambdaclass/mirra_backend/assets/20927859/177dd525-5fc4-4cae-9da0-f64280b924b4

authors: agustinesco manucamejo


text:
PHP 8.1: Adapter is incompatible with IteratorAggregate::getIterator

Bug Report

Q
A

Version(s)
latest

Summary
PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught Return type of Adapter::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Current behavior
Tests are failing.
How to reproduce
Execute tests with PHP 8.1
Expected behavior
Tests are passing.

Closed with #13


text:
Moved declare statements above namespace

declare statements are place below namespace, which is not PSR compliant.

@jguittard Are you able to provide a fix as well? or placing this here for somebody else to pick up?
Also, please read the new contributor guidelines; we need you to do a sign-off on the commits, and they detail how you can rebase your branch to add them.

@weierophinney I've already patched on the fork, will also fix incorrect spaces. And discovered DCO, will follow guidelines next week.

Manually merged (and added tests) in c57bc9ebb9043b8a4589e40c51cc776c2dc0b64c

authors: Ocramius jguittard weierophinney

repo: laminas/laminas-code


text:
use_fsspec ignored in ln.add now

Not sure how to fix properly, as it is only a dobject related option. However, we will replace cloudpathlib with fsspec soon anyways, so it won't be a problem anymore.

This would need to be accounted for here: https://lamin.ai/docs/db/lamindb.record
Let me know if we still need it before you do the overall migration!

authors: Koncopd falexwolf

repo: laminlabs/lamindb


text:
StreamRecorded with latest CODAL contains pulses at regular intervals

With the latest CODAL StreamRecorded  raw data has peaks every ~23ms.
Bottom is a build with the latest CODAL, top is using the StreamRecorder hex from:

https://github.com/microbit-foundation/dev-docs/issues/169

Old CODAL wav file: old-build.wav.zip

Old CODAL raw data:  9904360249624e45005160190000003b000000009796990b.txt

Current CODAL wave file: latest-codal.wav.zip

Current CODAL raw data:  99063602000528202803be62c2d82852000000006e052820.txt

#include "MicroBit.h"
#include "SerialStreamer.h"

MicroBit uBit;

int main() {
    uBit.init();

    SerialStreamer *streamer = new SerialStreamer(uBit.audio.processor->output, SERIAL_STREAM_MODE_BINARY);
    uBit.audio.requestActivation();
    uBit.audio.activateMic();

    while (true) {
        uBit.sleep(1000);
    }
}

MICROBIT.hex.zip

PR:

https://github.com/lancaster-university/microbit-v2-samples/pull/72


text:
docs: clarify behaviour of refine_factor

https://github.com/lancedb/lance/issues/1385

Looks good except for the linting error.

authors: albertlockett rok

repo: lancedb/lance


text:
feat: support IVF_HNSW index

updates from #2046

hold this until #2056 and #2057 merged


text:
Fixed corrupted caching issue and lag on navigation animations

Hi there, the pull request fixes two key issues:

Previously when the component gets unmounted, it causes the image download to break and save the file regardless of its completion status. Instead, now I use a downloadResumable with a callback to track the progress of its completion and if the image doesn't completely download at the point of unmounting, it would delete the half downloaded file.

The component starts the load process of the image on componentDidMount which causes lag to JS-based animations and react-navigation transition. The solution was to use the InteractionManager.runAfterInteractions function that would start the load process only after any interaction or JS animations are done.

Hey @yoeven! Thanks for the PR! A couple things, looks like this PR does more than just those two things:

Stlying is being changed from ' to "
The ability to use an  instead of a  is being removed.

Can you scope down your PR to ONLY address the scope of what you want to change?

Hi @lane-c-wagner, Thanks for the feedback!

I fixed the styling by adding prettier support and also added expo's eslint config for future PR's so that styling will always stay consistent

I'm a little unsure on what you mean by your second point, not really sure what is being removed. You stated that "The ability to use an  instead of a is being removed.", would be great if you could elaborate a little more or provide an example so I can make the right changes. :)

Hey sorry, I didn't escape point number two properly! It was this: The ability to use an <Image> instead of a <BackgroundImage> is being removed., but now I'm seeing the order was switched, it wasn't removed (I'm on a phone right now haha).
So the only thing I'll ask at this point is that you remove all the styling changes (including prettier). It's typically unwise to try to make styling AND functionality changes in one PR. If you want to make styling changes because you intend to do further work on the project, just open up a separate pull request please :)

Hey there, reverted the prettier changes accordingly and only applied the functionality changes while keeping the styling consistent to the initial repo. I'll send another PR after this gets merge for styling and maybe adding typescript :) Hope its all good now!

alright, removed the unnecessary comments

Also if possible could you label this fork with hacktoberfest-accepted so that it counts against the participation of the hacktoberfest  event :)

Absolutely. I'll get we done and published
On Wed, Oct 14, 2020, 7:18 AM Yoeven D Khemlani notifications@github.com
wrote:

Also if possible could you label this fork with hacktoberfest-accepted so
that it counts against the participation of the hacktoberfest
https://hacktoberfest.digitalocean.com/ event :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/lane-c-wagner/react-native-expo-cached-image/pull/21#issuecomment-708395788,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFHZKVKLNXFQQXTKXDZZPM3SKWQJ5ANCNFSM4SLYMLRA
.

authors: lane-c-wagner yoeven


text:
🛑 rexingsports.cn is down

In df993b2, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 835 ms

Resolved: rexingsports.cn is back up in 47abdd0.

repo: lanen/bs-site


text:
🛑 vipgifts.net is down

In 604a82b, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 823 ms

Resolved: vipgifts.net is back up in 7b514fe after 44 minutes.


text:
🛑 rexingsports.cn is down

In 6ceef01, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 756 ms

Resolved: rexingsports.cn is back up in 1787c06 after 16 minutes.


text:
🛑 Grafana is down

In ea0098c, Grafana (http://langasg1.ddns.net:8082) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Grafana is back up in f6e8ffd.

repo: langasg/upptime


text:
SQL_database Trino dialect - wrong usage of USE to set catalog, as Trino does not use parameters for identifiers

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
Impacted code is https://github.com/langchain-ai/langchain/blob/514fe807784f520449914a64ffc983538fa6743d/libs/community/langchain_community/utilities/sql_database.py#L426
 elif self.dialect == "trino":
                    connection.exec_driver_sql(
                        "USE ?",
                        (self._schema,),
                        execution_options=execution_options,

Trino cannot use parameterized syntax for USE
Generated SQL statement to Trino should be
EXECUTE IMMEDIATE 'USE mycatalog';
instead of
EXECUTE IMMEDIATE 'USE ?' USING 'mycatalog';
Error Message and Stack Trace (if applicable)
On Trino side, we got
io.trino.sql.parser.ParsingException: line 1:24: mismatched input '?'. Expecting: <identifier>
	at io.trino.sql.parser.SqlParser.lambda$invokeParser$1(SqlParser.java:183)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)

Description
Without patching Trino dialect for SQL prompts, Trino cannot be used as a SQL source for LangChain
System Info
langchain==0.1.12
langchain-community==0.0.28
langchain-core==0.1.31
langchain-experimental==0.0.54
langchain-openai==0.0.8
langchain-text-splitters==0.0.1

Proposed patch
elif self.dialect == "trino":
                    connection.exec_driver_sql(
                        f"USE {self._schema}",
                        execution_options=execution_options,
                    )

Hi, is this issue resolved?

authors: Je-Cp tzach-upstream

repo: langchain-ai/langchain


text:
Yield intermediate steps during the chain execution process

Feature request
Hi maintainer,
In my case, a chain runs for a long time, multiple actions will be executed during this process. The main reason is that there will be multiple conversations with the LLMs.
Now, the agent.run(...)  returns final value and intermediate steps with following setting:
agent = create_pandas_dataframe_agent(openai_llm, df, return_intermediate_steps=True, verbose=True)
agent("some user query")

This is very useful for obtaining intermediate steps to enable front-end users to understand ideas from LLMs but they have to wait for it complete,  this is not friendly to them.
I understand that the process of executing a chain is like a continuous process of generating and executing Action, which is in line with the idea of  generator in Python, where we can yield completed actions during the running process.
Intuitively, it's like this:
https://github.com/hwchase17/langchain/blob/ef7d015be566588b3263ee6ee1259a30ee53212c/langchain/agents/agent.py#L946C63-L959
yield next_step_output  # line 954

Motivation
Enable front-end(some web apps using langchain) users to understand the chain's thinking process  while waiting for results , and  in a more intuitive/simple way compared to callback for developer.
Your contribution
NOT Now

I still didn't get it :( How can I print the the parts of intermediate steps?

It seems that AgentExecutorIterator has already covered this feature, great works!
https://github.com/langchain-ai/langchain/blob/362a446999944f9764813fbf0c27a5d2682f4531/docs/docs/modules/agents/how_to/agent_iter.ipynb

authors: lalyuvrajsingh oaksharks


text:
Revised notebook and add delete to MyScale vector store

Description:

Add .delete to myscale vector store.
Revised vector store notebooks

Tag maintainer: @baskaryan
Twitter handle: @myscaledb @mpsk_liu

thank you @mpskex!

authors: baskaryan mpskex


text:
feat(tools): PythonAstREPLTool handles variants of python code more robustly

We can't do something similar for non ast version. So this is best effort.
Part of: https://github.com/hwchase17/langchain/issues/586

@jon-chuang Hi , could you, please, resolve the merging issues? After that ping me and I push this PR for the review. Thanks!
If this PR is not needed anymore, could you, please, let me know?

Closing due to inactivity and library being a different directory structure now, and feel free to reopen against the current state of the repo!

authors: efriis jon-chuang leo-gan


text:
Supabase similarity search with metadata filtering

Supabase similarity search with metadata filtering

From what I understood, SupabaseVectorStore's similarity searches did not implement any sort of filtering based on the metadata stored in Supabase. Furthermore, I could not find any way of using metadata_filter to limit the results given by a RetrievalQA.
This is my first open source contribution so if I happened to overlook anything please let me know!
Usage
Metadata can be defined in the constructor.
vectorStore = SupabaseVectorStore(client=supabase, embedding=embeddings, table_name="documents", metadatas=[{"key": "value"}])

# unchanged
qa = RetrievalQA.from_chain_type(llm=ChatOpenAI(), chain_type="stuff", retriever=vectorStore.as_retriever())
res = qa.run("What is langchain?")

@dev2049

@hwchase17 @Dragos-P-Popa There is also Supabase Vecs - https://supabase.github.io/vecs/
I don't think we should keep any expectations for their python libs to develop much at this point, but vecs looks good and has metadata filtering etc already built in. It's very new and only just launched last month, but I thought I'd try making a vectorstore langchain integration a go. I think more development would go towards that than their existing python tooling anyway. We switched from the JS to Python langchain lib and it was kinda a bummer when we saw that the JS version  now had a nice filter solution, but no such filtering on Python :/
For anyone else looking at this, what I did do to get supabase filtering nicely was I cloned the SupabaseVectorStore class and added few fields I filter on in my match function in  init, and then passed them in to the match function in similarity_search_by_vector_with_relevance_scores and similarity_search_by_vector_returning_embeddings so that they are filtered via the match function. All chains/memory/retrievers using it should just work.

added filter support in #7721, let me know if i'm missing anything!

authors: Dragos-P-Popa ShantanuNair baskaryan


text:
Uniform valid suffixes and clarify exceptions

Description:

Uniformed the current valid suffixes (file formats) for loading agents from hubs and files (to better handle future additions);
Clarified exception messages (also in unit test).

thanks @lorenzofavaro!

authors: baskaryan lorenzofavaro


text:
Document loaders confluence keep newlines

landed in #9524, thanks @chanjetsdp!!

authors: baskaryan chanjetsdp


text:
Feature: PGVector Collection Documents Update

Description
Enhancement to the PGVector functionality: the addition of an update function update_documents(...).
Currently, updating the documents of a collection requires emptying the collection and filling it again. This can cause more calls to be made to the model than are actually needed. In fact, if a text chunk (and therefore its embedding) is already present in the vector store in the current collection, what is currently done is to delete it and insert (therefore calling the embedding model) the same embedding again.
The new feature identifies differences between input and existing documents. It requests new embeddings only for different documents, inserting them into the DB, and deletes missing ones.
Issue
#9461 (Add Functionality to Update Embeddings in pgvector)
Using Sample
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores.pgvector import PGVector
from langchain.docstore.document import Document

COLLECTION_NAME = "..."
CONNECTION_STRING = '...'
documents = [Document(page_content="foo", metadata={"page": "0"}),
             Document(page_content="bar", metadata={"page": "1"})]

# Instance new collection in pgvector from documents
pgvector = PGVector.from_documents(
    embedding=OpenAIEmbeddings(),
    documents=documents,
    collection_name=COLLECTION_NAME,
    connection_string=CONNECTION_STRING,
    pre_delete_collection=True)

# Update/Add some documents
documents[1].page_content = "baz"
documents.append(Document(page_content="far", metadata={"page": "2"}))

# Call update function
pgvector.update_documents(documents)

@lorenzofavaro - we are planning to use https://python.langchain.com/docs/modules/data_connection/indexing to do this type of updating. would that satisfy your requirements?

@eyurtsev Could you, please, review it?

Hey @lorenzofavaro ! Looks like this draft hasn't been worked on or marked as ready to review in a while. Is this something you'd still like to work on, or can I close it?

now a separate package

authors: HamzaNiaziBS efriis hwchase17 lorenzofavaro


text:
Add support for dark mode

Should include a toggle, and defaults to system.

@bracesproul Could you assign this to me Brace?

Done @girithodu
Looking forward to it!

hey @girithodu going to unassign you from this, if you've already started feel free to still put a PR up though!

I would like to work on this one

@Pratham271 yes it is!

On it @bracesproul

@bracesproul  I have added the logic and it is working fine but what about the colors of dark theme, do you have something in mind or should I push it.

@Pratham271 ninjachat's colors are easy on the eyes

okay @bracesproul

authors: Pratham271 bracesproul girithodu silvan-soeters

repo: langchain-ai/open-canvas


text:
Add streaming API for Bedrock Anthropics

Currently, langchain4j doesn't have support for streaming of Bedrock Anthropics model, this PR tries to address it.
Adding support for Anthropics v2 and v2:1 streaming.
New tests disabled due to need for AWS credentials but pass when enabled.

How about adding the option to have Tools with AWS Bedrock too?
In bedrock they are called "Agents", it would be nice to have also this option with Bedrock!

Great @michalkozminski I would really appreciate it actually! :)
Thanks!

@langchain4j Would be amazing if we could get streaming support as it's currently not supported by bedrock integration. Could you please give a look on this PR?

@michalkozminski I have merged this PR to include it in today's release. Please address left comments in a separate PR. Thanks!

@langchain4j thanks will do

authors: caosDvlp langchain4j michalkozminski


text:
与Dark reader插件一起使用的时候出现显示问题

作者您好，如题，猜测同时对页面样式修改出了bug，希望作者可以做出调整，期待您的回复

整

图一为出现问题的时候
图二为正常情况

https://github.com/langren1353/GM_script/issues/267附加10把这个里面代码粘贴进去，再勾选应该就可以了

附加10把这个大佬的代码https://github.com/langren1353/GM_script/issues/267粘贴进去，再勾选应该就可以了

附加10把置顶问题第三个

里面代码粘贴进去，再勾选应该就可以了

DarkReader有一套固定的深色模式转换滤镜，（反转背景色，然后适当调整一下其他颜色），它无法检测网页是否已经处于深色模式，如果是白色背景会被反转为黑的，反之会被反转为白的。若有问题建议禁用深色模式脚本，或者在DarkReader设置中关闭该网站。
在最新版的DarkReader中无法复现该问题，即使背景为黑色也不会被翻转为白色。

问题概述
在最新版本的 Dark Reader 暗黑模式下，脚本自身设置界面无法被 Dark Reader 黑化。
效果展示

多吉搜索（DogeDoge）已凉，无截图效果。

这个可以修改源码修复。
在脚本中搜索 -webkit-gradient(linear，然后将这 background 属性注释掉，在后面添加个 ;background-color:#F2F2F7;

最终效果如下：


text:
🐛 [BUG] : Birthdate condition check while signin up

7yo registered user is absolutely a bug!

the app asks for the user's email and password first, then it asks for the user's birth date, gender etc. Underneath there's a small disclaimer that the user cannot continue if under 13 years old

if that's the case it is better to ask for the user's age before they enter their info such as their email and password

@itztess

It's fixed with RN version.

authors: behics xuelink

repo: langx/langx


text:
Delay is not a function

xray.delay(from, [to])
is in the docs but is it supported?

I see it's now answered in #63

repo: lapwinglabs/x-ray


text:
Update to be compatible with guzzle 6.x

I've added compatibility with guzzle 6.x because there are some changes:

PSR-7 (so no json method from response)
new format of Client configuration

Maybe keep base_url in there so compatibility is maintained?

authors: dmdnkv tscheepers

repo: laracasts/Behat-Laravel-Extension


text:
5.0 中文文档，页面有一处合并错误

http://laravel-china.org/docs/5.0/mail
<<<<<<< HEAD
这个没有删除

已解决，Thanks

repo: laravel-china/docs


text:
feat: added translation select action to list page

This pr, adds translation filter feature to listing page

Hmm, the issue with this solution is that it leaks translatable code into the tables package... 🤔 You'll need to find a way to keep it all within the translatable package, maybe you need to introduce a new API to work around that limitation

is there any problem if we use the macro applySearchConstraint method for the Column class in SpatieLaravelTranslatablePluginServiceProvider? Using this, we are not directly leaks with the tables package.
example
\Filament\Tables\Columns\Column::macro('applySearchConstraint', function(){});

Fixed it up, thanks!

authors: FurkanGM danharrin

repo: laravel-filament/filament


text:
Model __isset() returns true for names which are not attributes or relations

The changes introduced in 45fb88125fc931127804c1da111b72798565e9a7 and  09ea8e2f321195d8518952cdbfa5746c9799cdc1 to the __isset() method on Model inadvertently result in isset($model->name) being true for any method on the model called name. The result is that $model->save, $model->update, etc. are all indicated as being set on the model because of the presence of save and update methods on Model.

It'll only return true if the method exists AND a relationship could be loaded.

I also got a similar problem to isset in my model and I tried to fix by changing the order of checks in relation method
public function __isset($key)
    {
        if (isset($this->attributes[$key]) || isset($this->relations[$key])) {
            return true;
        }

        if (method_exists($this, $key) && isset($this->relations[$key]) && $this->$key) {
            return true;
        }

        return $this->hasGetMutator($key) && ! is_null($this->getAttributeValue($key));
    }

@themsaid That's not quite correct.
I have taken a closer look at what is happening and isolated the problem to this line: https://github.com/laravel/framework/commit/09ea8e2f321195d8518952cdbfa5746c9799cdc1#diff-d8e24a5815a26f7211e66db787be647fR3411
My example scenario is testing for the presence of the save attribute on a model.

$this->key calls __get() on the model with the key name (save)
This results in $this->getAttribute('save') being called
getAttribute checks if an attribute can be loaded (false, no save attribute on the model), and then tries to load the save relation.
LogicException: Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation

@JamesGuthrie you're right, in my comment I meant that this is how the logic supposed to work.

relationship could be loaded

Will try to come up with a PR for a fix.

There's a PR currently open that will take care of this issue along with other issues related to calling method names as attributes: https://github.com/laravel/framework/pull/15438

authors: JamesGuthrie themsaid xtwoend

repo: laravel/framework


text:
make:controller --invokable produces "The --invokable option does not exist" error

Laravel Version: 5.6.25
PHP Version: 7.2.9
Database Driver & Version: 5.5.61

Description:
When attempting to create an API resource controller using the --invokable switch, the process fails and the following error message is displayed:
The "--invokable" option does not exist.
Running the php artisan make:controller command without the --invokable flag works as expected.

Steps To Reproduce:
Run the following command (taken straight from the docs ):
php artisan make:controller DeleteFutureGroupAssignmentController --invokable

This was added in 5.6.28. See https://github.com/laravel/framework/commit/530a07686c373950200da25ec050b265433fc624, https://github.com/laravel/framework/commit/b66d24c0d068eaa8398e79f02949d75a82a838eb, https://github.com/laravel/framework/commit/87e8857a38acf6a75ffc86c447252b7835548116.

This feature requires Laravel 5.6.29.

Thanks for pointing that out. Upgraded laravel/framework to latest solved it.

authors: AegirLeet bothy4g staudenmeir


text:
Exception 'Data missing' within HasAttributes->asDateTime($value) with MSSQL

Laravel Version: 6.10.1
PHP Version: 7.3.13
Database Driver & Version: MSSQL 14.0.3238

Description:
Currently I am porting a project from a MySQL to a MSSQL database. But while seeding the database an exception was thrown for casting a date.
So far I discovered that the HasAttributes trait of Eloquent is falling back on the format from the database driver, which is not alway the case. See: https://github.com/illuminate/database/blob/master/Eloquent/Concerns/HasAttributes.php#L862
In case of MSSQL this is Y-m-d H:i:s.v, but I assume the data is passed to the LogsActivity trait without receiving data from the database since the date value actually equals to the Y-m-d H:i:s format once it hits the LogsActivity trait from the laravel-activitylog package.
Specifying a specific $dateformat within the model does not work since it raises an exception when the data is actually passed in the Y-m-d H:i:s.v format.
Steps To Reproduce:
Model: task.php (simplified version)
use Spatie\Activitylog\Traits\LogsActivity;
class Task extends Model
{
    use LogsActivity, SoftDeletes;

    protected $dates = [
        'deadline'
    ];

    protected $guarded = [];

    protected static $logAttributes = [
        'name', 'description', 'assignee_id', 'deadline'
    ];

    protected static $logOnlyDirty = true;
}

TaskFactory.php (simplified version)

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\Models\Tasks\Task;
use Faker\Generator as Faker;

$factory->define(Task::class, function (Faker $faker) {
    $created = $faker->dateTimeBetween('-2 years');
    $updated = $faker->dateTimeBetween($created);

    $deadline = $faker->dateTimeBetween($created, '+1 year');

    return [
        'name' => $faker->sentence,
        'description' => '<p>'.nl2br($faker->paragraph(3)).'</p>',
        'assignee_id' => null,
        'deadline' => $faker->boolean(60) ? $deadline : null, // Chance of 60% of a deadline being filled
        'created_at' => $created,
        'updated_at' => $updated
    ];
});

Call within seeder DemoDataSeeder.php
$tasks = factory(Task::class, 30)->create();

Stacktrace:
[2020-01-13 19:44:28] local.ERROR: Data missing {"exception":"[object] (InvalidArgumentException(code: 0): Data missing at /var/www/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:576)
[stacktrace]
#0 /var/www/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(598): Carbon\\Carbon::rawCreateFromFormat('Y-m-d H:i:s.v', '2020-05-04 20:3...', NULL)
#1 /var/www/vendor/laravel/framework/src/Illuminate/Support/DateFactory.php(217): Carbon\\Carbon::createFromFormat('Y-m-d H:i:s.v', '2020-05-04 20:3...')
#2 /var/www/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Support\\DateFactory->__call('createFromForma...', Array)
#3 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(813): Illuminate\\Support\\Facades\\Facade::__callStatic('createFromForma...', Array)
#4 /var/www/vendor/spatie/laravel-activitylog/src/Traits/DetectsChanges.php(143): Illuminate\\Database\\Eloquent\\Model->asDateTime('2020-05-04 20:3...')
#5 /var/www/vendor/spatie/laravel-activitylog/src/Traits/DetectsChanges.php(90): App\\Models\\Tasks\\Task::logChanges(Object(App\\Models\\Tasks\\Task))
#6 /var/www/vendor/spatie/laravel-activitylog/src/Traits/LogsActivity.php(35): App\\Models\\Tasks\\Task->attributeValuesToBeLogged('created')
#7 /var/www/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(347): App\\Models\\Tasks\\Task::Spatie\\Activitylog\\Traits\\{closure}(Object(App\\Models\\Tasks\\Task))
#8 /var/www/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(196): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('eloquent.create...', Array)
#9 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(188): Illuminate\\Events\\Dispatcher->dispatch('eloquent.create...', Array)
#10 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(825): Illuminate\\Database\\Eloquent\\Model->fireModelEvent('created', false)
#11 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(667): Illuminate\\Database\\Eloquent\\Model->performInsert(Object(Illuminate\\Database\\Eloquent\\Builder))
#12 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php(206): Illuminate\\Database\\Eloquent\\Model->save()
#13 /var/www/vendor/laravel/framework/src/Illuminate/Support/Traits/EnumeratesValues.php(176): Illuminate\\Database\\Eloquent\\FactoryBuilder->Illuminate\\Database\\Eloquent\\{closure}(Object(App\\Models\\Tasks\\Task), 0)
#14 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php(207): Illuminate\\Support\\Collection->each(Object(Closure))
#15 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php(185): Illuminate\\Database\\Eloquent\\FactoryBuilder->store(Object(Illuminate\\Database\\Eloquent\\Collection))
#16 /var/www/database/seeds/DemoDataSeeder.php(106): Illuminate\\Database\\Eloquent\\FactoryBuilder->create()
#17 [internal function]: DemoDataSeeder->run(Object(Faker\\Generator))
#18 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#19 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(36): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#20 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#21 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#22 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#23 /var/www/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(134): Illuminate\\Container\\Container->call(Array)
#24 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(63): Illuminate\\Database\\Seeder->__invoke()
#25 /var/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php(122): Illuminate\\Database\\Console\\Seeds\\SeedCommand->Illuminate\\Database\\Console\\Seeds\\{closure}()
#26 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(64): Illuminate\\Database\\Eloquent\\Model::unguarded(Object(Closure))
#27 [internal function]: Illuminate\\Database\\Console\\Seeds\\SeedCommand->handle()
#28 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#29 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(36): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#30 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#31 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#32 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#33 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(201): Illuminate\\Container\\Container->call(Array)
#34 /var/www/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#35 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(188): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#36 /var/www/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(56): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#37 /var/www/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\\Console\\Command->runCommand('db:seed', Array, Object(Illuminate\\Console\\OutputStyle))
#38 /var/www/app/Console/Commands/SeedDemoInstallationCommand.php(55): Illuminate\\Console\\Command->call('db:seed', Array)
#39 /var/www/app/Console/Commands/SeedDemoInstallationCommand.php(50): App\\Console\\Commands\\SeedDemoInstallationCommand->runSeeder('DemoDataSeeder')
#40 [internal function]: App\\Console\\Commands\\SeedDemoInstallationCommand->handle()
#41 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#42 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(36): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#43 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#44 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#45 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#46 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(201): Illuminate\\Container\\Container->call(Array)
#47 /var/www/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#48 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(188): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#49 /var/www/vendor/symfony/console/Application.php(1011): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#50 /var/www/vendor/symfony/console/Application.php(272): Symfony\\Component\\Console\\Application->doRunCommand(Object(App\\Console\\Commands\\SeedDemoInstallationCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#51 /var/www/vendor/symfony/console/Application.php(148): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#52 /var/www/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#53 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#54 /var/www/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#55 {main}
"}

this error is normally because the date format set on your model doesnt match your database

Thanks for looking into the error. I am very interested in more information about similar issues! But this issue is both raised when providing an explicit $dateformat on the model and also when $dateformat is not provided at all. I am currently looking into the reason why multiple formats are used.
Even when I format the deadline within the factory to the driver standard Y-m-d H:i:s.v, the value is still being formatted to Y-m-d H:i:s. Which than is used within the events where the activity gets logged. There HasAttributes->asDateTime($value) is called and checked against the format from the database driver which than does not equals to the value and the exception is raised.

Well, summarized: it turned out that there was a accessor applied to deadline which was returning in the wrong format. Issue solved!


text:
Collections intersect Doesn't Work

Let's Suppose,
We have Collection Of Post Models where we are eager loading relations like auther etc
so $collectionA consists of All Post Models with eager loaded relations.
Now we have another Collection $collectionB where we didn't fetched relations
and then
if I use $collectionB->intersect($collectionA) or vise versa It returns empty collection even if i have similar models.

Laravel Version: 7.26.0
PHP Version: 7.4
Database Driver & Version: MySQL 5.7
OS: MacOs

Hey there,
Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? We'll help you out and re-open this issue if so.
Thanks!

authors: bhushan driesvints


text:
Http client returns null on invalid json using the json-method with no way to check if the decoding of the json is valid

Laravel Version: 7.22.3
PHP Version: 7.4

Description:
If Http::get('http://someurl')->json() is used and invalid json is sent it will always return null and with no way to check if the decoding of the json is valid.
I ran into this issue after an external API suddently started sending invalid JSON. In my case it was a BOM-character in front of the json, but is relevant for any responses expected to be json and turning out to sending invalid json.
The reason why this happens is because the json() method does not check if the json is decoded correctly and just return the result of json_decode.
The Http client does not throw errors as a starting point, only when the throw-method is used().
So do we want it to throw on invalid json when using the json() and no throw()-method?
or should the throwing on json error be handed else where?
Steps To Reproduce:
   Run Http::get('http://someurl/that/returns/invalid/json')->throw()->json()
  // and you will receive null for any invalid json response.

I don't think we will change this behavior atm. If you want to work around this you can check for null in your own code and throw whatever error you want.

Okay,
In my case that endpoint would actually return null or json object for different cases, now it was just returning null all the time.
Hent Outlook til iOShttps://aka.ms/o0ukef

Fra: Taylor Otwell notifications@github.com
Sendt: Friday, December 25, 2020 6:38:29 PM
Til: laravel/framework framework@noreply.github.com
Cc: Christian c2n@live.dk; Author author@noreply.github.com
Emne: Re: [laravel/framework] Http client returns null on invalid json using the json-method with no way to check if the decoding of the json is valid (#35716)
I don't think we will change this behavior atm. If you want to work around this you can check for null in your own code and throw whatever error you want.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/laravel/framework/issues/35716#issuecomment-751275042, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAXPDYX3BP2XDVMXWW3OVLDSWTEZLANCNFSM4VJGDXUA.

Hi @crissi , I just had a similar problem, but as \Illuminate\Http\Client\Response is macroable I added this macro to my AppServiceProvider@boot method:
\Illuminate\Http\Client\Response::macro('validJson', function ($key = null, $default = null) {
    if (! $this->decoded) {
        $this->decoded = json_decode($this->body(), true, 512, JSON_THROW_ON_ERROR);
    }

    return $this->json($key, $default);
});

And then I call it like this:
$data = Http::get('http://someurl/that/returns/invalid/json')->throw()->validJson();

Thought it could help.

Thanks man👍
Hent Outlook til iOShttps://aka.ms/o0ukef

Fra: Rodrigo Pedra Brum notifications@github.com
Sendt: Tuesday, December 29, 2020 3:01:07 AM
Til: laravel/framework framework@noreply.github.com
Cc: Christian c2n@live.dk; Mention mention@noreply.github.com
Emne: Re: [laravel/framework] Http client returns null on invalid json using the json-method with no way to check if the decoding of the json is valid (#35716)
Hi @crissihttps://github.com/crissi , I just had a similar problem, but as \Illuminate\Http\Client\Response is macroable I added this macro to my AppServiceProvider@boot method:
\Illuminate\Http\Client\Response::macro('validJson', function ($key = null, $default = null) {
if (! $this->decoded) {
$this->decoded = json_decode($this->body(), true, 512, JSON_THROW_ON_ERROR);
}
return $this->json($key, $default);

});
And then I call it like this:
$data = Http::get('http://someurl/that/returns/invalid/json')->throw()->validJson();
Thought it could help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/laravel/framework/issues/35716#issuecomment-751919379, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAXPDYQJV7UCSZ7JZHKNIB3SXEZ6HANCNFSM4VJGDXUA.

authors: crissi rodrigopedra taylorotwell


text:
duplication function calls in attribute

Laravel Version
10.6.1
PHP Version
8.1.5
Database Driver & Version
postgres
Description
Every time i call any attribute in models it calls method agian
Steps To Reproduce
imagine we have a model like this
class TestModel extends Model {
    //......
    //......
    //......
    public function getTitleAttribute()
    {
        $test2 = Test2Model::query()->find($this->id);

        return $test2?->title;
    }
}

when I use a query like below
 $p = Test2::query()->first();

and
    if (isset($p['title'])) {
        $t = $p['title'];
    }

    if (isset($p->title)) {
        $t = $p->title;
    }

Everytime i call $t->title, getTitleAttributes() is called again, so if i call it 5 times, 5 times that getTitleAttributes() is called;
$t->title;
$t->title;
$t->title;
$t->title;
$t->title;

I don't really see a bug here.

getTitleAttribute is called every time you reference the title attribute, then you need to add some cache to your code.
class TestModel extends Model
{
    protected array $cache = [];

    public function getTitleAttribute(): string
    {
        return $this->cache['title'] ??= Test2Model::query()->where('id', $this->id)->value('title') ?: '';
    }
}

authors: driesvints eusonlito hAz5


text:
Job gets stuck in pending when dependent model is deleted inside the handle method.

Laravel Version
11.0
PHP Version
8.1
Database Driver & Version
using mysql/mysql-server on docker
Description
I am currently executing/dispatching the job on a controller method.
Job is being executed by php artisan queue:work
Works well when I try to manually load the model, so instead of having the job depend on the model, I instead pass the model ID to the job, and inside the job handler, I try to fetch the model using the given ID, then delete it, and the job dont get stuck in pending.
Steps To Reproduce

class DeleteSubUser implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Create a new job instance.
     */
    public function __construct(
        private User $user
    ) {}
   public handle() {
      $this->user->delete();
      echo "Done";    // This still gets printed in the console where `php artisan queue:work` was executed.
   }
}

Ok, it seems like the issue is with telescope. It works fine when telescope is disabled.
telescope v5.0

Gonna close this one then since it's related to Telescope. Thanks

authors: davemagro driesvints


text:
[5.3] Optimize content generation in testSharedGet()

length of previous string: 5888890 bytes (5.62 MB)
length of new string: 6000000 bytes (5.72 MB)

Benchmark:
$nb = 10;

$t1 = microtime(true);
for ($x = $nb; $x--; ) {

    $content = '';
    for ($i = 0; $i < 1000000; ++$i) {
        $content .= $i;
    }

}
$t2 = microtime(true);
for ($x = $nb; $x--; ) {

    $content = str_repeat('123456', 1000000);

}
$t3 = microtime(true);

echo $t2 - $t1;
echo PHP_SAPI == 'cli' ? "\n" : '<br>';
echo $t3 - $t2;

Results on PHP 5.6, for 10 iterations (yes, only 10):

Before: 3.904000043869 seconds (that means 390 ms for one iteration!)
After: 0.065000057220459 seconds

About 60 times faster.

ping @deadem :)

Ow! Thanks! ;)

@deadem I'm not very comfortable seeing so much I/O. This test writes 110 MB each time… Do you have an idea how much down we could reduce this, while keeping the test effective?

For the sake of referencing, this PR is a follow-up to #12796.

authors: deadem vlakoff


text:
[5.3] Backup offset/limit properties when running pagination/chunk queries

Still preparing the field for https://github.com/laravel/internals/issues/103.
Sample code that would be failing currently:
// get a paginator
$paginator = $query->paginate(...);

// leftover offset/limit clauses are unexpectedly applied here:
$topMovies = $query->where('rating', '>=', '9')->get();

Sadly tests can't be added for this, forPage being mocked.

Couldn't you add an integration test for it?

I have added integration tests for paginate and chunk methods, for Eloquent and Query Builder.
But I noticed the code currently doesn't work for chunkById, as it's using forPageAfterId.

I have fixed chunkById, though it's becoming a bit bloated…
Also there remains simplePaginate to be verified.

All of this stuff is getting ridiculous. What are we doing?

I don't understand how Laravel has existed for 5 years without these ridiculous things?

I understand your position, the code is more complicated than I was expecting. It's really a "gains vs. code complexity" situation. So, shall we just accept that paginate/chunk methods "pollute" the builder instance, and the instance is not reusable after?

I would. Re-using the query builder in general is bad practice IMO even though I believe the core does it once for getting the count and then running the pagination query. In general though it should never be done and I don't feel like polluting everything up just to accomodate it.

authors: taylorotwell vlakoff


text:
[5.5] Let \Illuminate\Auth\Events\Failed also accept the current request.

Let \Illuminate\Auth\Events\Failed event also accept the current request.

I think any handler could just type hint the request in its constructor.

authors: lucasmichot taylorotwell


text:
[5.9] Add modifyCollection function

If I want to modify the paginator's underlying collection. I have to use the code below code:
$collection->setCollection(
    $collection->getCollection();
    // Some code...
);

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


text:
[6.x] Update CHANGELOG-6.x.md

This is actually a bugfix and not a new feature. It should have worked like this before.
Ping @TBlindaruk

@driesvints ,
hm ok

authors: TBlindaruk driesvints


text:
[8.x] Unification of paginator translation keys

I made an appeal to the translations of the paginator keys, since this file contained an appeal to both the pagination.php file and the json file.
Has brought the code to a single form.
I also sent a PR to the https://github.com/laravel/laravel/pull/5426

No plans to change this for now, especially on a minor release.

No plans to change this for now, especially on a minor release.

Now in one file there (lines 6, 10, 16, 20, 28, 30, 32, 34 and 74) is a call to the translation of json and pagination.php file.
I think this is wrong. It is necessary to unify the treatment. Do either everything in json or everything in pagination.php.
It is incorrect to upload changes to the patch. I agree.
This is a minor change for a major update, given the original access error. That is why I suggested changes to the minor version.
If, nevertheless, you think that this should be placed in the major version, then I can send a PR to it.
Should I submit a PR to the master branch?

It's not clear what to do from the current answer 😯
I'm not looking forward to talking. Just a short answer.

@andrey-helldar given Taylor's answer we probably won't be changing this, sorry.

authors: andrey-helldar driesvints taylorotwell


text:
[11.x] Always set connect timeout, timeout and enforce TLS 1.2 or higher when using Guzzle

All browsers that I know of already set TLS 1.2 as the minimum supported version, more than a year ago, some more than 3 years ago. The Symfony HTTP client in 6.3.0 will default to only allowing TLS 1.2 or higher. I have not made this change in Guzzle because I feel it would be a breaking change, and may actually impact Guzzle users, because outside of newer versions of Laravel, Guzzle users tend to run on very old systems.
The Laravel HTTP client already enforced a connect timeout and a timeout, but this was missing from Pusher. I've enforced the same good configuration options there.

Yeh. I'll look into this in a bit. I'll also be a nice performance improvement to not be re-creating the client over and over, so we can re-use the same TCP connection behind the scenes if people are hitting the same endpoint.

@GrahamCampbell @taylorotwell This change should be mentioned in upgrade guide. It just downed my production due to outdated version of Curl.

@daniser can you send in a PR to the docs?

@driesvints Right, I'll get to it.

authors: GrahamCampbell daniser driesvints


text:
Allow chunk to exit when the closure returns false

When looping through all of the different rows returned by Eloquent\Builder using a chunk closure, you should be able to specify to Builder that you wish to no longer continue processing chunks by simply returning false inside the closure.
Usage Example
  ExamplesModel::where('is_an_example', true)
        ->chunk(5000, function($urls) use (&$post, &$loop, $time_queries, $time_started) {

            foreach($urls as $url) {
                Lengthy::process($url->path, $url->filename);

                // only allow to run for 20 seconds...
                if ($time_started+20 > microtime(true)) {
                    return false;
                }
            }

        })

Ugh... don't worry, I will make a new pull request.


text:
[5.1] Allow forceArray flag in Collection::random

Sometimes it is needed to always return array from random method.
E.g. getting random amount of random items
$collection->keys()->random(rand(1, $collection->count()))->all();

This code fails when we get a single item from collection.

I'm sorry I just can't have a boolean parameter like that. It feels too bad.

I've a another suggestion, but it'll break BC.
Change the signature to public function random($amount = null).
If $amount is null return an element, if it have a value return an array containing that amount of elements.
How would that feel?

authors: ibrasho rkgrep taylorotwell


text:
Fix getInitialPath to use props.history instead of props.useHistory

Uncaught Error: No route matched path: / when used on a page in a
subdirectory. Example: http://server/subdir/subdir/page
The documentation states { history : true } should be passed to the
component which get attached to the component’s props. useHistory
becomes a property of the component state which isn’t available yet
when getInitialPath is called.

The pull request looks good. I'm currently working on travis ci / sauce labs integration since I need a browser with History support to test this change.

Verified fix in example app. Merged.

authors: ambidexterich larrymyers

repo: larrymyers/react-mini-router


text:
ebid uninstall error

error when uninstalling
https://github.com/gregorwolf/ebid-abap-client
error message "Structure ZEBID_COMPANY_RATE is still used in ABAP Dictionary"

will now delete the DDIC objects in the correct order
@gregorwolf

Thanks.

authors: gregorwolf larshp

repo: larshp/abapGit