Reducing repository size

Dream Plus' repository has become huge in terms of size. Any ideas on how to make it lighter? The content itself isn't as huge. All the size is due to .git folder.
The cloning is getting slow due to this.

This will not be possible without a git-force push. The history is cluttered with binary files which git cannot delta/compress correctly, that's why committing binary files is bad.
Now let's see which commits are the worst:
5064 KB 0c4793ce2114d53044a95ddadbe1953c57592d68
2334 KB 52043cd50b817b65e20c96c8affe36018d507bf5
1842 KB b6bdccfdb784f05a68b05c0339e2129b347628b7
1760 KB 46d1057a3786fc78cb4d2a59313b3eb3fc32b896
1407 KB 59000eee5a1e39bdcc0ee7cb9e99969da5f34ea0
1194 KB 5e2943ff8e2fc0f8fddad62b156cd0f3aff6d650
106 KB daf0c43cbdc1d3b9421320f5d668b89a5ef41193
981 KB 97444ccdf464fc6d9c4fe5de836efd1128aa2d3a
872 KB d018d2fe97219bd54989ebf4bd2f1561db8944e4
848 KB 5504a92a5db071bab9b6f82988c8b7ad336d27e4
808 KB 03cfadd4fb4606ed6c45df0baa71ad8098ba7c6a
786 KB 0e160ac2e951ac580eb018bb63bef02ea61a6bd7
675 KB e867b6f56fc8a7136293e372cc43554863e3aa52
470 KB a9473929cfd7d68a0cfa68362eb4ab0a97bc9879
Boils down to git-filterbranch and re-commit or removal of *.jpg (~13MB), *.png (14MB) which brings the size of the history to ~6MB.
It's that or live with the 33MB and stop commiting binary files, hope I was of help, thank's for your great work.

Highly destructive lines of codes following
java -jar ../bfg.jar --delete-files "*.png" .
java -jar ../bfg.jar --delete-files "*.jpg" .
git reflog expire --expire=now --all && git gc --prune=now --aggressive

BFG: https://github.com/rtyley/bfg-repo-cleaner
but then again it's probably more of a decision if you actually want to forcepush.

#29

That won't solve the problem, because the largest part is the history not the current size, infact this will worsen the problem, because it will make the history/deltas even bigger.

Hi can i claim this issue?

Yes, it's open to all!

@FAUSheppy Completely removing binary files from history seems to be the plausible course of action here. Though it will break earlier commits, yet I think it's necessary since cloning this repo is becoming a drag day-by-day.

This issue has been solved with the final clone size resulting in 8.34MB.


Awesome changes!

Shiny code inserted
Experiment with branches and pull request; the idea is to pull a separate branch to the original repository and keep it separate untill finished

Pull request #6 from farfilli/Experimental-great-branch passes all unit tests.  Merging and closing.  Thank you!


Implement NN-type or NN-class in JSON for No-code running of various supported neural output formats

So as it stands now one can try out their own object detectors without code by using command line options like here.  And to use their own models, they just find the folder structure w/ JSON, copy it over and enter any pertinent information according to their model.
So if they've done a custom face-detection model, they literally just use the same JSON and replace the .bin.
So for image classifiers (where a tensor of classes that are in the image), we do not have a no-code version.  So for different networks, with different output format, different decode_nn and show_nn has to be implemented.
For some image classifier for example:
if args['cnn_model'] == 'age-gender-recognition-retail-0013':
decode_nn=decode_age_gender_recognition
show_nn=show_age_gender_recognition
calc_dist_to_bb=False
So one has to write their own format/parsing that they see in the emotions-recognition-retail-0003 to parse and display your results, see resources here.  You could extend your own functionality into depthai.py.  See the decode_emotion_recognition portion here and show_emotion_recognition here.
So the idea is to add another entry in json, to mark if it's something generic, let's say NN_type, or NN_class, and based on that select the decode_nn/show_nn methods.
So that way we don't have to hard-code based on names, and for any network output structure parsing we support (e.g. object detection, image classification, facial landmark, etc.), those types of networks can be used cleanly w/ no-code implementation by simply finding the equivalent folder, making sure the format follows, and running their model.

This actually was implemented and merged into main quite a while ago, including support for multi-stage neural inference.  E.g.:
./depthai_demo.py -cam left_right -cnn face-detection-retail-0004 -cnn2 landmarks-regression-retail-0009 -dd


I read the caveat on the rule page. In our codebase however, we use a lot of Effect, a functional programming library. Effect.forEach is used often enough that it would be bothersome to add biome-ignore comments to every usage.
Would it be feasible to make this rule configurable to ignore some objects?
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

I don't know, to be honest. Providing an option for this rule is like cheating, a user could use the option to bypass some code, e.g.
const arr = [];
arr.forEach();

Then, add arr to the options. For us, options should be a way to empower the rule, not a way to "cheat". I think the correct course of action is for users to suppress of turn off the rule.

I don't agree that lint rules are for policing, that's for pull requests. Lint rules are guidelines that can be avoided in many ways already. Adding an option, such as the suggestion above, allows apis such as Effect to work within the rules instead of forcing people to turn them off.
If a pull request to your project included an adjustment to the biome lint rules; turning off a rule for variables called "arr" - that is a red flag, just as a biome ignore comment would be.
Note: I have skin in the game as I use effect. I don't want to turn off a perfectly good linting rule if possible.

I would a configuration would look like?

