Initial MPI support

See #51

#!/usr/bin/env sh
#SBATCH -N 1
#SBATCH -n 2
#SBATCH --cpus-per-task=5
#SBATCH --ntasks-per-socket=1
#SBATCH -o sl_%j.out
#SBATCH -A pc2-mitarbeiter
#SBATCH -p all
#SBATCH -t 00:02:00
#=
srun julia --project -t 5 $(scontrol show job $SLURM_JOBID | awk -F= '/Command=/{print $2}')
exit
# =#
using MPI
using ThreadPinning

MPI.Init()

rank = MPI.Comm_rank(MPI.COMM_WORLD)

pinthreads(:affinitymask)

sleep(0.3 * rank)
println("Rank $rank: ", getcpuids())

MPI.Finalize()

gives
Rank 0: [0, 1, 2, 3, 4]
Rank 1: [64, 65, 66, 67, 68]

on Noctua 2 (dual-socket system with 64 cores per socket).

Seems to be working as expected. On AMD EPYC 7742 (2 x 64 cores, without multithreading):
> srun -n 32 --distribution=block:block --hint=nomultithread julia -t 4 --color=yes pinning.jl
Rank 0: [0, 1, 2, 3]
Rank 1: [4, 5, 6, 7]
Rank 2: [8, 9, 10, 11]
Rank 3: [12, 13, 14, 15]
Rank 4: [16, 17, 18, 19]
Rank 5: [20, 21, 22, 23]
Rank 6: [24, 25, 26, 27]
Rank 7: [28, 29, 30, 31]
Rank 8: [32, 33, 34, 35]
Rank 9: [36, 37, 38, 39]
Rank 10: [40, 41, 42, 43]
Rank 11: [44, 45, 46, 47]
Rank 12: [48, 49, 50, 51]
Rank 13: [52, 53, 54, 55]
Rank 14: [56, 57, 58, 59]
Rank 15: [60, 61, 62, 63]
Rank 16: [64, 65, 66, 67]
Rank 17: [68, 69, 70, 71]
Rank 18: [72, 73, 74, 75]
Rank 19: [76, 77, 78, 79]
Rank 20: [80, 81, 82, 83]
Rank 21: [84, 85, 86, 87]
Rank 22: [88, 89, 90, 91]
Rank 23: [92, 93, 94, 95]
Rank 24: [96, 97, 98, 99]
Rank 25: [100, 101, 102, 103]
Rank 26: [104, 105, 106, 107]
Rank 27: [108, 109, 110, 111]
Rank 28: [112, 113, 114, 115]
Rank 29: [116, 117, 118, 119]
Rank 30: [120, 121, 122, 123]
Rank 31: [124, 125, 126, 127]

Each rank has threads neatly grouped.  Thanks!

BTW, I just realised that thanks to https://github.com/JuliaLang/julia/pull/42340, in Julia v1.9 this package is unnecessary.  Without any pinning at all:
> srun -n 32 --distribution=block:block --hint=nomultithread julia -t auto --color=yes pinning.jlRank 0: [1, 2, 3, 0]
Rank 1: [5, 7, 4, 6]
Rank 2: [8, 9, 11, 10]
Rank 3: [13, 14, 15, 12]
Rank 4: [19, 17, 16, 18]
Rank 5: [20, 21, 23, 22]
Rank 6: [26, 27, 24, 25]
Rank 7: [29, 30, 31, 28]
Rank 8: [34, 33, 35, 32]
Rank 9: [36, 38, 39, 37]
Rank 10: [43, 40, 41, 42]
Rank 11: [44, 45, 47, 46]
Rank 12: [51, 48, 49, 50]
Rank 13: [54, 52, 55, 53]
Rank 14: [57, 58, 59, 56]
Rank 15: [60, 62, 61, 63]
Rank 16: [64, 66, 65, 67]
Rank 17: [68, 70, 69, 71]
Rank 18: [73, 74, 75, 72]
Rank 19: [77, 76, 78, 79]
Rank 20: [80, 81, 82, 83]
Rank 21: [85, 84, 86, 87]
Rank 22: [89, 88, 90, 91]
Rank 23: [92, 94, 93, 95]
Rank 24: [99, 96, 98, 97]
Rank 25: [101, 102, 103, 100]
Rank 26: [104, 106, 105, 107]
Rank 27: [111, 108, 110, 109]
Rank 28: [115, 113, 112, 114]
Rank 29: [118, 117, 119, 116]
Rank 30: [121, 120, 123, 122]
Rank 31: [125, 127, 124, 126]

But this package is certainly still useful for better manual control of threads pinning, and anyway for older versions of Julia.

