Refactoring proposal: cleaning up the internal APIs

This is my writeup re: https://github.com/rust-lang/hashbrown/pull/543#issuecomment-2295041421
cc #290 as this should also strive to fix that as well. Ideally, by the end of the refactor, we should be able to add the following to the crate root:
#![deny(
    clippy::missing_safety_doc,
    clippy::missing_errors_doc,
    clippy::undocumented_unsafe_blocks
)]

Documenting the actual layout
Right now, the documentation for the crate on the actual layout of the hash table is incredibly lacking. It mostly just points to the C++ SwissTable implementation and says "we did that!" while ignoring the fact that, obviously, it is not quite that. There are a lot of subtleties to the Rust code that are completely omitted from the basic description; both the downsides and the upsides are completely undocumented, IMHO, since even if they do exist they're difficult to find in the code.
We should start out by describing the layout from its broadest points first and use this to design the API. I'm also going to be renaming some terms so we can use the more specific names for individual pieces inside the API.
So, here's how I've decided to describe it:
The main benefit of this hash table implementation is that unlike other implementations, instead of a unified bucket array, we have two separate data and control arrays. Having a small, dedicated control array which does not depend on the type inside the table makes it extremely easy to traverse the table using SIMD instructions. It also improves cache locality by keeping the control data as small as possible, so that any operation on the table can happen entirely in cache, even if the data itself is a cache miss.
While the control and data arrays are separate, we can conceptually treat them together as an array of buckets, which forms our hash table.
Control Array
The control array contains a series of tags which indicate the status of any given bucket. To make SIMD operations efficient, we split the tags into groups whose size depends on the specific SIMD implementation. This imposes a restriction on the control array that its size is at least a multiple of the group size, and its alignment is at least a multiple of the group alignment. We additionally require that the number of buckets, and hence the number of tags, be a power of two.
There are two special tags, EMPTY and DELETED, which correspond to buckets which have either always been empty, or who have recently become empty. All other tags are considered FULL.
Regardless of implementation, the tags are:

EMPTY: 0b1_1111111
DELETED: 0b1_0000000
FULL: 0b0_xxxxxxx, where xxxxxxx are seven bits from the hash

We can use the term NONFULL to refer to buckets which are either EMPTY or DELETED.
Data Array
The data array is simply an array of maybe-uninit items, where the exact value of these items depends on what the hash table is being used for. The alignment of these items further imposes alignment constraints on the control array, and similarly, the control array further constrains the alignment of these items. However, no additional padding is placed between the items in the array.
The data array is indexed in the reverse order of the control array, and located before the control array in memory. This lets us store a single pointer to the control array to represent both arrays: if cast to a tag, the pointer can offset n to get the control for the nth bucket, and if cast to data, the pointer can offset -n - 1 to get the data for the nth bucket.
Padding
Since the alignment of the control and data arrays may differ, the very start of the allocation for the hash table may contain some padding. Specifically, if:

The data has a lower alignment than the control
The size of the data array in bytes is not aligned to the control

Then the padding will be equal to this discrepancy, to ensure that the control array is aligned.
Redoing the raw table
Conceptually, let's reframe a raw table as being parameterized by N, where N is a power-of-two number of items in the table. Then, this table (specifically RawTableInner) contains:

bucket_mask (N - 1)
ctrl (pointer to the control array)
items (number of full buckets)
growth_left (N - items)

