text:
$0 different between AppImage env and bazel run

Hi, it seems like the entry point for an AppImage is the symlink to the binary located within the runfiles dir, and not the binary itself located alongside the runfiles dir. This breaks (at the very least) the runfiles mecanism for bash provided by @bazel_tools: https://github.com/bazelbuild/bazel/blob/master/tools/bash/runfiles/runfiles.bash
I have a minimally reproducing example:
BUILD:
sh_binary(
  name = "foo",
  srcs = ["foo.sh"],
)

appimage(
  name = "foo.appimage",
  binary = ":foo",
)

foo.sh:
#!/bin/bash

echo $0
ls $0.runfiles

We can then do:
$ bazel run :foo
INFO: Analyzed target //:foo (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:foo up-to-date:
  bazel-bin/foo
INFO: Elapsed time: 0.246s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/foo
/home/kbalke/.cache/bazel/_bazel_kbalke/11b92d5ec27afd7a78388db1def3eb76/execroot/__main__/bazel-out/k8-fastbuild/bin/foo
__main__  MANIFEST
$ bazel run :foo.appimage
INFO: Analyzed target //:foo.appimage (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:foo.appimage up-to-date:
  bazel-bin/foo.appimage
INFO: Elapsed time: 0.261s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/foo.appimage
/tmp/.mount_foo.apkjDcjn/foo.runfiles/__main__/foo
ls: cannot access '/tmp/.mount_foo.apkjDcjn/foo.runfiles/__main__/foo.runfiles': No such file or directory

