Copy cells layers

Having a cell with different layers and references, is it possible to copy/translate one o multiple layers?
I have a "main cell" which is a set of multiple cells and cell references.  These contain different elements in seven different layers.  I wonder if it's possible to make a copy/translation of the whole "main cell", with the same set of cells and references, but just containing one of the layers.

A simpler way to ask the question: Is it possible to extract only one of the layers from a cell (composed by multiple sub-cells), and operate with the whole layer?

Is it possible to do Mirror copy?? cell, Polygon

I guess it should. My question is if it's possible to mirror/copy just one of the layers present in a cell.

For now this can only be accomplished more or less manually. Here's an example:
import gdspy

main = gdspy.Cell('main')

for i in range(3):
    ref_cell = gdspy.Cell('ref' + str(i))
    ref_cell.add(gdspy.Round((i, i), 0.5, number_of_points=4 + i, layer=i))
    main.add(gdspy.CellReference(ref_cell, (0, 0)))
    main.add(gdspy.Round((0, -1), 0.5, number_of_points=3 + i, layer=i))

# Create a new cell and manually copy contents
copy = gdspy.Cell('main-copy')

# Get all polygons and keep only those in layer 2, dataset 0
# Any transformation can be applied to these polygons
polys = main.get_polygons(True, 0)
if (2, 0) in polys:
    for poly in polys[(2, 0)]:
        poly[:, 0] += 2  # translate in x
        poly[:, 1] *= -1  # mirror in y
    copy.add(gdspy.PolygonSet(polys[(2, 0)], layer=2))

# Do the same for all references
# Unfortunately this has to be done through `elements`
for el in main.elements:
    if isinstance(el, gdspy.CellReference):
        ref_copy = gdspy.Cell(el.ref_cell.name + '-copy')
        polys = el.ref_cell.get_polygons(True, 0)
        if (2, 0) in polys:
            ref_copy.add(gdspy.PolygonSet(polys[(2, 0)], layer=2))
            # Now add the reference (note that we apply the same
            # transformations to the reference as to the polygons in the
            # main cell)
            origin = list(el.origin)
            origin[0] += 2
            copy.add(
                gdspy.CellReference(ref_copy, origin, el.rotation,
                                    el.magnification, not el.x_reflection))
    elif isinstance(el, gdspy.CellArray):
        # Analogous to CellReference
        pass

gdspy.LayoutViewer()

Thanks for the quick answer Lucas, it's exactly what I was looking for!


Support repeat() inside grid-template

Declarations such as
* {
    grid-template: auto / repeat(3, 1fr);
}

are perfectly valid CSS, but the CSS3 package doesn't recognize the repeat() function in this context.

It is recognized in grid-template-rows and grid-template-columns, however.

closed by #196


Maps not working

Hi, I am a final year btech student I used your code to build the app but your maps aren't working as I am not able to the set my current location and add address of any apartment, whenever I Add the address it says the address is invalid....

Whenever I entered an address it says invalid ,please resolve that issue


[Feature Request] Decimal place options

I noticed the app defaults to round up to two decimal places on certain coins. Say a coin's value is 3.2256, the app and notification will show 3.23. I would much rather prefer to see 4 decimal places. Might this be implemented as a decimal place option within each notification's currency pair settings? A small-yet-huge quality-of-life improvement.

The app rounds differently for display, depending on the size of the number. E.g.: 123456.123->123456, 0.000012345 -> 0.00001235.
I agree that three significant digits for your case (3.23) are too little. This will be improved without additional options.

Fixed formatting values between 1 and 10, as for all other smaller values. All values consist of at least 4 significant digits (not only decimals).
The fix will be included to the next app release v2.51.
Example:
Before: 1.12345 -> 1.12, after fix: 1.12345 -> 1.123.
For the rest of the values, nothing has changed. Example:
0.12345 -> 0.1235 (the last digit is rounded)
0.012345 -> 0.01235
0.0012345 -> 0.001235
. . .
This formatting only affects display info. Alarm rules use original full values.
In my opinion, additional option will be superfluous, it will complicate the application.


GoQuery using up excess memory

Hello, I am creating an application that pulls loads of data from a website, parses it, then moves onto the next website. I noticed my memory usage was slowly increasing indefinitely over time and after using pprof to identify the problem, GoQuery was using 30-45% of my memory. Since this takes nearly 12 hours to reach this point, I don't know 100% if GoQuery is the problem. But I figured it wouldn't hurt to run it by you to see what you think. Here's how I'm using it:
doc, err := goquery.NewDocumentFromReader(strings.NewReader(body))
if err != nil {
	return
}

Now I do see in the documentation is says this: "It does not check if the reader is also an io.Closer, the provided reader is never closed by this call. It is the responsibility of the caller to close it if required."
I am calling strings.NewReader(body), so perhaps the problem is that I'm not closing out of this reader? I tried making it its own variable and seeing if there was a method to close it but there doesn't seem to be any. I also see that "doc" doesn't have a way to close out either. Could you please shed some light on how GoQuery disposes of memory and if you see any reason that GoQuery would be using so much memory? Thank you for any assistance. This has been a problem for a long time and I don't know where else to look from here.

Hello,
You say you have run the profiler, do you have the graph that you can share? Considering your app seems to heavily parse pages, it’s not necessarily indicative of a goquery issue that it uses a good chunk of the memory, but maybe there’s something that would stand out.
The strings.Reader is not a closable reader, so that shouldn’t be the problem. Do you notice the memory growing and then sharply dropping at regular intervals? That’s how it typically looks, when the GC collects unreachable objects. Goquery does use memory by design, due to its immutable selections approach, but the underlying html nodes are the same for a given document throughout its use. As long as you don’t hold onto goquery objects after their use, it would be garbage collected.
It will be pretty hard to find an issue/identify that it’s due to goquery without more details and ideally a way to reproduce, but the pprof graph could help. Also, what do you qualify “excess memory”, do you have some numbers just to double-check that it is indeed excessive?
Martin

Thank you for the response. I've actually made a discovery while doing some more testing. It turns out the problem was related to the way I was excessively calling it. I had a flaw in my logic that would call http.Client.Get() more than expected, which would then parse it with goquery. The real problem was hiding underneath and not actually a problem with goquery at all. Thank you for the information though, it is useful. Appreciate your time.


panic: runtime error: index out of range

Steps:

Hit f to filter
Type a filter that will yield 0 results (e.g. sdjkfhljkghlksdfh)
Hit Enter to save the filter
Hit Enter again
Program dies

If there's no containers listed it can't go into the container-specific view.

Thanks for the feeback @francislavoie; this should definitely be an easy fix. Will get it added to the next minor release.

fixed in latest release


User always redirected back to home_public when app is refreshed.

File: both/router/router.js
Reason:  Meteor.user() is called/used before user collection is available.
Note: Issue may only exist when user has slow inet connection.
This issue happen inside ensureLogged() function. Meteor.user() returns null value(even user is logged in) before this code block is executed:
Router.ensureLogged = function() {
console.log(Meteor,user()); // this will return null first.
if(!Meteor.user()) {
// user is not logged in - redirect to public home
this.redirect("/home_public");
return;
} else {
// user is logged in - check role
if(!routeGranted(this.route.name) ) {
// user is not in allowedRoles - redirect to private home
this.redirect("news");
return;
}
this.next();
}
};
Fix: put Meteor.subscribe("current_user_data"); inside waitOn() function like this:
Router.waitOn(function(){ Meteor.subscribe("current_user_data"); });
That ensure the users collection is available before the app will be rendered.

Thanks! Fixed and wil be uploaded in next version. Until then, you can change this in ~/.meteor-kitchen/templates/code/client_accounts.js (note: any change in these files will be overwritten when you install next version).

Fixed (v0.9.48)


[WIP] Fix/auto grow textinput

Based on, merge first:

https://github.com/Expensify/App/pull/20186

Main changes

Remove manually auto grow behaviour on mobile, as on mobile autoGrow is supported
Remove controlled selection prop as its unnecessary, causing unnecessary re-renders, and UI glitches
...

@parasharrajat Your the best thx, will let you know once its done, and will mention you on the PR that we will open against Expensify's app repository!

Hey @parasharrajat , the main issue with this one is that there is a native react native bug causing part of this behaviour which we very likely have to fix first (or find another solution).
I think I'll be available for looking into it either end of next week or the week after, so its still a bit on hold ...

Closed in favour of:

https://github.com/Expensify/App/pull/50238


Fix doc example to make it clear that ".returning()" does not preserve original order

The current doc example implies, that the order of returned values are always preserved:
let inserted_names = diesel::insert_into(users)
    .values(&vec![name.eq("Timmy"), name.eq("Jimmy")])
    .returning(name)
    .get_results(&connection);
assert_eq!(Ok(vec!["Timmy".to_string(), "Jimmy".to_string()]), inserted_names);

But unfortunately it's not guaranteed (at least definitely not by PostgreSQL DB, which is used for this doc test).
See more: https://stackoverflow.com/questions/5439293/is-insert-returning-guaranteed-to-return-things-in-the-right-order
P.S.
Thank you for the nice and reliable piece of software :heart:

@weiznich Thank you!


DX: Keep packages sorted

This PR

[x] keeps packages in composer.json sorted

💁♂ For reference, see https://getcomposer.org/doc/06-config.md#sort-packages.

so...
in PR you say it's a fix.
what bug is fixed by this ?