There have been some comments regarding whether the number of fields can be removed, but I'm going to focus on instead discussing the structures that are useful for operating on the table itself.
Note that these wrapper types don't have to exist for optimizing the exact contents of the raw table. Since the number of fields is small, we can think of these types as little API structures that let us encapsulate the data we need to perform a given operation, that we can then wrap in other types like iterators to do the things we want them to do. Although each individual operation will likely refer to an unsafe method which does not care about the specific types involved or the lifetimes, by having these higher-level wrappers even on the internals, we can reduce the potential to cause undefined behaviour by creating higher-level wrappers on them.
It's also worth noting that undefined data here is specifically reading uninitialized data and breaking lifetime rules. Although changing an item's hash without moving it to a different bucket or leaking an item might cause the table to work incorrectly, it shouldn't trigger UB, especially because PartialEq and Hash can't cause UB by themselves.
Also, the below types can be made to each have a "non-generic" version, but as a general rule, we should not be interacting between these versions of the code. Specifically, the correct usage would be, for example, One<T, A> to interact with Two<T, A>, which internally calls OneInner and TwoInner methods, rather than OneInner directly interacting with TwoInner. This helps us minimize the number of unsafe methods and hence the opportunities to cause UB, and as long as we add inline tags in the right places, it shouldn't cause any performance issues either.
Tag
Right now, we have a Group to indicate groups of control, and I propose adding in a Tag as well to act as a newtype over u8. The goal of this is to help make some internal APIs clearer (is this a byte because it's unknown data, or is it explicitly a control tag?) and also to have a place to put a lot of the associated constants, methods, etc., for groups.
If it turns out that this just adds way too much unnecessary unsafe code (there's no safe transmute for transparent newtypes yet), we can omit it. But at least, it's an API nicety that I would like to add.
RawBuckets<T, A>
This is a wrapper over the control pointer and something to indicate its length. Its job is to do all of the pointer arithmetic we care about for the table, namely:

Finding the start and end of the data
Finding the start and end of the control
Finding a particular group or tag inside the control
Finding a particular MaybeUninit<T> inside the data
Allocating and deallocating tables without any regard for their contents

It doesn't care about the number of filled buckets, the load of the table, etc., and only cares about performing these operations correctly.
OwnedBuckets<T, A>
This type owns a fixed set of buckets, but cannot be resized. Using an analogy, if RawTable<T, A> is Vec<T, A>, then this is Box<[T], A>.
The goal of this wrapper would be to allow deriving operations like Clone, Default, and Drop on types which own a table, like draining and into-iterators.
Right now, these types simply hold onto a raw allocation triple (pointer, layout, allocator) and then free the allocation when they drop. This makes it difficult to clone these types, since the actual structs that "own" the allocation aren't part of this allocation triple. Most likely, OwnedBuckets<T, A> would simply wrap a RawBuckets<T, A> and an allocator, but we could also precompute the layout and allocation start if we want to.
Probe<'a, T> and ProbeMut<'a, T>
This implements all the methods we need to actually probe the table for a given hash value. Like the various find methods on RawTable, it will simply fail if the table is too small to insert something.
Scan<'a, T>, ScanMut<'a, T>
These are the raw iterator types that we use for traversing the table in linear order, as we do for iterators.
Drain<'_, T>, IntoIter<T, A>
These are the extra iterators we need for draining the table. Internally, they share the same code, but the difference is whether they own the table and are responsible for dropping it.
RawTable<T, A>
This is, of course, the actual table, and it also has the ability to verify the table load, rehash the contents, and resize the table.
Specifics of implementation
This is the final part where I attempt to create my own "FAQ" section for questions that nobody asked, in no particular order or usefulness to anyone:

Instead of Bucket<T> which is awkward and represents sometimes a pointer and sometimes an index, we should instead operate on indices for the table and return MaybeUninit<T> references whenever data needs to be referenced.
Similarly, InsertSlot should go. It really doesn't add any safety guarantees over just passing an index, and since methods have the word insert in their names anyway, it's not like people are going to misuse it.
We should be very clear in the code whether something is a *const Group or a *const Tag, since a lot of the code is sloppy and uses *const u8 everywhere. This is part of why I prefer having a dedicated Tag type.
A lot of comments on private fields or methods use single comments, when they could use doc comments and show up on --document-private-items instead.
Internally, Scan, ScanMut, Drain, and IntoIter would likely all use the same RawIterRange type similar to the existing one, but we would explicitly use the safe wrappers for their implementations on HashMap and HashSet and HashTable instead of the internal one.
A large portion of these types exist because I would like to be able to just derive(Clone) on iterators or not add my own Drop implementation and have them work.

Nice writeup, but what now?
I'm basically writing up my plans here for a couple reasons:

So people know they're coming and people don't step on each other's toes with merge conflicts
To get a general consensus on the API design, the actual internal layout, etc. before I write up code
So I don't just dump a refactor on someone's doorstep without them knowing ahead of time

I will likely be the one to do a lot of this refactoring, unless someone else is substantially more interested. I don't mind sharing the work, just know the reality of open-source work and that generally, people aren't that excited to implement other people's proposals.
The plan is to implement several of these types incrementally rather than doing it all at once. This also allows people to prepare for API breakages if they use the raw API.

I generally agree with this plan and would encourage you to continue working on this (though I have some thoughts about the specific, below). Most of the code in RawTable is quite old and predates MaybeUninit, which is why it is not used there. Also the RawTable code in particular is quite messy because of the split between RawTable and RawTableInner which exists solely to reduce compilation times (HashMap is heavily used in the ecosystem).
cc @JustForFun88 who has done a lot of work on documenting the internals of RawTable and optimizing its compilation times.
Some general thoughts:

I'd like to remove RawTable from the crate's public API. Almost all of the use cases for it are now provided through HashTable which exposes an entirely safe API. As far as I know, the only crate that actually needs the low level access to buckets that RawTable provides is https://github.com/jonhoo/griddle, which is no longer maintained.
Considering the above, it would make sense to make HashTable actually be the low-level implementation that was previously RawTable rather than keeping it as a wrapper around RawTable.
HashMap and HashSet could then be adapted to wrap HashTable instead of RawTable.

Now onto more specific thoughts:

The control array contains a series of tags which indicate the status of any given bucket. To make SIMD operations efficient, we split the tags into groups whose size depends on the specific SIMD implementation. This imposes a restriction on the control array that its size is at least a multiple of the group size, and its alignment is at least a multiple of the group alignment. We additionally require that the number of buckets, and hence the number of tags, be a power of two.

The actual control array is N + GROUP_SIZE tag bytes where the last group is a mirror of the first one. This avoids the need to bounds checks and explicit wrapping when searching within a group.

growth_left (N - items)

This is actually N - items - deleted.

Probe<'a, T> and ProbeMut<'a, T>

Scan<'a, T>, ScanMut<'a, T>

Internally, Scan, ScanMut, Drain, and IntoIter would likely all use the same RawIterRange type similar to the existing one, but we would explicitly use the safe wrappers for their implementations on HashMap and HashSet and HashTable instead of the internal one.

The primary motivation behind the current design of RawIter was to be able to have an iterator which didn't borrow the table so that you could make modifications to the table while iterating over it. This allows it to be the "common base" for all iterators, both mutable and immutable, and even those like ExtractIf which modify the control array as it iterates.
In hindsight, a better design would have been an iterator type that doesn't actually implement the Iterator trait but instead has an inherent next method that is passed a reference to the control array only for the duration of the call.
Finally, we wouldn't actually need separate Scan and ScanMut types since these would just correspond to Iter and IterMut on HashTable.

The actual control array is N + GROUP_SIZE tag bytes where the last group is a mirror of the first one. This avoids the need to bounds checks and explicit wrapping when searching within a group.

This bit actually confuses me a bit-- aren't we already aligned to a multiple of the group size, so, we don't need to add any extra padding? Or is this specifically for the case when N < GROUP_SIZE? I thought that ensuring that N is a power of two also meant that you would have an even number of groups to scan, but I could have been misread.

This bit actually confuses me a bit-- aren't we already aligned to a multiple of the group size, so, we don't need to add any extra padding? Or is this specifically for the case when N < GROUP_SIZE? I thought that ensuring that N is a power of two also meant that you would have an even number of groups to scan, but I could have been misread.

We are actually using the "unaligned groups" variant that was briefly covered in the CppCon presentation since that is the variant used by the C++ implementation of SwissTable in Abseil.

Oh, suddenly the triangular probing makes a lot more sense. Thank you for clarifying that.

Adding in a few extra notes here re: some other conversations that were had in other places:

Will want to look into the internals for dashmap specifically to ensure that the new API is usable by them. There is some concern that a lack of lifetime-erased types will cause issues with dashmap, but there may be a way around this.
indexmap was specifically concerned about the size of the various types being passed around, and will want to also focus on that as well.

Poking at this more: one other weird question I have regarding the alignment of the actual control table.
If we're using unaligned buckets, then why is the group width factored at all into the alignment of the control data? Presumably, we'd just need to align to the bucket array, right?

There's an extra Group::SIZE entries in the control data which mirror the first Group::SIZE entries. This is needed to support unaligned group loads which point to the very end of the control array.
Also in the past we avoided using extend because it generated worse code due to extra overflow checks. It also increased compilation times slightly.

Realising now that basically all of my problems were due to accidentally flipping the two fields, so, now all the alignment makes sense.
Will try and take another stab at this tomorrow. Hopefully at least some of the code can be simplified.


[otlLib] ClassPairPosSubtableBuilder logic is wrong

ClassPairPosSubtableBuilder adds new subtables if the classes are not "mergeable". That logic is b0rked.
Originally posted by @behdad in https://github.com/fonttools/fonttools/issues/2772#issuecomment-1232260560

What it should do instead is to break down classes, perhaps using misc.classifyTools.
The reason we have not hit this bug is that UFO workflow has classes that are always aligned.

again, you say adding new subtables if classes are not mergeable is wrong, and suggest a better alternative, but you don't explain why the current logic is boked. Do you mind elaborating? I'd like to understand as well.

Imagine one kern pair is ([a], [b]), another is ([a á] [c]). Current code will put the second pair in a new subtable. But both pairs have the glyph 'a' in them. Only the first subtable will be tried for glyph 'a', making one of the kern pairs for glyph 'a' unreachable. That's the bug.

ok thanks. By breaking down classes, you mean that your example ([a á] [c]) would be split into two kern pairs ([a] [c]) and ([á] [c]), correct?

ok thanks. By breaking down classes, you mean that your example ([a á] [c]) would be split into two kern pairs ([a] [c]) and ([á] [c]), correct?

Correct.

Do I understand correctly that this is an edge case consideration for ClassPairPosSubtableBuilder, because both in UFO and glyphsLib workflows, glyph group membership is exclusive per side and the opening example can't happen unless you turn off validation?
The problem might actually be hit in Roboto Serif though, I've seen different groups per UFO and am not sure what's passed on to otlLib.

Do I understand correctly that this is an edge case consideration for ClassPairPosSubtableBuilder, because both in UFO and glyphsLib workflows, glyph group membership is exclusive per side and the opening example can't happen unless you turn off validation?

I believe so.


rigTwistbone: Automatic skinning of twistbones when building/unbuilding

Done in twistbone system (https://github.com/renaudll/omtk/blob/master/scripts/omtk/modules/rigTwistbone.py).
Code is here : https://github.com/renaudll/omtk/blob/master/scripts/omtk/libs/libSkinning.py


Enable Embedded Boundaries

Depends on

[x] https://github.com/conda-forge/amrex-feedstock/issues/7
[x] https://github.com/ECP-WarpX/WarpX/pull/4865

Ready for 29.10

Add this patch in the 29.10 release, too: https://github.com/ECP-WarpX/WarpX/pull/5359


Running --fix replaces relative path with an empty string

In running this plugin, all of the relative paths would only be replaced with empty strings.
I ran:
yarn eslint <file> --fix

I set up the plugin with the instructions in the README.

Hi @jacobchrismarsh! Please provide me an example of your eslint & tsconfig files.

Same

@jacobchrismarsh @mix0000 Try latest release version 1.2.2


nsh_parse NULL dereference

These lines crash the nsh_script execution if a variable is referenced in your script that doesn't exist.  Notice there is no NULL check on the var_value.  This is inside nsh_parse.
char *var_value = getenv(var_name_start);
*var_name_end = tmp_char;
res_size += strlen(var_value);
How do you go about fixing Nuttx bugs ?

Please do a PR against PX4/NuttX

@davids5 Can you check if this persists upstream?

@lovettchris was this fixed? Is it still an issue with PX4 master?

The code fragment above does not exist in the the version of NuttX tied to PX4 master or in upstream Nuttx.


Why use this library when Drop wizard has spring integration?

I am trying to figure out the difference between this library and this:
https://dropwizard.github.io/metrics/2.2.0/manual/spring/
Any thoughts?

It's the same thing, I originally contributed this library to Metrics for version 2.2.0, and it was later removed and I continued maintaining it in this repository. Version 2.2.0 is now about 4 years old. Version 3.1.2 is current.

thanks for quick response!


Add email unique index to NeDB user model

Closes https://github.com/feathersjs/feathers-chat/pull/49

Ah.  You just beat me to it.  :shipit:


ACM DNS route 53 record is destroyed even if not created by current plan

Say I have an route53 records already created to validate ACM certificates.
If i pass validation_allow_overwrite_records = true, It will "import" the existing record into the new state. Now if i destroy the plan it will delete the record.
If i pass validation_allow_overwrite_records = false it will fail because i have a record already created.
What I want is have bool variable to create a new record or use an existing one.
Any other suggestion ?
Thanks

if terraform has the resource in its statefile ("imported" with overwrite=true) then it will delete the resource with a destroy.
nothing can be done within this module to change the core nature of terraform sorry.
you maybe able to log an issue with the aws provider requesting a "do not delete" field so when the aws provider gets given the destroy request by terraform it will "ignore" the request and say it was destroyed successfully but leave the resource hanging.
if the aws provider is updated to support this for route53 records this module could then add a pass through option just like validation_allow_overwrite_records.

you maybe able to log an issue with the aws provider requesting a "do not delete" field so when the aws provider gets given the destroy request by terraform it will "ignore" the request and say it was destroyed successfully but leave the resource hanging.

@ZeePal  Do you know of any resources (aws provider or other) that have such a field?

@ZeePal Do you know of any resources (aws provider or other) that have such a field?
@naseemkullah i cant recall which 1 but i think there is a resource in the aws provider, i had a quick look and couldnt find sorry. its definitely not a recommended approach (same as the overwrite option for route53) but there maybe use cases.

implementation should be easy as terraform core only asks the provider to destroy XYZ and it can just respond with "done" even tho it didnt do the real api call.

Thanks for the info @ZeePal, fwiw my use case is cert with same domain names provisioned in multiple regions and having the flexibility to tear down and spin up regions at will. I guess I'll try to have only one region responsible for validation.


--no-test broken with new rattler-build version

# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json

package:
  name: test-package
  version: '0.1.0'

cross-building this from linux-64 to linux-aarch64 is broken with rattler-build 0.12.0
rattler-build build --recipe "conda.recipe/recipe.yaml" -c conda-forge --target-platform=linux-aarch64 --no-test
  env:
    RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: true
    RATTLER_BUILD_COLOR: always
 Target platform: linux-aarch64

 ╭─ Finding outputs from recipe
 │ Found 1 variants
 │ Build variant: test-package-0.1.0-he8cfe8b_0
 │ ╭─────────────────┬───────────────╮
 │ │ Variant         ┆ Version       │
 │ ╞═════════════════╪═══════════════╡
 │ │ target_platform ┆ linux-aarch64 │
 │ ╰─────────────────┴───────────────╯
 │
 ╰─────────────────── (took 0 seconds)

 ╭─ Running build for recipe: test-package-0.1.0-he8cfe8b_0
 │
 │ ╭─ Fetching source code
 │ │ No sources to fetch
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Resolving environments
 │ │
 │ │ Finalized run dependencies: this output has no run dependencies
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Running build script
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Packaging new files
 │ │ Copying done!
 │ │ Post-processing done!
 │ │ Writing metadata for package
 │ │
 │ │ Files in package:
 │ │   - info/about.json
 │ │   - info/hash_input.json
 │ │   - info/index.json
 │ │   - info/paths.json
Error: Event { fields: ValueSet { message: Error building package: failed to remove directory `/home/runner/work/my-package/my-package/output/bld/rattler-build_test-package_1709045899`, callsite: Identifier(0x55f2090440d0) }, metadata: Metadata { name: "event src/main.rs:728", target: "rattler_build", level: Level(Error), module_path: "rattler_build", location: src/main.rs:728, fields: {message}, callsite: Identifier(0x55f2090440d0), kind: Kind(EVENT) }, parent: Current }
 │ │   - info/recipe/recipe.yaml
 │ │   - info/recipe/rendered_recipe.yaml
 │ │   - info/recipe/variant_config.yaml
 │ │   - info/recipe/variants-linux-64.yaml
 │ │   - info/recipe/variants-linux-aarch64.yaml
 │ │   - info/recipe/variants-osx-64.yaml
 │ │   - info/recipe/variants-osx-arm64.yaml
 │ │   - info/recipe/variants-win-64.yaml
 │ │ Creating target folder "/home/runner/work/my-package/my-package/output/linux-aarch64"
 │ │ Compressing archive...
 │ │ Archive written to "/home/runner/work/my-package/my-package/output/linux-aarch64/test-package-0.1.0-he8cfe8b_0.conda"
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Running package tests
 │ │ Skipping tests
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 ╰─────────────────── (took 0 seconds)
 × error Error building package: failed to remove directory `/home/runner/work/my-package/my-package/output/bld/rattler-build_test-package_1709
 × error 045899`
Error:   × failed to remove directory `/home/runner/work/my-package/my-pack
  │ age/output/bld/rattler-build_test-package_1709045899`
  ╰─▶ No such file or directory (os error 2)

Error: Process completed with exit code 1.

Without the --no-test it works.
It would be nice if we had a cross-build end-to-end test to ensure this doesn't happen again.

I am going to fix it right away!

It actually also fails for non-cross building :)

I was first :P

Fixed with #681


As a user, I want to see all the assignments for a course from my dashboard.

#124 addresses this issue.


Ability to qualify relationship to external namespace

Many relationships to GSIM, DDI versions, RDF, etc. are not exact equivalencies. For example both Universe and Population relate to the GSIM Population. In this case DDI4 is more discrete than the GSIM class. Can a paired text field be added to the dropdown contents for identifying classes in these namespaces so that a qualifying statement can be added when necessary for clarity? See Bitbucket DMFQA-47

also DMFQA-22

DOC-17 move current content to DOC-17 and then close


Inconsistency in python code examples

URL(s) with the issue:
https://keras.io/api/models/sequential/#sequential-class
Description of issue (what needs to be changed):
There is an inconsistency in the Keras python codes in doc in the Sequential Class.

This inconsistency lies in several other places where the code hasn't been wrapped with the python keyword.
Some other locations:
https://keras.io/api/layers/activation_layers/softmax/
https://keras.io/api/layers/activation_layers/relu/
It becomes tedious to work with while copying the code.
Correct links
https://github.com/keras-team/keras/blob/00518dcf7f5b7de7064267979d7e9f9916e777eb/keras/engine/sequential.py#L41-L96
Submit a pull request?
Yes

@01-vyom,
Thank you for the issue and appreciate your interest to submit a PR. Please create a PR so that Keras Engineers can review it. Thanks!

Ok, I will make a PR with changes to some of these files.

@01-vyom,
Can you please let us know what exactly is the inconsistency(sorry for my ignorance) that you are observing so that I can fix it? Thanks!

@rmothukuru
Some of the examples have >>> and others don't. That is why it is inconsistent. Also, it becomes difficult to copy the code with >>> at the start. I am preparing a PR if that is okay with you.

@01-vyom,
Sure. Please go ahead.

Closing since the associated PR has been merged. Thanks!


RSpec/Language isn't merging properly

It appears that if values for RSpec/Language are being set in .rubocop.yml, they are clobbering the existing setup and this is causing quite a few other cops to fail due to RSpec syntax not being recognized.
With this minimal .rubocop.yml:
require:
  - rubocop-rspec

AllCops:
  TargetRubyVersion: 2.6

RSpec:
  Language:
    ExampleGroups:
      Regular:
        - endpoint
    Helpers:
      - set

I get the following in RuboCop::RSpec::Language.config:
{
  "ExampleGroups" => {
    "Regular" => ["endpoint"],
    "Skipped" => ["xdescribe", "xcontext", "xfeature"],
    "Focused" => ["fdescribe", "fcontext", "ffeature"]
  },
  "Examples" => {
    "Regular" => ["it", "specify", "example", "scenario", "its"],
    "Focused" => ["fit", "fspecify", "fexample", "fscenario", "focus"],
    "Skipped" => ["xit", "xspecify", "xexample", "xscenario", "skip"],
    "Pending" => ["pending"]
  },
  "Expectations" => ["expect", "is_expected", "expect_any_instance_of"],
  "Helpers" => ["set"],
  "Hooks" => ["prepend_before", "before", "append_before", "around", "prepend_after", "after", "append_after"],
  "HookScopes" => ["each", "example", "context", "all", "suite"],
  "Includes" => {
    "Examples" => ["it_behaves_like", "it_should_behave_like", "include_examples"],
    "Context" => ["include_context"]
  },
  "Runners" => ["to", "to_not", "not_to"],
  "SharedGroups" => {
    "Examples" => ["shared_examples", "shared_examples_for"],
    "Context" => ["shared_context"]
  },
  "Subjects" => ["subject", "subject!"]
}

You'll see that ExampleGroups/Regular and Helpers have been overridden to only be the values I specified. Am I missing something?

I was under the impression that the default merging strategy for arrays in RuboCop configuration is merge, and only Include is the exception to this rule with its default override, and I was so wrong:

Arrays override because if they were merged, there would be no way to remove elements in child files.

Following the advice from https://docs.rubocop.org/rubocop/1.0/configuration.html#merging-arrays-using-inherit_mode, I've tried:

Adding inherit_mode to rubocop-rspec's config/default.yml in several variants:

RSpec:
  inherit_mode:
    merge:
      - Language/Includes/Examples
      - Language/Includes/Context

and
RSpec:
  Language:
    inherit_mode:
      merge:
        - Includes/Examples
        - Includes/Context

and
RSpec:
  Language:
    Includes:
      inherit_mode:
        merge:
          - Examples
          - Context

and none of this worked.

In the project that adds an alias, added the following:

require:
  - rubocop-rspec

RSpec:
  Language:
    Includes:
      inherit_mode:
        merge:
          - Examples
      Examples:
        - endpoint
    Helpers:
      - set

and still Includes/Examples is overridden instead of merged.
Adding
inherit_gem:
  rubocop-rspec: config/default.yml

makes no difference.
Symptom:
> RuboCop::RSpec::Language.config
=> {"inherit_mode"=>{"merge"=>["Includes/Examples", "Includes/Context"]},
 "ExampleGroups"=>
  {"Regular"=>["describe", "context", "feature", "example_group"],
   "Skipped"=>["xdescribe", "xcontext", "xfeature"],
   "Focused"=>["fdescribe", "fcontext", "ffeature"]},
 "Examples"=>
  {"Regular"=>["it", "specify", "example", "scenario", "its"],
   "Focused"=>["fit", "fspecify", "fexample", "fscenario", "focus"],
   "Skipped"=>["xit", "xspecify", "xexample", "xscenario", "skip"],
   "Pending"=>["pending"]},
 "Expectations"=>["expect", "is_expected", "expect_any_instance_of"],
 "Helpers"=>["set"],
 "Hooks"=>  ["prepend_before", "before", "append_before", "around", "prepend_after", "after", "append_after"],
 "HookScopes"=>["each", "example", "context", "all", "suite"],
 "Includes"=>
  {"inherit_mode"=>{"merge"=>["Examples"]},
   "Examples"=>["endpoint"],
   "Context"=>["include_context"]},
 "Runners"=>["to", "to_not", "not_to"],
 "SharedGroups"=>
  {"Examples"=>["shared_examples", "shared_examples_for"],
   "Context"=>["shared_context"]},
 "Subjects"=>["subject", "subject!"]}

The Language.config is set here:
        # Set the config for dynamic DSL configuration-aware helpers
        # that have no other means of accessing the configuration.
        def on_new_investigation
          super
          RuboCop::RSpec::Language.config = config['RSpec']['Language']
        end

From RuboCop's standpoint, what is wrong? Why aren't those arrays merged?

Ok I was hoping that there was something specific to language config loading happening in rubocop-rspec, but Yeah it looks like we have some stuff to fix in rubocop. There are a couple tangentially related rubocop issues (eg. https://github.com/rubocop-hq/rubocop/issues/9325).
I think it’s probably that merge_mode is overly complex and doesn’t cover edge cases properly.
We should take this issue to the rubocop repo but I don’t have access to transfer it from here 😅

Can't remember the exact methodology I used to test how config merging works when the language configuration feature was about to be merged. To my shame, it was probably the optimistic "yay, no offences" approach, including the testing done a bit later in https://github.com/palkan/action_policy/pull/138 and sibling PRs.
I don't have permissions to transfer the issue over either. However, even though are some deficiencies on the RuboCop side, I believe we still have to address an issue with the missing inherit_mode/merge option here in rubocop-rspec, so I'd keep this ticket.

Cry for help!
I admit our shameful fiasco.
Asking for help with configuring rubocop-rspec's config/defaults.yml in such a way that deeply-nested keys of a list type (e.g. RSpec/Language/ExampleGroups/Regular) had inherit_mode: merge.
@bquorning @Darhazer
Summoning @dvandersluis @koic @marcandre as most recent committers to lib/rubocop/config_loader.rb.

Culprit
https://github.com/rubocop/rubocop/commit/52d03b4b1d9296441360a4e4bbe0498be1be1141#diff-a923ce94f1d49facbed6a8bad517fe80d9052d653a1210c51530d39de572dcc1R131:

The optional directive inherit_mode is used to specify which configuration keys that have array values should be merged together instead of overriding the inherited value.

One caveat is that this directive only works with local and inherited configuration files, it is unable to merge with the default.yml config.

Debug
Breakpoint in https://github.com/rubocop/rubocop/blob/b5f343842a14f18b08406458d20670d2b401c492/lib/rubocop/config_loader_resolver.rb#L107:
binding.pry if key == "Regular"

Introspect:
opts # => {:inherit_mode=>{}, :unset_nil=>true}
key # => "Regular"
base_hash # => {"inherit_mode"=>{"merge"=>["Regular"]}, "Regular"=>["it", "specify", "example", "scenario", "its"]}
derived_hash # => => {"Regular"=>["mycustomexamplealias"]}

config/default.yml:
RSpec:
  Language:
    Examples:
      inherit_mode:
        merge:
          - Regular
      Regular:
        - it
        - specify
        - example
        - scenario
        - its

.rubocop.yml:
require:
  - rubocop-rspec

RSpec:
  Language:
    Examples:
      Regular:
        - mycustomexamplealias

Fix(es)
Respect setting-local inherit_mode
Not only check the inherit_mode defined on the root config level, but also respect local base_hash['inherit_mode']
elsif should_union?(base_hash, key, opts[:inherit_mode])

Might have side effects if the inherit_mode is also set in the .rubocop.yml, say, when they want to override instead of merge. So, we'll have those three:
# .rubocop.yml
inherit_mode:
  override:
    - Regular

RSpec:
  Language:
    Examples:
      inherit_mode:
        override:
          - Regular
      Regular:
        - mycustomexamplealias

and potentially conflicting config/default.yml:
RSpec:
  Language:
    Examples:
      inherit_mode:
        merge:
          - Regular

Still, this may be the simplest to resolve the issue.
Respect nesting
opts has no notion of nesting or namespaces. They accept a key, and that's it.
merge method has no awareness of the context, e.g. it receives base_hash:
=> {"inherit_mode"=>{"merge"=>["Regular"]}, "Regular"=>["it", "specify", "example", "scenario", "its"]}

but doesn't know that it's nested inside RSpec/Language. This, if opts[:inherit_mode] was set to "Language/RSpec/Examples/Regular", it (should_union? to be precise) would be unable to compare "Regular" to "Language/RSpec/Examples/Regular".
It might not be the best approach to force defining inherit_mode globally, with namespaces, though.
~Workaround~
I thought of a brute force way of fixing this by putting
inherit_mode:
  merge:
    - Regular

to rubocop-rspec's config/default.yml, but it's not respected, and opts ({:inherit_mode=>{}, :unset_nil=>true}) are coming from .rubocop.yml, not config/default.yml.
This didn't work. And this could have potential side effects if users set inherit_mode in their configs for the same keys.
@bbatsov @jonas054

I intend to bump the minimum required version of rubocop once a version that includes the fix is released.


organize environment variables; move production scripts elsewhere

In #108 108 @sbailey makes some concrete suggestions regarding environment variables and the presence of production scripts in the software product. I'll use this ticket to track these issues but would like to move on with #108 without any changes since neither one is on the critical path.

Done in #145.


feat: generate README.md from dependencies

closes #50
See generated code: https://github.com/seamapi/javascript-next/pull/52/commits/2432140c5792135c7899c6a60726d996c636b91e

Wasn't sure about the usage headings, so I went with #### Receiving Webhooks, and #### Using HTTP client
Thought about using some parser + AST lib, but regex works, albeit brittle.
Ignore the comically large amount of ci: Generate code commits. This was a little trickier than I thought, but I think I got it.

@razor-x  all the changes should be addressed here now, including the appending issue, and renaming to ## Usage.
One thing, it looks like updating README doesn't trigger a new version?
e.g. http module


Allow using distinct timestamps within the same query

While the STABLE flag ensured that the timestamp() value remained constant throughout the query due to caching, it restricted the flexibility of using multiple timestamps in single query.
By removing the STABLE volatility flag from the age_timestamp() function, we allow the usage of two different timestamps within a single query.

Some regression tests and examples of the previous unwanted behavior and new, preferred behavior would be helpful here.


Specifying Collection Display Layout when creating a new collection

Fixes # (provide issue number if applicable)
Feature Summary and Justification
Currently, there is no field to specify a collection display layout ("TIMELINE" or "GALLERY") when making a new collection. This feature builds upon PR #1829 and solves this problem.
This pull request provides ...
References
Other

I reedited the update_display_layout method because I forgot to git pull before making changes, which ended in me resolving merge conflicts.
I'm having issues with static checker again, specifically static word checks and check documentation. I remember this possibly being an environment issue, but if not, let me know if this is just on my end.

You need to rebase this on top of master first. It seems like it has commits from your previous pull request that got squashed right before I merged it.

Ah, I see. When I saw that huge list of commits, I knew something was wrong. Would it have been better if I made a new branch for new features?
I'll probably get onto this tomorrow. Thanks for your prompt reply!

Would it have been better if I made a new branch for new features?

Yeah, that would be the easiest thing to do.

I git rebased onto master, but I guess you made some changes. in this case, I think just resetting the head to where my last commit (before all of yours) will solve the problem. What do you think?

I would reset to this commit: d8d0182688e74d2a606f920290fc51594750e666

I don't see that particular commit in the commit history of this branch.

Did you add https://github.com/praw-dev/praw.git as a remote?

Yes, I see this.
$ git remote -v origin  https://github.com/jsk56143/praw.git (fetch) origin  https://github.com/jsk56143/praw.git (push) upstream        https://github.com/praw-dev/praw.git (fetch) upstream        https://github.com/praw-dev/praw.git (push)

I'm having issues with static checker again, specifically static word checks and check documentation. I remember this possibly being an environment issue, but if not, let me know if this is just on my end.

Could you run the pre_push.py script and post the errors you get?

I wanted to use Pastebin, but their SMART filters keep setting the paste to private (idk why). Here's an alternative.

I wanted to use Pastebin, but their SMART filters keep setting the paste to private (idk why). Here's an alternative.
Update: I see new changes in files that I never modified. It'd probably be better if I show you the error after reverting to the previous commit.

Do you have python added to your PATH?

What happened? Uh oh. Time to remake the changes. At least. everything is synced properly.

Do you have python added to your PATH?

Of course. I wouldn't be able to run Python files then, which I've done. I don't what the error Executable python not found means though.

You brought your collections-layout back in line with master. When you did that you didn't push the new commits with it. If collections-layout isn't ahead of master anymore, it will auto close the PR since there isn't any commits to merge in. All you should need to do is push the new commits to the collections-layout branch and then reopen this PR. But it appears you deleted the branch so now you'll have to make new PR.


QL docs: Update links to blog/demos

https://github.com/semmle/demos repo has been moved to https://github.com/github/security-lab.
Since I was updating some parts of the training slides, I also changed the remaining blog post links.

(I'll update the relevant issues.)

Related: https://github.com/github/security-lab still links to blog.semmle.com. I'll create a security lab issue for that.


registry: Refactor requestfactory to use http.RoundTrippers

Replaces #13254 (messed up github)
This patch removes the need for requestFactories and decorators
by implementing http.RoundTripper transports instead.
It refactors some challenging-to-read code.
NewSession now takes an *http.Client that can already have a
custom Transport, it will add its own auth transport by wrapping
it.
The idea is that callers of http.Client should not bother
setting custom headers for every handler but instead it should
be transparent to the callers of a same context.
This patch is needed for future refactorings of registry,
namely refactoring of the v1 client code.
Signed-off-by: Tibor Vass<EMAIL_ADDRESS>

There a few style nits but this looks ready to go.
LGTM!

@tiborvass @diogomonica has a few comments in https://github.com/docker/docker/pull/13254#discussion_r30455417 that might be interesting.

LGTM!

The failure seems unrelated, yoohoo!!

@diogomonica took care of your comments

LGTM!

LGTM

rebased (was conflicting with #13308)

LGTM


Support multiple architectures

This PR would address #5
I added some Travis tests for multiple versions of MacOS, as well as Linux on ARM64. Other architectures like Linux 32bits or ARM 32bits are not available. This could be worked out with docker maybe.
Changed the JNI loader to use the same one as in https://github.com/xerial/sqlite-jdbc. It supports more CPU architectures than the current loader, and also handles versioning of the temp file, and cleanup on JVM exit.
Reworked the CMake project to remove the dependency on JNI, which would require to have Java on the build machines, while all that is really needed are the JNI headers.
The cross-compilation of libwebp can be done using https://github.com/dockcross/dockcross for most of the architectures, except for Mac which uses https://github.com/multiarch/crossbuild. I added a bash script to compile all the architectures, which will copy everything in the resources folder after building.

Thank you! I'll try to have a look at this as soon as possible.

There might be a few things to leave out, I had to change the maven setup to make it work on my machine. I don't have a toolchain installed so I commented that out.
You can try to build the images on your machine by using the compile-all.sh. Hopefully it works on your machine too!

Hi @ediweissmann, did you had time to look at this PR by any chance ?
My application has some performance issues with the current plain java webp reader, which would be solved by using your library, but it requires support for more architectures than currently supported.
Let me know if you need some help understanding what i did, or how i did it, or if you require some changes on the way it's integrated.

@ediweissmann @pepijnve any updates on getting this merged?

@gotson

My application has some performance issues with the current plain java webp reader

Is that plain java library open source? I have a edge case use-case and would prefer a plain java lib.
Thanks in advance!

@gotson

My application has some performance issues with the current plain java webp reader

Is that plain java library open source? I have a edge case use-case and would prefer a plain java lib.
Thanks in advance!

@gotson

My application has some performance issues with the current plain java webp reader

Is that plain java library open source? I have a edge case use-case and would prefer a plain java lib.
Thanks in advance!

A bit off-topic, but yes, i'm using this: https://sourceforge.net/projects/javavp8decoder/files/imageIO Plugin/

@gotson

My application has some performance issues with the current plain java webp reader

Is that plain java library open source? I have a edge case use-case and would prefer a plain java lib.
Thanks in advance!

A bit off-topic, but yes, i'm using this: https://sourceforge.net/projects/javavp8decoder/files/imageIO Plugin/

Hi @gotson
If you have the jar and prebuilt natives for those architectures for this PR would you mind uploading them here?
Regards

Hi @gotson
If you have the jar and prebuilt natives for this PR, would you mind uploading them here?
Regards

They are available in Maven Central: https://search.maven.org/artifact/com.github.gotson/webp-imageio/0.2.1/jar

Thanks :)

Hi @gotson, any chance for adding Mac ARM64 architecture?

Hi @gotson, any chance for adding Mac ARM64 architecture?

Unlikely. There's no support using Docker to cross compile for that, so the only way to do so is by using a physical Mac, which I don't own.

I see, thank you.

hi @gotson, thank you so much for your PR and the maven central repository, I was pulling my hair out trying to compile this library for arm64.

Does this PR solve the ARM64 issue?

Does this PR solve the ARM64 issue?

For linux only

I've opened the PR with the missing MacOS AArch64 binary here - https://github.com/gotson/webp-imageio/pull/1


fix: close semantics

https://github.com/mcollina/undici/issues/175

I'm struggling with this. It's rather complicated.
I don't think the semantics of:
const requests = makeLotsOfRequests()
await Promise.all(requests)

Is correct either since it doesn't actually wait for the responses.
We have to wait for the response (if exists) to complete as well.

@mcollina: Much of the difficult here lies with propagating the errors... would it be an option that close(callback) does not propagate errors? i.e. it just closes the client for further requests and waits for all requests to complete, whether they error or not.
Essentially it would be:
Promise.allSettled(...)
  .then(() => callback(null))
  .catch((err) => callback(err))

ok for me

this is ready for review


[DISCUSSION] inter process function invocation

I am working on a project where there is a requirement to reuse react-native code inside a webview. this was quite simple on a small scale. The webview post a message asking for a token, we get the message in react-native, find the token and send it back as a message.
This become quite a hassle, as more data has to be pulled from the react-app. I created a library that allows you to reference functions, which will injected into the webview. this supports promises (rejections in react-native will be thrown in the webview as well)
here is a small example of how it is used:
export const WebViewWithBridge = withWebViewBridge(WebView);

<WebViewWithBridge
       source={{uri: 'https://your-page.io'}}
       reactNativeApi={{
           getToken: async (type) => "foo-bar-" + type
       }}
     />

const token = await this.getReactNativeApi(timeout).getToken('admin');

I am thinking about making a PR that will merge react-native-webview-bridge-seamless into this project. Is there anything I should take into consideration before starting? will the community prefer it to be a wrapper package, to keep the core project smaller?

This has been discussed and proposed before.
I also created a POC for this functionality (as a wrapper package): https://github.com/KoenLav/bridged-webview
In my opinion the seamlessness, as you names your package, we could offer is the most important thing to consider.
I'm all for adding this as it enables an easier integration between existing PWAs, or really any webapp, with React Native.
However I don't believe this is the current position of the maintainers as well.
Would appreciate for this idea to receive some more thought and am interested in discussing the API if this idea actually gets support.

I have also written a library that does this, called yaob. This library allows you to send arbitrary objects in both directions over any JSON-like interface, so you can implement rich API's.
We are using the library to run a full crypto-currency wallet inside the WebView, so we have a pretty massive API with hundreds of methods and dozens of objects zipping back and forth between the WebView and React Native. The yaob bridge is handling it all pretty smoothly so far. We did this because React Native doesn't have threads, so this was the best way to get the heavy crypto logic off of the UI thread.
The yaob library isn't just for React Native, though. We are also using it on the web to do cross-domain messaging in exactly the same way. Basically, anywhere that has a postMessage / onmessage interface can use it.
Since yaob is platform-neutral, it doesn't have WebView functionality baked in. I would definitely be interested in supporting an effort to build a bridge-enabled WebView.

Hello @kirill578, I really like the idea of a wrapper package as this is not everyone using webview would need and I'm trying to remove as much code as possible from this package to keep it maintainable.
However, it is completely possible to reference your packages @swansontec @kirill578  from the docs if you wish.
Btw I like the way your package hooks around webview :)


Unable to Connect when authentication is not enabled

cant connect without specifying a user name and password to mongoDB, How do you connect when authentication not enabled ?

if you specify an expression for the connection string you can bypass this issue,
"mongodb:// : /  ? " or mongodb://<IP_ADDRESS>:27017/tracking?slaveOk=true


fix issues about Synapse service

Fix issues #18364 , #18365 , #18366 , #18367 , #18368  about Synapse service
@jongio for notification

@jongio - Can you help ping the corresponding person to review this PR?

@joshfree - Who should review this?

@joshfree - Could you help us review this PR?

@scottaddie , @joshfree , @jameszliao-msft , @lmazuel  Could you please review this PR?

/azp run java - synapse - ci

@scottaddie , @joshfree , @jameszliao-msft , @lmazuel Could you please review this PR?

@scottaddie , @joshfree , @jameszliao-msft , @lmazuel Could you please review this PR?


Hide Ambient Light properties in Environment inspector depending on mode

Previously, some properties would be displayed even if adjusting them had no effect.
See https://github.com/godotengine/godot/issues/70600.

Thanks!


memory leak

https://github.com/libuv/libuv/blob/v1.x/samples/socks5-proxy/client.c#L728
uv_close(&c->handle.handle, conn_close_done); how does &c->handle.handle reference the correct handle in the first place?
It appears to create a memory leak by not being able to close a handle create by uv_tcp_init, is anyone able to explain/fix please as we are using this sample to learn/write a libuv solution.

uv_handle_t is the base type for all libuv handle types.
uv_close closed handle depend on handle->type.

That's a union: https://github.com/libuv/libuv/blob/v1.x/samples/socks5-proxy/defs.h#L54 so we're closing the same handle as was initialized with uv_tcp_init.


Expose API Base URL option

There are projects like Helicone which provide a wrapper around the OpenAI API for tracking prompts/response quality over time, error rates, understanding pricing and token usage etc. Additionally some people might implement OpenAI API-compatible open source model servers e.g. based on LLama etc. So it would be great if the user could change the baseURL in the settings to use other services.
From the Helicone docs, the implementation should be pretty easy:
import { Configuration, OpenAIApi } from "openai";

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
  basePath: "https://oai.hconeai.com/v1",
});

const openai = new OpenAIApi(configuration);

That is great, but it would be even better if it could be set in the UI like how I change the model version from gpt-3.5-turbo.


ES Module the lot

lage v1 will remain as it is, no changes!
ES Module Feature Goals

output both lib/cjs & lib/esm
output lib/types/ for typechecking purposes
accept both esm & cjs lage.config.js & runner scripts
move from "build" to "transpile" & "types" verbs for v2 packages
preserve ability to run tests against codebase

Details of Implementation

add eslint check & fix for adding import extensions in the import specifier
switch from tsc to swc for TRANSPILATION - this helps us transpile both to cjs & esm quickly
TargetRunnerPicker to be able to load both cjs / esm runners depending on a heuristic
@lage-run/lage to remain CJS so it's easy for rollup to deal with external deps (?? not sure if this is necessary)

Validation
Running lage
There are 3 ways we run lage:

as a @lage-run/lage bundle
as a loose set of packages (unbundled) - kind of useful for debugging: node ..\lage\packages\cli\lib\cli.js build, etc.
as an API like cloudpack would use it

Dynamically load modules
3 places where it needs to dynamically load modules:

lage.config.js (cosmiconfig) - not really a problem for API usage because we don't use that package (@lage-run/cli)
a single target worker script which then (scheduler uses this)
load a "runner" script (worker script load these dynamically as a way to run different tasks as the same worker)

closing this - we will keep cjs outputs, but allow esm imports for runner / worker files.

Alt approach used: we will produce "CJS" packages for now and use "import()" + file:// url scheme for loading .cjs / .mjs worker scripts


MC pos control refactoring

changed the code such that it uses matrix library instead of mathlib library vectors

@Stifael @julianoes Needs rebase and CI fixing. @julianoes I think it will be smart to bring in https://github.com/PX4/Firmware/pull/6020 first, then rebase this on top - but I'm open to either order and you might want to try which approach is faster / easier.

#6020 doesn't conflict, does it?

No, it should not conflict. First step here is a rebase and build fix.

I checked if the change to matrix has any effect. so far all I know it the following:
quaternion to DCM has no effect and vice versa
euler to DCM has no effect
In principle they should be the same, but for instance from DCM to euler is differently computed.
I think the only way to make sure that everything works is by 1.) testing  and 2.) go through the math in the position controller and make sure that all transformation are done correctly. If not, then the math should be changed and not the library

