initial nix language support

EDIT: I removed the original PR text, as no longer relevant and will have made it harder to review.
This PR adds nix language support.
Checklist

[x] Recorded tests for the new language
[x] Used "change" / "clear" instead of "take" for selection tests to make recorded tests easier to read
[x] Added a few specific tests that use "chuck" instead of "change" to test removal behaviour when it's interesting, especially:

[x] "chuck arg" with single argument in list
[x] "chuck arg" with multiple arguments in list
[x] "chuck item" with single argument in list
[x] "chuck item" with multiple arguments in list

[x] Added @textFragment captures. Usually you want to put these on comment and string nodes. This enables "take round" to work within comments and strings.
[x] Added a test for "change round" inside a string, eg "hello (there)"
[-] Supported "type" both for type annotations (eg foo: string) and declarations (eg interface Foo {}) (and added tests for this behaviour 😊)
[x] Supported "item" both for map pairs and list entries (with tests of course)

Supported
Tested
Term
Capture
Definition
Comment

✓
✓
list
@list
List type equivalent
-

✓
✓
inside list
@list.interior
Inside of a list
-

✓
✓
map
@map
Dictionary type equivalent
-

✓
✓
inside map
@map.interior
Inside of a dictionary
-

✓
✓
key
@collectionKey
Dictionary key equivalent
-

✓
✓
funk
@namedFunction
A named function declaration
-

✓
✓
inside funk
@namedFunction.interior
The inside of a lambda declaration
-

✓
✓
funk name
@functionName
Name of declared function
-

✓
✓
lambda
@anonymousFunction
A lambda declaration
-

✓
✓
inside lambda
@anonymousFunction.interior
The inside of a lambda declaration
-

✓
✓
name
@name
Variable name
-

✓
✓
value
@value
Right-hand-side value of an assignment
-

_
_
value
@value
Value returned from a function
-

✓
✓
value
@value
Value of a key-value pair
-

✓
✓
state
@statement
Any single coded statement
-

✓
✓
if state
@ifStatement
An if conditional block
-

✓
✓
condition
@condition
Condition of an if block
-

_
_
condition
@condition
Condition of a while loop
-

_
_
condition
@condition
Condition of a do while style loop
-

_
_
condition
@condition
Condition of a for loop
-

_
_
condition
@condition
Condition of a ternary expression
-

✓
✓
branch
@branch
The resulting code associated with a conditional expression
-

✓
✓
inside branch
@branch.interior
The statements associated with the body of a conditional expression
-

✓
✓
comment
@comment
Single line code comment
-

✓
✓
comment
@comment
Multi-line code comment
-

✓
✓
string
@string
Single line strings
-

✓
✓
string
@string
Multi-line strings
-

✓
✓
-
@textFragment
Used to capture string-type nodes (strings and comments)
-

✓
✓
call
@functionCall
A function call (not a function definition)
-

✓
✓
callee
@functionCallee
Name of the function being called
-

✓
✓
arg
@argumentOrParameter
Arguments to function definition
-

✓
✓
arg
@argumentOrParameter
Arguments to function calls
-

✓
✓
arg
@argumentOrParameter
Interpolated variables in strings
-

_
_
class
@class
Class or structure declaration
-

_
_
inside class
@class.interior
The inside of a class declaration
-

_
_
class name
@className
Name of class or structure declaration
-

_
_
type
@type
Type declarations
-

Checklist

[x] I have added tests
[ ] I have updated the docs and cheatsheet
[x] I have not broken the cheatsheet

Not sure what changed, but seems take map no longer includes ;.
Comments:

Lists:

Maps:

I played around with @statement a bit and realized adding all the xxx_expression nodes doesn't make sense. Seems binding is one of the main ones we want to keep though. I didn't bother removing the expressions that I don't know what they are yet, as they may still be relevant so will keep poking at it. Not showing visualize for statement, as I want to create a more exhaustive playground file for it first.
For strings I tried adding some more @textFragment assignments to various bits and trying a variety of string incantations, but nothing works yet. Worth noting that indented_string_expression node represents the '' style strings (can think of it like python """ pretty much). Can't show visualization as it just doesn't work.

91bc77d8a4c8a9eb335fe1626cc53a2d166527c5 is more testing with some new captures.
Adds if conditions which seem to work fine.
Adds function capture, but it doesn't currently over capture curried functions, so it's a little bit non-intuitive still probably.
Fixes statements to be more sane by removing expressions I added, and special case asserts as they have weird nesting. Probably some other stuff that will need to be special cased too.
Will update with some screenshots of the new captures when I get time.

I'll break this out into multiple PRs with proper screenshots and tests soon, as I'm just kind of randomly adding/testing support for stuff as I read through other scm files and poke around, so it's already kind of all over the place and there are some questions/quirks for various pieces that make sense to have in specific PRs.

Ok thanks for the tests, though we prefer "change" instead of "take" because it makes the tests much easier to read. See the PR template. Also, "chuck" tests are only necessary in cases where "chuck" is interesting, eg removing commas, etc
If you don't want to re-record the "take" tests, you can just find and replace setSelection to clearAndSetSelection in your recorded tests, and then run the "update test fixtures" launch config, which should handle the rest for you

I'd be happy to try this out on some real files once the corresponding parse-tree PR is merged.

One thing I can't entirely decide is if take lambda from the right most lambda should capture all curried lambdas as one highlight or should individually select each (the way it works currently). Taking all curried lambdas would make it feel more like other languages when dealing with functions, which seems nice.
I have no functional programming background, so someone with experience might think differently?
To be clear, in nix technically x = a: b: a + b is two lambda expressions. So if the cursor is in a + b I say take lambda I get:

But if the cursor is in the a: part I say take lambda I get:

As I alluded to above, this also gets a bit cumbersome if your cursor is in the a + b and say take every arg and expect it to highlight both a and b. Currently it would only select b. I think I'd rather it select all.
I think one possible exception to this should be if one of the lambdas is explicitly wrapped in () which to me implies some sort of explicit separation vs a regular multi-argument lambda?
Maybe this was already discussed/decided for other languages, but I didn't check yet.
Worth noting that atm I also made it so above works as a single "named function" where x is the function name, so if you say take funk you get:

and take funk name:

Not sure what to think of that yet, or how it currently works in other languages. But my thinking is because nix is only lambda functions, meaning named functions won't be used elsewhere, this might be nice to use.

huh interesting. so is currying the only way to define a lambda with multiple parameters? If so, then I think I'd lean towards treating a: b: a+b as lambda, and having "every arg" iterate over a and b. Lmk if you need help getting that to work
@auscompgeek @josharian @AndreasArvidsson curious to hear your thoughts tho

I'd be happy to try this out on some real files once the corresponding parse-tree PR is merged.

@auscompgeek fyi nix support merged into parse-tree a little while ago in case you didn't see.

Also, would be good to make sure you're formatting with @AndreasArvidsson 's formatter; I'm getting a big autoformat when I save one of your files locally

"item"

I was really expecting a lot more items here 😅. In particular, for anything that you're considering a "map", any contained key-value pairs should be items

This is fixed now for attrsets.

Hmm nix really does blur the line between statement and item, doesn't it?

My mind kind of expects the single-line ones not to be statements 😅. But that doesn't feel like a good distinction to draw. Idk cc/ @auscompgeek . Looks like there's no difference between a "statement block" and a "map"?

Ya. Really there isn't much similarity to what you'd normally think of as a statement in other (non functional) languages at least. Originally I was leaning towards statements because there are so many complex expressions and stuff when setting key/value pairs, but I think using items feels more natural after playing with it for awhile. I've disabled most statement matching for now to test more, and also added better item support.

Also, would be good to make sure you're formatting with @AndreasArvidsson 's formatter; I'm getting a big autoformat when I save one of your files locally

Weird, I do have that installed and I do get auto-formatting in .scm files. I originally thought it might be prettier conflicting or something, but if I disable prettier and then format .scm document, I don't see any other changes. What kind of changes do you see?

Also, I see this is still draft. Did you want me to give it another review or shall I hold off while you continue to play with it?

Also, would be good to make sure you're formatting with @AndreasArvidsson 's formatter; I'm getting a big autoformat when I save one of your files locally

Weird, I do have that installed and I do get auto-formatting in .scm files. I originally thought it might be prettier conflicting or something, but if I disable prettier and then format .scm document, I don't see any other changes. What kind of changes do you see?

I think it may just be indentation level. You might need to install the editorconfig plugin so that your VSCode will respect our .editorconfig. I wonder if we should add that to recommended extensions cc/ @AndreasArvidsson @auscompgeek

Thanks, ya that was it it seems. Installed now. I am using your pre-commit hooks as well, so kinda surprised that doesn't automatically fix it either.

Also, I see this is still draft. Did you want me to give it another review or shall I hold off while you continue to play with it?

can hold off for now. I'm gonna tweak some stuff and there are still a few bugs that I didn't fix yet. Am looking forward to this getting in eventually though. Has been a fun experience.

Thanks, ya that was it it seems. Installed now. I am using your pre-commit hooks as well, so kinda surprised that doesn't automatically fix it either.

Yeah scm autoformat doesn't run as a hook yet as it's just implemented in that VSCode extension. We need to turn it into a cli

This one was also surprising to me. I guess it makes more sense in a one-line assert?

Things seem a lot nicer with most of these assert issues addressed (not pushed yet). I like the idea of having branch apply only if it's a one-liner, but from searching the repo I don't see how its possible to actually have that as a query predicate? Is there some existing example of where you've already done this or would I have to add a new predicate?

I like the idea of having branch apply only if it's a one-liner, but from searching the repo I don't see how its possible to actually have that as a query predicate? Is there some existing example of where you've already done this or would I have to add a new predicate?

Oh I wasn't suggesting actually changing definition of "branch" depending on whether it's one or multiple lines. I think Python has taught us that making whitespace significant is a deeply problematic notion 😅. I think it would be quite surprising if a scope behaved differently if it was on one or multiple lines. Unless nix devs see them as significantly different constructs? cc/ @auscompgeek
Lmk if you want me to take another look, or to drop into a meet-up to discuss some of this stuff

Fair enough. As much as I hate python whitespace, I actually think there are maybe a couple cases in nix where it could sort of make sense to be whitespace dependent to feel "natural", but I don't have time to explain right atm.
I'm new to coding nix so I'd rather hold off implementing weird things I assume maybe make sense and instead just push something that has the basics covered and then wait until more people (hopefully more experienced devs) get to play with it.
You can feel free to take another look now ya.
There are two issues that I think might require new query predicates but aren't show stoppers (maybe... will see how much you groan at how I handled call arguments in apply/select expressions lol), so happy to solve them as follow up. Will explain in more detail in a comment tomorrow.
I do hope to actually make it to a meetup at some point :D

So to elaborate on a few changes and issues:
The statement stuff has changed to only be lines within the first ... part of let ... in ... statements, which feels a lot better.
There are I think 3 things could be done that I'm not sure how without possibly building new query predicates, so I'll just list them here.

The call argument handling nesting is gross, but works. I suspect there could be a predicate introduced that repeats some node match nested up to N deep or something. I'd probably rather do that as a follow up. I suppose worth noting I also had tried to use #any-of to match both an apply and select expression in the same big query, but ran into some odd errors which I couldn't figure out, which may be a bug I guess. #any-of would only fix the query duplication, not the huge gross query.

Probably we just won't use assert branch scope at all. But just touching on the idea of certain scopes only working depending on white space Like inherit n; on a single line could almost be thought of as a statement (maybe I'm too general with the way I think of statement). So for example you often see short assignments that might look like this:

  pkgs = import pkgsLibPath { inherit lib; pkgs = null; };

In this case intuitively I don't think the inherit would be make sense to be its own statement. But then you often also see longer assignments that are laid out like this:
  pkgs = import pkgsLibPath {
    inherit lib;
    pkgs = null;
  };

In the latter I find it feels natural to want to target the inherit line if it were a statement. Of course can just use line as the target, but just clarifying why in my brain it feels sort of natural to think of it differently depending on the white space.
There is a similar case with the with were you can have like maintainers = with maintainers; [ onny ] ++ teams.php.members; and:
{ config, lib, pkgs, ... }:

with lib;

let

  cfg = config.security.sudo;

Anyway, I think you are right that avoiding whitespace-based differences, but I wanted to explain anyway.

I took a stab at adding inside comment support and ran into some issues. There doesn't seem to currently be a way to use a predicate to query the contents of the matched node. If I do something like:

  (
    (comment) @comment.interior
    (#shrink-to-match! @comment.interior "# ?(?<keep>.*)$")
  )

It works-ish, but the problem is that there are two types of comment both which match as (comment) nodes. So by having the above requiring #strink-to-match then I lose the ability to match on the multi-line comments. I tried something naive like:
[
  (
    (comment) @comment.interior
    (#shrink-to-match! @comment.interior "# ?(?<keep>.*)$")
  )
  (
    (comment) @comment.interior
    ;; This would need to be a multi-line match, which I'm not sure shrink-to-match can do
    (#shrink-to-match! @comment.interior "/\*(?<keep>.*)\*/$")
  )
] @comment

But this doesn't work since #shrink-to-match isn't actually a match predicate per se, it's just a modifier on what was already matched, so if you try to match on the multiline variant, since (comment) still matches in the first case, #shrink-to-match will error because it doesn't find the #.
So this made me think we probably want something like a #starts-with or even just a #regex predicate where we could just have regex("^#") for single line and #regex("^/\*") for double line, and then have the #strink-to-match after.
I think that's it. Definitely understand why you like lots of small PRs, as it gets hard to track all these different issues (even for me actively working on it, let alone you lol).

So to elaborate on a few changes and issues:
The statement stuff has changed to only be lines within the first ... part of let ... in ... statements, which feels a lot better.
There are I think 3 things could be done that I'm not sure how without possibly building new query predicates, so I'll just list them here.
1. The call argument handling nesting is gross, but works. I suspect there could be a predicate introduced that repeats some node match nested up to N deep or something. I'd probably rather do that as a follow up. I suppose worth noting I also had tried to use `#any-of` to match both an apply and select expression in the same big query, but ran into some odd errors which I couldn't figure out, which may be a bug I guess. `#any-of` would only fix the query duplication, not the huge gross query.

Here is a proposal for a new query predicate operator: /Users/pokey/src/cursorless/data/playground/nix/complex.nix. I think it's actually fairly general purpose

2. Probably we just won't use `assert` branch scope at all. But just touching on the idea of certain scopes only working depending on white space Like `inherit n;` on a single line could almost be thought of as a statement (maybe I'm too general with the way I think of statement). So for example you often see short assignments that might look like this:

  pkgs = import pkgsLibPath { inherit lib; pkgs = null; };

In this case intuitively I don't think the inherit would be make sense to be its own statement. But then you often also see longer assignments that are laid out like this:
  pkgs = import pkgsLibPath {
    inherit lib;
    pkgs = null;
  };

In the latter I find it feels natural to want to target the inherit line if it were a statement. Of course can just use line as the target, but just clarifying why in my brain it feels sort of natural to think of it differently depending on the white space.
There is a similar case with the with were you can have like maintainers = with maintainers; [ onny ] ++ teams.php.members; and:
{ config, lib, pkgs, ... }:

with lib;

let

  cfg = config.security.sudo;

Anyway, I think you are right that avoiding whitespace-based differences, but I wanted to explain anyway.

I would be tempted to just err on the side of more scopes. So if it makes sense multi-line, let's include it always. Can always "grand state" your way out of it or target part of the scope not trapped

3. I took a stab at adding `inside comment` support and ran into some issues. There doesn't seem to currently be a way to use a predicate to query the contents of the matched node. If I do something like:

  (
    (comment) @comment.interior
    (#shrink-to-match! @comment.interior "# ?(?<keep>.*)$")
  )

It works-ish, but the problem is that there are two types of comment both which match as (comment) nodes. So by having the above requiring #strink-to-match then I lose the ability to match on the multi-line comments. I tried something naive like:
[
  (
    (comment) @comment.interior
    (#shrink-to-match! @comment.interior "# ?(?<keep>.*)$")
  )
  (
    (comment) @comment.interior
    ;; This would need to be a multi-line match, which I'm not sure shrink-to-match can do
    (#shrink-to-match! @comment.interior "/\*(?<keep>.*)\*/$")
  )
] @comment

But this doesn't work since #shrink-to-match isn't actually a match predicate per se, it's just a modifier on what was already matched, so if you try to match on the multiline variant, since (comment) still matches in the first case, #shrink-to-match will error because it doesn't find the #.
So this made me think we probably want something like a #starts-with or even just a #regex predicate where we could just have regex("^#") for single line and #regex("^/\*") for double line, and then have the #strink-to-match after.

I would just include the # . Does that make your life easier?

I think that's it. Definitely understand why you like lots of small PRs, as it gets hard to track all these different issues (even for me actively working on it, let alone you lol).

Ha yeah 😅
Also, looks like this PR has some of the same leading / trailing / removal issues I fixed in #1962, so would be awesome if you could take a crack at fixing them. Basically:

Leading and trailing is designed for delimiters. We only remove one of them; not both. Think of a comma-separated list, where deleting two commas would smash the siblings together. If you need to remove something before and after, just make a removal range
You no longer need to specify @leading.end; it's implied to be the scope itself
Instead of @leading.start.endOf, you can now just say @leading.endOf; start is now implied
See my tweaks to #1962 if you're not sure what I mean; hopefully that will make things clear

Here is a proposal for a new query predicate operator: fidgetingbits#1. I think it's actually fairly general purpose

We discussed this one in a meet-up and decided it was simpler to just introduce a query predicate operator called #recursively-expand-to-parent-of-type! where you give it a node and a type and it recursively expands the range to direct parents of the given type. So in this case it woudl be (#recursively-expand-to-parent-of-type! @functionCallee.domain "apply_expression"). Make sense @fidgetingbits . Lmk if you want help implementing that

Sounds good. I do really need to get more familar with typescript, so will try to give it a whirl when I find the time.

As proposed above, I don't think we'll end up going the route of https://github.com/fidgetingbits/cursorless/pull/1, but I captured it in a tag just in case we want it in the future, and the PR disappears from @fidgetingbits's repo for whatever reason (not sure how things work with forks). Here's the commit https://github.com/cursorless-dev/cursorless/commit/52ce5b123b0c5bd66f2860218b602244adfb05bb


You forggot to add Andorra

Hi there, This country doesn´t appear in the list of countries. the iso code is AD

I have added the information about where I got the data from in the README. This is an issue relating to Natural Earth and how they sourced their data.


Round error when casting float to decimal

Describe the bug
Spark
scala> spark.sql("select cast(0.06+0.01 as decimal(18,2))").show
+------------------------------------+
|CAST((0.06 + 0.01) AS DECIMAL(18,2))|
+------------------------------------+
|                                0.07|
+------------------------------------+

DataFusion
❯ select cast(0.06+0.01 as decimal(18,2));
+-------------------------------+
| Float64(0.06) + Float64(0.01) |
+-------------------------------+
| 0.06                          |
+-------------------------------+

To Reproduce
See above
Expected behavior
Additional context
Discovered as part of https://github.com/apache/arrow-datafusion/issues/4024

filed related issue in arrow-rs: https://github.com/apache/arrow-rs/issues/2997

Fixed by #4199
❯ select cast(0.06+0.01 as decimal(18,2));
+-------------------------------+
| Float64(0.06) + Float64(0.01) |
+-------------------------------+
| 0.07                          |
+-------------------------------+
1 row in set. Query took 0.008 seconds.


Add history section

See title.

This is contingent upon the completion by somebody else, not me.


Silly but nice request.....Automation for all users.

Example lets say user enter in command prompt zpaqfranz -automenu
and a screen menu with some basic options appears for simple users like me like this....
Press 1 to add all files and folders
Press 2 to add only current files without folders
Press 2 to create a sfx file with all files and folders
Press 2 to create a sfx file with all current files without folders
Press 3 to set compression level
Press 4 to extract all files and folders in a specific path or use .. for current directory
Press 6 .....
Press 7 .....
Press 8 .....
Press 9 .....
Press 10 .....
Press 11 .....
etc etc etc
So after users press favourite choice the zpafranz automaticly do all the job automaticly :)
Something like a text gui with as many options you like for simple and for advanced users
I love zpaqfranz but sometimes its hard for me with all this switches :) Try understand me.
Make zpaqfranz a utility for all users and for for many.
No need to make that on the new version....add it as request for future versions to come
Zpaqfranz is not a tool....Its a gun. And people must know how to use this gun.
Thank you and greetings from Greece.

Your observation is very interesting.
As you may know I have long since included a kind of GUI in text format (for Windows), the command ... gui
It serves essentially to facilitate browsing and extraction (and keep me entertained)
A "real" GUI interface for Windows, i.e. PAKKA, has received exactly 3 feedbacks in over 10 years
So I COULD make a beautiful GUI...but there are no users asking for it.
I like the idea of making some kind of Wizard.

I'm glad you like it.
The "some kind of wizard" will make zpaqfranz more userfriendly.
I hope in the future to see a "mount zpaqfranz files" as virtual hard disks


Bulk Changes

Large series of changes I hadn't merged back into master in a while.

This should be good to merge once I fix the CI. It seems master on rucksack is currently broken.


♻ Media request stats widget

🤖 Generated by Copilot at c775d8e
Summary
🔧📊📱

This pull request improves the media requests feature of the app by enhancing the UI and simplifying the backend logic. It updates the MediaRequestStatsTile component to use @mantine components and hooks for better layout and responsiveness, and it refactors the src/pages/api/modules/media-requests/index.ts file to use the optional chaining operator for getting the appUrl.

Simplify the logic, unleash the power
appUrl from mediaWidget with optional chaining
Enhance the stats, show more data
MediaRequestStatsTile with @mantine blazing

Walkthrough

Simplify appUrl logic with optional chaining operator (link)
Add more imports from @mantine/core library for MediaRequestStatsTile component (link)
Use useElementSize hook to conditionally render statistic descriptions based on container width (link)
Reduce minHeight of gridstack configuration for MediaRequestStatsTile component to fit in smaller spaces (link)
Rewrite MediaRequestStatsTile component to display more statistics and information using ScrollArea, Group, and Avatar components (link)

@Tagaishi didn't you want to take over this? You could merge #1261 and copy some of the code to apply it here.

Superseeded by #1344


docs: add docker-compose example in readme

Hi! Thanks for this port :)
I've added a simple docker-compose example in the readme, thought it might be useful for others as well?

Thanks! btw, can't understand, how to add addons in docker? (since /etc/ folder is readonly)


Added MySQL as a datastore

Overview
This PR partially resolves #75 as it adds support for using MySQL (and MariaDB) as a datastore backend. This PR allows a user to connect to the remote database by specifying a number of environment variables. Documentation has also been added in README.md detailing the environment variables that need to be set in order to use specific databases.
Techinal Details
Below is a detailed description of some of the descisions that I made when creating this patch.
Database schema
The database uses a flatfile design as apposed to making use of some of the relational features of MySQL in order to reduce the complexity of the code and reduce the number of queries that must be sent to the server. As JSONDB does not support relations in this sense there is no point in over complicating the schema as this would only lead to a poorer performance. The schema its self is stored in the templates directory and loaded with rice. If the database is empty then the schema will be created. Currently no way has been implemented to allow for updates to the schema but this is something that should be considered in future if changes are going to be made to the database schema, as seen with #164.
Direct use of database/sql
I decided to make direct use of the database/sql API due to the added complexity of using a package such as SQLX or GORM. These packages added no real advantage due to the structure of the data (ip addresses being stored as an array of strings). To make good use of these packages then the structure of most of the models would have to be changed, resulting in an awful lot of code to be modified. Instead, I chose to use the API directly and convert the arrays of strings to a string seperated by an arrayDelimiter. This allows the addresses to be easily parsed and inserted into structs by using the strings package.
Future support
I am more than happy to continue to support this feature in future in case of any issues or if any modifications need to be added. If so then just send me a message and I will have a look. I am also thinking about implementing perhaps a PostgreSQL backend to cover the main SQL servers depending upon what others think. I don't think that their is any point in using SQLite though as there is already the JSONDB and no relational features are used.

For some reason the Diff looks a bit weird for main.go. It looks as if git has me as changing the entire file. Not sure whats going on there. Any ideas what might have caused this. I don't think it is the line ending because it should be set to LF as I think it was before I made any changes.

Well, fixed that issue. Turns out it was a line ending issue. I had forgotten to switch main.go from CRLF to LF when I coppied the files over to a linux machine without using git.

Converted back to draft as need to implement #164 and a way to manage database migrations.

Sorry, I don't really have time to work on this currently so I will close this to save cluttering the PR list


chore: removing no longer needed controllers

@elliot-sabitov can you please repoint to rc branch and merge?


[Apply Event Request] codeunit 99000838 "Prod. Order Comp.-Reserve" - OnAfterClearTrackingFilter

Could you remove to two Setranges on Serial and Lot No. and replace it with the standard procedure ClearTrackingFilter so we and the Base can use the event OnAfterClearTrackingFilter in that procedure in T337?
procedure TransferPOCompToItemJnlLineCheckILE(var OldProdOrderComp: Record "Prod. Order Component"; var NewItemJnlLine: Record "Item Journal Line"; TransferQty: Decimal; CheckApplFromItemEntry: Boolean)
    ...
            EndLoop := TransferQty = 0;
            if not EndLoop then
                if ReservEngineMgt.NEXTRecord(OldReservEntry) = 0 then
                    if ItemTrackingFilterIsSet then begin
                        //A200F0000.Event19.05.os
                        //OldReservEntry.SetRange("Serial No.");
                        //OldReservEntry.SetRange("Lot No.");
                        //A200F0000.Event19.05.oe
                        OldReservEntry.ClearTrackingFilter; //A200F0000.Event19.05
                        ItemTrackingFilterIsSet := false;
                        EndLoop := not ReservEngineMgt.InitRecordSet(OldReservEntry);
                    end else
                        EndLoop := true;
        until EndLoop;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


feat: create new methods with Config arguments for existing builders

Part of #5835.

just some doc nits, otherwise this looks good to me. Going to keep the issue open though, since we might still want something to replace Config::network_config.

Fine just modified the description not to close the issue automatically.


Support of CoreUI v3 and Angular 10

Are there any plans to support latest coreui v3 versions and Angular 10? I'm using coreui-angular and this blocks me from upgrading to coreui v3.

We are working on it.

Nice to hear. Is there any release period of time?
Is a Repro to have a look at the upcoming version existing? I found the only v2 at the moment.
Please write a comment with some more information for us. Big thanks!

Please take a look at v3 alpha preview https://coreui.io/angular/demo/v3.0.0-alpha/

@xidedix any alpha for the free admin template

I am currently using 2.9.4, when are we going to get version 3 for angular @xidedix ?

Please take a look at v3 alpha preview https://coreui.io/angular/demo/v3.0.0-alpha/

It is making use of ngx bootstrap control (https://valor-software.com/ngx-bootstrap/#/documentation#getting-started). Is this going to change in final version or in near future releases?

@himanshugajjar We're dropping most of the ngx-bootstrap components, but you can still use them if you prefer.

any updates about v3?

+1 Would love to hear news about a possible release date for CoreUI Angular V3? Is there any repo holding the source code to look at the source code?

any updates about v3?

Any updates on v3?

Any updates about v3 please?

+1

@xidedix now that CoreUI v4 is released, is there any update on Angular support based on v4, or should we treat coreui-angular as abandoned and fork it?

@coyoteecd We're going to keep v2 alive and merge some updates. v4 is in the works - fingers crossed.

@xidedix Good news, but I hope it will not takes so long time.

@regstar this month we're going to release alpha/beta version, next month stable release.

@regstar this month we're going to release alpha/beta version, next month stable release.

This sounds very great. Good work. Thanks for sharing the information :)

@regstar this month we're going to release alpha/beta version, next month stable release.

That's wonderfull. Thank you

@mrholek Any news about v3? Thank you

@regstar this month we're going to release alpha/beta version, next month stable release.

Hello @mrholek ! Hope you're doing well and again great work on the coreUI admin template. Any link where we can test or check the alpha/beta version?


How do I set branch protection?

I see there is a class called GHBranchProtectionBuilder, but I cannot find a way to use it to set branch protection on a repo.
Any help is appreciated.

Ah, thanks. But it's deprecated, without info what to use instead. Any suggestions?

https://github.com/github-api/github-api/blob/a42305dd59f0be426f0c9091748e947f60d76bcd/src/main/java/org/kohsuke/github/GHBranch.java#L132-L134
All "preview" api endpoints are marked as deprecated to make sure people know they may change without notice.
https://github.com/github-api/github-api/blob/master/src/main/java/org/kohsuke/github/Preview.java

I see, thanks for the info.


Grammatical and minor fixes

Fixed some grammatical errors in the English text, and changed some minor formatting errors, all in the README.md file.

Thanks @gspeed0689 for improving the readability and formatting!


Fix map creation for user defined type that refers to a predefined union

Purpose
$subject
Fixes #35105
Approach
When creating a map value from the user-defined type which refers to the Ballerina in-built unions (anydata, json, any), it fails at runtime as the union type is not a proper map type. This PR fixes it by providing the correct type when creating such a map.
Samples
type AnyDataType anydata;
AnyDataType map1 = {"a": 1};

Remarks
Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[x] Added necessary tests

[x] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

The code-coverage patch is low due to the BIR emitter changes which do not have any tests.

Changing this to a draft as we need to decide on the target branch. @pcnfernando

As per the offline discussion, the preferred TypeChecker fix can impact some other functions (#35237 ). It is decided that we need to handle that first before adding this fix.
Therefore, closing this PR.
The type emitter changes can be found in PR
https://github.com/ballerina-platform/ballerina-lang/pull/35312


Make AnySocket object safe

Apologies, in #718, removing the sized bound in downcast and downcast_mut implicitly made AnySocket object unsafe as they don't have a self method. I had a bit of a brain fart.
Signed-off-by: Klim Tsoutsman<EMAIL_ADDRESS>

Oh, whoops! So that's what Sized was for, hmm.
Hmm, but adding where Self: Sized to the methods won't let you call them on a dyn AnySocket. Doesn't this kinda defeat the point of using dyn AnySocket?
Why do you want to use dyn AnySocket instead of just Socket? The Socket enum is already sort of a "dyn socket" which can be any actual socket type.

Hmm, but adding where Self: Sized to the methods won't let you call them on a dyn AnySocket. Doesn't this kinda defeat the point of using dyn AnySocket?

In my use case I don't use the functions on a trait object:
static SOCKETS: Mutex<Vec<MySocket<dyn AnySocket>>> = Mutex::new(Vec::new());

#[repr(transparent)]
pub struct MySocket<T>
where
    T: AnySocket<'static> + ?Sized,
{
    pub(crate) inner: SocketSet<'static>,
    phantom_data: PhantomData<T>,
}

impl<T> Deref for MySocket<T>
where
    T: AnySocket<'static>,
{
    type Target = T;

    fn deref(&self) -> &Self::Target {
        AnySocket::downcast(self.inner.iter().next().expect("no socket in socket set").1)
            .expect("incorrect socket type")
    }
}

impl<T> DerefMut for MySocket<T>
where
    T: AnySocket<'static>,
{
    fn deref_mut(&mut self) -> &mut Self::Target {
        AnySocket::downcast_mut(
            self.inner
                .iter_mut()
                .next()
                .expect("no socket in socket set")
                .1,
        )
        .expect("incorrect socket type")
    }
}

pub fn add_socket<T>(&self, socket: T) -> Arc<Mutex<Socket<T>>>
where
    T: AnySocket<'static> + Send,
{
    let mut socket_set = SocketSet::new([iface::SocketStorage::default(); 1]);
    socket_set.add(socket);
    let socket_arc = Arc::new(Mutex::new(Socket::<T>::new(socket_set)));
    SOCKETS
        .lock()
        // SAFETY: Socket has a transparent representation, so the memory layout is identical
        // regardless of T. The Send bound on T ensures that transmuting to a type that
        // implements Send is sound.
        // NOTE: We are transmuting an arc, not the underlying type. That doesn't change the
        // safety requirements though.
        .push(unsafe { core::mem::transmute(socket_arc.clone()) });
    socket_arc
}

The dyn AnySocket is to satisfy the type system, the code never actually constructs a trait object. SOCKETS could be a vector of MySocket<UdpSocket>; it doesn't matter as the memory is still the same. A dyn AnySocket just better expresses the intentions of the code.
The T in the Deref and DerefMut implementations has an implicit Sized bound, so we can call downcast and downcast_mut. However, this means we can't call deref on a MySocket<dyn AnySocket> which makes sense as we don't know what to downcast it to.

Hmm... That transmute looks very cursed :sweat_smile:  Probably sound, but still...
One thing I noticed from your snippet and looking at https://github.com/theseus-os/Theseus/pull/742 is that you're creating one SocketSet for each socket, and doing one poll() call on the interface for each socket. This will NOT work. smoltcp assumes poll() is called with a SocketSet containing ALL sockets. If you don't, you will run into issues like: if you have two TCP sockets A and B, when polling with a SocketSet containing only A, any received packets for B will be replied to with a RST.
One way to do it is to make your Socket struct a "wrapper" that only contains a handle into the socket inside the SocketSet and borrow it out each time you want to do something with it. This is how embassy-net does it for example. The drawback is you have to put the entire network stack within one giant mutex which is not great if you want to support multithreading/multicore.
Another way would be to put each socket behind its own Mutex, and then on iface poll lock them all, collect them into a single SocketSet, then poll that. Would be quite annyoing though...
Back to the PR: the consequence is that dyn AnySocket is only usable for upcast, and can't be used with downcast. This defeats much of the point of AnySocket for dyn. I don't think there's a downside for code not using dyn though, so can't see why not merge.
Thanks!
bors r+


Use cache without google-cloud  datastore

I would love to be able to use the cache service without the project being connected to the DataStore, perhaps using the temporary storage of the docker

This will be possible once #227 lands.


Include the openid scope

I've been trying your library and the example you have given and I found out that somehow I still need to setup the ScopeRepository to include the openid scope for an openid client to work.
I think you can either point this out in your example or maybe you can provide a default ScopeRepository implementation that automatically include the openid scope.

@rlvillacarlos Sorry for the late response. As much as possible would like to stay away from providing any concrete implementations for a Repository, think single inheritance. I'll give some thought to providing a Trait that could be used by default.
Thanks so much for the suggestion!


Test filters of TestLauncher should be respected when configuration cache is reused

Expected Behavior
When tests are invoked with TestLauncher through TAPI, the test filters should be applied when the configuration cache is reused.
Current Behavior
Test filters are ignored when the configuration cache is reused.
Context (optional)
No response
Steps to Reproduce
See #25032
Gradle version
7.6+
Build scan URL (optional)
No response
Your Environment (optional)
No response

Fixed via #25113.


GSON deserialization failed when using Generic Types

I tried to translate:
Gson gson = new Gson();
Type resultType = new TypeToken<GetResult<SessionStartResultDto>>() {}.getType();
GetResult<SessionStartResultDto> result = gson.fromJson(jsonString, resultType);

It translates but when I run the code in Xcode I get the following error:
Terminating app due to uncaught exception 'JavaLangTypeNotPresentException', reason: 'Type test.core.rest.dto.SessionStartResultDto not present'

Is that type actually present? iOS doesn't allow classes to be loaded from outside the app bundle, so unless that class is linked into the app, it can't be dynamically loaded.
Try linking with the -ObjC flag, which links all Objective-C classes, regardless whether other code references them. If that doesn't work, try defining an explicit class reference to force the linker to include the class, such as "private static final Class<?> linkerRef = SessionStartResultDto.class;".


⚠ Bofrost.be has degraded performance

In 4a596ad, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1797 ms

Resolved: Bofrost.be performance has improved in ad01424.


x/tools/gopls: translate go.work conflicting replacement errors to quickfixes or a command to run.

What did you do?
Checkout kubernetes repo, and create a go.work file including all modules in the repo except those in vendor.
A better, simpler repro case can be constructed by creating a workspace with conflicting modules (I will take a look if I can create a simpler repro with gopls test setup later if gopls experts cannot help with it).
What did you expect to see?
Notifications popup with "Fix This" button :-) or
Diagnostics with quickfix associated.
What did you see instead?
Verbose error messages.
Go command is giving a specific command to run already. I wonder if we can parse the message, replace [override] part, and suggest it as a quickfix.
cc @findleyr @matloob

I added a replace statement:
$ go work edit -replace<EMAIL_ADDRESS>$ cat go.work
...
replace sigs.k8s.io/json => sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2

But gopls was still reporting the issue (load error notification didn't go away) until I restarted gopls.

same problem. I don't know how to do the replace. Did you find a solution?


Repositories that have files in the examples folder that don't have the sensor/module name as a prefix and aren't .py files get added to list of modules missing module/sensor prefixes

Sorry for such an ugly title

This should be an easy fix. Since the non-.py files aren't included in the bundle, I can support skipping them here. (The bundle was the main driver for ensuring each file had a proper prefix).
When (if?) we get Folderize Example Bundles completed, this will probably still be unnecessary to check for non-.py.


Added functionality to support BaselineManagement Module

@bobbytreed,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Codecov Report

Merging #31 into dev will decrease coverage by 34%.
The diff coverage is 41%.

@@        Coverage Diff         @@
##           dev   #31    +/-   ##
==================================
- Coverage   86%   52%   -35%
==================================
  Files        3     4     +1
  Lines      145   303   +158
==================================
+ Hits       126   160    +34
- Misses      19   143   +124

Continue to review full report at Codecov.

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


Using withAdalLogin example, after login still redirect to the home page

After trying the withAdalLogin example, I found it always redirect to the home page after the user successfully login, not redirect to the specific route in the . I figured out it may because of the AAD can only redirect to base URL. I just wonder do we have any solutions to do so? like how to check if the user has login into AAD?

yes you have to set postLogoutRedirectUri in the config object


no license file

This is a public repository, but I do not see a license file. A public repository from DIAGNijmegen like https://github.com/DIAGNijmegen/rse-panimg does have one. Do we have a guideline here? My proposal is that every public repository from DSIAGNijmegen must have a license file. @jmsmkn could you advice what would be a good rule and where we should store this guideline?

There are probably too many variables to have a blanket policy, it depends on the stakeholders, funders, maybe even valorisation.
For this particular repo probably something completely permissive is wanted, so I would use Apache 2.0.

Apache 2.0 license has been added: c0cd7c057c1767c9f98ddfcb853545ddf46cb4f7


F12 stopped working on linux

After version 1.80 F12 just stopped working on ubuntu!

Can you share what kind of project you're trying to load and the output from the 'C#' output window?

Its a library project.
The output says this -> otnet path: /home/koyllis/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.10/dotnet
Activating C# standalone...
info: LanguageServerHost[0]
Starting server...
But anyways all procjects behave the same.. For example if you press F12 on DateTime it says definition not found!
On windows its ok!

I'm on windows and I actually get the same error.
When I press F12 on anything I get an error message like:
The editor could not be opened due to an unexpected error: Unable to resolve resource
c:%5Users%5user%5Desktop%5MyProject%5SomeCodeFile.cs

Check whether your C# extension is pre-release version. If it's, switch back to the stable one. That helps resolve the problem in my case

Check whether your C# extension is pre-release version. If it's, switch back to the stable one. That helps resolve the problem in my case

I already rolled back to a previous version, it solved it in my case too. Thanks,

I noticed that when a  .sln file is present then everything works fine!
But if you open a .csproj it just stops working!
In other works if the folder does not contain  a .sln file then F12 Fails!

Had the same issue on Linux.
I installed an older version of the C# Dev Kit (0.2.100) extension, it started to work.
Then I re-updated to the latest one (0.3.21), and it is still working.

I also get the same "The editor could not be opened due to an unexpected error: Unable to resolve resource" on Windows. Rolled back ms-dotnettools.csharp to 2.0.328 and it works again.

The only solution that works for now is to create a sln file and include the csproj ...

I noticed that when a .sln file is present then everything works fine!
But if you open a .csproj it just stops working!

Yup this is a known issue that has been fixed (hopefully will be released later today).  See https://github.com/dotnet/vscode-csharp/issues/6013

When I press F12 on anything I get an error message like:
The editor could not be opened due to an unexpected error: Unable to resolve resource
c:%5CUsers%5Cuser%5CDesktop%5CMyProject%5CSomeCodeFile.cs

This is also known, and should be fixed in the same release.  Fix was merged in https://github.com/dotnet/vscode-csharp/pull/6091
I'll close this issue since I think all the problems listed are known and should be resolved in the upcoming release.


[5.7] Remove duplicate code

We don't need HasOneOrMany::update(), Builder::update() already adds the UPDATED_AT timestamp.
The tests expect the update() method in the HasOneOrMany class, so we have to remove them.

We should probably keep the tests though. Duplicate testing is not necessarily a bad thing.


docs: Ionic v2 docs for plugins are unavailable

From @matheuscas on February 10, 2016 20:20
Type: docs
Ionic Version: 2.x
Platform: all
When I make a search for "Ionic Native" and click on it, I receive this:
Cannot GET /docs/v2/platform/applinks/
It seems to be like this in all links about Ionic Native.

Copied from original issue: driftyco/ionic#5395

From @matheuscas on February 10, 2016 20:28
Oh, sorry about that. I thought it would have some docs for the announcement for the new beta.

From @tlancina on February 10, 2016 20:24
Thanks for the issue, Ionic Native is still under development and the docs will go live soon :)

Docs are up!


Add Direct IO support to dsync, and improve updating of timestamps.

Signed-off-by: Honwai Leong<EMAIL_ADDRESS>

Thanks for the PR, @hwleong .  This generally looks good.
I think the existing code should be avoiding setting metadata on files that are already the same metadata values.  The existing code does add all files to the metadata_refresh list.  But we then eventually call the following function on each of those:
https://github.com/hpc/mpifileutils/blob/a9cd09d6a4412b5a5e87419c8423d6d79f32caab/src/common/mfu_flist_copy.c#L3081
That function checks  each field, and it skips the metadata update for a field if the source and destination are already equal.  Was this not working for you?
For --synchronous I realize we should support O_DIRECT to our function that compares file contents.  I'll open an issue to track that as future work.

The existing code works as it should, but it took another round of walk through of metadata_refresh list to do the check, i.e. all files that exist in both source and destination. If there are millions of files, this step spends a lot of time in checking the metadata and update them where necessary. My modification move the metadata check to earlier loop, and list only files that require metadata update into the metadata_refresh list, greatly reduce the amount of files to be updated later by the mfu_flist_file_sync_meta function. I could see a reduction of few minutes in this step down to less than few seconds.
The O_DIRECT is important for syncing NFS to NFS, I added this because it reduces intensive memory caching on the server, at some point the heavy caching could potentially knock down a node.

On Sep 13, 2020, at 1:01 AM, hwleong<EMAIL_ADDRESS>wrote:

The existing code works as it should, but it took another round of walk through of metadata_refresh list to do the check, i.e. all files that exist in both source and destination. If there are millions of files, this step spends a lot of time in checking the metadata and update them where necessary. My modification move the metadata check to earlier loop, and list only files that require metadata update into the metadata_refresh list, greatly reduce the amount of files to be updated later by the mfu_flist_file_sync_meta function. I could see a reduction of few minutes in this step down to less than few seconds.

It makes sense to reduce/avoid duplicate accesses to files.  For distributed
filesystems, repeat access to the files is not free, especially if the access
is far apart and the files are unlikely to still be in cache on the client.

The O_DIRECT is important for syncing NFS to NFS, I added this because it reduces intensive memory caching on the server, at some point the heavy caching could potentially knock down a node.

Using O_DIRECT is definitely useful for avoiding kernel->user->kernel data
copies, as long as the IO size is large enough (10s of MB) to avoid the sync
latency for the read/write operations (which cannot be cached).
Even better would be trying to use the copy_file_range() interface.  For NFS
this can result in the file being copied directly on the server, and support
for this is just being added to Lustre for 2.14.  Another appealing IO option
is to use libaio and/or io_uring (for newer kernels) to allow direct-but-async
read/write requests to get the best of both worlds.
Cheers, Andreas

The existing code works as it should, but it took another round of walk through of metadata_refresh list to do the check, i.e. all files that exist in both source and destination. If there are millions of files, this step spends a lot of time in checking the metadata and update them where necessary. My modification move the metadata check to earlier loop, and list only files that require metadata update into the metadata_refresh list, greatly reduce the amount of files to be updated later by the mfu_flist_file_sync_meta function. I could see a reduction of few minutes in this step down to less than few seconds.

I see.  That's a nice performance gain.
I think we need a check for atime/mtime, as well.  See the corresponding check at the bottom of the mfu_flist_file_sync_meta function here:
https://github.com/hpc/mpifileutils/blob/a9cd09d6a4412b5a5e87419c8423d6d79f32caab/src/common/mfu_flist_copy.c#L3119
Does including that atime/mtime check impact the cost?

Thanks for the tips on those other functions and planned future work, @adilger .
I suspect someone could add copy_file_range as an option without too much work.
For O_DIRECT, I know that we also need to do some work to align buffers/offsets properly, especially when copying between source/destination file systems that have different block alignment requirements.  I think we need to compute the minimum common multiple.?  Also, can someone use statfs or something to figure out what the block size is in a portable way?

The existing code works as it should, but it took another round of walk through of metadata_refresh list to do the check, i.e. all files that exist in both source and destination. If there are millions of files, this step spends a lot of time in checking the metadata and update them where necessary. My modification move the metadata check to earlier loop, and list only files that require metadata update into the metadata_refresh list, greatly reduce the amount of files to be updated later by the mfu_flist_file_sync_meta function. I could see a reduction of few minutes in this step down to less than few seconds.

I see. That's a nice performance gain.
I think we need a check for atime/mtime, as well. See the corresponding check at the bottom of the mfu_flist_file_sync_meta function here:
https://github.com/hpc/mpifileutils/blob/a9cd09d6a4412b5a5e87419c8423d6d79f32caab/src/common/mfu_flist_copy.c#L3119
Does including that atime/mtime check impact the cost?

I could add in mtime check, it would cost some cpu time, but I don't think it would cost much, since the check would be done in the same loop. I didn't add it in this change because I thought the following dsync_strmap_compare_lite function would check for it, and if mtime is different, that file would be marked for copy over anyway, which will also take care of updating the mtime. Logically speaking, mtime changes when a file is edited, it is rare to have mtime changed outside of editing the file itself. atime likely is less important from "rsync/dsync" perspective, as long as the file content is not changed. I mean we don't resync a file because the atime is different, we resync it if the mtime is different (which means the content of the file may have been updated that requires to be synced over).

Currently, dsync copies all of uid, gid, mode bits, atime, and mtime from source to destination files so that those values match.  As a first step, I'd like to keep this optimization in this PR consistent with those existing semantics.
Right now, I think src/dest files whose atimes are different would sneak through unchanged.  My other thought was to see whether this additional check on atime/mtime might be causing dsync to execute more metadata updates due to atime differences, which could help explain some of the higher cost.
As future work , it's worth considering whether we should really be copying atime over by default.  You make a point that it's likely not necessary.  If we decide to not copy atime by default, we may want an option to enable it by an option.

Ok, I added mtime and atime (including nanoscale) check for listing into metadata_refresh. Ran the test in my environment, looks good. The time spent in updating timestamps will relatively be longer (which is expected) as more files are accessed at the source (despite no change in content).

Thanks @hwleong .
One more thing... I don't think we have to call dsync_strmap_item_update here, because I think that should be handled in this call:
https://github.com/hpc/mpifileutils/blob/a9cd09d6a4412b5a5e87419c8423d6d79f32caab/src/dsync/dsync.c#L1602
Did you find that it was not?
If it is, then I think we could modify mfu_flist_file_sync_meta to have a check-but-don't-change mode.  Under this mode, it would do all of its normal checks, but it would not actually update the destination file.  Instead, it would just indicate though a return code whether it found that the destination file needs to be changed (1) or not (0).  Then we can call that function and add the file to the list only if a change is actually needed.  I think that would save us from having to duplicate the code that does the checks.

Honestly speaking, I'm not quite sure what that mfu_flist_file_sync_meta function does, or how to use it. Looks like it will only do the check if dsync_option_need_compare of those attribute returns true. By default they are not checked, unless we explicitly specify it in the undocumented "-o" option. If I understand the code correctly, the defaults are:
"EXIST=COMMON@CONTENT=DIFFER",
"EXIST=COMMON@CONTENT=COMMON",
"EXIST=COMMON@TYPE=DIFFER",
"EXIST=COMMON@TYPE=COMMON",
"EXIST=DIFFER",
"EXIST=COMMON"
So, not sure if we should include all of the attributes like UID=COMMON@UID=DIFFER, GID=COMMON@GID=DIFFER etc. into the defaults?
Also, with or without the dsync_strmap_item_update, it doesn't affect whether a file would be listed into metadata_refresh. So, we can omit it, if we want.

I agree that we should not repeat the code, but the current design of dsync uses two loops. First loop is to sync data, second loop to sync metadata. My change included the check for metadata difference in first loop, then short list files that need to be updated. This is the reduced list which will be used in the second loop. The purpose of my change is to reduce the number of files to go through metadata update in the second loop, and thus reducing the time.
I sort of understand the purpose of using two loops. We can't seem to avoid having separate check for data and metadata, thus the two loops. I wonder if we could just move the mfu_flist_file_sync_meta directly into the first loop, removing the need of listing into metadata_refresh and run another second loop.
Doing so may cause conflict with the data check, which also use mtime to determine if a file content is different. so, if we somehow do the sync_meta before the data check, that would sync the mtime, and mark a file to have no file content difference. If we do it afterwards, probably better? I need to have a look to see what makes sense.

So, I had a look again. Looks like it is not possible to put sync_meta into the first loop. So, after evaluating the flow of the code again, I think the latest change I made should make it cleaner. I removed the redundant functions as you suggested, and leverage on existing dsync_compare_metadata function to check for the metadata difference. I added the following to dsync_default_outputs so that dsync_compare_metadata will run the checks on those attributes:
"EXIST=COMMON@UID=DIFFER",
"EXIST=COMMON@GID=DIFFER",
"EXIST=COMMON@PERM=DIFFER",
"EXIST=COMMON@ATIME=DIFFER",
"EXIST=COMMON@MTIME=DIFFER",
Then after dsync_metadata_compare which is already in the code, I check the state of UID, GID, PERM, ATIME, and MTIME to see if they are DCMPS_DIFFER, if they are we include the file into metadata_refresh.

I think I've confused the situation now.  Sorry.  I am hoping we can call mfu_flist_file_sync_meta in both loops.
We'd need to modify that function.  The first call would execute that function in a check-only mode.  We'd use the result of that check to know whether to add the file to the metadata_refresh list, like I showed above.
The second call would execute that function in a check-and-change mode which would actually update the metadata on the destination files.  This approach contains the code that does the check to one function, which is safer.
Is that not possible?

I think that's exactly what I have done now. The first loop uses the dsync_compare_metadata function, which is a check-only mode. And the second loop executes the dsync_sync_metadata function to check and update metadata of the short-listed files (from the first loop).
Both functions are existing functions in the code already. I did not change any of these functions. I simply enable the check for uid, gid, perm, mtime and atime. The original does not include these in the dsync_default_outputs variable.

The part that I'm worried about is we have two different bits of code that both check whether meta data values match that could be a tempting source for bugs to creep in.  However, that's a separate problem from what you're adding in this PR.  We could likely merge in your changes and deal with that as future work.  Let me take a fresh look at things.

Thanks @hwleong .  This looks good.
Before we merge, would you please update the title portion of your commits with something like:
dsync: add Direct IO support
dsync: speed up timestamp updates

I like to prefix the commits with what tool they affect if the changes are limited to one tool.
Then it's ready to go.

Thanks @hwleong . This looks good.
Before we merge, would you please update the title portion of your commits with something like:
dsync: add Direct IO support
dsync: speed up timestamp updates

I like to prefix the commits with what tool they affect if the changes are limited to one tool.
Then it's ready to go.

Do you mean the pull request title? It is a one line title, so I changed it to "dsync: add Direct IO support to dsync; speedup metadata updates". My apology to have included to quite different changes in one pull request. They are supposed to be two different one.
If you mean changing the commit comment, I'm not sure what would be the best way to change that. As there are three commits that refines to the current state of metadata speed up, do you want all of them to have same comments? The first one is quite long actually.

Oh, right.  Yes, there are 4 commits here, not 2.  I was hoping you could rewrite the commit message on each using a git rebase -i master and then select reword to add a short one-line title for each.
So for example, modify the commit message to include a short one-line summary like:
dsync: speed up timestamp updates

This change speeds up updating timestamps on newly copied files.

Before this change, the dsync_strmap_compare function
walks through all files that have common existence in
both source and destination to check for difference
in metadata (uid, gid, perm, atime, and mtime), then
update the destination to match the source accordingly.

For large directory, metadata refresh spends a lot of
cycle time for a second walk through all the files.
As noted in dsync.c, this is not efficient, especially
if only a very small number of files needs metadata
update.

This change updates dsync to do an earlier check on
the metadata (uid, gid and perm) right after the
first walk, and include only those that
have different metadata to the metadata_refresh array.
Thus, the mfu_flist_file_sync_meta function only
checks and updates as necessary on a subset of files,
instead of all the files again.

I did not do a check on mtime or atime to determine
if the file need to be included into metadata_refresh
array, since files with different mtime/atime are
considered different, where dsync will copy the file
anyway and update along its metadata.

Signed-off-by: Honwai Leong<EMAIL_ADDRESS>
That way it will display more cleanly when someone is browsing the commit history.
After that, you can force push back to your branch.

Alright, got it. Since three of the commits are related to improving metadata updates, I combined them into one single commit edited the comments. Hope this looks cleaner and better.

Looks good.  Thanks, @hwleong !


Tutorial does not work with Terra master

Informations

Qiskit Ignis version: master
Python version: 3.8
Operating system: OSX

What is the current behavior?
The tutorial: https://github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/noise/3_measurement_error_mitigation.ipynb
fails when using Terra master
/opt/miniconda3/lib/python3.8/site-packages/qiskit_terra-0.15.0-py3.8-macosx-10.9-x86_64.egg/qiskit/result/postprocess.py in format_counts(counts, header)
    168     """
    169     counts_dict = {}
--> 170     for key, val in counts.items():
    171         key = format_counts_memory(key, header)
    172         counts_dict[key] = val

AttributeError: 'Obj' object has no attribute 'items'

Steps to reproduce the problem
What is the expected behavior?
Suggested solutions

I think this was already fixed on ignis master with: https://github.com/Qiskit/qiskit-ignis/pull/400 (well really https://github.com/Qiskit/qiskit-ignis/pull/401 but that's because I had to inline it to fix ci, the PR summary on 400 is better)

Oh yeah your correct, my install was picking up the old 0.3 rather than the master I just installed.


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-27-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 3270

Questions ?
Please refer to the Backport tool documentation


Breaks Dashboard admin menu on Multisite

When Airplane Mode is enabled on Multisite, the Dashboard admin menu points to my-sites.php instead of index.php.
Haven't looked into why this is happening yet.

Removing or commenting out https://github.com/norcross/airplane-mode/blob/master/airplane-mode.php#L367 fixes the issue. But I'm not quite clear on why it's there in the first place. @norcross will have to provide more insight.

found the issue and have a fix coming in the next release.


Card Widget Setting Color Attribute not in force

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
Flutter 3.16.2
Card(
color: Colors.white,
shadowColor: Colors.black54,
elevation: 1.4,
child:Sizebox(width: 500,height:500),
)
Expected results
The above code will get a card component with white background color in flutter 3.13, but in flutter 3.16 the background color is purple background.
Removing the elevation attribute gives a white card but without the border shadow. I tested this and found out that it is because the useMaterial3 property is true by default in flutter 3.16.
How can I get a Card Widget with a white background and shadow effect while using useMaterial3?
Actual results
Expected described
Code sample
Card(
color: Colors.white,
shadowColor: Colors.black54,
elevation: 1.4,
child:Sizebox(width: 500,height:500),
)
Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Flutter 3.16.2

Hi @LoveHeiZhu
I can see the issue but surfaceTintColor: Colors.white seems to make it work. You can try this to see if it fits your case.

Demo

May be also related: https://github.com/flutter/flutter/issues/132199

Thanks a lot, solved my problem!


Optimize proxy interface and method

What is the purpose of the change
Optimize proxy interface and method
Brief changelog

Add popMessage AddressableMessageQueue interface

Change ClusterMessageService field to protected

Add notification in MQClientAPIExt

Codecov Report

Merging #5628 (5e12d3b) into develop (d3de48c) will decrease coverage by 0.03%.
The diff coverage is 8.69%.

@@              Coverage Diff              @@
##             develop    #5628      +/-   ##
=============================================
- Coverage      42.46%   42.43%   -0.04%
- Complexity      7971     7972       +1
=============================================
  Files           1023     1023
  Lines          71449    71477      +28
  Branches        9439     9444       +5
=============================================
- Hits           30340    30330      -10
- Misses         37276    37308      +32
- Partials        3833     3839       +6

Impacted Files
Coverage Δ

...q/proxy/service/message/ClusterMessageService.java
13.46% <ø> (ø)

...ocketmq/proxy/service/mqclient/MQClientAPIExt.java
36.45% <0.00%> (-2.25%)
:arrow_down:

...he/rocketmq/proxy/processor/ConsumerProcessor.java
47.03% <40.00%> (-0.17%)
:arrow_down:

...n/java/org/apache/rocketmq/test/util/StatUtil.java
15.49% <0.00%> (-14.09%)
:arrow_down:

...xy/service/transaction/TransactionDataManager.java
79.72% <0.00%> (-4.06%)
:arrow_down:

...tmq/broker/longpolling/PullRequestHoldService.java
63.72% <0.00%> (-2.95%)
:arrow_down:

...he/rocketmq/client/trace/AsyncTraceDispatcher.java
82.21% <0.00%> (-1.45%)
:arrow_down:

...mq/client/impl/consumer/RebalanceLitePullImpl.java
69.86% <0.00%> (-1.37%)
:arrow_down:

...apache/rocketmq/store/ha/GroupTransferService.java
92.30% <0.00%> (-1.29%)
:arrow_down:

...che/rocketmq/namesrv/kvconfig/KVConfigManager.java
62.36% <0.00%> (-1.08%)
:arrow_down:

... and 21 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


As for Gradle 6.7 or lower, org.gradle.api.Action conversion from Groovy may be incompatible with Kotlin DSL.

org.gradle.api.Action calls from Kotlin DSL cause a build failure if the functions are originally written in Groovy.
Expected Behavior

Builds succeed without any failure. Or personally, I'd be happy if this restiction is noted in the documents.
Current Behavior

Builds fail due to missing lambda's classes.
Context

I"m writing Gradle plugins in Groovy and wanna support both of Groovy DSL and Kotlin DSL properly. I'm following https://docs.gradle.org/current/userguide/kotlin_dsl.html to fit Kotlin DSL users' usecases but the issue happened.
Steps to Reproduce

Write a plugin and create a function that takes org.gradle.api.Action in Groovy
Create a project that uses Gradle 6.7 or lower
Call the function from Kotlin DSL

A reproducable project is here. https://github.com/jmatsu/repro-kotlin-dsl-bug-gradle-plugin-written-in-groovy
This happens only when, the all following conditions are met.

The functions are written in Groovy
Gradle at runtime are ver. 6.7 or less

There is a workaround that is rewriting classes that have functions with org.gradle.api.Action from Groovy to Java.
Your Environment

Build scan URL: N/A

I'm not sure where you're getting those version numbers from. Gradle stopped at 5.6.4 and went to 6.0, so 5.7/5.8 do not exist.
If you're going to write your plugins in Groovy, I would always add @groovy.transform.CompileStatic. Does that avoid the issue?

So sorry, 5 is wrong but 6 is correct. Let me modify these typos.
Okay, I′ll try CompileStatic.

@groovy.transform.CompileStatic solved the issue. Should we always add this annotation as much as possible?

Yes, I would. That's what we recommend for other reasons.

Make sense.
After reinvestigation, I found this happened because of Kotlin's type inference algorithm. The old inference algorithm that Kotlin has used in 1.3 or lower doesn't work with Groovy's Dynamic compilation. Gradle 6.8 upgraded Kotlin to 1.4 and use 1.3 version mode for the compatibility concern. However, Kotlin's new type inference algorithm (ref: https://kotlinlang.org/docs/whatsnew14.html#new-more-powerful-type-inference-algorithm) became active regardless of the configuration.
We should use dynamic compilation iff we need it. Thank you for your help!


linting - moved key

📝 Changed routes:

/

(view full size)

Commit 68f17888cc002140f99f62e40ef6ac3d336f6c4a (https://gndclouds-n21jcq2ii-gndclouds.vercel.app).


init kuyen-icon-theme, and antu-icon-theme

Description of changes

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

Could you squash the changes into 3 commits like this?
maintainers: add iamanaws
kuyen-icon-theme: init at 0-unstable-2024-01-27
antu-icon-theme: init at 0-unstable-2024-01-23

If you're unfamiliar with interactive rebasing, feel free to ask. It might be a good idea to mark the PR as draft before force pushing. If you accidentally include a bunch of other commits in the rebase, it will ping a ton of people unless it's marked as draft.

@Iamanaws squashing the package related commits is still a todo and the pipeline is also still failing because of formatting. It seems like you are only using the github webinterface, I can highly recommend you to use some texteditor like vscode or neovim locally. Feel free to ask for help if you need some pointers.


Fix SimultaneousReadWritesDone test

This test was not observing the contract on the streaming API. In particular, Finish should not be called until the client is sure that there is no more message to be read (as documented in the comments for ClientStreamingInterface::Finish).
We need to improve the documentation for this interface. An issue is filed in #5420 .

Does this meet the desired green threshold? Note that sanity is failing because of a hardcoded date issue.


merge from arlac77/template-github-action,arlac77/template-kronos-component

package.json

merge from template package.json

.github/workflows/ci.yml

chore: (jobs.build.steps)

.github/workflows/update_readme_api.yml

chore: (jobs.update_readme_api.steps)
chore(deps): add 14.4.0 remove 14.2.0 (jobs.update_readme_api.steps.with.node-version)

Codecov Report

Merging #1051 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1051   +/-   ##
=======================================
  Coverage   89.73%   89.73%
=======================================
  Files           7        7
  Lines         692      692
  Branches       73       73
=======================================
  Hits          621      621
  Misses         71       71

Continue to review full report at Codecov.

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


docs: add badge use case

Summary
shields.io supports logos from simple-icons. I added a use case of the simple-icons one. In this case, users can customize their badge as they want.

The icon on https://simpleicons.org/?q=jest  is a little different with .
That's because Simple Icons picks the icon from the official logo by default.
Please let me know if you want to use the icon in . I can help with that.
Test plan
No test plan for README changes. But I'd like to help if you want any tests for this change.

Are those failing tests expected? Do I need to take care of those failing snapshots?

Bah, I hate that warning (https://github.com/browserslist/browserslist/issues/663).
I'll update main


Release Notes

Missing 0.12 release notes.
Also, the list of "Release Notes" in the bottom half of the page is a little bit odd.

Opened #43 to add the release notes for v0.12. We are looking into how we can disable these extra page content listings at the bottom of every page still! There's a few places where this looks odd.


Certification failed due to offset report not correct when playing music

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.
Briefly summarize your issue:

When I am trying to play music and validate it using MVT tool(music validation tool) then the "ProgressReportDelayElapsed" has been failing.
It is showing that the expected is 1000 and the outcome is 5386
From the MVT tool the results are as follows:
12/17/2019 06:12:51 EVENT url ProgressReportDelayElapsed FAIL [INCORRECT_OFFSET_TOO_HIGH] 5386
(Expected:
1000)
What is the expected behavior?

https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/audioplayer.html#progressreportdelayelapsed
It is clearly mentioned in amazon forum.
What behavior are you observing?

progressreportdelayelapsed is higher than expected.
Provide the steps to reproduce the issue, if applicable:

Tell us about your environment:

What version of the AVS Device SDK are you using?
avs sdl 1.12
<x.y.z>
Tell us what hardware you're using:

[ ] Desktop / Laptop
[ ] Raspberry Pi
[ .] Other - tell us more:
android

Tell us about your OS (Type & version):

[ ] Linux
[ ] MacOS
[ ] Raspbian Stretch
[ ] Raspbian Jessy
[ .] Other - tell us more:
pie

AMAZON_CLOUDFAILED1576563751125.pdf
Please find the test results.

Hi @dipalisb, could you try with a newer release of the SDK?  For example, looking at CHANGELOG.md, the below issue is fixed in v1.12.1.
Corrected pause/resume handling in ProgressTimer so that extra ProgressReportDelayElapsed events are not sent to AVS.

Hi @kclchan ,
Thanks for the response.
We have verified this issue on avs sdk 1.12.1 and it is working fine.
But, there are some other scenarios which are failing.
PlaybackStopped and PlaybackNearlyFinished are failing.
Please find the test results
avs_1_17_testresults.pdf

Hi @dipalisb, just to confirm, are you testing with 1.12.1 or 1.17?  Also, could you try to rerun the tests and see if you get the same result?  And please attached the DEBUG9 log as well.  Thanks!

Hi @kclchan ,
As suggested we have tested with AVS SDK .12.1 and now we want to upgrade to SDK 1.17.0 so we  have tested with both the versions.
With both the versions we facing similar issues failing.
1.) Extra ProgressReportDelayElapsed
2.) Incorrect PlaybackStopped offset when song is interrupted
3.) Delayed PlaybackStarted
Please find the attachment for DEBUG9 logcats. It is tested on SDK1.12.0 and above mentioned three scenarios are  failing.
avs_1_12_0_debug9_1.txt
Also, please find the attached test-results.
avs_1_12_0.pdf
The above three scenarios are failing from our end.

Hi @kclchan ,
We have tested this scenario on AVS SDK v1.17.0 and below mentioned scenarios are failing.

PlaybackStopped
PlaybackStarted
PlaybackNearlyFinished
PlaybackFinished
Could please let us know what was the actual cause for this failure.

Please find the debug9 logcats for avs sdk 1.17.0
avs_1_17_0_debug9_1.txt
Also the test results
avs_1_17_debug9_1.pdf
Thanks,

Hi @kclchan ,
May I know, is there any update on this issue.
Could you please respond as soon as possible.
Thanks,

Hi @dipalisb ,
We have created an internal tracking issue to investigate this. Thank you for reporting this issue.

OK
We will be waiting for your response
Thanks,

Hi @samcoult , @kclchan ,
May I know is there any progress on this issue.
And also, could please confirm that Is there anything that we can do to resolve this issue from device side.
Thanks,

Hi,
Could you please tell us ,Is there any update on this issue.
This issue is blocking for amazon certification.
Thanks,

Hi,
Could you please tell us ,Is there any update on this issue.
Thanks,

Hi @dipalisb we are still investigating this internally

Hi @dipalisb, sorry for the long delay.  Looking at the logs avs_1_17_0_debug9_1.txt where you tested with v1.17, it appears there were lots of stuttering happening during the audio playback, and that is causing the certification to fail.  Could you retry the test again with v1.17, preferably with a better internet connection, and see if the result is different?

I'm going to close this due to inactivity, but please open a new issue if you continue to have problems, or comment on this one again if it is not resolved.


[CLI] Suggest bundle update --bundler when a newer version is installed

What was the end-user problem that led to this PR?
The problem is once users start using our new bin/bundle binstub or the RubyGems that helps lock to the bundler version in the lockfile, the outdated bundler version warning was outdated.
What was your diagnosis of the problem?
My diagnosis was we needed to tell people to bundle update --bundler, and restrict the gem install suggestion to when the latest version indeed wasn't installed.
What is your fix for the problem, implemented in this PR?
My fix takes into account the actual installed bundler versions.
@indirect I think this addresses your concern on the RG PR?

@segiddins yep, I think this is right. 👍🏻
@bundlerbot r+


Feature/multi choice matrix

New multiple choice matrix question is implemented
Possible to select multiple answers with limitations defined by the question author

Closes #100

When multiple selections is enabled, subjects titles are centered in their cells. Should be aligned left.


add benchmarks with 5 concurrent runs

as 10 concurrent runs are very likely bounded by #CPUs so their times may not be representative based on the machine they are run on

ack


Add reentrancy guard

Pull Request Test Coverage Report for Build 1327

5 of 5 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 1283:
0.0%

Covered Lines:
334

Relevant Lines:
334

💛  - Coveralls


[AVM Module Issue]:   "registerResourceProviders": "[take(format('lz-vend-ds-create-{0}', is not ending and this job continues to run more than 35min, hence have to cancel it.

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Issue Type?
Bug
Module Name
avm/ptn/lz/sub-vending
(Optional) Module Version
module subVending 'br/public:avm/ptn/lz/sub-vending:0.1.2' = {
Description
The Job   "registerResourceProviders": "[take(format('lz-vend-ds-create-{0}', uniqueString(parameters('subscriptionId'), parameters('deploymentScriptResourceGroupName'), parameters('deploymentScriptName'), deployment().name)), 64)]",
which is in my case is lz-vend-ds-create-wydd6ykdfcfki under resource group
rsg-australiasoutheast-ds is not finishing, it is kind a loop or not sure but keeps running for more that 35min, hence have to cancel the job, is it expected or some other issue.
registerResourceProviders: take(
'lz-vend-ds-create-${uniqueString(subscriptionId, deploymentScriptResourceGroupName, deploymentScriptName, deployment().name)}',
64
)

(Optional) Correlation Id
rsg-australiasoutheast-ds | Deployments while creating this rg it throws error
### Tasks

Hi @sebassem and @jtracey93 , thanks for fixing previous issue in storagev2 ZRS, this is also part of same rg, which never finish , the resourceproviders tasks deployment is like running in a loop, not sure but not finishing in 35min, I am gonna run one more time and see.

can you share your module parameters ?

@NirajCricket can you check the resource providers status in the portal and let us know what you see there ?

@NirajCricket can you check the resource providers status in the portal and let us know what you see there ?

#RR

Closing for no response


ModuleNotFoundError: No module named 'tensorflow.compat'

Please go to TF Forum for help and support:
https://discuss.tensorflow.org/tag/keras
If you open a GitHub issue, here is our policy:
It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead).
The form below must be filled out.
Here's why we have that policy:.
Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information.

Have I written custom code (as opposed to using a stock example script provided in Keras):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 2.11
Python version: 3.10.4
Bazel version (if compiling from source):
GPU model and memory: Titan V
Exact command to reproduce:

You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the problem.
I am not able to create a custom Keras accuracy that extends the MeanMetricWrapper I keep getting:
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Development\Projects\DeepTradingAI\deeptrading\DeepTradingAI.py", line 5, in <module>
    from CustomAccuraciesDeepTrading import DirectionClassificationAccuracy
  File "C:\Development\Projects\DeepTradingAI\deeptrading\CustomAccuraciesDeepTrading.py", line 2, in <module>
    from  keras.metrics import MeanMetricWrapper
  File "C:\Development\Python\Python3104\lib\site-packages\keras\__init__.py", line 21, in <module>
    from keras import models
  File "C:\Development\Python\Python3104\lib\site-packages\keras\models\__init__.py", line 18, in <module>
    from keras.engine.functional import Functional
  File "C:\Development\Python\Python3104\lib\site-packages\keras\engine\functional.py", line 24, in <module>
    import tensorflow.compat.v2 as tf
ModuleNotFoundError: No module named 'tensorflow.compat'

This fails when I do:
from  keras.metrics import MeanMetricWrapper
Please give me a workaround!
Describe the current behavior.
Describe the expected behavior.
Contributing.

Do you want to contribute a PR? (yes/no):
If yes, please read this page for instructions
Briefly describe your candidate solution(if contributing):

Standalone code to reproduce the issue.
from keras.utils import metrics_utils
from  keras.metrics import MeanMetricWrapper

class DirectionClassificationAccuracy(MeanMetricWrapper):

    def __init__(self, name=None,dtype=None, threshold=0.5, period="daily"):
        super().__init__(
            metrics_utils.binary_matches, name, dtype=dtype, threshold=threshold
        )

        self.period = period

    def update_state(self, y_true, y_pred, sample_weight=None):
        y_pred = y_pred[:, 0]
        y_true = y_true[:, 0]

        super().update_state(y_true, y_pred)

Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
Source code / logs.
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

@nectario,
Instead of using  keras.metrics import MeanMetricWrapper, Could you please try to import keras from tensorflow and check if it helps.
import tensorflow as tf
from tensorflow import keras
from  tensorflow.keras.metrics import MeanMetricWrapper

Kindly find the gist of it here. Thank you!

Thank you. I now get this error:
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Development\Proj\deeptrading\DTAI.py", line 5, in <module>
    from CustomAccuraciesDeepTrading import DirectionClassificationAccuracy
  File "C:\Development\Projects\DeepTradingAI\deeptrading\CustomAccuraciesDeepTrading.py", line 2, in <module>
    from tensorflow.keras.utils import metrics_utils
ImportError: cannot import name 'metrics_utils' from 'tensorflow.keras.utils' (C:\Dev\Python\Python3104\lib\site-packages\keras\api\_v2\keras\utils\__init__.py)

After changing:
from tensorflow.keras.utils import metrics_utils
to
from keras.utils import metrics_utils
I have no error now.
Thank you.

@nectario,
Glad the issue is resolved for you, Could you please feel free to move this to closed status. Thank you!

After upgrading to TensorFlow 2.12 this issue started happening again:
/mnt/c/Development/Projects/DeepTradingAI/deeptrading/DeepTradingMain.py:4: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import strtobool
2023-04-04 20:00:25.362795: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-04-04 20:00:25.445066: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
Traceback (most recent call last):
  File "/mnt/c/Development/Projects/DeepTradingAI/deeptrading/DeepTradingMain.py", line 12, in <module>
    from DeepTradingAI import DeepTradingAI
  File "/mnt/c/Development/Projects/DeepTradingAI/deeptrading/DeepTradingAI.py", line 5, in <module>
    from CustomAccuraciesDeepTrading import DirectionClassificationAccuracy
  File "/mnt/c/Development/Projects/DeepTradingAI/deeptrading/CustomAccuraciesDeepTrading.py", line 1, in <module>
    from keras.metrics.base_metric import MeanMetricWrapper
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/__init__.py", line 3, in <module>
    from keras import __internal__
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/__internal__/__init__.py", line 3, in <module>
    from keras.__internal__ import backend
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/__internal__/backend/__init__.py", line 3, in <module>
    from keras.src.backend import _initialize_variables as initialize_variables
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/src/__init__.py", line 21, in <module>
    from keras.src import models
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/src/models/__init__.py", line 18, in <module>
    from keras.src.engine.functional import Functional
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/src/engine/functional.py", line 23, in <module>
    import tensorflow.compat.v2 as tf
  File "/home/nektarios/.local/lib/python3.11/site-packages/tensorflow/__init__.py", line 476, in <module>
    _keras._load()
  File "/home/nektarios/.local/lib/python3.11/site-packages/tensorflow/python/util/lazy_loader.py", line 41, in _load
    module = importlib.import_module(self.__name__)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/api/_v2/keras/__init__.py", line 3, in <module>
    from keras.api._v2.keras import __internal__
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/api/_v2/keras/__internal__/__init__.py", line 6, in <module>
    from keras.api._v2.keras.__internal__ import models
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/api/_v2/keras/__internal__/models/__init__.py", line 3, in <module>
    from keras.src.models.cloning import clone_and_build_model
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/src/models/cloning.py", line 23, in <module>
    from keras.src.engine import sequential
  File "/home/nektarios/.local/lib/python3.11/site-packages/keras/src/engine/sequential.py", line 47, in <module>
    class Sequential(functional.Functional):
                     ^^^^^^^^^^^^^^^^^^^^^
AttributeError: partially initialized module 'keras.src.engine.functional' has no attribute 'Functional' (most likely due to a circular import)

@nectario,
Hi, This change is due to the recent development in pip packaging of Keras.
From Tensorflow 2.13, it allows access to public APIs which are explicitly exported via keras_export, rest all can be accessed through a private API under src folder.
Related post https://twitter.com/fchollet/status/1639776922019454976?s=20


Fix typing issue in MethodProperties class

Description
Same PR as #5655 but on the iso4 branch due to a merge conflict.
Fix typing issue in the MethodProperties.get_description_foreach_http_status_code() method.)
Self Check:

[ ] Attached issue to pull request
[x] Changelog entry
[x] Type annotations are present
[x] Code is clear and sufficiently documented
[x] No (preventable) type errors (check using make mypy or make mypy-diff)
[x] Sufficient test cases (reproduces the bug/tests the requested feature)
[x] Correct, in line with design
[ ] End user documentation is included or an issue is created for end-user documentation
[ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see test-fixes for more info)

Processing this pull request

Merged into branches iso4 in f445954d0be9644d160a5665b8ced31b997540e0


Fix kustomize config to conform to kubebuilder v2 layout

What this PR does / why we need it:

Fix current kustomize config layout
Remove status/address patch
add maxDescLen=0 to remove description string to reduce crd size per https://github.com/kubernetes-sigs/kubebuilder/issues/1140

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #405
Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

/retest

/retest

/approve


Question: PSRAM, is there a way of setting this up as a separate heap?

Hi Guys,
I have a Pimoroni Pico Plus 2 here, and I have the PSRAM mapped and working
I have had a look through the sdk docs and I am not sure how to set this memory up as some form of secondary heap, is there anything built into the sdk for doing this?
Many thanks
Andy

Thanks for the info.

We at SparkFun have a working solution here, in case that helps: https://github.com/sparkfun/sparkfun-pico?tab=readme-ov-file#replacing-the-integrated-memory-allocator-routines

Thanks for the info.
I ended up knocking a c++ wrapper up: https://github.com/AndrewCapon/PicoPlusPsram