One possible workaround would be to provide RUNFILES_DIR or RUNFILES_MANIFEST_FILE in the environment within a generated AppImage. I have patched around this issue by modifying the runfiles.bash sourcing incantation as follows:
# --- begin runfiles.bash initialization ---
  # Copy-pasted from Bazel's Bash runfiles library (tools/bash/runfiles/runfiles.bash).
  set -euo pipefail
  if [[ ! -d ${RUNFILES_DIR:-/dev/null} && ! -f ${RUNFILES_MANIFEST_FILE:-/dev/null} ]]; then
    if [[ -f "$0.runfiles_manifest" ]]; then
      export RUNFILES_MANIFEST_FILE="$0.runfiles_manifest"
    elif [[ -f "$0.runfiles/MANIFEST" ]]; then
      export RUNFILES_MANIFEST_FILE="$0.runfiles/MANIFEST"
    elif [[ -f "$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
      export RUNFILES_DIR="$0.runfiles"
    elif [[ "$0" == *"runfiles"* ]]; then
      # Handle case where we're executing from within an AppImage. The AppImage
      # invokes as an entry point the symlink to the binary located within the
      # runfiles directory, instead of the binary in the `bazel-out` dir located
      # alongside the runfiles directory. As a result, we need to search up for
      # the directory in $0 instead of next to it.
      export RUNFILES_DIR="${0%runfiles*}runfiles"
    fi
  fi
  if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
    # shellcheck disable=SC1090
    source "${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash"
  elif [[ -f ${RUNFILES_MANIFEST_FILE:-/dev/null} ]]; then
    # shellcheck disable=SC1090
    source "$(grep -m1 "^bazel_tools/tools/bash/runfiles/runfiles.bash " \
      "$RUNFILES_MANIFEST_FILE" | cut -d ' ' -f 2-)"
  elif [[ -f ../bazel_tools/tools/bash/runfiles/runfiles.bash ]]; then
    export RUNFILES_DIR="$(realpath "$(pwd)/..")"
    source ../bazel_tools/tools/bash/runfiles/runfiles.bash
  else
    echo >&2 "ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash"
    exit 1
  fi
  echo $0
  # --- end runfiles.bash initialization ---

Great catch, thanks! I'm glad you could find a workaround. Feel free to open a PR to fix this, otherwise I'll try to find some time to look into this soon. Thanks to your MRE it should be easy to add a test for this as well :+1:

@fughilli could you please check if https://github.com/lalten/rules_appimage/pull/58 resolves your issue?

authors: fughilli lalten


text:
Example is not working -

Hello,
I have installed onto spy on a Mac running 10.10.5. When I try calling "ontospy http://purl.org/spar/frbr" I get the following error:
OntoSpy v1.6.8.3
Local library: '/Users/squiresrb/.ontospy/models/'
You passed the argument: http://purl.org/spar/frbr
Traceback (most recent call last):
File "/Users/squiresrb/anaconda/bin/ontospy", line 11, in
sys.exit(main())
File "/Users/squiresrb/anaconda/lib/python3.5/site-packages/ontospy/ontospy.py", line 235, in main
g = Graph(args[0])
File "/Users/squiresrb/anaconda/lib/python3.5/site-packages/ontospy/core/graph.py", line 82, in init
self.OWLTHING = OntoClass(rdflib.OWL.Thing, rdflib.OWL.Class, self.namespaces)
File "/Users/squiresrb/anaconda/lib/python3.5/site-packages/ontospy/core/entities.py", line 259, in init
self.slug = "class-" + str(self.id) + "-" + slugify(self.qname)
File "/Users/squiresrb/anaconda/lib/python3.5/site-packages/ontospy/core/util.py", line 856, in slugify
value = unicode(re.sub('[^\w\s-]', '', value).strip().lower())
File "/Users/squiresrb/anaconda/lib/python3.5/re.py", line 182, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object

Hi - thanks for bringing this up, that was a bug with Python3.
I've fixed it in version 1.6.8.5 - just update the package e.g. pip install ontospy -U

source: gharchive/issue

authors: burkesquires lambdamusic

repo: lambdamusic/OntoSpy

license: MIT

license_type: permissive

license_source: github-api


text:
Rename repo

I don't see us maintaining two repositories for Nextflow integration.
Can we just rename this one to nextflow-lamin so that we have a memorable short github URL for it?
I'll also rename https://github.com/laminlabs/redun-lamin-fasta; not a priority but during the next refactor.

Yes, let's do it

We might also have
nextflow-lamin-module or nextflow-lamin-plugin in the not so distant future so I would actually not rename this for now.

But it'd still be nice to centralize things in one repo with a simple name. If we ever do something complicated like a plugin, that's going to be super technical and could have a longer name. Or it could also be managed in this repo mono-repo style, depending on the needs.
Hence, I'm still in favor of renaming, but I'm also not obsessed with it.

authors: Zethson falexwolf

repo: laminlabs/nextflow-lamin-usecases


text:
Organizational teaser image - make sure height and width is always fixed

Hi,
The organizational teasers look much better since the latest improvements now that the width is fixed, but I would suggest to fix the height as well. Now, with predominantly horizontal logos (try to add as many verticals as we can, but sometimes there just isn't one!), the box is very small and does not allow enough space to include the organization name in the hover over, e.g.:

Screenshot from: https://landportal.info/library/sources
It would be great if the height could be fixed as well.
Thanks!

After a quick chat with Jules wanted to specify the following:

If the teasers are going to be changed, I would still recommend having fixed height and weight to make sure that they show up aligned in a grid rather than having a messy group of logos and text;
In that regard, it might make sense to have a separate view for search result teasers or related content teasers for organizations, and teasers that show up in a grid like on this library sources page.

Just food for thought, but the main message is anyway that we should at all cost avoid a messy page, regardless  of sizes of logos that are provided. That is something we simply cannot control unfortunately.

on the new version, all LLR display (teaser, search and all) keep their image ratio.

authors: jcr lisettemeij

repo: landportal/drupal

license: mit

license_source: bigquery


text:
🛑 rexingsports.cn is down

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

HTTP code: 567
Response time: 635 ms

Resolved: rexingsports.cn is back up in d1f6ee0 after 1 hour, 56 minutes.

repo: lanen/bs-site


text:
🛑 vipgifts.net is down

In 459f115, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 739 ms

Resolved: vipgifts.net is back up in 8132ad0 after 47 minutes.


text:
🛑 rexingsports.cn is down

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

HTTP code: 567
Response time: 955 ms

Resolved: rexingsports.cn is back up in 25345e5 after 19 minutes.


text:
🛑 rexingsports.cn is down

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

HTTP code: 567
Response time: 766 ms

Resolved: rexingsports.cn is back up in b0810c7 after 12 minutes.


text:
🛑 vipgifts.net is down

In 6b199e8, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 646 ms

Resolved: vipgifts.net is back up in 1c43816 after 25 minutes.


text:
🛑 rexingsports.cn is down

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

HTTP code: 567
Response time: 604 ms

Resolved: rexingsports.cn is back up in 64de265 after 42 minutes.


text:
🛑 trixmall.com is down

In 6ed215e, trixmall.com (https://www.trixmall.com/) was down:

HTTP code: 567
Response time: 523 ms

Resolved: trixmall.com is back up in 4888143.


text:
🛑 Plex is down

In 693da08, Plex (http://langasg1.ddns.net:32400/web/index.html) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Plex is back up in ae06efc after 2 days, 21 hours, 26 minutes.

repo: langasg/upptime


text:
BadRequestError with vllm locally hosted Llama3 70B Model

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangGraph/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 LangGraph/LangChain rather than my code.
[X] I am sure this is better as an issue rather than a GitHub discussion, since this is a LangGraph bug and not a design question.

Example Code
Following below example with locally hosted llama3 70B instruct model with ChatOpenAI
https://langchain-ai.github.io/langgraph/how-tos/create-react-agent/

Simlar issue with the following example:
from langchain_core.tools import tool
from langgraph.graph import MessageGraph from langgraph.prebuilt import ToolNode, tools_condition

@tool def divide(a: float, b: float) -> int: """Return a / b.""" return a / b

llm = ChatOpenAI( model_name = 'Meta-Llama-3-70B-Instruct', base_url = "http://172.17.0.8:xxxx/v1/", api_key = "EMPTY", temperature=0).bind( response_format={"type": "json_object"} )

tools = [divide]

graph_builder = MessageGraph()
graph_builder.add_node("tools", ToolNode(tools))
graph_builder.add_node("chatbot", llm.bind_tools(tools))
graph_builder.add_edge("tools", "chatbot")
graph_builder.add_conditional_edges( ... "chatbot", tools_condition ... ) graph_builder.set_entry_point("chatbot")
graph = graph_builder.compile()

graph.invoke([("user", "What's 329993 divided by 13662?")])

Error Message and Stack Trace (if applicable)
BadRequestError: Error code: 400 - {'object': 'error', 'message': "[{'type': 'extra_forbidden', 'loc': ('body', 'tools'), 'msg': 'Extra inputs are not permitted', 'input': [{'type': 'function', 'function': {'name': 'get_weather', 'description': 'Use this to get weather information.', 'parameters': {'type': 'object', 'properties': {'city': {'enum': ['nyc', 'sf'], 'type': 'string'}}, 'required': ['city']}}}], 'url': 'https://errors.pydantic.dev/2.7/v/extra_forbidden'}]", 'type': 'BadRequestError', 'param': None, 'code': 400}

Description
I have tried instantiating ChatOpenAI as follows:
llm = ChatOpenAI( model_name = 'Meta-Llama-3-70B-Instruct', base_url = "http://172.17.0.8:xxxx/v1/", api_key = "EMPTY", temperature=0)
llm = ChatOpenAI( model_name = 'Meta-Llama-3-70B-Instruct', base_url = "http://172.17.0.8:xxxx/v1/", api_key = "EMPTY", temperature=0).bind( response_format={"type": "json_object"} )
System Info
Meta's llama 3 70B Instruct locally hosted on vllm.
ChatOpenAI works fine for other application for example RAG and LCEL

@vbarda
Following example demonstrates support for llama 3 however it is using Ollama.
Is the issue then in ChatOpenAI/vllm. Do we have an example of vllm/ChatOpenAI?

I use Llama3.1-8B-Instruct and get 400 error: BadRequestError: Error code: 400 - {'object': 'error', 'message': "[{'type': 'extra_forbidden', 'loc': ('body', 'parallel_tool_calls'), 'msg': 'Extra inputs are not permitted', 'input': False}]", 'type': 'BadRequestError', 'param': None, 'code': 400}
I removed the parameter parallel_tool_calls and succeeds.
The conflict arises from different support of function calling by Llama3.1 and OpenAI, Llama3.1 does not support this parameter while OpenAI does.
https://platform.openai.com/docs/guides/function-calling
Can someone handle this issue?

Facing the same issue, looks like vllm doesn't accept function_call and function as a parameter, but it uses tools

you should modify you llm definiosion to llm = ChatOpenAI( model_name = 'Meta-Llama-3-70B-Instruct', base_url = "http://172.17.0.8:xxxx/v1/", api_key = "EMPTY", temperature=0).bind( response_format={"type": "json_object"},disabled_params={"parallel_tool_calls": None} )

authors: ArekAff Haxeebraja KevinZeng08 vizsatiz

repo: langchain-ai/langchain


text:
GCSFileLoader stores a wrong source in the metadata

System Info
0.0.257
Who can help?
No response
Information

[ ] The official example notebooks/scripts
[ ] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[X] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
Load a document from GCS and check the metadata["source"], it would point to the file in /tmp directory
Expected behavior
source pointing to an original file on GCS

Should be resolved with merged code

authors: eyurtsev lkuligin


text:
doc(Q&A witch RAG) Adapt ChatModelTabs

Thank you for contributing to LangChain!

[ ] PR title: "package: description"

Where "package" is whichever of langchain, community, core, experimental, etc. is being modified. Use "docs: ..." for purely docs changes, "templates: ..." for template changes, "infra: ..." for CI changes.
Example: "community: add foobar LLM"

[ ] PR message: Delete this entire checklist and replace with

Description: a description of the change
Issue: the issue # it fixes, if applicable
Dependencies: any dependencies required for this change
Twitter handle: if your PR gets announced, and you'd like a mention, we'll gladly shout you out!

[ ] Add tests and docs: If you're adding a new integration, please include

a test for the integration, preferably unit tests that do not rely on network access,
an example notebook showing its use. It lives in docs/docs/integrations directory.

[ ] Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:

Make sure optional dependencies are imported within a function.
Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
Most PRs should not touch more than one package.
Changes should be backwards compatible.
If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17.

we recently redid the documentation structure as part of the move to 0.2. this is a good pr but will need to be updated with that - sorry!

source: gharchive/pull-request


text:
docs: minor changes in sambanova community integration docs

- **Description:**     minor changes in sambanova community integration notebook docs

Lint check errors not related with changes in this PR


text:
huggingface: Skip Login to HuggubgFaceHub when token is not set

The changes in this PR are identical to the ones applied in the the community library  https://github.com/langchain-ai/langchain/pull/21561
.

[ ] HuggingFaceEndpoint: "Skip Login to HuggingFaceHub when hf token is not set"

Where:  langchain, parthners, llm, huggingface_endpoint

[ ] PR message: Delete this entire checklist and replace with

Description:  Skip login to huggingface hub when when huggingfacehub_api_token is not set. This is needed when using custom endpoint_url outside of HuggingFaceHub.
Issue: it fixes https://github.com/langchain-ai/langchain/issues/20342 and https://github.com/langchain-ai/langchain/issues/19685
Related PR : https://github.com/langchain-ai/langchain/pull/21561
Dependencies: None

[ ] Add tests and docs:

Tested with locally available TGI endpoint
Example Usage

from langchain_huggingface.llms import HuggingFaceEndpoint

llm = HuggingFaceEndpoint(
    endpoint_url='http://localhost:8080',
    server_kwargs={
        "headers": {"Content-Type": "application/json"}
    }
)
resp = llm.invoke("Tell me a joke")
print(resp)

Also tested against HF Endpoints
from langchain_huggingface.llms import HuggingFaceEndpoint

huggingfacehub_api_token = "hf_xyz"
repo_id = "mistralai/Mistral-7B-Instruct-v0.2"
llm = HuggingFaceEndpoint(
   huggingfacehub_api_token=huggingfacehub_api_token,
   repo_id=repo_id,
)
resp = llm.invoke("Tell me a joke")
print(resp)

Additional guidelines:

Make sure optional dependencies are imported within a function.
Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
Most PRs should not touch more than one package.
Changes should be backwards compatible.
If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17.

cc @Jofthomas

authors: baskaryan mirkenstein


text:
fix: LANGCHAIN_VERBOSE=false does not turn off verbose logging.

Fixes # LANGCHAIN_VERBOSE=false does not turn off verbose logging.

Nice, thank you!

repo: langchain-ai/langchainjs


text:
feat: support using add_node as a decorator

graph.add_node can be used as a decorator now.
Examples:
graph = Graph(...)

# All of the following are supported

@graph.add_node("search node")
def search():
    pass

# Uses search.__name__ as the name of the node

@graph.add_node()
def search():
    pass

@graph.add_node
def search():
    pass

The default behavior is still supported as well
def search():
    pass

graph.add_node(search)

graph.add_node("search tool", search)

Note: in #209, @nfcampos supported a PR that implements similar functionality to the one in this PR.

Closing since a duplicate of #940

authors: Ahmad-Alsaleh vbarda

repo: langchain-ai/langgraph


text:
Docker version please!

as per title

I need it too

Yes even just docker scoped for the front end but integrated with the langgraph cloud api would help a lot.
I have less front end experience so this and the Python backend would be huge!

In the next coming weeks we're putting out better support for running LangGraph in docker on Windows/Linux. I'll update this repo with instructions on how to do that once it's released 🙂

repo: langchain-ai/open-canvas


text:
validation error for ChatOutputResponse sender_name

Describe the bug
A simple flow with latest langflow UI.
Text Input has a Text (as Jim) --> Chat Input ( sender_name)
when I build these two components, I get validation error.
1 validation error for ChatOutputResponse
sender_name
Input should be a valid string [type=string_type, input_value=Message(text_key='text', ...4743-9ae7-4b918d145efa'), input_type=Message]
For further information visit https://errors.pydantic.dev/2.8/v/string_type
Browser and Version

Chrome - Version 126.0.6478.127 (Official Build) (x86_64)

To Reproduce
As explained above.
Screenshots

Additional context
Post langflow installation, I had this pydantic error within the pydanitc module itself. ..but I did supress the warning messages since there was already known issue on this and it was no harm..
(langflow) mnanjana@MNANJANA-M-77J4 langflow % python3 run_langflow.py run
Starting Langflow v1.0.6...
╭───────────────────────────────────────────────────────────────────╮
│ Welcome to ⛓ Langflow                                             │
│                                                                   │
│                                                                   │
│ Collaborate, and contribute at our GitHub Repo 🌟                 │
│                                                                   │
│ We collect anonymous usage data to improve Langflow.              │
│ You can opt-out by setting DO_NOT_TRACK=true in your environment. │
│                                                                   │
│ Access http://127.0.0.1:7860                                      │
╰───────────────────────────────────────────────────────────────────╯
/Users/mnanjana/RAG/langflow/lib/python3.12/site-packages/pydantic/main.py:1059: PydanticDeprecatedSince20: The __fields__ attribute is deprecated, use model_fields instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
warnings.warn(
/Users/mnanjana/RAG/langflow/lib/python3.12/site-packages/pydantic/main.py:1059: PydanticDeprecatedSince20: The __fields__ attribute is deprecated, use model_fields instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
warnings.warn(
/Users/mnanjana/RAG/langflow/lib/python3.12/site-packages/pydantic/main.py:1059: PydanticDeprecatedSince20: The __fields__ attribute is deprecated, use model_fields instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/

Hi @mnanjana2020  ,
Do you need any assistance with this case? If not, please let us know if this issue can be closed.
Check out the latest version 1.0.10.

Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to assist you.

repo: langflow-ai/langflow


text:
Add highlighting for custom types

Closes #448 .
Also added a test functions.

Looks nice! What do you think about adding tests for already supported highlighting?

Thank you! Yes, I can do so. On the first run, I just wanted to cover my changes, but it is a good idea to cover even more from the highlighter logic.

repo: langium/langium


text:
双桟环境无法连接服务端

服务器支持双桟环境
服务器域名解析存在A和AAAA解析
客户端支持双桟环境
问题现象：无任何显示

解决办法：PC端网卡关闭IPV6或者服务器域名去掉AAAA解析
这可能需要支持V6才行了，或者只解析V4

@13653216371 删掉 --tun 的配置,让服务器分配地址,然后贴 --debug 日志看看.如果是和服务器之间连接出现问题应该不能成功分配地址.

这可能需要支持V6才行了，或者只解析V4

我使用下来是支持 v6 的。
我的服务端是在 Cloudflare CDN 后边，域名有A AAAA 解析。
在双栈机器上用 v4 和 v6 都可以连到服务端，也可以在 hosts 中指定  v6，仅供参考。

ok

authors: 13653216371 lanthora peeweep

repo: lanthora/candy


text:
Lapce syntax highlighting issue

System:
OS: MacOS, 12.2
Chip: Apple M1
Cargo: 1.62.0 (a748cf5a3 2022-06-08)
Rustc: 1.62.1

Problem:
Here is the video. The way it looks like:

Installing Rust extension
Openning directory
Finding out that highlight is not working -> Reloading Lapce
Opening directory once again
Reloading window
Pressing esc
Highlighting not working

I don't know actually why that happening and the theme is changing incorrectly, but id does

Have you tried reinstalling the Plugin ? You could try to remove "(Username).lapce\plugins\lapce-rust".

Nope, same.

I tried the dev version through the cargo run. Installed plugin and installed plugins tab appeared and the extensions too. Themes appeared too

Seems like the Language Server is crashing.

Well, I was thinking, that is true. But Neovim feels good with rust_analyzer

To me it looks like Neovim is not compiling to WASM. It does not look like a plugin error, since you can see the hightlight for a second or so. We could try to downgrade rust-analyzer threw a modification of the lapce-rust plugin repo but i would prefer to find the main issue.

To me it looks like Neovim is not compiling to WASM.

RA is ran directly, not compiled to WASM by us. I doubt this is an issue with RA's version.

Is the Rust plugin starting at all? When you open a folder do you see information on the bottom left status bar? Do you get hover information, or anything?
Typically the disappearing highlighting is due to RA getting confused about what workspace it is in, and providing empty semantic highlighting.

Try disabling, then re-enabling the plugin. I think I saw a bug where it wouldn't start properly and this fixed it.
Check what folder you're in. I've seen this issue when Lapce is opened on a folder that doesn't have the cargo.toml at the 'top'. Though based on the terminal, it looks like you've just opened the normal Lapce folder.
If Rust isn't starting at all, then check to see if you have a 'rust-analyzer-something-something-something' file in the plugin folder, without a .gz extension.

Well, after some changes, I figured out that problem related not on plugin. Problems were in rust_analyzer. Real solution of this is just update and restart system. WM tests tells, that that is working solution, so... No other solutions here, only rust_analyzer update

authors: 6rube MaskedTrench MinusGix

repo: lapce/lapce


text:
Remove pyaudio

bzoinq version: master
Python version: 3.6
Operating System: Ubuntu

Description
pip instalation breaks when pyaudio dependencies are not satisfied.
What I Did
pip install bzoinq

I will remove pyaudio ASAP because on Linux we can play the wav file with aplay.

Fixed

repo: lapisdecor/bzoinq


text:
Error when creating phpmyadmin

When running docker-compose up -d mysql phpmyadmin I get this error:

ERROR: for phpmyadmin  Cannot create container for service phpmyadmin: Invalid volume spec "phpmyadmin": Invalid volume destination path: 'phpmyadmin' mount path must be absolute.
ERROR: Encountered errors while bringing up the project.

Everything else builds and runs fine except for phpmyadmin.

@danielsdeboer I will take this.

Hi @danielsdeboer :
1. Open your **laradock/docker-compose.yml** file
2. Find ### phpmyAdminContainer  ####################################
3. Change **volumes: - phpmyadmin** into **- phpmyadmin:/www/config.user.inc.php**

@korneliuskristianr Thanks, that worked great.

repo: laradock/laradock


text:
[10.0] Re-enable proration

Added a prorate() function to Subscription in order to re-enable the proration after it was disabled by calling noProrate().
Fixes #647

Has conflicts.

Closing pending inactivity.

authors: denvers taylorotwell

repo: laravel/cashier


text:
[Proposal] Eloquent\Builder::find() working with other columns

Hi.
My idea is to use Eloquent\Builder::find() method to retrieve the first record from database that matches provided column and its value eg.
$user = User::find('username', $username');
$product = Product::find('serial_number', $serial_number, ['id', 'description']);

I think it might be useful when a table has several unique keys, because you wouldn't have to clutter your Models with methods like
public function scopeFindByUsername($query, $username)
{
    return $query->where('username', $username)->first();
}

Also it improves the beloved Laravel intuitive syntax because what you really want to do is find a record and it doesn't matter if you find it by primary or unique key. Also, you would perform one less function call.
It's kind of tricky in terms of parameter naming but they can be distinguished easily based on the type.
It's the best I could come up with:
public function find($id, $columns = ['*'], $columnsIfKeyNameProvided = ['*'])
{
    if (is_array($id)) {
        return $this->findMany($id, $columns);
    }

    $keyName = $this->model->getQualifiedKeyName();

    $keyValue = $id;

    if(is_array($columns) == false) {
        $keyName = $id;

        $keyValue = $columns;

        $columns = $columnsIfKeyNameProvided;
    }

    $this->query->where($keyName, '=', $keyValue);

    return $this->first($columns);
}

Obviously there's field for improvement and the findOrFail method would have to be changed.as well to match the find method argument list.

-1
Find should only look for the primary key.
Maybe it makes sense to implement "magic methods" so findByUsername works out of the box because username is a legit column name and you don't have to explicitly define it with scopeFindByUsername while overwriting it with a scopeFindByUsername should still be possible.

You have a valid point. I will write this magic method handler and get back to you.

authors: KKSzymanowski riyuk

repo: laravel/framework


text:
$response->assertSee Does not work properly

Laravel Version: 5.5.21
PHP Version: 7.1.11
Database Driver & Version: MySQL 14.14 Distrib 5.7.17

Description:
$response->assertSee('Text') does not work properly if your controller action does not exists and you will get green instead of red because it's not throwing an exception
Steps To Reproduce:

Create a Controller with php artisan make:controller Hello;

Create the route defined in web.php

Route::get('/myaction', 'Hello@hello');

Try to do some assertion to see Hello and you got green even the controller action method hello does not exists yet

public function test_if_controller_action_prints_hello()
    {
        $response = $this->get('/myaction');
        $response->assertSee('Hello');
    }

I'm not sure if there is much the assertion can check for. Also it is recommended to check the status of the response when you do a $this->get() or any other call.

Is this passing because the error has the word "Hello".
i.e. the assertion is correct - because "Hello" is appearing on the page.

authors: Dylan-DPC arzola laurencei


text:
Refreshing doesn't fix The page has expired due to inactivity. Please refresh and try again.

Laravel Version: 5.6.23
PHP Version: 7.2.4
Database Driver & Version: mysql / MariaDB 10.1.33
Windows 7 64-bit / XAMPP v3.2.2
Firefox  60.0.2

Description & Steps To Reproduce::
Refreshing doesn't fix The page has expired due to inactivity. Please refresh and try again.
The page with the form:
    <form method="POST" action="{{ route('admin.users.update', $user) }}">
         @method('PUT')
         @csrf
         . . .

... was opened in Firefox for some time and there was no activity (I was AFK :game_die:).
When I came back and tried to submit it - I got the following message:
The page has expired due to inactivity. Please refresh and try again.

... which was expected. But the problem was that I could not get rid of this message. I would go back one page, press "Ctrl + Shift + R" -  and I would get this message again after submitting the form.
So refreshing didn't fix it.
I also tried to clean browser's cache, Laravel cache (php artisan cache:clear, php artisan config:clear, php artisan clear-compiled, php artisan route:clear, php artisan view:clear) - and it didn't work.
But when I closed and opened the browser - there was no more of that message, everything worked as it should.

Is this a bug? I'm worried about the end users of the website, if that happens to them ... they will be lost :thinking:

config/session.php was not changed after installing Laravel.
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => null,
'table' => 'sessions',
'store' => null,
'lottery' => [2, 100],
'cookie' => env(
    'SESSION_COOKIE',
    str_slug(env('APP_NAME', 'laravel'), '_').'_session'
),
'path' => '/',
'domain' => env('SESSION_DOMAIN', null),
'secure' => env('SESSION_SECURE_COOKIE', false),
'http_only' => true,
'same_site' => null,

... and there's nothing in .env that is used in config/session.php except:
SESSION_DRIVER=file
SESSION_LIFETIME=120

Welcome to Laravel! We are glad to have you as part of the community.
Unfortunately GitHub is not an appropriate platform for general application issues. This is only for issues/bugs with the framework code itself.
Please close your issue, and instead try asking your question on one of the many great community support areas that will likely give you a better answer more quickly:
Laravel Slack (https://larachat.co/)
Laravel.io Forum (https://laravel.io/forum)
Laracasts Forum (https://laracasts.com/discuss)
StackOverflow (http://stackoverflow.com/questions/tagged/laravel)
Thanks!

@browner12 Hi, thanks.  Is it possible that the described issue is exactly related to the framework code itself? There is similar issue reported here, but just for v5.5: https://github.com/laravel/framework/issues/23212

it's possible, but more often than not when we see these issues come in, it is some kind of misconfiguration on the programmer's end.  I would spend some time on the forums first and see if you can resolve it there.  if after a week or 2 you can't get it solved there, come back here, but probably just add your name to the existing open issue.  this way we can help keep the number of issues down.

[...] was opened in Firefox for some time and there was no activity [...]

This is the CSRF middleware blocking the post because it does not contain the correct token. The one the server knows about, in the session, has been regenerated. A refresh will never work. You have to go back, refresh the form to get the new token (a hidden input), and post the form again.

That message definitely doesn't fit the context and has been questioned a few times here, but left unchanged. Personally, I override it with my own solution in every project.

But if you refresh the form page - you should end up with the "new" CSRF token - and thus it should work? What else could the message possibly be otherwise?

Refreshing the form page should work, yes, but it's the error page that indicates that it should be refreshed. And the browser will show a dialog stating something "are you sure you want to submit this form again yada yada", so it's reasonable to expect confusion when the refresh doesn't actually solve the problem.

@sisve

You have to go back, refresh the form to get the new token (a hidden input), and post the form again.

You didn't read what I wrote, and my English is bad. I wrote:

I would go back one page, press "Ctrl + Shift + R" - and I would get this message again after submitting the form.

@laurencei That's why I opened this issue - Refreshing the form page (as I have already described) didn't work, and I'm just wondering why...

OK, now I'm getting it again (The page has expired due to inactivity. Please refresh and try again.) and I can not get rid of it even when I close/re-open the browser.
As for the possible misconfiguration - if there is any, then it's from Laravel's default config because session.php was not changed after installation, and in .env there is only SESSION_DRIVER=file SESSION_LIFETIME=120 (which was already there after installing Laravel).
I'm not sure if this is issue with the framework code itself, but @tillkruss closed it and there is no point to write about it here.

I closed this, because it's not a framework issue.
@devcircus: Do you have a suggestion for a better message? I find it confusing as well.

I have a laravel application with many many users logging in all day long and I have had some users report that they are unable to login because of this exact issue. I don't know what's going on but this is without a doubt a framework bug fix it.

@GlitterCakes - its a problem with your sessions, which then causes a CSRF token mismatch.

(The page has expired due to inactivity. Please refresh and try again.)
Try like this .
Insert the @csrf every form on the page.

@csrf

I HAVE done that I am using the default laravel auth scaffolding it's a problem with Laravel out of the box for some people why should I have to fix it?

I found a simple workaround for handling gracefully with this error.
Use the VerifyCsrfToken::handle() in your application to wrap the parent call to handle in a try-catch block which catches the TokenMismatchException and redirect back with an error message.
Example:
        try {             return parent::handle($request, $next);         }         catch (TokenMismatchException $exception) {             return redirect()->back()->withErrors([                 'message' => 'Your Session have expired. Try again.',             ]);         }
You can see the full example here:
VerifyCsrfToken

@byedusoft  I have the same problem (the page has expired due to inactivity.). can you send me the VerifyCsrfToken.php. Thanks

#issuecomment-450564312

@byedusoft I have the same problem (the page has expired due to inactivity.). can you send me the VerifyCsrfToken.php. Thanks

You can use same example file as #issuecomment-450564312
`<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
use Illuminate\Session\TokenMismatchException;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
];
public function handle($request, Closure $next)
{
    try {
        return parent::handle($request, $next);
    }
    catch (TokenMismatchException $exception) {
        return redirect()->back()->withErrors([
            'message' => 'Your Session have expired. Try again.',
        ]);
    }
}

}`

authors: ChaoWang318915 FilipQL GlitterCakes browner12 byedusoft devcircus idbmannaf laurencei mchekin sisve tillkruss


text:
If a job throws an uncaught exception in laravel 5.2 does the database connection closes?

We have a job running and many processes left over, this happened after some jobs that have been failing by purposely uncaught and thrown exceptions are used.

Heya, unfortunately we don't support this version anymore. Can you please try to upgrade to the latest version and see if your problem persists? If so feel free to reply and we'll try to have a look.

authors: driesvints zardilior


text:
Cannot create a new Laravel application on Linux (Fedora)

Laravel Version: Latest
PHP Version: ~
Docker version: 19.03.13
docker-compose version: 1.27.4

Description:
I want to try Laravel Sail but I can't install a new Laravel application on Fedora 33, using the new approach from the docs
https://laravel.com/docs/8.x#getting-started-on-linux
And here is the output when I'm executing the command curl https://laravel.build/my-new-app | bash
Warning: TTY mode requires /dev/tty to be read/writable.
    Creating a "laravel/laravel" project at "./my-new-app"
    Installing laravel/laravel (v8.5.2)

      [ErrorException]
  mkdir(): Permission denied

    create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]

cd: no such file or directory: my-new-app

Please provide your password so we can make some final adjustments to your application's permissions.

[sudo] password for ysedrani:

Thank you! We hope you build something incredible. Dive in with: cd my-new-app && ./vendor/bin/sail up

After that, the directory named my-new-app was not created, even if the bash script says Dive in with: cd my-new-app && ./vendor/bin/sail up
I've searched a lot, but since this install approach is new, I really can't find anything!
Steps To Reproduce:
Install a new Laravel application following the instructions from the official docs:
https://laravel.com/docs/8.x/installation#getting-started-on-linux

Where are you running the command? Note that the problem is here:
mkdir(): Permission denied

Some directory permission issue on your machine.

Thank you for responding.. I'm running this command within a directory in my home directory! I don't think it's related to some permission issue, but i will recheck that again.
And IMHO the bash script should exit with an error code instead of actual output: Dive in with: cd my-new-app && ./vendor/bin/sail up. whereas nothing was created!

Hi @taylorotwell, I have rechecked the directory permissions and it seems correct:
drwxrwxr-x ysedrani ysedrani    4 KB Mon Nov 16 15:12:58 2020 code

change it to 777 doesn't work too.
And since the command laravel new my-new-app running from the docker container, the thing is SELinux is preventing the container from changing the host, I've tried to disable SELinux setenforce 0 and it works, but disabling SELinux is not a solution, I'll try to generate a policy from the audit.
A note in the official docs will saves time for anyone running Linux with SELinux enabled (Fedora, CentOS, RHEL..)

authors: taylorotwell yaayes


text:
Status of commands in 5.1?

What are the status of command classes in Laravel 5.1? I see the Artisan command to generate a command class still exists ($ php artisan make:command). I’ve just used it to create a command class, but the class stub it creates extends a non-existing abstract Command class.
I see “jobs” have been introduced in 5.1 but they seem self-handling only, i.e. there’s no option to create a corresponding handler class. Are commands deprecated in favour of jobs? In which case the Artisan command to create new command classes should be removed. Or should the abstract command class be re-introduced that existed in Laravel 5.0.x?

Commands are still exactly the same. They are just called jobs by default now, and are self handling by default. You don't have to make them self handling...

@GrahamCampbell Still doesn’t really answer the question. If commands are jobs now, should the make:command Artisan command be removed? Because if not, there’s a bug in that the command class stub it creates extends a non-existent abstract class.

You can still have commands in the same place. I do. I don't call them jos.

@GrahamCampbell Well as I say, there’s a bug: the abstract command class doesn’t exist, but the command stub tries extends it.

It does exist for some people.

@GrahamCampbell There’s no file at app/Commands/Command.php in the Laravel repo: https://github.com/laravel/laravel/tree/master/app

Yes, but it DOES exist for laravel 5.0 users that upgraded.

That command is for them.

@GrahamCampbell I think some warning should be in place in that case then. As otherwise, people creating a fresh 5.1 application are going to have this command that creates classes extending non-existing classes.

@martinbean do you perhaps need artisan make:console to create a console command, as opposed to a command bus command?

@trashofmasters No. I knew the difference between a console command, and a command bus command.

Just came across this too. If I understand this correctly, the make:command artisan command does the same in 5.1 as it did in 5.0, but is actually invalid in a fresh install of 5.1 - the command it produces is suitable only for 5.0 without some additional work to bring in some 5.0 legacy stuff.
Instead, for a fresh install of 5.1 we should be using make:job instead.
Is this the right conclusion?

@judgej Indeed. This is a bug if creating a brand new 5.1 Laravel application and then trying to run php artisan make:command.

On top of that, the switching to 5.1 in the docs after finding the command pipeline takes you to a 404. A redirect to the "jobs" page as the new way of doing things would be handy. I was totally in the dark about the change until I hit this problem and found this closed issue.

This needs to be re-opened. It is a bug in a fresh install of 5.1 currently. The php artisan make:command class will stub out a new command which will make use of App\Commands\Command which does not exist by default. Either that class needs to exist or the stub needs to change.

@JesseObrien Totally agree. It’s the reason I created this issue and disappointing it was flippantly closed when this is a bug for new users of 5.1.

@martinbean  Yes, i just experienced this problem. it should be removed, or addressed when trying to add via artisan. - notify me, well now i know.

Could we not just have a simple check to determine if the Command abstract (App\Commands\Command) exists and throw an exception if it is unavailable.
Ran into this issue this morning and upon researching one of the first things I've ended up at is this issue, not a major one by any means, but we can't be the only ones.

authors: AdenFraser GrahamCampbell JesseObrien coldfuzion judgej martinbean trashofmasters


text:
Re-added parameter binder in constructor

Fix for #10998
Registering controllers in the router was added back in commit f622f516740371b6217d36448f04d407a7594c3f however this parameter binder was not.
This does affect 5.0. 4.2 works as expected but I see that PR's are not being accepted for 5.0 correct?

This does affect 5.0. 4.2 works as expected but I see that PR's are not being accepted for 5.0 correct?

Only security fixes will be accepted to anything older than 5.1, that's correct.

authors: GrahamCampbell arjasco


text:
[5.7] Add toArray() to Paginator contract

Laravel Version: 5.7.13
PHP Version: 7.2

Description:
It's possible to paginate eloquent results and use them in a JSON response:
Route::get('users', function () {
    return App\User::paginate();
});

I wanted to send some additional data with the response. I Paginator converted it toArray() and then added my data:
Route::get('users', function () {
    $result = App\User::paginate()->toArray();
    $result['additional_data'] = // ...
    return $result;
});

As ::paginate() returns a Paginator-contract/-interface, I wondered whether toArray() could be added to it? That would ease code-completion and analysis.

if you put the paginate results into a json response it displays as json and it does return as a object in php
$result = App\User::paginate();
$result->additional_data;

That might work for passing around data in the app, however when it's transformed into a request, the toJson() -> jsonSerialize() -> toArray() methods are called... discarding any props on the Paginator object.

not really when done like this.
$db = DB::table('sometable')->paginate(25); return response()->json($db, 200) ->header('Content-Type', 'application/json') ->header('charset', 'utf-8');

Are you sure? A simple test in Tinker didn't show so.
Op wo 19 dec. 2018 om 20:56 schreef Ven the Meerkat <
notifications@github.com>:

not really when done like this.
$db = DB::table('sometable')->paginate(25); return response()->json($db,
200) ->header('Content-Type', 'application/json') ->header('charset',
'utf-8');
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/laravel/framework/pull/26912#issuecomment-448723833,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AApOaGfrKsahrCe5WdlkKzKVphlRc5EMks5u6pnjgaJpZM4Zat6f
.

ya i know so cuz i do it to all my http requests that doesn't require a html reply. makes things easier for me to parse in the linden scripting language.

yup ok it does work
$db = DB::table('sims')->select('name')->orderBy('name')->simplePaginate(1); 				return response()->json($db, 200) ->header('Content-Type', 'application/json') ->header('charset', 'utf-8');
which returns
{"current_page":1,"data":[{"name":"Achemon"}],"first_page_url":"https:\/\/rtcsl.info\/admin\/jtest?page=1","from":1,"next_page_url":"https:\/\/rtcsl.info\/admin\/jtest?page=2","path":"https:\/\/rtcsl.info\/admin\/jtest","per_page":1,"prev_page_url":null,"to":1}

Adding a method to an interface is a breaking change and as such this PR should target the master branch (Laravel 5.8).
And instead of manually adding the toArray method to the interface why didn't you make the Paginator extend the Arrayable interface?

Adding a method to an interface is a breaking change and as such this PR should target the master branch (Laravel 5.8).
And instead of manually adding the toArray method to the interface why didn't you make the Paginator extend the Arrayable interface?

Paginator does not look like an 'extended Arrayable' to me and single inheritance then limits future additions to the interface imho.

The concrete Paginator implementation has that method exactly because it implements Arrayable. So I don't see any reason why the Paginator interface couldn't extend the Arrayable interface.

The concrete Paginator implementation has that method exactly because it implements Arrayable. So I don't see any reason why the Paginator interface couldn't extend the Arrayable interface.

That's an interesting observation ;). Seems right. Will update.

Now you can also remove "implements Arrayable" from the concrete Paginator implementation since that is covered now already by the Paginator contract :)

I see... however I've reverted back to adding the 'toArray' because it's arbitrary which Illuminate/Contracts/Support/ extends as it implements both Jsonable and Arrayable.

I don't understand what you are saying as only the Arrayable interface has the toArray method :)

Yes, and Jsonable has the toJson()  method. So why would we extend the Paginator-interface from Arrayable and not from Jsonable? It seems a bit arbitrary to me.

And let's not forget that \Illuminate\Pagination\Paginator already implements Arrayable,…,Jsonable.
When looking at all the related classes in the namespace Illuminate\Pagination I get the impression that the interface \Illuminate\Contracts\Pagination\Paginator is not meant to decide about the representation of the paginator. I think that's why it has to no toArray, toJson, jsonSerializeable.
Only the specific Paginators (not even the AbstractPaginator) implement this.
IMHO this is a deliberate design decision and to me makes sense.
How you represent the paginator is specific to a paginator but not the interface. The interface is concerned about the paginators intrinsics, not how it talks to arbitrary transformation boundaries.
TL;DR: I'm 👎 for this PR.

Like other people have said the Paginator instances already have Arrayable implemented. You're here adding methods on a contract which have nothing to do with the contract itself. Contracts should be single purpose which allow you to make sure that concretes implement certain functionality. I fail to see what a Paginator has to do with converting data to an array.

Sorry but we're going to close this one. Thanks for contributing but this one won't happen I'm afraid.

@driesvints EloquentModel::paginate(..) returns a Paginator-interface that can be used as a request and therefore should be Jsonable/Arrayable. Maybe change the PhpDoc?
--- src/Illuminate/Database/Eloquent/Builder.php	(date 1545314501000)
+++ src/Illuminate/Database/Eloquent/Builder.php	(date 1545314501000)
@@ -7,6 +7,7 @@
 use Illuminate\Support\Arr;
 use Illuminate\Support\Str;
 use Illuminate\Pagination\Paginator;
+use Illuminate\Contracts\Support\Jsonable;
 use Illuminate\Contracts\Support\Arrayable;
 use Illuminate\Support\Traits\ForwardsCalls;
 use Illuminate\Database\Concerns\BuildsQueries;
@@ -732,7 +733,7 @@
      * @param  array  $columns
      * @param  string  $pageName
      * @param  int|null  $page
-     * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
+     * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|Jsonable|Arrayable
      *
      * @throws \InvalidArgumentException
      */

@tomlankhorst actually, I see that the inner paginator method returns a LengthAwarePaginator concrete so it might be best to change the return type to the concrete class. Same for the simplePaginate method.


text:
[8.x] Resolve component class with $attributes property

This small change allows one to type hint the $attributes parameter in the class constructor. This parameter contains an array of all attributes that were passed to this component.
<x-test-subject :foo="'bar'" baz="cookies" />

<?php

namespace App\View\Components;

class TestSubject extends Base
{
    public function __construct($attributes)
    {
        dump($attributes); // contains ['foo' => 'bar', 'baz' => 'cookies']
    }
}

As this change reserves the $attribute parameter name it's technically breaking, although it's pretty small, so not sure whether this is major or minor feature.
I will adjust the tests if this PR gets a green light.

Thanks for the PR, however the tests are failing.

@GrahamCampbell I've fixed the tests.
Also wanted to ask if this is something that can be merged in 7.x instead?

@panda-madness please revert all the unnecessary indentations.

You can access $this->attributes from within the render method.

@taylorotwell here is a reproducible demo showing that that is not the case, $this->attributes is still null even in render. Note the TestSubject component.

@panda-madness you commited your custom changes together with the framework skeleton which makes it super hard to find out what's wrong.

@driesvints Sorry about that. I've added some changes in a single commit to mark every file I modified, I'll know to separate my changes in the future.

Bump in the night, @taylorotwell

@panda-madness I've actually stumbled onto this myself in the meantime. I'll have a look at this today.

@driesvints something related to blade svg I guess? :)

@panda-madness heh yeah.
I discovered that you can still use attributes in your render method like this actually:
    public function render()
    {
        return <<<'blade'
        <div class="

            Foo

blade;
    }

Is there a special reason why you need to access the attributes? It's best that you provide a real-life use case. I'm having a look tomorrow again so let me know.

@driesvints I was trying to make a sort of dynamic component that would render other components and pass along the attributes that it receives, sort of like in Vue. For that I needed to extract 1 defined attribute (the component name), and pass everything else in the template.

@panda-madness I'm looking into doing that exact thing but you have to be aware that $data != $attributes. Data is all the data from the view piped through to components and attributes are the attributes defined in the html tag of the component.
What I would do in your case is dynamically render different views which have these components defined. Then you don't need to define them in your render method.

@panda-madness I've looked further into this but was unable to find a clean solution. I think it's a no-go on attributes being available in the render method for now.

@driesvints would you consider petitioning Taylor to re-open this PR then? I suspect he might have unsubscribed from the discussion here.

No, because I don't think this is the right solution either to mix data with attributes.

@driesvints I might be greatly misunderstanding how component tag compilation works, so please correct me if I'm wrong.
From what I'm seeing, $data initially contains all of the passed HTML attributes, and nothing else. You can see here and here where the attributes are Regex extracted and passed to $this->componentString(). The partitioning afterwards is, I assume, made to specifically enable constructor dependency injection via the service container, since the container needs named arguments for that.
I don't really see where we're mixing anything that's not supposed to be mixed, as far as I can see we are only operating on the attributes that are passed to the component tag.
Again, if I'm mistaken I'm sorry to have taken so much of your time on this.

Technically your change will work momentarily I believe but I think it'll collide with changes made in https://github.com/laravel/framework/pull/32576 for the next major release.

Is there a way to trigger the test suite against the new master branch?

Yeah, run them locally.

This should have been merged.
Attributes and slots should be accessible through the class constructor.
Here is a use case example for a component using Livewire:
class Input extends Component
{
    public $model;

    public function __construct()
    {
        $this->model = $this->attributes->whereStartsWith('wire:model')->first();
    }

    public function render()
    {
        return <<<'HTML'

                <input {{
                    $attributes->class([
                        'w-full placeholder-gray-400 rounded-lg',
                        'border-gray-400' => !$errors->has($model),
                        'border-red-600' => $errors->has($model),
                    ])->merge([
                        'type' => 'text',
                    ])
                }}>

                @error($model)

{{ $message }}

                @enderror

        HTML;
    }
}

authors: GrahamCampbell bastinald driesvints panda-madness taylorotwell


text:
[8.x] Fix edge case causing a BadMethodCallExceptions to be thrown when using loadMissing()

Sometimes when relations are loaded, a collection of null and BaseCollections is returned. When this happens, the ->first() instanceof BaseCollection check can be false, as the first value can be null, in which case ->collapse() is incorrectly skipped.
There have been a few PRs more properly describing this issue, but these have been closed rather than merged:
#32043
#32053 (Comment by nal-chris on 18 Mar describes it pretty well)
I've chosen non-descriptive names for a few relations, feel free to suggest something more concrete (though these serve their purpose).
I've removed an ! is_null() check and added an additional ->whereNotNull() on the initial call to prevent redundant null checks for every recursively executed loadMissingRelation().
(PS. This is my first ever PR to Laravel, so assume I am an idiot don't really know a lot about contributing to Laravel)

Hmm, I just realized that the method is protected and the removed is_null check might cause issues for subclasses that are reliant on it. Will change in a sec.

This should probably target 6.x, not 8.x. :)

I've created a new PR targeting 6.x (#37871)

authors: GrahamCampbell MeesterDev


text:
[9.x] Add test for CacheManager

It adds tests to cover "unknown driver" and  "unknown store" behaviors.
Why Docblock is modified?
Since the config implements the ArrayAccess and may return null in case of a missing key, this method can also return null alongside arrays.

tests are failing for random reasons.

Hi, I've fixed the tests on 9.x so please rebase your PR and mark your PR as ready when tests pass. Thanks


text:
[11.x] Fix explicit route binding for broadcast routes

Fixing explicit route binding problems in broadcasting routes as explained in https://github.com/laravel/framework/issues/51726#issuecomment-2248585033
This problems started to appear because of https://github.com/laravel/framework/pull/51651 which added the new route parameter to the forModel callback, which is not passed from broadcast routes.
With this pull request the route parameter is made optional.

Thanks!

As the author of the offending change - sorry! I almost never use broadcasting so was completely unaware that broadcast routes were even a thing.

authors: ccharz gbradley taylorotwell


text:
Add custom css style

I was trying to add custom class in custom card, but not able to implement.
Because style stack was missing 😟

@vc-urvin Make you have installed the latest beta.
To add CSS to your card, you want to implement the CSS method on your Livewire class. See the docs for more info: https://laravel.com/docs/10.x/pulse#custom-card-styling-css

authors: timacdonald vc-urvin

repo: laravel/pulse


text:
In listener broadcast back job hanging on CURL Error

Reverb Version
1.0.0 beta-10
Laravel Version
11.0
PHP Version
8.2.7
Description
I've implemented the listener and that works great but now I'm trying to broadcast back again but the job is hanging on an curl request for which I have no clue where or why it is making a curl request. When I broadcast the same event in a command it works fine. Does anyone have a idea?
Pusher error: cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:8082/apps/899713/events?auth_key=n9djupsbzokvzk9et2zs&auth_timestamp=1716000501&auth_version=1.0&body_md5=df83fae487fd3b9a6267a60d18b3302f&auth_signature=c04c6559809aabf44c7c260df43e9e81862da2f213d30de063295c1669ef6000

Received message from client

but it taking 30 seconds to broadcast , if i trigger broadcast event by command or by http request then it immedietly reflect in client
Steps To Reproduce
Create message listener using (MessageReceived $event)
trigger  broadcast event in same listener handle method code
It takes 30 second to receive the broadcasted message in client
Also when i trigger the broadcast using command with the same AlertTrigger event it immediatly reflect in client, But all broadcasting events hang on till this above curl error message displayed in reverb debugger

When i received message in client after 30 second , first it shows 4200 message format errro & then message is being received

Reverb Version
@beta
Laravel Version
11.0
PHP Version
8.2.7
Description
I've implemented the listener and that's working great but now I'm trying to broadcast back again but there is slight 20 to 30 seconds delay to broadcast and listen to frontend. Does anyone have a idea?

Your QUEUE_CONNECTION should not be sync and your broadcasting should implement ShouldQueue interface.

Your QUEUE_CONNECTION should not be sync and your broadcasting should implement ShouldQueue interface.

Yes
Queue connection is database
And i have tried should queue interface as well still getting same issue
During message receive broadcasting

Hi all!
I have the same problem!
I can't immediately send an event to another channel.
I want to receive an event from the client to trigger another event that will send a message to another channel. If I do this through a queue, everything works. If I try to send it immediately (implements ShouldBroadcastNow), I get a curl timeout error.

@Atmden  Reverb uses ReactPHP. It shouldn't be blocked by any resource based transaction which is why you should use ShouldBroadcast instead of ShouldBroadcastNow and run the artisan command queue:work

@Atmden Reverb uses ReactPHP. It shouldn't be blocked by any resource based transaction which is why you should use ShouldBroadcast instead of ShouldBroadcastNow and run the artisan command queue:work

Yes it’s working using queue:work
But how can we manage it using direct should broadcast
As of now delivering reply message took delay. Is there any other way to broadcast it immediately
?

@prdip queue:work has parameter sleep --sleep. Its default is 3 seconds and you can change it to 0. I don't advise changing it to 0 since it triggers the queue always so it might be high on resource usage

I solved my problem. I hope it helps others too. In the service where I process the event, I used ChannelManager.
Here is a small part of the code
    use Laravel\Reverb\Protocols\Pusher\Contracts\ChannelManager;

    public function __construct(ChannelManager $channelManager)
    {
        $this->channelManager = $channelManager;
    }

    public function eventHandle()
    {
        // .... different code

        $response = [
            "event" => "my-event",
            "channel" => "my-channel",
            "data" => [ // My data
                "success" => true,
                "message" => "......",
            ]
        ];
        $orderChannel = $this->channelManager->find('<channel name>');
        if (!empty($orderChannel)) {
            $orderChannel->broadcast($response);
        }
    }

I solved my problem. I hope it helps others too. In the service where I process the event, I used ChannelManager. Here is a small part of the code
    use Laravel\Reverb\Protocols\Pusher\Contracts\ChannelManager;

    public function __construct(ChannelManager $channelManager)
    {
        $this->channelManager = $channelManager;
    }

    public function eventHandle()
    {
        // .... different code

        $response = [
            "event" => "my-event",
            "channel" => "my-channel",
            "data" => [ // My data
                "success" => true,
                "message" => "......",
            ]
        ];
        $orderChannel = $this->channelManager->find('<channel name>');
        if (!empty($orderChannel)) {
            $orderChannel->broadcast($response);
        }
    }

Will this work without QUEUE ? Immediate broadcast

@prdip queue:work has parameter sleep --sleep. Its default is 3 seconds and you can change it to 0. I don't advise changing it to 0 since it triggers the queue always so it might be high on resource usage

Thanks @njzabala
Queue already consume lots of cpu usage & reverb also high cpu dependent.
How can we achieve superfast broadcast delivery without queue , if not then what should we keep in mind while building real time bidirectional app using reverb !

Will this work without QUEUE ? Immediate broadcast
@prdip
Yes! Try it
It's the same if I did
...connection->send(json_encode($response));

eventHandle

Where did you manage this
in event listener or direct event ?

eventHandle

Where did you manage this
in event listener or direct event ?

I'm using a listener. Which listens to MessageReceived.
My listener receives a message from the client application. I determine the ownership of this message and call the method in my service. And in the service I do an immediate sending of another message to another channel. I have a lot of different incoming messages and therefore I moved their processing into a separate service; you can use immediate sending directly in the listener

If the issue is solved, I suggest closing the issue.

@njzabala
If there is such a possibility, you need to add a plan for implementing this functionality to the package so as not to make crutches

@Atmden Sorry. I'm not a maintainer of reverb. I just helped with what I currently know.

You will need to queue the listener or broadcast directly or broadcast to the channel directly otherwise you will block the event loop.
If you don't do that, when you catch the event, any work you do blocks the loop from processing more connections or messages. As such, if you try to broadcast a mesage syncronously, the loop cannot process it so you end up in a deadlock.

@joedixon
Is @Atmden's Channel Manager the most effective way to broadcast instantly without a queue, then?

@joedixon
I didn't clearly understand your answer.
At the moment the application is just being written and there is no real load. If you check on test accounts, everything works as it should.
But did I understand your answer correctly that if I use the ChannelManager in production to immediately send messages to a channel, I will encounter a waiting problem, new incoming messages will not be processed until the outgoing one is sent?

Using the ChannelManager should be fine as you are already in the context of the event loop. The issue with broadcasting (without queuing) is because you are making an HTTP request to the WebSocket server, which can't accept the request until the current process is complete. Of course, the current process cannot complete as it's waiting on the HTTP request so you end up in deadlock.

@Atmden How were you able to find the channel by name when that information did not exist at the time? Could I see more of the code to understand how this is being done?

authors: Atmden joedixon mauricecalhoun njzabala prdip swapnil15021997

repo: laravel/reverb


text:
Fix issue #461 / remove docker image form laravel service in docker-c…

Fix issue #461

Seems to work fine for everyone else.

Hi @taylorotwell,
I've the same issue on docker on CentOS (different machine from initial test):
./vendor/bin/sail pull
Pulling mysql        ... done
Pulling redis        ... done
Pulling laravel.test ... error

ERROR: for laravel.test  Get "https://sail-8.1/v2/": dial tcp: lookup sail-8.1 on 8.8.8.8:53: no such host
ERROR: Get "https://sail-8.1/v2/": dial tcp: lookup sail-8.1 on 8.8.8.8:53: no such host

Can you also confim that your docker-compose.yml file have image: attribue on laravel.test service like this https://github.com/laravel/sail/issues/461#issuecomment-1209606315?
Have you tried with these steps?
curl -s "https://laravel.build/test-docker-pull?with=mysql,redis" | bash
cd test-docker-pull  && sail up -d
sail pull

(PS: Image attribute seems to have an invalid format https://docs.docker.com/compose/compose-file/compose-file-v3/#image)
Thanks.

@pavons Hey, would you please post your issue in Laravel's Discord server instead. Thanks.

authors: GoodM4ven pavons taylorotwell

repo: laravel/sail


text:
Laravel vite only show EOF

Laravel Vite Plugin Version: ^0.2.4
Laravel Version: ^9.2
Node Version: v14.17.0
NPM Version: 8.13.2

Description:
Just a couple hours ago Everything goes ok. but after I restarted my laptop and start the project again and it show this.

if i open slotin.test:8000 on Incognito mode in chrome, it shows me this

Steps To Reproduce:

vite.config.js
import laravel from 'laravel-vite-plugin';
import eslintPlugin from 'vite-plugin-eslint';
import { defineConfig } from 'vite';
import { createVuePlugin } from 'vite-plugin-vue2';

export default defineConfig({
  server: {
    host: 'slotin.test'
  },

  plugins: [
    laravel(['resources/css/app.css', 'resources/js/app.js']),
    createVuePlugin(),
    eslintPlugin(),
    {
      name: 'blade',
      handleHotUpdate({ file, server }) {
        if (file.endsWith('.blade.php')) {
          server.ws.send({
            type: 'full-reload',
            path: '*'
          });
        }
      }
    }
  ],

  resolve: {
    alias: {
      vue: 'vue/dist/vue.esm.js',
      '~': '/resources/js',
      '@assets': '/resources/assets',
      '@components': '/resources/js/components',
      '@plugins': '/resources/js/plugins',
      '@store': '/resources/js/store'
    }
  },

  build: {
    rollupOptions: {
      output: {
        manualChunks(id) {
          if (id.includes('node_modules')) {
            return 'vendor';
          }
        }
      }
    }
  }
});

Hi @Aslam97, does the same issue happen if you remove the slotin.test host from your vite.config.js file and from the php artisan serve command and then access your site from http://localhost:8000?

@jessarcher removing slotin.test from vite.config.js and run php artisan serve without the --host=slotin.test flag as you suggested. Now my project can run normally. the reason i use custom domain on my local is because of laravel subdomain routing {subdomain}.example.com. however I tried using localhost {subdomain}.localhost and it worked. i guess i just use localhost then.

Iam adding
127.0.0.1 localhost
127.0.1.1 slotin.test
127.0.1.1 example.slotin.test

to /etc/hosts. I suspect slotin.test and php artisan serve --host=slotin.test are not sync. because if I don't run php artisan serve --host=slotin.test and go to slotin.test it still returns "EOF"

127.0.0.1 localhost
127.0.1.1 slotin.test
127.0.1.1 example.slotin.test

Is there a reason that the last two examples use 127.0.1.1 instead of 127.0.0.1?

There is no reason. as long as localhost and vite dev server are pointing with the same ip.

php artisan serve --host=slotin.test is pointing to 127.0.1.1
vite dev server with config server: { host: 'slotin.test' } is also point to 127.0.1.1 which is right.
now i know why iam getting "EOF" is because vpn on chrome is active. so the alias on 127.0.1.1 (slotin.test) does not resolve. but if i open the address 127.0.1.1:8000 (with active vpn) and change vite.config.js to server: { host: 127.0.1.1 } everything back to work.

Glad you got it working 👍

repo: laravel/vite-plugin


text:
grammar reference appears to be incomplete and other doc comments

Describe the bug
This is strictly a documentation issue.

I didn't see any information in the grammar documentation about rule name prefixes such as "?" and "!".
The rule ?value: dict is used in the JSON example and I had to search all the documentation to see why the "?" was there.

While I am at it

Grammars in Lark are based on [EBNF](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax, with several enhancements.

should either link to the list of enhancements to EBNF or list them right there. I read that sentence and immediately wondered what they are. I looked at the table of contents for the grammar reference and they didn't show up there either.
Also, (the same issue) the Features page has
EBNF-inspired grammar, with extra features (See: [Grammar Reference](https://lark-parser.readthedocs.io/en/latest/grammar.html))

which implies that the extra features can be found in the grammar reference, but in fact they are at the bottom of the Features page.

Given that many or most Lark users will already understand grammars in general, maybe put the definitions at the end of the grammar reference in a section listed in the TOC. Definitions could also be linked to in the earlier parts of the reference.

To Reproduce
N/A

A lot of this is covered in Shaping the Tree. You just want a few more links to that page?

Closed due to lack of participation.

authors: MegaIng erezsh julie777

repo: lark-parser/lark


text:
CPython 3.11.7 breaks regex module compatible pattern width calculations

Describe the bug
This CPython change recently got released in CPython 3.11.7: https://github.com/python/cpython/pull/109859. You'll see in Lib/re/_parser.py that MAXWIDTH (1 << 64) is now the maximum width of a regex pattern, not MAXREPEAT (2**32 - 1). Lark uses MAXREPEAT (utils.py#L154) to assume the maximum width when it can't use the re module to calculate the width. This was all fine until CPython 3.11.7 was released earlier today and it started breaking our custom grammar.
Our specific issue is that terminal ordering changed because the lengths of the regex patterns are used to determine priority. Since 3.11.7, regex patterns that are only compatible with the regex module have a much shorter length than re module compatible patterns.
This issue (or very similar to it) was discussed just a few weeks ago on github: https://github.com/mrabarnett/mrab-regex/issues/513.
To Reproduce
Here's a minimized test. In this example, NUM uses a named capture group without the "P" ((?P<NUMVAL>\d)) which is supported by the regex module only. Because it's not supported by the builtin re module, it's length is assumed to be (min, max) of (1, MAXREPEAT) where MAXREPEAT = 2^^32 -1. For STR, it is re module compatible so the get_width() call succeeds and its length is calculated as (1, MAXWIDTH) where MAXWIDTH = 1 << 64.
    def test_terminal_widths(self):
        g = r"""
        start: expr
        expr: NUM | STR
        NUM: /(?<NUMVAL>\d)+/
        STR: /\w+/
        """
        p = Lark(g, regex=True, parser='lalr')
        term0 = p.terminals[0]
        term1 = p.terminals[1]
        self.assertEqual(term0.priority, term1.priority)
        self.assertEqual(term0.pattern.min_width, term1.pattern.min_width)
        self.assertEqual(term0.pattern.max_width, term1.pattern.max_width)

Please let me know if you have any questions about this.
Thanks!

I made a PR with a fix, although I would suggest not relying on automatically generated priories. Just adding an explicit priority would also fix this for your grammar.

@MichaelSquires I'm currently on vacation, so no promises, but I'll try to do it next week.

@MichaelSquires I'm currently on vacation, so no promises, but I'll try to do it next week.

Thanks for letting me know. Enjoy your vacation!

Hi @erezsh, I hope you enjoyed the holidays! Wondering if you think we'll see a new release with this bugfix soon?

@MichaelSquires Thanks for the reminder. I'll try to do it this Monday.

Released version 1.1.9
Sorry for the delay!

Excellent news! Thank you for your support!

authors: MegaIng MichaelSquires erezsh


text:
请问UserAccessToken 时候，请求用户身份验证是如何发起的，如何弹起授权页面

[1] Response {
[1]   context: Context {
[1]     m: Map(4) {
[1]       'ctxKeyConfig' => [Config],
[1]       'x-request-info' => [Request],
[1]       'X-Request-Id' => '202104061423550102121810241A04B055',
[1]       'http_status_code' => 400
[1]     }
[1]   },
[1]   code: 99991668,
[1]   msg: 'token invalid, err:fail to validate OAuth access token from passport, authToken is nil',
[1]   error: undefined,
[1]   data: undefined
[1] }

请看飞书开放平台文档：https://open.feishu.cn/document/ukTMukTMukTM/uETOwYjLxkDM24SM5AjN

这个我知道，我的意思是不能再封装一下吗

@baiheinet oauth2.0协议（登陆+授权），需要页面交互。

repo: larksuite/oapi-sdk-nodejs


text:
Update scodec-stream to 3.0.1

Updates org.scodec:scodec-stream from 3.0.0 to 3.0.1.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scodec", artifactId = "scodec-stream" } ]

labels: library-update, semver-patch

Codecov Report

Merging #517 (156b5f1) into master (4d7958d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #517   +/-   ##
=======================================
  Coverage   62.43%   62.43%
=======================================
  Files          38       38
  Lines        1299     1299
  Branches        7        7
=======================================
  Hits          811      811
  Misses        488      488

Continue to review full report at Codecov.

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

authors: codecov-commenter scala-steward

repo: laserdisc-io/laserdisc


text:
Update sbt to 1.9.7

About this PR
📦 Updates org.scala-sbt:sbt from 1.9.3 to 1.9.7
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-sbt", artifactId = "sbt" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scala-sbt", artifactId = "sbt" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, version-scheme:early-semver, commit-count:1

Superseded by #146.


text:
Build an Integration Platform/Engine

Consider it as a suggestion or a request to come up with a ton of integrations or engines. I am mentioning this based on my experience in interacting with the LLM and integrating with various 3rd parties for accomplishing the day-to-day needs. Imagine you are building the next big integration engine which potentially connect or integrate with any 3rd parties like what the Zapier has done, that would be truly amazing.
I am envisioning an integration hub to be part of the lastmileai.dev platform and the aiconfig which can do the 3rd party integrations with ease.

Thanks @ranjancse26. Can you clarify what specifically this would entail? Just to make sure I fully understand the request. Is this more about easily sharing aiconfigs that can be integrated/deployed quickly?

repo: lastmile-ai/aiconfig


text:
请问一下，怎么取消数据库2h重置一次？

请问一下，怎么取消数据库2h重置一次？

cn.lastwhisper.core.task.GoBackTask别把这个类注入到IOC容器即可

好的，谢谢大佬，正在拜读！！
------------------ 原始邮件 ------------------
发件人: "LastWhispers"<notifications@github.com>;
发送时间: 2020年4月24日(星期五) 下午4:04
收件人: "lastwhispers/permission"<permission@noreply.github.com>;
抄送: "co ."<1730717923@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [lastwhispers/permission] 请问一下，怎么取消数据库2h重置一次？ (#12)
cn.lastwhisper.core.task.GoBackTask别把这个类注入到IOC容器即可
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

authors: Mcoon lastwhispers

repo: lastwhispers/permission


text:
ツールの終了方法をコンソールを閉じるのではなく、ブラウザ上から実行できるようにしてほしい。

Is your feature request related to a problem? Please describe.
ツール終了方法について、コンソールを閉じるのではなく、ブラウザ上から実行できたほうが操作しやすい。
Additional context

ブラウザを閉じると自動でコンソールも閉じられるような仕様が望ましい．

authors: masaki-tajima mineo-aya

repo: latteart-org/latteart


text:
Add new Store events to client and indexer networking code

Blocked on #1121

done in #1354

authors: alvrs holic

repo: latticexyz/mud


text:
[WIP] Introduce  evaluation mode for subsetting

still checking the code structure and how to add new options to record session command.

this is a reference implementation during the design phases and will handle with https://github.com/launchableinc/cli/pull/430

repo: launchableinc/cli


text:
PgListener holds open connection so PgPool::close never finishes

I'm trying to implement graceful shutdown in my application. I have a task that waits for a quit notification, then calls PgPool::close to close the connection pool. I have another task which is calling PgListener::try_recv in a loop and exits the loop if it gets an error or None. However, the close call never returns because the connection is being held open by the PgListener. From the docs it seems like try_recv would return an error or None when the pool is closed, but that doesn't seem to be happening.
I'm using sqlx 0.5.10 with Postgres and tokio on Rust 1.57.0.

To be fair, there's nothing in the documentation that suggests that this is how it'll work. If there's an error on the connection, try_recv() will try to acquire another from the pool at which point it would return PoolClosed, but not before.
From the pool's perspective, PgListener isn't anything special. The task using it is just like any other that's sitting on an acquired connection or waiting on an in-flight query. Calling close() doesn't cancel in-flight queries (which requires a separate connection with superuser privileges to do so in Postgres anyway), nor does it have any way in general to notify tasks that are currently holding a connection that the pool is closed.
Similarly, if you .leak() a PoolConnection it'll simply prevent the pool from ever closing, which I honestly didn't realize until just now makes that method particularly hazardous. Pool should probably maintain an internal count of leaked connections so it doesn't wait forever for them to never be returned, but that's an orthogonal issue.
That kind of stuff is too tied into application-level semantics to be handled automatically, although I appreciate that it would be annoying to retrofit your own "application is shutting down, please stop listening" notification.
Given that try_recv() would eventually return PoolClosed anyway, I don't see a huge issue with changing it to be returned eagerly when the pool is closed.
However, I think it could be really useful to make it possible to listen for the closed notification on Pool directly so other application code that acquires and holds a connection for long durations can implement the same behavior. It could be something as simple as:
impl<T> Pool<T> {
    /// Resolves when `.close()` is called.

    /// Can be used with something like `select!()` to cancel tasks that acquire and hold onto connections for a long time,
    /// which would otherwise prevent the pool from closing.
    pub async fn closed(&self) {

    }
}

To be fair, there's nothing in the documentation that suggests that this is how it'll work. If there's an error on the connection, try_recv() will try to acquire another from the pool at which point it would return PoolClosed, but not before.

So just to make sure I understand, you're saying that in my situation, I would eventually get a PoolClosed from try_recv(), but only after something else causes an error? I think it would be much more useful if that happened immediately.
I suppose I could always try to interrupt the try_recv() if my own quit signal gets notified, but according to this comment I think that might run into other issues? If not, your Pool::closed suggestion sounds great.

I suppose I could always try to interrupt the try_recv() if my own quit signal gets notified, but according to https://github.com/launchbadge/sqlx/issues/643#issuecomment-675728317 I think that might run into other issues?

Theoretically yeah, but if your application is immediately quitting anyway, it doesn't really matter.

Well that's the thing, I'm trying not to immediately quit, I wanted the shutdown to be as "nice" as possible and let everything close that needs to. I'll try cancelling try_recv() and see if that works.

I mean if you're not going to use the connection again, which you won't be as the connection will be closed as soon as you return it to the pool.

Ah okay I see what you mean, that makes sense.
I was able to get a working solution by using select on the try_recv() call to interrupt it when my application is exiting. This works fine for me, but I can definitely see the general use in the Pool::closed future you suggested so you don't need to use an external quit notification and can just tell if you're exiting from the pool itself.

Leaving this open as a note to implement that close notification and integrate it into PgListener.

authors: abonander dbeckwith

repo: launchbadge/sqlx


text:
New Getting Started Page and Navbar

Added a new getting started page and nabber. The getting started page displays a video walkthrough of how to download and run the app and the step by step guide will compliment that. Added a new navber to move around easier and a download link to the GitHub.

Uac

repo: laurencebrwn/mice-exploration-tool


text:
CNS-648: delegators aggregate rewards after a month

In this PR I've implemented a feature that lets delegators aggregate rewards only after a month from their original delegation. Also, when the delegator redelegates, it's treated as a new delegation (meaning he'll have to wait a month again).
Note that the delegation starts effecting the pairing process (increasing the provider's effective stake) immediately, and not after a month.

Closing this to avoid difficult merge with main. See updated version (same functionality) here: https://github.com/lavanet/lava/pull/972

repo: lavanet/lava


text:
[Lifecycle] Install fails if "linkerd" namespace already exists

Description
In an environment with "linkerd" namespace already present, deployment of Linkerd fails.
Expected Behavior
Linkerd should be installed to the existing namespace.
Logs
Error with linkerd operation: Error fetching mesh manifest: Can't install the Linkerd control plane in the 'linkerd' namespace. Reason: ConfigMap/linkerd-config already exists. If this is expected, use the --ignore-cluster flag to continue the installation.

Enviroment:

Meshery Version: v0.5.0
Adapter Version:

@Aisuko can you look into this? // @utkarsh-pro


text:
Meshery build status badge defunct

Description
The Meshery project recently switched from TravisCI to GitHub Actions. As such, each of the Meshery repositories need the build badges in their READMEs updated. Badges from shields.io are mostly used across the repositories, however, shields.io support for GitHub Actions badge seems pending. A number of solutions, including one from GitHub, have cropped up. Any should work.
Expected Behavior
Each Meshery repository's README should have a build badge showing the current status of that components build.

@soc1c we would love your help here! :)
If interested further in Meshery, don't hesitate to request access to or join any of the resources here - http://layer5.io/meshery/#community

@soc1c come back! ;)


text:
[mesheryctl] go lint check failure in system context create

See mesheryctl Command Tracker for current status of commands.
Current Behavior

Contributor Resources

mesheryctl Contributing Guide
Beginner's guide to contributing to Meshery and mesheryctl
mesheryctl Command Tracker
Meshery CLI Commands and Documentation
Layer5 Community Slack

@leecalcote I've pushed this commit to fix this in my current PR
This is passing the lint check so I think this should fix the issue when this PR is merged.

Do you want me to link this issue to that PR?

Yes, ma'am. That would be great.

This is already covered in pr #2928

@piyushsingariya thanks for the heads - up!
I had commented before this PR was merged.


text:
Cannot read property 'name' of undefined

I'm trying to setup a webhook to be called on message.sent. I'm getting this error on my nodejs server when a message is sent:
TypeError: Cannot read property 'name' of undefined
    at /app/node_modules/layer-webhooks-services/src/listen.js:95:26
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:131:13)
    at handleValidation (/app/node_modules/layer-webhooks-services/src/listen.js:134:31)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:131:13)
    at /app/node_modules/body-parser/lib/read.js:129:5
    at invokeCallback (/app/node_modules/raw-body/index.js:262:16)
    at done (/app/node_modules/raw-body/index.js:251:7)
    at IncomingMessage.onEnd (/app/node_modules/raw-body/index.js:308:7)
    at emitNone (events.js:80:13)
    at IncomingMessage.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

I registered a webhook on the dashboard to /message with message.sent and has been successfully activated.
Here is my code in my server for listening for this webhook:
// Provide a webhook definition
  var webhook = {
    name: 'message',
    path: '/message',
    events: ['message.sent']
  };

// Listen for a webhook
  webhooksServices.listen({
    expressApp: app,
    secret: SECRET,
    hooks: [webhook]
  });

  queue.process(webhook.name, function(job, done) {
    var webhookEvent = job.data;
    var message = webhookEvent.message;
    console.log('Message Received from: ' + message.sender.user_id);
  });

I see that the webhooks are being called, but Layer's listen.js is hitting an error because req.body.config on line 95 is undefined.
Do you guys know what could be going on?

(specifically, config object on req.body is undefined. req.body is OK)

Here is a sanitizied version of req.body
{
  "event": {
    "id": "<EVENT_ID>",
    "type": "message.sent",
    "created_at": "2016-04-15T17:26:53.007Z",
    "actor": {
      "user_id": "<USER_ID>"
    }
  },
  "message": {
    "id": "layer:///messages/<MESSAGE_ID>",
    "conversation": {
      "id": "layer:///conversations/<CONVERSATION_ID>",
      "url": "https://api.layer.com/apps/<APP_ID>/conversations/<CONVERSATION_ID>"
    },
    "parts": [{
      "id": "layer:///messages/<MESSAGE_ID>/parts/0",
      "mime_type": "text/plain",
      "body": "Received message: F"
    }],
    "sent_at": "2016-04-15T17:26:53.007Z",
    "sender": {
      "user_id": "<USER_ID>"
    },
    "recipient_status": {
      "<USER_ID>": "read",
      "<USER_ID>": "sent"
    }
  }
}

The fact that your req.body does not contain a config, makes me assume that the webhook was created via the Developer Dashboard rather than using the register() call.
Next steps:

You should log into the developer dashboard and delete all of your webhooks and recreate them with the register() call
I need to make listen() more tolerant of Webhooks created by hand.

Thanks for the quick response @michaelkantor.
I actually originally started out configuring via register() call but had a nearly identical issue in a different script, register.js. In getWebhook filter, I get:
TypeError: Cannot read property 'name' of undefined
    at /path/to/node_modules/layer-webhooks-services/src/register.js:80:28
    at Array.filter (native)
    at getWebhook (/path/to/node_modules/layer-webhooks-services/src/register.js:79:25)
    at registerHook (/path/to/node_modules/layer-webhooks-services/src/register.js:86:19)
    at Array.forEach (native)
    at /path/to/node_modules/layer-webhooks-services/src/register.js:47:11
    at IncomingMessage.<anonymous> (/path/to/node_modules/layer-webhooks/lib/request.js:115:10)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)

This is the first webhook object that ends up throwing the error -- you can see it has no config field:
{
  "id": "layer:///apps/<APP_ID>/webhooks/<WEBHOOK_ID>",
  "url": "https://api.layer.com/apps/<APP_ID>/webhooks/<WEBHOOK_ID>",
  "version": "1.0",
  "target_url": "https://sidekick-test.herokuapp.com/message",
  "events": ["message.sent"],
  "status": "active",
  "created_at": "2016-04-15T16:52:27.694Z"
}

OK, I may have found the issue. It looks like by deleting all webhooks created in the dashboard I can get around this issue. It seems like all dashboard webhooks do not have a config object. Since register.js and listen.js look at all webhook definitions, they will crash as long as there is a dashboard webhook on my account.

authors: lisbakke michaelkantor

repo: layerhq/node-layer-webhooks-services


text:
😊 请将 Issue 统一发表在 Gitee

目前平台的处理方式如下：

Issue 在 Gitee 提： Issues （因 Gitee 在 Issue 交流时访问速度占优）
PR 在 Github 提： Pull requests （因 Layui 在 Gitee 的仓库是从 Github 同步而来）

Gitee Issues: https://gitee.com/layui/layui/issues

能搞个qq群？

期望交流群

@q8018414 @LuoCore
https://gitee.com/layui/layui/issues/I5JMUT#note_12019725_link

风水轮流, 哈哈
重要调整：Layui Issues 请统一在 Github 提交

authors: ByYogi LuoCore q8018414 sentsim

repo: layui/layui


text:
Upgraded the project by adding additionnal features and data

I added some more quizzes, a printing of the topics list and a prompt at  the beggining to chose the topic in the showed list

Thank you for your contributions, Skibe! I have merged your commits into the main branch. ;)

authors: Sbike lazbord


text:
2 Vestel ECV04 in HA, cannot add second one + strange information come to HA

Hi,
I've added one wallbox to my HA via OCCP integration. I think it works, not tested with a car yet. Issues is, I do have two wallboxes of the same type and I cannot add the second one - or - I dont know how to do that.
Furthermore stranges thinks are happening:
"Wallbox_left" is integrated, IP: .19, SN:123
When loging into Wallbox_right (IP: .20, SN:456) Browser Admin Portal and soft rebooting it, HA pushes messages like "Wallbox_left rebotet".
OCPP Wallbox config is
ws://homeassistant.local:9000
ID: Wallbox_left, Wallbox_right
IPs are fix
Could you help please?

just add another ocpp device, with a different port number.

repo: lbbrhzn/ocpp


text:
Update installation.md

修改Windows上的安装命令。
修改前只能安装anvil命令，forge和cast都是没有的，修改后可以安装forge, cast, chisel, anvil四个命令

原来是压根没安装

cargo install --git https://github.com/foundry-rs/foundry --profile local --locked forge cast chisel anvil
最新的已经是这样了

repo: lbc-team/foundry-book-in-chinese


text:
Transferred claims show as spent

Not sure if this was because of some abandoned claim clean ups we did, but @OpenSourceGames claims were showing as Spent in chainquery. These were transferred to a new claim address at some point and then re-signed.

These were processed before I updated chainquery but after the protobuf was changed again.

repo: lbryio/chainquery


text:
Upgrading to v0.12.2rc2 results in 99% of home page content no longer being available

The Issue
I saw that 0.12.2 rc2 was available on the github page.  I started the lbry app on my desktop but it did NOT tell me that an update was available (so I quit that).  I then manually downloaded the new RC and manually ran the update, which seemed to go ok.  When I then started the new version, only 1 video thumbnail would load from the homepage.  All the rest say 'this address contains no content'  Unused.  See screenshot below.  I've restarted the app several times, nothing is displayed except 1 video I purchased.  It's important to note that all the free videos are downloaded in my downloads folder and after checking the settings, it is still pointing to that folder so the content exists locally on my machine.
Steps to reproduce

Manually upgrade 0.12 -> 0.12.2rc2
Start lbry app and no content is available on home page except previous purchases.
If you try and click on any of the videos it says 'there is nothing at this location'.

Expected behaviour
All the homepage content should load and resolve.
Actual behaviour
It's all gone O_o?  Except my previous video purchase.
System Configuration

LBRY Daemon version: 0.11.0   <- isn't this supposed to be 0.13 ?
LBRY App version: 	0.12.2rc2
LBRY Installation ID: 3isBEMXr63RscYGaxCm5ixJG7NFXVjmWTV29gQgFTA625XWK7mRtr3g2DsT1kJSpY8
Operating system: Windows (Windows-10-10.0.14393)

Anything Else
I notice on the release page it says 'Upgraded to lbry daemon 0.13, including updating API signatures'
but in the app settings page it says the daemon is still 0.11.0  Could it have failed to upgrade the daemon?  And that's why all the content is missing?
I have confirmed that the app and daemon are running in memory. (Screenshot below.) and they all close and shutdown ok when I quit the app.
Screenshots

Rebooted the machine and tried again, this time:

Will try to revert back to 0.12.0

Yes, this behavior is happening since your daemon did not update. If you close all LBRY processes and run it again, it should work, but if you continue to see daemon v0.11 that explains the issue.
Also, RCs are pre-release versions not necessarily ready for mass usage. So you will only be prompted to upgrade once this is marked as a release.

repo: lbryio/lbry-app