Can you rebase this on master and coordinate with all the other ongoing refactor efforts?

If you wanted to save some space.
using matrix::Vector3f;
using matrix::Eulerf;
etc

Since I decided now to.write tests first and then start shrinking and changing the code, I will close this and reopen once it can be ensured through unit tests that nothing breaks

Very good idea!


Deeper customization in WebIndex

The real question is, how can I modify $bundles in such way that I can for instance reduce it, and add "module" and "nomodule" versions of it and only for legacy outputs prepend polyfills.
It seems like it's very static, and that would be fine if there was a way to generate index.html file yourself using whatever "data" fuse-box generates as arguments (like Array<Bundles>) but I can't seem to find anything about that in the docs.

Looking at this PR, there seem to have been at least at some point a way to add attributes to a script tag.
It's however missing now, not to mention that wouldn't be enough as I would like to duplicate each script with both module and nomodule attributes.

@seivan I think we add a "reducer" to script tags in webIndex.ts
Do you think you can take a look at it?  You need to emit an object which can be modified.

@nchanged There is nothing called reducer in webIndex.ts I assume it was not meant literal?
Looking there, whatever it is, it needs to be called before
getEssentialWebIndexParams as that is what generates the script tags before writing it into the template.
Are you referring to the event that gives the bundles and then generates them?
  ctx.ict.on('complete', ({ bundles }) => self.generate(bundles));