@keradus
Hmm, it's not a bug, but it's not a feature, either, right? Do you have a better idea for a category?

You don't need to stick to feature/bug. There are also docs, cleanups,
refactoring and so on. Here I would say it's a DX change ;) same milestone,
change is still good, it is just not a fix.
sob., 17 gru 2016, 14:58 użytkownik Andreas Möller<EMAIL_ADDRESS>napisał:

@keradus https://github.com/keradus
Hmm, it's not a bug, but it's not a feature, either, right? Do you have a
better idea for a category?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2410#issuecomment-267764391,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACl0euvyDyhh-dY0dVUnGIID8hP_5igcks5rI-qigaJpZM4LPVLw
.

--
Dariusz Rumiński

Thank you @localheinz.

Thank you, @keradus!


feat: Update Anthropic default models, pydocs

Update default chat model to the latest and cheaper claude-3-5-sonnet-20240620
Update pydocs, unit tests and example

@silvanocerza @anakin87 just updated Cohere PR and he's familiar with this update, feel free to verify as well

You should tweet about Claude 3.5 Sonnet support 😃

It required heavy labour to enable the support. We need a clever example first!!!


[NG] Change locale strings to nominative form

This PR changes the currently used CLDR data strings provided by Angular (month names and day names) from their genitive to nominative form.
The change is motivated by the current (incorrect) form of strings for the Polish locale. For example September is rendered as września while it should be wrzesień.
The change itself doesn't make a visible difference for most languages (i.e. English, German) but fixes the form for the Polish locale and possibly others.
Signed-off-by: Paweł Białaszczyk<EMAIL_ADDRESS>

Thanks for the contribution. This change makes sense to me. More info here: http://cldr.unicode.org/translation/date-time
Make sure that the correct forms are provided, especially for the months, and used in the patterns. That is, suppose that the language uses "Dezembro"  for December when standing alone (LLLL), but "Dezembru" when with a date (MMMM, when it means the nth day of that month)
It looks like when the month is used alone, we should use the Stand-Alone style.
@youdz can you please verify?

Thanks for approving this PR!
In the meantime I've also updated the implementation for abbreviated month names accordingly (forgot last time) and updated test cases. Let me know if more changes are needed.
I've forgot to sign off my last commits. Is it OK to rebase & force push them again?

Yes please rebase and force push into a single commit!


[DOC] Update docs

Routine update

Codecov Report

Merging #120 (049ac16) into master (73cd49d) will increase coverage by 5.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #120      +/-   ##
==========================================
+ Coverage   62.74%   67.77%   +5.03%
==========================================
  Files          27       27
  Lines        2067     2067
==========================================
+ Hits         1297     1401     +104
+ Misses        770      666     -104

Impacted Files
Coverage Δ

netneurotools/metrics.py
27.48% <ø> (+2.29%)
:arrow_up:

netneurotools/utils.py
86.53% <0.00%> (+3.84%)
:arrow_up:

netneurotools/modularity.py
64.04% <0.00%> (+4.49%)
:arrow_up:

netneurotools/tests/test_plotting.py
100.00% <0.00%> (+18.91%)
:arrow_up:

netneurotools/plotting.py
65.31% <0.00%> (+32.47%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


DateTimeValue error fixed (Issue #493)

Existing function was always using System's Culture info, and did not take in account that culture info can be passed in the argument.

:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Connectors.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Core.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Interpreter.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.LanguageServerProtocol.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Transport.Attributes.dll

:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Connectors.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Core.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Interpreter.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.LanguageServerProtocol.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Transport.Attributes.dll

:x: 2 Binary Compatibility issues for Microsoft.PowerFx.Connectors compared against version 0.2.2-preview.20220803-315292.

MembersMustExist : Member 'Microsoft.PowerFx.Connectors.PowerPlatformConnectorClient.GetAuthToken.get()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'Microsoft.PowerFx.Connectors.PowerPlatformConnectorClient.Transform(System.Net.Http.HttpRequestMessage)' does not exist in the implementation but it does exist in the contract.

:heavy_check_mark: No Binary Compatibility issues for **Microsoft.PowerFx.Core.dll**
:heavy_check_mark: No Binary Compatibility issues for **Microsoft.PowerFx.Interpreter.dll**
:heavy_check_mark: No Binary Compatibility issues for **Microsoft.PowerFx.LanguageServerProtocol.dll**
:heavy_check_mark: No Binary Compatibility issues for **Microsoft.PowerFx.Transport.Attributes.dll**

:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Connectors.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Core.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Interpreter.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.LanguageServerProtocol.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Transport.Attributes.dll

:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Connectors.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Core.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Interpreter.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.LanguageServerProtocol.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.PowerFx.Transport.Attributes.dll


Remove Ass/Donkey from animal dictonary

Love the package, but caught this, and while I laughed at bubbly ass donkey, I wouldn't want to take it to production. Would you consider removing it?

@jdarrohn I think there are potentially many offensive combinations of adjectives/animals - but there's another donkey entry in there too so in this case it doesn't make sense to keep in. Removing in the linked PR.

@jdarrohn I think there are potentially many offensive combinations of adjectives/animals - but there's another donkey entry in there too so in this case it doesn't make sense to keep in. Removing in the linked PR.

Fixed in v0.4.0: https://www.npmjs.com/package/memorable-moniker/v/0.4.0

Fixed in v0.4.0: https://www.npmjs.com/package/memorable-moniker/v/0.4.0

This literally the best thing I've read on GitHub all year.


[VL] Daily Update Velox Version (2024_05_08)

Upstream Velox's New Commits:
ac553396c by Ke, Fix PartitionIdGenerator's multiplier initialization for VectorHasher (9713)
7cfb42fb1 by joey.ljy, Fix the computation of hash tag in hash table doc (9699)
ccbb72e50 by xiaoxmeng, Fix the lock order issue caused by value operator init (9738)
779500052 by PHILO-HE, Fix stemmer library when cmake < 3.18 is used (9670)
b63a8691a by Zuyu ZHANG, Update README for build on MacOS (9717)
ad25e87bb by xiaoxmeng, Avoid unnecessary reclaim on non-reclaimable query (9737)
1fd2bc960 by Richard Barnes, Change `result_of` to `invoke_result` in velox/vector/fuzzer/GeneratorSpec.h (9720)
668d57842 by xiaoxmeng, SSD cache code cleanup (9724)
591112932 by xiaoxmeng, Parallelize local memory arbitration (9649)
ec4d2ec1f by Pedro Eugenio Rocha Pedreira, Improve evaluateOnce() helper function (9708)
d41f654b3 by Zac Wen, Revert "Prevent cache write from exceeding IOV_MAX (9438)" (9722)
0c4dad14a by Jimmy Lu, Clean up selective file reader framework (9704)

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query
log/native_master_05_08_2024_time.csv
log/native_master_05_07_2024_254d62e72_time.csv
difference
percentage

q1
35.03
34.69
-0.341
99.03%

q2
21.91
23.52
1.607
107.34%

q3
36.38
39.12
2.746
107.55%

q4
38.35
38.99
0.639
101.67%

q5
71.54
70.47
-1.076
98.50%

q6
5.99
7.99
1.998
133.33%

q7
83.77
82.58
-1.184
98.59%

q8
85.53
85.88
0.353
100.41%

q9
122.85
125.69
2.836
102.31%

q10
46.15
44.17
-1.985
95.70%

q11
20.42
19.52
-0.903
95.58%

q12
23.69
25.07
1.383
105.84%

q13
55.18
54.78
-0.402
99.27%

q14
19.54
16.46
-3.075
84.26%

q15
30.65
29.15
-1.498
95.11%

q16
13.73
14.27
0.537
103.91%

q17
103.15
104.34
1.194
101.16%

q18
146.63
144.89
-1.740
98.81%

q19
14.98
15.16
0.179
101.20%

q20
28.36
26.39
-1.964
93.07%

q21
283.86
283.25
-0.609
99.79%

q22
15.84
14.47
-1.370
91.35%

total
1303.53
1300.85
-2.676
99.79%


Create emerson.txt

Emerson College is at https://emerson.edu/

@tbachnxd Thank you for your patience while waiting for a review and processing your request. Pull request merged. Please start applying for JetBrains educational subscription at https://www.jetbrains.com/shop/eform/students in an hour, to allow the changes to propagate through JetBrains systems.


llvm-lit not bundled

Hi,
LLVM comes with a testing framework in python: llvm-lit . Unfortunately, this way of deploying llvm does not contains said utility.

yea i was going to ask the same thing but about FileCheck itself, note that lit is available through pypi https://pypi.org/project/lit/ but that doesn't really matter because FileCheck isn't.

This action uses the release artifacts hosted on llvm-project's repository page. These releases are built and packaged by volunteers, so the existence of the release and its contents is not guaranteed. If you are interested in augmenting what is provided, you'll either getting commit rights on the llvm-project and uploading an artifact that meets your needs or you'll need to built it and host it somewhere. You can use the download-url configuration to point the action to an alternate asset.

Yes, this action just serves as a convenience for downloading binary assets from LLVM's GitHub repository and there is no guarantee for what is inside these assets or whether assets are available at all for certain combinations of platform and LLVM version.
As of the newly released v2.0.0, these options would be of note for providing custom sets of binaries to be downloaded and extracted by this action:

force-url – a full URL to a binary assets file (bypasses this action's logic for constructing such a URL)
mirror-url – a base URL to download binaries from instead of using GitHub (it's assumed the binaries available on this mirror match what can be found on the releases page for llvm/llvm-project


Frontend | create visual diagram of UI

We have completed whiteboard of this, will attach image diagram at later time


chore: switch to cargo dist for release publishing

@hds:

Using cargo dist is mostly about preparing binary distributions of tokio-console, right?

Yeah, that's right; I haven't touched our existing script for updating changelogs and generating release tags. cargo-dist will just build lots of binaries, and also manage creating GitHub Releases (which is nice, because our current thing for that is broken...).

In that case, this looks good. I've been meaning to try release-plz for the actual release process as I think it might make that easier.

I believe cargo-dist integrates with cargo-release, which I think can do some of the other release prep stuff we're currently using the bash script for. But I haven't looked into that yet. I'm not familiar with release-plz and I don't really know how it compares with cargo-release, but I'm happy with any release automation we can add that works nicely with the way we're currently publishing stuff...the cargo-release/cargo-dist integration seems potentially appealing, but I'd need to look closer at it?


circleci nightly workflow not building properly

circleci nightly workflow not building properly
Shows status Unauthorized, though regular pushes to main worked fine so it's something with the nightly workflow.

it's unauthorized because we're trying to use a secret context for the package step in nightly:
context: Honeycomb Secrets for Public Repos

secrets are not available to scheduled workflows
buuut scheduled workflows are being phased out replaced by scheduled pipelines, which have access to restricted contexts


Enable checking if PatternUnits or PatternContentUnits was actually set

Reference Issue

The https://github.com/vvvv/SVG/pull/668 actually broke Svg.Skia pattern rendering, did not see this as breaking at first. In order to correctly render pattern, pattern property inheritance must be used to check for inherited values. As #668 removed invalid inherited enum value it broke Svg.Skia as it does not have access to internal fields and those are necessary to provide information if actually PatternUnits or PatternContentUnits was set.
What does this implement/fix? Explain your changes.

Adds HasPatternUnits() and HasPatternContentUnits() methods to check if field has actually a value.
Any other comments?

This is my code in Svg.Skia used for pattern rendering:
https://github.com/wieslawsoltes/Svg.Skia/blob/1298cbf0cd386f8694d97f7911432909fefbfa01/src/Svg.Skia/SvgPaintingExtensions.cs#L570-L595

Hiding such internals neccessary for proper rendering will make #590 much harder to achieve.

I think this PR solution is ad hocery.
Inherit was returned...
https://github.com/vvvv/SVG/blob/3efa867fb69ee2c68a59f5c1e8b92c988e94e1c7/Source/Painting/SvgPatternServer.cs#L155-L183
I think we should think of a way to return linked value in properties.

I think we should think of a way to return linked value in properties.

Agree with that, returning correct linked value in properties is important and necessary in other place too.

@wieslawsoltes
@mrbean-bremen
Temporary methods that have been added in this PR do not know when to be deleted.
So I think it should be stated in comments etc.

@wieslawsoltes
@mrbean-bremen
Temporary methods that have been added in this PR do not know when to be deleted.
So I think it should be stated in comments etc.

I think we can revert this changes.
I am using different method and not relying on internals.
https://github.com/wieslawsoltes/Svg.Skia/blob/fa2cdcfbab6280e359657f9b8d930b4867ccae29/src/Svg.Skia/SvgPaintingExtensions.cs#L771
https://github.com/wieslawsoltes/Svg.Skia/blob/fa2cdcfbab6280e359657f9b8d930b4867ccae29/src/Svg.Skia/SvgExtensions.cs#L277-L284
This comes from from my work on using href properties for linear/radial gradients in Svg.Skia
https://github.com/wieslawsoltes/Svg.Skia/blob/fa2cdcfbab6280e359657f9b8d930b4867ccae29/src/Svg.Skia/SvgPaintingExtensions.cs#L316-L347
https://github.com/wieslawsoltes/Svg.Skia/blob/fa2cdcfbab6280e359657f9b8d930b4867ccae29/src/Svg.Skia/SvgPaintingExtensions.cs#L501-L540


Feature request: React pixi renderer

🚀 Feature Proposal
First of all thanks for this awesome library. My main animation library!
I been using https://github.com/inlet/react-pixi for awhile. It's pretty cool implementation of react for Pixi.js (A webl/canvas library to paint 2d graphics). It would be really nice if react-spring had native support for this library.
I'm not so familiar how to extend this functionality for react-spring. If react-spring also took care of the tint property that is a hex value as a Number representing a rgb color would be insane!
Example
import React from 'react';
import { Application, Texture } from 'pixi.js';
import { Sprite, render } from '@inlet/react-pixi';
import { animated, useSpring } from 'react-spring';

const app = new Application();

const AnimatedSprite = animated(Sprite);

const Something = ({ value }) => {
  const props = useSpring(value
    ? { x: 0, tint: 0xffffff }
    : { x: 100, tint: 0xff0000 }
  );
  return (
    <AnimatedSprite
      texture={Texture.WHITE}
      {...props}
     />
  );
};

let value = true;
setInterval(() => render(
  <Something value={(value = !value)} />,
  app.stage,
), 2000);

document.body.appendChild(app.view);

@EloB do you have codesanbox or some example of react-spring target for inlet/react-pixi. Have you managed to use Ticker and how? Thx!

@isBatak I never used the Ticker if you found a solution I'm happy to see it :) Sorry for late reply.


can't install extension

Type: Bug
2023-05-18 09:39:59.625 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-vscode.vscode-selfhost-test-provider' wants API proposal 'testContinuousRun' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2023-05-18 09:39:59.935 [warning] Settings pattern "application." doesn't match any settings
2023-05-18 09:39:59.935 [warning] SettingsEditor2: Settings not included in settingsLayout.ts: interactiveEditor.editMode, accessibility.verbosity.diff-editor, accessibility.verbosity.terminal
2023-05-18 09:40:02.375 [warning] Settings pattern "application." doesn't match any settings
2023-05-18 09:40:02.787 [info] [perf] Render performance baseline is 32ms
2023-05-18 09:40:03.081 [warning] Settings pattern "application." doesn't match any settings
2023-05-18 09:41:57.847 [warning] Settings pattern "application." doesn't match any settings
2023-05-18 09:42:58.996 [error] Error: XHR failed
at C.onerror (vscode-file://vscode-app/c:/Users/wunna/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:72:1399)
VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:39:26.248Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
15.76GB (7.88GB free)

Process Argv
--crash-reporter-id 5a35fb7d-68d2-42eb-9da4-a9ded0a97d8e

Screen Reader
no

VM
0%

Extensions (1)

Extension
Author (truncated)
Version

vuerd-vscode
din
0.9.15

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
3biah626:30602489
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30737416
vsccsb:30705552
azdwalk:30721579
pythonms35:30701012
pythonfmttext:30731395
pythoncmv:30739700
fixhidewlkth:30730051
pythongtdpath:30739704

Can you please provide steps to reproduce?

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


FlexboxLayoutManager did not display all items with FlexWrap.WRAP and FlexDirection.COLUMN

[x] I have searched existing issues and confirmed this is not a duplicate

Issues and steps to reproduce

FlexboxLayoutManager did not display all items with FlexWrap.WRAP and FlexDirection.COLUMN
some item lost

this is main code
        FlexboxLayoutManager layoutManager = new FlexboxLayoutManager(this);
        layoutManager.setFlexWrap(FlexWrap.WRAP);
        layoutManager.setFlexDirection(FlexDirection.COLUMN);

Expected behavior
FlexboxLayoutManager should display all items
Version of the flexbox library
com.google.android:flexbox:1.0.0
Link to code
https://github.com/liangtg/flexbox-test

Any news ? I have the same problem.
Only 16 items of my 26 items are displayed.

Any news ? I have the same problem.
Only 16 items of my 26 items are displayed.

@geotinc
this solved my problem:
    @Override
    public void onBindViewHolder(@NonNull AdapterViewHolder holder, int position) {
        FlexboxLayoutManager.LayoutParams lp = (FlexboxLayoutManager.LayoutParams) holder.itemView.getLayoutParams();
        lp.width = screenwidth;


An update to the unittest workflow.

Updates our workflow (quemb_unittest.yml) to upload all artifacts generated throughout running pytest.

Right! Added those missing bits so it should all be correct now. The codecov section is commented out but can still be there if someone wants to add it in the future.


License added is missing current year

Should include the current year (the year license was applied first). Something like this:
MIT (c) <year> <copyright holders>

Thanks!


Create fallback for multiselects in Holarchy Feedback images and Challenge feedbackmodals

This issue is based upon a bug found in issue #574 and a proposal in #632
Multiselects won't work within Holarchy Feedback images and Challenge feedbackmodals
As @thesethtruth  mentioned in #632  there are two things that need to be implemented:

[ ]  make sure the page doesn't crash when the administrator uses a multiselect  ( #574 )
[ ]  add help text to tell administrator that multiselects won't work with Holarchy Feedback images and Challenge feedbackmodals

help text is inlcuded (see screenshot below)
fallback has also been implemented


strategy to deal with cluster upgrade in GCP (rewind to use formal primary as replica again)

Dear Alex,  thanks a lot for you works on kubegres. We are very happy to use this operator in our dev env.
Recently we migrate our PostgreSQL13 to k8s with kubegres. It's easy and straight-forward.
Google really push forward to upgrade the nodes to up-to-date ones. So you can expect the upgrades happen every a few months. So here is what happened:

Primrty db1 terminated to migrate to new node
Replica db2 was promoted to primary.
Replica db3 created as standby for db2(primary now).
Time for replica db2 to migrate.
db3 was promoted to primary
db4 created as standby for db3.

It's very good to have failover with no disruption to the customers. But it's just that the swithing happened twice.
So my thoughts on this:

pg_switch to reuse old primary
switch off failover when node upgrading

Please feel free to give any suggestions on this.
Thank you.

Thank you for your message.
For that type of situation when there is a maintenance of a Kubernetes cluster, we use what you suggested: 2. switch off failover when node upgrading.
It is a manual process, so you have to disable the failover feature for your cluster of Postgres. Please see the field failover in this page which explains how to do so:
https://www.kubegres.io/doc/properties-explained.html
Please let me know if that helps.


Adding windows auth support to sql-migration and misc bug fixes.

Pull Request Test Coverage Report for Build 677219328

0 of 0   changed or added relevant lines in 0 files are covered.
166 unchanged lines in 5 files lost coverage.
Overall coverage decreased (-0.009%) to 43.372%

Files with Coverage Reduction
New Missed Lines
%

extensions/arc/src/ui/components/dashboard.ts
3
20.0%

extensions/arc/src/ui/dashboards/postgres/postgresOverviewPage.ts
34
17.32%

extensions/arc/src/ui/dashboards/miaa/miaaDashboardOverviewPage.ts
41
3.4%

src/sql/workbench/api/common/extHostModelViewDialog.ts
42
57.78%

src/sql/workbench/api/browser/mainThreadModelViewDialog.ts
46
62.83%

Totals

Change from base Build 673903459:
-0.009%

Covered Lines:
25455

Relevant Lines:
53541

💛  - Coveralls


SFX optimization via rollup

This is a very first attempt for the simplest of scenarios to use rollup for SFX bundles when everything is ES6.
The next stage will be to widen this to any tree via a zebra striping algorithm variation.

To apply this to arbitrary trees:

Apply zebra striping
Within each ES6 layer create a dummy module of its entry points to the layer above of the form:

import * as A from 'entrypoint-A';
import * as B from 'entrypoint-B';
//...
export {A,B,...}

Optimize the zebra stripe from that dummy module into a single ES6 / System.register module with the dependencies of the stripe itself all set as externals.
Output the dummy module as a new special unique name
Each of the zebra entry points is then output as:

entry-point-a-optimized.js
System.register('A', ['dummy-optimized'], function(_export) {
  return {
    setters: [function(module) {
      _export(module.A);
    }],
    execute: function() {}
  };
});

Repeat for further zebra stripes

If there's only one stripe, we can obviously skip all the above.

This optimization is now functional!
A limitation here is that we need to still handle applying Traceur / Babel in the pipeline which isn't done currently.
One thing that will make this trivial will be separating transpilers out into plugins and then updating this implementation to reflect that.
Waiting on progress there to land this.

This would need to work by re-running the translate hook of the load record in question, and setting a metadata property say outputFormat = 'esm' to indicate to the plugin that it should output ES modules instead of System.register so we can perform these optimizations.

@guybedford do you have any docs for this?

:+1:

Any updates?

@guybedford thanks about this! Any news?

@rollup @rollup/collaborators @systemjs @systemjs/collaborators @guybedford
Can you help, please? At least which tests should we have here?

@kuraga this requires the new Babel plugin to work properly, so it will take a little while for things to fall into place still.

This has been merged into https://github.com/systemjs/builder/pull/442 for the 0.15 release.

This has been merged into https://github.com/systemjs/builder/pull/442 for the 0.15 release.

@guybedford Just a question about this. Does this process "erase" the modules? For example, after optimizing in this way, can I still call system.import('foo') or is foo's code present but foo's module identification gone?

@EisenbergEffect it only works on sfx builds, not normal bundles, so only the sfx shell remains, with the optimizations happening internally (sfx modules don't expose their internal modules already).

I'm not overly familiar with what the sfx builds actually are that's different from normal I guess.

@EisenbergEffect we're renaming sfx builds to jspm build and bundle to jspm bundle. The difference is that a bundle is just a network optimization to concatenate modules into a single file, while a build is a static optimization of the dependency tree turning it into a single module. I'll be posting some examples along with the alpha release this weekend :)

Gotcha. I think Aurelia apps will continue to use only the bundling, but it may be that the Aurelia library modules and plugins can use jspm build. I'll be interested to see the details on how that works and what the final output is. Thanks!

SFX build's good for Aurelia's examples (skeleton), isn't it?

No. Aurelia requires the module id to not be erased in order for things like the router and view location to work.


Linking to old version of libvips when using globally installed version, incorrect

Have you ensured the architecture and platform of Node.js used for npm install is the same as the architecture and platform of Node.js used at runtime? Same Version
Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest? Yes
If you are installing as a root or sudo user, have you tried with the npm install --unsafe-perm flag? Not using root
If you are using the ignore-scripts feature of npm, have you tried with the npm install --ignore-scripts=false flag? Not ignoring scripts
What is the output of running npx envinfo --binaries --system?
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Memory: 1.50 GB / 32.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.13.0 - ~/.nvm/versions/node/v14.13.0/bin/node
npm: 6.14.8 - ~/.nvm/versions/node/v14.13.0/bin/npm
I installed lipvips to 8.10.2 as I wanted to try to get HEIC support. This installed find, however, when installed Sharp, either via Verbose mode or non-verbose mode, I get the following notices out the end:
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)

ld: warning: dylib (/usr/local/Cellar/vips/8.10.2/lib/libvips-cpp.dylib) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: dylib (/usr/local/Cellar/vips/8.10.2/lib/libvips.dylib) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: dylib (/usr/local/Cellar/glib/2.66.1/lib/libgobject-2.0.dylib) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: dylib (/usr/local/Cellar/glib/2.66.1/lib/libglib-2.0.dylib) was built for newer macOS version (10.15) than being linked (10.9)
ld: warning: dylib (/usr/local/opt/gettext/lib/libintl.dylib) was built for newer macOS version (10.15) than being linked (10.9)

The verbose obviously outputs more but from my limited knowledge of compilation, this all looks fine. If I then attempt to load a HEIC either via filename, or buffer, I get [Error: Input file has corrupt header: magickload: unsupported colorspace YCbCrColorspace].
Any ideas on what I've done wrong here? When installing lipvips via homebrew, there were a few libraries that it didn't link as there were already conflicting versions on my machine from the OS. Am I needing to link these versions rather than use the standard OS versions?
TIA
Lee
ADDED EDIT: This error is only occuring when trying HEIC files, everything is still working as expected with standard images

My best guess would be that the vips provided by homebrew depends on both imagemagick and libheif and is selecting the former to read HEIC files.
https://github.com/Homebrew/homebrew-core/blob/master/Formula/vips.rb
If so, this is probably a limitation or misconfiguration of the homebrew-installed imagemagick's ability to load HEIC files - it's telling libvips that it can load HEIC files, but then falls over when doing so.
This might relate to https://github.com/ImageMagick/ImageMagick/issues/1440

This might also relate to https://github.com/libvips/libvips/issues/1861

Awesome. I'll keep an eye on both of those, but it's sounding like that second one if I'm reading that correctly.

Yes, please can you provide a sample image that fails in this manner as a comment on https://github.com/libvips/libvips/issues/1861 to help confirm.

I think we can close this issue now. Update coming out in lipvips 8.10.3


How to implement dynamic linq for Query.OrderBy and Query.Where

I would like to be able to pass strings that represent table fields from my client into my API where I have the ardalis.Specification nuget installed. @ardalis had recommended that I review suggestions in a StackOverflow post here: https://stackoverflow.com/questions/2728340/how-can-i-do-an-orderby-with-a-dynamic-string-parameter and
reviewing the SO post led me to the System.Linq.Dynamic.Core nuget package that looked like it would allow me to achieve my goal with some extension methods.
I installed the System.Linq.Dynamic.Core nuget on my API and added the using statement in my Specification class, but then when I try to pass a string into the Query.OrderBy(stringVariable) I get the following error;
CS1929: 'ISpecificationBuilder' does not contain a definition for 'OrderBy' and the best extension method overload 'DynamicQueryableExtensions.OrderBy(IQueryable, string, params object[])' requires a receiver of type IQueryable'
Here is my current spec class;
using System.Linq;
using System.Linq.Dynamic.Core;  //<--  added
using Ardalis.Specification;
using CD.Admin.Core.Aggregates.Organizations.Entities;
using CD.Admin.Core.Aggregates.Organizations.Specifications.Filters;
using CD.SharedKernal.Helpers;

namespace CD.Admin.Core.Aggregates.Organizations.Specifications
{
    public class OrganizationListSpec : Specification<Organization>
    {
        public OrganizationListSpec(OrganizationFilter spec)
        {
            if (!string.IsNullOrEmpty(spec.OrderBy))
            {
                Query.OrderBy(spec.OrderBy); // <-- spec.OrderBy is a string that represents the field name.
            }

            if (spec.IsPagingEnabled)
            {
                Query.Skip(PaginationHelper.CalculateSkip(spec))
                     .Take(PaginationHelper.CalculateTake(spec));
            }

            if (!string.IsNullOrEmpty(spec.Filter))
            {
                Query.Where(x => x.Name.Contains(spec.Filter) || x.OrganizationId.Contains(spec.Filter));  //<-- I would also like to use dynamics here, if possible.
            }
        }
    }
}

In my use case, the client for my API will be a Blazor WASM that uses a SyncFusion Blazor Grid. The grid allows the potential for the user to sort and filter on every column. I would like to support this flexibility in my API but I don't want to have to code each possible individual table field for every table that will have its paged data exposed in a Grid component. Being able to simply pass the string representation of a table field would be a big benefit toward my desired use case if I can figure out how to correctly apply it to my spec.
Can anyone tell me if this is actually possible with the ardalis.Specification nuget and if so, recommend a way to make this work correctly and/or provide an example?

@fiseni have you done dynamic order-by at all? Seems like something that might be a common request for specifications. Thoughts?

I provided an extension in the following issue #53.
We can include it OOTB. But, there is always "but" :). How about if you use value objects in your entities, then you should care for scanning nested types. I have something for that, that I use for my own projects. But, it becomes too speecific.

Thanks @fiseni and @ardalis. I implemented the extension method provided by @lankymart in issue #53 and it seems to be doing exactly what I wanted.

This does seem to be almost a duplicate of #53. I'll add an issue for us to document this in our docs.

I was just about to ask the same question!

Would also love a way to add whether the order should be ascending or descending like in DynamicaLINQ

@davidhenley the solution that  @lankymart listed in issue #53 uses a comma separated string value for the list of OrderBy fields and if you prefix a - in front of the string field name, for example;  "Name, -City", it does the OrderBy(Name) and then OrderByDescending(City). Seems to work well for me, so far.

Thanks @dcadlereii, I am using his extension and it is working well.
Only thing that I could use now is a dictionary that maps the strings to lambda functions.
Example: "customerType": x => x.CustomerType.Name


adding analytics log file

logging was set up for analytics a while ago by @sravfeyn but the log files were never created or added to localsettings
@millerdev

Thanks Cal! This will make things easy to debug. (I didn't setup the original analytics logging)


Invalidate sources that depends on @inline methods

This PR fixes https://github.com/sbt/sbt/issues/4125, https://github.com/sbt/zinc/issues/537.
Issue
When @inline method implementation changes, the public API of @inline method does not change, hence Zinc does not invalidate sources that depends on @inline method.
Solution
The behaviour of @inline method is similar to macro methods. Hence, we can mark @inline method as macro and reuse existing Zinc invalidation logic for macro invalidation.
TODOs

This PR does not handle call-site @inline. To handle that case, we need to follow https://github.com/sbt/zinc/issues/537#issuecomment-421753875 and drop call-site @inline at compiler side.
Even without @inline annotation, compiler may still sometimes inline a method. The compiler keep a log of inlined methods, so in a follow up PR, we can utilize that information instead of directly checking @inline annotation.

Hi Eugene! I was asking users on Scala discord about whether this issue bothers Scala users in practice.
The feedback I got is that basically everyone already has setup to only use optimizer when producing release binary. Hence this issue do not actually impact anyone.
Should we instead not proceed with the PR and instead mark the two linked issues https://github.com/sbt/sbt/issues/4125, https://github.com/sbt/zinc/issues/537 as won't fix?

Since the change itself is relatively small, I see no reason we should reject a good change. While it's true, that once you start using optimizer many things would break so people have turned from past injuries to turn them off during normal development, but perhaps changes like this would gradually improve the situation.

This PR looks right and is an improvement. However in the vast majority of cases methods are not inlined because they carry the @inline annotation, but due to other inliner heuristics. The official documentation even recommends to avoid using @inline in general (https://docs.scala-lang.org/overviews/compiler-options/optimizer.html#inliner-heuristics-and-inline). So I don't think this PR will help much in practise, but it can be considered a first step?

However in the vast majority of cases methods are not inlined because they carry the @inline annotation, but due to other inliner heuristics.

I had never worked with optimizer, but I think it would be possible for optimizer to provide information for each inlining that took place (caller & callee, along with the class name caller and callee belongs to) and store them in CompilationUnit, and zinc Analyzer phase can then use the information to handle inlining dependency. (e.g. via introducing a new dependency called DependencyByInlining and handle them similarly to DependencyByInheritance.)
If that solution is indeed reasonable, we can then decide whether we should implement the solution.

It's a little confusing that isMacro doesn't mean isMacro any more :-/

The inliner can already produce a log, so adding the right calls to record dependencies should be doable.
➜ sandbox cat A.scala
object A {
  def f = 1
}

object B {
  def g = A.f
}

object C {
  def h = B.g
}
➜ sandbox qsc -opt:inline:'**' A.scala -Vinline _
Inlining into B$.g: inlined A$.f (the callee is a small trivial method). Before: 7 ins, after: 22 ins.
Inlining into C$.h: inlined B$.g (the callee is a forwarder or alias method). Before: 7 ins, after: 40 ins.

But I'm not convinced it's worth the effort. Enabling the optimizer in development is discouraged as it increases compilation times. How about issuing a warning when zinc performs an incremental compilation (not all sources) with the optimizer enabled?


Require Node 18.6+

Perhaps we should minor/major bump for this; since we only target DT itself I'm not sure if we actually care.

FWIW I’m not attached to any particular versioning scheme here. We can do our first minor bump if you want 😄

FWIW I’m not attached to any particular versioning scheme here. We can do our first minor bump if you want 😄

I'm afraid that already happened accidentally in #866 ☹


Add Next.js example app

Proposed Changes

Add Next.js example app

Todos:

[x] Fix transpilePackages requirement. Without that the app will build but importing the hook will raise an error. Fixed in #84

I think if we want to prove that the package stuff works, the examples should be in a different repo that pulls the packages for the host.

I think if we want to prove that the package stuff works, the examples should be in a different repo that pulls the packages for the host.

This ended up being invaluable in helping debuging #84, especially once I added it to the pnpm monorepo, so it grabs the latest package. We can override that version via a matrix policy as well.
Our goal here is to have a working application to aid in testing and local development, as well as to show some example code.
So maybe examples is the wrong name for this and it's more of a test/local app. What would you suggest here?


Question / Maybe bug

It's possible to change between cameras any function to do that?
And mute/unmute?
How can I change the width and height of the video. I tried via css but nope ;) (I attach one image on iphone X)

Changing between front and back camera: publisher.setCameraPosition('front') or publisher.setCameraPosition('back')
Mute/unmute: publisher.publishAudio(true) or publisher.publishAudio(false)
How can I change the width and height of the video: When you dynamically change the width and height after a build, after each CSS change you need to call window.OT.updateViews() method. The webcam is not added within the HTML webview. The webcam is added as a native view which needs to get updated once you change the dimensions.

@mark-veenstra thanks I'm going to try

@mark-veenstra thanks for answering these again!

@videmort closing this b/c it's not an issue with the repo :)


Division by zero error

Traceback (most recent call last):
  File "/app/./main.py", line 203, in <module>
    main()
  File "/app/./main.py", line 178, in main
    webhook_templates.balance_update(info)
  File "/app/webhooks.py", line 139, in balance_update
    moneyPercentage = "{0:+.2f}%".format((info.earnings_info.balance/info.previous_balance)*100.0 - 100)
ZeroDivisionError: float division by zero

@Yariya I'll fix it in a while if I can.
In the meanwhile, if you are free, give it a go.

Traceback (most recent call last):
  File "/app/./main.py", line 203, in <module>
    main()
    if device_status_change[token] is not info.devices_info[token]:
  File "/app/./main.py", line 156, in main
TypeError: 'DevicesInfo' object is not subscriptable
API Version: <IP_ADDRESS>

Another one

Traceback (most recent call last):
  File "/app/main.py", line 3, in <module>
    from config import Configuration
  File "/app/config.py", line 78
    config = {
              ^
IndentationError: unindent does not match any outer indentation level
You can safely exit this

Another one

Have you tried making an new config?

Noted.

fixed already pushed. releasing soon.


LockableKnob init fix

The range for setting the initial value of a LockableKnob was unclear and hard to use. This PR attempts to alleviate both of these issues. In addition it updates the Turing machine and knob playground to support these changes.
Details:
The internal representation of a LockableKnob's value uses the full AnalogueReader range of 0-MAX_UINT16. This was unclear in the LockableKnob's documentation and api. To fix this we've updated the API to make it clear how the value is being used by giving two possible ways. First is the original full int range, second is a percentage. The int range will be useful when saving and loading a knob value. The percentage will be more useful when hard coding a knobs initial state.
I've again included the 'KnobPlayground' script to aid in PR review and testing. It should be removed before merge.

I am workin on resolving these conflicts.


WASI support?

Mio has limited support for the wasm32-wasi target and I think it should therefore be possible to implement support here too, using WASI's poll_oneoff interface. This could be useful to allow for async TcpStreams and similar on wasm32-wasi rust binaries using async-io

There's this branch, but I'm not sure if @yoshuawuyts is actively working on it.
We could probably support WASI with the same caveats the mio has (i.e. it can't be woken since WASI is single threaded... although now that WASI threads are a thing, shouldn't there be a way around that?). The actual issue would show up down the line is in async-io, since we can't spawn the "async-io" thread yet. We would need to conditionally use a single threaded polling strategy there.

Sounds good, thanks for clarifying! It's probably better to wait for preview2 to drop as opposed to trying to hammer preview1 into a usable state.

wasm32-wasi-preview2 has now landed on Rust Nightly. So now it might be worth looking into this further.

wasm32-wasi-preview2 has now landed on Rust Nightly

(It is likely to be reverted once, though: https://github.com/rust-lang/rust/pull/120434)

A new version of the wasi crate has been published containing poll operations. An example usage of these bindings can be found here. It is possible to author and test this code already via cargo-component, even if we don't yet have a Rustc target for WASI 0.2. We could for example put it behind a feature flag. Though the WASI 0.2 target is expected to be merged soon, and maybe by the time we've implemented this we're okay.

@yoshuawuyts Great! The only thing missing is a way to wake up the Poller from another thread. Although as WASI has no threads I don't think it's possible to do that yet.

Finished writing a wasi native async runtime, and wrote down step by step instructions for how this all works here: https://blog.yoshuawuyts.com/building-an-async-runtime-for-wasi/.
If someone wants to integrate this into polling, they should be able to follow most of that and it should all work!

I started looking into adding WASI support to polling, and I am facing a conundrum here.
WASIp1 supports polling through wasi::poll_oneoff using wasi::Subscriptions that can be created from raw file descriptors.
This is exactly how WASI support is implemented in mio.
WASIp1 is supported by wasi-rs v0.11, versions 0.12 and up have completely different API and support WASIp2. It no longer uses wasi::poll_oneoff and instead relies on the Pollable type as explained in @yoshuawuyts's awesome article linked above.
From the comments in this thread I conclude that it is preferred to implement support WASIp2 rather than WASIp1. This is possible to do even though there is some mismatch between the public Poller API and how wasi::io::poll::Pollable combines the source and the interest in certain types of events.
But as far as I can tell only WASI-specific types such as wasi::sockets::tcp::TcpSocket expose methods to obtain Pollable, it cannot be constructed for standard library types such as std::net::TcpStream or std::net::TcpListener.
This sort of defeats the purpose of using polling for WASI because polling provides an abstraction over specific platform and a portable interface.
What is best to be done then, should we try to implement support for WASIp1 which can be used for standard library types or integrate the Pollable-based polling from WASIp2 but limit its application to WASI-specific types? Please advise.

Yeah, that's a good point. There's not really a way to traditionally "register" a file descriptor into a Poller at this point. So, the polling model doesn't fit WASI.
@smol-rs/admins I'm planning on closing this issue as "not planned", since it's not likely that we'll be able to implement this.

@dicej has been doing work to upstream WASI 0.2 support to mio. From the sound of it this might result in changes to wasi-libc to provide backwards compatibility with the POSIX model. I believe this could be used by polling as well.
If I understand the plan correctly, this same shim would be guaranteed to keep working for WASI 0.3 as well, which should give this some longevity.

Correct.  We can lean on wasi-libc to make WASI look like just another POSIX OS as a good first default, then add WASI-specific improvements later as desired.


Make to_h recursive

tl;dr - Here's a first pass at making to_h recursive.
Cell = Value.new(:alive)
Board = Value.new(:cells)
Board.new([Cell.new(false), Cell.new(true)]).to_h
# => {:cells=>[{:alive=>false}, {:alive=>true}]}

Sup?
to_h now recurses down through it's member fields and tries to coerce them to_h. Collections that respond to map have each element coerced (Hashes are an explicit exception, since hash.map doesn't return a Hash). Nil's also explicitly excluded because nil.to_h == {}.
Leme know if you think it makes sense to be on the lookout for any other special field types.

Set as well please:
irb(main):001:0> require 'set'
=> true
irb(main):002:0> Set.new([1,2,3]).map {|x| x + 1}.class
=> Array
irb(main):003:0> Set.new([1,2,3]).map {|x| x + 1}
=> [2, 3, 4]

Here's an argument against having this is the default #to_h: Doesn't this break the #with method in the  case of nested values?
I see why this is useful, I'm just not convinced it's the right semantics for the default #to_h method

@blinsay @tcrayford Can I suggest the following ways to make this feature available, but less intrusive:

Rename, for example #nested_to_h or #recurse_to_h
Add an optional flag param, for example #to_h(recurse = false)

This way, the non-recursive #to_h semantics remain available for callers that need them, but this recursive behavior can also co-exist with it.
What do you think?

@blinsay @tcrayford In case it wasn't clear, let me clarify the issue.
Currently, the constructor from a hash .with and the copy method with modifications from a hash #with both form a symmetric operation with #to_h.
Consider your example above with Cell and Board. Let's say we want the board, but without the first cell:
b = Board.new([Cell.new(false), Cell.new(true)])
# => #<Board cells=[#<Cell alive=false>, #<Cell alive=true>]>
b.with(cells: b.cells.slice(1, 1))
# => #<Board cells=[#<Cell alive=true>]>

This is a very important mechanism, it's how you use nested immutable values in calculations, producing the next state from the previous. I am intending to add lenses for example on top of this functionality.
Do you see how making #to_h recursive by default would break this essential mechanism for creating the "next" value of nested immutable value classes, by making the in hash constructors and hash values incompatible?
I'm totally happy to discuss via google hangout or skype if you'd like? Again, not saying to give up on having this as a feature, only that it shouldn't be the default #to_h implementation.
Thanks,
-Marc

Marc,
I agree there. Let's add a to_h_recursive instead.

This all makes sense. I missed notifications somehow, but I'll try and hop back on this sometime this week.

@ms-ati @tcrayford took an stab at it.
Thinking about renaming recursive_to_h to to_jsonable or something like that, since that's the real reason I've wanted this. I'd suggest to_json but that's so used and abused by every other library under the sun.

@blinsay I'd advise keeping it as either #to_h_recursive or #recursive_to_h, as that's what it does.

as that's what it does.

Strong point.


allow pyyaml>=3.13 in order to avoid vulnerabilities in pyyaml 3.13

Description

Change dependency on pyyaml from ==3.13 to >=3.13.
I have a couple of projects in GitHub that depend on Zappa and use pipenv to manage dependencies. GitHub has started sending me security alerts saying that there is a vulnerability in that version of PyYAML and to upgrade to >= 4.02b1.
This is impossible to do because of Zappa's explicit dependency on pyyaml==3.13. So I just changed the == to >=.
GitHub Issues

Thanks, merged as part of #1786 (just merged).


Automated cherry pick of #5506: fix: recode cloudprovider usable filter

Cherry pick of #5506 on release/2.12.
#5506: fix: recode cloudprovider usable filter

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.12@017f8ad). Click here to learn what that means.
The diff coverage is 0%.

@@              Coverage Diff               @@
##             release/2.12   #5510   +/-   ##
==============================================
  Coverage                ?   6.82%
==============================================
  Files                   ?     506
  Lines                   ?   86348
  Branches                ?       0
==============================================
  Hits                    ?    5897
  Misses                  ?   79955
  Partials                ?     496

Flag
Coverage Δ

#aFlag
6.82% <0%> (?)

Impacted Files
Coverage Δ

pkg/compute/models/cloudproviders.go
1.02% <0%> (ø)

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 017f8ad...cdcf3b6. Read the comment docs.


compute_ctl: enable tracing panic hook

Problem
compute_ctl can panic, but tracing is used for logging. panic stderr output can interleave with messages from normal logging. Example: https://neondb.slack.com/archives/C033QLM5P7D/p1685454283199429?thread_ts=1685453578.548449&cid=C033QLM5P7D
Summary of changes
Use established way (pageserver, safekeeper, storage_broker) of using tracing to report panics.
Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] If it is a core feature, I have added thorough tests.
[x] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
[x] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

[x] Do not forget to reformat commit message to not include the above checklist

can you elaborate on

panic stderr output can interleave with messages from normal logging

?
In the linked thread I don't see any logs after compute_ctl panic (which is now a standard behavior for any issues during initial startup sequence to exit fast)

I just looked and saw these lines on separate "messages":
2023-05-30 13:26:42.985	note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2023-05-30 13:26:42.985	thread 'main' panicked at 'neither spec nor confirmation that compute is in the Empty state was received', compute_tools/src/bin/compute_ctl.rs:145:29

These are the same "message", newest first order. The panic_tracing_hook would just include the current span information (missing here), and no "run with RUST_BACKTRACE=1 environment ..." hint. The backtrace would be included if RUST_BACKTRACE=1 was configured, but I assume it's left out on purpose.

I am not used to stacktraces with rust code, but perhaps in pageserver there is more need. Hopefully compute_ctl doesn't need them either. The exact location is included in the message.


commit check fails

After setting up #78 the used v0.7.4 version of this action fails when checking commits.
This does not have to be linked to the mentioned PR but was suspicious.
see:

479f31efb1ddd0ee9aedbda8c8f81c477e612a32
511b496ff50b95a43a452f1f6af08e60c276cc5d

v0.7.4 worked as expected in other repository

Working again


docs/test: Move test images into securesystems DockerHub repository

Previously, we had test images at docker.io/connytest/testimage but decided we wanted to have have the securesystems repository instead. This PR follows up on that decision.
Fix #41

As commented by @xopham this should also ensure the images are not dropped due to not being used

As commented by @xopham this should also ensure the images are not dropped due to not being used


Generate EC/DSA nonces in a way that does not reveal whether top bits are set

Partially fixes #23860
This does not resolve the problem completely as there are architecture-specific issues in the point multiplication that can still leak the information by timing and it also won't work with BN_DEBUG defined.

@paulidale please reconfirm

This pull request is ready to merge

Merged to the master, 3.3 and 3.2 branches. Created  #24317 for 3.1 and 3.0. Thank you for the reviews.

Function declarations in .c/.h need to be same.
.c
int ossl_bn_is_word_fixed_top(const BIGNUM *a, const BN_ULONG w)
.h
int ossl_bn_is_word_fixed_top(const BIGNUM *a, BN_ULONG w);
will break compile in MSVC warning check

Function declarations in .c/.h need to be same. .c int ossl_bn_is_word_fixed_top(const BIGNUM *a, const BN_ULONG w) .h int ossl_bn_is_word_fixed_top(const BIGNUM *a, BN_ULONG w);
will break compile in MSVC warning check

This would be a good first issue and eligible for CLA: trivial - would you like to submit a PR?

Function declarations in .c/.h need to be same. .c int ossl_bn_is_word_fixed_top(const BIGNUM *a, const BN_ULONG w) .h int ossl_bn_is_word_fixed_top(const BIGNUM *a, BN_ULONG w);
will break compile in MSVC warning check

This would be a good first issue and eligible for CLA: trivial - would you like to submit a PR?

maybe you can fix this msvc compile issue quickly ,thanks for your hard working.


[WIP ]Update some documents for 5.0.0-alpha release.

We need to update the documents for our 5.0.0-alpha release.
See here, https://github.com/apache/incubator-skywalking/tree/5.0.0-alpha-doc, to read documents.
Don't merge this document, except every PMC approved this pr.

Coverage remained the same at 19.473% when pulling 00a9cde2821a39bacdbb2e8d33ee6ab42d06637d on 5.0.0-alpha-doc into baa5765c51634de142876cf27286466e06fdebee on master.


Follow the README to run the MegEngine implementation, but report an error

When I followed the README to run the MegEngine implementation, I got an error like below.
14 07:38:02 WRN try setting the submodule <class 'megengine.tensor.Tensor'> to <class 'models.yolo_head.YOLOXHead'>'s new attribute grids.1, its name grids.0 will remain unchanged
14 07:38:02 WRN try setting the submodule <class 'megengine.tensor.Tensor'> to <class 'models.yolo_head.YOLOXHead'>'s new attribute grids.2, its name grids.0 will remain unchanged

Don't worry, it's just a warning.


gomarkdoc: init at 1.1.0

Description of changes
Add gomarkdoc, a package to Generate markdown documentation for Golang code.
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

[x] 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
[x] 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.

@Janik-Haag I think I did all the requested changes. Please review.
Since the GitHub Actions were failing, I also moved the package to pkg/by-name as suggested.


what about admin for AdminLTE ?

for admin dashboard, current one is nice and clean but AdminLTE will be a good choice.

Take a look at https://www.youtube.com/watch?v=YxyeX8-9lb0

Better admin UI would be nice... I will maybe do this after I finish the shop.

I would rather prefer SmartAdmin template for any logged in panels like admin/user panels

@MicroAsif well, that right. in that case ngx-admin is preferably a better choice than admin-lte because it is vast and has a lot of controls than admin-lte has.

I would rather prefer SmartAdmin template for any logged in panels like admin/user panels

it's paid. as SimplCommerce is open source, we need something that has MIT license.

@MicroAsif well, that right. in that case, as @bugproof stated, ngx-admin is preferably a better choice than admin-lte because it is vast and has a lot of controls than admin-lte has.
More importantly, ngx-admin would be the right choice because angular is being used in this project. The amount of time and effort needed to integrate ngx-admin template into this angular project seems to be a way lesser than integrating a bootstrap template into an angular project because different this on bootstrap might be needed to cod differently in an angular project while ngx-admin is already based on angular.


Infinite recursion caused by AI movement

Environment

OS version: Linux  4.16.9-1-ARCH
Elona Foobar verision: develop

Details
The AI can get stuck in an infinite loop and cause a stack overflow under certain rare conditions.
How to reproduce

Run the script below. (#596 is needed for chara.experience API)
Start riding the wild horse.
Attack the sandbagged target repeatedly so the mount also starts attacking it.
Wait some amount of turns until the mount stops attacking.
Repeat from 3 for a good amount of time.

local Event = Elona.require("Event")
local Enums = Elona.require("Enums")
local Chara = Elona.require("Chara")
local Map = Elona.require("Map")
local Item = Elona.require("Item")

local function make_sandbag(x, y, chara_id)
   Item.create(x, y, 733, 1)
   local chara = Chara.create(x, y, chara_id)
   chara:set_flag(Enums.CharaFlag.IsHungOnSandBag, true)
   return chara
end

local function setup()
   Chara.player():gain_skill_exp(152, 9999)
   Chara.player():gain_skill(301, 9999)
   local chara = Chara.create(24, 24, 277)
   chara:gain_skill_exp(11, 9999999)
   chara:damage_hp(-9999999)
   chara:recruit_as_ally()
   Chara.player().experience = Chara.player().experience + 9999999

   for i=0,25 do
      Chara.create(Map.random_pos(), 229)
   end
   Item.create(Chara.player().position, 236, 1)
   make_sandbag(23, 23, 312)
end

Event.register(Event.EventKind.MapInitialized, setup)

Cause
These two lines are suspect:
#23174 0x00005555558c806f in elona::ai_proc_basic () at /home/ruin/build/elonafoobar/ai.cpp:299
#23175 0x00005555558c8f0f in elona::proc_npc_movement_event (retreat=false) at /home/ruin/build/elonafoobar/ai.cpp:420

How to reproduce (Detailed)
local Event = Elona.require("Event")
local Enums = Elona.require("Enums")
local Chara = Elona.require("Chara")
local Map = Elona.require("Map")
local Item = Elona.require("Item")

local function make_sandbag(x, y, chara_id)
   local chara = Chara.create(x, y, chara_id)
   chara:set_flag(Enums.CharaFlag.IsHungOnSandBag, true)

   chara = Chara.create(x + 1, y, chara_id)
   chara:set_flag(Enums.CharaFlag.IsHungOnSandBag, true)
end

local function setup()
   Chara.player():gain_skill_exp(152, 9999)
   Chara.player():gain_skill(301, 9999)
   local chara = Chara.create(24, 24, 277)
   chara:gain_skill_exp(11, 9999999)
   chara:damage_hp(-9999999)
   chara:recruit_as_ally()
   Chara.player().experience = Chara.player().experience + 9999999

   make_sandbag(23, 23, 312)
end

Event.register(Event.EventKind.MapInitialized, setup)

Run the script above.
Start riding the wild horse.
Attack the left sandbagged target repeatedly so the mount also starts attacking it.
Attack the right one repeatedly without neighboring the left so the mount also starts attacking it.
[R]est until stack overflow occurs.

Note in 3. and 4., see the below positioning.
A = Sandbagged enemy 1
B = Sandbagged enemy 2
@ = You and the mount

3. Attack A.
@  A  B

4. Attack B WITHOUT NEIGHBORING A.
A  B  @

Cause
Global variable distance is not updated and remains as it is when the target of the mount changes.

How to reproduce (Detailed)
Edit ai.cpp:
// In ai_proc_basic()

/* comment out
 if (cdata[cc].ai_dist <= distance)
 {
    if (rnd(3) == 0)
     {
         return turn_result_t::turn_end;
     }
*/
}

Also edit init.cpp:
// In initialize_debug_globals()

    create_all_adventurers();
    create_pcpic(0, true);
    cdatan(1, 0) = random_title();
    cdatan(0, 0) = randomname();

    mdata(6) = 2; // Add this line

local Event = Elona.require("Event")
local Enums = Elona.require("Enums")
local Chara = Elona.require("Chara")
local Map = Elona.require("Map")
local Item = Elona.require("Item")

local function make_sandbag(x, y, chara_id)
   local chara = Chara.create(x, y, chara_id)
   chara:set_flag(Enums.CharaFlag.IsHungOnSandBag, true)

   chara = Chara.create(x + 1, y, chara_id)
   chara:set_flag(Enums.CharaFlag.IsHungOnSandBag, true)
end

local function setup()
   Chara.player():gain_skill_exp(152, 9999)
   Chara.player():gain_skill(301, 9999)
   local chara = Chara.create(24, 24, 277)
   chara:gain_skill_exp(11, 9999999)
   chara:damage_hp(-9999999)
   chara:recruit_as_ally()
   Chara.player().experience = Chara.player().experience + 9999999

   make_sandbag(23, 23, 312)
end

Event.register(Event.EventKind.MapInitialized, setup)

Run the script above.
Start riding the wild horse.
Attack the left sandbagged target repeatedly so the mount also starts attacking it.
Attack the right one repeatedly without neighboring the left so the mount also starts attacking it.
[R]est until stack overflow occurs.

Note in 3. and 4., see the below positioning.
A = Sandbagged enemy 1
B = Sandbagged enemy 2
@ = You and the mount

3. Attack A.
@  A  B

4. Attack B WITHOUT NEIGHBORING A.
A  B  @

Cause
Global variable distance is not updated and remains as it is when the target of the mount changes.


chore(registry): use updated registry V1 fork

See https://github.com/deis/docker-registry/compare/new-repository-import-v091...deis:new-repository-import-master. It was suggested to me at DockerCon that some post-v0.9.1 fixes in classic registry could improve stability, and that gevent and/or gunicorn had been buggy, so this rebases our fork and updates those packages. If #3814 isn't ready for the next release, this is worth testing to see if it fixes classic registry stability issues.
Refs #3479.

code LGTM. Doesn't look like master has anything crazy.

Code LGTM.


A better error description in the console for schema errors

The errors which are mentioned during amplify push (for API schema) are sometimes unclear and hard to solve.
Can the line items of the schema file be added where the error is coming from.
Example errors:

Could not find an object type named String.

Expected scalar and got X

If you know the line item then immediately you know where to search.

What version of the CLI are you using?
Do you have a sample schema which we can use to reproduce this error?
This kind of error seems like it's coming from the GraphQL Transformer.

The latest version, just updated it yesterday.
I solved it now, so just can't reproduce now, but finding this issue takes a lot of time and trail&error.
So better error description over the whole chain can be improved

We are looking into a better way to log/error message should something like this happen.
Closing this as this can't be reproduced in the latest version. Should you run into a similar error please comment below.

Ok thanks, I will do!

I have an example with this schema:
type Registration
  @model
  @key(name: "registrationByDate", fields: ["date"])
  # prettier-ignore
  @auth(
    rules: [
      {
        allow: owner,
        ownerField: "owner",
        operations: [create, update, delete, read]
      },
      { allow: private}
    ]
  ) {
  id: ID!
  horeca: Horeca! @connection(keyName: "horecaRegistration", fields: ["id"])
  members: [MemberRegistrations] @connection(keyName: "byRegistration", fields: ["id"])
  date: String!
  time: String!
  owner: String!
}

type Horeca
  @model
  @key(fields: ["id", "name"])
  @key(name: "horecaByName", fields: ["name", "place"])
  @key(name: "horecaByPlace", fields: ["place", "name"])
  # prettier-ignore
  @auth(rules: [{ allow: owner, ownerField: "owner",operations: [create, update, delete, read] },{ allow: private}]) {
  id: ID!
  name: String!
  place: String!
  qr: String
  owner: String!
  registrations: [Registration]
    @connection(keyName: "horecaRegistration", fields: ["id"])
}

type Family
  @model
  @key(name: "byfamilyName", fields: ["familyName"])
  # prettier-ignore
  @auth(
    rules: [
      {
        allow: owner,
        ownerField: "owner",
        operations: [create, delete, update, read]
      },{ allow: private}
    ]
  ) {
  id: ID!
  familyName: String!
  address: String!
  phone: String!
  members: [Member]! @connection(keyName: "byName", fields: ["id"])
  owner: String!
}

type Member
  @model
  @key(name: "byName", fields: ["familyID", "name"])
  # prettier-ignore
  @auth(
    rules: [
      {
        allow: owner,
        ownerField: "owner",
        operations: [create, delete, update, read]
      },{ allow: private}
    ]
  ) {
  id: ID!
  familyID: ID!
  name: String!
  owner: String!
  family: Family @connection(fields: ["familyID"])
  registrations: [MemberRegistrations] @connection(keyName: "byMember", fields: ["id"])
}

type MemberRegistrations
  @model(queries: null)
   @key(name: "byMember", fields: ["memberID", "registrationID"])
  @key(name: "byRegistration", fields: ["registrationID", "memberID"])
  {
  id: ID!
  registrationID: ID!
  memberID: ID!
  registrations: Registration! @connection(fields: ["registrationID])
  members: Member! @connection(fields: ["memberID"])
  }

I get this error:
Syntax Error: Unterminated string.
An error occurred during the push operation: Syntax Error: Unterminated string.

Or this error with this schema:
type Registration
  @model
  @key(name: "registrationByDate", fields: ["date"])
  # prettier-ignore
  @auth(
    rules: [
      {
        allow: owner,
        ownerField: "owner",
        operations: [create, update, delete, read]
      },
      { allow: private}
    ]
  ) {
  id: ID!
  horecaID: ID!
  horeca: Horeca! @connection(fields: ["horecaID"])
  members: [MemberRegistrations]
    @connection(keyName: "byRegistration", fields: ["id"])
  date: String!
  time: String!
  owner: String!
}

type Horeca
  @model
  @key(fields: ["id", "name"])
  @key(name: "horecaByName", fields: ["name", "place"])
  @key(name: "horecaByPlace", fields: ["place", "name"])
  # prettier-ignore
  @auth(rules: [{ allow: owner, ownerField: "owner",operations: [create, update, delete, read] },{ allow: private}]) {
  id: ID!
  name: String!
  place: String!
  qr: String
  owner: String!
  registrations: [Registration]
    @connection(keyName: "registrationByDate", fields: ["id"])
}

type Family
  @model
  @key(name: "byfamilyName", fields: ["familyName"])
  # prettier-ignore
  @auth(
    rules: [
      {
        allow: owner,
        ownerField: "owner",
        operations: [create, delete, update, read]
      },{ allow: private}
    ]
  ) {
  id: ID!
  familyName: String!
  address: String!
  phone: String!
  members: [Member]! @connection(keyName: "byName", fields: ["id"])
  owner: String!
}

type Member
  @model
  @key(name: "byName", fields: ["familyID", "name"])
  # prettier-ignore
  @auth(
    rules: [
      {
        allow: owner,
        ownerField: "owner",
        operations: [create, delete, update, read]
      },{ allow: private}
    ]
  ) {
  id: ID!
  familyID: ID!
  name: String!
  owner: String!
  family: Family @connection(fields: ["familyID"])
  registrations: [MemberRegistrations]
    @connection(keyName: "byMember", fields: ["id"])
}

type MemberRegistrations
  @model(queries: null)
  @key(name: "byMember", fields: ["memberID", "registrationID"])
  @key(name: "byRegistration", fields: ["registrationID", "memberID"]) {
  id: ID!
  registrationID: ID!
  memberID: ID!
  registrations: Registration! @connection(fields: ["registrationID"])
  members: Member! @connection(fields: ["memberID"])
}

error
id field is not of type String
I hope you get my point

This is still an issue with 4.46.1:
$ amplify push

✔ Successfully pulled backend environment dev from the cloud.

Current Environment: dev

| Category | Resource name | Operation | Provider plugin   |
| -------- | ------------- | --------- | ----------------- |
| Auth     | app343630a8   | Create    | awscloudformation |
| Api      | app           | Create    | awscloudformation |
? Are you sure you want to continue? Yes
✖ An error occurred when pushing the resources to the cloud

Syntax Error: Expected :, found [
An error occurred during the push operation: Syntax Error: Expected :, found [

$

I had to find the error by searching the schema for [. It would be very helpful if there were error messages.
Here is the schema with the error:
type Language @model {
  id: ID!
  name: String!
  iso: String!
  speakers: [LanguageSpeaker] @connection(keyName: "byLanguage", fields["id"])
}

type LanguageSpeaker
  @model(queries: null)
  @key(name: "byLanguage", fields: ["languageID", "speakerID"])
  @key(name: "bySpeaker", fields: ["speakerID", "languageID"]) {
  id: ID!
  languageID: ID!
  speakerID: ID!
  language: Language! @connection(fields: ["languageID"])
  speaker: Speaker! @connection(fields: ["speakerID"])
}

type Speaker @model @auth(rules: [{ allow: owner, operations: [create, delete, update] }]) {
  id: ID!
  owner: String
  name: String!
  languages: [Language] @connection(keyName: "bySpeaker", fields: ["id"])
}


[TS migration] Migrate 'Tooltip' component to TypeScript

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/25123
PROPOSAL: N/A
Tests

[ ] Verify that no errors appear in the JS console
[ ] On web and desktop:

[ ] Hover the buttons with tooltips (Search button, account settings button, FAB). Verify tooltips are correctly displayed.

[ ] Verify that the app works.

Offline tests

N/A
QA Steps

[ ] Verify that no errors appear in the JS console
[ ] Tests from above.

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/104823336/27d37649-47b0-47c6-9579-2091479a7401

MacOS: Desktop

https://github.com/Expensify/App/assets/104823336/d3bedf67-c906-43be-8637-2d9357bf259c

Requested for new C+ plus, @allroundexperts will take over this.

@kosmydel Please resolve conflicts 😄

@allroundexperts is already responsible for two quite big TS migration PRs:

Report
AppNavigator

(+ and this one)
Please take this into consideration before tackling all these at once 😅

Have you listed these priority wise?

@allroundexperts priority-wise:

AppNavigator
Tooltip
Report

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/30054992/72cbbdd2-5d32-4822-9c48-bf66c863fb8f

Android: mWeb Chrome

https://github.com/Expensify/App/assets/30054992/494a71de-d1bf-4f2b-be40-aa6f60a3c30c

iOS: Native

https://github.com/Expensify/App/assets/30054992/45826261-fef3-4bd6-934e-2b30c69da9d2

iOS: mWeb Safari

Uploading Screen Recording 2023-12-06 at 4.57.16 AM.mov…

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/30054992/372eb47a-6461-4957-9cd4-a93d7c5b3a39

MacOS: Desktop

https://github.com/Expensify/App/assets/30054992/1f470eb0-c5df-44c6-8758-41db030c99db

Testing well. Waiting for the conflicts to be resolved before final approval.

Hey, I pulled the main, resolved conflicts, and had to make fix warning on native on native, as there was a warning during runtime (related to forwardRef, web version used is while native didn't).
cc @blazejkustra, @allroundexperts

I've resolved conflicts, so it is ready to proceed.

🎀 👀 🎀

I've resolved conflicts once again. cc @blazejkustra @allroundexperts

Gonna take it over here as its component with lots of conflicts to get it over the finish line

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.11-25 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