bug: Marshalling skips public (but implicit) field in struct

What version of fxamacker/cbor are you using?
2.5.0
Does this issue reproduce with the latest release?
yes
What did you expect to see?
The following struct has a public field Int:
type myBigInt struct {
	*big.Int
}

Though it's named implicitly, it can be used to construct values such as myBigInt{Int: ...}. So I expected myBigInt to be serialized as a map with one key (Int), in accordance with the generic struct serialization rules.
What did you see instead?
All values of type myBigInt get marshaled into 0xa0 (empty map).
Steps to reproduce
Here is a minimal playground example: https://go.dev/play/p/SMkjfzxdBHr
Note that if you tweak the example so the field is named explicitly:
type myBigInt struct {
	Int *big.Int
}

then serialization works as expected.

@mitjat Thanks for reporting this!  I'll look into it.

@mitjat Thanks again for reporting this!
This initially looked like a bug but after looking into this further, it doesn't appear to be a bug because fxamacker/cbor behaves as expected (documented) and follows the same encoding rules as encoding/json for "struct values" and "anonymous struct fields".
Given this and 4-5 workarounds being available (see below), I'll close this issue for now.  Please feel free to reopen if I missed anything. :pray:
:warning: The example you provided allows encoding/json to work as-is because big.Int implements json.Marshaler interface.  However, encoding/json won't encode any additional fields added to myBigInt definition, so there are pitfalls to avoid (regardless of codec) when using embedded struct fields.
Structs are serialized as CBOR maps, and exported struct fields are serialized as map elements.  Fields in embedded struct are encoded as if they are in the outer struct.
For example,
type myBigInt1 struct {
	Int *big.Int
}

type myBigInt2 struct {
	*big.Int
}

myBigInt1 is encoded as a CBOR map with one field Int of type *big.Int.
myBigInt2 is encoded as a CBOR map with 0 fields because:

embedded struct fields big.Int.neg and big.Int.abs are "promoted" to outer struct myBigInt2,
those fields are unexported and are not encoded as map elements.

Docs for `cbor.Marshal() says,
// Struct values encode as CBOR maps (type 5).  Each exported struct field
// becomes a pair with field name encoded as CBOR text string (type 3) and
// field value encoded based on its type.
// ...
// Anonymous struct fields are marshaled as if their exported fields
// were fields in the outer struct.  Marshal follows the same struct fields
// visibility rules used by JSON encoding package.

For this use case, a simple workaround is to make big.Int a regular struct field as you pointed out.
Otherwise, there are 3 approaches to encode embedded big.Int:

CBOR map with one field (provide a field name such as "Foo")

type myBigInt struct {
	*big.Int `cbor:"Foo"`
}

CBOR array with one element

type myBigInt struct {
	_        struct{} `cbor:",toarray"`
	*big.Int `cbor:"Foo"`
}

CBOR bignum (by implementing cbor.Marshaler)

type myBigInt struct {
	*big.Int
}

func (b *myBigInt) MarshalCBOR() ([]byte, error) {
	return cbor.Marshal(b.Int)
}

func (b *myBigInt) UnmarshalCBOR(data []byte) error {
	var bigInt *big.Int
	err := cbor.Unmarshal(data, &bigInt)
	if err != nil {
		return err
	}
	b.Int = bigInt
	return nil
}

CBOR bytes (by implementing encoding.BinaryMarshaler)

type myBigInt struct {
	*big.Int
}

func (b *myBigInt) MarshalBinary() ([]byte, error) {
	// TODO: serialize b.Int in custom format and resulting data is encoded as CBOR bytes automatically
}

func (b *myBigInt) UnmarshalBinary(data []byte) error {
	// TODO: deserialize data in custom format
}

Given this works as expected and has 4-5+ workarounds, we don't need to special case big.Int for embedded struct.
I am going to close this issue as not a bug for now.  We can always reopen this if needed.
Please feel free to comment in this issue.

Thank you for such a detailed explanation! For me, the gotcha was that when I read the documentation, I noticed the first paragraph of the docstring you quoted above, but not the last one (which is the more relevant one):
// Struct values encode as CBOR maps (type 5).  Each exported struct field
// becomes a pair with field name encoded as CBOR text string (type 3) and
// field value encoded based on its type.
// ... [snip 3 paragraphs] ...
// Anonymous struct fields are marshaled as if their exported fields
// were fields in the outer struct.  Marshal follows the same struct fields
// visibility rules used by JSON encoding package.

I agree there's nothing to fix; the behavior is non-obvious but matches the documentation (and encoding/json, which matters). Sorry for the false report, and thanks again for looking into it.


How can i check what legendaries i caught

is there any way for me to see what legendaries i had caught the night before?

P^legendary after P^pokelog.
However, the legendary command has pagination problem. It works only in Premium mode as you have to use the command through the owner account.


[SMALLFIX] Add parameter "raw_configuration" to the worker/info endpoint.

This is the same changes applied to worker as those applied to master.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/12773/
Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/12774/
Test PASSed.

Merged build finished. Test PASSed.


Extension API: Add support for targeting nested folders

I'd like to be able to control the icons of nested folders, and I've been told that support for such functionality needs to be added to your "Extension API".
Please see this issue and this issue for more background.

dup of #12493


0.8 Implement command base class

As a developer, I want to have as little code duplication as possible when developing new commands, since duplication leads to an increased amount of errors.
Acceptance criterias:

[ ] Add a BaseCommand class, which includes important properties such as the command's basic help text, descriptive help text about all subcommands, the command name, description, etc.
[ ] Use the BaseCommand class for all existing commands.

Not needed. This functionality is already built into discord.py. Closing.


Adds examples for lambda and sfn CRDs

This patch adds 8 new examples for various resources for lambda and sfn
custom resources.
Signed-off-by: Amine Hilaly<EMAIL_ADDRESS>By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

/cc @rothgar

/hold


Improve handling of types in constraint system.

Several fixes in order to make handling of types more consistent.
In particular:

Expression types used within the constraint system itself always use
the type map.
Prior to calling out to any TypeChecker functions, the types are
written back into the expression tree. After the call, the types are
read back into the constraint system type map and cleared from the
expression tree.
Some calls to directly set types on the expressions are reintroduced
in places they make sense (e.g. when building up new expressions that
are then passed to typeCheckExpressionShallow).

ConstraintSystem::setType() is still setting the type on the expression
nodes at the moment, because there is still some incorrect handling of
types that I need to track down (in particular some issues related to
closures do not appear to be handled correctly).
Also, the diagnostics have not been updated at all to use the types from
the constraint system where appropriate.

@swift-ci Please test

@swift-ci Please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - fefae4979f12253c55097891d50be0e81d0422ab
Test requested by - @rudkx

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - fefae4979f12253c55097891d50be0e81d0422ab
Test requested by - @rudkx

@swift-ci Please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 98fc1ab3211e23fee80b2d7ec4b08455fccc9b03
Test requested by - @rudkx

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 98fc1ab3211e23fee80b2d7ec4b08455fccc9b03
Test requested by - @rudkx

@swift-ci Please smoke test

These places where we're calling back into the TypeChecker... should they be folded into the ConstraintSystem so that we don't have to do the write-back-into-expressions step? Is this mainly callWitness?

Yes it's possible a few of these should be moved into the constraint system. I did that with one or two functions in a previous commit. I looked at callWitness and it appeared to be used from other places outside of CSApply so I didn't look at moving it in.
There are a few other places where we are currently writing types back, but I did that somewhat defensively at the moment to get closer to something that works. I intend on going back and removing ones that I suspect aren't actually needed (e.g. typeCheckExpressionShallow generally only looks at the untyped top-level node so perhaps it's not needed).
It's difficult to do that as we're still writing the types in ConstraintSystem::setType(). I may be able to determine that today before actually merging any of this in.

For something like callWitness, we could still provide a TypeChecker version that constructs a constraint system, records the types of the subexpressions in the constraint system, and then hops over to the implementation that doesn't ever use Expr::getType().
Not that we have to do the above before merging this excellent PR; I'm thinking about the trajectory here.

Okay I found a pile of new work I had missed originally where we pass Expr* into functions in Expr* that read and write types, so I'm going to use this as a checkpoint and then address those issues. It looks like at least some of that functionality is only used from the constraint system and should just be moved there, and other pieces can probably be addressed in other ways.
I think I'm going to try to encapsulate as much of the cruft here (by cruft I mean reading/writing types back and forth) into some entry points in ConstraintSystem that do the calls into the type checker so that there is one place it's happening rather than N.

@swift-ci Please smoke test and merge

@swift-ci Please smoke test


No Highlight Group for Function Calls?

Below are two screenshots which show that the function calls aren't grouped correctly or something.  Note the calls I am referring to by my cursor location. Also, you can see in the command line the group those words are registering under per yats.  Is there anyway we can create a group for these as I would really like to easily scan for these.  Thanks.

This is the set of changes I made to highlight function calls. I'm not very well versed in vim syntax highlighting, so this is probably not ideal (which is why I haven't opened a PR), but it's worked for me.
functions.txt


feat(index): support SQL to specify inverted index columns

I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
Allow specifying inverted index columns and support the following scenarios:

Avoid using the default strategy of automatically creating an inverted index for the primary key.
Manually exclude some primary key columns from indexing.
Manually add some non-primary key columns to create indexes.
Do not create an inverted index.

SQL statement example:
CREATE TABLE t (
  "ts" TIMESTAMP,
  "host" STRING,
  "job" STRING,
  "val" DOUBLE,
  TIME INDEX("ts"),
  PRIMARY KEY("host", "job"),
  INVERTED INDEX("job", "val")
);

Checklist

[x] I have written the necessary rustdoc comments.
[x] I have added the necessary unit tests and integration tests.
[x] This PR requires documentation updates.

Do we consider the compatibility with the old data?  @zhongzc

Do we consider the compatibility with the old data? @zhongzc

Already considered
https://github.com/GreptimeTeam/greptimedb/blob/4a8183f1912948c132f78defdbc46727255a9e13/src/sql/src/statements.rs#L481-L493


2nd submission

Hi Matt,
This is the second submission for the group CarlosFuerte.  Thanks!
David

Hello again! Thanks for this, it scores 0.485, so does not move your best score. Hopefully you get a chance to look again. Cheers!


Allowing nested action creators in bindActionCreators

I think it would be a nice feature to be able to pass a nested object of action creators to the bindActionCreators.
Rather than only binding the first level of actionCreators, bind all the leafs of the actionCreators object.
I have already submitted the Pull Request

Thank you for raising the issue. Please see my reply in https://github.com/reactjs/redux/pull/1451#issuecomment-189671109.


jsonnet-language-server: 0.14.0 -> 0.14.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/grafana/jsonnet-language-server/releases.
meta.description for jsonnet-language-server is: Language Server Protocol server for Jsonnet
meta.homepage for jsonnet-language-server is: https://github.com/grafana/jsonnet-language-server
meta.changelog for jsonnet-language-server is: https://github.com/grafana/jsonnet-language-server/releases/tag/v0.14.1
Updates performed

Golang update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.14.1 with grep in /nix/store/wha9isabn1hvpfz40vadfq8d5snkbcpb-jsonnet-language-server-0.14.1
found 0.14.1 in filename of file in /nix/store/wha9isabn1hvpfz40vadfq8d5snkbcpb-jsonnet-language-server-0.14.1

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

jsonnet-language-server

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/wha9isabn1hvpfz40vadfq8d5snkbcpb-jsonnet-language-server-0.14.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A jsonnet-language-server https://github.com/r-ryantm/nixpkgs/archive/345b6687f54861ad160c4f701a80393464a8dd0a.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/345b6687f54861ad160c4f701a80393464a8dd0a#jsonnet-language-server

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/wha9isabn1hvpfz40vadfq8d5snkbcpb-jsonnet-language-server-0.14.1
ls -la /nix/store/wha9isabn1hvpfz40vadfq8d5snkbcpb-jsonnet-language-server-0.14.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

jsonnet-language-server

Maintainer pings
cc @hardselius for testing.

[!TIP]
As a maintainer, if your package is located under pkgs/by-name/*, you can comment @NixOS/nixpkgs-merge-bot merge to automatically merge this update using the nixpkgs-merge-bot.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 337477 run on aarch64-darwin 1

1 package built:

jsonnet-language-server


Added flashcard add into decks

Added flashcard add into decks. Code however does not check for current user via (auth)

@rzhang003 Merge conflict


Fix multiple preconfirmations for the same slot in demo

Closes #107. Note that this doesn't really allow spamming continuously the button since there is a little delay between update of React state variables.

Summary by CodeRabbit

New Features

Enhanced the Home component for better handling of preconfirmation requests and wallet integration.
Introduced constants for secure interactions with the Kurtosis development network.

Improvements

Updated the transaction handling to ensure accuracy and responsiveness to blockchain events.
Streamlined payload creation for preconfirmation requests and improved function modularity.

Bug Fixes

Improved event handling logic to filter out outdated requests.

Chores

Reformatted the startup script for better readability and added a delay before opening the browser to enhance user experience.

lgtm, can I try it on the demo on this branch?

https://github.com/user-attachments/assets/0fcfbd78-1fc7-42a4-b5d2-39fba785fec0

Very nice :)


Status checks return error

Description

Type: Bug
Priority: Major

Bug
after adding status checks in function mbedtls_ssl_derive_keys() CI tests are failing line 893 in `ssl_tls.c
OS
linux
mbed TLS build:
Version: Development /  Commit
Expected behavior
The status check should return success.
Actual behavior
tests are failing
Steps to reproduce
run test with the branch from PR