?

Ok I think I got part of it. Just not sure what's expected here..
function myCustomWebIndexTransformPlugin(options?: any) {
  return async (ctx: Context) => {
    ctx.ict.waitFor(
      'before_webindex_write',
      async (props: {
        filePath: string;
        fileContents: string;
        bundles: Array<IBundleWriteResponse>,
        scriptTags: Array<string>,
        cssTags: Array<string>
      }) => {
       const unsortedBundles = bundles.reduce({module: [], noModule: []}, (memo, next) => {
          //interpolate two script tags and add them to either "module" or "nomodule"
        })
        const sortedBundles = [ ...unsortedBundles.module, ...unsortedBundles.noModule]
      // ??
        return props;
      },
    );
  };

A few questions

Will bundles only contain a ) All javascript b) Only entry points javascript c) All sort of file types
Do I need to alter the props.scriptTags as well?
How do I later other parts/tags of the html.index based on the content added available in props?

In this case, we need to change how the script tags are generated. We need to be able to override the default generation to be more precise.
const outputContext = { bundles, jsScripts, cssScripts, outputJSTags, outputCSSTags }
ict.sync("webindex-scripts", outputContext)
if( outputContext.outputJSTags) outputJSTags = "default script collection"

Something like that. Then a plugin would set those values. If nothing was set after the sync we could default it to how it's done RN.
Feel free to introduce improvements to the flow. webindex is the one that needs a good refactor.

