Unimplemented x86 llvm intrinsic pcmpestrm128

When compiling hard-xml I noticed two warnings for a missing x86 llvm intrinsic pcmpestrm128:
warning: unsupported x86 llvm intrinsic llvm.x86.sse42.pcmpestri128; replacing with trap

Edit: And of course a huge thank you for your work and congratulations for getting it into rustup!

That is quite a complex intrinsic: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_cmpestri&ig_expand=939 I don't think I will get around implementing it in the next couple of days.

And of course a huge thank you for your work and congratulations for getting it into rustup!

:heart:

Implemented this using inline asm to directly call the original instruction over at https://github.com/rust-lang/rustc_codegen_cranelift/tree/more_simd_intrinsics

Thanks a lot, tested it and it works :)

A fix is available on the latest nightly.

So far I have been implementing new vendor intrinsics as people report them actually being used. There are a lot of them that basically nobody uses. Unless I know of a user to test it with, it is hard for me to be confident that I correctly implemented a intrinsic. If you find other unimplemented intrinsics that some program or library needs, please do let me know.


Not compatible with sliding pane template

Hi James,
Thanks for making this plugin!
There is an issue with Sliding Panes (Andy Matuschak Mode) Obsidian Plugin: Since sliding panes do not support (horizontal) splitting of notes, the mind map cannot be seen unless the main note is closed.
I don't know if there can be a fix for this (as it is an issue with the theme, and is still under consideration), but I wanted to report it anyway :).

Confirming this issue as well. Thanks.

I will add a setting to allow you to choose whether the new pane for the preview is a horizontal or vertical split. I've tested with a vertical split and this appears to work fine with the Sliding Panes plugin.

Setting is now in place in 1.0.1.


Adding experimental optimisation with gurobi (dependency needed) combinatorial optimization

IN PROGRESS - do not merge

Refactors morris_util
Add groups to brute force error solving issue #48

Awesome! If this is a similar optimization approach to Campolongo et al 07, feel free to merge it into master when you're done.
We'll have to figure out how to do optional dependencies. I'm sure there's a way.

Coverage increased (+0.97%) to 87.24% when pulling 08a73b9f3be17e87ee3a277185ad53ee76669736 on willu47:feat_gurobi into 742c1e9e6ae64ed49cc9ea32fc54e097f7cc4c9f on jdherman:experimental-methods.

Coverage increased (+0.97%) to 87.24% when pulling 7d426e5c27a0c4afaeb5eb9b683fae540158e59b on willu47:feat_gurobi into 742c1e9e6ae64ed49cc9ea32fc54e097f7cc4c9f on jdherman:experimental-methods.

Coverage increased (+0.97%) to 87.24% when pulling dc7d53b6e0922c09919a80809e5054bb84bbcb1d on willu47:feat_gurobi into 742c1e9e6ae64ed49cc9ea32fc54e097f7cc4c9f on jdherman:experimental-methods.

Coverage increased (+0.97%) to 87.24% when pulling dc7d53b6e0922c09919a80809e5054bb84bbcb1d on willu47:feat_gurobi into 742c1e9e6ae64ed49cc9ea32fc54e097f7cc4c9f on jdherman:experimental-methods.

Superseded by #51, which merges into master, rather than jdherman:experimental_methods


Add test parquet files without US location

sorry I missed this.
I think the validation would have passed even without localtion.
Thank you,


docs: readme and link updates

update readme with badges and revised summary paragraph
update gradle project links
bump java tools version

@setchy thank you so much!


Add setChatAdministratorCustomTitle method

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (d84aef8) to head (70c2244).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##              master       #36   +/-   ##
===========================================
  Coverage     100.00%   100.00%
- Complexity       993       999    +6
===========================================
  Files            220       221    +1
  Lines           3753      3769   +16
===========================================
+ Hits            3753      3769   +16

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Crashing On Linux

Crashing on Ubuntu 21.10, Worked Fine Before Update. @danielkrupinski

previuos issus is the same. this is duplicated!

Issue Is Fixed. Thanks!


Add doc.objectDidChange?

In addition to objectWillChange I often feel myself wanting an objectDidChange event. I know SwiftUI doesn't need it, but generally didChange events seems like the useful default. Does it make sense to add this event to doc. And also fire it outside the sync block so that document state can be read immediately when receiving the event?

There's nothing in the framework integration that use anything like this (ObservableObject is explicitly only a change signal, and 'objectWillChange), so if we were going to add our own "objectDidChange" equivalent kind of thing, I'd be very tempted to do something to include information about _what_ changed - the whole set of data from heads()` comes to mind. I haven't thought anything out on this front though, and don't have my own specific use case for what this is enabling.

so if we were going to add our own "objectDidChange" equivalent kind of thing, I'd be very tempted to do something to include information about what changed

That would be preferable to me, just more work. I guess it should include pre change and post change heads? Then later when #148 is available the listener will be able to generate the specific Patches for the change. That would be useful in many scenarios where the goal is to observer an Automerge.Document and process all changes.


WASM size

I was going to try Themis wasm, but libthemis.wasm file is huge. Even gzipped, it has roughly 1 MB. For a comparison, OpenPGP.js has roughly 100kb. Maybe there is a reason for that, but for simple E2EE, 1MB seems to be too much.

Themis doesn't implement any crypto primitives and uses openssl/boringssl/etc as crypto backends. For wasm themis uses BoringSSL and compiles themis library statically linked with boringssl to wasm library. Most of the final size is boringssl's code. Openpgp.js uses pure JS libraries and builtin JS Crypto API (that not calculated as additional size for library :)

Most of the final size is BoringSSL's code.

This is true. However, libthemis.wasm does not use all of BoringSSL yet it includes it in its entirety.
Unfortunately, at the moment WasmThemis build disables dead-code elimination at link time. Because of that, the resulting binary is much bigger than it could be. DCE is disabled to work around issues with the toolchain, as my attempts to enable link-time optimizations make Emscripten think that all of WasmThemis is dead code that must be eliminated, resulting in an empty WebAssembly module. Help would be appreciated.


Example for Alamofire and Realm

Hi, think the your framework would be used much more if you could provide an example how to use AlamofireObjectMapper with Realm.

Hi there, there is already an example of how to set up a Mappable model in the Read Me


Stop always summarizing DDS (because of blob aggregation)

Fix for # #9407
@agarwal-navin   do we need to do something to disable mc.config.getBoolean("FluidAggregateBlobs")   ?
@tyler-cai-microsoft  -  I'm working on #10014   and it seems that the fix on my end applies to #9407   as well.

I'd prefer to remove usage of BlobAggregationStorage  from container runtime as part of this change, to avoid any accidental enabling, as well as allow tree shaking drop all this unused code.

Fix for # #9407

You tagged the wrong issue. It's #9047.

Can we see a test of some sort here as well? An end-to-end test or a unit test?

@jatgarg is added to the review. #Closed

packages\test\test-end-to-end-tests\src\test\summaries.spec.ts seems to test the codepath I'm changing.

In reply to:<PHONE_NUMBER>


Feedly not syncing

Feedly Feeds do not get updated.
Status Says „updated 2 min ago“ but no articles come in.
Doing a Manual refresh provokes a „not allowed“ error.

What happens if you kill NetNewsWire and relaunch it?

Nothing different, articles still not synced.
Issue with the Feedly API?

Do you have a Mac? If so, can you please follow these instructions?

Connect your iOS device to your Mac.
If you are prompted to trust your Mac (and if you do trust it!) then please tap "Trust", disconnect your iOS device and re-connect it.
On your Mac, open Console.app.
Using Console.app, choose the iOS device connected to your Mac in the “Devices” section of the side bar on the left.
From the menu bar, click the “Action” menu.
Ensure “Include Info Messages” and “Include Debug” messages is checked.
In the search bar, type “Feedly”
On your connected iOS device, attempt to reproduce the alert.

Messages about the behaviour of the Feedly integration in NNW should be revealed in the Console as you use the Feedly account.

@FM-500 posted the comment above for you. This'd be really helpful if you can do it.

I had this exact issue, but relaunching the app DID fix the problem.

Do you have a Mac? If so, can you please follow these instructions?

Connect your iOS device to your Mac.
If you are prompted to trust your Mac (and if you do trust it!) then please tap "Trust", disconnect your iOS device and re-connect it.
On your Mac, open Console.app.
Using Console.app, choose the iOS device connected to your Mac in the “Devices” section of the side bar on the left.
From the menu bar, click the “Action” menu.
Ensure “Include Info Messages” and “Include Debug” messages is checked.
In the search bar, type “Feedly”
On your connected iOS device, attempt to reproduce the alert.

Messages about the behaviour of the Feedly integration in NNW should be revealed in the Console as you use the Feedly account.

debug	14:20:04.622590 +0200	NetNewsWire	Refreshing access token. debug	14:20:04.798063 +0200	trustd	replacing non ev reject score: 0 with non ev score: 10011117 <SecCertificatePathVC certs: <cert(0x103021400) s: *.feedly.com i: RapidSSL RSA CA 2018>, <cert(0x10301ac00) s: RapidSSL RSA CA 2018 i: DigiCert Global Root CA>, <cert(0x100d0ad60) s: DigiCert Global Root CA i: DigiCert Global Root CA> > debug	14:20:04.798298 +0200	trustd	completed: <SecCertificatePathVC certs: <cert(0x103021400) s: *.feedly.com i: RapidSSL RSA CA 2018>, <cert(0x10301ac00) s: RapidSSL RSA CA 2018 i: DigiCert Global Root CA>, <cert(0x100d0ad60) s: DigiCert Global Root CA i: DigiCert Global Root CA> > details: (         {     },         {     },         {     } ) result: 4 debug	14:20:05.024266 +0200	NetNewsWire	Starting sync 1A51CCF5-1C80-40C1-8336-6617B08B2F83 debug	14:20:05.024423 +0200	NetNewsWire	Sending article statuses... debug	14:20:05.492841 +0200	NetNewsWire	Done sending article statuses. debug	14:20:05.493289 +0200	NetNewsWire	Requesting collections. debug	14:20:05.803468 +0200	NetNewsWire	Received collections: <private>. debug	14:20:05.803982 +0200	NetNewsWire	Ensured 1 folders for 1 collections. debug	14:20:05.807965 +0200	NetNewsWire	Processing 33 feeds. debug	14:20:06.029560 +0200	NetNewsWire	Account.FeedlyIngestStreamArticleIdsOperation failed with error: Error Domain=RSWeb.TransportError Code=0 "Unauthorized". debug	14:20:06.030166 +0200	NetNewsWire	Sync took 1.490 seconds debug	14:20:06.031033 +0200	NetNewsWire	Cancelling sync 1A51CCF5-1C80-40C1-8336-6617B08B2F83 debug	14:20:12.925982 +0200	NetNewsWire	Starting sync A7100F43-401E-4C1E-9C5B-F027E20D623F debug	14:20:12.934489 +0200	NetNewsWire	Sending article statuses... debug	14:20:13.393941 +0200	NetNewsWire	Done sending article statuses. debug	14:20:13.394171 +0200	NetNewsWire	Requesting collections. debug	14:20:13.643623 +0200	NetNewsWire	Received collections: <private>. debug	14:20:13.644206 +0200	NetNewsWire	Ensured 1 folders for 1 collections. debug	14:20:13.648575 +0200	NetNewsWire	Processing 33 feeds. debug	14:20:13.875491 +0200	NetNewsWire	Account.FeedlyIngestStreamArticleIdsOperation failed with error: Error Domain=RSWeb.TransportError Code=0 "Unauthorized". debug	14:20:13.875729 +0200	NetNewsWire	Sync took 0.956 seconds debug	14:20:13.914489 +0200	NetNewsWire	Cancelling sync A7100F43-401E-4C1E-9C5B-F027E20D623F