ARM Internal Ref: IOTSSL-2171

Hi Alon, could you clarify whether #1437 is a preexisting issue? Normally, if a PR causes a test failure, we'd expect an update to the PR to fix this issue.

After investigation, the code in development has the correct behavior (except for the missing error checks that #1421 adds), but it is not robust. There is one particular place in the code where it is correct to ignore one particular error. Given that this isn't robust, I propose to make the check explicit: #1461


LightmapGI causes crash when using --headless

Tested versions

Reproducible in 4.2.1.stable.mono
Reproducible in 4.2.2.rc1.mono
Reproducible in 4.3.dev4.mono

System information
Godot v4.2.1.stable.mono - Windows 10.0.22621 - Vulkan (Forward+)
Issue description
Attempting to run a basic project with a baked LightmapGI node causes this crash when using --headless.
Godot Engine v4.2.1.stable.mono.official.b09f793f5 - https://godotengine.org

Process finished with exit code -1,073,741,819.

Steps to reproduce
Create a scene with a LighmapGI node, bake the lightmap. Run the project with the --headless param.
Minimal reproduction project (MRP)
MRP.zip

I confirm the crash, tested on Linux. Stacktrace:
$ godot-git --headless
Godot Engine v4.3.dev.custom_build.f2045ba82 (2024-03-02 09:48:25 UTC) - https://godotengine.org

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.dev.custom_build (f2045ba822bff7d34964901393581a3117c394a9)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x3e9a0) [0x7f82279ac9a0] (??:0)
[2] HashSet<RendererSceneCull::Instance*, HashMapHasherDefault, HashMapComparatorDefault<RendererSceneCull::Instance*> >::_insert(RendererSceneCull::Instance* const&) (/home/akien/Godot/godot/./core/templates/hash_set.h:170)
[3] HashSet<RendererSceneCull::Instance*, HashMapHasherDefault, HashMapComparatorDefault<RendererSceneCull::Instance*> >::insert(RendererSceneCull::Instance* const&) (/home/akien/Godot/godot/./core/templates/hash_set.h:408 (discriminator 1))
[4] RendererSceneCull::instance_geometry_set_lightmap(RID, RID, Rect2 const&, int) (/home/akien/Godot/godot/./servers/rendering/renderer_scene_cull.cpp:1475)
[5] RenderingServerDefault::instance_geometry_set_lightmap(RID, RID, Rect2 const&, int) (/home/akien/Godot/godot/./servers/rendering/rendering_server_default.h:833)
[6] LightmapGI::_assign_lightmaps() (/home/akien/Godot/godot/./scene/3d/lightmap_gi.cpp:1326 (discriminator 2))
[7] LightmapGI::_notification(int) (/home/akien/Godot/godot/./scene/3d/lightmap_gi.cpp:1313)
[8] LightmapGI::_notificationv(int, bool) (/home/akien/Godot/godot/./scene/3d/lightmap_gi.h:116 (discriminator 14))
[9] Object::notification(int, bool) (/home/akien/Godot/godot/./core/object/object.cpp:849)
[10] Node::_propagate_ready() (/home/akien/Godot/godot/./scene/main/node.cpp:258)
[11] Node::_propagate_ready() (/home/akien/Godot/godot/./scene/main/node.cpp:250 (discriminator 3))
[12] Node::_propagate_ready() (/home/akien/Godot/godot/./scene/main/node.cpp:250 (discriminator 3))
[13] Node::_set_tree(SceneTree*) (/home/akien/Godot/godot/./scene/main/node.cpp:3090)
[14] SceneTree::initialize() (/home/akien/Godot/godot/./scene/main/scene_tree.cpp:452)
[15] OS_LinuxBSD::run() (/home/akien/Godot/godot/platform/linuxbsd/os_linuxbsd.cpp:934)
[16] /home/akien/Godot/godot/bin/godot.linuxbsd.editor.dev.x86_64(main+0x15a) [0x2b15b10] (/home/akien/Godot/godot/platform/linuxbsd/godot_linuxbsd.cpp:88)
[17] /lib64/libc.so.6(+0x2814a) [0x7f822799614a] (??:0)
[18] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f822799620b] (??:0)
[19] /home/akien/Godot/godot/bin/godot.linuxbsd.editor.dev.x86_64(_start+0x25) [0x2b158f5] (??:?)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

I confirm the crash, tested on Linux (master, f2045ba822bff7d34964901393581a3117c394a9). Stacktrace:
$ godot-git --headless
Godot Engine v4.3.dev.custom_build.f2045ba82 (2024-03-02 09:48:25 UTC) - https://godotengine.org

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.dev.custom_build (f2045ba822bff7d34964901393581a3117c394a9)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x3e9a0) [0x7f82279ac9a0] (??:0)
[2] HashSet<RendererSceneCull::Instance*, HashMapHasherDefault, HashMapComparatorDefault<RendererSceneCull::Instance*> >::_insert(RendererSceneCull::Instance* const&) (/home/akien/Godot/godot/./core/templates/hash_set.h:170)
[3] HashSet<RendererSceneCull::Instance*, HashMapHasherDefault, HashMapComparatorDefault<RendererSceneCull::Instance*> >::insert(RendererSceneCull::Instance* const&) (/home/akien/Godot/godot/./core/templates/hash_set.h:408 (discriminator 1))
[4] RendererSceneCull::instance_geometry_set_lightmap(RID, RID, Rect2 const&, int) (/home/akien/Godot/godot/./servers/rendering/renderer_scene_cull.cpp:1475)
[5] RenderingServerDefault::instance_geometry_set_lightmap(RID, RID, Rect2 const&, int) (/home/akien/Godot/godot/./servers/rendering/rendering_server_default.h:833)
[6] LightmapGI::_assign_lightmaps() (/home/akien/Godot/godot/./scene/3d/lightmap_gi.cpp:1326 (discriminator 2))
[7] LightmapGI::_notification(int) (/home/akien/Godot/godot/./scene/3d/lightmap_gi.cpp:1313)
[8] LightmapGI::_notificationv(int, bool) (/home/akien/Godot/godot/./scene/3d/lightmap_gi.h:116 (discriminator 14))
[9] Object::notification(int, bool) (/home/akien/Godot/godot/./core/object/object.cpp:849)
[10] Node::_propagate_ready() (/home/akien/Godot/godot/./scene/main/node.cpp:258)
[11] Node::_propagate_ready() (/home/akien/Godot/godot/./scene/main/node.cpp:250 (discriminator 3))
[12] Node::_propagate_ready() (/home/akien/Godot/godot/./scene/main/node.cpp:250 (discriminator 3))
[13] Node::_set_tree(SceneTree*) (/home/akien/Godot/godot/./scene/main/node.cpp:3090)
[14] SceneTree::initialize() (/home/akien/Godot/godot/./scene/main/scene_tree.cpp:452)
[15] OS_LinuxBSD::run() (/home/akien/Godot/godot/platform/linuxbsd/os_linuxbsd.cpp:934)
[16] /home/akien/Godot/godot/bin/godot.linuxbsd.editor.dev.x86_64(main+0x15a) [0x2b15b10] (/home/akien/Godot/godot/platform/linuxbsd/godot_linuxbsd.cpp:88)
[17] /lib64/libc.so.6(+0x2814a) [0x7f822799614a] (??:0)
[18] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f822799620b] (??:0)
[19] /home/akien/Godot/godot/bin/godot.linuxbsd.editor.dev.x86_64(_start+0x25) [0x2b158f5] (??:?)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