Sorry I don't follow here.
What type is jsScripts?
What am I actually altering and returning?
There are several issues at play here.
One is the ability to use said values in the CSP meta tags, the other is using the same values to get a hash for subresource integrity.
So the script stuff was just an example, the actual question is how do I get access to something that fuse-box has generated and amplify it before allowing me to use it to generate portions of index.html.
I imagine using a template language inside the html.index and loop over these new values and either interpolate the entire tags, or the actual values and define the tags in the html.index directly.
The only thing I can point at is Webpacks approach to this.

in v4 there is a thing called Interceptor
So shorty
implementation:
props = { context : {} }
sync("foobar",props)

if(!props.context.foo) props.context.foo = "bar"

any plugin
ict.on("foobar", props => {
 props.context.foo = "hello world";
// this is how we set a value for foo
})

It could be done this way. So In you're case you'd create a plugin and handle script tags they way you want.

Right, so what I am asking is what am I actually getting in that callback, as in what actual data, or if it's easier, what TS types and what do I need to return?
I assume in the end, $bundle will be outputted, but if I create my own $cspMetaTags: Array<MyMetaTags> how do I make sure they are properly injected in the html template?

@seivan you'd manipulate the contents directly? Do you need any help implementing it? Join our slack to discuss it.

I’m good. Thanks.