Thanks so much for the Console output! Are you using a proxy server or is there something else uncommon about your network?

What’s interesting about this is that other requests seem to be working except for the ingest statuses operation.

@FM-500 do see feeds and folders in NNW from Feedly? The log above indicates you should.

No proxy or any special setups like firewall etc.
Just plain and simple router.
Actually, right now it IS syncing again.
I have deleted and re-added Feedly multiple times.
But the error still seems odd to me.
BTW: I’ve been able to get it working before, only to have the error come back a few days later.
Michael Freyler
07644 9234478 |<EMAIL_ADDRESS>Wagenstadter Weg 5 | 79341 Kenzingen
Am 11. Apr. 2020, 23:21 +0200 schrieb Kiel Gillard<EMAIL_ADDRESS>
What’s interesting about this is that other requests seem to be working except for the ingest statuses operation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Yep I do.
Michael Freyler
07644 9234478 |<EMAIL_ADDRESS>Wagenstadter Weg 5 | 79341 Kenzingen
Am 11. Apr. 2020, 23:22 +0200 schrieb Kiel Gillard<EMAIL_ADDRESS>
@FM-500 do see feeds and folders in NNW from Feedly? The log above indicates you should.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

For the next time the error happens — does temporarily switching from wi-fi to a cell network fix the problem?

I will keep that in mind. But restarting the app worked great for me this time. (It has happened twice, but not again since then.)
Eric
Eric Armstrong
Assoc. Professor
Dept. of Theatre
School of the Arts, Media, Performance and Design
York University
Toronto Canada.
email<EMAIL_ADDRESS>http://www.voiceguy.ca

On Apr 11, 2020, at 7:13 PM, Brent Simmons<EMAIL_ADDRESS>wrote:
For the next time the error happens — does temporarily switching from wi-fi to a cell network fix the problem?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/Ranchero-Software/NetNewsWire/issues/1966#issuecomment-612532565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHA3WK7C5PYUZUYFAERRP3RMD2SBANCNFSM4MAWNRCA.

Didn’t help either. I tried that before zu rule out WiFi problems.
Michael Freyler
07644 9234478 |<EMAIL_ADDRESS>Wagenstadter Weg 5 | 79341 Kenzingen
Am 12. Apr. 2020, 01:13 +0200 schrieb Brent Simmons<EMAIL_ADDRESS>
For the next time the error happens — does temporarily switching from wi-fi to a cell network fix the problem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

The changes in https://github.com/Ranchero-Software/NetNewsWire/pull/2091 may be relevant to this issue. I expect these changes to land in NNW for iOS version 5.0.2.
I'm still at a loss as to how to reproduce this.

The changes in #2091 may be relevant to this issue. I expect these changes to land in NNW for iOS version 5.0.2.
I'm still at a loss as to how to reproduce this.

Well, I must say, that the issue never appeared again after my last comment!
Maybe temporary issue either the Feedly API?

Strange but pleased to hear it! In that case, if it’s not an issue for you any more, do you mind if we close it?

Strange but pleased to hear it! In that case, if it’s not an issue for you any more, do you mind if we close it?

Right, no need to keep it open!

Thanks! Feel free to open it if the issue reoccurs.


Query : client-side result operators may cause extensive client-side evaluation for queries with GroupJoins (and/or optional navigations) in a subquery

query:
from o in context.Orders
where (
   from od in context.OrderDetails
   where o.Customer.Country == od.Order.Customer.Country
   select od).Distinct().Count() > 0
select o;

produces the following query plan:
TRACKED: True
(QueryContext queryContext) => IEnumerable<Order> _Select(
    source: IEnumerable<TransparentIdentifier<Order, Customer>> _Where(
        source: IEnumerable<TransparentIdentifier<Order, Customer>> _ShapedQuery(
            queryContext: queryContext,
            shaperCommandContext: SelectExpression:
                SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o.Customer].[CustomerID], [o.Customer].[Address], [o.Customer].[City], [o.Customer].[CompanyName], [o.Customer].[ContactName], [o.Customer].[ContactTitle], [o.Customer].[Country], [o.Customer].[Fax], [o.Customer].[Phone], [o.Customer].[PostalCode], [o.Customer].[Region]
                FROM [Orders] AS [o]
                LEFT JOIN [Customers] AS [o.Customer] ON [o].[CustomerID] = [o.Customer].[CustomerID]
                ORDER BY [o].[CustomerID]
            ,
            shaper: CompositeShaper`3
        )
        ,
        predicate: (TransparentIdentifier<Order, Customer> t1) => int Count(
            source: IEnumerable<ValueBuffer> Distinct(
                source: IEnumerable<ValueBuffer> _Select(
                    source: IEnumerable<TransparentIdentifier<TransparentIdentifier<ValueBuffer, ValueBuffer>, IEnumerable<Customer>>> _Where(
                        source: IEnumerable<TransparentIdentifier<TransparentIdentifier<ValueBuffer, ValueBuffer>, IEnumerable<Customer>>> _GroupJoin(
                            queryContext: (RelationalQueryContext) queryContext,
                            source: IEnumerable<ValueBuffer> _Query(
                                queryContext: queryContext,
                                shaperCommandContext: SelectExpression:
                                    SELECT [od.Order.Customer1].[CustomerID], [od.Order.Customer1].[Address], [od.Order.Customer1].[City], [od.Order.Customer1].[CompanyName], [od.Order.Customer1].[ContactName], [od.Order.Customer1].[ContactTitle], [od.Order.Customer1].[Country], [od.Order.Customer1].[Fax], [od.Order.Customer1].[Phone], [od.Order.Customer1].[PostalCode], [od.Order.Customer1].[Region]
                                    FROM [Order Details] AS [od0]
                                    INNER JOIN [Orders] AS [od.Order0] ON [od0].[OrderID] = [od.Order0].[OrderID]
                                    LEFT JOIN [Customers] AS [od.Order.Customer1] ON [od.Order0].[CustomerID] = [od.Order.Customer1].[CustomerID]
                                    ORDER BY [od.Order0].[CustomerID]
                                ,
                                queryIndex: default(System.Nullable`1[System.Int32])
                            )
                            ,
                            outerShaper: CompositeShaper`3,
                            innerShaper: BufferedOffsetEntityShaper<Customer>,
                            innerKeySelector: (Customer od.Order.Customer) => string GetValueFromEntity(
                                clrPropertyGetter: ClrPropertyGetter`2,
                                entity: od.Order.Customer
                            )
                            ,
                            resultSelector: (TransparentIdentifier<ValueBuffer, ValueBuffer> t0 | IEnumerable<Customer> od.Order.Customer_group) => TransparentIdentifier<TransparentIdentifier<ValueBuffer, ValueBuffer>, IEnumerable<Customer>> CreateTransparentIdentifier(
                                outer: t0,
                                inner: od.Order.Customer_group
                            )
                            ,
                            outerGroupJoinInclude: default(Internal.GroupJoinInclude),
                            innerGroupJoinInclude: default(Internal.GroupJoinInclude)
                        )
                        ,
                        predicate: (TransparentIdentifier<TransparentIdentifier<ValueBuffer, ValueBuffer>, IEnumerable<Customer>> t1) => (?t1.Inner.Country?) == (?od.Order.Customer.Country?)
                    )
                    ,
                    selector: (TransparentIdentifier<TransparentIdentifier<ValueBuffer, ValueBuffer>, IEnumerable<Customer>> t1) => t1.Outer.Outer
                )
            )
        )
         > 0
    )
    ,
    selector: (TransparentIdentifier<Order, Customer> t1) => t1.Outer
)

However, very similar query (Distinct swapped for Take):
from o in context.Orders
where (
   from od in context.OrderDetails
   where o.Customer.Country == od.Order.Customer.Country
   select od).Take(10).Count() > 0
select o;