Added a function pinthreads_mpi that allows one to explicitly pin MPI ranks (for a single node) to specific domains (currently, sockets or memory domains).
Example without external pinning (SLURM doesn't set a restricted affinity mask in this case).
#!/usr/bin/env sh
#SBATCH -N 1
#SBATCH -o sl_%j.out
#SBATCH -A pc2-mitarbeiter
#SBATCH -p all
#SBATCH -t 00:02:00
#=
srun -n 4 julia --project -t 10 $(scontrol show job $SLURM_JOBID | awk -F= '/Command=/{print $2}')
exit
# =#
using MPI
using ThreadPinning

MPI.Init()

nranks = MPI.Comm_size(MPI.COMM_WORLD)
rank = MPI.Comm_rank(MPI.COMM_WORLD)

pinthreads_mpi(:sockets, rank, nranks)

sleep(0.3 * rank)
println("Rank $rank: ", getcpuids())

MPI.Finalize()

gives
Rank 0: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Rank 1: [64, 65, 66, 67, 68, 69, 70, 71, 72, 73]
Rank 2: [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
Rank 3: [74, 75, 76, 77, 78, 79, 80, 81, 82, 83]

BTW, I just realised that thanks to JuliaLang/julia#42340, in Julia v1.9 this package is unnecessary. Without any pinning at all:
But this package is certainly still useful for better manual control of threads pinning, and anyway for older versions of Julia.

Yes, that is a great improvement (that I'm aware of)! But it "only" covers cases where the affinity mask is set externally, for example via taskset (PR) or SLURM (your example) which, BTW, might also effect non-"Julia user threads" (e.g. OpenBLAS pthreads etc.). So, "this package is unnecessary" and "without any pinning at all" isn't correct, you're just using SLURM for pinning.
Some points for TP.jl (beyond what you've already mentioned):

TP.jl also lets you pin your Julia threads if you aren't using SLURM.
TP.jl lets you pin threads dynamically from inside a Julia session. This is great for interactivity, tutorials etc. (in particular in Jupyter and or Pluto) but also for libraries like LIKWID.jl that want to dynamically take care of the pinning for the user (telling him/her to restart Julia under taskset or similar would be pretty annoying).
TP.jl has threadinfo to nicely show you what you're doing and what the system looks like (need to think about how to generalize this to MPI cases).
TP.jl gives you logical indexing: you can readily pin to, say, the second SMT-thread in the fifth core in the first socket without having to care about what the "physical" id of that CPU-thread is.
From Julia 1.9 on, TP.jl allows you to explicitly pin the OpenBLAS threads as well (beta).

@giordano
$ cat getcpuids_all.jl
using ThreadPinning
ThreadPinning.openblas_print_affinity_masks() # requires Julia >= 1.9
println(getcpuids())

$ OPENBLAS_NUM_THREADS=10 taskset --cpu-list 0-9 julia +1.9 --project -t 10 getcpuids_all.jl
Julia threadid: 1
1:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
2:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
3:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
4:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
5:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
6:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
7:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
8:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
9:   |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
10:  |11111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|

[1, 7, 8, 2, 3, 0, 6, 4, 4, 7]

As you can see, the affinity mask is restricting the Julia threads to the correct set of CPUs but it does not ensure that Julia threads run on different CPUs. I would expect the same thing to be true for SLURM, so you probably were somewhat "lucky" above (try increasing the number of threads per rank and/or rerunning the same thing multiple times). (OpenBLAS threads obviously also respect the mask.)

TODO (for self)

[ ] Add MPI section to the docs

[ ] Basic direct example
[ ] SLURM example

[ ] Add external affinity mask tests more systematically

[ ] taskset
[ ] numactl
[ ] Julia 1.9

So, "without any pinning at all" isn't correct, you're just using SLURM for pinning.

I meant to say "without using pinthreads at all in my script", of course I was relying on external pinning.

so you probably were somewhat "lucky" above (try increasing the number of threads per rank and/or rerunning the same thing multiple times)

Not sure that was just luck.  I did run the same code multiple times before posting the result, and threads were always pinned as I've shown above (as you can see, within each MPI rank the "order" of the thread is different than with pinthreads(:affinitymask), but the thread pool is the same).
Note that contrary to your examples I used srun ... --distribution=block:block --hint=nomultithread julia --threads auto ..., which is what I was recommended to do by the sysadmin.  For example without --hint=nomultithread some hyperthreading threads would be used, without --distribution threads would be spread seemingly randomly (probably there was a pattern but I didn't bother understanding it).
To be clear, in any case I'm really looking forward to pinthreads(:affinitymask) because we're probably going to use Julia v1.8 (so can't use --threads auto anyway) and as I think this is in general still useful to better control threads pinning than relying on whatever --threads auto does, I didn't want to disparage your work!

I didn't want to disparage your work!

Although my lengthy replies might have suggested otherwise, I didn't take it that way at all :) It's more that I took this as a reason to analyse in more detail what Julia >= 1.9 is doing and what the selling points of ThreadPinning.jl are after 1.9 is out.

Not sure that was just luck. I did run the same code multiple times before posting the result, and threads were always pinned as I've shown above (as you can see, within each MPI rank the "order" of the thread is different than with pinthreads(:affinitymask), but the thread pool is the same).

Just to be clear, by "luck" I didn't mean that it's entirely random. The OS scheduler will (hopefully) be smarter than to put all threads on the same CPU-core (and it apparently was in your particular case). What I meant is that you can't rely on threads running on different CPU-cores within the mask (and certainly not the order). It's the same as when you start Julia without any particular affinity mask: Julia threads will typically not run on the same CPU-core but they can (and sometimes do).
Also note that it's not surprising at all that the "thread pool is the same", i.e. that threads run on CPU-cores within the not-masked-out domain, since that's precisely what the (process) affinity mask is good for.

Note that contrary to your examples I used srun ... --distribution=block:block --hint=nomultithread julia --threads auto ..., which is what I was recommended to do by the sysadmin. For example without --hint=nomultithread some hyperthreading threads would be used, without --distribution threads would be spread seemingly randomly (probably there was a pattern but I didn't bother understanding it).

Although I'm not 100% certain, it's very unlikely that SLURM is doing more than just setting the process affinity mask (like all other generic tools) (*). And that just means that threads are not fixed to individual, non-overlapping CPU-threads but only ranges. If I find the time, I'll try to use the same settings as you and prove it to you :) But you can also do it yourself by

comparing the ThreadPinning.print_affinity_masks() output of your variant and an explicit pinthreads(:affinitymask)
using less ranks but more threads per rank and repeating the experiment multiple times (I had to try it about 10 times to see an overlap).

(*) Mostly because that it is pretty tricky and involves overloading/patching (LD_PRELOAD) pthread or whatever threading library is used (at least that's what likwid-pin does, which similar to pinthreads(:affinitymask) tries to pin each thread individually, i.e. to set the thread affinity and not just the process affinity).

@giordano I ran the same experiment as you (Julia 1.9). While I was right, that SLURM doesn't set the thread affinity to individual CPU-threads (see the affinity masks below), Julia threads nonetheless appeared to be running on separate CPU-threads in my 10 test runs. Again, conceptually, this tells me that I can't rely on this to be the case but it is indeed surprising that it is so robust. Maybe there is some other mechanism at place that I'm not aware about? But until someone can clarify this, I still wouldn't rely on it.
cpu-bind=MASK - cn-0131, task  0  0 [525152]: mask |BBBBBBBBBBBBBBBBBBBB||||BBBBBBBBBBBBBBBBBBBB|  set
[33, 35, 37, 38, 32, 39, 30, 34, 31, 36]
[3, 4, 6, 7, 8, 9, 0, 1, 2, 5]
[29, 25, 27, 28, 20, 22, 21, 23, 24, 26]
[19, 15, 12, 14, 11, 13, 18, 17, 10, 16]
true
true
true
true

1:   |00000000000000000000|00000000001111111111|
2:   |00000000000000000000|00000000001111111111|
3:   |00000000000000000000|00000000001111111111|
4:   |00000000000000000000|00000000001111111111|
5:   |00000000000000000000|00000000001111111111|
6:   |00000000000000000000|00000000001111111111|
7:   |00000000000000000000|00000000001111111111|
8:   |00000000000000000000|00000000001111111111|
9:   |00000000000000000000|00000000001111111111|
10:  |00000000000000000000|00000000001111111111|
1:   |11111111110000000000|00000000000000000000|
2:   |11111111110000000000|00000000000000000000|
3:   |11111111110000000000|00000000000000000000|
4:   |11111111110000000000|00000000000000000000|
5:   |11111111110000000000|00000000000000000000|
6:   |11111111110000000000|00000000000000000000|
7:   |11111111110000000000|00000000000000000000|
8:   |11111111110000000000|00000000000000000000|
9:   |11111111110000000000|00000000000000000000|
10:  |11111111110000000000|00000000000000000000|
1:   |00000000000000000000|11111111110000000000|
2:   |00000000000000000000|11111111110000000000|
3:   |00000000000000000000|11111111110000000000|
4:   |00000000000000000000|11111111110000000000|
5:   |00000000000000000000|11111111110000000000|
6:   |00000000000000000000|11111111110000000000|
7:   |00000000000000000000|11111111110000000000|
8:   |00000000000000000000|11111111110000000000|
9:   |00000000000000000000|11111111110000000000|
10:  |00000000000000000000|11111111110000000000|
1:   |00000000001111111111|00000000000000000000|
2:   |00000000001111111111|00000000000000000000|
3:   |00000000001111111111|00000000000000000000|
4:   |00000000001111111111|00000000000000000000|
5:   |00000000001111111111|00000000000000000000|
6:   |00000000001111111111|00000000000000000000|
7:   |00000000001111111111|00000000000000000000|
8:   |00000000001111111111|00000000000000000000|
9:   |00000000001111111111|00000000000000000000|
10:  |00000000001111111111|00000000000000000000|


Localize decimal separator

Details
This change allows user to use comma (,) instead of a dot (.) as a decimal separator on WorkspaceReimburseView and IOUAmountPage when using Spanish language.
Fixed Issues

https://github.com/Expensify/App/issues/9497
Tests

Have English language enabled
Click FAB > Request money
Verify that there is . button at the bottom left corner of the onscreen keyboard
Verify that it's possible to enter a decimal number with two digits after the dot
Open Settings > Workspace > Reimburse expenses
Verify that it's possible to enter a decimal number with three digits after the dot into Rate input
Change language to Spanish
Click FAB > Request money
Verify that there is , button at the bottom left corner of the onscreen keyboard
Verify that it's possible to enter a decimal number with two digits after the comma
Open Settings > Workspace > Reimburse expenses
Verify that it's possible to enter a decimal number with three digits after the comma into Rate input

PR Review Checklist

Contributor (PR Author) Checklist

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

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

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

[x] iOS / native
[x] Android / native
[x] iOS / Safari
[x] Android / Chrome
[x] MacOS / Chrome
[ ] MacOS / Desktop

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

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

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

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

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

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

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

PR Reviewer Checklist

[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

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

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

[ ] iOS / native
[ ] Android / native
[ ] iOS / Safari
[ ] Android / Chrome
[ ] MacOS / Chrome
[ ] MacOS / Desktop

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

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

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

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

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

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

QA Steps

Have English language enabled
Click FAB > Request money
Verify that there is . button at the bottom left corner of the onscreen keyboard
Verify that it's possible to enter a decimal number with two digits after the dot
Open Settings > Workspace > Reimburse expenses
Verify that it's possible to enter a decimal number with three digits after the dot into Rate input
Change language to Spanish
Click FAB > Request money
Verify that there is , button at the bottom left corner of the onscreen keyboard
Verify that it's possible to enter a decimal number with two digits after the comma
Open Settings > Workspace > Reimburse expenses
Verify that it's possible to enter a decimal number with three digits after the comma into Rate input

Screenshots

Web

https://user-images.githubusercontent.com/9059945/178724447-8b822aa2-eeb0-466a-9d5e-470f99a792de.mp4
https://user-images.githubusercontent.com/9059945/177964283-2787cf1a-62a1-462d-92cf-6a5bb162b241.mp4
Mobile Web

https://user-images.githubusercontent.com/9059945/177965086-ada5d846-0453-48d4-a48c-8af6d6a9e80d.mp4
iOS

https://user-images.githubusercontent.com/9059945/177965306-793c4550-7e58-4870-8ffe-accb8c6eee32.MP4
Android

https://user-images.githubusercontent.com/9059945/177964890-59fead34-64e4-485c-b51b-2526af4b9244.mp4

@eVoloshchak Check your web video from 00 to 06 secs. I see value getting lost temporarily. You are entering 233.32, it appears 33.32 for fraction of seconds.

@eVoloshchak Check your web video from 00 to 06 secs. I see value getting lost temporarily. You are entering 233.32, it appears 33.32 for fraction of seconds.

I think that my screen recorder is recording at low fps, what i see on the screen and on the video are not the same thing. I updated the web section with a screen capture shot on a phone camera
https://user-images.githubusercontent.com/9059945/178724790-01ed7d72-90d1-44f8-af20-11ee04df22b3.mp4

@eVoloshchak Check your web video from 00 to 06 secs. I see value getting lost temporarily. You are entering 233.32, it appears 33.32 for fraction of seconds.

I think that my screen recorder is recording at low fps, what I see on the screen and on the video are not the same thing. I updated the web section with a screen capture shot on a phone camera
video_2022-07-13_14-33-58.mp4

Please update the screen record so that's a more reliable option, to ensure everything. I believe you can do that on macincloud also.

Please update the screen record so that's a more reliable option, to ensure everything. I believe you can do that on macincloud also.

Sure! This is a screen recording from Windows machine, it seems to have more fps.
https://user-images.githubusercontent.com/9059945/178995567-801ae501-ed19-44dc-800c-32c4f67a53c0.mp4

Thanks, @eVoloshchak can you repeat the same steps in staging and share the recording, thanks!

Please update the screen record so that's a more reliable option, to ensure everything. I believe you can do that on macincloud also.

Sure! This is a screen recording from Windows machine, it seems to have more fps.
1.New.Expensify.-.Google.Chrome.2022-07-14.15-44-32.mp4

Please update the screen record so that's a more reliable option, to ensure everything. I believe you can do that on macincloud also.

Sure! This is a screen recording from Windows machine, it seems to have more fps.
1.New.Expensify.-.Google.Chrome.2022-07-14.15-44-32.mp4

@eVoloshchak can you repeat the same steps in staging and share the recording. With that, we can rule out whether the behavior is caused by this PR or not thanks!

Of course
https://user-images.githubusercontent.com/9059945/179361099-c7da50e4-e381-4feb-b0a6-c7e14d663e20.mp4

PR Reviewer Checklist

[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

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

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

[ ] iOS / native
[ ] Android / native
[ ] iOS / Safari
[ ] Android / Chrome
[ ] MacOS / Chrome
[ ] MacOS / Desktop

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

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

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

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

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

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

@eVoloshchak great job getting your first Expensify/App pull request over the finish line! I'll merge it assuming all the tests pass.
I know there's a lot of information in our contributing guidelines, so some points to take note of:
Once your PR is merged, you can be hired for another issue. Once you've completed a few issues, we may start hiring you for more than one issue at a time.
Once your PR is deployed to our staging servers, it will undergo quality assurance (QA) testing. If we find that this doesn't work as expected or causes a regression, you'll be responsible for fixing it. Typically we would revert this PR and give you another chance to create a similar PR without causing a regression. (I don't imagine this will happen with this PR, but it's something to be aware of)
Once your PR is deployed to production, we start a 7-day timer. After it has been on production for 7 days without causing any regressions, then we pay out the Upwork job.
So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo!

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

🚀 Deployed to staging by @sketchydroide in version: 1.1.86-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @yuwenmemon in version: 1.1.86-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@eVoloshchak and @parasharrajat the linked issue has been incorrectly linked:
$ https://github.com/Expensify/App/issues/9497 the dollar sign was missing. Please, pay attention to this for next PRs. Thank you 🙇

@Santhosh-Sellavel was C+ here.

Sorry Rajat, saw you amongst the reviewers. @Santhosh-Sellavel  for the note above 🙇

🤦 Oops
@mountiny Thanks for the note!

Heads up @parasharrajat @Santhosh-Sellavel @sketchydroide! Just FYI: this PR caused a bug here: https://github.com/Expensify/App/issues/11352

I already asked to revert it https://github.com/Expensify/App/pull/9800#discussion_r925924728. we had a revert PR https://github.com/Expensify/App/pull/10129.
There must be follow up PR. cc: @Santhosh-Sellavel as C+.

@puneetlath This PR was reverted not sure how it caused a regression!

Good point fellas. My bad lol. Will look further into it!


Set declare_params functionality to parameter declaration only

Hello!
We have observed some issues recently in the ros2_controller that have issues with the parameters when loading the controller.
We believe we found the reason all behind that IMUSensorBroadcaster PR. I was also able to reproduce things with ros2_control_demos examples
Apparantly, if you parse the robot_controller parameters to the ros2_control_nodehttps://github.com/ros-controls/ros2_control_demos/blob/master/example_1/bringup/launch/rrbot.launch.py#L67-L72 everything will work as usual. If this is not the case, then it becomes tricky, if you either use the spawner command line or the launch_utils.py in the controller_manager, then we have this issue with the validators etc using the generate_parameter_library.
However, moving the object creation and the retrieval of the parameters of GPL to the configure helps only in the Humble especially because of the allow_undeclared_parameter being true , this is why we are able to set the parameters without issue after loading the controller and before the configuring the controller (that's the reason moving them to the configure it works for both having parameters at ros2_control_node level or by loading them after initialization).
Unfortunately, this is not the case anymore for rolling as this allow_undeclared_parameters is removed completely. So, if we try to set the parameters after loading the controller, they would fail as they are not declared in the first place. So, merging PR : https://github.com/ros-controls/ros2_controllers/pull/795 would solve the issue for Humble but not for Rolling (I tried to reproduce the same by removing this allow_undeclared_parameters option in Humble and tried to load the parameters and then I've the following error). I was not able to test it in the rolling though. I believe it should be the same
[spawner-6] Set parameter sensor_name failed: parameter 'sensor_name' cannot be set because it was not declared
[spawner-6] Set parameter frame_id failed: parameter 'frame_id' cannot be set because it was not declared
[spawner-6] Set parameter publish_rate failed: parameter 'publish_rate' cannot be set because it was not declared
[spawner-6] [INFO] [1698741261.427305178] [spawner_imu_sensor_broadcaster]: Loaded parameters file "/home/user/pmb3_robot/install/pmb3_controller_configuration/share/pmb3_controller_configuration/config/imu_sensor_broadcaster.yaml" for imu_sensor_broadcaster
[spawner-6] [INFO] [1698741261.427854462] [spawner_imu_sensor_broadcaster]: Loaded /home/user/pmb3_robot/install/pmb3_controller_configuration/share/pmb3_controller_configuration/config/imu_sensor_broadcaster.yaml into imu_sensor_broadcaster

and when you are configuring the controller you have the following error
[gzserver-1] [INFO] [1698741280.396357231] [controller_manager]: Configuring controller 'imu_sensor_broadcaster'
[gzserver-1] [ERROR] [1698741280.398287946] [imu_sensor_broadcaster]: Exception thrown during init stage with message: Invalid value set during initialization for parameter 'sensor_name': Parameter 'sensor_name' cannot be empty
[gzserver-1]
[gzserver-1] [WARN] [1698741280.398347886] [imu_sensor_broadcaster]: Error occurred while doing error handling.
[gzserver-1] [ERROR] [1698741280.398381867] [controller_manager]: After configuring, controller 'imu_sensor_broadcaster' is in state 'unconfigured' , expected inactive.

So, I think the only way this can be solved is by having the separation of declaration of the parameters and fetching them later.
Ideally: If the changes look good, all ROS controllers might need to have something like this : https://github.com/saikishor/ros2_controllers/pull/1

We talked about this in the ros2_control slack. The plan is to change where gpl calls get_parameter on ROS.
The goal is to separate calling declare_parameter from get_parameter for the use case of lifecycle nodes. To do that, we will move the get_parameter calls into the get_param function, and that function will return a new copy of the params struct instead of returning one that is kept as an internal state of the listener. The update function will no longer update an internal copy of the params struct and will only update the timestamp. The internal copy of the params struct is no longer needed.


Simple method that will tells us if Tween is playing right now or not.

Surprisingly there is no simple isPlaying() : boolean method. Or am I missing something?

There is currently no API for that. You can determine when a tween has finished by calling a method at the end of the chain:
createjs.Tween({x:0}).to({x:100}).call(handleComplete);

Or you could query the tween's duration and position any time. When they are equal, the tween should be complete.
var complete = (tween.position==tween.duration);

A boolean property is a good idea, so I will leave this issue open to track it!

I'm looking at changing setPaused into a getter/setter, so you could query paused. Tweens are automatically paused when they reach their end.
Would that meet your needs?

Added paused. Closing this. Let me know if it doesn't do what you need.

Perfect. Thanks.


Update documentation

Closes #327

Love it, looks great

Not merging because the commit comment "begin updating docs" makes it seem like there is more coming.

Yupyup.

Alright, this is the last step!

this looks great! @bqpd please go ahead and merge when you are finished pushing any changes.


Multi AZ

Hi, I have been using this module for a long time, but now I have a requirement to create RDS Aurora Postgresql with Multi-AZ. I have tried a lot to make modifications or use another module. If possible could you please create an Multi AZ RDS Aurora Postgresql terraform code?

Aurora is multi-az by default https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html

But I can choose the multi az enable option while creating it from the console, but via Terraform creation when I check the configuration it shows multi az as no. Even I have tried to add 2 instances as well the configuration status of multi az shows no while created by Terraform, but from console, it will show Yes.

@devasivaram @bryantbiggs It seems like the option to place additional instances of your Aurora cluster in separate AZs is not an option here. So Aurora itself might be Multi AZ compatible by default, but with this module, the cluster instances can only reside in a single AZ and cannot be scattered across AZs?

the cluster instances can only reside in a single AZ and cannot be scattered across AZs

Thats not true

I stand corrected. All depends on how you configure the instances config. Works fine with more than one instance.


Custom Characters Won't Load

Describe the bug
When I go to see the custom characters I made, whether that be in the Video Maker or the Character Browser, it just shows an infinitely spinning loading circle. I have waited on this circle for like 7 minutes but nothing changed and this didn't seem to help at all.
To Reproduce
Steps to reproduce the behavior:

Run Wrapper Offline (For some reason I have to run as admin or localhost error will always appear)
Do anything that would cause you to see the characters, like clicking on the "Create a Character" button or on the "Characters" section in the Video Maker
Infinitely loading spinning circle icon is shown, preventing the characters from being seen or used.

Expected behavior
The characters should load properly and not show a spinning circle.
Screenshots

Desktop (please complete the following information):

OS: Windows 10
Browser: Wrapper Offline Browser
Version: 1.3.0

Additional context
A weird thing is that like every other menu loads as it should; the props, the fonts, etc. Only the Custom Characters list fails to do that. Also, this bug started randomly after I had already created some characters, and I went to add another character to my video, but Wrapper Offline froze, which isn't completely unusual. So I closed the application (Entered 0 on the command prompt, closed the browser and closed the command prompt), and when I opened Wrapper Offline again, the glitch began. I restarted it, tried changing my settings, tried making a new character to access the menu, and restarted my computer, but nothing worked.

does this work for mac and is there a video for this so i can understand this better.


Overall quality and functionality improvement drive for FE

Item
Feb 22
Feb 29

ONNX OP Support
105/193
106/193

lit test lowering to linalg
2/24
5/24

torch OP to ONNX to linalg
5/100
95/100

e2eshark models lowering
3/28
14/28


Update overview.md

With scitokens-cpp >= 0.7.0 extended time for issuer public key caching and our temporary long lifetime access tokens ATLAS is ready to rely exclusively on tokens for job submission.

CI failure unrelated to this PR (though @brianhlin - might be something you want to look at).  Merging anyway.


[BUG] (And solution?) Failed to fetch more galleries.

Describe the bug
Due to a recent change of exhentai.org, app failed to fetch more galleries.
More specifically, exhentai.org now use next and prev to do pagination, ditched the page parameter.
To Reproduce
Steps to reproduce the behavior:

Go to 'search'
Search any keyword that has more than one page
Scroll down to bottom
No new items

To Fix 🥳
I've done a little digging.
Fortunately, EhPanda already passed the parameter of lastID to moreSearchList URL Builder. 🥳

Note
Please note that all the changes below are to let exhentai.org work. You might want to judge whether the user is using e-hentai or exhentai.

Add a new parameter field
All we need to do is to add another parameter ( I call it nextId cuz next looks like a reserved keyword) in
Tools/Defaults.swift: Defaults.URL.Component.Keys
  case fSearch = "f_search"
+ case nextId = "next"

Use that parameter
In Network/Request.swift: MoreSearchGalleriesRequest.publisher
URLSession.shared.dataTaskPublisher(for: URLUtil.moreSearchList(
-    keyword: keyword, filter: filter, pageNum: pageNum, lastID: lastID
+    keyword: keyword, filter: filter, lastID: lastID
))

Modify URL Builder
In Tools/Utilities/URLUtil.swift: URLUtil.moreSearchList
-   static func moreSearchList(keyword: String, filter: Filter, pageNum: Int, lastID: String) -> URL {
+   static func moreSearchList(keyword: String, filter: Filter, lastID: String) -> URL {
        Defaults.URL.host.appending(queryItems: [
-           .fSearch: keyword, .page: String(pageNum), .from: lastID
+           .fSearch: keyword, .nextId: lastID
        ])
        .applyingFilter(filter)
    }

Modify reducer
In View/Search/SearchStore.swift: searchReducer
        case .fetchMoreGalleries:
-           let pageNumber = state.pageNumber
-           guard pageNumber.current + 1 <= pageNumber.maximum,
-                 state.footerLoadingState != .loading,
-                 let lastID = state.galleries.last?.id
-           else { return .none }
            state.footerLoadingState = .loading
-           let pageNum = pageNumber.current + 1
+           guard let lastID = state.galleries.last?.id else { return .none }
            let filter = environment.databaseClient.fetchFilterSynchronously(range: .search)
            return MoreSearchGalleriesRequest(
-               keyword: state.lastKeyword, filter: filter, lastID: lastID, pageNum: pageNum
+               keyword: state.lastKeyword, filter: filter, lastID: lastID, pageNum: 0 // I put a 0 here but it actually does nothing
            )
            .effect.map(SearchAction.fetchMoreGalleriesDone).cancellable(id: SearchState.CancelID())

And we are good to go! 🎆

Thanks for your feedback.
cc @chihchy need further investigation.

Have the solution been updated to current ver? I can still not fetch more and see only one page


Server App

Hello,
I'm a web developer, not a C++ developer, so I can't create apps.
However, I have seen and tried the server app that exposes an HTTP endpoint. The idea is nice, it works, and it is usable, it’s a good start.
I have some improvements suggestions for the C++ developers here, such as:

A great feature would be to allow sending HTML and rendering it on the screen.
or the ability to upload a picture or a GIF.
Instead of listening locally, it would be better to send an HTTP endpoint, and the kubelet will query it regularly to update the display (the reccurence could be a setting, in second).
Maybe include more parameters for colors, sizes, etc., and perhaps use JSON POST instead of query strings?

It would also be great to have minimal documentation available again on the phone app: just display the endpoint again when we click on "Server" in the app list if the server is already the installed app.
I don't see the server app in this repository, will it be included someday?
Thanks

Hi John, thanks for your suggestions.

We cannot display HTML on the screen, but we do have our kgfx library for quick and easy UI rendering. This library provides basic endpoints such as drawing text, numbers, and chart, with the ability to set size and colors, and should be sufficient for most use cases.
We are working on the ability to upload a picture or GIF so do lookout for these updates on our Instagram, Kickstarter page, or our mobile app.
This would mean turning the kublet from a server to a client, so yes, we also have this planned.
That's a good suggestion. We will add params for colors and sizes and maybe JSON POST.

The endpoint on the server app is dynamic, so it is better to let kublet display the endpoint.
We aim to provide more examples in our community repo and may include the server example in future.
The examples in this repo are meant for beginners (in C++) to get started writing an app quickly. So even without C++ experience we encourage our users to start with the basic examples here and refer to our documentation. We will publish more examples.
Thanks for your feedback and we looking forward to seeing your app!

Ah ok, thanks !


Motrix

Project description:  A full-featured download manager
describe the project a little:  it is a download manager that Support downloading HTTP, FTP, BitTorrent, Magnet, etc. I think it is a substitute for idm. You know, idm can only run on windows
Metadata

homepage URL: https://motrix.app/
source URL: https://github.com/agalwood/Motrix
license: mit, bsd, gpl2+ , ... :  The MIT License
platforms: unix, linux, darwin, ...  it provide opensource for linux , window, macos

Duplicate of #157984

https://github.com/NixOS/nixpkgs/pull/185804

#185804 Merged.


Use of TickerMode wrapped with TabBarView prevent animation

This is my first bug report, please say if im missing something.
After upgrading to flutter version 1.20.2 I experienced this problem.
With Flutter version 1.17.5, it works fine.
When having 2 pages wrapped with TabBarView, and each page wrapped with TickerMode. The second page is not enabled when changing to that page. First after setstate has been recalled on that page, it will work.
Because the second page is never enabled, the animations are never starting.
I have recreated the problem as simpel as I could in this project:
https://github.com/RuneAlexanderLarsen/Flutter-Ticker-TabBarView-Bug
Code snippet:
return TabBarView(
  controller: _tabController,
  children: [
    TickerMode(
      child: DemoPage(),
      enabled: selectedTabIndex == 0,
    ),
    TickerMode(
      child: DemoPage2(),
      enabled: selectedTabIndex == 1,
    ),
  ],
);

code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
  int selectedTabIndex = 0;
  TabController _tabController;

  @override
  void initState() {
    super.initState();
    _tabController = TabController(vsync: this, length: 2);
    // _tabController.addListener(() {
    //   setState(() {
    //     selectedTabIndex = _tabController.index;
    //   });
    // });
  }

  Widget _buildTabPages() {
    return TabBarView(
      controller: _tabController,
      children: [
        TickerMode(
          child: DemoPage(),
          enabled: selectedTabIndex == 0,
        ),
        TickerMode(
          child: DemoPage2(),
          enabled: selectedTabIndex == 1,
        ),
      ],
    );
  }

  // Widget _buildTabPages() {
  //   return IndexedStack(
  //     index: selectedTabIndex,
  //     children: [
  //       TickerMode(
  //         child: DemoPage(),
  //         enabled: selectedTabIndex == 0,
  //       ),
  //       TickerMode(
  //         child: DemoPage2(),
  //         enabled: selectedTabIndex == 1,
  //       ),
  //     ],
  //   );
  // }

  // @override
  // void didChangeDependencies() {
  //   super.didChangeDependencies();
  //   _tabController.addListener(() {
  //     setState(() {
  //       selectedTabIndex = _tabController.index;
  //     });
  //   });
  // }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        child: Stack(
          children: [
            _buildTabPages(),
            FloatingActionButton(child: Text('Change Page'), onPressed: change),
          ],
        ),
      ),
    );
  }

  void change() {
    int newValue;
    if (selectedTabIndex == 1) {
      newValue = 0;
    } else {
      newValue = 1;
    }

    setState(() {
      selectedTabIndex = newValue;
    });

    _tabController.animateTo(selectedTabIndex);
  }
}

class DemoPage extends StatelessWidget {
  // DemoPage() : super(key: Key('1'));

  @override
  Widget build(BuildContext context) {
    return Row(children: [
      Text('Page 1:'),
      CircularProgressIndicator(
        valueColor: AlwaysStoppedAnimation(Colors.red),
      ),
    ]);
  }
}

class DemoPage2 extends StatelessWidget {
  // DemoPage2() : super(key: Key('2'));

  @override
  Widget build(BuildContext context) {
    return Row(children: [
      Text('Page 2:'),
      CircularProgressIndicator(
        valueColor: AlwaysStoppedAnimation(Colors.red),
      ),
    ]);
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.6 19G2021, locale en-GB)
    • Flutter version 1.20.2 at /Users/tahatesser/Code/flutter_stable
    • Framework revision bbfbf1770c (6 days ago), 2020-08-13 08:33:09 -0700
    • Engine revision 9d5b21729f
    • Dart version 2.9.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.1
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.48.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (2 available)
    • Taha’s iPhone (mobile) • 00008020-001059882212002E            • ios • iOS
      13.6
    • iPhone 11 (mobile)     • A63D6F51-59F3-4A75-961F-3769709F3A92 • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)

• No issues found!

Verified this on latest master version and the issue is not replicable anymore.
https://user-images.githubusercontent.com/67046386/199221992-232bec0a-cd70-45bf-9047-c673ad6c3aff.mov

 master flutter doctor -v

[!] Flutter (Channel master, 3.5.0-12.0.pre.45, on macOS 12.2.1 21D62
    darwin-x64, locale en-GB)
    • Flutter version 3.5.0-12.0.pre.45 on channel master at
      /Users/dhs/documents/fluttersdk/flutter
    ! Warning: `flutter` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
      your current Flutter SDK checkout at
      /Users/dhs/documents/fluttersdk/flutter. Consider adding
      /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
      Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
      of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c2edb20f3d (53 minutes ago), 2022-10-31 21:18:37 -0700
    • Engine revision f721db653d
    • Dart version 2.19.0 (build 2.19.0-356.0.dev)
    • DevTools version 2.18.0
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[!] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! Flutter recommends a minimum Xcode version of 13.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] VS Code (version 1.62.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.21.0

[✓] Connected device (5 available)
    • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
    • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
      ios            • iOS 14.4.1 18D61
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 98.0.4758.80

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Closing this as fixed.


Load --exclude from a file

We like having a link checker in https://github.com/opensearch-project/OpenSearch, but we also often encounter URLs that no longer work in things like license files. Therefore we can't just fix the links. This leads to a fairly long list of URLs to exclude, which we keep adding to a GitHub action job, which reads poorly.
In https://github.com/opensearch-project/OpenSearch/pull/1189 I've hacked our workflow to read the exclusions from a file, but it's not an ideal implementation :)
Should we add --exclude-file to lychee?

@dblock
lychee currently support config file. so at least you can put those urls in it.

@dblock
lychee currently support config file. so at least you can put those urls in it.

Oh where/how? I see README mentions a config file, but can't find a reference/example.

indeed.

Good idea!

This was implemented in #306, and released in 7.0.1.


Add the ability to not depend on the "compose.material" module

Probably we can make compose.desktop.currentOs dependent on compose.foundation, not on compose.material.
In this case developers who don't want to use material module can write:
implementation(compose.desktop.currentOs)

or
implementation(compose.desktop.currentOs)
implementation(compose.foundation)

or
implementation(compose.desktop.foundation.currentOs)

If material module is needed then developers can write:
implementation(compose.desktop.currentOs)
implementation(compose.material)

or
implementation(compose.desktop.material.currentOs)

What's the point for such a change?

What's the point for such a change?

If someone will write a library-replacement for material module (with a bunch of UI components), there is no easy way to use it without material (because our desktop module depends on material) .
After this change we can use only that library, without material

I'm actually a little confused by the whole currentOs thing; why is this needed when using MPP?  That is to say, why is it not sufficient to just add a reference to the maven artifact with gradle metadata and then let the platform-specific questions get resolved automatically?

maven artifact with gradle metadata

Yes, I am also though about that! But at the time I tried (Summer 2020) there were some issues.
Maybe I just didn't know MPP plugin very well, maybe MPP plugin didn't support different jvm binary targets.
But we can try again, and if we will need something from MPP plugin, we can communicate with MPP team.

currentOs is to provide different artifacts on different platforms (as Skia is pretty big, and we don't want to pack all possible native libs into single artifact). Do not think MPP will help here.

Do not think MPP will help here

Theoretically we can still ship separate artifacts for each platform (mac-arm64, mac-x64, win64, linux64), and make MPP plugin resolve platform automatically:
kotlin {
    android()
    jvm("desktop")
    jvm("macosArm64")
    jvm("windowsX64")

    sourceSets {
        val commonMain by getting {
            dependencies {
                api(compose.material)
            }
        }

        val desktopMain by getting {
            dependsOn(commonMain)
            dependencies {
                api(compose.desktop)
            }
        }

        val macosArm64Main by getting {
            dependsOn(desktopMain)
        }

        val windowsX64Main by getting {
            dependsOn(desktopMain)
        }
    }
}

Compose Gradle plugin task "./gradlew run" will determine current Os and will run appropriate target.
It looks verbose, so we need to think can we reduce the code size.

@Wertual08 I am using Material 3 and Material 2 was causing many naming conflicts and styling issues when wrongly imported, so I excluded it from every package that includes it (works fine so far, but tested only with Material 3 included). For example:
implementation(compose.desktop) {
  exclude("org.jetbrains.compose.material")
}

@malliaridis Many thanks!

Bought it from #4035,
Maybe it is time to remove DesktopTheme.jvm.kt completely.

Then we can safely remove compose.material.

Any ETA for this?? is there any blocker that prevents this from happening???

What's the point for such a change?

If you use Material 3 then the IDE might import the classes and functions from Material 2, it make the bundle size bigger when it's not needed and all libraries that's alternative for Material like Cupertino, will still need to use Material library

curentOs maybe not needed if https://github.com/JetBrains/compose-multiplatform/issues/3282 is resolved. compose.desktop module can be removed after this as well.

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


kubeconform could not find schema for HTTPProxy since v0.6.0

kubeconform could not find schema for HTTPProxy since v0.6.0. This was not the case in the prior version (v0.5.0) where it functioned as expected.
manifest:
$ cat httpproxy.yml
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
  name: basic
spec:
  virtualhost:
    fqdn: foo-basic.example.com
  routes:
    - conditions:
      - prefix: /
      services:
        - name: s1
          port: 80

v0.5.0
$ docker run -i --rm ghcr.io/yannh/kubeconform:v0.5.0  -summary -debug -schema-location default -schema-location https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json  < httpproxy.yml
2023/07/02 05:55:47 could not find schema at https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/httpproxy-projectcontour-v1.json
2023/07/02 05:55:47 using schema found at https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/projectcontour.io/httpproxy_v1.json
Summary: 1 resource found parsing stdin - Valid: 1, Invalid: 0, Errors: 0, Skipped: 0
$

v0.6.0
$ docker run -i --rm ghcr.io/yannh/kubeconform:v0.6.0  -summary -debug -schema-location default -schema-location https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json  < httpproxy.yml
2023/07/02 05:55:52 could not find schema at https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/httpproxy-projectcontour-v1.json
2023/07/02 05:55:52 using schema found at https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/projectcontour.io/httpproxy_v1.json
stdin - HTTPProxy basic failed validation: could not find schema for HTTPProxy
Summary: 1 resource found parsing stdin - Valid: 0, Invalid: 0, Errors: 1, Skipped: 0
$

I encountered the same problem.
My investigation
I modified kubeconform as follows:
diff --git a/pkg/validator/validator.go b/pkg/validator/validator.go
index f4827c8..3096c6e 100644
--- a/pkg/validator/validator.go
+++ b/pkg/validator/validator.go
@@ -6,6 +6,7 @@ import (
        "errors"
        "fmt"
        "io"
+       "log"

        jsonschema "github.com/santhosh-tekuri/jsonschema/v5"
        _ "github.com/santhosh-tekuri/jsonschema/v5/httploader"
@@ -257,6 +258,7 @@ func downloadSchema(registries []registry.Registry, kind, version, k8sVersion st
                        schema, err := jsonschema.CompileString(path, string(schemaBytes))
                        // If we got a non-parseable response, we try the next registry
                        if err != nil {
+                               log.Print(fmt.Sprintln(err))
                                continue
                        }
                        return schema, err

and I got the following message:
$ cat a.yaml | /home/umezawa/go/src/github.com/yannh/kubeconform/bin/kubeconform --debug --verbose \
    --schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
2023/07/14 18:45:33 using schema found at https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/projectcontour.io/httpproxy_v1.json
2023/07/14 18:45:33 jsonschema https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/projectcontour.io/httpproxy_v1.json compilation failed: '/properties/spec/properties/routes/items/properties/services/items/properties/port/exclusiveMaximum' does not validate with https://json-schema.org/draft/2020-12/schema#/allOf/1/$ref/properties/properties/additionalProperties/$dynamicRef/allOf/1/$ref/properties/properties/additionalProperties/$dynamicRef/allOf/1/$ref/properties/items/$dynamicRef/allOf/1/$ref/properties/properties/additionalProperties/$dynamicRef/allOf/1/$ref/properties/items/$dynamicRef/allOf/1/$ref/properties/properties/additionalProperties/$dynamicRef/allOf/3/$ref/properties/exclusiveMaximum/type: expected number, but got boolean
stdin - HTTPProxy argocd-server failed validation: could not find schema for HTTPProxy

The parser library seems to misunderstand exclusiveMaximum field. kubeconform v0.5.0 and v0.6.0 use different parser libraries (https://github.com/yannh/kubeconform/pull/168). It seems why v0.5.0 does not have the same problem.
My workaround
Patch HTTPProxy's json schema:
--- json-schemas/httpproxy-projectcontour.io-v1.json 2023-07-14 17:55:44.585104029 +0900
+++ json-schemas/httpproxy-projectcontour.io-v1-patched.json 2023-07-14 18:30:31.444792578 +0900
@@ -1053,8 +1053,7 @@
                     },
                     "port": {
                       "description": "Port (defined as Integer) to proxy traffic to since a service can have multiple defined.",
-                      "exclusiveMaximum": true,
-                      "maximum": 65536,
+                      "maximum": 65535,
                       "minimum": 1,
                       "type": "integer"
                     },
@@ -1445,8 +1444,7 @@
                   },
                   "port": {
                     "description": "Port (defined as Integer) to proxy traffic to since a service can have multiple defined.",
-                    "exclusiveMaximum": true,
-                    "maximum": 65536,
+                    "maximum": 65535,
                     "minimum": 1,
                     "type": "integer"
                   },

and specify it before CRDs-catalog:
$ cat a.yaml | /home/umezawa/go/src/github.com/yannh/kubeconform/bin/kubeconform --debug --verbose \
    --schema-location 'json-schemas/{{.ResourceKind}}-{{.Group}}-{{.ResourceAPIVersion}}-patched.json' \
    --schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
2023/07/14 18:45:45 using schema found at json-schemas/httpproxy-projectcontour.io-v1-patched.json
stdin - HTTPProxy argocd-server is valid

Just in case, I checked the corresponding section in JSON schema specification https://json-schema.org/understanding-json-schema/reference/numeric.html#range before reporting. It says that exclusiveMaximum in the Draft 4 is boolean but that in later specifications is the same type as minimum - in the HTTPProxy's case, integer.

santhosh-tekuri/jsonschema's default behavior is the latest specification (currently, Draft 2020)
HTTPProxy's schema seems written on the basis of Draft 4 but the CRD does not say which specification is used.

... what shall we do?

Oops, sorry, I didn't know that CRDs must be written on the basis of Draft 4.
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#jsonschemaprops-v1-apiextensions-k8s-io
This problem would be solved just by setting specification version to be referred by the schema compiler.

So we are using the latest  version of JSON Schema instead of forcing Draft 4? That sounds like an easy enough fix?

Just tagged v0.6.3 which fixes this issue! Thanks a lot @umezawatakeshi your investigation really helped getting this resolved :heart:

Thanks a lot :+1:


Relax dependencies

closely overlapping with this issue
as well as openpyxl, restrictions on other dependencies are slightly relaxed
given this comment on sqlalchemy, sqlachemy's version has also changed to 2.0.25
we do not seem to be using python-dotenv anywhere in the codebase, there is no .env folder for example
requirements for locally building the docs included conflicts, such that it was not possible to build the image, they have been mostly changed and now the build seem to be fine

is SQLAlchemy required for the pipeline ?
If I remember correctly ,  sqlalchemy was used for key_map_predcitions feature which was removed.
it would be great to remove it. if it is not used in the pipeline

SQLAlchemy is not required. I see no usage of SQLAlchemy in code
I removed and ran tests and the example notebook. everything is working fine..


[bug] Can't build Android app using Tauri v2.0.0-rc.7

Describe the bug
Error while building Android app
Info Forwarding port 1420 with adbkage
adb: error: listener 'tcp:1420' not found
1420
error: failed to select a version for the requirement `hyper-rustls = "^0.27.0"`
candidate versions found which didn't match: 0.26.0, 0.25.0, 0.24.2, ...
location searched: crates.io index
required by package `reqwest v0.12.7`
    ... which satisfies dependency `reqwest = "^0.12"` (locked to 0.12.7) of package `tauri v2.0.0-rc.6`
    ... which satisfies dependency `tauri = "^2.0.0-rc"` (locked to 2.0.0-rc.6) of package `tauri-app v0.1.0 (/Users/xxx.xxx/Projects/tauri-app/src-tauri)`
if you are looking for the prerelease package it needs to be specified explicitly
    hyper-rustls = { version = "0.19.0-alpha.3" }
    Error `Failed to run `cargo build`: command ["cargo", "build", "--package", "tauri-app", "--manifest-path", "/Users/xxx.xxx/Projects/tauri-app/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--features", "tauri/rustls-tls", "--lib", "--no-default-features"] exited with code 101
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
w: file:///Users/xxx.xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-rc.6/mobile/android/src/main/java/app/tauri/plugin/PluginMethodData.kt:11:23 Parameter 'methodDecorator' is never used

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:rustBuildArm64Debug'.
> Process 'command 'yarn'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 19s
    Error Failed to assemble APK: command ["/Users/xxx.xxx/Projects/tauri-app/src-tauri/gen/android/gradlew", "--project-dir", "/Users/xxx.xxx/Projects/tauri-app/src-tauri/gen/android"] exited with code 1: command ["/Users/xxx.xxx/Projects/tauri-app/src-tauri/gen/android/gradlew", "--project-dir", "/Users/xxx.xxx/Projects/tauri-app/src-tauri/gen/android"] exited with code 1
error Command failed with exit code 1.

Reproduction
yarn create tauri-app --rc
cd tauri-app
yarn
yarn tauri android init
yarn tauri android dev

Expected behavior
build successfully
Full tauri info output
[✔] Environment
    - OS: Mac OS 14.6.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.1 (3f5fd8dd4 2024-08-06)
    ✔ cargo: 1.80.1 (376290515 2024-07-16)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 22.7.0
    - yarn: 1.22.22
    - npm: 10.8.2
    - bun: 1.1.26

[-] Packages
    - tauri [RUST]: 2.0.0-rc.6
    - tauri-build [RUST]: 2.0.0-rc.6
    - wry [RUST]: 0.42.0
    - tao [RUST]: 0.29.1
    - tauri-cli [RUST]: 2.0.0-rc.7
    - @tauri-apps/api [NPM]: 2.0.0-rc.3
    - @tauri-apps/cli [NPM]: 2.0.0-rc.7

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace
No response
Additional context
No response

Fixed in Tauri v2.0.0-rc.8

I have still this problem. Please help me.


Flutter application crash when using cameraController.takePicture(); is called

package used: https://pub.dev/packages/camera
i have implemented various solutions someone said to use await cameraController.lockCaptureOrientation(); just after initilization of camera but it also does not works.
However my appliation crashes when .takePicture function is called. kindly suggest the solution for it. or suggest any other way to get the picture from the steams of images in camera plugin.
it is not crashing all the time but most of the time when i take the selfie close to the camera/ move the hand infront of camera in fast speed it crashes most of the time.
it gives me this error
I/Camera  (23227): open | onClosed E/AndroidRuntime(23227): FATAL EXCEPTION: pool-88-thread-1 E/AndroidRuntime(23227): Process: com.project.image_recognition, PID: 23227 E/AndroidRuntime(23227): java.lang.IllegalStateException: CameraDevice was already closed E/AndroidRuntime(23227):        at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2423) E/AndroidRuntime(23227):        at android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest(CameraDeviceImpl.java:1203) E/AndroidRuntime(23227):        at android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest(CameraDeviceImpl.java:1276) E/AndroidRuntime(23227):        at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:322) E/AndroidRuntime(23227):        at io.flutter.plugins.camera.Camera.refreshPreviewCaptureSession(Camera.java:431) E/AndroidRuntime(23227):        at io.flutter.plugins.camera.Camera.access$600(Camera.java:81) E/AndroidRuntime(23227):        at io.flutter.plugins.camera.Camera$2.onConfigured(Camera.java:370) E/AndroidRuntime(23227):        at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.lambda$onConfigured$0$CallbackProxies$SessionStateCallbackProxy(CallbackProxies.java:53) E/AndroidRuntime(23227):        at android.hardware.camera2.impl.-$$Lambda$CallbackProxies$SessionStateCallbackProxy$soW0qC12Osypoky6AfL3P2-TeDw.run(Unknown Source:4) E/AndroidRuntime(23227):        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/AndroidRuntime(23227):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/AndroidRuntime(23227):        at java.lang.Thread.run(Thread.java:923) E/libc    (23227): Access denied finding property "persist.vendor.camera.privapp.list" W/age_recognition(23227): type=1400 audit(0.0:327855): avc: denied { read } for name="u:object_r:vendor_camera_mtk_prop:s0" dev="tmpfs" ino=292 scontext=u:r:untrusted_app:s0:c244,c257,c512,c768 tcontext=u:object_r:vendor_camera_mtk_prop:s0 tclass=file permissive=0 app=com.project.image_recognition V/CameraManager(23227): isNormalCamera packageName = com.project.image_recognition V/CameraManager(23227): isTopActivity I/CameraManager(23227): isTopActivity: pkgname: com.bbk.launcher2 V/CameraManager(23227): current package isTopActivity false  V/CameraManager(23227): sendOpenCameraBroadCast isNormalCamera = false V/CameraManager(23227): sendStartPreviewBroadCast V/CameraDevice-JV-1(23227): mIsNormalCamera false isNormalCamera false

@darshankawar Although I use lasted version, I still have same issue


Use Timestamp struct instead of time.Time

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #98 into master will decrease coverage by 0.02%.
The diff coverage is 83.44%.

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
- Coverage   77.11%   77.09%   -0.03%
==========================================
  Files          22       23       +1
  Lines        4720     4806      +86
==========================================
+ Hits         3640     3705      +65
- Misses        664      685      +21
  Partials      416      416

Impacted Files
Coverage Δ

ion/consts.go
100.00% <ø> (ø)

ion/writer.go
90.47% <ø> (ø)

ion/reader.go
52.94% <50.00%> (ø)

ion/timestamp.go
60.00% <60.00%> (ø)

ion/bitstream.go
82.27% <94.73%> (+0.24%)
:arrow_up:

ion/binarywriter.go
77.89% <100.00%> (ø)

ion/bits.go
100.00% <100.00%> (ø)

ion/marshal.go
78.80% <100.00%> (ø)

ion/textutils.go
79.77% <100.00%> (+1.09%)
:arrow_up:

ion/textwriter.go
64.81% <100.00%> (ø)

... and 2 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 0c30b5d...52aaa4f. Read the comment docs.


Need array support for Event

We need array of items for Event field, for example we wanna set the below array=true for event field.
<event code="0x0001" name="TestEvent" priority="info" side="server">
  <description>Example test event</description>
  <field id="1" name="arg1" type="INT8U"/>
  <field id="2" type="NestedStructList" array="true"/>
</event>

which would be similar to command args

<arg name="arg1" type="NestedStructList" array="true"/>

When taking a look the zcl-loader-silabs.js, it seems it cannot handle array of type.
if ('field' in event) {
ev.fields = []
event.field.forEach((field, index) => {
if (field.$.removedIn == null) {
ev.fields.push({
name: field.$.name,
type: field.$.type,
fieldIdentifier: field.$.id ? parseInt(field.$.id) : index + 1,
introducedIn: field.$.introducedIn,
removedIn: field.$.removedIn,
})

Fixed as part of the PR https://github.com/project-chip/zap/pull/259


Doesn't work with madmom==0.16.1 for some reason

Madmom==0.16.1 installs successfully on my systems (Fedora 31 and Fedora 36). But for some reason, mixingbear is refusing to use it, requiring the very narrow range of "madmom<0.15.2,>=0.15.1".  But that version of madmom is buggy and won't install on any Fedora system, at least between Fedora 31 and Fedora 36:

madmom/ml/nn/layers.c:17142:25: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
17142 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/include/python3.10/unicodeobject.h:1046,
from /usr/include/python3.10/Python.h:83,
from madmom/ml/nn/layers.c:15:
/usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
madmom/ml/nn/layers.c: In function '__Pyx_PyCFunction_FastCall':
madmom/ml/nn/layers.c:17426:13: error: too many arguments to function '(PyObject * ()(PyObject , PyObject * const, Py_ssize_t))meth'
17426 | return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
madmom/ml/nn/layers.c: In function '__Pyx__ExceptionSave':
madmom/ml/nn/layers.c:18807:21: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
18807 | *type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
madmom/ml/nn/layers.c:18808:22: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
18808 | *value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
madmom/ml/nn/layers.c:18809:19: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
18809 | *tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
madmom/ml/nn/layers.c: In function '__Pyx__ExceptionReset':
madmom/ml/nn/layers.c:18816:24: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
18816 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
madmom/ml/nn/layers.c:18817:25: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
18817 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
madmom/ml/nn/layers.c:18818:22: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
18818 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
madmom/ml/nn/layers.c:18819:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
18819 | tstate->exc_type = type;
| ^~~~~~~~
| curexc_type
madmom/ml/nn/layers.c:18820:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
18820 | tstate->exc_value = value;
| ^~~~~~~~~
| curexc_value
madmom/ml/nn/layers.c:18821:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
18821 | tstate->exc_traceback = tb;
| ^~~~~~~~~~~~~
| curexc_traceback

.. etc.  Which in turn prevents mixingbear from installing.
Could you please allow more modern, aka bugfixed, versions of madmom to be used?

ED: So, I managed to get it installed by installing it with nodeps, and it works just fine with madmom==0.16.1.  :)


Python bindings not installed with build

This may be my mistake but I cannot figure out how to install the python bindings.
I downloaded the latest version of the project through github. In the official documentation the only thing mentioned is that you need SWIG and python. In older documentations it is stated that you need to run ./configure with specific arguments in order to install the python bindings.
I have python 3.4.3 and SWIG is installed but I cannot find a configure file. When I run make the swig folder is not entered. If I manually enter the folder and run make I get the following results
../include/xtract/libxtract.h:300: Warning 314: 'def' is a python keyword, renaming to '_def'
cc: error: Accelerate: No such file or directory
cc: error: unrecognized command line option ‘-framework’
Makefile:21: recipe for target 'python' failed
make: *** [python] Error 1
Also in the swig folder if I run the test.py I get the "Failed to load the library "xtract"" error.

Same here ... output from make install is just :
make[1]: Entering directory `/root/LibXtract/src'
make[1]: Leaving directory `/root/LibXtract/src'
make[1]: Entering directory `/root/LibXtract/examples'
make[2]: Entering directory `/root/LibXtract/examples/simpletest'
WaveFile.cpp:75:8: warning: multi-character character constant [-Wmultichar]
   case 'FFIR':
        ^
WaveFile.cpp:81:31: warning: multi-character character constant [-Wmultichar]
     if (header.riff.format != 'EVAW')
                               ^
WaveFile.cpp:89:8: warning: multi-character character constant [-Wmultichar]
   case ' tmf':
        ^
WaveFile.cpp:124:8: warning: multi-character character constant [-Wmultichar]
   case 'atad':
        ^
WaveFile.cpp:143:29: warning: multi-character character constant [-Wmultichar]
  if (header.riff.chunkID != 'FFIR')
                             ^
WaveFile.cpp:148:28: warning: multi-character character constant [-Wmultichar]
  if (header.fmt.chunkID != ' tmf')
                            ^
make[2]: Leaving directory `/root/LibXtract/examples/simpletest'
make[1]: Leaving directory `/root/LibXtract/examples'

@jamiebullock did you remove the Python bindings?

Hi, no the python bindings haven't been removed, you just now need to build them as a separate step with make swig. I'll add this detail to the README!

Great, thanks for the info :)
I actually ended up using an old version of libxtract that I knew to compile properly ...

Which version did you use?


Auto sync with voice library

Instead of having to click "Sync" to sync with the voice library, just sync it whenever the chrome extension window is opened.

closed by #12


Excess FD errors

Running from a fresh build of tip of master on macOS, I'm seeing the following:
$ echo "google.com" | ./zdns A
{"data":{"protocol":"udp","resolver":"[2001:558:feed::2]:53"},"error":"write udp <IP_ADDRESS>:59008-\u003e[2001:558:feed::2]:53: address 2001:558:feed::2: non-IPv4 address","name":"google.com","status":"ERROR","timestamp":"2021-09-05T20:38:25-07:00"}
FATA[0000] unable to create socketlisten udp <IP_ADDRESS>:0: socket: too many open files

I assume this isn't expected, so I'm wondering if this is a regression. I could of course be using it wrong, too! Happy to provide any additional information if it would be helpful.

I don't know what zdns is, but seems unrelated to this library

Well, that's embarrassing. I filed this issue on the wrong repo. Oops!


Make network and rpcport configurable rather than hardcoding them

Fixes #56.

Add network and rpcport fields to properties class
Add validation for the new fields
Add unit tests

Looks good!
I think the p2p port should also be exposed right?
At least it was in the (now commented out) section:
List<Integer> hardcodedStandardPorts = ImmutableList.<Integer>builder()
        .addAll(this.properties.getChain() == Chain.mainnet ? Lists.newArrayList(8332, 8333) : Collections.emptyList())
        .addAll(this.properties.getChain() == Chain.testnet ? Lists.newArrayList(18332, 18333) : Collections.emptyList())
        .addAll(this.properties.getChain() == Chain.regtest ? Lists.newArrayList(18443, 18444) : Collections.emptyList())
        .build();

Also, if rpcport is not specified, we should use the default ports of the specific network (regtest is the default):

mainnet: 8332 (rpc), 8333 (p2p)
testnet: 18332 (rpc), 18333 (p2p)
regtest: 18443 (rpc), 18444 (p2p)

What do you think?

Thanks for the feedback!
Ah, ok, I missed the P2P port.  I did add in defaults in the Properties class for RPC port and Network like this:
private String network = DEFAULT_CHAIN.toString();
private Integer rpcport = REGTEST_DEFAULT_RPC_PORT;
And then those defaults are effectively used in setting the exposed ports for the testcontainer:
List<Integer> exposedPorts = ImmutableList.<Integer>builder() .add(this.properties.getRpcport() .get()) .addAll(this.properties.getExposedPorts()) .build();
I could add a P2P port property to the properties class:
private Integer p2pport;
But I think you are also saying you'd like to be able to have logic to determine what the default ports are based on Network?  If Regtest (default), then 18443 and 18444.  If mainnet, then 8332 and 8333, etc.  Is that right?  If so, I can certainly do that.
Also, I'm assuming in the case RPC port is provided, but P2P port is blank, I should use the default P2P port for the network.
Then I would probably add a PostConstruct method to check what the Network is and set the ports based on that.  But the default would be Regtest.
And then add those in the exposedPorts List:
List<Integer> exposedPorts = ImmutableList.<Integer>builder() .add(this.properties.getRpcport()  .add(this.properties.getP2pport()) .addAll(this.properties.getExposedPorts()) .build();
What do you think?

Thanks for the feedback! Ah, ok, I missed the P2P port. I did add in defaults in the Properties class for RPC port and Network like this: private String network = DEFAULT_CHAIN.toString();  private Integer rpcport = REGTEST_DEFAULT_RPC_PORT;

I could add a P2P port property to the properties class: private Integer p2pport;

:+1:

But I think you are also saying you'd like to be able to have logic to determine what the default ports are based on Network? If Regtest (default), then 18443 and 18444. If mainnet, then 8332 and 8333, etc. Is that right? If so, I can certainly do that.

Yes.

Also, I'm assuming in the case RPC port is provided, but P2P port is blank, I should use the default P2P port for the network.

That is what I was thinking, yes. What do you think?

Then I would probably add a PostConstruct method to check what the Network is and set the ports based on that. But the default would be Regtest.

Currently, most default values of classes with @ConfigurationProperties have their default values applied via getters.
If you want, take a look at ClnContainerProperties, it does already something similar.
I like that more than PostConstruct as it is simple and not using spring automagic. But there are also downsides - what do you prefer?

And then add those in the exposedPorts List: List<Integer> exposedPorts = ImmutableList.<Integer>builder() .add(this.properties.getRpcport() .add(this.properties.getP2pport()) .addAll(this.properties.getExposedPorts()) .build();
What do you think?

Nice.
If network, rpcport and p2pport all return non-null values only, they don't need to return Optional anymore :muscle:

Update: I am working this, and sorry for the delay!  I'm so close to having it done, but am now having trouble with the unit tests in testcontainer.  When running a test with mainnet or testnet configuration, the container times out:

org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (<IP_ADDRESS> ports: [56180] should be listening

Not sure in this case where port 56180 is coming from, since I am setting 8332 and 8333 for Mainnet. I'm new to Testcontainers, so I might be missing something.  Will keep you posted

Update: I am working this, and sorry for the delay! I'm so close to having it done, but am now having trouble with the unit tests in testcontainer. When running a test with mainnet or testnet configuration, the container times out:

org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (<IP_ADDRESS> ports: [56180] should be listening

Not sure in this case where port 56180 is coming from, since I am setting 8332 and 8333 for Mainnet. I'm new to Testcontainers, so I might be missing something. Will keep you posted

Hey @jump-kick, take your time! No urgency involved.
Can you tell which test (which module) is failing? Some of them (e.g. electrum testcontainers) can be a bit flaky - thinking about externalizing (move to other repo9 or removing them in the future, as I do not think they are used by anyone.
Do not be afraid of pushing your changes - I'd love to review them :raised_hands:

Ha, thanks for your patience!  The failing tests were two new ones I added, 'defaultMainnetValuesTest' and 'defaultTestnetValuesTest' where I set the network to 'mainnet' and 'testnet'.  THEN, I noticed the comment in BitcoindTestcontainerAutoConfiguration that says "NOTE: Currently only really supports creating "regtest" container. Defaults do not play nicely with mainnet/testnet -> "networkactive" is disabled."  That seemed to be my experience, too, so I tried a way to do the unit tests where the testcontainer is not started; although maybe that defeats the purpose of this project, haha.  oh well.  See 'defaultMainnetValuesTest' and 'defaultTestnetValuesTest'.
Now I don't have the testcontainer problem where it times out waiting for a port to open, but there is some weird bug where the 'network' property is not being set, and it keeps returning the default 'regtest'. I'm sure it's something obvious and I will kick myself when I realize the problem = ).

oh yeah, and I like your idea of putting the default logic in the getters, so I went ahead with that.

@jump-kick So nice!
I think I will have time to review it next week. Is it okay to push some changes (e.g. remove logging in property class) or do you favor that I describe them here and you "fix" them yourself? Thank you so much :pray:

Yes, please feel free to push any changes you have! I fixed a thing or two
after pushing this, but still having unit test issues. Hope to push some
changes myself tomorrow, and I can remove that logging if you don't get to
it first.
On Sat, May 4, 2024, 8:09 AM Thebora Kompanioni @.***>
wrote:

@jump-kick https://github.com/jump-kick So nice!
I think I will have time to review it next week. Is it okay to push some
changes (e.g. remove logging in property class) or do you favor that I
describe them here and you "fix" them yourself? Thank you so much 🙏
—
Reply to this email directly, view it on GitHub
https://github.com/theborakompanioni/bitcoin-spring-boot-starter/pull/126#issuecomment-2094141708,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGUKH7OJJMLN2HW4GN5763DZATFWTAVCNFSM6AAAAABGIMEE5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGE2DCNZQHA
.
You are receiving this because you were mentioned.Message ID:
@.***
.com>

Yes, please feel free to push any changes you have!

PR against your branch: https://github.com/jump-kick/bitcoin-spring-boot-starter/pull/1
Merge, if you think these adaptions are appropriate :pray:

@jump-kick What do you think.. should p2pport be renamed to port and network to chain?

Yes, I like that idea!  I was thinking I could implement those changes and
then add them to the branch/PR and make it official.  I could have that
done within a couple of days.
On Tue, May 28, 2024 at 4:24 AM Thebora Kompanioni @.***>
wrote:

@jump-kick https://github.com/jump-kick What do you think.. should
p2pport be renamed to port and network to chain?
—
Reply to this email directly, view it on GitHub
https://github.com/theborakompanioni/bitcoin-spring-boot-starter/pull/126#issuecomment-2134627043,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGUKH7PGVLROBK6OBVM4ZWLZEQ5MVAVCNFSM6AAAAABGIMEE5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZUGYZDOMBUGM
.
You are receiving this because you were mentioned.Message ID:
@.***
.com>

Yes, I like that idea! I was thinking I could implement those changes and then add them to the branch/PR and make it official. I could have that done within a couple of days.

Nice! Take your time - there is no urgency involved. Looking forward to your contribution :orange_heart:

One quick question, @theborakompanioni - can you confirm this is right?
https://github.com/theborakompanioni/bitcoin-spring-boot-starter/blob/3a2c2f77b29111be44e24f0ec26d05d71cb70724/spring-testcontainer/spring-testcontainer-bitcoind-starter/src/main/java/org/tbk/spring/testcontainer/bitcoind/config/BitcoindContainerProperties.java#L73
https://github.com/theborakompanioni/bitcoin-spring-boot-starter/blob/3a2c2f77b29111be44e24f0ec26d05d71cb70724/spring-testcontainer/spring-testcontainer-bitcoind-starter/src/main/java/org/tbk/spring/testcontainer/bitcoind/config/BitcoindContainerProperties.java#L74
"main" vs. "mainnet" and "test" vs. "testnet" for the Enum?

One quick question, @theborakompanioni - can you confirm this is right?
https://github.com/theborakompanioni/bitcoin-spring-boot-starter/blob/3a2c2f77b29111be44e24f0ec26d05d71cb70724/spring-testcontainer/spring-testcontainer-bitcoind-starter/src/main/java/org/tbk/spring/testcontainer/bitcoind/config/BitcoindContainerProperties.java#L73
https://github.com/theborakompanioni/bitcoin-spring-boot-starter/blob/3a2c2f77b29111be44e24f0ec26d05d71cb70724/spring-testcontainer/spring-testcontainer-bitcoind-starter/src/main/java/org/tbk/spring/testcontainer/bitcoind/config/BitcoindContainerProperties.java#L74
"main" vs. "mainnet" and "test" vs. "testnet" for the Enum String property?

Yeah, you are right - consistent would be to make them the same values as Bitcoin Core. However, they are named like they are now through-out other modules as well. I'd say let's keep it like it is and maybe think about a rectification of all properties in a follow-up ticket/PR. Okay for you?
I think this should be merged soon.

Sounds good to me!  Thanks

Sounds good to me! Thanks

Nice. Will merge this now into devel. There are still some failing tests and upon inspection, I will rename chain to network again - as it really is different from the Bitcoin Core values ("main" vs "mainnet", etc.). Fixing this in a follow-up PR!
Thank you so much for your contribution @jump-kick :rocket: :rocket: :rocket:

Daaamn. Did not look at the target branch and merged into master by mistake. Will fix this as soon as I am back on my workstation. :grimacing:

Daaamn. Did not look at the target branch and merged into master by mistake. Will fix this as soon as I am back on my workstation. 😬

Fixed :pray:

d'oh!  Sorry if I put the wrong branch there!  Thanks!!