Unable to load asset:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Unable to load asset: "packages/fluttermoji/attributeicons/hair.svg".
The asset does not exist or has empty data.
#0      PlatformAssetBundle.load. (package:flutter/src/services/asset_bundle.dart:324:9)

#1      SvgLoader._load. (package:flutter_svg/src/loaders.dart:153:41)

#2      _VectorGraphicWidgetState._loadPicture. (package:vector_graphics/src/vector_graphics.dart:355:40)

#3      _VectorGraphicWidgetState._loadPicture. (package:vector_graphics/src/vector_graphics.dart:369:13)

Hi @yanashenyang
We are currently refactoring the code and clearly the actual version (0.0.0) is a temporary one. The pull request with all the refactoring and the new documentation will be open in a few minutes, and I hope my collegue won't take too much time to review it. (But the refactoring is quite big)
So thanks to use avatar_maker, and I will keep you in touch once the update will be made.
Have a nice day

Hi @yanashenyang
The v0.1.0 is now available. As you can see if you start the example, it works quite well.
Give us an heads up if you still have issues.
Have a nice day

Thanks for your reply
It works well
Have a nice day


immutable support

It would be good if secundus could work with datastructured that are treated in a purely immutable way. This could also help with numpy support.

First, good job on the name. :) I'm giving the install a try now.
On this ticket, do you mean a system that is somewhat like Redux, where the system hands you the data then stores your return value?

Oh, you're around! I just sent you an email.
Yes, the idea is that you could have a system that doesn't mutate components at all but instead returns new versions of the components (or some aspects of components to be modified, not sure yet). The framework can then take care of doing the update itself. Maybe there are optimization opportunities lurking underneath.


⚠ ClamAV has degraded performance

In c1c6195, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 84 ms

Resolved: ClamAV performance has improved in 25dbf58 after 8 minutes.


Incorrect IP address listed in Step 1

[Enter feedback here]
The IP address for local management of the Mini R is incorrect in Step 1. It should be <IP_ADDRESS>, as is reflected correctly in the screenshots on the page. Confirmed .10 as the correct IP on a Mini R that I recently received, as well.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 95b458d3-94a5-8c99-d80e-76837a516ef6
Version Independent ID: 21195b9b-0c66-f241-baad-8a9cdb82a51f
Content: Tutorial to connect to Azure Stack Edge Mini R in Azure portal
Content Source: articles/databox-online/azure-stack-edge-mini-r-deploy-connect.md
Service: databox
Sub-service: edge
GitHub Login: @alkohli
Microsoft Alias: alkohli

@DaveMuhich Thanks for the question! We are investigating and will update you shortly.


Previously line clicking throws error because event was undefined

window.event is deprecated: https://developer.mozilla.org/en-US/docs/Web/API/Window/event.
Maybe we can find a different way to solve the bug, can you please tell me how to reproduce it?

window.event is deprecated: https://developer.mozilla.org/en-US/docs/Web/API/Window/event. Maybe we can find a different way to solve the bug, can you please tell me how to reproduce it?

Actually, I simply run application. When I click on any connection between nodes an error logs in console.

My mistake, event is import from d3, not window: https://github.com/joyceworks/flowchart-vue/blob/6dc255f2af98a3489f52de0a0b65b0e4e596e483/src/components/flowchart/Flowchart.vue#L27

Published 0.25.1 to NPM.


Fixed link to gradlePluginPortal in README

README had incorrect url for the gradle plugin for the embedded link at the top

Hah, big whoops...thanks for fixing !


vs2022 cannot be used

__declspec(dllimport) public: class std::basic_streambuf<char,struct std::char_traits > * __cdecl std::basic_streambuf<char,struct std::char_traits >::pubsetbuf(char *,__int64)"
Environment
toml++ version and/or commit hash:
new
Compiler:
msvc143
C++ standard mode:
c++ 17
Target arch:
x64
Steps to reproduce (or a small repro code sample)
#define GLOG_NO_ABBREVIATED_SEVERITIES
#include <WinSock2.h>
#include <Windows.h>
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <tchar.h>
#include "string"
#include <string.h>
#include <io.h>
#include
#include "include/Parameter.h"
#include "include/PaddleOCR.h"
#include<opencv2/opencv.hpp>
#include "resultjson.cpp"
#define WRITE_LOG(s) (LOG(INFO)<<s)
#include <ws2ipdef.h>
#include <drogon/drogon.h>
#include
#include <include/toml++/toml.h>
#include
#include <urlmon.h>
#include <stdlib.h>
#include <direct.h>
#pragma comment(lib,"urlmon.lib")
int main(int argc, char* argv[])
{
const auto data = toml::parse_file("config.toml");
}

What? I use VS2022 with TOML++ literally every day. Can you post an error message, and maybe the specific VS version you are using.

Also please note the TOML++ version or commit hash, as required by the issue template. The word "new" is neither of those things.

I've just tested examples/simple_parser in the latest release version of VS2022 (17.6) and the latest preview (17.7), and both compile it without issue. I'm going to treat this as user-error and close it as not a bug. I'll re-consider it if you can provide me with some more (and better) information.

tomlplusplus-3.3.0,  vs2022 17.3.4

I also asked for a compiler error message. I can't help you if you don't give me good information. You've given me basically nothing to work with.

cannot resolve symbol    __declspec(dllimport) public: class std::basic_streambuf<char,struct std::char_traits > * __cdecl std::basic_streambuf<char,struct std::char_traits >::pubsetbuf(char *,__int64)"

no .lib files