produces much more effective query plan:
TRACKED: True
(QueryContext queryContext) => IEnumerable<Order> _Select(
    source: IEnumerable<TransparentIdentifier<Order, Customer>> _ShapedQuery(
        queryContext: queryContext,
        shaperCommandContext: SelectExpression:
            SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o.Customer].[CustomerID], [o.Customer].[Address], [o.Customer].[City], [o.Customer].[CompanyName], [o.Customer].[ContactName], [o.Customer].[ContactTitle], [o.Customer].[Country], [o.Customer].[Fax], [o.Customer].[Phone], [o.Customer].[PostalCode], [o.Customer].[Region]
            FROM [Orders] AS [o]
            LEFT JOIN [Customers] AS [o.Customer] ON [o].[CustomerID] = [o.Customer].[CustomerID]
            WHERE (
                SELECT COUNT(*)
                FROM (
                    SELECT TOP(10) [od.Order.Customer].[CustomerID], [od.Order.Customer].[Address], [od.Order.Customer].[City], [od.Order.Customer].[CompanyName], [od.Order.Customer].[ContactName], [od.Order.Customer].[ContactTitle], [od.Order.Customer].[Country], [od.Order.Customer].[Fax], [od.Order.Customer].[Phone], [od.Order.Customer].[PostalCode], [od.Order.Customer].[Region]
                    FROM [Order Details] AS [od]
                    INNER JOIN [Orders] AS [od.Order] ON [od].[OrderID] = [od.Order].[OrderID]
                    LEFT JOIN [Customers] AS [od.Order.Customer] ON [od.Order].[CustomerID] = [od.Order.Customer].[CustomerID]
                    WHERE ([o.Customer].[Country] = [od.Order.Customer].[Country]) OR ([o.Customer].[Country] IS NULL AND [od.Order.Customer].[Country] IS NULL)
                    ORDER BY [od.Order].[CustomerID]
                ) AS [t]
            ) > 0
            ORDER BY [o].[CustomerID]
        ,
        shaper: CompositeShaper`3
    )
    ,
    selector: (TransparentIdentifier<Order, Customer> t1) => t1.Outer
)

Problem here is that when we visit query model we optimize GroupJoins out (remove SelectMany-DefaultIfEmpty clauses that follow GroupJoin), however when we handle client-side result operator we do a second pass (on the already modified query model) and because the shape of query model is different, we fail to recognize the GroupJoin-SelectMany-DefaultIfEmpty pattern, which results in GroupJoin being performed on the client.
This issue was likely present before, but was exacerbated by https://github.com/aspnet/EntityFramework/issues/7348 (where we forced client evaluation on some result operators for GroupJoin scenarios)

Adding to 1.1.1 since we need to fix this before we can tackle https://github.com/aspnet/EntityFramework/issues/7290

@divega
Justification to include this in 1.1.1 release:
Impact: Medium. This is effectively the same issue as https://github.com/aspnet/EntityFramework/issues/7198, which is a breaking change introduced in 1.1.0 and was reported by a customer. Issue results is inefficient queries for simple cases and compilation errors for complex ones (no data corruption).
Risk: Low. Fix is local, we are undoing modifications to query model that we perform during query processing, if the same query model needs to be processed again (effectively “repairing” query model from it’s corrupted state)

fixed in c8d984e5b327a2fd57ca9f17f1a6015abc7d4953

This patch bug is approved. Please use the normal code review process w/ a PR and make sure the fix is in the correct branch, then close the bug and mark it as done.

✅ Verified


Start in home instead of root

The left file explorer shows the root folder when DataFinder is started. Instead it should show the home folder of the current user.
It is much more likely that the users chooses a file from there. This is valid for Linux and Windows.

The current solution seems to produce a crash on SUSE 42.1. We need to examine this.


XlaRuntimeError: INTERNAL: custom_partitioner: NameError: name 'fft' is not defined

Description
This issue is loosely related to #15680 and #16909 in that I am trying to run a three-dimensional FFT on a sharded three-dimensional grid. However, the bug(?) can be demonstrated from the code in the documentation on custom_partitioning.
The gist of the bug is that fft has to be explicitly imported via from jax.numpy.fft import fft when using the custom_partitioning example from the documentation. It is not enough to do import jax.numpy as jnp and then calling jnp.fft.fft.
Code that produces the error:
import os
import math

device_shape = (8,)
os.environ[
    "XLA_FLAGS"
] = f"--xla_force_host_platform_device_count={math.prod(device_shape)}"

import jax
import jax.numpy as jnp
from jax.sharding import NamedSharding
from jax.experimental.custom_partitioning import custom_partitioning
from jax.experimental.pjit import pjit
from jax.sharding import PartitionSpec as P
from jax.sharding import Mesh

# Note: Uncommenting the explicit import of fft fixes the bug
# from jax.numpy.fft import fft
import re
import numpy as np

# For an N-D input, keeps sharding along the first N-1 dimensions
# but replicate along the last dimension
def supported_sharding(sharding, shape):
    rank = len(shape.shape)
    max_shared_dims = min(len(sharding.spec), rank - 1)
    names = tuple(sharding.spec[:max_shared_dims]) + tuple(
        None for _ in range(rank - max_shared_dims)
    )
    return NamedSharding(sharding.mesh, P(*names))

def partition(mesh, arg_shapes, result_shape):
    result_shardings = jax.tree_map(lambda x: x.sharding, result_shape)
    arg_shardings = jax.tree_map(lambda x: x.sharding, arg_shapes)
    return (
        mesh,
        fft,
        supported_sharding(arg_shardings[0], arg_shapes[0]),
        (supported_sharding(arg_shardings[0], arg_shapes[0]),),
    )

def infer_sharding_from_operands(mesh, arg_shapes, result_shape):
    arg_shardings = jax.tree_map(lambda x: x.sharding, arg_shapes)
    return supported_sharding(arg_shardings[0], arg_shapes[0])

@custom_partitioning
def my_fft(x):
    # Note: Using jnp.fft.fft instead of fft
    # return fft(x)
    return jnp.fft.fft(x)

my_fft.def_partition(
    infer_sharding_from_operands=infer_sharding_from_operands, partition=partition
)

with Mesh(np.array(jax.devices()), ("x",)):
    x = np.asarray(np.random.randn(32 * 1024, 1024), dtype=np.complex64)
    y = pjit(lambda x: x, in_shardings=None, out_shardings=P("x"))(x)
    pjit_my_fft = pjit(my_fft, in_shardings=P("x"), out_shardings=P("x"))
    print(jnp.allclose(np.fft.fft(x), pjit_my_fft(y), atol=1e-4))

Running this script gives the error:
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1695387651.779556   29089 tfrt_cpu_pjrt_client.cc:349] TfrtCpuClient created.
No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
Traceback (most recent call last):
  File "/repo/bug-demo.py", line 63, in <module>
    print(jnp.allclose(np.fft.fft(x), pjit_my_fft(y), atol=1e-4))
                                      ^^^^^^^^^^^^^^
jaxlib.xla_extension.XlaRuntimeError: INTERNAL: custom_partitioner: NameError: name 'fft' is not defined

At:
  /repo/bug-demo.py(37): partition
  /repo/venv/lib/python3.11/site-packages/jax/experimental/custom_partitioning.py(148): _custom_partitioning_partition
  /repo/venv/lib/python3.11/site-packages/jax/_src/compiler.py(251): backend_compile
  /repo/venv/lib/python3.11/site-packages/jax/_src/profiler.py(314): wrapper
  /repo/venv/lib/python3.11/site-packages/jax/_src/compiler.py(289): compile_or_get_cached
  /repo/venv/lib/python3.11/site-packages/jax/_src/interpreters/pxla.py(2518): _cached_compilation
  /repo/venv/lib/python3.11/site-packages/jax/_src/interpreters/pxla.py(2611): from_hlo
  /repo/venv/lib/python3.11/site-packages/jax/_src/interpreters/pxla.py(2263): compile
  /repo/venv/lib/python3.11/site-packages/jax/_src/pjit.py(1134): _pjit_call_impl_python
  /repo/venv/lib/python3.11/site-packages/jax/_src/pjit.py(1198): call_impl_cache_miss
  /repo/venv/lib/python3.11/site-packages/jax/_src/pjit.py(1214): _pjit_call_impl
  /repo/venv/lib/python3.11/site-packages/jax/_src/core.py(821): process_primitive
  /repo/venv/lib/python3.11/site-packages/jax/_src/core.py(389): bind_with_trace
  /repo/venv/lib/python3.11/site-packages/jax/_src/core.py(2604): bind
  /repo/venv/lib/python3.11/site-packages/jax/_src/pjit.py(166): _python_pjit_helper
  /repo/venv/lib/python3.11/site-packages/jax/_src/pjit.py(255): cache_miss
  /repo/venv/lib/python3.11/site-packages/jax/_src/traceback_util.py(177): reraise_with_filtered_traceback
  /repo/bug-demo.py(63): <module>

--------------------
For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.

By uncommenting the line from jax.numpy.fft import fft the error disappears.
The code above is slightly altered from the code in the documentation. The changes are:

No import of regex.
Adding import jax.numpy as jnp, and replacing fft --> jnp.fft.fft.
Emulating 8 devices.
No output of the arrays nor checking of the HLO as done in the documentation.

I thought maybe that the commit baab7b1 addressed this issue, but when trying out the same changes locally I still got the same error.
What jax/jaxlib version are you using?
jax v0.4.16, jaxlib v0.4.16
Which accelerator(s) are you using?
CPU
Additional system info
Python 3.11.5, Linux
NVIDIA GPU info
No response

Hi,
I'm not sure I understand this issue and I never came across this in my FFT tests.
Isn't the issue just that in this code block:
def partition(mesh, arg_shapes, result_shape):
    result_shardings = jax.tree_map(lambda x: x.sharding, result_shape)
    arg_shardings = jax.tree_map(lambda x: x.sharding, arg_shapes)
    return (
        mesh,
        fft,
        supported_sharding(arg_shardings[0], arg_shapes[0]),
        (supported_sharding(arg_shardings[0], arg_shapes[0]),),
    )

you are specifying a fft function/variable that is nowhere defined?
If you would instead specify mesh, jnp.fft.fft, ... (so the same function you call inside my_fft) then I think the code should work as expected.

 I was so focused on the my_fft-part that I overlooked the rest of the example. Thanks a lot! :)


Implement contributors graph

Overview
This is the implementation of a requested feature: Contributors graph (#847)
It adds a new page next to the Activity page in the repository header and shows the contribution graphs over time since the repository existed. It also shows per user contribution graphs for top 100 contributors. Top 100 is calculated based on their number of commits.

Demo
https://github.com/go-gitea/gitea/assets/32161460/d4f1e27f-17cb-4def-a021-1a05b744fc30
Features:

Select contribution type (commits, additions or deletions)
See overall and per user contribution graphs for the selected contribution type
Zoom and pan on graphs to see them in detail
See top 100 contributors based on their number of commits
Go directly to users' profile by clicking their name if they are registered gitea users

Benchmarks:
Here are the loading time of the Contributors page for some repositories:

Gitea repository with ~15k commits:

Page: 17079ms
Template repo/contributors: 316ms

My test repo with ~400 commits (demo above):

Page: 169ms
Template repo/contributors: 1ms

Issues to consider before merging

For big repositories, page loading time increases dramatically. We might consider setting a cron job as @lunny mentioned which I have no idea how to do so.
Again, for big repositories, updating all charts at the same time (while zooming, panning etc.) might cause performance issues. I don't experience this on my computer but I didn't test it on a low end device.
When contribution type is changed by user, whole page is re-rendered causing fetching the same data again which is unnecessary. This can be easily avoided by passing only the selected option to Vue. But I don't know how to do it so I need help here.
Following issues are related with each other and likely to be fixed together (I need help to fix them):

When contribution type is changed by user, we probably need to sort per user graphs based on the selected contribution type and not commits (which is default).
When user zooms or pans the graphs, we need to update title of the page to show correct dates. Currently this is hard-coded. (From repository start date - To current date)
When user zooms or pans the graphs, we probably need to update statistics on per user graphs (x commits, y additions, z deletions) to account only commits from the selected date range. Currently, they are calculated from start date to end date and sorted by total commits.

I don't know how to handle the errors so you might see things like iDontCareAboutErrors, _ := someFunc() while reviewing the code :D We probably need to handle them correctly so please point me in the right direction.
Most of the code I wrote is taken from other places in this repository and modified to fit my needs. Sometimes I encountered permission related code and I didn't bother to implement proper permission check for this feature. So I just used them as is. All the permission related code is taken from Activity page. We probably need to change them and implement proper permission check.

Looks cool!
A little thing about the new Tab: We already have a few Tabs for the Repo, depending n what is activated. It might be a good Idea, to add a new Insights Tab like GitHub, where we put this and other stats, that may be added in the future, in. The ACtivity could also be moved in the Insights Tab.

Thank you for your contributions. It's amazing.
Since it sums per day, so we can run the cron job per day and store the result in some table. Then all the performance problems will disappear. Another possible improvement is to retrieve the data via AJAX so the UI will not be blocked to wait data.

It might be a good Idea, to add a new Insights Tab like GitHub...

@JakobDev yeah I agree. I didn't want to do that in this PR because it is out of scope and I was not sure if I can do it without breaking something :D With the changes in this PR, it is possible to create Code Frequency graph very easily. So someone might do that after creating Insights tab.
@lunny Actually, it doesn't sum per day but per week. The structure is very similar to Github's mentioned in here. Still we can set up a cron job to run per day for big repositories though.

I have implemented an endpoint to get commit data but then deleted it because I couldn't find a way to use it :D Retrieving the with an AJAX call makes sense. I will try that.

please dont forcepush it make's it hard to review :/
we do squashmerge in the end anyway

Based on the demo video, the graphs seem a bit too high. Should probably reduce their height to 50-60% of what they currently have.

Well and you might address the lint issues ... most of them are var renames

In terms of linters you just need to generate the swagger doc and commit it

Based on the demo video, the graphs seem a bit too high. Should probably reduce their height to 50-70% of what they currently have.

Reduced the height as per this comment. Currently it looks like this:

Issues left:

[ ] Code splitting
[ ] Showing date at the top
[ ] Updating date based on selected date range
[ ] Updating user contribution statistics and sorting the cards based on the selected date range

Instead of having a separate tab , doesn't it look better to embed it into Activity tab?

@yekanchi Yeah, this was suggested before: https://github.com/go-gitea/gitea/pull/25439#issuecomment-1602579606. It would be probably better to do it in another PR.

OK, unfortunately I can't proceed further as I don't have any Vue knowledge. These are still problem to me but I don't know how to fix them. If no one interested fixing them I think there is nothing left for me to add.
Also this "compliance / checks-backend" job is driving me nuts. First it says there is no new line at the end of templates/swagger/v1_json.tmpl then I add a new line. Now it still complains about swagger file telling me to run make generate-swagger and commit the file. The previous version (without newline at the end) was already result of make generate-swagger so I don't know what to do...

OK, unfortunately I can't proceed further as I don't have any Vue knowledge. These are still problem to me but I don't know how to fix them. If no one interested fixing them I think there is nothing left for me to add.
Also this "compliance / checks-backend" job is driving me nuts. First it says there is no new line at the end of templates/swagger/v1_json.tmpl then I add a new line. Now it still complains about swagger file telling me to run make generate-swagger and commit the file. The previous version (without newline at the end) was already result of make generate-swagger so I don't know what to do...

If you don't mind, I think some maintainers may be interested in continuing the work.

Yeah, no problem. I already checked "Allow edits from maintainers" box so any maintainer should have write access to my branch.

Instead of having a separate tab , doesn't it look better to embed it into Activity tab?

like this:

I adjusted the location of the contributors page, and now it looks like this:
https://github.com/go-gitea/gitea/assets/89133723/ba13248b-740c-47b8-b3da-d30ff7802ad4

Good work, thanks!
I don't see any commits pushed to my branch. Does that mean you will open another PR and this one won't be merged? @hiifong

Good work, thanks!
I don't see any commits pushed to my branch. Does that mean you will open another PR and this one won't be merged? @hiifong

You can merge this pr into your branch

@hiifong I just realized you removed some functionality while moving contributors page under activity tab. When I look at my test repo with your contribution, I see each contributor graph to have a different scale (i.e. highest value for each graph is different. Changing between 1 to 20 in my example) I think this makes them harder to compare.

If you didn't do this intentionally, I will convert to old functionality again.

@hiifong I just realized you removed some functionality while moving contributors page under activity tab. When I look at my test repo with your contribution, I see each contributor graph to have a different scale (i.e. highest value for each graph is different. Changing between 1 and 20 in my example) I think this makes them harder to compare. If you didn't do this intentionally, I will convert to old functionality again.

fix

@hiifong I just realized you removed some functionality while moving contributors page under activity tab. When I look at my test repo with your contribution, I see each contributor graph to have a different scale (i.e. highest value for each graph is different. Changing between 1 and 20 in my example) I think this makes them harder to compare. If you didn't do this intentionally, I will convert to old functionality again.

so i think it's fine now

@hiifong, In your reply you show top 4 contributors and the graph's max value is at 600k. The max value is calculated from overall contributor graph so that means there was a week which a given contribution type (probably additions or deletions) reached 600k overall. This 600k lines probably did not come from other contributors but top ones. Why the graphs look so small on each one of them? Something is weird...
Anyway, I think the best way is calculate the max value based on the selected date range* and among contributors* not from overall graph. This would be best of both worlds.
I won't merge https://github.com/sahinakkaya/gitea/pull/2 for now and wait for additional feedback from other people. Maybe they find this version better.

calculate the max value based on the selected date range* and among contributors* not from overall graph. This would be best of both worlds.

This is also what Github does too. They re-draw all the subgraphs based on the selected date range and subgraphs' max value is calculated by looking at most [contribution type], [within selected date range], [among all contributors]. And all the subgraphs share the same top value so they are easily comparable.

calculate the max value based on the selected date range* and among contributors* not from overall graph. This would be best of both worlds.

This is also what Github does too. They re-draw all the subgraphs based on the selected date range and subgraphs' max value is calculated by looking at most [contribution type], [within selected date range], [among all contributors]. And all the subgraphs share the same top value so they are easily comparable.

the time range options now need to be implemented

please resolve conflicts :)

How to edit this pr?

I resolved it.

Update: I feel like growing speed of this PR is slowly getting out of control :D It is already tagged with XXL so at this point I need a review from maintainers to decide what to do now.
Here is the current situation:

[ ] Code splitting (help please)
[x] Showing date at the top
[x] Updating date based on selected date range
[x] Updating user contribution statistics and sorting the cards based on the selected date range and contribution type

See the following demo for a quick heads up (notice how it sorts users based on the selected contribution type and updates the statistics correctly):
https://github.com/go-gitea/gitea/assets/32161460/bad6bfe7-9453-4fd5-a694-2d0cfb258804

"lint-templates" job is failing and it reports a problem with templates/package/view.tmpl file. But interestingly, git blame templates/package/view.tmpl does not show anything about me so I wonder how I am responsible for fixing that file 🤷♂

Well… For some reason your merge seems to have failed. It reverts recent changes in templates/package/view.tmpl on main.
Simply reverting the changes your PR makes to this file compared to main, so
git checkout <gitea main branch, not your main branch> -- templates/package/view.tmpl
git commit

, should help.

@delvh I have no idea why the merge failed because all the merges were automatic except a8d2a9c (which merges 254a82842 on to 3dcbba3a9). The conflict was at templates/repo/activity.tmpl file. I mistakenly overwrite the some changes then fixed my mistake at 3e156ab. I wrote this just to prove my innocence :D
Anyway, I fixed the linting error by doing what you suggested. You can start the compliance checks again and we can finally see all of them pass! :D

Erm… You didn't really do what I meant.
https://github.com/go-gitea/gitea/pull/25439/files#diff-c7430043f34a00a0c41c5b01f355af2efb5e0ba4e9f0557e8adfcb5dc662c6be still exists.
It shouldn't.

When these workflows will run again? Will I get a feedback on this PR?

@silverwind @lunny @delvh @6543 @yardenshoham

Nothing will be shown on a bigger repository.

@lunny You just need to give it a little bit of time to parse all the commits... We talked about setting up cron job for big repositories but I didn't implemented it. I thought someone more knowledgeable could easily add this after this is merged.

Maybe you should add a loading animation to indicate that it's not broken together with a little text that it can take a few Minutes on bigger Repos.

There it is:

There it is:

Can add our loading spinner as well. Just add class is-loading to a element.

I don't think this will lazy-load correctly because there is now await import boundary that webpack can chunk-split on. Not 100% sure how to properly do this for vue components, but there might be existing examples in the code already.

I don't think this will lazy-load correctly because there is now await import boundary that webpack can chunk-split on. Not 100% sure how to properly do this for vue components, but there might be existing examples in the code already.

I think I fixed it now. It should lazy load with 7e68c7c.

I updated my first comment on this PR with the latest changes. The demo is updated too. If you want to see the current situation, you can take a look.

Will give this a more through review and test soon.

Gave it a quick test, some findings:

Code splitting works 👍
The grey text at the axis is too low contrast, likely --color-text-light-2
The guidelines should not be black. Likely --color-secondary-alpha-50
The main graph still seems to high, maybe reduce height by another 50px?

OK, so it's been a while since I last worked on this. Now there are a lot commits and I am afraid to lose something while merging the main branch into mine. Any idea on how should I move forward? My questions:

Is it my responsibility to fix conflicts? Should I merge the main branch or leave it to the maintainers?
What are the key things to make sure this will be at least ready to reviewed again? (i.e. things that I need to be sure of before pushing my changes)

OK, so it's been a while since I last worked on this. Now there are a lot commits and I am afraid to lose something while merging the main branch into mine. Any idea on how should I move forward? My questions:
* Is it my responsibility to fix conflicts? Should I merge the main branch or leave it to the maintainers?

* What are the key things to make sure this will be at least ready to reviewed again? (i.e. things that I need to be sure of before pushing my changes)

Hi, you need to resolve the conflicts yourself or you can request maintainers' help.
I think at last comments, there are some changes request haven't been taken. Maybe you can continue from there. I would like to review this again.

Hi, you need to resolve the conflicts yourself or you can request maintainers' help. I think at last comments, there are some changes request haven't been taken. Maybe you can continue from there. I would like to review this again.

Last time I tried to fix merge conflicts I overwritten some changes made by others. I will try again, I hope this time I won't mess up anything. If I can't I will ask for help. After merging it I will look into the issues you described.

I merged main into my brach. Now I will look into requested changes. Please wait, this is still not ready to be reviewed.

I have finished working on this now. I guess it is ready to be reviewed again now.

Gave it a quick test, some findings:
...
I guess I can do a few of these styling tweaks myself on this branch later.

@silverwind, since you said you could work on the issues you mentioned, I didn't touch them. You can work on them now. I also @mentioned you in some of the conversations (since you said you can help). It would be great if you can help me resolving them.
@delvh, I also @mentioned you in some of the conversations. I need your opinion to move on them.

Not sure I can help on the backend topics, but I will definitely help one the frontend ones.

@lunny Did you have a chance to look at this again? I am waiting for reviews from maintainers.

@lunny Did you have a chance to look at this again? I am waiting for reviews from maintainers.

I will do it in following week.

tested it and it looks like the template did fall apart a bit - as the menues do not have text anymore :/

tested it and it looks like the template did fall apart a bit - as the menues do not have text anymore :/

Yeah, I just realized it. It looks like it happened after #27856. I don't know how to fix it though.

Will check this out in a few days.

I'm sorry I destroyed the PR by pushing my main branch onto it accidentially and we can not revive this PR now. I will open another PR with it.
Lessen for me: use git push sahinakkaya chart:main to push to differently named branch.
Lesson for sahinakkaya: Never raise a PR from a main branch.

Continue in https://github.com/go-gitea/gitea/pull/27880.

I'm sorry I destroyed the PR by pushing my main branch onto it accidentially and we can not revive this PR now. Let's continue in #27880.

Can't I force push my branch and continue to this as if nothing happened?

Lesson for sahinakkaya: Never raise a PR from a main branch.

Duly noted.

Can't I force push my branch and continue to this as if nothing happened?

Yes, try that. I was unable to force-push your branch again as the PR got closed, but you should be able to.

@silverwind I force pushed but I don't see my commits in this PR. Maybe it needs to be re-opened by maintainers if that's possible.

According to this it should be possible to reopen but I don't know if did the right thing. I just did git push -f which is force pushing my main branch to sahinakkaya:main

Hmm no, I can't reopen currently:

I think it's a GitHub bug or something, but I never seen a PR ressurect after resetting a branch.

If you like, push to a new branch name and make the PR from that.


Video player is no longer able to play videos

My video player no longer plays any videos.  It did two days ago and as of yesterday it stopped.  I thought it was because i was transitioning some of my assets to firebase but that is not the case.  I am using appcenter to push the application to a couple of phones.  The phones have not had a new push in three days and the video player still works on them.
Steps to Reproduce
I have created a brand new project.  I have copied the video player example on flutter site.  I have tried this on android and ios.  On android simulator using vscode on a windows machine  i am receiving the following error:
The following assertion was thrown building FutureBuilder<void>(state:
I/flutter (13852): _FutureBuilderState<void>#26252):
I/flutter (13852): 'package:flutter/src/rendering/proxy_box.dart': Failed assertion: line 398 pos 15: 'aspectRatio >
I/flutter (13852): 0.0': is not true.
I/flutter (13852):
I/flutter (13852): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (13852): more information in this error message to help you determine and fix the underlying cause.
I/flutter (13852): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (13852):   https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (13852):
I/flutter (13852): Widget creation tracking is currently disabled. Enabling it enables improved error messages. It can
I/flutter (13852): be enabled by passing `--track-widget-creation` to `flutter run` or `flutter test`.
I/flutter (13852):
I/flutter (13852): When the exception was thrown, this was the stack:
I/flutter (13852): #2      new RenderAspectRatio (package:flutter/src/rendering/proxy_box.dart:398:15)
I/flutter (13852): #3      AspectRatio.createRenderObject (package:flutter/src/widgets/basic.dart:2673:65)
I/flutter (13852): #4      RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4749:28)
I/flutter (13852): #5      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5126:11)
I/flutter (13852): #6      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (13852): #7      Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (13852): #8      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (13852): #9      Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (13852): #10     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2348:33)
I/flutter (13852): #11     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:760:20)
I/flutter (13852): #12     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:280:5)
I/flutter (13852): #13     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1033:15)
I/flutter (13852): #14     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:975:9)
I/flutter (13852): #15     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:891:5)
I/flutter (13852): #19     _invoke (dart:ui/hooks.dart:249:10)
I/flutter (13852): #20     _drawFrame (dart:ui/hooks.dart:207:3)
I/flutter (13852): (elided 5 frames from class _AssertionError and package dart:async)
I/flutter (13852):
I/flutter (13852): ════════════════════════════════════════════════════════════════════════════════════════════════════

On ios simulator  using vscode on a mac, the application crashed with the following error:
***
First throw call stack:
(
        0   CoreFoundation                      0x00007fff23baa1ee __exceptionPreprocess + 350
        1   libobjc.A.dylib                     0x00007fff50864b20 objc_exception_throw + 48
        2   Foundation                          0x00007fff256d3466 -[NSURL(NSURL) initFileURLWithPath:] + 575
        3   Foundation                          0x00007fff256d3c24 +[NSURL(NSURL) fileURLWithPath:] + 45
        4   Runner                              0x0000000106f2d03f -[FLTVideoPlayer initWithAsset:frameUpdater:] + 191
        5   Runner                              0x0000000106f3131d -[FLTVideoPlayerPlugin handleMethodCall:result:] + 1581
        6   Flutter                             0x0000000107cc04fd __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
        7   Flutter                             0x0000000107c59ec0 _ZNK7flutter21PlatformMessageRouter21HandlePlatform<…>

Code
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

class VideoPlayerScreen extends StatefulWidget {
  @override
  _VideoPlayerScreen createState() => _VideoPlayerScreen();
}

class _VideoPlayerScreen extends State<VideoPlayerScreen> {
  VideoPlayerController _controller;
  Future<void> _initialVideoPlayer;

  @override
  void initState(){
    _controller = VideoPlayerController.network('https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4');
    _initialVideoPlayer = _controller.initialize();
    super.initState();
  }

  @override
  void dispose(){
    _controller.dispose();

    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Video Player'),
      ),
      body: FutureBuilder(
        future: _initialVideoPlayer,
        builder: (context, snapshot){
          if(snapshot.connectionState == ConnectionState.done){
            return AspectRatio(
              aspectRatio: _controller.value.aspectRatio,
              child: VideoPlayer(_controller),
            );
          } else {
            return Center(child: CircularProgressIndicator());
          }
        },
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          // Wrap the play or pause in a call to `setState`. This ensures the
          // correct icon is shown.
          setState(() {
            // If the video is playing, pause it.
            if (_controller.value.isPlaying) {
              _controller.pause();
            } else {
              // If the video is paused, play it.
              _controller.play();
            }
          });
        },
        // Display the correct icon depending on the state of the player.
        child: Icon(
          _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
        ),
      ),
    );
  }
}

Logs

Pasting the error instead of everything before as this was just logs of the application starting.  If you want those logs i will paste them in as well but considering this is a fresh project duplicated from the above mentioned site you can easily reproduce it.
[+21245 ms] W/est_videoplaye(14474): Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (greylist, reflection, allowed)
[   +8 ms] I/ExoPlayerImpl(14474): Init b9f4e8e [ExoPlayerLib/2.9.6] [generic_x86, Android SDK built for x86, Google, 29]
[  +77 ms] D/NetworkSecurityConfig(14474): No Network Security Config specified, using platform default
[ +301 ms] I/OMXClient(14474): IOmx service obtained
[   +2 ms] I/ACodec  (14474): codec does not support config priority (err -2147483648)
[  +44 ms] I/ACodec  (14474): codec does not support config operating rate (err -2147483648)
[ +134 ms] I/flutter (14474): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
[        ] I/flutter (14474): The following assertion was thrown building FutureBuilder<void>(state:
[        ] I/flutter (14474): _FutureBuilderState<void>#0f0f0):
[        ] I/flutter (14474): 'package:flutter/src/rendering/proxy_box.dart': Failed assertion: line 398 pos 15: 'aspectRatio >
[        ] I/flutter (14474): 0.0': is not true.
[  +27 ms] I/flutter (14474):
[        ] I/flutter (14474): Either the assertion indicates an error in the framework itself, or we should provide substantially
[        ] I/flutter (14474): more information in this error message to help you determine and fix the underlying cause.
[        ] I/flutter (14474): In either case, please report this assertion by filing a bug on GitHub:
[        ] I/flutter (14474):   https://github.com/flutter/flutter/issues/new?template=BUG.md
[        ] I/flutter (14474):
[        ] I/flutter (14474): Widget creation tracking is currently disabled. Enabling it enables improved error messages. It can
[        ] I/flutter (14474): be enabled by passing `--track-widget-creation` to `flutter run` or `flutter test`.
[        ] I/flutter (14474):
[        ] I/flutter (14474): When the exception was thrown, this was the stack:
[        ] I/flutter (14474): #2      new RenderAspectRatio (package:flutter/src/rendering/proxy_box.dart:398:15)
[        ] I/flutter (14474): #3      AspectRatio.createRenderObject (package:flutter/src/widgets/basic.dart:2673:65)
[        ] I/flutter (14474): #4      RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4749:28)
[  +24 ms] I/flutter (14474): #5      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5126:11)
[        ] I/flutter (14474): #6      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
[        ] I/flutter (14474): #7      Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
[        ] I/flutter (14474): #8      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
[        ] I/flutter (14474): #9      Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
[        ] I/flutter (14474): #10     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2348:33)
[  +21 ms] I/flutter (14474): #11     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:760:20)
[        ] I/flutter (14474): #12     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:280:5)
[        ] I/flutter (14474): #13     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1033:15)
[        ] I/flutter (14474): #14     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:975:9)
[        ] I/flutter (14474): #15     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:891:5)
[        ] I/flutter (14474): #19     _invoke (dart:ui/hooks.dart:249:10)
[        ] I/flutter (14474): #20     _drawFrame (dart:ui/hooks.dart:207:3)
[        ] I/flutter (14474): (elided 5 frames from class _AssertionError and package dart:async)
[        ] I/flutter (14474):
[        ] I/flutter (14474): ════════════════════════════════════════════════════════════════════════════════════════════════════

Analyzing test_videoplayer...
No issues found! (ran in 13.1s)

[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.418], locale en-CA)
    • Flutter version 1.9.1+hotfix.6 at C:\flutter
    • Framework revision 68587a0916 (7 weeks ago), 2019-09-13 19:46:58 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\serbs\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_SDK_ROOT = C:\Users\serbs\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[!] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.39.2)
    • VS Code at C:\Users\serbs\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.5.1

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

Let me know if there is anything needed.  Thank you!

if i change out the AspectRatio widget to a Container with a fixed size like in the code below:
child: Container(
                height: 225.0,
                width: 400.0,
                child: VideoPlayer(_controller),
              ),

I get the following error:
I/ExoPlayerImpl(18643): Release 2063ecb [ExoPlayerLib/2.9.6] [generic_x86, Android SDK built for x86, Google, 29] [goog.exo.core]
I/ExoPlayerImpl(18643): Init cfd2e8b [ExoPlayerLib/2.9.6] [generic_x86, Android SDK built for x86, Google, 29]
I/OMXClient(18643): IOmx service obtained
I/ACodec  (18643): codec does not support config priority (err -2147483648)
I/ACodec  (18643): codec does not support config operating rate (err -2147483648)
D/AudioTrack(18643): getTimestamp_l(57): device stall time corrected using current time<PHONE_NUMBER>8840
W/AudioTrack(18643): getTimestamp_l(57): retrograde timestamp time corrected,<PHONE_NUMBER>2240 <<PHONE_NUMBER>7340
D/AudioTrack(18643): stop(57): called with 361472 frames delivered

I have confirmed the video player is still working on my iPhone, unfortunately i am unable to test on a real world android device.  The android simulator had worked up until last night.  I have noticed on the video player plugin site it does say the ios simulator wont work.

@milano23 Thank you for the report! I can run your example (and the example from flutter.dev) on the same stable and android 10 emulator without crashes, but with having logs
I/ExoPlayerImpl( 5274): Release 271b46e [ExoPlayerLib/2.9.6] [generic_x86_64, Android SDK built for x86_64, Google, 29] [goog.exo.core]
D/SurfaceUtils( 5274): disconnecting from surface 0x76c584933010, reason disconnectFromSurface
I/ExoPlayerImpl( 5274): Init 2a87f2e [ExoPlayerLib/2.9.6] [generic_x86_64, Android SDK built for x86_64, Google, 29]
I/OMXClient( 5274): IOmx service obtained
D/SurfaceUtils( 5274): connecting to surface 0x76c5d4b30010, reason connectToSurface
I/MediaCodec( 5274): [OMX.google.h264.decoder] setting surface generation to 5400578
D/SurfaceUtils( 5274): disconnecting from surface 0x76c5d4b30010, reason connectToSurface(reconnect)
D/SurfaceUtils( 5274): connecting to surface 0x76c5d4b30010, reason connectToSurface(reconnect)
E/ACodec  ( 5274): [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
I/ACodec  ( 5274): codec does not support config priority (err -1010)
I/OMXClient( 5274): IOmx service obtained
D/MediaCodec( 5274): [OMX.google.h264.decoder] setting dataspace on output surface to #104
I/ACodec  ( 5274): codec does not support config priority (err -2147483648)
I/ACodec  ( 5274): codec does not support config operating rate (err -2147483648)
D/SoftwareRenderer( 5274): setting dataspace on output surface to #104
D/AudioTrack( 5274): getTimestamp_l(10): device stall time corrected using current time<PHONE_NUMBER>87

Interesting that I don't get that stop(57) and the app continue to work just fine.

@BondarenkoStas Hello, thank you for looking into this.  The two emulators i have tried are Pixel 3 API29 and Android Accelerated x86 Oreo.  The Oreo one has always given me issues but the Pixel 3 emulator has worked fine up until now.  I have been coding with this emulator for a couple weeks with the video player plugin but only recently had issue.  I have downloaded the Pixel 3a XL emulator and can confirm it is working.  Strange that both other emulators would stop working.  Again thanks for looking into this.  Looks like there is no issue after all.


Provide a straightforward way to burn another drive without having to restart the program

As a note, we should extend this new screen to notify the user that he can eject the drive without needing to safely remove from the operating system (that's already done by the app).


React Types

Fixes a bug of missing react typings

Coverage remained the same at 79.954% when pulling 32cbd4f7cc22acb8efbc034cb06317a6d4eae262 on feature/react-types into 6b8fd05f744c2e28a197a7c095f1b3c88d6671f4 on develop.


AssertionError: Can't parse version f347d7e when trying to install

Issue summary
pip3 install -e . Resulting in AssertionError: Can't parse version f347d7e
System information

Arch Linux
Python 3.7.11
Up to Date

    ERROR: Command errored out with exit status 1:
     command: /home/becaree/.local/share/virtualenvs/retro-bMGbzfbw/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/opt/retro/roms/retro/setup.py'"'"'; __file__='"'"'/opt/retro/roms/retro/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ruj3j2zo
         cwd: /opt/retro/roms/retro/
    Complete output (35 lines):
    /opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/version.py:62: UserWarning: tag 'f347d7e' no version found
      warnings.warn(f"tag {tag!r} no version found")
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/opt/retro/roms/retro/setup.py", line 96, in <module>
        **kwargs
      File "/home/becaree/.local/share/virtualenvs/retro-bMGbzfbw/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/home/becaree/.pyenv/versions/3.7.11/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/becaree/.local/share/virtualenvs/retro-bMGbzfbw/lib/python3.7/site-packages/setuptools/dist.py", line 456, in __init__
        k: v for k, v in attrs.items()
      File "/home/becaree/.pyenv/versions/3.7.11/lib/python3.7/distutils/dist.py", line 292, in __init__
        self.finalize_options()
      File "/home/becaree/.local/share/virtualenvs/retro-bMGbzfbw/lib/python3.7/site-packages/setuptools/dist.py", line 807, in finalize_options
        ep(self)
      File "/home/becaree/.local/share/virtualenvs/retro-bMGbzfbw/lib/python3.7/site-packages/setuptools/dist.py", line 814, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/integration.py", line 65, in version_keyword
        dist.metadata.version = _get_version(config)
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/__init__.py", line 177, in _get_version
        parsed_version = _do_parse(config)
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/__init__.py", line 128, in _do_parse
        version = _version_from_entrypoints(config) or _version_from_entrypoints(
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/__init__.py", line 69, in _version_from_entrypoints
        version = _call_entrypoint_fn(root, config, ep.load())
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/__init__.py", line 48, in _call_entrypoint_fn
        return fn(root, config=config)
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/git.py", line 136, in parse
        config, wd, describe_command=describe_command, pre_parse=pre_parse
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/git.py", line 177, in _git_parse_inner
        config=config,
      File "/opt/retro/roms/retro/.eggs/setuptools_scm-6.3.2-py3.7.egg/setuptools_scm/version.py", line 188, in meta
        assert parsed_version is not None, "Can't parse version %s" % tag
    AssertionError: Can't parse version f347d7e
    ----------------------------------------
WARNING: Discarding file:///opt/retro/roms/retro. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Same issue on arch 5.14.12, python 3.8.10

Same problem on my PR

Will there be any updates on this?


iOS Amplify S3 UploadFile Error when App is in background

My app upload files to S3 for every 15 min.  When application is in foreground, the files get uploaded properly. But when app went to background, the upload is too slow and keep throwing error.  after so many retry, one file get uploaded successfully.
I keep getting any one of this 3 error
Error 1:
StorageError: Unexpected error occurred with message: Domain: [NSURLErrorDomain
Code: [-1001
LocalizedDescription: [The operation couldn’t be completed. (NSURLErrorDomain error -1001.)
LocalizedFailureReason: [
LocalizedRecoverySuggestion: [
Recovery suggestion: This should not happen. There is a possibility that there is a bug if this error persists. Please take a look at https://github.com/aws-amplify/amplify-ios/issues to see if there are any existing issues that match your scenario, and file an issue with the details of the bug if there isn't. Issue encountered at:
file: /.../SourcePackages/checkouts/amplify-ios/Amplify/Categories/Storage/Error/StorageError.swift
function: recoverySuggestion
line: 63
Error 2:
StorageError: Unexpected error occurred with message: Domain: [Amplify.AuthError
Code: [1
LocalizedDescription: [The operation couldn’t be completed. (Amplify.AuthError error 1.)
LocalizedFailureReason: [
LocalizedRecoverySuggestion: [
Recovery suggestion: This should not happen. There is a possibility that there is a bug if this error persists. Please take a look at https://github.com/aws-amplify/amplify-ios/issues to see if there are any existing issues that match your scenario, and file an issue with the details of the bug if there isn't. Issue encountered at:
file: /.../SourcePackages/checkouts/amplify-ios/Amplify/Categories/Storage/Error/StorageError.swift
function: recoverySuggestion
line: 63
Error 3:
StorageError: A network error occured while trying to fetch identity id
Recovery suggestion: Try again with exponential backoff
Caused by:
AuthError: A network error occured while trying to fetch identity id
Recovery suggestion: Try again with exponential backoff
Caused by:
network
Code:

In AmplifyMgr:
/** Sign In User using Cognito auth before uploading the file **/
  func signIn (username: String, password: String) {

    Amplify.Auth.signIn(username: username, password: password) { result in
        switch result {
        case .success(let signInResult):
            if case .done = signInResult.nextStep {
                print("\(#function): Sign in succeeded")
                self.getUserToken()
            }
            else {
                self.processSignInNextStep(username: username, nextStep: signInResult.nextStep)
            }
        case .failure(let error):
            let errMsg = "Sign in failed - \(error)"
            print("\(#function): \(errMsg)")
            self.signedInError(errorMsg: errMsg)
        }
    }
}

func uploadFile (_ fileUrl: URL) {
    Amplify.Storage.uploadFile (key: fileUrl.lastPathComponent,
                                local: fileUrl,
                                resultListener: { event in
                                    switch event {
                                    case .success(let data):
                                        print("\(#function): \(fileUrl.lastPathComponent) is uploaded - \(data)")
                                        self.uploadCompletionHandler(fileUrl)
                                    case .failure(let storageError):
                                        print("\(#function): Error uploading file \(fileUrl.lastPathComponent) - \(storageError)")
                                        self.uploadErrorHandler(fileUrl)
                                    }

                                    DispatchQueue.main.async {
                                        if (nil != self.backgroundURLCompletionHandler) {
                                            print("\(#function): Background URL Session Completion Handler Called")
                                            self.backgroundURLCompletionHandler!()
                                            self.backgroundURLCompletionHandler = nil
                                        }
                                    }
                                }
    )

    print("\(#function): Upload called")
}

In AppDelegate:
func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {

    print ("handleEventsForBackgroundURLSession called")
    if (UserDefaults.standard.bool(forKey: AWAITING_UPLOAD_RESP)) {
        amplifyMgr.backgroundURLCompletionHandler = completionHandler
    }
    else {
        print("\(#function): Completion Handler Called")
        completionHandler()
    }
}

I have used swift package of Amplify for my project, other settings are done as per the getting started documentation.

Any help.. I am stuck with problem.

Notes for @aws-amplify/ios-team :

This seems to be related to token expiry once the download task is handed off to iOS. In that case, this behavior is expected. Possible remedy would be to rework the way we manage URL tasks and cancel/re-submit a task once the token is expired
We still don't have a good story for long-running transfers. If a single transfer takes longer than 1 hour to complete, it will fail unless the customer is using static credentials to create the presigned URL. This is covered under an existing feature request.
We fix/enhance the error message for the error cases relating to auth token expiry for background tasks

Based on these items, the next steps are:

Investigate to validate the above assumptions
Add a new issue to improve error messaging
Close this issue as a dupe of the open feature request for long-running transfers

Closing as a duplicate.
https://github.com/aws-amplify/amplify-ios/issues/638


Avoid casting Infinity to double for Spark backend

What happens?
Casting Infinity to double fails for spark backend.
This issue existed in Splink 3.8.5, referenced in #1209, and was fixed rather trivially there. However, this change has not been ported to Splink 4.
To Reproduce
From #1209:
tests/test_charts.py::test_m_u_charts translated to Spark dialect yields this error.
OS:
Mac OS
Splink version:
4.0.0
Have you tried this on the latest master branch?

[X] I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

[X] I agree

Duplicate of #2368, my original issue.


option<const T&> and sentinels broken

Hi,
I've been trying to replace my current implementation (Optional26 with local sentinel based overloads) with this one, but I've run into several issues that make it unusable:
The range support doesn't seem to be properly implementation for (const) references. Trying to use it simply doesn't compile. This seems to be related to these parts:
using value_type = std::remove_cv_t<T>; using reference = T&;  using difference_type = std::ptrdiff_t; using pointer = T*;
Which I believe should look like this:
using value_type = std::remove_reference_t<T>; using reference = value_type&; using difference_type = std::ptrdiff_t; using pointer = value_type*;
As it needs to respect constness (because the const_iterator relies on T being specified as a const type). And when T is a reference T* ends up being a &* which is not correct.
The second problem I ran into is when I have a type that has a single field of type uint64_t, for which I specific the max-value to be the sentinel value using an opt::option_traits overload. And I then construct the option from the sentinel value, an assert is fired because the constructor expects has_value to be true, which is not a correct assertions for this specific case.

Hey!
Your first issue should be fixed in b58df5da69944c5ffbbb3e1a9f22120394589529.
For the second one, I think your implementation of opt::option_traits is incorrect. From your words, it should be something like this:
template<>
struct opt::option_traits<your_type> {
    static constexpr std::uintmax_t max_level = 1;
    static constexpr std::uintmax_t get_level(const your_type* value) noexcept {
        return value->that_field - std::numeric_limits<uint64_t>::max();
    }
    static constexpr void set_level(your_type* value, [[maybe_unused]] std::uintmax_t level) noexcept {
        value->that_field = std::numeric_limits<uint64_t>::max();
    }
};

For more information you can always check opt::option_traits documentation and custom opt::option_traits guide.
If that still doesn't help, you can disable internal asserts by defining preprocessor macro OPTION_VERIFY (e.g. #define OPTION_VERIFY(expr, msg)) (for more, see OPTION_VERIFY documentation) and check if your program works fine without safeguards.
If I have solved your problems, I can release v1.3.1, which will include fix for your first problem. Thanks for submitting!

I believe your fix will still fail on const refs.
My option_traits is equivalent to yours. I already def-ed out the assert and my software behaves correctly since.
The verify asserts engaged() when constructing from value. To me it seems obvious this won't hold up when the value in question is the one I use to represent non-engagement.

I think what are you trying to do is something like this:
my_val.field != std::numeric_limits<std::uint64_t>::max() ? opt::option{my_val} : opt::none;

The opt::option after construction should always be an engaged one (except for default and from opt::none_t constructors), so you cannot initialize an opt::option in an empty state using the sentinel value.
Perhaps there should be a function/constructor to account for these cases? (couldn't think of a name, though).
About your first issue, I don't see how that could happen. Could you describe it more?

Hi, didn't have access to my codebase before, so couldn't verify.

I think what are you trying to do is something like this:
my_val.field != std::numeric_limits<std::uint64_t>::max() ? opt::option{my_val} : opt::none;

The opt::option after construction should always be an engaged one (except for default and from opt::none_t constructors), so you cannot initialize an opt::option in an empty state using the sentinel value.
Perhaps there should be a function/constructor to account for these cases? (couldn't think of a name, though).

That's basically it, yes. Maybe I should elaborate a bit on the context. Originally I had built an api that hands out "Entities", which are represented by a uint64_t. I wrapped this in an Entity type that supports a public static const field nullValue (and bool operator). I wasn't happy with this, because it has sort of the same semantic ambiguity as pointers do (do I need to check it or not). So I made an optional overload for Entities that only stores an Entity and uses nullValue (and the bool operator) for dealing with engagement.
Because passing in the empty value is a legitimate way of empty initialisation in my implementation. I could actually just use the optional as a drop in replacement at the boundaries of my API and it just worked.
Now from what I understand this is undesirable for your implementation. I guess when you have an actual multi-level type, doing what I'm doing can lead to undesired behaviour.
I will just keep the OPTION_VERIFY overridden for now. And possibly correct the implementation if I decide to stick with this implementation (I like it, but I'm a little concerned about potential UB and platform dependence).

About your first issue, I don't see how that could happen. Could you describe it more?

I took in your dev branch just now and the const refs seem to compile fine now.
So I have no further issues.

@BjornSAIM Glad I could help you.

I will just keep the OPTION_VERIFY overridden for now

To be honest, I don't really like this approach. The OPTION_VERIFY is created to check for erroneous behaviour within opt::option.
I'm thinking to add something like opt::checked_make_option, which will look something like this:
template<class T>
constexpr opt::option<T> checked_make_option(const T& arg) {
    if (opt::option_traits<T>::get_level(std::addressof(arg)) != 0) {
        return opt::option<T>{arg};
    } else {
        return opt::none;
    }
}

Or, maybe a opt::option constructor that specifically will not do any OPTION_VERIFY inside it.
E.g. something like this:
opt::option<some_type>{opt::unchecked, ULLONG_MAX};

Also maybe a preprocessor macro OPTION_UNCHECKED_INITIALIZATION which would disable OPTION_VERIFY inside opt::option's constructors, .reset() and .emplace().

And possibly correct the implementation if I decide to stick with this implementation (I like it, but I'm a little concerned about potential UB and platform dependence).

Although I will not deny that the library does have undefined behavior, it only happens when the underlying type is not trivially copyable + I would be very surprised if you can give an example when that UB would produce erroneous behavior.
Yes, in some built-in opt::option_traits implementations there is platform dependence stuff (e.g. in member pointers, std::vector, std::string, etc.), but if you have any problems with them you can override and disable them. There is also a preprocessor macro OPTION_USE_BUILTIN_TRAITS that disables all default opt::option_traits (it is currenly not working, will be fixing it).

That's basically it, yes. Maybe I should elaborate a bit on the context. Originally I had built an api that hands out "Entities", which are represented by a uint64_t. I wrapped this in an Entity type that supports a public static const field nullValue (and bool operator). I wasn't happy with this, because it has sort of the same semantic ambiguity as pointers do (do I need to check it or not). So I made an optional overload for Entities that only stores an Entity and uses nullValue (and the bool operator) for dealing with engagement.

I guess something like Rust's NonZeroU64 would be perfectly fit into your requirements but I don't like it being a seperate type (metafunctions like std::is_integral will not work on it). I'm thinking about "custom option traits", a second template parameter in opt::option which would redefine the default opt::option_traits so you can do something like this: opt::option<uint64_t, opt::nonmax>{1}. But again, what will happen if you construct it with a sentinel value? Triggering OPTION_VERIFY? I don't really like it either.
Maybe something like opt::make_nonmax(std::uint64_t). A function that will return opt::option<uint64_t, opt::nonmax> if the passed argument is a valid one. But yeah, custom option traits are not currenly implemented.
By the way, I'm planning to add opt::expected (like std::expected but better), custom option traits, package library in compiler explorer, vcpkg and conan, reimplement boost.pfr to support extended reflection (and maybe faster compile times?) and more.
What do you think?

opt::expected is something I would use, to have parity with the optional counterpart.
With regards the rest. I think it might be interesting to have a simpler variation of opt::option_traits for which you only need to supply a "T empty_value". You could then also have an optional parameter alongside it like: "constexpr static bool allow_empty_value_construction" or something. That way you can avoid the ambiguity that arises when using the level api, and it also provides a simpler alternative to users that might find the level api daunting (it's quite good, but it did take me a couple of moments to realise why it needed to be done that way).
My Entity representation is actually split in 2 parts. a 48 bit id and a 16 bit version. So the last 16 bits are actually enough to represent an empty value. So I'm more likely to eventually implement a multilevel implementation than and update the way I'm constructing the optional than sticking the above suggestion.

With regards the rest. I think it might be interesting to have a simpler variation of opt::option_traits for which you only need to supply a "T empty_value".

Probably CRTP could fit here very well. For example,
template<>
struct opt::option_traits<my_very_cool_type> : opt::use_empty_value<my_very_cool_type> {
    static constexpr my_very_cool_type empty_value{1, 2, 3};
};

This would automatically generate get_level and set_level functions using the empty_value as a sentinel.

You could then also have an optional parameter alongside it like: "constexpr static bool allow_empty_value_construction" or something

I don't think thats a good idea to make it implicit. This could go very badly if a value with allow_empty_value_construction gets passed into some template function which would expected that the opt::option is constructed using that type will always contain a value.
To be honest, I don't understand why would you ever want to construct a option using a sentinel value. The purpose of option is to replace magic values with a convenient interface to them.


Maximum call stack size exceeded when use<EMAIL_ADDRESS>

Environment

Operating System: Windows_NT
Node Version:     v20.12.0
Nuxt Version:     3.11.1
CLI Version:      3.11.1
Nitro Version:    2.9.5
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      devtools, modules
Runtime Modules<EMAIL_ADDRESS>Build Modules:    -

Reproduction
a empty nuxt 3 starter project
install nuxt-i18n and console.log(locale)
<script setup>
const { locale } = useI18n();
console.log(locale);
</script>

Describe the bug
when I use<EMAIL_ADDRESS>I console.log(locale)
the page crash ( Maximum call stack size exceeded )
it's works<EMAIL_ADDRESS>Additional context
at Array.map ()
at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/.pnpm/@nuxt+devalue@2.0.2/node_modules/@nuxt/devalue/dist/devalue.mjs:114:39)
at /C:/Users/ausir/test/nuxt-pppp/node_modules/.pnpm/@nuxt+devalue@2.0.2/node_modules/@nuxt/devalue/dist/devalue.mjs:91:58
at Array.map ()
at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/.pnpm/@nuxt+devalue@2.0.2/node_modules/@nuxt/devalue/dist/devalue.mjs:91:31)
at Array.map ()
at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/.pnpm/@nuxt+devalue@2.0.2/node_modules/@nuxt/devalue/dist/devalue.mjs:96:50)
at /C:/Users/ausir/test/nuxt-pppp/node_modules/.pnpm/@nuxt+devalue@2.0.2/node_modules/@nuxt/devalue/dist/devalue.mjs:91:58
at Array.map ()

Logs
No response

I am unable to reproduce the issue in stackblitz,
but it does occur on my WIN/MAC OS.
Still trying to figure out the problem.

@BobbieGoede
Finally, I was able to reproduce the error in Codesandbox.
It seems that the error can only be reproduced on node v20
(but in my local env, I use node v18 got same error)
https://codesandbox.io/p/devbox/fancy-wave-7tjy7r
------------------------------
- Operating System: Linux
- Node Version:     v20.9.0
- Nuxt Version:     3.11.1
- CLI Version:      3.11.1
- Nitro Version:    2.9.6
- Package Manager<EMAIL_ADDRESS>- Builder:          -
- User Config:      devtools, modules
- Runtime Modules<EMAIL_ADDRESS>- Build Modules:    -
------------------------------

Additional information
Everything is normal when using 3.10.3.
<ref *1> ComputedRefImpl {
  getter: [Function: get],
  _setter: [Function: set],
  dep: undefined,
  __v_isRef: true,
  __v_isReadonly: false,
  effect: ReactiveEffect {
    fn: [Function (anonymous)],
    trigger: [Function (anonymous)],
    scheduler: undefined,
    active: true,
    deps: [ [Map] ],
    _dirtyLevel: 0,
    _trackId: 1,
    _runnings: 0,
    _shouldSchedule: false,
    _depsLength: 1,
    computed: [Circular *1]
  },
  _cacheable: true,
  _value: 'en-US'
}

When using 3.11.0, there are no error messages displayed (have WARN), but the screen does not render (only displaying NUXT LOGO)
<ref *1> ComputedRefImpl {
  getter: [Function: get],
  _setter: [Function: set],
  dep: undefined,
  __v_isRef: true,
  __v_isReadonly: false,
  effect:
   ReactiveEffect {
     fn: [Function (anonymous)],
     trigger: [Function (anonymous)],
     scheduler: undefined,
     active: true,
     deps: [ [Map] ],
     _dirtyLevel: 0,
     _trackId: 1,
     _runnings: 0,
     _shouldSchedule: false,
     _depsLength: 1,
     computed: [Circular *1] },
  _cacheable: true,
  _value: 'en-US' }

 WARN  Cannot stringify arbitrary non-POJOs ComputedRefImpl

When using 3.11.1, an error occurs.
<ref *1> ComputedRefImpl {
  getter: [Function: get],
  _setter: [Function: set],
  dep: undefined,
  __v_isRef: true,
  __v_isReadonly: false,
  effect:
   ReactiveEffect {
     fn: [Function (anonymous)],
     trigger: [Function (anonymous)],
     scheduler: undefined,
     active: true,
     deps: [ [Map] ],
     _dirtyLevel: 0,
     _trackId: 1,
     _runnings: 0,
     _shouldSchedule: false,
     _depsLength: 1,
     computed: [Circular *1] },
  _cacheable: true,
  _value: 'en-US' }

 WARN  Cannot stringify arbitrary non-POJOs ComputedRefImpl

 ERROR  [nuxt] [request error] [unhandled] [500] Maximum call stack size exceeded
  at Map.has (<anonymous>)
  at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:74:15)
  at /C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:91:58
  at Array.map (<anonymous>)
  at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:91:31)
  at /C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:114:71
  at Array.map (<anonymous>)
  at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:114:39)
  at /C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:91:58
  at Array.map (<anonymous>)

It looks like this is related to the devLogs feature, it starts working again when disabling it by adding features: { devLogs: false } do the Nuxt config.
Not sure if this is necessarily an issue caused by this module or caused by the way values are stringified by this feature 🤔 Will have to check if there's an existing issue on the Nuxt repo later.

According to
https://github.com/nuxt/nuxt/issues/26605#issuecomment-2033691870
Should be fixed via https://github.com/nuxt/nuxt/pull/26503 on nightly


Minor bug in slate_decomp_q_agent

I was training a slate_decomp_q_agent and ran into this AttributeError related to tf.compat.v1 module. Please refer to this notebook for more details.
AttributeError: module 'tensorflow._api.v1.compat.v1.compat' has no attribute 'v1'
L22 In the slate_decomp_q_agent.py:
import tensorflow.compat.v1 as tf
L175 in the same file:
output_slate = tf.compat.v1.where(tf.equal(mask, 0))
I changed L175 (and other such instances) to:
output_slate = tf.where(tf.equal(mask, 0))
And it worked like a charm. If you think that's the right approach, I can submit a pull request for the same.
FYI, this is the first time I am opening an issue. If there's anything else you need from my side, feel free to comment.
My env details:
# OS: macOS Mojave v10.14.6
# used pip virtual environments with below libraries installed
absl-py==0.9.0
appnope==0.1.0
astor==0.8.1
astunparse==1.6.3
attrs==19.3.0
backcall==0.2.0
bleach==3.1.5
cachetools==4.1.0
certifi==2<IP_ADDRESS>
chardet==3.0.4
cloudpickle==1.3.0
decorator==4.4.2
defusedxml==0.6.0
dopamine-rl==3.0.1
entrypoints==0.3
future==0.18.2
gast==0.2.2
gin-config==0.3.0
google-auth==1.16.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.29.0
gym==0.17.2
h5py==2.10.0
idna==2.9
importlib-metadata==1.6.1
ipykernel==5.3.0
ipython==7.15.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.17.0
Jinja2==2.11.2
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.3
jupyter-console==6.1.0
jupyter-core==4.6.3
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
Markdown==3.2.2
MarkupSafe==1.1.1
mistune==0.8.4
nbconvert==5.6.1
nbformat==5.0.7
notebook==6.0.3
numpy==1.18.5
oauthlib==3.1.0
opencv-python==<IP_ADDRESS>
opt-einsum==3.2.1
packaging==20.4
pandocfilters==1.4.2
parso==0.7.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.1.2
prometheus-client==0.8.0
prompt-toolkit==3.0.5
protobuf==3.12.2
ptyprocess==0.6.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyglet==1.5.0
Pygments==2.6.1
pyparsing==2.4.7
pyrsistent==0.16.0
python-dateutil==2.8.1
pyzmq==19.0.1
qtconsole==4.7.4
QtPy==1.9.0
recsim==0.2.3
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
scipy==1.4.1
Send2Trash==1.5.0
six==1.15.0
tensorboard==1.15.0
tensorboard-plugin-wit==1.6.0.post3
tensorflow==1.15.0
tensorflow-estimator==1.15.1
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
tornado==6.0.4
traitlets==4.3.3
urllib3==1.25.9
wcwidth==0.2.4
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension==3.5.1
wrapt==1.12.1
zipp==3.1.0

Thanks for raising this problem. Please check the latest version of RecSim and we should already fix this problem by replacing tf.compat.v1 with tf there. Let me know if you still have issues.


Automatic releasing

Adds a workflow step that will automatically create a Git tag and Github release on pushes to main when the version in package.json has been incremented and there is no already existing tag. This is inline with some other API3 repos that follow this pattern, like the OEV auctioneer workflow.
Requires the following secrets to be set. @Siegrift it might be better if you use your credentials for these. The comments in the workflow explain what values to use

[x] GH_USER_NAME
[x] GH_USER_EMAIL
[x] GH_ACCESS_TOKEN

Closes: https://github.com/api3dao/commons/issues/71

@Siegrift @dcroote I've moved the tag-and-release script to the src/ folder and added a README. I'm not entirely sure how to test this though until we actually release commons again with this change

I've moved the tag-and-release script to the src/ folder and added a README. I'm not entirely sure how to test this though until we actually release commons again with this change

I think we can just release a patch and see it in action.


applications/misc/yate: Bump from version 2 to 5.4.x

Signed-off-by: Edward O'Callaghan<EMAIL_ADDRESS>

I didn't even built this locally, given that you didn't change the sha of the package.

I have updated yate in 94d177fc5ec7e73e8af947d2a14d4ff08d675a58.