This works around the crash, but it's not a full fix of course.
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index 59d70958f1..0b7e5c2dbe 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -1471,6 +1471,7 @@ void RendererSceneCull::instance_geometry_set_lightmap(RID p_instance, RID p_lig

 	if (lightmap_instance) {
 		InstanceLightmapData *lightmap_data = static_cast<InstanceLightmapData *>(lightmap_instance->base_data);
+		ERR_FAIL_NULL(lightmap_data);
 		lightmap_data->users.insert(instance);
 		lightmap_instance_rid = lightmap_data->instance;
 	}

When calling LightmapGI::set_light_data() -> set_base() the rid is 0 when headless..
I think it'd be safe to just ignore lightmaps in headless mode as if there was no lightmap_instance?
if (lightmap_instance) {
  InstanceLightmapData *lightmap_data = static_cast<InstanceLightmapData *>(lightmap_instance->base_data);

  if (lightmap_data) {
      lightmap_data->users.insert(instance);
      lightmap_instance_rid = lightmap_data->instance;
  }
}

Just a note for interested contributors. The way to fix this will be to store a dummy RID for lightmap instances in the DummyRenderer

Still mystified by the RID shadow resource system. Is there a walkthrough on how it works and why it exists? :D
That or examples of dummy RID for other resource types.

@jamie-pate We don't have a walkthrough or anything. Basically, the Dummy Server is an implementation of the RenderingServer that doesn't draw anything. It is used for --headless mode because --headless mode never needs to draw anything.
All the functions that RenderingServer exposes are also in the DummyServer, but in most cases they are empty, so they are just no-ops. However, in some cases, they need to return a value, so they return some default value. In some other cases, a real value is needed so the DummyServer needs to save a real value and then return it.
This is the case for anything with an RID. The DummyServer should be generating an RID, holding on to it, and then returning it when requested.
Particularly, the problem is here: https://github.com/godotengine/godot/blob/4e5ed0bbfb56f0a71eb61c868f965476652c23df/servers/rendering/dummy/storage/light_storage.h#L170
All lightmap instances get a default RID set to RID(), so when we later try to read back data we get null references.
We need to implement lightmap_instance_create() and lightmap_instance_free(). They can just be copied from the regular renderer here:
https://github.com/godotengine/godot/blob/4e5ed0bbfb56f0a71eb61c868f965476652c23df/servers/rendering/renderer_rd/storage_rd/light_storage.cpp#L1968-L1976
You also may need to do it for a few other functions that return RIDs. I'm not sure exactly which ones are necessary.
Here is an example of how the above looks in a PR https://github.com/godotengine/godot/commit/ed2b3d358d3883b98f741cbfc1ca3d7aa4fcbb7b

I get that the RID system is an abstraction layer, but it kind of seems like throwing around a bunch of (void*) pointers everywhere from the outside.
having to implement stuff like this gives me a bad taste :D
	virtual RS::InstanceType get_base_type(RID p_rid) const override {
		if (RendererDummy::MeshStorage::get_singleton()->owns_mesh(p_rid)) {
			return RS::INSTANCE_MESH;
		} else if (RendererDummy::MeshStorage::get_singleton()->owns_multimesh(p_rid)) {
			return RS::INSTANCE_MULTIMESH;
		} else if (RendererDummy::LightStorage::get_singleton()->owns_lightmap(p_rid)) {
			return RS::INSTANCE_LIGHTMAP;
		}
		return RS::INSTANCE_NONE;
	}

Feels like abstract classes or some other kind of typed opaque data structure would be nicer than completely opaque RID handles (effectively a (void *) within special memory blocks that identify the pointer type.. i guess.)
(I think i'm progressing towards to a solution at least)


Update index market data to be optional to avoid potential crashes

Type of Change
Select a category that relates to the content of your pull request (choose all that apply).

[x] Bug Fix
[ ] Content
[ ] New Feature
[ ] Documentation
[ ] Code Refactoring

Summary of Changes
While working on another task I had a crash  with the index market data. So this is a small fix to avoid potential crashes when index market data is null. Probably a rare case but the marketcaps line was already handled correctly defining an optional, so I guess it won't hurt to update the other two lines as well (to be safe).

Fixes: Issue #

Test Data or Screenshots

Submission Reminders
By submitting this pull request, you are confirming the following to be true:

I have reviewed the Contribution Guidelines.
I have performed a self-review of my own code.
I have updated my repository to match the master at SetProtocol/index-ui.
I have included test data or screenshots that prove my fix is effective or that my feature works.

Great catch! I've run into this before but wasn't able to repeat to determine the cause. Thanks


stremio: 4.4.142 -> 4.4.165

Description of changes
Updated the sources to the latest released version.

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 285653 run on x86_64-linux 1

1 package built:

stremio


i only generate .d.ts files when i switch the option "declarationMap" ;

i use esbuild-plugin-d.ts only generate generate .d.ts files when i change the ts.config.json's value "declarationMap" from TRUE to FALSE or from FALSE from TRUE:
i think it would be e issue.
if i dont change  ts.config.json file, only run npm run  build, the .d.ts files cant be created the secrec time!

This issue is likely fixed in 1.2.0


adding whiteboard question

Please check if this PR fulfills these

[x] The commit message is descriptive of changes
[x] You have tried at least one local test (this includes viewing the changes on your local fork)
[x] Docs have been added / updated as needed (for bug fixes / features)

What kind of change does this PR introduce?

[ ] Typo / Doc Update
[ ] Bug Fix
[x] Feature / New Item

What is the new behavior (if this is a feature change)?

[ ] Added Interview Technical Question
[x] Added Interview Whiteboard Question
[ ] Corrected existing items
[ ] Other

Adding new question ? Please check if this PR fulfills these

[x] <title> tag has been updated
[x] <h1> tag has been updated
[x] new file is kabob-case-like-this.html
[x] link to question has been added in technical.html or whiteboard.html

Other information:

This is terrific! Thank you!


Add basic channel delegate support

See PT #15770430

Add support for a list of delegates (pubkeys) in the channel state
Slash transactions can be posted by a registered delegate
Other channel-related transactions (e.g. close_solo) cannot

No WebSocket API support for now.

@ThomasArts the list of delegates, for now, needs to be set in the channel_create_tx (but defaults to []). There is currently no support for changing such parameters afterwards. The only change in the close/slash Erlang-side API for now is that an error message changed (account_not_peer_or_delegate.)


feat: adding Resource objects, System.status to return list of Resources and trim when needed

Changes:

adds Resource object (from go/mcp)
system status returns resources
resources can get trimmed based on approx token counts
benchmarking scripts for tokenization (time taken to compute increases linearly based on # tokens)

TODO:

model context limit is hardcoded but this will vary based on the provider

been using this as a daily driver - seems ok, wasn't sure if I should look out for any specific pathologies, but nothing broke


Deprecating gulp.run no longer allows defining logic before running tasks.

Given a gulp file similar to the one below, before version 3.5 I was able to run some logic before running other tasks.
var shouldMinify = false;

gulp.task('js', function () {
    return gulp.src('./js/*.js')
        .pipe(concat('app.js'))
        .pipe(gulpif(shouldMinify, uglify()))
        .pipe(gulp.dest('js'));
});

gulp.task('develop', function () {
    shouldMinify = false;
    gulp.run('js');
});

gulp.task('build', function () {
    shouldMinify = true;
    gulp.run('js');
});

As gulp.run is now deprecated, the only way to have a task run other tasks is by specifying them as dependencies. This feels extremely limiting, as the only way to set some logic before running a task is by using command line flags like in this example.
I may have missed it in the issues, but are there plans for programmatically starting tasks other than adding them as dependencies of other tasks?

@raDiesle I had this problem at work recently. We have 4 large code bases that all need to use the same gulp tasks but with different configs (paths, etc.). What we did is turn all of our gulp tasks into a private npm module which we then install in each project. This way, we can maintain our tasks from one repo and all we have to update per project is our settings file. Our solution works equally well from the command line and from our Jenkins build scripts and we're able to provide a nicer CLI to the gulp tasks for developers.
bin/
    yourmodule
lib/
    main.js
modules/
    gulp-related node modules
tasks/
    gulp tasks
test/
    main.js
gulpfile.js
package.json
README.md

We also make use of gulp-load-plugins and require-dir to make all of this more modular.

I found this thread useful for understanding the nature of Gulp: what it is, isn't, and the power of Orchestrator. Wrote about it: http://paislee.io/a-healthy-gulp-setup-for-angularjs-projects/.

"gulp is not a task runner" - Well, that is pretty much what I use it as.  There is tooling support in a lot of editors that will let you pick a 'task' from a gulpfile (vim, sublimetext, vscode, ...).  It's nice because you can just drop a gulpfile in and create named tasks in JS and easily execute them from the command line or from your editor.  I use other tools for the actual building, but I use gulp to call them.  Why?  They don't have a task running system like gulp does.  Not being able to run one task from another seems like a silly limitation to me.
For now I'm having to do a bunch of refactoring because I like it as a task runner, so I end up with methods like this:
function buildDist(done) {
  ...
  done();
}
gulp.task("build-dist", ["clean-dist"], buildDist);`

Just to be clear: the new task system in 4.0 is leagues ahead and much more flexible than the 3.x one discussed in this thread. Check out the docs on the 4.0 branch, you'll all love it!


Documentation on HMR?

Is there documentation available on how we can enable HMR in apps created using angular-cli? Also, could it be automatically pre-configured when creating a new project using angular-cli?

Hi @Krishna-teja, I've written a tutorial on how to enable it in a new Angular app generated by angular-cli. You can find it here: https://medium.com/@beeman/tutorial-enable-hrm-in-angular-cli-apps-1b0d13b80130

What @beeman said.

@beeman I am getting a message from angular-cli while following your tutorial or using your repository (using angular-cli 1.0.0-beta.25.5):

To disable this warning use "ng set --global warnings.nodeDeprecation=false".NOTICE Hot Module Replacement (HMR) is enabled for the dev server.
The project will still live reload when HMR is enabled,
but to take advantage of HMR additional application code is required
(not included in an Angular CLI project by default).
See https://webpack.github.io/docs/hot-module-replacement.html
for information on working with HMR for Webpack.

I visited that URL and I'm not sure what additional code I need to get HMR working.  Is this documented anywhere?

Have the same issue. Any suggestions?

Same issue, could you guys please provide some thought on this? I think HMR works as expected, so this warning is just a warning :)

This is the official guide on how to enable HMR in Angular CLI.
https://github.com/angular/angular-cli/wiki/stories-configure-hmr
The warning is indeed just a warning and can be disabled by running the command mentioned:
ng set --global warnings.nodeDeprecation=false

This is not just a warning to me. It's actually live reloading. If you look at the warning, it states that "The project will still live reload when HMR is enabled,"

Hi @beeman, I followed your tutorial to enable HMR in Angular 5 and it worked like a charm , now, I upgraded to Angular 6 and with a few tweaks it's "working", I get the ng serve up and running how ever every time I do a change I get this error:
[HMR] Cannot apply update. Need to do a full reload!
Error: Aborted because [FILE HERE] is not accepted
And I does a full reload, can you update the tutorial for Angular 6?, I can't figure it out on why it doesn't work on Angular 6
Thanks a lot.

Hey @eikishi01 - I will have a look at it later this week. Personally I have stopped using HMR quite some time ago, it was not stable enough and the native reload if the CLI became faster too.
However, I will check to see if I can rewrite the tutorial for v6 and let you know!

@beeman Thanks, I heard the same thing before configuring the HMR, I just wanted to not full reload the page on CSS changes for example and native reload always does it for everything, unless there is something I messed.

Any updates on HMR for ng v6?


Units: Allow x / y to return a raw ratio.

Commits in this PR

Units: Allow x / y to return a raw ratio.
In a future PR, I want to divide two Durations.
Please forgive the unironic use of pointer-to-member-function.

PR chain

#475 Update to new 3/4" Venturi specifications.
#483 Move flow zeroing into TVIntegrator.
👉 #485 Units: Allow x / y to return a raw ratio. 👈 YOU ARE HERE

⚠⚠ Please do not click the green "merge" button unless you know what
you're doing.  This PR is part of a chain of PRs, and clicking the merge
button will not merge it into master. ⚠⚠

cc @asmodai27


Update the approach of checking the CPUArchitecture

fix #522

Use cpuid instead of archspec to retrieve correct CPUArchitecture information.
Add Sapphire Rapids cpu model.

Signed-off-by: Zhou,Lei<EMAIL_ADDRESS>

thank you for the cpuid idea @LeiZhou-97!


Are webcomponents working?

I've checked in the builder and demo and I cannot verify but the same component that is working perfect in react or vue is not working with webcomponents, nothing happens with props and the slot.
https://codesandbox.io/s/papanasi-webcomponents-27zsfr?file=/src/index.js
<pa-button variant="red">Test</pa-button>
original code:
/**
 * Usage:
 *
 *  <pa-button></pa-button>
 *
 */
export default class Button extends HTMLElement {
  constructor() {
    super();
    const self = this;

    this.state = {};
    this.props = {};

    // used to keep track of all nodes created by show/for
    this.nodesToDestroy = [];
    // batch updates
    this.pendingUpdate = false;

    if (undefined) {
      this.attachShadow({ mode: 'open' });
    }
  }

  destroyAnyNodes() {
    // destroy current view template refs before rendering again
    this.nodesToDestroy.forEach((el) => el.remove());
    this.nodesToDestroy = [];
  }

  get _root() {
    return this.shadowRoot || this;
  }

  connectedCallback() {
    this._root.innerHTML = `
      <button data-test1="1" data-name="button-1">
        <slot></slot>
      </button>
      <style></style>`;
    this.pendingUpdate = true;
    this.render();

    this.onMount();
    this.pendingUpdate = false;
    this.update();
  }

  onMount() {}

  onUpdate() {}

  update() {
    if (this.pendingUpdate === true) {
      return;
    }
    this.pendingUpdate = true;

    this.render();
    this.onUpdate();

    this.pendingUpdate = false;
  }

  render() {
    // re-rendering needs to ensure that all nodes generated by for/show are refreshed
    this.destroyAnyNodes();
    this.updateBindings();
  }

  updateBindings() {
    this._root.querySelectorAll("[data-name='button-1']").forEach((el) => {
      el.className = `pa-button ${this.props.variant ? `pa-button--${this.props.variant}` : ''} `;
      if (el.props) {
        el.props.class = `pa-button ${this.props.variant ? `pa-button--${this.props.variant}` : ''} `;
        el.update();
      }
    });
  }
  renderTextNode(el, text) {
    const textNode = document.createTextNode(text);
    el.after(textNode);
    this.nodesToDestroy.push(el.nextSibling);
  }
}
customElements.get("pa-button") || customElements.define("pa-button", Button);

result:

Expected: To have "test" inside the button and "pa-button--red" in the classlist.

in your mitosis file you need to specify that you're using the shadowdom. Can I see your raw mitosis file

Oh… sorry for wasting your time feel free to close

no worries issues are welcomed. we didn't document this so it's our fault. I've been working on the webcomponent output so anything in that area I'll address

As you said now is working perfectly the shadow dom https://codesandbox.io/s/papanasi-webcomponents-27zsfr?file=/index.html:151-158 the only problem is that I've undefined in the classname but probably my fault I'll doublecheck your demos.
<pa-button variant="red">Test</pa-button>

@CKGrafico can you make a new issue about this.
Attributes aren't being converted to props on load
The way I'm using mitosis/webcomponents is having the whole app in it so I never actually ran into this issue haha

I made an issue for this here https://github.com/BuilderIO/mitosis/issues/416


[SPARK-26341][CORE]Expose executor memory metrics at the stage level, in the Stages tab

What changes were proposed in this pull request?
Expose executor memory metrics at the stage level, in the Stages tab,
Current like below, and I am not sure which column we will truly need.

Why are the changes needed?
User can know executor jvm usage more directly in SparkUI
Does this PR introduce any user-facing change?
User can know executor jvm usage more directly in SparkUI
How was this patch tested?
Manual Tested

Can one of the admins verify this patch?

Can one of the admins verify this patch?

cc @gengliangwang

cc @sarutak Hope for your review

The memory usage metrics should at least be folded by default in the WebUI.

These metrics you want to add are calculated per Executor rather than per Stage.
So I don't think it's not proper to add those metrics to StagePage.
Peak Execution Memory is already shown in the task table, which is calculated per task.
On/Off Heap Storage Memory is also already shown in ExecutorsPage. These metrics are calculated per Executor so it's proper to be shown in ExecutorsPage.

These metrics you want to add are calculated per Executor rather than per Stage.
So I don't think it's not proper to add those metrics to StagePage.
Peak Execution Memory is already shown in the task table, which is calculated per task.
On/Off Heap Storage Memory is also already shown in ExecutorsPage. These metrics are calculated per Executor so it's proper to be shown in ExecutorsPage.

But in executor page, Make the peak during the app entire run宁time

Ah, those peak metrics are calculated per Stage and Executor.

Ah, those peak metrics are calculated per Stage and Executor.

Yeah,  different level

add to whitelist

Test build #120955 has started for PR 28036 at commit 803921a.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/25647/
Test PASSed.

The memory usage metrics should at least be folded by default in the WebUI.

+1 with @jiangxb1987, otherwise there are too many columns in the executor summary table by default.

The memory usage metrics should at least be folded by default in the WebUI.

+1 with @jiangxb1987, otherwise there are too many columns in the executor summary table by default.

+1 for me too

Test build #120955 has finished for PR 28036 at commit 803921a.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/120955/
Test FAILed.

cc @gengliangwang @jiangxb1987 @sarutak . Sorry for late update since busy work and need more time be familiar with js code.
How about current way. add a new block for additional executor metrics seems unnecessary, So I add this checkbox in origin checkbox list

Test build #122211 has started for PR 28036 at commit 55d520a.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26883/
Test PASSed.

Test build #122211 has finished for PR 28036 at commit 55d520a.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/122211/
Test FAILed.

Test build #122216 has started for PR 28036 at commit 6d81362.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/26888/
Test PASSed.

Test build #122216 has finished for PR 28036 at commit 6d81362.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/122216/
Test PASSed.

@AngersZhuuuu I tried the PR.
After clicking "select all" and reloading the stage page, there is error and the page can't be loaded

@AngersZhuuuu I tried the PR.
After clicking "select all" and reloading the stage page, there is error and the page can't be loaded

May some cached data error, I will check.

Test build #122352 has started for PR 28036 at commit 7dba885.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/27019/
Test PASSed.

Test build #122352 has finished for PR 28036 at commit 7dba885.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/122352/
Test FAILed.

Test build #123681 has started for PR 28036 at commit 22c1e9e.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/28304/
Test PASSed.

Test build #123681 has finished for PR 28036 at commit 22c1e9e.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/123681/
Test PASSed.

cc @AngersZhuuuu There has been no activity on this PR since May 6th.  Can you advise me what caused this PR to be put on hold?  I will be happy to help.  At LinkedIn, we have an internal implementation of this feature in Spark 2.3.  We will be happy to make a contribution.

cc @AngersZhuuuu There has been no activity on this PR since May 6th. Can you advise me what caused this PR to be put on hold? I will be happy to help. At LinkedIn, we have an internal implementation of this feature in Spark 2.3. We will be happy to make a contribution.

Yea,  since I'm not a web-developer, I tried a lot to fix this issue  https://github.com/apache/spark/pull/28036#issuecomment-624502374 but failed, I am glad that you can take this work and ping me to show how you did this.

cc @AngersZhuuuu I will be happy to help.  My work email is<EMAIL_ADDRESS> What is your email?   Can you show this problem with some unit test?  Or I have to deploy the software on Hadoop in order to show the problem?  Please advise.

cc @AngersZhuuuu I will be happy to help. My work email is<EMAIL_ADDRESS>What is your email? Can you show this problem with some unit test? Or I have to deploy the software on Hadoop in order to show the problem? Please advise.

can't show with UT, just build with this par and start spark application, run some sql, do as https://github.com/apache/spark/pull/28036#issuecomment-624502374 said, and you will found that the page keep loading and open developer tool, to see the web output you will see the error.

cc @pgandhi999 Hi Parth, In Spark 3.0 version, you created stagepage.js (See SPARK-21809) in order to better support sorting and searching.  In this PR, @AngersZhuuuu encountered an issue #28036 (comment) .  I am not a web developer.  Can you help look into this issue?

Hi Ron,
Sure I shall take a look this week, thank you.
On Sun, Nov 29, 2020 at 15:34 Ron Hu<EMAIL_ADDRESS>wrote:

cc @pgandhi999 https://github.com/pgandhi999 Hi Parth, In Spark 3.0
version, you created stagepage.js (See SPARK-21809
https://issues.apache.org/jira/browse/SPARK-21809) in order to better
support sorting and searching. In this PR, @AngersZhuuuu
https://github.com/AngersZhuuuu encountered an issue #28036
https://github.com/apache/spark/pull/28036 (comment) . I am not a web
developer. Can you help look into this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/28036#issuecomment-735449934, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AFJSZXTTWQ7AL2OODUA65VDSSKV4TANCNFSM4LUGQMOQ
.

--
Sent from Gmail Mobile

@dongjoon-hyun Hi, dongjoon, can you help to reopen this PR.


add Card.retrieve(customer_id, card_id) with request from api

link to this issue https://github.com/omise/omise-python/issues/16

Sorry, I don't write unit test 🙏

@crosalot thank you for your contribution but could you also add test for it? 🙏

Replaced by https://github.com/omise/omise-python/pull/37


[x] Yes

Description
I was looking through the load performance of the app and discovered that some images like this one are quite heavy, e.g. 500+ kb. We should avoid having big screenshots within our docs pages and should pay attention about image file sizes.
To Reproduce

See example this request downloading an image with 513kb.
Expected Behavior
No image should be bigger than 100kb IMHO. Less is better here. I suggest to add a image image optimisation step into the pipeline. It would also be nice if images could be served in modern formats.
Actual Behavior
I haven't looked into all static files but I am sure there are many more that are quite big.
Scripts and configuration needed to reproduce this issue (if applicable)

Your Environment

OS:
Node version:
Docusaurus version:
Browser version:

Hi @christian-bromann and @lauramthomas : Just a note on this one with respect to modern formats. It is my understanding that at this time, docusaurus does not support .webp image files, although there is a feature request for it on the docusaurus repo from August 2020 that has not been addressed: https://github.com/facebook/docusaurus/issues/3185
That said, we can certainly look into reducing our image file size as one of our contribution guidelines.

WebP https://developers.google.com/speed/webp
Creating a webp image from an existing image https://developers.google.com/speed/webp/docs/cwebp.


Add cctz as a submodule

Needed by Abseil: step 2 from
https://github.com/abseil/abseil-cpp/blob/master/CMake/README.md
(Mutex does not compile without it)

Apologies, my git client setup is terrible.

Note that you don't need to start from scratch if you use the wrong email on your commits; just change them via:

Update local git config to set name/email for this repo
git config user.name "Your Name Here"
git config user.email "correct-email@domain"

Rewrite the commit, resetting author (hence, picking it up from config), but without updating the commit message.
# Note that this only affects the most recent commit, so this only works for 1-commit PRs;
# for multiple commits, either squash them first, or
git commit --amend --reset-author --no-edit

Update the branch on GitHub — this updates the PR in-place
git push -f

I realize you've already opened a PR, so keep this in mind for the future.


Add position property

Add position property to display the preview whether top or bottom, default is bottom, my usecase would be top

Hey! I don't maintain this atm so consider forking or simply grabbing code :)


ENH TextGrid.read():  accept file-like object

I was working with a corpus that included gzipped TextGrids. This modification allows reading such files directly by supplying a file object to the read function.

I don't have any problem with this---seems sensible---but I really don't have the bandwidth to properly review or test this. I barely ever work with speech data anymore. Does anyone reading this want to take over?


Bump arrow to 16.0.0

Bump arrow version to Arrow-JS 16 or Arrow-Rust 52.
This allows to fix a few open bugs:

fixes https://github.com/duckdb/duckdb-wasm/issues/1696, where the interval definition was using the wrong indian representation. Thanks @Maxxen, @Mytherin, @david542542, @pitrou and others for the contributions.
fixes https://github.com/duckdb/duckdb-wasm/issues/448, where histogram would create a map type, that was not handled at the arrow-rust level used in the shell.
fixes (similar to above) representations for FROM duckdb_functions(), that since 1.0.0 have a map field

I need to review other open issues, there might be other somehow connected to this.
Big thanks in general to the Arrow's maintainers.

More interval bugs connected to bumping arrow-rust:
fixes https://github.com/duckdb/duckdb-wasm/issues/1203
fixes https://github.com/duckdb/duckdb-wasm/issues/1204
fixes https://github.com/duckdb/duckdb-wasm/issues/1133

I would merge this, since this solves quite some problems and current limitations, but a deeper look from @domoritz would be very welcome.


feat: add option to polyfillsConfig to disable hashes in filenames

Solves #800

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Florian Unglaub 🤡 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

I'm not sure why the CI is failing now

@LarsDenBakker it's fixed now. Was a bit tricky to find the error.


[v4.4.6] Debugging the namespace issue further

#67  👈
dev

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

Join @GoodM4ven and the rest of your teammates on  Graphite


Simple tasking program runs out of Mach Ports and crashes on macOS

I am trying to write a parallel, tasking version of a computationally expensive algorithm. I aim to do this
by introducing 3 tasks within a block statement that appears
in a procedure body.
On macOS, the program runs but crashes (killed with SIGKILL from the OS) because it seems to exhaust the OS's supply of
"Ports" - which are some kind of IPC resource used in the Mach/Darwin kernel. It runs fine on Intel/Linux.
Running that on Intel/macOS (Sonoma 14.0) with GNAT 13.1.0 yields:
RodPro2:tests rchapman$ ./tt
Killed: 9
I get the same results on Apple M1 Pro with macOS Ventura 13.5.2 and GNAT 13.1.0.
I attach a screenshot of the "top" utility running. You can see the "#PORTS" column has reached 221557. I think the OS kills the process at 262144 ports (2**18).
So.. some sort of resource leak in the runtime-library perhaps?
Here's the code:
with Ada.Text_IO; use Ada.Text_IO;
with Interfaces;  use Interfaces;
procedure TT
is

   A, B, C : Unsigned_32 := 0;

   D : Unsigned_32;

   procedure P
   is
   begin
      declare
         task CA;
         task CB;
         task CC;

         task body CA is
         begin
            A := A + 1;
         end CA;

         task body CB is
         begin
            B := B + 1;
         end CB;

         task body CC is
         begin
            C := C + 1;
         end CC;
      begin
         null;
      end;

      D := (A + B + C) / 5;
   end P;

begin

   for I in 1 .. 1_000_000 loop
      P;
   end loop;
   Put_Line (D'Img);
end TT;

It turns out that 80,000 loops is OK, 90,000 fails. That’s 240,000 .. 270,000 tasks; cf 262144 ports.
I vaguely remember back in the day that we had an issue where aborting and the deallocating an allocated task wasn’t actually freeing the memory, because there were other resources involved - we worked round it by adding the task to a queue with a low-priority loop checked for a queue entry being actually terminated before deallocating.
I think AdaCore eventually implemented a solution, which would clearly involve hanging on to task-associated resources until ... whenever.
I found this link about Mach ports.
Also this posting about Paraffin - might suffer from the same problem, ofc

AdaCore said "No official support for macOS", so don't expect any help there...
Clearly something in the RTL or underlying pthreads libraries is allocating a Port for each task, but it's not getting de-allocated on task termination. Finding that is going to be tricky...

Where are the runtime library sources for macOS? I guess I'm looking for the bit that does task creation and termination in terms of pthreads...

Found 'em... in gcc/ada/libgnarl/ right?

Found 'em... in gcc/ada/libgnarl/ right?

Yes!
To get an idea of what’s used how, you can e.g. gnatmake tt.adb -c -u -f -gnatG -- it spits out an approximation of what the high-level translator has made of the source, and you can usually see where the RTS calls are made

I had another look at this: if you include delay System.Tick; in the loop, the number of ports remains under 20,000. But of course the whole thing runs painfully slowly.

Hmmm... any idea what the call to System.Tick is actually doing under the hood?

System.Tick is a named constant (0.01 [seconds] here).
My suspicion is that AdaCore have a low-priority task (or task-alike) which sweeps for unreferenced (& terminated) tasks and actually cleans them up, including releasing ports.


Changing to Creative mode on new world should automatically enable cheats

Is your feature request related to a problem? Please describe.
In vanilla, cheats are automatically enabled when you make a new world in Creative. It should be the same with OTG
Describe the solution you'd like
New creative worlds should have cheats enabled by default

Hey @aaronhowser1 , thanks for the feedback. Will see if I can include this for 1.12.2 v9.0_r10.

Will be in 1.12.2 v9.0_r10, available on the disc asap.


key concepts doc for db devops

Thanks for contributing to the Harness Developer Hub! Our code owners will review your submission.
Description

Please describe your changes: \key concepts doc for db devops
Jira/GitHub Issue numbers (if any): \ DBOPS-440
Preview links/images (Internal contributors only): __________________

PR lifecycle
We aim to merge PRs within one week or less, but delays happen sometimes.
If your PR is open longer than two weeks without any human activity, please tag a code owner in a comment.
PRs must meet these requirements to be merged:

[X] Successful preview build.
[X] Code owner review.
[X] No merge conflicts.
[X] Release notes/new features docs: Feature/version released to at least one prod environment.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66bcc115665218cc62b2eff6--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66bf6ae64e548946018ced03--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66bf7058d0dc704ef6d12a9e--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66bf81b6f1bcf766c30d628d--harness-developer.netlify.app


Set-up SSO for our GitHub organisation

We now have a GitHub enterprise supported account, we should take advantage of SSO.
We will need to:

[x] Set up the Azure half of this with @wellingk
[x] "Soft" enable SSO and test it works
[x] Send comms to impacted parties on changed process
[x] Ensure all existing users have an associated wellcome.org e-mail
[ ] Build an alternative to weco-bot, as it won't work anymore
[ ] Enforce SSO
[x] set up reusable workflow for stale PRs and formatting

What is weco-bot?
weco-bot is a machine user on GitHub that we use for a variety of automated actions. I believe this list to be exhaustive:

Committing and pushing auto-formatting changes (example, equivalent scripts exist on most repos).
Updating changelogs and pushing release tags (example, equivalents exist for other versioned repos eg terraform modules).
Deploying our documentation site to GitHub pages (see script and docs)
Creating automated pull requests for concepts pipeline date bumps and scala-libs version bumps.
Adding and reading labels on wellcomecollection.org pull requests in service of user control over running e2e tests.
Updating, pushing, and creating automated pull requests to document Miro suppressions.

How does it interact with GitHub?
weco-bot's current actions are achieved through 3 mechanisms:

Use of the git client to commit with the authorship email associated with weco-bot<EMAIL_ADDRESS>and to push using an SSH key for the weco-bot account.
Use of the GitHub API with a personal access token for the weco-bot account, to create and label PRs.
Use of the Docusaurus CLI to push to GitHub for GitHub Pages deployment, options documented here.

That is to say that weco-bot's identity is assumed by our CI servers using either:

An SSH key - for Buildkite agents, this is stored in an S3 bucket that is automatically accessed by the Elastic CI Stack instances.
A personal access token - tokens for various actions are stored in Secret Manager.

How can we use a GitHub app instead?
Authenticating as an app installation is appropriate for all of these use cases.

Git client authentication - it is not possible to use SSH for GitHub app authentication, but we can use an installation access token for HTTPS-based git access as per the docs with a remote of the form<EMAIL_ADDRESS>API authentication - the installation access token can be used just like a personal access token.

While this seems straightforward, the mechanics of getting the access token in the right place are really quite complex. To get an installation access token, a machine first needs access to the app's private key in order to create a signed JWT with which to request the token.
My guess at a minimal implementation would involve something like the following:

Private key stored in KMS or Secrets Manager
A custom git credential helper installed on all agents to facilitate access with the git client (something like this)
Some kind of scripting to get an access token for use with the GitHub APIs - possibly sharing implementation with the above.

This is quite achievable but not trivial - are we sure that the benefits of enforcing SSO outweigh the complexity/risk involved in this solution? There is of course an alternative approach where SSO is enforced and we create a machine user identity in Azure AD - is that a better solution?

@agnesgaroux to have a look whether or not this can be closed/create new tickets if needed.

Committing and pushing auto-formatting changes (example, equivalent scripts exist on most repos).
Updating changelogs and pushing release tags (example, equivalents exist for other versioned repos eg terraform modules).
Deploying our documentation site to GitHub pages (see script and docs)
Creating automated pull requests for concepts pipeline date bumps and [scala-libs version bumps]
(https://github.com/wellcomecollection/scala-libs/blob/main/.buildkite/scripts/open_downstream_prs.py).
Adding and reading labels on wellcomecollection.org pull requests in service of user control over running e2e tests.
Updating, pushing, and creating automated pull requests to document Miro suppressions.

TO DO

Creating automated pull requests for concepts pipeline date bumps
autoformat terraform: template AWS modules and other projects

The final part of this is migrating from Buildkite to GitHub actions so the weco-bot credentials are not required to allow that build system to check out from GitHub.
See https://github.com/wellcomecollection/platform/issues/5783


How to add pagination to the filter result?

Is there a way to add pagination on the filter result in case we are filtering data of a pagination page.

Incase anyone else comes looking to do this, simply append withQueryString() to the paginated query. (example below)
$users = User::filter()->paginate(25)->withQueryString();


a working sample

Please provide a working sample. I have set up the project as instructed, however, the Jobs global is undefined in bootstrap.js on sails lift.
sails version: 0.12.3

Sails-hook-jobs has been updated for sails 0.12.3 . The sample is working again.
Sails 0.12.3
mongodb 2.6.x or 3.x


convert pdf to images

works fine on 2.3.0 ✔
after upgrade to flutter_bluetooth_printer: ^2.6.3
the api for FlutterBluetoothPrinter.printImage changed
no i have to pass a List<int> instead of image from package image
i tried to use image.getBytes()
the code i use to convert pdf to image
Future<Image> convertPdfUnit8ListToImage(
  Uint8List docBytes, [
  double? width,
]) async {
  final watch = Stopwatch()..start();
  final document = await x.PdfDocument.openData(docBytes);
  final page = await document.getPage(1);
  final image = await page.render(
    width: width ?? page.width * 3,
    height: page.height * 3,
    format: x.PdfPageImageFormat.png,
  );
  page.close();
  final img = decodeImage(image!.bytes.buffer.asUint8List());
  watch.stop();

  log('it took ${watch.elapsed.inSeconds} Seconds');
  if (img != null) return img;
  throw Exception('Could not decode image');
}

but the package print a dark image  blow i will
before update :

after update and use bytes

the List image is raw ARGB bytes, i recommends to use Receipt widget instead


backquote column names in default and generated column expressions

To prevent parsing errors for special column names, we need to wrap column identifiers with backquotes.
MySQL prints column identifiers in default and generated expressions when doing show create table ... with backquotes anyways.
fixes https://github.com/dolthub/dolt/issues/7388

closing for better solution here:
https://github.com/dolthub/go-mysql-server/pull/2291


Using opaque background color on CupertinoTabBar breaks containing TextFields

After the last Flutter update to v1.2.1 the CupertinoTextField has a focus issue.
steps to reproduce:

creating CupertinoTabBar with an opaque backgroundColor
placing a CupertinoTextField inside the CupertinoTabBar
tapping inside the CupertinoTextField

expected result:

keyboard shows up
CupertinoTextField gets focused

actual result:

keyboard shows up
CupertinoTextField gets focused
keyboard disappears
CupertinoTextField looses focus

workarounds:

setting the backgroundColor of CupertinoTabBar to a transparent color (at least 0xFE....)
OR
setting resizeToAvoidBottomInset to false (CupertinoTabScaffold)

Demo App:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(DemoApp());

class DemoApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'BottomBar Bug Demo',
      home: CupertinoTabScaffold(
          tabBar: CupertinoTabBar(
            backgroundColor: Color(0xFF000000),
            items: <BottomNavigationBarItem>[
              BottomNavigationBarItem(title: Text("1"), icon: Icon(Icons.map)),
              BottomNavigationBarItem(
                  title: Text("2"), icon: Icon(Icons.title)),
              BottomNavigationBarItem(
                  title: Text("3"), icon: Icon(Icons.details)),
              BottomNavigationBarItem(
                  title: Text("4"), icon: Icon(Icons.ac_unit)),
            ],
          ),
          tabBuilder: (context, index) => CupertinoTabView(
                builder: (BuildContext context) {
                  return Center(
                      child: Padding(
                    padding: const EdgeInsets.symmetric(horizontal: 50.0),
                    child: CupertinoTextField(
                      decoration: BoxDecoration(
                          border: Border.all(),
                          borderRadius: BorderRadius.circular(5.0)),
                    ),
                  ));
                },
              )),
    );
  }
}

Flutter Doctor ouput:
flutter doctor --verbose
[✓] Flutter (Channel stable, v1.2.1, on Linux, locale de_DE.utf8)
    • Flutter version 1.2.1 at /home/sz/Downloads/flutter
    • Framework revision 8661d8aecd (vor 7 Wochen), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/sz/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.3)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.3)
    • IntelliJ at /opt/intellij-idea-ce
    • Flutter plugin version 33.4.2
    • Dart plugin version 183.5912.23

[✓] Connected device (1 available)
    • Pixel • FA69V0303889 • android-arm64 • Android 9 (API 28)

• No issues found!

This seems to have been fixed on master, I'm not able to reproduce it with the sample code. Could you verify on master @SaschaZ?


interleaving in output-all -json results in malformed JSON output

I've been having intermittent failures in my CI pipeline, wherein terragrunt output-all -json produces invalid JSON.
I'm using terragrunt 0.14.0 and terraform 0.11.3. Both are a little out-of-date but I don't see anything in the release notes for either project discussing this type of problem.
This is the normal result of output-all in a directory containing two simple terraform modules for AWS resources, one for a Route 53 zone, the other for some EBS volumes:
{
  "cluster_dns_zone_id": {
    "sensitive": false,
    "type": "string",
    "value": "Z3VJB5SSD3OAIA"
  },
  "couchdb_us-east-2a_volume_id": {
    "sensitive": false,
    "type": "string",
    "value": "vol-0ff1954f00be78317"
  },
  "couchdb_us-east-2b_volume_id": {
    "sensitive": false,
    "type": "string",
    "value": "vol-086760a15bb8721b9"
  },
  "couchdb_us-east-2c_volume_id": {
    "sensitive": false,
    "type": "string",
    "value": "vol-061504ced17c2063a"
  },
  "prometheus_us-east-2b_volume_id": {
    "sensitive": false,
    "type": "string",
    "value": "vol-00f0b7af4b1f5b2ad"
  },
  "prometheus_us-east-2c_volume_id": {
    "sensitive": false,
    "type": "string",
    "value": "vol-0c3f62cf34df57f00"
  }
}

Yet, about 5% of the time, the output looks something like this instead:
{
    "couchdb_us-east-2a_volume_id": {
        "sensitive": false,
        "type": "string",
        "value": "vol-0ff1954f00be78317"
    },
    "couchdb_us-east-2b_volume_id": {
        "sensitive": false,
{
        "type": "string",
    "cluster_dns_zone_id": {
        "value": "vol-086760a15bb8721b9"
        "sensitive": false,
    },
        "type": "string",
    "couchdb_us-east-2c_volume_id": {
        "value": "Z3VJB5SSD3OAIA"
    }
        "sensitive": false,
}
        "type": "string",
        "value": "vol-061504ced17c2063a"
    },
    "prometheus_us-east-2b_volume_id": {

I'm able to reproduce the problem (~5% of the time, i.e. after ~20 iterations) with this dumb one-liner:
count=1 ; rc=0 ; while [ "$rc" == "0" ] ; do output=$(cd ../prereqs/stg/ && TMPDIR=/tmp/tyler/rake-tmp/stg-prereqs/ terragrunt output-all --terragrunt-non-interactive -json --terragrunt-ignore-dependency-errors | tee tee.json | jq -s add) ; rc=$? ; echo "FINISHED - COUNT = $count RC = $rc OUTPUT = $output" ; count=$((count + 1)) ; done

Kinda ugly but I wanted to include the whole thing in case I'm doing something that is causing shell IO to freak out and trigger this problem. (The real problem happens in a slightly more complex environment, where terragrunt is invoked in ruby code via backticks.)
I realize this is a tricky type of problem to pin down and I haven't drilled down to a minimum repro case, but I thought I'd start with a bug report :).

I think this is pretty straight forward actually: Terragrunt does not make any guarantees about the order of the output for xxx-all commands. It runs terraform output in parallel across all your modules, so the output will definitely end up interweaving from time to time. Doing things in parallel makes perfect sense for apply-all, but perhaps not for other commands.
There are a few options:

Save log output from xxx-all commands to file (#74).
Reformat the output so you get all the output for one module at a time (#78, ish). The downside is that you wouldn't see the output from modules that complete early for a long time.
Run output-all and perhaps plan-all serially, rather than in parallel.

Thanks for the explanation, Yevgeniy.

Doing things in parallel makes perfect sense for apply-all, but perhaps not for other commands.

It definitely violates my expectations to say "output-all -json may return something that is not valid JSON" :).
I think your proposed solutions are all reasonable. 3 seems the simplest, but may be slow in practice for users with a lot of modules. 1 feels a little clunky; instead of terragrunt output-all | whatever I have to go hunting for log files, though the file-based approached has other advantages as noted in #74.
For my use case, 2 looks best and the downside doesn't hurt much because I'm sending all the output to something that processes JSON anyway.
FWIW I'm working around this problem by re-trying when the result of output-all is invalid. I don't know how well this approach will scale, but it works for me for now.


Change verify-attribution shell to sh

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/hold

/unhold


Overlay (VR) Z-axis rotation problem

Problem: Z-axis rotation will take X-axis rotation value upon VRCT start up.  So the translation box will be tilted at the Z-axis, which shouldn't be.
How to produce the problem: With Overlay (VR) set to Enabled. the overlay work correctly. If you set the X-axis rotation to any number, you can see the change on the screen correctly, example, if you set the X-axis to -45, you will see the translation box tilted upwards.  If you close VRCT completely and start it up again, you will see the translation box tilted upwards and to the right side. but if you check the setting, Z-axis was still set as 0.
Workaround: Every time I start VRCT, I will have to go to Overlay (VR) setting, just click on Z-axis rotation, set it to any number, and it will fix the problem for the current session.
What am I expecting: With Z axis rotation value set to 0, upon starting up VRCT, translation box shouldn't be slanted (tilted on the Z-axis).
Attached setting screenshot and effect screenshot. Everything is default except the X-axis rotation value was changed.
NOTE: the bug only happen when you close the VRCT app and open it again.

Dear @xenz698
Thanks for reporting the issue.
Now that we've identified the problem and its cause, we'll fix it in time for the next release.

@xenz698 I have released v2.2.8 and would like you to update it.

Thank you misyaguziya-san, confirmed problem is fixed. Really appreciate your quick turn-around service 🙇


Issue: Limit and Offset interchanged

In this pull request, I have addressed the pagination issue which was caused by the interchanged values for offset and limit query params. This affects the following endpoints

api/articles
api/articles/feed

I'm truly grateful for correcting the mistake.


media share with facebook

We can successfully share media (video / photo) from the API. I want to share posts from my Facebook connected account when sharing posts How can we do this?

As I know, the facebook connection is not recorded in your instagram account, but in the instagram mobile application itself. If it is true, then I'm not sure it will be possible to use instagram's api for that. On the other hand, adding the post to facebook page using facebook's page api is a lot easier.

I think, If we login with facebook, we may get option in sharing


reverse ratio for jigsaw puzzle

Hm I do find it very strange conceptually that for jigsaw we want ratio to be width / height but for ordered puzzle we want height / width. Seems like we may be misusing the fields width and height or are doing our scaling wrong. But if this works, I'm okay with it!

It is mainly for what we want to limit our restrict our image to. For ordered puzzles, its a long puzzle and so need to limit the widths of the images. For the jigsaw, the width is not a big issue, but the vertical height needs to stay at a specific size so we have to reverse it


docs: document Sheet unmountChildrenWhenHidden prop

Current Behavior
Right now, whatever component you render within a Sheet is not unmounted when the sheet animates out.
This is a problem because all the views that needs an ephemeral state, think about forms for example, never lose their state unless establishing bad practices in devland's code.
This mechanism, imposed by tamagui, leads to writing code for the inner component that either produce antipatterns such as synchronizing props with state or forces the developer to move values within a context and then use the context in the component causing weird content shifts during sheet's animations.
Another very popular and famous library used to implement sheets does this. Take a look:
NON TAMAGUI'S SHEET
https://github.com/user-attachments/assets/ee9c50c0-77cc-4569-8789-499297818475
TAMAGUI'S SHEET
https://github.com/user-attachments/assets/6c109975-c0f3-4391-841b-563bc3125ab8
Expected Behavior
I expect the components to unmount after the animation and to remount before the animation.
Either that or having the possibility to hook into callbacks such as "willSheetShow" and "didSheetHide" so to manually implement that in devland
Tamagui Version
latest: 1.108.0

Platform (Web, iOS, Android)
iOS, Android and web

Reproduction
import { ChevronDown } from "@tamagui/lucide-icons";
import { Sheet } from "@tamagui/sheet";
import { useMemo, useState } from "react";
import {
  Button,
  TamaguiProvider,
  XStack,
  YStack,
  createTamagui,
  Text,
  Button
} from "tamagui";
import { config } from "@tamagui/config/v3";
import StatefulComp from "components/StatefulComp";

function StatefulComp() {
  const [state, setstate] = useState("lol");

  return (
    <>
      <Button
        title="change state"
        onPress={() => {
          setstate((prev) => (prev === "lol" ? "asd" : "lol"));
        }}
      />
      <Text>{state}</Text>
    </>
  );
}

// you usually export this from a tamagui.config.ts file
const tamaguiConfig = createTamagui(config);

// TypeScript types across all Tamagui APIs
type Conf = typeof tamaguiConfig;
declare module "@tamagui/core" {
  interface TamaguiCustomConfig extends Conf {}
}

const spModes = ["percent", "constant", "fit", "mixed"] as const;

const SheetDemo = () => {
  const [position, setPosition] = useState(0);
  const [open, setOpen] = useState(false);
  const [modal, setModal] = useState(true);
  const [innerOpen, setInnerOpen] = useState(false);
  const [snapPointsMode, setSnapPointsMode] =
    useState<(typeof spModes)[number]>("percent");

  const snapPoints = useMemo(() => [25, 50], []);

  return (
    <TamaguiProvider config={tamaguiConfig}>
      <YStack space>
        <XStack space $sm={{ flexDirection: "column", alignItems: "center" }}>
          <Button onPress={() => setOpen(true)}>Open</Button>
        </XStack>
      </YStack>

      <Sheet
        forceRemoveScrollEnabled={open}
        modal={modal}
        open={open}
        onOpenChange={setOpen}
        snapPoints={snapPoints}
        snapPointsMode={snapPointsMode}
        dismissOnSnapToBottom
        position={position}
        onPositionChange={setPosition}
        zIndex={100_000}
        animation="medium"
      >
        <Sheet.Overlay
          animation="lazy"
          enterStyle={{ opacity: 0 }}
          exitStyle={{ opacity: 0 }}
        />
        <Sheet.Handle />
        <Sheet.Frame
          padding="$4"
          justifyContent="center"
          alignItems="center"
          space="$5"
        >
          <Button
            size="$6"
            circular
            icon={ChevronDown}
            onPress={() => setOpen(false)}
          />
          <StatefulComp />
        </Sheet.Frame>
      </Sheet>
    </TamaguiProvider>
  );
};

export default SheetDemo;

System Info
System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13500
    Memory: 2.00 GB / 15.65 GB
  Binaries:
    Node: 20.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.6.0 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

So, the preferred solution IMHO should be within tamagui, forcing the devs to adhere to this unmount/mount pattern which is idiomatic for react.
If this is hard to achieve in the current state of the code, it should be easy to provide at least the callbacks for willOpen and didClose.
Let me know what do you think about this @natew

Wow I've just noticed there is an undocumented "unmountChildrenWhenHidden" 😰
Let's treat this as a documentation task (even though I think it should be true by default but I get it's a dangerous breaking change now)

Not sure that’s desired to be on by default but definitely would love a PR with docs.
Reason is the contents can often be expensive to render, and that would cause delays to rendering them. You want instant reactions as it opens and closes so ideally you have the content already rendered.

We should definitely wrap the hide in a startTransition though

Not sure that’s desired to be on by default but definitely would love a PR with docs.
Reason is the contents can often be expensive to render, and that would cause delays to rendering them. You want instant reactions as it opens and closes so ideally you have the content already rendered.

While brainstorming ways to implement this behaviour (before discovering that there was already a prop) I thought the same about rendering expensive components that would have result in delaying too much the sheet's opening.
To address this, I thought about providing devs with a couple of callbacks, like didShow and didHide. These would allow inserting a placeholder component during the opening phase (something that renders quickly, like a skeleton loader) and then swap it out with the actual component later. This approach would be used with unmountChildrenWhenHidden=false, as it effectively lets developers manage the unmounting process manually and more flexibly.
Wdyt?


cumsum() doesn't work on tables with >1 partition and columns with identical names

cumsum on a dask dataframe with multiple partitions and columns with identical names raise an exception
To reproduce:
import dask
import dask.dataframe as dd
import pandas as pd

obj = pd.DataFrame([[0, 1, 2],
                    [3, 4, 5],
                    [6, 7, 8]], columns=['a', 'b', 'b'])
dask_df = dd.from_pandas(obj, npartitions=3)
dask_df.cumsum().compute()

Exception raised:
File ~\workspace\jupyter\jupyter\lib\site-packages\dask\dataframe\core.py:6851, in _take_last.<locals>._last_valid(s)
   6849 for i in range(1, min(10, len(s) + 1)):
   6850     val = s.iloc[-i]
-> 6851     if not pd.isnull(val):
   6852         return val
   6853 else:

File ~\workspace\jupyter\jupyter\lib\site-packages\pandas\core\generic.py:1527, in NDFrame.__nonzero__(self)
   1525 @final
   1526 def __nonzero__(self):
-> 1527     raise ValueError(
   1528         f"The truth value of a {type(self).__name__} is ambiguous. "
   1529         "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
   1530     )

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Environment:

Dask version: 2022.05.0
Python version: 3.9
Operating System: Linux Centos
Install method (conda, pip, source): pip

This is because of the following code:
    def _last_valid(s):
        for i in range(1, min(10, len(s) + 1)):
            val = s.iloc[-i]
            if not pd.isnull(val):
                return val
        else:
            nonnull = s[s.notna()]
            if not nonnull.empty:
                return nonnull.iloc[-1]
        return None

    if skipna is False:
        return a.iloc[-1]
    else:
        # take last valid value excluding NaN, NaN location may be different
        # in each column
        if is_dataframe_like(a):
            # create Series from appropriate backend dataframe library
            series_typ = type(a.iloc[0:1, 0])
            if a.empty:
                return series_typ([], dtype="float")
            return series_typ(
                {col: _last_valid(a[col]) for col in a.columns}, index=a.columns
            )
        else:
            return _last_valid(a)

Thus, if you do dask_df.cumsum(skipna=False).compute() it works, because it just calls iloc, which is robust to column non-unicity.
However, with skipna=True it must look for the last non-nan value in each column, and here it assumes that column names are unique.
@faulaire Is there any good reason at all to have 2 equally-named columns in a DataFrame? I can't think of any, so this looks to me like a really unusual case, and a consequence of something that shouldn't happen from the beginning.
@pavithraes Perhaps we could raise a very specific error if trying to use a cum method with skipna=True when columns are repeated. But I'd really try to avoid this from the beginning: is there any good reason to accept frames with non-unique columns? Even something like df[col], which we expect to yield a Series, could yield a DataFrame if there are repeated columns, so personally I'd prevent this at initialization.

No good reasons to have 2 equally-names columns in my DataFrames. I was working on another issue #9092 and as you said, this case is handled by iloc that why I had this kind of DataFrames.
+1 to prevent this at construction.

This check is trivial to add in from_pandas, but I'm in doubt whether it should be a more general check at a deeper level, perhaps inside _Frame.__init__(), or in __new__(), or even in new_dd_object.
@rjzamora @jsignell What happens if we try to build a dd.DataFrame from another object (let's say reading from Parquet/CSV files) which have repeated columns? Is that even possible? I'm nearly sure that writing a Parquet file with repeated columns isn't possible, because there'd be duplicate entries in the schema, but I'm not so sure while reading.
If this is controlled for such inputs, I'd add the check in from_pandas to prevent this when initializing from a pd.DataFrame, but if it's not controlled it should be done at a deeper level, shared by all possible dd.DataFrame construction options. Any thoughts?

If there's a backwards compatibility problem, wouldn't that be caught by some test?

Not necessarily. This could just not be any test of this behavior. I am proposing explicitly not allowing duplicate column names in the constructor. If someone has that in downstream code, then they would get an error. It's ok to change functionality, we just need to give notice so people have time to adjust and understand the change.

Checking for duplicate columns in from_pandas, and raising an error if there are duplicates in df columns.

This seems correct, and this is something that could happen during graph construction aka before the user calls .compute()

If that passes, trying to move the check to a deeper level (that is, to the functions called by from_pandas under the hood, such as new_dd_object).

I think this will be unnecessary since there is already a check to make sure that the columns in each partition match the columns of the _meta and we are already checking the _meta in step 1.
So basically you should only need step 1. But ideally all the IO methods, not just from_pandas.

This pull request should avoid this case, as it's not possible anymore to have 2 equally-named columns.

I suspect that changing this line: https://github.com/dask/dask/blob/43fede5413e9fad1499880a09e3d823a8b386a15/dask/dataframe/core.py#L7209
with this diff
diff --git a/dask/dataframe/core.py b/dask/dataframe/core.py
index 6eb2ca491..8487a51da 100644
--- a/dask/dataframe/core.py
+++ b/dask/dataframe/core.py
@@ -7206,7 +7206,7 @@ def _take_last(a, skipna=True):
             if a.empty:
                 return series_typ([], dtype="float")
             return series_typ(
-                {col: _last_valid(a[col]) for col in a.columns}, index=a.columns
+                [_last_valid(a.iloc[:, i]) for i in range(len(a.columns))], index=a.columns
             )
         else:
             return _last_valid(a)

appears to fix things
In [1]: import dask
   ...: import dask.dataframe as dd
   ...: import pandas as pd
   ...:
   ...: obj = pd.DataFrame([[0, 1, 2],
   ...:                     [3, 4, 5],
   ...:                     [6, 7, 8]], columns=['a', 'b', 'b'])
   ...: dask_df = dd.from_pandas(obj, npartitions=3)
   ...: dask_df.cumsum().compute()
Out[1]:
   a   b   b
0  0   1   2
1  3   5   7
2  9  12  15

I'll mark this as a good first issue, if anyone wants to finish it off by writing a test to cover this and make sure this change doesn't break anything else.

Hey all! Just submitted a pull request for this as a first issue- implemented @TomAugspurger's suggestion with additional testing to comfirm is fixed - seems to work fine and not to break any other tests from running.
Although I guess I should mention that if the "forbid duplicate columns" request is approved, these tests, which create dask dataframes with duplicate columns, would fail.


Quoted special functions don't resolve correctly

This works:
presto:di> select current_timestamp;
                    _col0
---------------------------------------------
 2014-12-12 17:59:18.737 America/Los_Angeles
(1 row)

But this does not:
presto:di> select "current_timestamp" ;
Query 20141213_015319_01754_8t988 failed: Column 'current_timestamp' cannot be resolved

The same applies to current_date and current_time.

Working on this one.

sure. will wait for it.

We came to the conclusion that the current behavior is actually correct: they are only special functions in the non-quoted form. When quoted, they should be treated as an identifier.


doc: add explorer link and feedback link

Pull request checklist
Please check if your PR fulfills the following requirements:

[ ] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been reviewed and added / updated if needed (for bug fixes / features)
[ ] Build (yarn build) was run locally and any changes were pushed
[ ] Lint (yarn lint --check) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[x] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Issue Number: N/A
What is the new behavior?

Does this introduce a breaking change?

[ ] Yes
[ ] No

Other information

I merged this PR to main, so i can pull it to my base


fix: check if class exists before calling reflectionProvider getClass

Hello!
This closes #2035 by first checking if a class exists before calling BetterReflectionProvider::getClass().
Thanks!

@calebdw Similar situation as here: https://github.com/phpstan/phpstan/issues/11641#issuecomment-2346750873
Can you please tell me how can I reproduce this problem on fresh Laravel installation? I want to provide a special error message to report these kinds of issues to Larastan's issue tracker instead.

@ondrejmirtes, I'm not entirely sure how to reproduce given that the OP never responded, but I would imagine that it's exactly what the error says---the class does not exist.
There's likely a non-existent model referenced in the auth.providers config, you can probably replicate by just deleting the existing user model.

@calebdw Nope, that's not sufficient. In the stack trace here I see something about forceFill method but I'm not sure how to reproduce this exact stack trace.

Oh, I did it, this helped:
    /**
     * Handle the event.
     *
     * @param  \Illuminate\Auth\Events\Authenticated  $event
     * @return void
     */
    public function handle(Authenticated $event)
    {
        $event->user->forceFill([
            'last_login_at' => Carbon::now(),
            'last_login_ip' => request()->ip(),
        ])->save();
    }


wellcomeimages.org redirect

Type

✨ Feature

Redirect traffic from wellcomeimages.org - wellcomecollection.org/works.

Duplicate of #1304