That symbol is a from your C++ standard library, not from toml++. This is almost certainly a problem with your project configuation - you have a mix of C and C++ headers, which is already a huge red flag, so who knows what else is going on.
IF you genuinely believe this is an issue with toml++, then first try compiling examples/simple_parser.cpp - if you get the same issue there, then sure, it's an issue with my library, but you need to rule it out with a known working sample first.
Also, in future: paste text, not screenshots. Screenshots are not searchable, you can't copy and paste from them, et cetera.

I don't know c++, now I can't tell which is the c header and the c++ header

I don't know c++

Then I can't help you. You shouldn't be making bug reports for libraries written in languages you don't know.


Update OpenShift version based on what minishift supports

minishift supports OpenShift version 3.10 and above.
What is the purpose of this change? What does it change?
It modifies the OpenShift version based on what minishift supports.
Was the change discussed in an issue?

How to test changes?

/ok-to-test

/approve

/lgtm


[Bug] LocalizedString not displaying in Release mode

Description
@maxkoshevoi, i encountered a strange bug. Before the LocalizedString was added to the nuget package i added it to my project and it worked well. But now i've updated to the latest pre, replaced it with the implementation from the nuget and my strings stopped displaying at all (ONLY IN RELEASE MODE). So then, again i copy pasted the LocalizedString from the source code (i assume it is the same as the one currently in the nuget package) and magically it started to work again.
Any ideas what can be the cause of such a strange behaviour? I'll create a repro if you didnt encounter this problem.

Are you using 1.1.0-pre1 or pre2? There is a bug in pre1 that is fixed in pre2.

Oh, it's only in release mode? That might be something new. Thanks for the report I'll take a look at it

@maxkoshevoi as i remember i tried both pre-releases. Yeap, the bug is indeed very strange

Not that strange. I think linker just removed Localized property since it thinks that it's not used.

Ah, yeah, forgot about the linker. I think so too

Strange. I cannot reproduce it. Could you please share release configuration of your app? Also, is it Android or iOS?

Tried on android only, i am using r8+d8, sdk assemblies only

Used those settings and everything still works.
Here's what I've tried: https://github.com/maxkoshevoi/XamarinCommunityToolkit/tree/1069-repro (demo app has LocalizedString on settings page)
Could you provide a repro steps / code please?

I'll provide a repro then - tomorrow or on monday, thanks for a quick reply

@maxkoshevoi  Here u are mate. As we thought, its a linker problem. Adding somewhere in code
Console.WriteLine(localizedstring.Localized)

is a quickfix for now
LocalizedStringBug.zip

Thanks for the pepro app! Yep, it's linker:

https://github.com/xamarin/XamarinCommunityToolkit/pull/1071 might fix it, but I was unable to verify it locally. When I created XCT NuGet locally and added it to the app, everything worked even without the fix.
Also I failed to figure out why it fails in your app, but doesn't fail in our demo app for example.

Possibly fixed in #1071


Option to force mp4 stream for 60fps YouTube videos.

Like title says. That would be nice :)

Unfortunately, if youtube does not have a 60fps mp4 version of the video on their servers, then h264ify can not request that format. Which videos are you seeing this problem with?


Install fails on rpi3 with OSMC

What are the steps to reproduce?
install fresh OSMC, install node-red
What happens?
I get an loop with
Node-RED is not yet fully installed Fetching Node-RED update.
I had errors with lxpanelctl not installed, /bin/ping was a symlink and the group gpio didn't exist.
Also the optional bcrypt dependency caused some errors.
But in the end it was just the if [[ $(which node-red) ]]; then what is failing. I can start it with running /opt/node/lib/node_modules/node-red/bin/node-red-pi
Please tell us about your environment:

[x] Node-RED version: 0.18.4
[x] node.js version: v8.10.0
[x] npm version: 5.6.0
[x] Platform/OS: OSMC 2018.02-1
[ ] Browser: /

Something about the PATH and /opt/node/lib/node_modules/ going wrong here?

How exactly are you installing node-red? What command are you running?

By OSMC, following a google search, I assume you mean https://osmc.tv/ ?
You'll have to give us some background on it - is it a full SD card image your download or something you install on top of Raspbian?
We don't have the bandwidth to support every possible image provided by other projects - but it should just be a case of identifying what dependencies are missing and ensuring they are satisfied.

I was trying to install with bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered) after I had a HARD TIME trying with docker (gave up on that one...)
Yep, it's a "normal" Debian with focus on running kodi:
osmc@osmc:~$ cat /proc/version
Linux version 4.14.15-5-osmc (root@vero3-db) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP PREEMPT Sun Mar 4 08:39:02 UTC 2018

a HARD TIME trying with docker (gave up on that one...)

I haven't seen a response to my questions on the issue you raised on the docker repo - https://github.com/node-red/node-red-docker/issues/67#issuecomment-372681212
If you want to run the dockerized version of NR on your Pi, you should just be able to run:
docker run -it -p 1880:1880 --name mynodered nodered/node-red-docker:rpi

You do not need to build the docker image from scratch.

I had errors with lxpanelctl not installed, /bin/ping was a symlink and the group gpio didn't exist.

The update script is intended for running on Raspbian. Clearly the OSMC image is different.
It may be easier to discuss on slack or the mailing list, where others in the community may be able to help out, rather than depend on the core development team.

Yep, sorry for opening two issues. Thought it's unrelated. Maybe also not worth fixing the install script for strange Debian packages. But adding a line to the Container versions sections how to run it with the quick start part could maybe save a lot of time for other docker newbs.
Thank you very much! I'm now cleaning up the mess I made and start playing with node-red! <3

No problem - glad you're making progress, and thanks for the feedback on the docker docs.

@Head - FWIW I just installed a clean SD card with OSMC, ssh in and ran the command line bash installer for Node-RED as the osmc user and it works  (almost) - enough to start and run.
It is missing make so it doesn't compile in a couple of nodes that are optional (Most notably serialport)
If this is required then
sudo apt-get install build-essential