Maybe something like the below would work?
{
  "noForEach": {
    "level": "error",
    "options": {
      "ignore": ["Effect.forEach"]
    }
}

@nickrttn Why not disable the rule?

Because it does have value to us outside of Effect.

PRs are welcome, here's an acceptable option:
{
  "noForEach": {
    "level": "error",
    "options": {
      "validIdentifiers": ["Effect", "_"]
    }
}

The rule will check if forEach is called by an expression that matches Effect or _. e.g.
Effect.forEach();
_.forEach();

Values with dots won't be accepted. A value such as "something._" won't work.


HTTP: WebSocket extended logs

Problem:
Currently, WebSocket logs don't contain context information (Session attributes, etc). No ability also to separate logs on failed requests like in HTTP module when we can set up different log levels as TRACE or DEBUG.
There is nuance for WS Check, it's useful to store all message which was filtered/non-matched by check.

I created PR https://github.com/gatling/gatling/pull/4307


Jb

Switched over from staging.  Stable build with improvements. Date range working etc, ability to add answers as an array was the other big change.

forgot to pull/merge


Create 0000-01-02-DNF78.md

added DNF78file step 5

This branch was to update text file in the slide


This repo shouldn't be tagged for releases

@jmbowman @mduboseedx
Do we think there are other repos with this line that shouldn't have it?

In terms of others that shouldn't have it: maybe edx-custom-a11y-rules, edx-enterprise, edx-ui-toolkit, and ux-pattern-library?  It looks like those are all installed via npm or pip.


public api, install from npm

Public api, please.

@tamtakoe I've updated the readme. Does that solve this issue for you?

Yes! Thank!


Sync sleep

From: https://github.com/jaroslawhartman/withings-garmin-v2/issues/12 (reported by @swedejesus)

I have no idea - tried to google it buy couldn't find any info.
Is it possible to sync Withings sleep to Garmin sleep tracking?

Hi, any news on this? The other issue was closed without comment and it doesn't look like sleep sync is working

It looks doable as the Withings sleep data is accessible via API (https://developer.withings.com/oauth2/#tag/sleep)   I however don't have access to a Withings device that is capable to track sleep so you'll have to experiment with it on  your own.
The next hurdle will be importing that data into the Garmin ecosystem.  A quick search doesn't really yield any additional info, but I noticed that Garmin has an option to import Fitbit body or activity data (.xls, .xlsx or .csv format).  Fitbit exported data contains sleep (Your sleep schedule, minutes asleep and awake, number of times you woke up, amount of time spent in bed, time spent in each sleep stage).


⚠ SceneTime has degraded performance

In f553517, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 15405 ms

Resolved: SceneTime performance has improved in 1938bea after 244 days, 21 hours, 14 minutes.


Add hex-package-search extension

Description

This extension creates an easy way to search hex.pm for Erlang and Elixir packages. With actions to view documentation on Hexdocs.pm, copy the mix.exs or rebar.config config to clipboard.
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Thanks for your contribution 🔥
This should already be possible in this extension, could you check that out?


Another cleanup attempt for line spacing

Summary
Another cleanup attempt for line spacing

This is a release management task, as per our policy, we are self-approving it.


Fix #203 Finalizando a documentação da sprint 5

Nesse Pull request foi finalizado a documentação da sprint 5

Pull Request Test Coverage Report for Build 616

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 71.078%

Totals

Change from base Build 612:
0.0%

Covered Lines:
116

Relevant Lines:
158

💛  - Coveralls


Client interface container identification: name and version

The methods of api::client::Client feels clunky. Especially the Version is hard since it needs to (try_)`parsed.
Think about changing the API to one of this options:

Make the container and version a &str or impl ToString:  e.g test:0.0.1. Split and parse this in each method of Client and fails if that fails.
Make version a &str to impl ToString and then same as in 1.
Expose Container in api::client

Fixed by #395


Add API Rate Limiting to ROADMAP

More information about this feature request is tracked in #3363

Hi @animedbz16, this is interesting, but much better implement as a hook than a core feature.  We're trying really hard to fight feature bloat and move as much functionality as we can into separate modules.


Pull errors and tracebacks from errored tasks from alchemiscale

Description
Add feature to extract errors and tracebacks from simulations run with alchemiscale.
The idea is to extend the status command to query the errored tasks in the network and return their key with the error (python exception) and the traceback, if specified in the CLI.
Todos
Notable points that this PR has either accomplished or will accomplish.

[ ] Extend the status command with options or flags to get errors and tracebacks
[ ] Add the API point for this purpose in AlchemiscaleHelper class
[ ] Write tests

Status

[ ] Ready to go

Codecov Report

Merging #474 (6b92a9e) into main (83e187e) will decrease coverage by 0.41%.
Report is 1 commits behind head on main.
The diff coverage is 95.89%.

Additional details and impacted files

Closing. Superseded by https://github.com/choderalab/asapdiscovery/pull/477


Get Started Firebase Firestore from Kotlin Multiplatform App

Hello, i start develop simple kotlin multiplatform app, but  I'm new in kotlin develop, how use firebase firestore in common code. I implement library, create app & database in firebase console. Then create firebase helper class. Really lacking guide/tutorial/wiki. Help plz.

You don't need to add a helper as Firebase.firestore etc is already defined in the SDK.
The usage is exactly the same as the official android SDK except for the differences explained in the README. So try by following the android tutorial from Firebase


#3 | Hendi Santika | Upgraded into Spring Boot 3.2.5 version 🫸🌀✏📗🐧🐳⬆

#3 | Hendi Santika | Upgraded into Spring Boot 3.2.5 version 🫸🌀✏📗🐧🐳⬆

Please check & review my PR @sbathina 🫸🌀✏📗🐧🐳


Rendering results are all white after training the vanilla NeRF in step1

Hi @xiumingzhang, Thank you for your great work.
I just tested the code on the Shiny Blender dataset from the Ref-NeRF paper but go wired rendering results(all white) while training the vanilla NeRF.
Shiny Blender teapot:

Here is the dataset in NeRFactor format.
NeRF Synthetic ficus:

I use the same settings (near, far, learning rate...) as NeRF synthetic dataset in your README.
I am wondering if I miss anything or feed the wrong config setting to the network.
Thank you in advance!

Solved by setting a smaller learning rate. Closing the issue now.


Workergroup: Make Group Parameter consistent with Master

Change the config.tag value to actually be config.group to be more consistent with the master chart. Ensure backwards compatibility for config.tag in the process

Resolved in #32


Optimisation: Remove Order and shift functionality to OrderState struct

Gas Reduction : ~2000 (This needs verification)
Tests: Fully working without changes
Related PRs: #286 - This PR fully integrates the former PR as it makes logical sense when re-purposing OrderState. Therefore I have closed the previous PR for now as this is the better of the two optimisations.
Notes:  This optimisation removes the  order struct from the contract entirely, opting to use the OrderState struct in its place. The aim is to reduce gas via optimisation of memory usage.
Originally, the contract would use OrderState, which contained order, but then also create an instance of Order in memory. Doubling the use of memory for essentially the same variables for no real reason.
The optimisation simply moves the variables from order to OrderState. All functions that used order have been changed to use OrderState .
Across the two structs, "lrcFee" was used as a variable name. This optimisation changes the names of  "lrcFee" variables that originally belonged in OrderState to "lrcFeeState".
This optimisation has a lot of scope for improvement, and I will be exploring this further. I will also be seeing how it can interact with my other unpublished, semi-working optimisations, for further gas reductions.
Edit: Order struct has been added back for a single use case - cancel order - this is because it will have small savings in gas in this instance.

I merged you prior PR and now this branch has conflicts. May you resolve it first?

I think I have resolved the issue.

Please give me some time to test it.

I will merge other PRs first since this PR will has conflicts with them.

No problems, I made changes to my personal code base earlier. I'll be committing an updated version shortly.

I'm closing this request as the alternate version (#305) was merged


Official app router example: TypeError: Cannot read properties of undefined (reading 'en')

Description
I'm trying to learn next-intl with example code but stuck at this problem. Is there anything wrong with the official example?
Verifications

[X] I've verified that the problem I'm experiencing isn't covered in the docs.
[X] I've searched for similar, existing issues on GitHub and Stack Overflow.
[X] I've compared my app to a working example to look for differences.

Mandatory reproduction URL
https://github.com/amannn/next-intl.git
Reproduction description
Reproduction:

git clone https://github.com/amannn/next-intl.git
cd examples/example-app-router
npm i
npm run dev
Switch language with the select on top-right hand corner
Error throw:

Expected behaviour
Switch language successfully without throwing error

Hmm, works for me without an issue. Maybe there's an issue with the monorepo setup, you can try to deploy/clone the example as described in the README.
I'll convert this to a discussion since it seems to be a usage question.


Tidied the documentation for the Dashboard UI

As discussed earlier in the week with @dodwyer and @bryk I've tidied up the documentation

Thank you for tiding the documentation! I'll review on Monday.
CC @floreks

LGTM, thanks for this contribution! For the future: you should, however, send pull request to the main repository, not to my fork. I'll merge this to the main repository.

Hmm... I cannot forward your commit to the main repository. Can you do this by yourself and CC me? This is the main repo: https://github.com/kubernetes/kubernetes


SVG Decoder with Batik

This adds Batik support for the SVG Decoder on the JVM.
As described in the KamelConfigBuilder extension function this is useful for this bug https://bugs.chromium.org/p/skia/issues/detail?id=12251
When using svgDecoder(useBatik = true) images like this are displayed properly, however they may result in lower quality therefore this options is disabled by default.

It would make more sense to make a new decoder

Mhm I don't know. They serve the same purpose and only one decoder can be used at a time.
An internal change would be required since the default KamelConfig already uses the SVGDecoder.
With the current implementation the decoder can be easily overwritten

Mhm I don't know. They serve the same purpose and only one decoder can be used at a time. An internal change would be required since the default KamelConfig already uses the SVGDecoder.
With the current implementation the decoder can be easily overwritten

I think it should work something like this where the last added decoder of a type should replace any previously added decoders of the same type.
KamelConfig {
    takeFrom(KamelConfig.Default)
    resourcesFetcher()
    // the last added svg decoder should replace the default
    batikSvgDecoder(true)
}

Also... we should probably separate decoders into their own modules people can import independently.... but I can figure that out after

I updated the PR so there is a separate decoder for Batik.
I don't think we should separate decoders into their own modules as this is a lot of overhead in development, I can tell as someone who developed other multi-module libraries.
I think a feature-like separation makes more sense.
Example:
We have a core image processing library which contains just default compose implementation.
Then we have a module for web resources, so all fetchers and decoders related to HttpRequests etc. are going in one extra module, as some people don't need this if they work with resources and system files only.
Then there is a svg module for example where all extra svg decoders (like Batik) take a place.
However there has to be a decision made about something like the android svg decoder. As the core images module would include the skia implementation and people could get confused why SVGs work on any other than android

Yeah I agree it should definitely be split up by features as well. But, if for example a svg decoder feature module one day has 5 different implementations backed by 5 different dependencies. People aren't going to like all that extra baggage.
I think it might be good to split all the decoders / fetchers into their own modules then have a module called something like kamel-defaults or something similar which gives you access to KamelConfig.Default and exposes all decoders and fetchers which are considered default. And then you can also have another module which bundles by feature like kamel-decoder-svg which would expose all svg decoder implementations. And finally you can granular imports with each decoder/fetcher implementation like: kamel-decoder-svg-batik
dependencies {
    implementation("media.kamel:kamel-image:0.6.0")
    // imports all default implementations
    implementation("media.kamel:kamel-defaults:0.6.0")
    // imports all svg decoders the (standard + batik)
    implementation("media.kamel:kamel-decoder-svg:0.6.0")
    // imports just the batik svg decoder
    implementation("media.kamel:kamel-decoder-svg-batik-:0.6.0")
    // ...
}

Done


Actually install and enable ccache for A10+

Since Android 10, ccache is no longer shipped as a prebuilt and its path must be
specified through CCACHE_EXEC
See: https://cs.android.com/android/platform/superproject/+/android10-release:build/make/core/ccache.mk;l=31

Should be OK now

@voidanix could you please rebase on top of master, I can then merge this

There's also a rebase and merge button.

There's also a rebase and merge button.

My understanding is that it does a different thing, i.e. it just adds the commits from the PR directly on top of master, i.e. there will be no merge commit.


A react Based Note Making Webapp

I made a React based Web Application with the add and delete functionality

hii @iamwicked i am interested in solving this issue
would you please elaborate..

@iamwicked also assign me with this one

Hey @vishisht08 I haven't added edit feature. You can work upon that.

@iamwicked so where can i get the code of this in which i can make changes or i have to write everything on my own from scratch.

you can for the repo

okk

@iamwicked can you please explain more about edit feature as i see your code contains edit feature and it is also working so what i had to resolve.

ohkk..


The future of Bashark

Red Code Lab’s team is looking to expand Bashark. We’re looking for ideas and contributions from the community on what recon, pre-exploitation, and exploitation inclusions you’d like to see.
All feedback and contributions are welcome. Thank you.

De: yanabcd @.>
Enviado: terça-feira, 20 de setembro de 2022 10:46
Para: redcode-labs/Bashark @.>
Cc: Subscribed @.***>
Assunto: Re: [redcode-labs/Bashark] The future of Bashark (#6)
it s good use for us?
—
Reply to this email directly, view it on GitHubhttps://github.com/redcode-labs/Bashark/issues/6#issuecomment-1252172902, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AITXMF4JJJGL46SDELCUP6DV7GIY5ANCNFSM477OLERA.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


angular cli beta 16 is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the<EMAIL_ADDRESS>of this component to suppress this message.

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
windows 7

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0 -beta.16
NODE: 6.5
os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
Created with CLI

The log given by the failure.

Normally this include a stack trace and some more information.
zone.js:355Unhandled Promise rejection: Template parse errors:
Can't bind to 'app' since it isn't a known property of 'app-bodydetail'.

If 'app-bodydetail' is an Angular component and it has 'app' input, then verify that it is part of this module.
If 'app-bodydetail' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the<EMAIL_ADDRESS>of this component to suppress this message.
("

<app-bodydetail [ERROR ->][app] = "selectedApp">"): BodyComponent@6:16 ; Zone:  ; Task: Promise.then ; Value: Error: Template parse errors:(…) Error: Template parse errors:
Can't bind to 'app' since it isn't a known property of 'app-bodydetail'.

If 'app-bodydetail' is an Angular component and it has 'app' input, then verify that it is part of this module.
If 'app-bodydetail' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the<EMAIL_ADDRESS>of this component to suppress this message.
("

<app-bodydetail [ERROR ->][app] = "selectedApp">"): BodyComponent@6:16
at TemplateParser.parse (http://localhost:4200/main.bundle.js:16968:19)
at RuntimeCompiler._compileTemplate (http://localhost:4200/main.bundle.js:37047:51)
at http://localhost:4200/main.bundle.js:36970:83
at Set.forEach (native)
at compile (http://localhost:4200/main.bundle.js:36970:47)
at ZoneDelegate.invoke (http://localhost:4200/main.bundle.js:71628:28)
at Zone.run (http://localhost:4200/main.bundle.js:71521:43)
at http://localhost:4200/main.bundle.js:71887:57
at ZoneDelegate.invokeTask (http://localhost:4200/main.bundle.js:71661:37)
at Zone.runTask (http://localhost:4200/main.bundle.js:71561:47)
Mention any other details that might be useful.
//@Input() functions
how to add If 'app-bodydetail' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the<EMAIL_ADDRESS>of this component to suppress this message. ?

Thanks! We'll be in touch soon.

Problem resolved: remove  from body template.

Problem resolved: remove <app-bodydetail [app] = "selectedApp"> from body template.


[WIP] Prevent token collection corruption by fixers

This prevents replacing token content with unrelated content (hacky fix) in places which should override tokens. Given that the Tokens collection is cached and will be reused by the following fixer, a corrupted collection could break the following fixer as it expects token types to be valid.
The goal is to prevent having to deal with cases like that: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1097#discussion_r27307639
Replaces #1098

The remaining test failure seems to be related to the fact that WhitespacyCommentTransformer is not part of the 1.7 codebase.

@keradus we have a warning in the testsuite related to the LintManager here.

@keradus we have a warning in the testsuite related to the LintManager here.

ref #1152

:+1:
Please, get rid of that merge commits, eg by rebasing.
Also, there are multiple authors, could you do the squashing manually?
This will be a problem on our 2.0 line. After this PR will be merged I will merge 1.7 into master, then disable that new tests, and then send a PR for master with enabling the tests again, this way the 2.0 won't be always broken on Travis and we will have a PR to work on fixing token collection corruption on 2.0.

@keradus should we really squash commits refactoring the different fixers ?

Why not? If there where all yours then they will be squashed automatically during gh merge command.
After squashing we will have case that is already often - one person send a commit that proves bug and the other one send a commit that fixes it.

done

Do you plan to do sth more in this PR ?
I am asking in WIP flag context.

@keradus no. Given that tests are passing, this is not WIP anymore. I removed the flag

Great. Thank you!
Your PR brings an fantastic idea!

Thank you @stof.

btw... WOW, 18k of assertion now :D

btw... WOW, 18k of assertion now :D

nice :D

just a little tool to help with CS ;D


Can't resolve 'react-image-lightbox'

Describe the bug
In the last merge 'react-image-lightbox' pm package installed without updating into the dependencies
To Reproduce
Steps to reproduce the behavior:

Go to the labellab-server
run the command npm run dev
Go to the localhost and refresh

Expected behavior
Load  the page without error
Screenshots

Desktop (please complete the following information):

OS: windows10
Browser chrome
Version latest

did you run npm install?

did you run npm install?

Yes. by the way npm i react-image-lightbox sloved the thing. I posted the issue because my new pull request will take some time to merge

did you run npm install?

Yes. by the way npm i react-image-lightbox sloved the thing. I posted the issue because my new pull request will take some time to merge

The package is already in package.json so even if you run npm install in the client it would fix the problem.

oh really

did you run npm install?

Yes. by the way npm i react-image-lightbox sloved the thing. I posted the issue because my new pull request will take some time to merge

The package is already in package.json so even if you run npm install in the client it would fix the problem.

oh really, then it can be some problem with my latest pull from the master. anyway then I'm closing the issue thanks fro letting me know


Different type for iOS and Android

Awesome library! The only issue I'm having is when I pick certain types of files the picker gives me different types for Android and iOS. For example, picking an .avi file on iOS returns video/avi but Android returns application/octet-stream. Same happens for a .au file. iOS gets the file type just fine but Android returns application/octet-stream
Using react-native 0.51.0 and v3 of react-native-document-picker

Ultimately mime type handling is up to the OS and document provider implementations. We can't really change the native mime type mapping.


Dev-->Master

Preview

Christa's post is showing up, but I'm not sure how that works with the one preview link.  I'm assuming it won't go to master if it hasn't been pushed to dev.

Everything else looks good.

@mcharg I'm not sure either but I haven't merged it into dev so it shouldn't show. We'll see I guess.


ASLLVD corrections - part 6

We are VERY close to the end now...
asllvd-corrections-part6.xlsx

Done

We need an extra + on this sign:

Thank you !!


feat: ask leader

I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
DdlClient also needs to use ask_leader, refactor this part to make ask_leader easier to use
Checklist

[ ]  I have written the necessary rustdoc comments.
[ ]  I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@MichaelScofield @

@MichaelScofield @WenyXu PTAL


Added a configuration with special new features.

The special rules config includes three new game rules.

"Supplemental Caves" is basically "Extra Caves.xml" folded into this configuration.  A fix was added to prevent removal of bedrock.  I highly recommend using "Mantle" in combination with this to keep any exposed bedrock hidden.
"Mantle" fills all tunnels below a specified Y level (indicated by slider) with lava.
"Water Table" fills all tunnels below a specified Y level (indicated by slider) with water.
"Igneous Dike" is a solid cloud formation of lava that always spawns at level 0, simulating a magmatic intrusion above bedrock.

Also changed hint veins; they now also replace stone and gravel.  Additionally, hint veins now also use oredict values for stone, and sand.
Gravel and dirt oredicts have been removed from all configurations.
Finally, ExtraCaves.xml has been removed, since it is now part of Special Rules.

This pull request is sure collecting a lot of changes. ;)


Azure Policy Example for Storage Endpoint Diagnostics?

Can we please get an example of an Azure Policy rule for storage diagnostics for endpoints?
The deployment template is here, but I'm interested in the policy rule if logic and existenceCondition logic. https://docs.microsoft.com/en-us/azure/azure-monitor/samples/resource-manager-diagnostic-settings#template-file-5

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

ID: b8f43189-3418-fd30-0528-550157d8366d
Version Independent ID: 049e3b0e-6f10-6985-c719-05fe43fc00b8
Content: Resource Manager template samples for diagnostic settings - Azure Monitor
Content Source: articles/azure-monitor/samples/resource-manager-diagnostic-settings.md
Service: azure-monitor
Sub-service: logs
GitHub Login: @bwren
Microsoft Alias: bwren

hello @ezcodify
Thanks for bringing this to our attention. We are actively investigating and will get back to you soon.

hello @ezcodify
Thanks for bringing this to our attention. We are actively investigating and will get back to you soon.

Hello @ezcodify  - This was merged into Azure/Community-Policy earlier, might be what you are looking for.

Hello @ezcodify  - This was merged into Azure/Community-Policy earlier, might be what you are looking for.

Hello @ezcodify - This was merged into Azure/Community-Policy earlier, might be what you are looking for.

Thank you @femsulu - This is a good reference, however I was hoping to see the target type at the root Microsoft.Storage/storageAccounts and discover/remediate endpoints dynamically.

Hello @ezcodify - This was merged into Azure/Community-Policy earlier, might be what you are looking for.

Thank you @femsulu - This is a good reference, however I was hoping to see the target type at the root Microsoft.Storage/storageAccounts and discover/remediate endpoints dynamically.

Good feedback, @ezcodify but adding the solution author @mrajess to review and consider for future revisions.

Good feedback, @ezcodify but adding the solution author @mrajess to review and consider for future revisions.

I don't believe it's going to be possible to target the parent of Microsoft.Storage/StorageAccounts when trying to deploy diagnostic settings for the individual services (blob, table, files, and queue). A DINE policy looks to see if an associated (or if you're using DINE to enforce compliance on the resource caught in the if block, then it inspects that resource) resource exists, if not, it then deploys it.
The issue is that the diagnostic setting is particular to the individual service, example: Microsoft.Storage/StorageAccounts/fileServices
And so you need to capture that resource in the if block, and then check to see if there's a Microsoft.Insights/diagnosticSettings resources for it. If not, then deploy. If I were to capture the parent, Microsoft.Storage/StorageAccounts in the if block then I would just be checking to see if the Storage Account itself has a diagnostic setting, which isn't what I'm wanting.
I could write a Policy that targets Microsoft.Storage/StorageAccounts and just deploys diagnostic settings to the Storage Account, and the individual services (based on SA SKU, so adding conditions into the ARM Template), but there isn't a way for me to check compliance of the individual services so if someone removed the diagnostic setting on a blob endpoint, for example, then the Policy wouldn't be aware and never remediate it.
It's honestly not a good scenario and I've been talking with the product group that owns this about it. Please keep in mind that this is still in preview so things are being worked out.

I don't believe it's going to be possible to target the parent of Microsoft.Storage/StorageAccounts when trying to deploy diagnostic settings for the individual services (blob, table, files, and queue). A DINE policy looks to see if an associated (or if you're using DINE to enforce compliance on the resource caught in the if block, then it inspects that resource) resource exists, if not, it then deploys it.
The issue is that the diagnostic setting is particular to the individual service, example: Microsoft.Storage/StorageAccounts/fileServices
And so you need to capture that resource in the if block, and then check to see if there's a Microsoft.Insights/diagnosticSettings resources for it. If not, then deploy. If I were to capture the parent, Microsoft.Storage/StorageAccounts in the if block then I would just be checking to see if the Storage Account itself has a diagnostic setting, which isn't what I'm wanting.
I could write a Policy that targets Microsoft.Storage/StorageAccounts and just deploys diagnostic settings to the Storage Account, and the individual services (based on SA SKU, so adding conditions into the ARM Template), but there isn't a way for me to check compliance of the individual services so if someone removed the diagnostic setting on a blob endpoint, for example, then the Policy wouldn't be aware and never remediate it.
It's honestly not a good scenario and I've been talking with the product group that owns this about it. Please keep in mind that this is still in preview so things are being worked out.


[docs] Draft roadmap

todo: add last modified timestamp

It is ready. Please see this PR that adds a dedicated layout for the roadmap (with Last modified).

I haven't found an appropriate issue in the repository for Enhance TestCafe HTTPS Capabilities. Do we need to create a new one? If so, what technical detail should I include?
@miherlosev @helen-dikareva

Also see https://github.com/DevExpress/testcafe/pull/5960#discussion_r582073738


Add Session Id Tracking to Mesh Export Service API Call

Adding X-Session ID tracking header to to mesh export service API call. Pending Session ID testing.
Fixes iTwin/itwin-graphics-backlog/issues/210

cc. @arvindsvenkat
@andremig-bentley can you test/debug it in DEV and send the sessionId to Arvind, to see if the dashboard shows it?
@arvindsvenkat is the name of the header 'SessionId' correct?

cc. @arvindsvenkat
@andremig-bentley can you test/debug it in DEV and send the sessionId to Arvind, to see if the dashboard shows it?

Debugging the backend through Display Test App confirmed the correct session id is being used in the header. The first picture below is the session id being passed through the header, the second picture is the session id which is being used by the backend.


License

The license in the License file on github is MIT but there are references to the Beerware license in the code.  Can you confirm the correct license?  Thanks!

Hi @spectejb sorry for delay. MIT is the good one. I'll fix that in next release.

Awesome.  Thanks, @franck34!

Pushing 1.2.0 in a few minutes without any changes except licence

1.2.0 pushed in npmjs registry, closing ticket.


Faulty and Outdated packages in requirements.txt file

@swapnilsparsh
There were many faulty and outdated packages found in the requirements.txt file that caused errors in the functioning of the site(locally) but I have fixed all the issues with the outdated and faulty packages so I would like to resolve this issue with my PR
ThankYou(GSSOC 2021 participant)

Hey @Aditya201551,
For now, this isn't required. So I am closing this issue.
You can come up with new issues and we will be assigning the issue happily if relevant.


Enhance ExternalIPPool validation

Describe the bug

When startIP and endIP are provided, startIP must <= endIP.
When startIP and endIP are provided, they must be IPv4 or IPv6 at the same time.
All IPRanges of ExternalIPPools must not overlap.

/assign

When startIP and endIP are provided, they must be IPv4 or IPv6 at the same time.

https://github.com/antrea-io/antrea/blob/ba57a7fae0e5ecfe54dd4b2331275790b3302f2b/pkg/controller/externalippool/validate.go#L120
covers the case of mismatched IP families.
Do you think we can skip this one or need an explicit IP family mismatch error?

@aroradaman Thanks for working on it.

When startIP and endIP are provided, they must be IPv4 or IPv6 at the same time.

https://github.com/antrea-io/antrea/blob/ba57a7fae0e5ecfe54dd4b2331275790b3302f2b/pkg/controller/externalippool/validate.go#L120
covers the case of mismatched IP families.
Do you think we can skip this one or need an explicit IP family mismatch error?

The above check is only performed when subnetInfo is provided, which is an optional field, we still need to ensure the following input is denied (no subnetInfo is provided):
https://github.com/antrea-io/antrea/blob/ba57a7fae0e5ecfe54dd4b2331275790b3302f2b/pkg/controller/externalippool/validate.go#L87-L89
apiVersion: crd.antrea.io/v1alpha2
kind: ExternalIPPool
metadata:
  name: prod-external-ip-pool2
spec:
  ipRanges:
  - start: <IP_ADDRESS>
    end: 2001:db8::2:3


Comment on the last line causes a syntax error for incremental tables

Issue
Issue description
I got a syntax error when I ran dbt run on an incremental table. After spending some time debugging, I identified the source of the error. My sql file had an line comment at the end of the last line of my select statement. This caused the incremental table logic to fail.
Results
I expected my incremental table update to succeed. Instead, I got a syntax error.
The error message looked like
syntax error at or near "where"
where (updated_at >= (select max(t.updated_at) from...

System information
The output of dbt --version:
~: dbt --version
installed version: 0.11.1
   latest version: 0.11.1

Up to date!

The operating system you're running on: macOS Sierra Version 10.12.4
The python version you're using (probably the output of python --version): Python 3.6.5
Steps to reproduce
I have a .sql file that defines my incremental table that looks like this
{{
  config({
    "materialized" : "incremental",
    "sql_where" : "updated_at > (select max(updated_at) from {{ this }})",
    "unique_key": "id"
  })
}}

select ...
from table
where a = b -- This is a comment

If you try to run this table, look at the debugging output. It will look something like
create temporary table
    "xxx__dbt_incremental_tmp"
  as (
    select * from (
    select ...
    from table
    where a = b -- This is a comment) as dbt_incr_sbq
where updated_at > (select max(updated_at) from {{ this }})
);

However, because of the comment on the last line of my model, the ) as dbt_incr_sbq is ignored. And this causes the syntax error.

Hey @mfrasco6 - thanks for the report! This is a dupe of https://github.com/fishtown-analytics/dbt/issues/1018 which was fixed in https://github.com/fishtown-analytics/dbt/pull/1019. This change will be going out in our next release of dbt, v0.12.0! Apologies for the trouble :)


Request doesn't run: execution expired

Gem has stopped to work. Now I am getting this error:
/rubies/ruby-1.8.7-p352/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired (Timeout::Error)
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/protocol.rb:126:in `readline'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:2017:in `read_new'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:1051:in `request'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:1037:in `request'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:543:in `start'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:1035:in `request'
	from /rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:845:in `post'
	from /gems/ruby-1.8.7-p352/gems/livejournal-0.3.4/lib/livejournal/request.rb:91:in `run'
	from /gems/ruby-1.8.7-p352/gems/livejournal-0.3.4/lib/livejournal/request.rb:132:in `run'
	from /gems/ruby-1.8.7-p352/gems/livejournal-0.3.4/lib/livejournal/request.rb:66:in `initialize'
	from /gems/ruby-1.8.7-p352/gems/livejournal-0.3.4/lib/livejournal/login.rb:31:in `initialize'

It's probably a problem with your internet provider, proxy, or LJ throttling of your requests. Works fine here.

It doesn't work on my server too. Simplest test fails:
require 'rubygems'
require 'livejournal'

user = LiveJournal::User.new('test', 'test')
login = LiveJournal::Request::Login.new(user)
login.run

I have tested it on my second server. timeout again(

I didn't say that the failure is fictional. I just said that it's not due to a problem with the gem.

Is it possible to increase timeout?

The default, if I'm not mistaken, is 60 seconds. If you'd like to increase it, then you can monkey patch the LiveJournal::Request::Req#run and add
h.read_timeout = X


Firmstep1

How's this working?  Are we getting an eq'm?

Still not converging.

This seems like a theory issue. We should look at the theory to make sure everything is all closed up. I should be able to get to that by this evening.


Sigstore integration

Now that we have basic OCI image building and publishing, it's time to integrate signing.

Is this blocked on sigstore API stuff? Is there an issue we can reference?


[Documentation & Suggestions] NetworkServer.Spawn() causing parent to be lost on clients, and clients modifying SyncVar

The documentation of NetworkServer.Spawn() is lacking what I view as a major use-case, as it doesn't really explain that the gameObject's parent is lost, which applies even if the parent has an identity (e.g. the Player prefab), and it even removes the effect of parent's transform, causing the spawned position to differ between a server (with the parent) and a client. This should be documented using <summary> in the source code of the Spawn function itself, and I'd also suggest that some check could be made, displaying a warning by default, unless the user explicitly chooses that the parent on server is supposed to differ, e.g. via an overload (the check could be disabled at runtime via #if UNITY_EDITOR).
As a further suggestion, maybe there could be an overload that supports this explicitly under supported conditions (e.g. if both client and server share a reference to some object, or if the parent is a NetworkIdentity), as it'd make game architecture arguably simpler if developers didn't have to introduce boilerplate to explicitly initialize and protect some parts of the code until the parent is set, or use RPC to spawn/initialize the object. In a worse scenario, developers may actually choose to abuse Update() for that, checking for a null field and assigning a parent every single frame for every single object. People shouldn't be forced to follow bad practices this early on.
Here is an example of a workaround that one may require in a Player class in order to parent a car to it:
[SyncVar] private GameObject _car;
private NetworkIdentity _identity;

// Using extension method defined in a static class
public static void ExecuteWithoutParent(this GameObject on, Action<GameObject> action)
{
    // Temporary unparenting, similar to adding parent's transform values and later subtracting them
    var onTransform = on.transform;
    var lastParent = onTransform.parent;
    onTransform.parent = null;
    action(on);
    onTransform.parent = lastParent;
}

public void Start()
{
    _identity = GetComponent<NetworkIdentity>();
    // The car was already spawned by other player before connecting
    if (!ReferenceEquals(_car, null))
    {
        _car.transform.parent = transform;
    }
}

// Starting point of player choosing to spawn, or a car being re-spawned by the server
public void SelectedCar(int carIndex)
{
    if (isServer)
    {
        var car = Instantiate(cars[carIndex], transform);
        // Spawning without parent is necessary, otherwise stacked cars collide on client at the
        // moment of re-spawn at position (0, 0, 0), causing rigidbody of client to fly away and
        // keep its velocity in spite of being properly teleported once parented using the RPC.
        car.ExecuteWithoutParent(o => NetworkServer.Spawn(o, _identity.connectionToClient));
        _car = car;
        RpcOnSpawnedCar(car);
    }
    else
    {
        CmdSelectedCar(carIndex);
    }
}

[Command]
public void CmdSelectedCar(int carIndex)
{
    var car = Instantiate(cars[carIndex], transform);
    // Spawning without parent is necessary, otherwise the parent position is ignored
    car.ExecuteWithoutParent(o => NetworkServer.Spawn(o, _identity.connectionToClient));
    _car = car;
    RpcOnSpawnedCar(car);
}

[ClientRpc]
public void RpcOnSpawnedCar(GameObject car)
{
    // The _car will be synced in the following cycle, so we have to use param car instead
    car.transform.parent = transform;
}

Note that to solve this simple issue, I've already had to learn how to use the [SyncVar], including the fact that only objects with NetworkIdentity are supported. That made me spend several days constantly debugging new issues before I finally understood few things, including the significance of the documented phrase such that the values are synchronized from the server to clients:

Assigning on a client made everything seem okay until a third client joined.
Assigning on a server before invoking RPC made a client see a null value, which I finally fixed by adding it as an RPC method parameter (and then I assigned it from inside the RPC method in order to get it recognized by other components ASAP, which is a new hazard causing the value to de-sync, so I had to modify all of the other class methods that I call from that RPC to always ask for the reference using a parameter instead of them accessing class field).
Later I was trying to set the reference to null once I destroyed the object using a client, which was a fatal mistake, as the value was no longer synchronized from the server. I assumed that when I wrongly set a value on a client, it will get overridden by the server on the next frame, but it stayed changed to null.

It's also mentioned that the variables are synced after OnStartClient(), but it doesn't say how that relates to Unity's Start(). Either way, if synced variables aren't meant to ever be modified on the client, not only should it be documented explicitly, but a perfect solution could be if it were possible to display a warning. I'm not sure what are the C# limitations, but if it's possible to implement a client-side setter hook, I think Mirror could at least mark the variable as dirty. Or is there any situation where client should intentionally de-sync the variable?

By the way, the other overload public static void Spawn(GameObject obj, GameObject player), which uses performance-heavy player.GetComponent<NetworkIdentity>(), even has a comment of // Deprecated 11/23/2019, so why doesn't it use [Obsolete]? At a first glance this overload feels to be analogous to the Instantiate, which has the parent as a second parameter, so it's easy to misunderstand how you fixed an issue, for example (this happened in my team) by wrongly deducing that "client's object needs to be spawned with their Player as a parent to sync correctly". I think the other Spawn should also document within its comment an explanation of the NetworkConnection parameter, so that one can easily see the quickest solution to obtain the NetworkConnection without googling around, even if the GameObject player overload gets removed.
To illustrate the severity of this issue, I've had a discussion on Mirror's Discord where another user had been fighting a problem that an object, which was as a child of a canvas, has only spawned on the server, not on the clients. Not only is an UI object without a canvas object invisible, its position will also randomly move far away. It's not even mentioned which position is used by default if it was parented. There are dozens of similar examples as to why this introduces a very steep learning curve.
I've also collected further feedback regarding the SpawnObject documentation on Discord, along with my ideas:

[x] 1. There's one specific typo: The Network Manager before trying to register it with the Network Manager.
[ ] 2. It doesn't explicitly tell you how to spawn something with the Network Manager before jumping straight to "Spawning Without Network Manager".
[ ] 3. The article doesn't elaborate why you would/wouldn't use the Network Manager.
[ ] 4. It doesn't contain a "simplest use case" example. The Tank example was much clearer in its intentions.
[ ] 5. In fact, just adding a very simple code example of a simple use case to the "spawning with Network Manager" section at the top of the page would go a long way.
[x] 6. The difference between NetworkServer.Destroy and Unity's Destroy isn't really explained, as Destroy seems to work just fine.
[ ] 7. There are no guidelines regarding how to preconfigure variations of a spawnable prefab, as it seems to be assumed that if we have hundreds of possible modifications, we will add all of them to the NetworkManager individually.
[x] 8. The use-case of nested spawnable objects isn't covered. For example, if you have a car with a detachable part, and you want to despawn it as a child and spawn it as an individual object, not only will you get warnings about NetworkIdentity not being allowed to be a child, but you won't be able to spawn the object either. Most likely you'll need to create duplicate prefabs and do your best in keeping them both the same, except one of the prefabs having the NetworkIdentity.
[ ] 9. It is said that Once the game object is spawned using this system, state updates are sent to clients whenever the game object changes on the server, yet nothing is synced until [SyncVar] or components like NetworkTransform do it. It's even said that it has the same Transform, movement state as if it were kept in sync (what's a movement state?). (As a side note, Mirror doesn't really specify which kinds of objects are really "meant" to be synchronized and which aren't, e.g. there's no native way to properly sync a rigidbody, but I'm aware of at least some experimental WIP pull requests.)
[x] 10. No comments are made regarding workarounds if one needs to add or remove network components at a runtime; or about extending the existing network components for similar purposes in general.
[ ] 11. The SpawnPlayerCustom documentation indirectly mentions a way to re-spawn a Player by NetworkServer.ReplacePlayerForConnection in order to use another random NetworkStartPosition, but the example seems too complex and doesn't explain how to receive the NetworkConnection using player.GetComponent<NetworkIdentity>().connectionToClient. There's still no way to prevent start position conflicts though, either by not using the same position for re-spawn purposes, or by detecting collisions using SphereCast, so it's effectively useless!
[ ] 12. There's no easy way to parametrize Player (related to SpawnPlayer docs) before it's spawned by a call like networkManager.StartHost(), e.g. to set a player name, unless you extend NetworkManager via SpawnPlayerCustom. This can motivate users to pass variables using static fields, or by encapsulating them in an object that uses DontDestroyOnLoad() before switching to the Online Scene (and it's not even obvious how one could switch between multiple scenes if it weren't feasible to use LoadSceneMode.Additive while keeping all irrelevant objects enabled and synchronized).
[ ] 13. It's possible to spawn objects by placing them into Scene, as documented by SceneObjects, but there's no way to re-spawn such objects, or to even access their prefab reference if you decide to keep the original objects disabled to serve as a template; and we only realize this by experimenting. Basically, this could be solved by letting us clone a SceneObject. As a workaround, all you can do is GetComponentsInChildren<NetworkIdentity>() and compare their name excluding postfix like (1) with the prefab name before copying their position and rotation, which obviously isn't feasible in large projects. Furthermore, if newly connected clients always keep the previously de-spawned objects as disabled, then I don't see a reason why the server can't also keep all originals disabled and let us clone them. Due to being unable to spawn prefab children, we can't simply save them to a shared prefab that's placed in the scene either. Is there any other workaround?

Of course, this is only supposed to be a constructive criticism, intended to also prevent similar issues in the future, as Mirror is still an amazing free library, yet we should address the UX questions of learnability along with major use-case patterns. It's preferable to have this addressed by someone who can see a bigger picture, but feel free to choose which documentation issues you'd rather have us as a community fix by ourselves via PR.

I believe if there is a network assign parent will be nice....

1. There's one specific typo: `The Network Manager before trying to register it with the Network Manager.`

Fixed.

The difference between NetworkServer.Destroy and Unity's Destroy isn't really explained, as Destroy seems to work just fine.

There is no actual difference, because if users invoke Destroy by accident on the server for a networked object, we cover for them in an OnDestroy callback that invokes NetworkServer.Destroy.

The use-case of nested spawnable objects isn't covered.
No comments are made regarding workarounds if one needs to add or remove network components at a runtime

Neither of these are supported and cannot be given the current architecture.

Points 8 and 10
(there's currently a GitHub Issues bug that displays 8. and 9. whenever you start lines by 8. and 10.)

Is there a way you could specify some of the technical limitations in the docs for other contributors, so that we know what makes it impossible before we try to implement it on our own, and before we make false assumptions? Personally I think that nested prefabs could support this if we were allowed to "disable a child's NetworkIdentity", so that it'd be simply ignored when we spawn a parent. Then we'd be free to spawn the child by ourselves (currently using the parent workaround I presented). At the very least, we could despawn the nested child ourselves (by tracking a [SyncVar]), but the native option of tracking its despawn state seems like a useful feature for the the future. Or can you think of any better project structure for games that'd support complex scenarios using some workarounds?
And regarding the runtime component modification (of network components), is there no way to at least register a client-sided function (like RPC) to modify the components right after the object gets spawned? That could prevent any mismatch, because it'd deterministically modify an object before it even gets started/enabled, while internally having the initialization parameters be just like [SyncVar]. (In theory, this would even address the previous point if one were okay with having the object re-spawn in its entirety.) Thanks for your time.

A few notes from your First post

if (!ReferenceEquals(_car, null))

Try not to use ReferenceEquals in Unity as their Object class has a custom equals which needs to check if the native object is null or not.

example of a workaround

A better working around would be using a custom spawnhandler, See ClientScene.RegisterPrefab/RegisterHandler. The docs have an example of a custom spawnHandler for pooling objects here.
Using a spawn handler you could set the parent before the local position from the spawn message is applied.

public static void Spawn(GameObject obj, GameObject player)

Both these methods do the same thing:
Spawn(GameObject obj, GameObject player)
Spawn(GameObject obj, NetworkConnection ownerConnection = null)

The player/ownerConnection parameter can be set to give a client authority over the object, setting hasAuthority to true on the owning client.

yet nothing is synced until [SyncVar] or components like NetworkTransform do it.

When the spawn message is sent, it serialize all the NetworkBehaviours on the object (which be default includes SycnVars). Without double checking the docs, I think most of the time it mentions state it is talking about the state of the NetworkBehaviours attached to the GameObject, rather than the GameObject itself.

On the network parenting feature, We have to find a solution that doesn't add too much complexity.
The outcome might just be to create examples of ways to do it with the current system.

Try not to use ReferenceEquals in Unity as their Object class has a custom equals which needs to check if the native object is null or not.

Quite the opposite, I'm specifically trying to check if it was synchronized as null, due to the expensive nature of Unity's custom == operator, which I don't want to use. While it may be true that Unity can initialize public fields automatically, this is a private field, which is otherwise ignored by Unity's serialization process. I also don't want to rely on checking if the car was destroyed on the client-side ("== null" would return true), because such side-effects would go against defensive programming by hiding the errors from a developer. Thus I believe this to be the simplest example, having also the least performance impact.

A better working around would be using a custom spawnhandler
Using a spawn handler you could set the parent before the local position from the spawn message is applied.

It may be a better option, though it doesn't seem to be any less verbose until I create some generic abstraction, but that's exactly the issue, because all new Mirror users will have to come up with their own workarounds, reinventing the wheel over and over (just making my workaround example took me several weeks of debugging before I understood these Mirror's limitations). It would be nice if some other developers shared their solutions that work properly in large-scale projects, so that we could get inspired by them.

public static void Spawn(GameObject obj, GameObject ownerPlayer)

I see it's no longer deprecated, so this is probably supposed to be the go-to overload for new users, executing GetComponent<NetworkIdentity>(); twice to make it more comfortable to use. Still, the documentation only mentions the other overload, which doesn't even explain how to get <param name="ownerConnection"> using obj.GetComponent<NetworkIdentity>().connectionToClient, and it assumes we know how the parents behave.

Docs: "it has the same Transform, movement state"

it serialize all the NetworkBehaviours on the object

I think it could be at least hinted how the Transform can differ on the server, or that it's local (ignoring parents), and that the movement state (I don't understand if this means rigidbody or not) not only doesn't get synced, but that there's no way to sync it. Plus the NetworkTransform keeps Rigidbody's velocity around zero, which I also had to find out by experimenting, but that's unrelated to spawning.

examples of ways to do it with the current system

Yeah, I hope it'll be easy to utilize features like [SyncVar] to make it easy to maintain the code while making it easier for people to rapidly prototype without getting stuck in ambiguities. For example, I'm very curious about the feasibility of my nested prefab example :)

if (!ReferenceEquals(_car, null))
    {
        _car.transform.parent = transform;
    }

This will cause MissingReferenceException if the object has been destroyed.
ReferenceEquals makes the code overly complicated and using it can make it easier for someone to make a mistake and cause errors.
You might understand an ok use of ReferenceEquals now, but will someone else working on your code, or even you remember that in 6 months, remember that and avoid making future mistakes.

!ReferenceEquals(_car, null)

As I said, my intention is to prevent hiding the errors from a developer, thus getting a MissingReferenceException is exactly what I want, so that I'll see the mistake instead of creating random bugs and spending several days debugging why there's a random hazard caused by latency or some other lifecycle inconsistency, along with never being able to see the exception in a server log or client analytics. I don't see how being ambiguous can ever help to prevent mistakes, and I'm sure you know very well how difficult it is to debug asynchronous code, so we can't just randomly corrupt some state in the middle of a process. This serves as an assert that if the server ever configures the instance not to be null, it mustn't ever destroy the car and sync that before initialization. For example, if Mirror couldn't provide a similar guarantee of atomicity, it would make it one order of magnitude harder to design any similar architecture :)
In this specific scenario I believe that Start() (Player's OnStartClient() called on a new client right after connecting to an existing match, or after spawning a new Player, before any interaction) is probably as safe as it can be, so I can't imagine why a general-purpose solution should do something more. For example, I was doing the same check in a method that de-spawns the car before Destroying it, but I've had to make a CmdDestroyCar() in order to never let the server keep a _car reference after destroying the object, so that we prevent letting a player spawn multiple cars. By the way, back when I mistakenly expected that [SyncVar] always syncs the value from server (and so I set that value in a client to prevent having to wait for a next update), I managed to get _car stuck as a missing reference instead of being set by server to null. If left everything up to chance, hoping that Unity's magic operator will take care of it, developers probably wouldn't even notice some of the new hazards they introduce.
This is getting way more off-topic than I intended, but let me just ask you: if Unity Object didn't implement its operator overload (which people generally criticize), would you also consider it to be "simpler" to use some !ObjectUtil.IsNullOrInvalid(_car) rather than a C# native _car != null? I don't see how it's any different from this just because they abuse the syntax that looks more nice. That's why I have to argue that people who work on the code, or me in 6 months, literally have the responsibility to understand this operator; but paradoxically, it's quite the opposite. People who read this code don't need to know anything, unlike how they would have to remember the semantics of Unity's operator if I were to use it :)

In order to do calls on unity objects, like obj.transform you need to make sure that both the c# and the c++ object are not null, otherwise you might get an Exception.
Throwing an Exception is a critical fail because anything else in the call will not run. Where as with an error log the rest of the code will still run. This might not be important in cases like your example because you are only doing a single thing in the start call.
When using ReferenceEquals(A, B) instead A==B you might be gaining small amounts of performance but the cost of maintenance. And there are likely other changes you could make to have a much bigger impact on performance.

It seems as if you didn't understand a single thing I said. Why would anyone ever want a game to continue in an unstable state, even more so if it's related to a server-sided logic, which can affect something else, like your database? If I need to assume that the object isn't destroyed, why'd I try so hard to make the code produce unknown side-effects just so that the corrupted game state can continue without being informed about it? Why'd I actively harm my debugging process in a team project, along with the code quality, just so that I can "avoid an exception"? Isn't the point of an exception that the fatal state, which should be irrecoverable, can bubble up and interrupt the faulty process before it causes further harm? You are supposed to use the "finally" block if you need to ensure something executes. Once again, ReferenceEquals is the original == operator, so it produces the same logic as you'd naturally expect. If I am setting a field to null, then it means I expect it to stay null, and I don't ever want to get a false positive of a variable becoming null as a side-effect. We use the Unity's overloaded operator when we want to ask IsNativeObjectAlive(Object o), not when we want to use a reference comparison, because those are two separate use-cases. Thus I'd still compare the references even it had a higher performance cost. You still haven't answered me the question at the end of my previous post :)

Isn't the point of an exception that the fatal state, which should be irrecoverable

Which is why for non-fatal problems they should just be logged as errors instead of throwing exception.
The simplest thing would be to use the unity framework in a unity game. Unity's == will work for every case you need it to.
If you call Destroy(targetBehaviour.gameObject); unity does not destroy the c# object meaning it is not truly null. If you are only checking ReferenceEquals then you might be calling functions on Destroyed objects.

Yes, the simplest thing will work for the simplest games, and I don't have any need to convince you to do this in your games, so it's up to developers to decide if their game should work in a corrupted state, which is a fine choice for most single-player games and small non-tested game prototypes. Once again, you say that ReferenceEquals doesn't check if the object is alive as if it were self-evident that this is the behavior everyone's heart desires, yet after 2 replies you still haven't replied to my question related to a fictional !ObjectUtil.IsNullOrInvalid(_car) :) But it's getting very off-topic, so if you want to collect feedback from others regarding example code fragments to be used in the documentation, a new issue is probably a better choice to incentivize others to join the discussion.

Ye this is getting off topic, and you seem convinced your way is the "correct" way.
It is probably a good idea to make one Issue per topic you listed in your first post. (Some can be grouped, for example how to spawn prefabs)

There's not really any universally "correct" way, it's only a question of which approach will you prefer in your internal implementation if this feature were to become a separate Mirror component, or if this use-case gets mentioned in the docs :)
Sadly, I can't think of any efficient way to separate this issue, as many of the presented options depend on which specific decisions get made, and they all seem to require deep knowledge of the reasons behind spawn limitations. There are basically the following concerns (only the first two are the topic of this issue, but I didn't want to make new issue for every detail missing in docs):

Parent cannot be synchronized (or maybe generally: initialization function cannot be specified)
SyncVar is hard to learn and requires workarounds to share variables during RPC
SpawnObject documentation misses critical information & Spawn doesn't support some use-cases
Specifically, nested prefabs are impossible to spawn (but I'd like to hear suggestions first)

All of them can addressed either by solving the underlying root cause and implementing a nice overload parameter, or by specifying within documentation that Mirror doesn't care about the issue and instead providing workarounds that community can further develop and discuss. I can only see the surface of what's missing in the docs, but while some of them may be solved together, some may require being split into several issues each if they have the potential to require discussion and collaboration in your team. Feel free to choose specific issues feasible for direct implementation, I'm available if you want to brainstorm any options.
I hope we can generalize some of them to prevent unnecessary complexity, for example a "spawn initialization function" could theoretically address the following, along with a "runtime (re-)spawn modification RPC", possibly using SpawnDelegate wrapped around a serializable Dictionary parameter of a Spawn overload, which would be internally persisted as a [SyncVar]:

Assigning a parent via lambda/function that's available on a client
Configuring prefab variants by adding/removing network components via script before it's enabled
Attaching, detaching or removing children of nested network prefabs
Synchronizing a state of a field with a spawned instance (e.g. Player's field _car in my scenario)

Imagine if all of these issues could be solved using a single Spawn parameter and one method ✨ 😌

One thing on the docs: there is a lot more notes about some of the classes and how to use them in the api reference, for example ClientScene.
Can you try re-wording this? I'm having a hard time understanding what you mean.

I hope we can generalize some of them to prevent unnecessary complexity, for example a "spawn initialization function" could theoretically address the following, along with a "runtime (re-)spawn modification RPC", possibly using SpawnDelegate wrapped around a serializable Dictionary parameter of a Spawn overload, which would be internally persisted as a [SyncVar]:

Assigning a parent via lambda/function that's available on a client
Configuring prefab variants by adding/removing network components via script before it's enabled
Attaching, detaching or removing children of nested network prefabs
Synchronizing a state of a field with a spawned instance (e.g. Player's field _car in my scenario)

Imagine if all of these issues could be solved using a single Spawn parameter and one method ✨ 😌

Well, that's why I mentioned lacking <summary> as the second sentence of my original issue, because the API reference (which I always consult for ambiguities as it's directly visible from code in IDE) still doesn't cover anything beyond the simplest examples, e.g. Spawn doesn't address any of the hidden limitations, and SpawnDelegate doesn't address, well, anything, but that's understandable. Most users will begin learning from the official guide or similar tutorials anyway.
Regarding the example, I haven't come up with any user-friendly syntax to illustrate a solution yet. If the issues only depend on consistent synchronization, then the initialization function can simply modify the instance during Start.

I originally had an idea that if an abstraction internally used SpawnDelegate, the Spawn method could have a parameter like Dictionary that gets serialized, though this seems to be comparable to just having the parameters be [SyncVar]s and using them in Start(), so it may not be preferable after all, because it's easier to set fields than to pass {"parent", _identity} and assign transform.parent = ((NetworkIdentity) settings["parent"]).transform.

Maybe there's a simpler alternative to better cover requirements such as component modification or parent attaching/detaching including tracking parent-child references. Also I'm not sure if there's effectively a need to a make a respawn function (as opposed to despawning and spawning every object, which may have some negative consequences), but if it's preferable in some use-cases (e.g. to avoid losing interpolation state of NetworkTransform), then this would be the place where components could be swapped around, which is otherwise forbidden due to breaking serialization. It may be also required to specify some consistency requirement for users to follow while respawning (modifying) an object, or an additional serialized parameter may be exposed to keep track of the change.
This is just an attempt at turning some boilerplate (without any examples documented yet) into some one-liners, so I'm sure someone can come up with even better examples. Instead of implementing the abstraction, we may actually find out that it's better to devise our own multiplayer design patterns and just consider how users can better encapsulate them. Nevertheless, we gotta make sure the elementary building blocks cover all relevant use-cases, and I think my original ExecuteWithoutParent workaround illustrates that it's definitely still lacking :)

Yeah I still have no clue how to use the NetworkManager after reading the doc, the api ref, this thread, and everything else I could find searching.  All I want to do is a spawn some objects and it just doesn't work. Pls send help.

https://mirror-networking.com/docs/Articles/Guides/GameObjects/SpawnObject.html
var clone = Instantiate(prefab)
NetworkServer.Spawn(clone);

prefab must have a NetworkIdentity and must be registered on the client, either by adding it to the list in NetworkManager or calling ClientScene.RegisterPrefab at runtime

Thanks, that's what I'm doing.  The problem is that the client isn't connected when I'm trying to spawn in Start().
I tried using the code from the "Spawning without NetworkManager" but the functions there are not getting run. Never get into ServerListen() or any of those other functions, am I supposed to run them manually? When? And how do I do that properly on client/server?

I guess I did get those to run, but I still just get  "NetworkServer is not active. Cannot spawn objects without an active server."

Also tried following the example exactly.  Doesn't do anything, never runs the functions.

you have to spawn an object on the server then mirror will send a message to the client and it will also spawn there.

Well thanks for all your help.. I'm getting the prefabs to spawn on the client now, but I'm doing some dynamic editing of them after spawning them on server, creating a mesh and setting
myCollider.sharedMesh = m;
myFilter.sharedMesh = m;
which doesn't seem to propogate.
I think i'm going to have to create each one as a new prefab, register, and then spawn it.

Closing this.  The docs have all been moved to the new website and several people will be going through them all and redoing a lot of content over the summer.  Additionally, docs have been changed and Mirror has been evolving over the months since this report, so whatever hasn't been addressed will be during the review process.


Omitting primitive equality breaks interface generation

Describe the bug
You can omit primitive equality generation with:
[assembly: VogenDefaults(primitiveEqualityGeneration: PrimitiveEqualityGeneration.Omit)];

But this conflicts with other generated code, in particular the generation of the IVogen<> interface. To demonstrate, this cominbation causes compilation errors as IVogen expects implementers to have equality to the primitive:
[assembly: VogenDefaults(
  primitiveEqualityGeneration: PrimitiveEqualityGeneration.Omit,
  staticAbstractsGeneration: StaticAbstractsGeneration.MostCommon | StaticAbstractsGeneration.InstanceMethodsAndProperties)]

... causes...
Error CS0535 : 'ToDoItemId' does not implement interface member 'IVogen<ToDoItemId, int>.operator ==(ToDoItemId, int)'

### Steps to reproduce

Omit equality to primitive generation, and specify IVogen interface generation.

### Expected behaviour

For `IVogen<>` to not declare primitive equality methods and operators.

The trouble with this is that the configuration for primitiveEqualityGeneration can be specified at the global level and at the local (instance) level.
The local level overrides the global level.
So, when generating the interface, it looks at the global level and will generate/omit based on that. This means that if anything differs between global/local config, it will result in either compilation errors saying that a type does not implement the equality operators, or, the interface won't have the equality operators when a user would expect it to have them.
I don't think there's a solution for this other than to document that the global config is always used when generating the interface. I think this is a fair and obvious requirement.


feat: reduce number of loaded PartInstances

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

feature/fix

What is the current behavior? (You can also link to an open issue here)

Over time, the number of PartInstances loaded into the Cache increases. It only gets reduced when parts/segments are reset, which does not happen automatically (by design)

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

To avoid the amount of data continually growing, we can limit the PartInstances to be the Segments containing the previous, current and next PartInstances. It might be possible to reduce this further, but this much is a good starting point.

Other information:

Status

[ ] Code documentation for the relevant parts in the code have been added/updated by the PR author
[ ] The functionality has been tested by the PR author
[ ] The functionality has been tested by NRK

Codecov Report

Merging #696 (8c9f518) into release38 (5256ccf) will increase coverage by 14.64%.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           release38     #696       +/-   ##
==============================================
+ Coverage      67.27%   81.91%   +14.64%
==============================================
  Files            271       12      -259
  Lines          19027     1045    -17982
  Branches        4301      249     -4052
==============================================
- Hits           12800      856    -11944
+ Misses          6142      170     -5972
+ Partials          85       19       -66

Impacted Files
Coverage Δ

meteor/lib/collections/PartInstances.ts

meteor/lib/lib.ts

meteor/server/api/ingest/commit.ts

meteor/server/api/playout/adlib.ts

meteor/server/api/playout/cache.ts

meteor/server/api/playout/lib.ts

meteor/server/api/playout/pieces.ts

meteor/server/api/rundown.ts

meteor/lib/timeline.ts

meteor/server/api/ingest/mosDevice/actions.ts

... and 249 more

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 5256ccf...8c9f518. Read the comment docs.


Add deviceconfig controller client error tests

Signed-off-by: Michail Resvanis<EMAIL_ADDRESS>

Codecov Report

Merging #14 (6230c07) into main (3e2dee1) will increase coverage by 3.96%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   72.00%   75.97%   +3.96%
==========================================
  Files           8        8
  Lines         643      641       -2
==========================================
+ Hits          463      487      +24
+ Misses        158      138      -20
+ Partials       22       16       -6

Impacted Files
Coverage Δ

controllers/deviceconfig_controller.go
80.68% <ø> (+26.13%)
:arrow_up:

main.go
20.93% <ø> (ø)

internal/module/module.go
94.95% <100.00%> (-0.09%)
:arrow_down:

controllers/nodeselector.go
93.02% <0.00%> (+6.97%)
:arrow_up:

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


[ENG-4003] Support DeclarativeBase in core

Add serializers and Var definitions for SQLAlchemy DeclarativeBase models.

@masenf i currently have smth like this however it needs some love
def is_generator(value: Any) -> bool:
    """Return `value` is a generator."""
    return isgeneratorfunction(value) or isgenerator(value)

def is_iterable_but_not_string(value: Any) -> bool:
    """Return whether `value` is an iterable but not string/bytes."""
    return (
        hasattr(value, "__iter__") and not isinstance(value, str | bytes)
    ) or is_generator(value)

class ModelSerializer:
    exclude_relationships: bool
    lazyload: bool
    ignore: list[str]
    fields: list[str]

    def __init__(
        self,
        *,
        exclude_relationships: bool = False,
        lazyload: bool = False,
        ignore: list[str] | None = None,
        fields: list[str] | None = None,
    ) -> None:
        self.exclude_relationships = exclude_relationships
        self.lazyload = lazyload
        self.ignore = ignore or []
        self.fields = fields or []

    def to_dict(self, model: DataclassMixin) -> dict[str, Any]:
        ctx: dict[str, Any] = {"seen": set()}
        return self.from_value(ctx, model)

    def from_value(self, ctx: dict, value: Any) -> Any:
        if value is None:
            return None
        d: Any = None

        if has_serializer(type(value)):
            if isinstance(value, DeclarativeBase):
                if isinstance(value, MutableProxy):
                    value = value.__wrapped__
                d = self.from_model(ctx, value)
            elif isinstance(value, dict):
                d = serialize(value)
            elif is_iterable_but_not_string(value):
                d = self.from_iterable(ctx, value)
            elif type(value) in [str, int, bool]:
                d = value
            else:
                d = serialize(value)
        else:
            if isinstance(value, DeclarativeBase):
                if isinstance(value, MutableProxy):
                    value = value.__wrapped__
                d = self.from_model(ctx, value)
            elif isinstance(value, dict):
                d = self.from_dict(ctx, value)
            elif is_iterable_but_not_string(value):
                d = self.from_iterable(ctx, value)
            else:
                d = value
        return d

    def from_model(self, ctx: dict, value: Any) -> dict[str, Any]:
        ctx.setdefault("seen", set())
        ctx.setdefault("seen_assoc", set())
        ctx["seen"].add(value)

        state: InstanceState = inspect(value)
        mapper: Mapper = inspect(type(value))

        fields = mapper.columns.keys() + self.fields
        if not self.exclude_relationships:
            for relationship in mapper.relationships.keys():
                if relationship in self.ignore:
                    continue
                if state.attrs[relationship].loaded_value is NO_VALUE:
                    continue
                fields.append(relationship)

        data = {}

        # association proxies are not included in the relationships
        # so we need to add them manually
        association_proxies = []
        for key, descriptor in mapper.all_orm_descriptors.items():
            if descriptor in ctx["seen_assoc"]:
                continue
            if not isinstance(descriptor, AssociationProxy):
                continue
            if (
                target_collection := state.attrs[
                    descriptor.target_collection
                ].loaded_value
            ) is NO_VALUE:
                log.debug(f"{target_collection=} for {key=} is NO_VALUE")
                continue
            # TODO: improve check if value_attr is loaded on target_collection
            # maybe just access attribute and catch exception? should be faster and more reliable than this dirty approach
            if not target_collection:
                association_proxies.append(key)
                continue
            first_target = next(iter(target_collection))
            first_target_state = inspect(first_target)
            if first_target_state.attrs[descriptor.value_attr].loaded_value is NO_VALUE:
                log.debug(f"value_attr is NO_VALUE, not loading {key=}")
                continue
            association_proxies.append(key)
            ctx["seen_assoc"].add(descriptor)

        fields.extend(association_proxies)

        for key in fields:
            if key in self.ignore:
                log.debug(f"ignoring {key=}")
                continue
            if key in self.fields or key in association_proxies:
                log.debug(
                    f"adding {key=} as additional field to {type(value).__name__}"
                )
                loaded_value = getattr(value, key, None)
            else:
                loaded_value = state.attrs[key].loaded_value

            if (
                loaded_value is NO_VALUE
                or loaded_value is LoaderCallableStatus.NO_VALUE
            ) and self.lazyload:
                loaded_value = state.attrs[key].value

            if (
                loaded_value is NO_VALUE
                or loaded_value is LoaderCallableStatus.NO_VALUE
            ) or (
                isinstance(loaded_value, DeclarativeBase)
                and loaded_value in ctx["seen"]
            ):
                continue

            data[key] = self.from_value(ctx, loaded_value)

            # avoid null access errors in frontend to allow auto model creation in dynamic form setters
            #  if data[key] is None:
            #      data[key] = {}

        return data

    def from_dict(self, ctx: dict, value: dict) -> dict:
        return {k: self.from_value(ctx, v) for k, v in value.items()}

    def from_iterable(self, ctx: dict, value: Iterable) -> list:
        return [self.from_value(ctx, v) for v in value]

Sorry, I forgot half of the code
class DataclassMixin(
    MappedAsDataclass,
    dataclass_callable=pydantic_dataclass,
    kw_only=True,
    eq=False,
    repr=False,  # disable because it's unreadable and slow with recursive/self-referencing models
):
    serialize_fields: list[str] | None = None
    serialize_ignore: list[str] | None = None

    def __repr__(self) -> str:
        cls = type(self)
        cls_name = cls.__name__
        if hasattr(self, "id"):
            return f"{cls_name} {self.id}"  # pyright: ignore[reportAttributeAccessIssue]
        return f"{cls_name} instance at {id(self)}"

    # needed to prevent pydantic from breaking sqlalchemy
    def __post_init__(self) -> None:
        pass

    def __iter__(self) -> Generator[tuple[str, Any]]:
        """Iterator that yields the items from ``self.dict().items()``."""
        yield from self.to_dict().items()

    def json(self) -> str:
        """Return a JSON string representation of the object."""
        return json.dumps(self.to_dict(), default=serialize)

    def to_dict(
        self,
        *,
        exclude_relationships: bool = False,
        lazyload: bool = False,
    ) -> dict[str, Any]:
        try:
            serializer = ModelSerializer(
                exclude_relationships=exclude_relationships,
                lazyload=lazyload,
                ignore=self.serialize_ignore,
                fields=self.serialize_fields,
            )
            d = serializer.to_dict(self)
            #  d = self._serialize_fields(d)
            log.debug(f"DataclassMixin.to_dict {self.serialize_fields=} {d=}")
        except Exception as e:
            log.error(f"Error in to_dict: {e}")
            raise
        return d

@serializer
def serialize_dataclass_mixin(dataclass_mixin: DataclassMixin) -> dict:
    ret = dataclass_mixin.to_dict()
    return ret

i currently have smth like this

very interesting, thanks for sharing.
i think at least some of the recursive serialize calls may not be necessary with the new var system, i'll see if i can incorporate some of this. i also have some test cases that i'll be adding, but i suspect you might have some additional interesting cases that would be good to include as well.

very interesting, thanks for sharing.

You are welcome, thanks for implementing this! I think my approach could benefit from yours by splitting it into multiple @serializers.

i think at least some of the recursive serialize calls may not be necessary with the new var system, i'll see if i can incorporate some of this.

If you have a recursion in your datastructure the var system won't save you. Reflex currently does not track used attributes and always serializes the "whole" model. This will cause recursion errors if your models have a cycle.

This will cause recursion errors if your models have a cycle.

how do we expect it to serialize if it has recursion though? :thinking:

how do we expect it to serialize if it has recursion though? :thinking:

Currently it just stops at the first Level of repetition. A cooler approach would allow referential serialisation as i did it in a PoC with pickle.

repro-sqlalchemy-association-proxy.tar.gz
uploading for testing

uploading for testing

I just looked at it, are there any specific issues you want to showcase?
Btw, we have the following for lambda creators:
def globalize_creator(lambda_func: Callable) -> Callable:
    # We need a lambda here
    if not (
        isinstance(lambda_func, types.LambdaType) and lambda_func.__name__ == "<lambda>"
    ):
        raise ValueError("globalize_creator expects a lambda function")

    # Create a unique name for the lambda function
    proposed_name = f"lambda_creator_{len(dir(dynamic_creators))}"
    while hasattr(dynamic_creators, proposed_name):
        proposed_name += "_next"

    # Add the lambda function to the dynamic_creators module
    setattr(dynamic_creators, proposed_name, lambda_func)

    # Set the name, qualname and module of the lambda function
    lambda_func.__name__ = proposed_name
    lambda_func.__qualname__ = proposed_name
    lambda_func.__module__ = dynamic_creators.__name__

    return lambda_func

it's basically a copy of your workaround in reflex, but for lambdas
I suggest trying MappedAsDataclass and using back_popluates instead of secondary lambdas. I would also move the @ModelRegistry.register to Base instead of User.


⚠ Prueba_Error_500 has degraded performance

In 9fa5486, Prueba_Error_500 ($URL_ERROR_500) experienced degraded performance:

HTTP code: 200
Response time: 19355 ms

Resolved: Prueba_Error_500 performance has improved in 9ac08f9 after 566 days, 23 hours, 22 minutes.


Incorrect Plastic recipe

Hey man! huge fan of your factorio calculator, only started using it recently but it has definitely made my life easier. While using it, however, I noticed that the calculator doesn't seem to take into account that the plastic recipe actually produces 2 plastic bars per cycle. Basically, the number of refinerys/chemical plants that the calculator says is required to produce 1 belt of plastic produces 2. Thought I would just let you know, thanks again!

As you can see, the calculator says that for 1 belt of plastic I need <4 refinery's, and <7 total chemical plants. When tested, this actually produces 2 full belts of plastic

No. The plastic recipe is correct. At a guess, did you enter the wrong number for the beacons? It wants the number of modules, not the number of beacons (as described in the tooltip and the FAQ). Entering half of the desired value would cause it to report a much lower rate of production, as you have observed.

Ah, I guess I missed that. Thank you anyways!


Synapse connects to default microsoft account

IS there any options to switch or add multiple accounts for connecting to different workspace

I'm curious as to what scenarios would require such support. vscode itself has a single user login mode. With the addition of multiple accounts, there will be a significant risk in privilege management