then re-run the install.
I don't think we want to force people to have to have that if they don't want to so I'm going to leave it as-is for now.
(ok so it also doesn't show green ticks for \u2714 during install progress, but...)

You don't get the Pi GPIO nodes as the underlying libraries are not there - and don't seem to be in the osmc repo.


introduce haproxy errors (bsc#1080636)

when the velum database is initializing, show a static 503 page
Signed-off-by: Maximilian Meister<EMAIL_ADDRESS>depends on

https://github.com/kubic-project/caasp-container-manifests/pull/188
https://github.com/kubic-project/velum-branding/pull/6

ping @MaximilianMeister: it would be nice to have that inside of RC1

it would be nice to have that inside of RC1

@flavio i've created a branding package now, first of all to have kubic and caasp branded. once this is in the product i'll come back to this PR and fetch the static error page for haproxy from there.

Same comment as in kubic-project/caasp-container-manifests#188 (review)

@ereslibre updated

@ereslibre i still missed the haproxy manifest managed by salt ... please have another look

LGTM, can we get this merged?

i'll rebase it once more to make sure it still applies. last CI run has been a while

@MaximilianMeister  can we close this?

closing as outdated feel free to reopen


[7.x] No slashed SQS prefix when prefix ends with a hyphen or underscore

Goal: only set a slashed prefix when the prefix does not end with a hyphen or underscore.
Original commit on the slashed prefix: https://github.com/laravel/framework/commit/384897eda1821611488308a06df19ccf6f16116f
I can see why the trailing slash on the prefix works in a single queue/single environment (and to prevent a boatload of 400 bad requests on faulty urls)
Facing multiple queues on SQS together with multiple environments brings a challenge in the configuration and usage setup.
With this PR I would like to propose to not create a slashed prefix if one of the regular divider characters - and _ are at the end.
(AWS SQS naming docs at: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-quotas.html)
This will greatly improve the ease of adding multiple queues on a single SQS connection for multiple environments (instead of creating a bypass or passing full urls into jobs and workers)
Default scenario 1
SQS_PREFIX=https://sqs.eu-west-1.amazonaws.com/1337
Result: https://sqs.eu-west-1.amazonaws.com/1337/high
Default scenario 2
SQS_PREFIX=https://sqs.eu-west-1.amazonaws.com/1337/
Result: https://sqs.eu-west-1.amazonaws.com/1337/high
Current non-working scenario on a test-environment
SQS_PREFIX=https://sqs.eu-west-1.amazonaws.com/1337/test-
Result: https://sqs.eu-west-1.amazonaws.com/1337/test-/high <-- incorrect url
New scenario 1 on a test-environment
SQS_PREFIX=https://sqs.eu-west-1.amazonaws.com/1337/test-
Result: https://sqs.eu-west-1.amazonaws.com/1337/test-high
New scenario 2 on a test-environment
SQS_PREFIX=https://sqs.eu-west-1.amazonaws.com/1337/test_
Result: https://sqs.eu-west-1.amazonaws.com/1337/test_high
Feedback is more than welcome. Please let me know if I need to supply more details/examples or add to a certain test to validate this addition.

Has no tests.

Thanks for the feedback. Will submit another PR with tests.


Added My name.

Related issue

What changes does this PR do?
Screenshots (If any)
Questions

Hi. Thanks for approving my pull request.
But I cannot see my changes on eddie’s github.
Is there some issue on my end?
On Wed, 7 Sep 2022 at 8:25 PM, Shivam Sharma @.***>
wrote:

@.**** approved this pull request.
—
Reply to this email directly, view it on GitHub
https://github.com/EddieHubCommunity/hacktoberfest-practice/pull/1677#pullrequestreview-1099333006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AU5HIWHM5BIDDA2YWYDTSADV5CUGZANCNFSM6AAAAAAQGUVOEQ
.
You are receiving this because you were mentioned.Message ID:
<EddieHubCommunity/hacktoberfest-practice/pull/1677/review/1099333006@
github.com>

--
*Vansh Gandhi  *
B.Tech. CSE


Removed merge conflict marker in modern-events.md

LGTM, thanks @svick!
@BillWagner, do we need to add this and other topics in the series to the TOC? I have some other changes I have to make to the TOC and could do this too, if needed.

@mairaw Actually, I discovered this while preparing an issue about all the articles that are missing from TOC (there's quite a lot of them, several @BillWagner's series among them). I'll file that later today.


Add randomness to filename

If multiple solves are going at once, they all try to use the same files for model and solution

CC @tkelman

Yeah this is essentially the same issue as https://github.com/JuliaOpt/CoinOptServices.jl/issues/1, I didn't expect someone to be doing multiple simultaneous solves quite so quickly. If this package provides an API to provide a non-default write location for the files then maybe that's good enough if documented? I have been meaning to eventually switch to a randomized filename with default deletion when finished, unless a debug flag is set.

Yeah, I was just firing off a few different things all at once to check #6 was fixed, and suddenly they were all messing up! I think either of those are good enough solutions


ref #91949 create one dismissHandler with two param instead dismissHa…

…ndler and doneHandler

Run fastlane fix on the root directory (Simla) to run swiftlint / swiftformat tools


Release pep8 version that works with flake8?

I just installed flake8 via Macports, but it doesn't work:
$ flake8
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 651, in _build_master
    ws.require(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 952, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 844, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pep8 1.6.2 (/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages), Requirement.parse('pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7'), {'flake8'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/local/bin/flake8", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3084, in <module>
    @_call_aside
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
    f(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3097, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 653, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 666, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 839, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7' distribution was not found and is required by flake8

Can it be? Is the latest pep8 release really so broken that flake8 should flat-out refuse to do any work? Or is this flake8 being too strict about accepting not wanting to work with pep8 version 1.6.2?

This is a problem with macports. Installing flake8 from pip will install the correct versions. Complain to the macports maintainer for packaging pep8 and flake8 poorly. pep8 is working on a quality release that will fix the problems that cause flake8 to blacklist 1.6.0, 1.6.1, and 1.6.2. In an effort avoid adding 1.6.3 to that blacklist, we're not rushing to a release at the moment.


Adding tap gesture is disabling conflicting with tableview row selection?

leftTapGesture = UITapGestureRecognizer(target: self, action: #selector(self.toggleLeft))
leftTapGesture!.delegate = self
view.addGestureRecognizer(leftTapGesture!)

This code in SlidingMenuController is conflicting with TableView. For this particular code the didselectrow is not working rather it only behaving according to tap gesture toggle method.

same issue here.


new memory leak with large allocations in Dart 3.5.0

With this code:
import 'package:test/test.dart' show group, test;

void main() {

  group('testgroup', (){
    test('test', () {

      for (int i = 0; i < 1000; i++) {
        Stopwatch stopwatch = Stopwatch()
        ..start();
        List<int>.filled(5000000, 0);
        print('Test $i took ${stopwatch.elapsedMilliseconds} ms');
      }
    });
  });

In Dart 3.4.3, there is no leak. In Dart 3.5.0, there is a leak.

After clicking GC, memory settles around 4B in Dart 3.5.0
Memory is <200M in Dart 3.4.3
I understand that this is not good code. I boiled this down from actual code that was demonstrating the problem so that it would be easier to understand and report.
I also understand that there are ways to work-around this issue. I'm reporting this because there is unreferenced memory that is not being freed.
Running with:
dart --old_gen_heap_size=1024 run --pause-isolates-on-start --observe .\bin\leak.dart

It dies for me at run 58:
Exhausted heap space, trying to allocate 40000032 bytes.
00:01 +0 -1: testgroup test [E]

  Out of Memory

  dart:core-patch/array.dart 98:20                   new _List.filled
  bin\stack1.dart 9:9                                main.<fn>.<fn>
  package:test_api/src/backend/declarer.dart 215:19  Declarer.test.<fn>.<fn>
  dart:async/zone.dart 1407:47                       _rootRunUnary
  dart:async/zone.dart 1308:19                       _CustomZone.runUnary
  dart:async/future_impl.dart 163:18                 _FutureListener.handleValue
  dart:async/future_impl.dart 861:45                 Future._propagateToListeners.handleValueCallback
  dart:async/future_impl.dart 890:13                 Future._propagateToListeners
  dart:async/future_impl.dart 666:5                  Future._completeWithValue
  dart:async/zone.dart 1407:47                       _rootRunUnary
  dart:async/zone.dart 1308:19                       _CustomZone.runUnary
  dart:async/zone.dart 1399:13                       _rootRun
  dart:async/zone.dart 1301:19                       _CustomZone.run
  dart:async/zone.dart 1209:7                        _CustomZone.runGuarded
  dart:async/zone.dart 1249:23                       _CustomZone.bindCallbackGuarded.<fn>
  dart:async/schedule_microtask.dart 40:21           _microtaskLoop
  dart:async/schedule_microtask.dart 49:5            _startMicrotaskLoop
  dart:isolate-patch/isolate_patch.dart 118:13       _runPendingImmediateCallback
  dart:isolate-patch/timer_impl.dart 405:11          _Timer._runTimers
  dart:isolate-patch/timer_impl.dart 429:5           _Timer._handleMessage
  dart:isolate-patch/isolate_patch.dart 184:12       _RawReceivePort._handleMessage

So it does not seem like it wants to spend time on cleaning up even under pressure.
Same issue with: Dart SDK version: 3.6.0-122.0.dev (dev) (Tue Aug 6 13:03:05 2024 -0700) on "windows_x64"
If there have been recent GC changes concerning Old Space, I wonder if they could be summarized here?

//cc @rmacnak-google

Some more info:
This seems to only be reproducible when running with --observe.
And only if I have open the browser and look at the memory overview.
E.g. if running with: dart run --observe it runs normally with about 300MB memory consumption
Not sure if title should be changed?

This could be because of the change https://dart-review.googlesource.com/c/sdk/+/367440.
There is work in progress to address the memory consumption issue of making the object id strong here  https://github.com/dart-lang/sdk/issues/55869

@brenton-at-pieces can you clarify if you are using devtools or the old observatory to look at the memory overview ?

//cc @bkonyi @derekxu16

@a-siva (I have taken part of these observations)
I can at least reproduce the issue using DevTools using the Memory tab.

I've confirmed that this is only an issue when the Memory screen has been opened in DevTools due to some polling that's happening. I'm not sure why these lists aren't being GC'd since none of the polled service RPCs actually return object IDs for these lists, so we'll have to dig some more.

So the issue is related to the DevTools memory chart repeatedly polling getIsolate. See the example isolate response below:

In the returned Isolate's pauseEvent, there's a list of bound variables associated with the top frame of the isolate when the getIsolate() request was processed by the VM. Since the example code above is spending a lot of time in List.filled(...), the generated list is being captured in the list of bound variables. This results in an object ID being generated for the large list which, after https://dart-review.googlesource.com/c/sdk/+/367440, prevents the list from being GC'd until its object ID expires (e.g., after 8192 more object IDs are allocated). This happens frequently enough that enough unreferenced lists are kept alive that the VM runs out of memory with --max_old_gen_size=1024.
The DevTools memory chart code should be making use of the Isolate stream to track events that determine if an isolate is alive or not rather than polling (see here for where getIsolate() is polled). FYI @kenzieschmoll

This issue is now being tracked in https://github.com/flutter/devtools/issues/8180
Closing this issue,


The Paginator interface does not implement through method

Laravel Version
10.48.8
PHP Version
8.3.4
Database Driver & Version
mysql  Ver 8.3.0 for macos14.2 on arm64 (Homebrew)
Description
The paginate() method of the Illuminate\Database\Eloquent\Builder returns the interface LengthAwarePaginator, which implements the Paginator interface (also on master):
https://github.com/laravel/framework/blob/master/src/Illuminate/Contracts/Pagination/Paginator.php#L5
This interface does not implement the through() method, even though this is a part of AbstractPaginator. This causes my IDE to place red lines:
$pokemon = Pokemon::query()
      ->paginate(30)
      ->through(static fn (Pokemon $pokemon): PokemonData => PokemonData::fromModel($pokemon));

Undefined method 'through'.

Can we add this method to the Paginator interface to prevent these errors?
Steps To Reproduce
Paginate any model and call the through() method. It should work fine, but the IDE will give an error.

Heya, thanks for reporting.
If you notice improper DocBlock, PHPStan, or IDE warnings while using Laravel, do not create a GitHub issue. Instead, please submit a pull request to fix the problem. Also see our contribution guide.
Thanks!


Reference to SolrSearchService?

Any reason this line references SolrSearchService?
https://github.com/silverstripe-australia/silverstripe-elastica/blob/master/src/SilverStripe/Elastica/ResultList.php#L144

Seems to have been introduced in 67364beaffa358e0bd44b096869afe32d8cac5ea when bringing this more in line with Solr module. Perhaps a copy/paste regression ;)

CC/ @assertchris


Update to Peggy v3.0

Recently peggy had an update to version 3 with some new features, for which the actual vscode plugin shows errors.
Can you do a dependency update for the plugin?

Working on it.  Will leave this open to track progress.

Actually, I'd really like to wait for v3.0.1.  I'm looking at the last bug for that now.

https://github.com/peggyjs/peggy/issues/357 if you'd like to help or watch progress.

Thank you!


Extension support

Need the ability to write my own native APIs before the app starts. Not entirely familiar with delegates, so apologies in advanced if I done something silly!

Thank you!