Multiple IndexRoutes cause IndexLink to be active incorrectly

Given this router setup:
<Router>
  <Route path="/" component={App}>
    <Route path=":blogName" component={Blog}>
      <IndexRoute component={Home} />
      <Route path="posts">
        <IndexRoute component={PostList} />
        <Route path=":postId" component={PostDetail} />
      </Route>
    </Route>
  </Route>
</Router>

And somewhere in <Blog>:
  <IndexLink to={`/${blogName}`}>Home</IndexLink>
  <Link to={`/${blogName}/posts`}>Posts</Link>

I get the following:

location
active links

/myblog
Home

/myblog/posts
Home and Posts

/myblog/posts/5
Posts

The first and third cases are expected, but I expect that in the second case that only Posts would be active. Is this a bug, or is there supposed to be a single IndexRoute in the route hierarchy?

Have you tried using <IndexLink to={/${blogName}/posts}>Posts</IndexLink> instead since it is also an IndexRoute?

If I do that I get the following:

location
active links

/myblog
Home

/myblog/posts
Home and Posts

/myblog/posts/5
none

Which makes sense, since I'm telling react-router to make the Posts link active only when the location is at the index route itself, which in the third case is not true.
I think the problem is that IndexLink makes the link active when the current location is any index route, not a specific one. That's why it's active both at Home and Posts. To make this work may require changing IndexLink to target the specific route specifed in its to attribute.

I managed to work around the issue by flattening my route structure a bit:
<Router>
  <Route path="/" component={App}>
    <Route path=":blogName" component={Blog}>
      <IndexRoute component={Home} />
      <Route path="posts" component={PostList} />
      <Route path="posts/:postId" component={PostDetail} />
    </Route>
  </Route>
</Router>

It worked in my case because <PostList> and <PostDetail> do not have a dedicated parent component under <Blog>. Had there been, e.g., a <PostsHome> as a parent to those two components, I wouldn't be able to flatten it like that. Also I feel that excessive flattening makes things less DRY in terms of defining the application structure/hierarchy.

having a route w/o a component and only a path is kind of unexpected, but I've added a failing test case for an expected route config at #1957


Release 0.8.1

MacOS for Apple Silicon support has been added.
Once a nightly build is verified as working, I'll do a release.

Release was done 5 days ago.


Incompability with gensim 4

Dear all, I found that train_lda_model() fails, probably since gensim.models.lda is not available any more with current gensim: https://github.com/piskvorky/gensim/wiki/Migrating-from-Gensim-3.x-to-4#15-removed-third-party-wrappers
train_nmf_model works fine. Best, Lars.

Thanks for using litstudy and thanks for reporting this issue!
It is a shame that LDA has been removed from gensim. An alternative needs to be found.
A bigger issue is probably that the dependencies listed in setup.cfg do no mention any versions numbers. As a result, litstudy may not be compatible with any future versions of the dependencies. This should be changed to specify a valid range of versions for each dependency.


How to set customized "RTE" root folder in open CMSIS toolbox 2.0.0_dev0

In open CMSIS toolbox 1.7.0, we use the following way to set customized RTE root folder:
solution:
  packs:
  - pack: NXP::MK22F51212_DFP
  - pack: ARM::CMSIS
  target-types:
  - type: iar
    compiler: IAR
  - type: mdk
    compiler: AC6
  - type: armgcc
    compiler: GCC
  output-dirs:
    outdir: "./$TargetType$/$BuildType$"
    rtedir: "./$TargetType$/RTE"
  build-types:
  - type: release
  - type: debug
  projects:
  - project: hello_world.cproject.yml

For each compiler/toolchain, we provide one copy customized RTE for middleware to avoid messing up RTE files with all compilers/toolchains.
In open CMSIS toolbox 2.0.0_dev0, "rtedir" is not supported and I don't find any other ways to specify "RTE" root.
If I remove "rtedir", then "RTE" is generated with cproject.yml, and for our startup component with 3 different start up assemble files for 3 different compilers, only one start up assemble is added which result in build failure:
    <component Cclass="Device" Cgroup="Startup" Csub="" Cversion="1.1.0" condition="device.MK22F51212_startup.condition_id">
      <description>Device MK22F51212_startup</description>
      <files>
        <file condition="allOf.toolchains.f7a7af2513d7e86f1d51b.condition_id" category="sourceAsm" attr="config" name="devices/MK22F51212/iar/startup_MK22F51212.s" version="1.1.0" projectpath="startup"/>
        <file condition="allOf.toolchains.d3c5cd56afaad9c4e3962.condition_id" category="sourceAsm" name="devices/MK22F51212/gcc/startup_MK22F51212.S" projectpath="startup"/>
        <file condition="allOf.toolchains.fa1dc03f3792855ec22d8.condition_id" category="sourceAsm" attr="config" name="devices/MK22F51212/arm/startup_MK22F51212.S" version="1.1.0" projectpath="startup"/>
      </files>
    </component>

So what is the way in open CMSIS toolbox 1.0.0 to set customized "RTE", we don't want to mix all compiler RTE config into one folder.

Looks like we need this feature. We did ask in the meetings before if it is used.
We will come back to you shortly.

Hi @ReinhardKeil , I am ok with first implementation only to cproject.yml. Thank you.


feat(idempotency): ability to specify JMESPath custom functions

Summary
According to the Issue description, customers should be able to send their custom JMESPatch functions instead of built-in ones using the idempotency utility.
Changes

Introduce a new option jmesPathOptions in IdempotencyOptions
Export Functions to use it type the jmesPathOptions
Set the custom functions from config if present
Write unit tests for the new option
Update the docs for the new options but as always need suggestions on this.

Issue number: #2368

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Hey @arnabrahman, thank you for the PR!
Before I get into the review, I wanted to ask if you're still seeing the issue with coverage on the git hooks described here #3134.
I've tried reproducing it on my side and I can't.

Yesterday, when I was pushing the commits, I faced the coverage issue again. After that, for all subsequent commits, I used the skip flag, as far as I remember.
Another thing, I believe my main branch was behind when I encountered this issue. After merging the main branch, I don’t recall if I tried committing without the skip flag. I’ll try again and get back to you @dreamorosi

Nope, the test coverage error is not there anymore.

Thank you @arnabrahman - I'm still going to do a small adjustment to the git hook because right now they're trying to run also e2e tests, which we don't want to.
Next time that it happens, if you can, please try to remove this flag --changed="$(git merge-base HEAD main)" and see if it fixes it. I have a suspect that it might be the reason why it's happening.

I'll review the PR in the next couple hrs tops.


Label 'per page' in another language

There is a chance for different language versions? The per page label is English only

Sure thing, PRs welcome! Or I can take a look in a couple of weeks.

I, too, would appreciate being able to customize the text shown to the user. I'm working on a small webapp for a German non-profit and the English pagination text is sticking out like a sore thumb. Otherwise the component is really nice, I appreciate the work that went into it!

Out on 3.3.0


Ingress component does not work with external-dns to create DNS entries based on Ingress objects

Currently as Ingress Controller implementation, we use Contour, which at the moment does not set the IP value in Ingress resources, which makes it unusable with external-dns component.
Example:
$ kubectl get ingress --all-namespaces
NAMESPACE   NAME      HOSTS                                    ADDRESS   PORTS     AGE
dex         dex       dex.london.lokomotive-k8s.net                 80, 443   23h
gangway     gangway   gangway.london.lokomotive-k8s.net             80, 443   23h

This has been a long standing issue for Contour (projectcontour/contour#403) from 2018.
Workarounds

[ ] use Envoy annotations and configure external-dns to also create entries based on Service objects annotations
[ ] Create alternative implementation for Ingress component using e.g. nginx-ingress and recommend using that if user needs external-dns integration

Actual solution
We could join efforts in https://github.com/projectcontour/contour/pull/2121 and implement this functionality in Contour.

We added a workaround for it in https://github.com/kinvolk/lokomotive/commit/71c19e0bd7ed073a3010e5ffa4f17360dd6a5c45, but it is no longer needed, so it should be removed as stated in #589. Nothing to do here.


Triangular filter

Currently the filter is "block-shaped", e.g.
[-1, 1]
or
[-1, 0.5, 0.5]

It's good default, very easy to understand ("price for the current hour is subtracted from the average price for the next few
hours").
Optionally, a triangular filter might be cool, something like
[-1, 0.67, 0.33]
or
[-1, 0.5, 0.33, 0.17]

Either right triangle (which corresponds to average of _diff_2..._diff_N, doesn't it?), or exponentially decaying, or...
Maybe with this kind of filter we would combine virtues of short and long filters?
(Could also be arbitrary, user-definable?)

Done in https://github.com/jpulakka/nordpool_diff/commit/3880ef3c60633044368b2719272e182ae27a47e0


Error: ffmpeg exited with code: 1

I'm trying to export a capture as WebM, and this error occurs, which renders me unable to export. I'm able to export to MP4 without any issue. I see that issue #474 is closed, which is why I'm creating this new issue report.
I've just seen this on Kap v<IP_ADDRESS>0, and I'm running macOS Mojave (v10.14.5)

Error: ffmpeg exited with code: 1
ffmpeg version N-87313-g73bf0f4-tessus Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-8<IP_ADDRESS>)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi --enable-version3 --disable-ffplay
libavutil      55. 75.100 / 55. 75.100
libavcodec     57.106.101 / 57.106.101
libavformat    57. 82.100 / 57. 82.100
libavdevice    57.  8.101 / 57.  8.101
libavfilter     6.105.100 /  6.105.100
libswscale      4.  7.103 /  4.  7.103
libswresample   2.  8.100 /  2.  8.100
libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:///private/var/folders/4r/34s_3l791gbbxnqd6v8qkx6w0000gn/T/8490d242c07b8c764f8f4bc1766ed0d6.mp4':
Metadata:
major_brand     : qt
minor_version   : 0
compatible_brands: qt
creation_time   : 2019-06-04T08:37:23.000000Z
com.apple.quicktime.make: Apple
com.apple.quicktime.model: MacBookPro15,2
com.apple.quicktime.software: Mac OS X 10.14.5 (18F132)
com.apple.quicktime.creationdate: 2019-06-04T10:37:20+0200
Duration: 00:27:39.13, start: 0.000000, bitrate: 3068 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 2880x1642 [SAR 1:1 DAR 1440:821], 2865 kb/s, 59.99 fps, 60 tbr, 6k tbn, 12k tbc (default)
Metadata:
creation_time   : 2019-06-04T08:37:23.000000Z
handler_name    : Core Media Data Handler
encoder         : H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 129 kb/s (default)
Metadata:
creation_time   : 2019-06-04T08:37:23.000000Z
handler_name    : Core Media Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
Stream #0:1 -> #0:1 (aac (native) -> vorbis (native))
Press [q] to stop, [?] for help
[vorbis @ 0x7fd93b802a00] Current FFmpeg Vorbis encoder only supports 2 channels.
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
at ChildProcess.converter.on.code (/Applications/Kap.app/Contents/Resources/app.asar/dist/scripts/convert.js:83:16)
at emitTwo (events.js:111:20)
at ChildProcess.emit (events.js:194:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Will close this as a duplicate of #474, this should be fixed in newer releases. Is there something blocking your from using the beta?

Thanks! I didn't know there was a beta out. I'll use it. Thanks!
On Sat, Jun 8, 2019 at 2:02 PM Christopher<EMAIL_ADDRESS>wrote:

Will close this as a duplicate of #474
https://github.com/wulkano/kap/issues/474, this should be fixed in newer
releases https://github.com/wulkano/kap/releases. Is there something
blocking your from using the beta?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wulkano/kap/issues/681?email_source=notifications&email_token=ABVX3D5ABIK27YZJK22VDRTPZONUPA5CNFSM4HS3KAD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXHTLBA#issuecomment-500118916,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVX3DZKHYST32WIR2JROQTPZONUPANCNFSM4HS3KADQ
.

--
[image: Niklas Pivic] http://zerp.ly/pivic

Hello,
I still have this issue. I've had it ever since I started using Kap a long time ago. I've never been able to export webm. I've tried the beta, etc. Just tried v3.2.0 and v3.2.2. Same result. Here are the logs... but this is what stands out to me: Current FFmpeg Vorbis encoder only supports 2 channels.
Error: ffmpeg exited with code: 1

ffmpeg version N-92718-g092cb17983-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1<IP_ADDRESS>)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
  libavutil      56. 24.101 / 56. 24.101
  libavcodec     58. 42.102 / 58. 42.102
  libavformat    58. 24.101 / 58. 24.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/private/var/folders/85/5n9lyzsx3m30bpn6zc43jdk00000gn/T/3244f91e7bde6e25d7062799a145a90b.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2020-05-07T22:17:11.000000Z
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: MacBookPro15,2
    com.apple.quicktime.software: Mac OS X 10.14.6 (18G84)
    com.apple.quicktime.creationdate: 2020-05-07T17:17:07-0500
  Duration: 00:00:07.46, start: 0.000000, bitrate: 1330 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1016x672 [SAR 1:1 DAR 127:84], 1081 kb/s, 30 fps, 30 tbr, 6k tbn, 12k tbc (default)
    Metadata:
      creation_time   : 2020-05-07T22:17:11.000000Z
      handler_name    : Core Media Video
      encoder         : H.264
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 124 kb/s (default)
    Metadata:
      creation_time   : 2020-05-07T22:17:11.000000Z
      handler_name    : Core Media Audio
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
  Stream #0:1 -> #0:1 (aac (native) -> vorbis (native))
Press [q] to stop, [?] for help
[vorbis @ 0x7f86b1003c00] Current FFmpeg Vorbis encoder only supports 2 channels.
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

    at ChildProcess.<anonymous> (/Applications/Kap.app/Contents/Resources/app.asar/main/convert.js:85:16)
    at ChildProcess.emit (events.js:215:7)
    at ChildProcess.EventEmitter.emit (domain.js:476:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

I just noticed that 3.2.2 can export webm on my iMac running High Sierra, but cannot export mp4. But on my macbooks (Mojave), they can export mp4, but not webm.
Could this be caused by a lingering config file that sticks around between versions or something? Since ffmpeg seems to be included, I am lost.

More info now. I noticed if I change the output resolution by 1 pixel, mp4 now works. Hmm...

Are you using any plugins? Mainly editing ones

More info now. I noticed if I change the output resolution by 1 pixel, mp4 now works. Hmm...

This just saved me. I finished recording a pretty long video and lowered the resolution pixel by 1 and it worked.

A fix for this has been made. Will be releasing a new version today


Typescript autocomplete broken with latest typescript version (4.4.2)

Bug report
The autocomplete is broken for the styled function with typescript versions ^4.4.2 which is the latest stable version.
To Reproduce

Create a new react app with typescript

npx create-react-app --template typescript

Add stitches to dependencies

npm i @stitches/react

Import stitches with

import { styled } from '@stitches/react'

Try invoking autocomplete for css attributes.

Expected behavior
All css attributes should be shown in autocomplete menu
Screenshots
with TS compiler version 4.4.2

with TS version 4.3.5 (from stitches repo package.json file)

System information

OS: macOS Big Sur 11.4 on M1 Macbook Pro
Version of Stitches: 1.0.0
Version of Node.js: v16.5.0

Additional context

VSCode version: 1.60.0

Hi!
I've just followed your steps and was unable to reproduce:

The only difference is that I'm not on an M1 Mac, on Intel.
Thanks

As you can see on the bottom right of the VSCode window, VSCode is using typescript version 4.3.5 which is working as expected please test with latest stable version 4.4.2 or later.
You can change IDE typescript versions by just clicking on the version number in the status bar of the window.

@dhushyanth-s ah, yep, you're right. Thank you for the heads up!
I am able to replicate this issue now.

I have the same issue as well

Typescript 4.4 added control flow analysis, maybe this change is causing the issue?
https://devblogs.microsoft.com/typescript/announcing-typescript-4-4/#cfa-aliased-conditions.
Also even in Typescript 4.4.2, the autocomplete works when defining utils inside createStitches:

Hope this is useful for the bugfix

Hi! This has been released to Stitches v1.1.0
yarn add @stitches/react@latest
# or
npm install @stitches/react@latest

Wow that was quick!


fix(instance) Handle exported functions that return nothing

“void” in WebAssembly is mapped to nil in Ruby.

bors r+


snabb: 2022.10 -> 2022.12

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/snabbco/snabb/releases.
meta.description for snabb is: "Simple and fast packet networking toolkit"
meta.homepage for snabb is: "https://github.com/SnabbCo/snabbswitch"
meta.changelog for snabb is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2022.12 in filename of file in /nix/store/1cfibjlirj41rv5blm0qfqx6g4hm8mc3-snabb-2022.12

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
snabb

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/1cfibjlirj41rv5blm0qfqx6g4hm8mc3-snabb-2022.12 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A snabb https://github.com/r-ryantm/nixpkgs/archive/c926ca0ae0de876403330e72af12b5379084d4da.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/1cfibjlirj41rv5blm0qfqx6g4hm8mc3-snabb-2022.12
ls -la /nix/store/1cfibjlirj41rv5blm0qfqx6g4hm8mc3-snabb-2022.12/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

snabb

Maintainer pings
cc @lukego for testing.

@ofborg build snabb snabb.passthru.tests


Response error

I try the colab demo. However, there is a reponse error.
Response Error: b')]}\'\n\n38\n[["wrb.fr",null,null,null,null,[9]]]\n56\n[["di",201],["af.httprm",201,"6329365286172527438",0]]\n25\n[["e",4,null,null,131]]\n'.

I have confirmed once again that it is functioning properly. Please check for various possibilities such as network environment, availability of the bard experimental version, normal functioning of the region, and whether a proxy server is being used.
Since you can find more detailed information in issue #1, I will close this issue.
Furthermore, regarding the response error, it may not be due to cookie value errors, but could be an error based on network or other server conditions, even when following the normal procedures.


MacVim pane resize doesn't work in combination with NERDTree and vim-airline

Steps to reproduce
To you have to install NERDTree and vim-airline

Start MacVim with > macvim .

 (on the screenshot you see the right height of vim-airline)

Jump into the file directory pane and open the NERDTree menu with hitting m on the file.

 (the menu spread the vim-airline cmd input line)

Run any command within the NERDTree menu and close the menu
 (the menu spread still exists and is still multiline)

Expected behaviour
The multline spread should go back to a single line (see the orange rectangle)

This behaviour only happens within MacVim not the cli version of vim.
Version of Vim and architecture
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 18 2022 12:52:50) macOS version - arm64 Included patches: 1-900 Compiled by Homebrew
Environment
Operating system: macOS Ventura 13.0.1 (22A400)
Terminal: iTerm 2 Build 3.4.18
Value of $TERM: xterm-256color
Shell: zsh
How MacVim was installed
MacVim has been downloaded from GitHub
Logs and stack traces
No response
Vim configuration where issue is reproducable
https://github.com/greenchapter/dotfiles/blob/main/vim/.vimrc
Issue has been tested with given configuration

[X] by running MacVim.app from GUI macOS interface
[ ] by running vim/gvim/etc installed by MacVim
[X] by running other versions of vim (e.g. /usr/bin/vim)

Issue has been tested with no configuration

[ ] by running mvim --clean (or gvim, supplied by MacVim distribution)
[ ] by running vim --clean (in terminal, supplied by MacVim distribution)
[ ] by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)

Other conditions

[ ] The both Homebrew packages "vim" and "macvim" are installed

Are you sure that's MacVim? Seems like you are running CLI Vim instead as you are using iTerm? The version you listed (9.0.0900) also doesn't match any existing MacVim versioning scheme but matches the latest Vim version from Homebrew: https://formulae.brew.sh/formula/vim.
How are you launching MacVim with the macvim command anyway? The default binary we provided is called mvim. Did you manually remap it to something? I think you are just using Homebrew Vim.

You can tell if it is MacVim or not by looking at the fifth line in the :version output to see if it does or does not have GUI support. GUI support => MacVim. No GUI support => Vim.

@greenchapter Thank you for an issue,
Could you provide a little bit more information about your system and configuration?

How you installed MacVim?
What macvim is? is this an applicaiton provided by Homebrew to start macvim?
Which exact version of MacVim do you use? (release version number or git commit if it's a custom build)
If it's a custom build, please provide configure arguments used to build the application?
Which macOS version and on which architecture do you use?

Could you also please test with terminal vim provided by MacVim? the binary is located in installation directory as MacVim.app?  @ychin please, guide, where this app is located?
PS: @greenchapter please, also check out the issue https://github.com/preservim/nerdtree/issues/1321 which looks like describe a similar problem as you did but in Ubuntu. Please, tell us if quick fixes provided there are fixing your issue?

You can just type which vim in shell and it will tell you. I'm pretty sure @greenchapter is using Homebrew Vim (not MacVim) anyway but just waiting for response.

Hey guys sorry for my late answer, I had a lot of work to do this week. I will provide you some more details, that you don't have to speculate.
I know the which option btw 😉
* ~ » which mvim
/usr/local/bin/mvim

which is softlinked into the applications folder
* local/bin » l | grep mvim
lrwxr-xr-x   1 root  wheel    42B May 31 21:01 mvim@ -> /Applications/MacVim.app/Contents/bin/mvim

I use the downloaded version of MacVim and vim itself is installed via homebrew. I actually I use this MacVim version Custom Version 9.0.472 (174)
I also tried the NERDTree menu in vim itself and the resizing works without no problems in in the Terminal and also in iTerm2. So it looks to me as a dedicated MacVim issue. That all happens on a aarch64 (Apple Silicon) machine.

Actually that line here coming from https://github.com/preservim/nerdtree/issues/1321#issuecomment-1234980190
let g:NERDTreeMinimalMenu=1

works for me

The patch has been proposed in the same issue and I hope it will be fixed soon on the plugin side.

The patch has been proposed in the same issue and I hope it will be fixed soon on the plugin side.

I'm not really sure if it is a problem of NERDTree, because in cli vim it works.

Oh ok that makes more sense. I made that comment before because the Vim version you listed was 9.0.0900 which was the CLI Vim version, not the MacVim version.
Looking through that NERDTree issue, seems like it's a regression in Vim (https://github.com/vim/vim/issues/11286) that was fixed in 9.0.0665. MacVim is currently using Vim 9.0.0472 which still has the bug. The next release would contain this fix from upstream.
For now please just use the workaround.
Closing the issue for now and labeling for the next release. It was a little delayed since I wanted to make sure the smoothscroll fixes get merged upstream before releasing but it should come out by late November hopefully. Feel free to reopen after you update to the latest release  and it still contains the bug.


Multiple IK solutions

Hello, Thanks for such a great library.
I have a problem where I do not know the current joint config and I am required to get multiple Ik solutions of Franka panda given the current end-effector position and orientation.
I looked up the ikfast.py file and there I found  pybullet_inverse_Kinematics function .
if I set max-attempts arg greater than 1 would I will be able to get multiple Ik solutions?
If not can you help  how can I get multiple Ik solutions then for such a problem?
Thanks

Yes, and max_attempts=INF will return an (infinite) generator of solutions.


renamed repo/fixed headings

Fixed links to point to the new repo name and noticed we still had a couple of topics with the old heading style, so fixed that too (I just didn't change the ones in the readme.md files for samples).

Hi @mairaw, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

Open Publishing Build Service: The pull request content has been published and here are some changed files links of this time:

Docset 1 - core-docs
https://review.docs.microsoft.com/en-us/dotnet/core/api/index?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/about/index?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/about/products?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/app-types?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/deploying/applications?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/porting/nuget-packages?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/porting/project-structure?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/testing/unit-testing-with-dotnet-test?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/tools/using-ci-with-cli?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/tutorials/cli-console-app-tutorial-advanced?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/tutorials/index?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/tutorials/libraries-with-vs?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/tutorials/using-on-macos?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/tutorials/using-with-xplat-cli?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/core/versions/servicing?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/csharp-7?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/expression-trees-building?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/generics?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/indexers?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/interactive-with-bash?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/interactive-with-powershell?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/interactive-with-visualstudio?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/interactive?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/getting-started/index?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/getting-started/with-cross-platform-tools?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/getting-started/with-csharp-interactive?branch=pr-en-us-1186
https://review.docs.microsoft.com/en-us/dotnet/articles/csharp/getting-started/with-visual-studio-code?branch=pr-en-us-1186

Status: SucceededWithWarning. Message: Warning occurred: Invalid file link:(~/docs/csharp/getting-started/media/oublish.jpg). Referenced by file: docs/csharp/getting-started/publishing-with-visual-studio.md at line: 26...
Open Publishing Report.

No comments on the review. I checked some of the links on the staging site, and everything seems fine.
:shipit:


How to set the Fiori elements as an standalone app in order to register in launchpad

Hi @IObert ,
I was asking myself how to create the fiori application you taught us but with the capability of being registered in a Fiori Launchpad site (the new service in cf) in a "easy" way (I already know how to add applications in Fiori launchpad site). I don't know if I am wrong but I have read that I can do it creating the app as standalone approuter, but this option is only visible when creating sapui5 free style application, but not in Fiori elements app.
Could you explain or may be guide me with some links where I can find information?.
Thank you in advanced.
Jhon Jairo.

Hi @jhonj98,
I assume you want that your app is automatically exposed in the "content explorer" so you won't have to add it manually in the Launchpad Site Manager, right? As of today, the Fiori Tools (which generated the Fiori Elements project) only support the "standalone approuter" approach but I know that there are working hard to support the "managed by SAP Cloud Platform" approach as well.
You can follow the instructions in summarized in this post to transform your app manually if you need this today.
Does this answer your question?

Thank you @IObert , The only thing is when I create a Fiori elements application there is not a mta file, but when I create a sapui5 free style app I do see this file, I assume that with the instructions of your post the idea is to create that mta file in order to build and deploy to cf, tell me if I'm wrong.
Thanks again.
Jhon Jairo.

You can run npm run deploy to create the mta file (and other resources) :)

Ok I see, thanks for the information, I'm going to try the steps from your post and see what happens, thank you very much.
Jhon Jairo.

I'll close the issue for now. Please reopen if you still face issues


Update BEM docs to include flattened structure

The official BEM docs state that classes do not need to reflect the nested nature of the DOM. We need to update our own BEM docs to include this for other devs, as it can be easily missed. http://getbem.com/faq/#css-nested-elements

Epic, nice work 👍


chore: sync develop with main changes after release

☁ Nx Cloud Report
CI is running/has finished running commands for commit 9b7fefd21f5b8f392a888dd833a2bbc929c552a1.  Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch

✅ Successfully ran 1 target

nx affected --target=test --exclude=workspace --output-style=stream-without-prefixes -- --ci --code-coverage --runInBand

Sent with 💌 from NxCloud.


Refactor and simplify MNIST and CIFAR10 problems

Currently they are too "overcomplicated":

contain hardcoded elements (e.g. resizing to exactly 224 x 224) which had to be removed in order to make those problems
default_values have to be simplified to image dimensions (w,h,c) + number of classes
naming: num_classes, num_channels

Adressed in #53


Small cleanup to the stm32f4 makefile and CI scripts.

Added running the tests with renode behind a flag to disable for CI but keep for direct invocations of test_stm32f4.sh
Do not excluding kernel tests that pass for stm32f4 (these currently do not have optimized implementations and fall-back to the reference kernels)
Explicitly excluded kernel tests that do fail (the cmsis-nn implementation will likely need some fixing).
Removed stale example exclusions

Manually tested that the following command succeeds (and runs all the tests with renode):
tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh

@freddan80 @jenselofsson let me know what you think of this change.
We'll wait for at least one of you to respond before merging.

@advaitjain Looks good


Issue with plots: template: smooth

When building a plot with the smooth template and showing the results in VS-code the "smoothness indicator" shows on top of the plot(s) and cannot be modified. If I open the plots in the browser it works fine!

Yep, I was able to reproduce it on the recent DVC (definitely on the one from the main branch), and the demo project. There was no need to change anything, except:
plots:
    - training_metrics:
        template: smooth

btw, @maxagin that's another a bit more involved example of a plot.

Thank you @shcheklein , btw I was asking in the Notion if we would like to add the smoothing option :)


Add the option for seeding accounts with tokens in global-state-update-gen

This PR extends the functionality of global-state-update-gen by adding the option for defining account balances for new validators.
The old format of the -v parameter for the tool was -v public_key,stake. This is now extended by an optional third field, balance, to -v public_key,stake[,balance]. If balance is present, it will be used as the initial amount of tokens on the newly created validator's account. If the validator already existed, the balance field won't be used, though.
Note that it's also possible to specify stake for non-validator accounts this way by setting the stake to 0. In this case, however, the account balance will get overwritten even if it already existed. This behavior is somewhat inconsistent, but it's the easiest approach for now and I'd prefer addressing its consistency when working on #3111 .
Closes #2991

Note that it's also possible to specify stake for non-validator accounts this way by setting the stake to 0.

Do you mean balance for non-validators?

I have to admit that the logic around handling new validators, their stake and potentially updating their balance is a bit confusing and inconsistent (as you note in the description). Will you add any tests for the new functionality?

bors merge


alttab: window mostly empty when the alpha fixborders patch is used

Using picom and so I need to use the alpha fixborders patch so that some window borders aren't simply invisible.  But then the alt tab window is mostly drawn empty.  Figured out that if I set the background_pixel on the window, things work well:
so the way I fixed it was to add
	wa.background_pixel  = scheme[SchemeNorm][ColBg].pixel;

Right after the declaration of XSetWindowAttributes wa = ... in drawTab, that is:
...
if (first) {
Monitor *m = selmon;
XSetWindowAttributes wa = {
.override_redirect = True,
.background_pixmap = ParentRelative,
.event_mask = ButtonPressMask|ExposureMask
};
wa.background_pixel  = scheme[SchemeNorm][ColBg].pixel;
	selmon->maxWTab = maxWTab;
	selmon->maxHTab = maxHTab;

...

Bad news ... that doesn't work.  The above doesn't do anything, but I've figured out when it breaks, but can't fix it:
First it works.  But if I ever changed the geometry of my setup (change monitors) it stops working


Can I obtain your fine-tuning dataset?

Thanks for your interesting work. Do you provide the fine-tuning dataset?

Thanks for your interest. Our fine-tuning data is also released in the huggingface. You may have a look.

Thanks for your response. But I find that the label column of your dataset is None from huggingface viewer. Is there anything wrong?

The link is: https://huggingface.co/datasets/jiahaonie/MMRel/tree/main/json/Fine-tuning
You may have a try.
If there is still nothing, please contact me.


Show example for get_or_insert_with

I'm having trouble figuring out how to use that method. Can you add an example to the docs?

Hi. Thanks for your feedback. Yes; the document needs some improvements.
I am thinking to add the following examples to moka::future::Cache of Moka v0.5.2. Will they work for you? (I am assuming you are using the future cache, but please let me know if you are using a sync cache)
get_or_insert_with
// Cargo.toml
//
// [dependencies]
// moka = { version = "0.5", features = ["future"] }
// tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }

use moka::future::Cache;
use std::sync::Arc;

#[tokio::main]
async fn main() {
    const TEN_MIB: usize = 10 * 1024 * 1024; // 10MiB
    let cache = Cache::new(1_000);

    // Get the value for key1. The async block should be evaluated because
    // the key1 does not exist yet.
    let value1 = cache
        .get_or_insert_with("key1", async { Arc::new(vec![0u8; TEN_MIB]) })
        .await;
    assert_eq!(value1.len(), TEN_MIB);

    // Get the value for key1. The async block should NOT be evaluated
    // because the key1 already exists. Note that the length of the vec is
    // different to the first call (10MiB vs zero).
    let value2 = cache
        .get_or_insert_with("key1", async { Arc::new(vec![0u8; 0]) })
        .await;

    // The length of the value2 should be equal to the one inserted by the
    // first call.
    assert_eq!(value2.len(), TEN_MIB);
}

get_or_try_insert_with
// Cargo.toml
//
// [dependencies]
// moka = { version = "0.5", features = ["future"] }
// reqwest = "0.11"
// tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
use moka::future::Cache;

/// This async function tries to get HTML from the given URI.
async fn get_html(uri: &str) ->
    Result<String, Box<dyn std::error::Error + Send + Sync + 'static>>
{
    Ok(reqwest::get(uri).await?.text().await?)
}

#[tokio::main]
async fn main() {
    let cache = Cache::new(1_000);

    // Get the value for key1. The async fn should be evaluated because the
    // key does not exist yet. However, the async fn will return an error due
    // to the broken URL.
    let value1 = cache
        .get_or_try_insert_with("key1", get_html("tps://broken-url"))
        .await;

    // An error was returned, and key1 still does not exist.
    assert!(value1.is_err());
    assert!(cache.get(&"key1").is_none());

    // Get the value for key1. The async fn should be evaluated.
    let value2 = cache
        .get_or_try_insert_with("key1", get_html("https://www.rust-lang.org"))
        .await;

    // An OK was returned, and key1 now exists.
    assert!(value2.is_ok());
    assert!(cache.get(&"key1").is_some());
}

Appreciate your quick and very detailed response, I was mistaken about what I thought this method did. This ticket probably isn't the place but I would like to mention: I think a useful feature could be to allow locking a key until it's next written to, or until it's scope ends.
My use case is a function that can run multiple times in circumstances where network conditions are bad, and I wanted to block at get() until the other functions that intend to insert() finish.
I imagine it could look something like this:

my_cache.acquire_lock(&"my_key");

let cached_item: String = match my_cache.get(&"my_key")
    {
        None => {
            ... run some code to lookup some data from a database and then insert it into the moka cache ...

            value_from_database
        }
        Some(v) => v,
    };

my_cache.unlock(&"my_key");

I just think it would be a nice feature to have since this is a frequent pattern for me. I'm not sure if that is something you are interested in adding! Thanks so much for your work on this project.

Ah, OK. You were not mistaken. This method does lock a key and you can use it in your code above.
It uses a RwLock and ensures only one async task can acquire the exclusive writer lock. Other async tasks will wait untile the writer lock is released and then they will acquire multi-reader locks. The async task who has the writer lock will resolves the future, and other async tasks will not. The other async task will be blocked until the value becomes available.
https://github.com/moka-rs/moka/blob/8607db7918ec40306cb522bfcfaa6313cd890483/src/sync/value_initializer.rs#L10
https://github.com/moka-rs/moka/blob/8607db7918ec40306cb522bfcfaa6313cd890483/src/sync/value_initializer.rs#L41-L60
(If the async task has acquired the writer lock, None clause will be executed and it will resolves the init future. Otherwise, Some clause will be executed and it will be blocked until it gets a reader lock)
Caches have unit test cases to verify this behavior, but they will not be suitable for usage examples (They will be too complicated).
https://github.com/moka-rs/moka/blob/8607db7918ec40306cb522bfcfaa6313cd890483/src/future/cache.rs#L943-L947
Let me try to come up with another usage example to demonstrate the locking. I will do it after work. (It is early morning now in my timezone UTC+0800, and I will do it tonight)

This method does lock a key and you can use it in your code above.

So your code
my_cache.acquire_lock(&"my_key");

let cached_item: String = match my_cache.get(&"my_key")
    {
        None => {
            ... lookup some data from a database and then insert it into the moka cache, once .get() returns unlock the mutex ...

            value_from_database
        }
        Some(v) => v,
    };

will be translated into this when you use get_or_insert_with() method:
let cached_item: String = my_cache.get_or_insert_with("my_key",
    // This async block should be evaluated only once.
    // get_or_insert_with() uses an internal mutex (`RwLock`) on "my_key",
    // so you do not need something like `my_cache.acquire_lock(&"my_key")`.
    async {
        // Lookup some data from a database.
        let value_from_database = ...
        // Then return the data. It will be inserted into my_cache.
        value_from_database
        // Once it is inserted, the mutex is unlocked, and other async tasks,
        // which have called `get_or_insert_with()` and blocked, will be unblocked
        // and get the same data.
    }
).await;

Let me try to come up with another usage example to demonstrate the locking.

OK. How about this? Will this answer your question?
// Cargo.toml
//
// [dependencies]
// moka = { version = "0.5", features = ["future"] }
// futures = "0.3"
// once_cell = "1"
// reqwest = "0.11"
// tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
use moka::future::Cache;
use once_cell::sync::Lazy;
use std::sync::atomic::{AtomicU8, Ordering};

// This counter will be incremented by 1 on each time get_html() is called.
// (This counter exists only for a demonstration purpose)
static CALL_COUNTER: Lazy<AtomicU8> = Lazy::new(|| AtomicU8::default());

/// This async function tries to get HTML from the given URI.
async fn get_html(
    task_id: u8,
    uri: &str,
) -> Result<String, Box<dyn std::error::Error + Send + Sync + 'static>> {
    println!("get_html() called by task {}.", task_id);

    // Increment the call counter by 1.
    CALL_COUNTER.fetch_add(1, Ordering::AcqRel);

    // Get the HTML from the Internet.
    Ok(reqwest::get(uri).await?.text().await?)
}

#[tokio::main]
async fn main() {
    let cache = Cache::new(1_000);

    // Spawn eight async tasks. They will try to do the same thing at the same time
    // but get_html() should be called only once.
    let tasks: Vec<_> = (0..8_u8)
        .map(|task_id| {
            // To share the same cache across the async tasks, clone it.
            // This is a cheap operation.
            let my_cache = cache.clone();

            // Spawn an async task.
            tokio::spawn(async move {
                println!("Task {} started.", task_id);

                // Try to get the value for key1. If key1 does not exists, get_html()
                // will be called, and the returned value will be inserted to the cache
                // unless it is an Err(..).
                let value = my_cache
                    .get_or_try_insert_with("key1", get_html(task_id, "https://www.rust-lang.org"))
                    .await;

                // Ensure the value exists now.
                assert!(value.is_ok());
                assert!(my_cache.get(&"key1").is_some());

                println!(
                    "Task {} got the value. (len: {})",
                    task_id,
                    value.unwrap().len()
                );
            })
        })
        .collect();

    // Run all tasks concurrently and wait for them to complete.
    futures::future::join_all(tasks).await;

    // Verify that get_html() was called exactly once.
    assert_eq!(CALL_COUNTER.load(Ordering::Acquire), 1);
}

Here is an output from the above program:

get_html() was called exactly once by task 5.
All other tasks were blocked until task 5 got the value from get_html() and inserted it to the cache.

Task 0 started.
Task 3 started.
Task 4 started.
Task 5 started.
Task 1 started.
Task 2 started.
get_html() called by task 5.
Task 6 started.
Task 7 started.
Task 5 got the value. (len: 19419)
Task 1 got the value. (len: 19419)
Task 7 got the value. (len: 19419)
Task 4 got the value. (len: 19419)
Task 2 got the value. (len: 19419)
Task 6 got the value. (len: 19419)
Task 3 got the value. (len: 19419)
Task 0 got the value. (len: 19419)

This example uses get_or_try_insert_with(), which expects an async block/async fn to return a Result<V, Box<dyn Error + ...>>, where V is the value type. You can replace get_or_try_insert_with() with get_or_insert_with() when async block/async fn always returns a V.

Ah, I see now. That example is beautiful. Thank you!

Yeah, I know these type puzzles will be difficult to solve for anybody until they get used to async and multi-threading programming in Rust.
I see a couple of issues in you code. Added comments inline.
    let mut member_was_cached = true;

    let cached_member: GuildMember = MEMBERS_MEM_CACHE
        .get()
        .unwrap()
        .get_or_insert_with((member.guild_id.0, member.user.id.0), async {
            match query_db_for_member_or_return_current(&member).await {
                Ok(v) => {
                    // We cannot safely write to this variable here because
                    // this async block can be executed by a different thread.
                    // We need to use AtomicBool instead.
                    if !v.1 { member_was_cached = false; };
                    v.0
                }
                // bail!() only do an early return from this async block, so
                // it will return the Err value to its caller get_or_insert_with().
                // We need to use get_or_try_insert_with() instead.
                Err(e) => bail!(e)
            }
        }
        )
        .await;

To solve them, we need to do the followings:

For member_was_cached, use std::sync::atomic::AtomicBool instead of bool.
For bail!(), use get_or_try_insert_with instead of get_or_insert_with.

Here is an example code with the above changes applied:
use std::sync::{
    atomic::{AtomicBool, Ordering},
    Arc,
};

use moka::future::Cache;
use once_cell::sync::Lazy;

#[derive(Clone)]
struct GuildMember {
    guild_id: (u32, String),
    user_id: (u32, String),
}

async fn query_db_for_member_or_return_current(
    _member: &GuildMember,
) -> Result<(GuildMember, bool), anyhow::Error> {
    todo!()
}

async fn get_user(member: GuildMember) -> anyhow::Result<GuildMember> {
    static MEMBERS_MEM_CACHE: Lazy<Cache<(u32, u32), GuildMember>> =
        Lazy::new(|| Cache::new(1024));

    // The async block passed to get_or_try_insert_with() can be executed by a
    // different thread. So we need to protect the bool value from multi-threaded
    // access using an AtomicBool.
    let member_was_cached = Arc::new(AtomicBool::new(true));
    // Create an Arc clone. We will move this into the async block.
    let mwc = Arc::clone(&member_was_cached);

    let cached_member = MEMBERS_MEM_CACHE
        // The return type of our async block is Result<GuildMember, anyhow::Error>, so we
        // need to use get_or_try_insert_with() instead of get_or_insert_with().
        .get_or_try_insert_with((member.guild_id.0, member.user_id.0), async move {
            match query_db_for_member_or_return_current(&member).await {
                Ok(v) => {
                    if !v.1 {
                        mwc.store(false, Ordering::Release)
                    };
                    Ok(v.0)
                }
                Err(e) => {
                    // Convert e (anyhow::Error) into a type that get_or_try_insert_with()
                    // can accept.
                    Err(e.into())
                }
            }
        })
        .await
        // We need to wrap the error with anyhow::Error. Upcoming Moka v0.6 will no longer
        // require this map_err() method.
        .map_err(|e| anyhow::anyhow!(e))?;

    // Read the bool value and do something with it.
    if !member_was_cached.load(Ordering::Acquire) {
        todo!();
    }

    Ok(cached_member)
}

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let member = GuildMember {
        guild_id: (0, "guild0".into()),
        user_id: (1, "user1".into()),
    };
    get_user(member).await?;
    Ok(())
}

Actually, I realized that Moka v0.5.0 and v0.5.1 have a bug in type definitions so they will accept code without the change 1 (AtomicBool). That is wrong; you should not use a plain bool there. I will fix the bug and release Moka v0.5.2 soon.

Your helpfulness is legend! Thank you. Closing this issue now.


Module not found: ant

Trying to build XJC with Java 11. Leads to:
[ERROR] error: module not found: ant

mvn clean install log:
std.txt

Hi @highsource
I can't reproduce a problem on master branch with java version "11.0.2" 2019-01-15 LTS on mac.
Ant and resolver aren't native modules, they are made automate modules by putting jars on module path explicitly.
In your log:
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ jaxb-xjc ---
[INFO] Deleting C:\Projects\jaxb-ri\jaxb-ri\jaxb-ri\xjc\target
[INFO]
[INFO] --- maven-dependency-plugin:3.1.1:copy-dependencies (copy-ant) @ jaxb-xjc ---
[INFO] Copying ant-1.10.2.jar to C:\Projects\jaxb-ri\jaxb-ri\jaxb-ri\xjc\target\lib\ant\ant-1.10.2.jar
[INFO] Copying ant-launcher-1.10.2.jar to C:\Projects\jaxb-ri\jaxb-ri\jaxb-ri\xjc\target\lib\ant\ant-launcher-1.10.2.jar
[INFO]
[INFO] --- maven-dependency-plugin:3.1.1:copy-dependencies (copy-resolver) @ jaxb-xjc ---
[INFO] Copying resolver-20050927.jar to C:\Projects\jaxb-ri\jaxb-ri\jaxb-ri\xjc\target\mods\resolver-20050927.jar

Than for default-compile is set up like:
<compilerArgs>
    <arg>--upgrade-module-path</arg>
    <arg>${project.build.directory}/mods/:${project.build.directory}/lib/ant</arg>
    <arg>--add-modules</arg>
    <arg>ant,resolver</arg>
    <arg>--add-reads</arg>
    <arg>com.sun.tools.xjc=ant</arg>
    <arg>--add-reads</arg>
    <arg>com.sun.istack.tools=ant</arg>
    <arg>--add-reads</arg>
    <arg>com.sun.tools.xjc=resolver</arg>
</compilerArgs>

can you run java --module-path path-to/target/mods/;path-to/target//lib/ant --list-modules?
Can the problem be that Maven doesn't replace path separator for windows?


Coop play issue

error message: "Something went wrong while waiting for other players. "
after doing one coop play game with one character with the bot, when it goes to the next character and finds players (the find player screen auto closes and gives the above error in bot log)

I've tested Coop Missions yesterday and it was working fine. Is that a common error for you?
As far as I can tell, it could be because bot doesn't see WAITING_FOR_OTHER_PLAYERS element in 10 seconds after starting the mission:
https://github.com/tmarenko/mff_auto/blob/f21743da7fb02a41972a4b2bfbdfa41bef07eed0/lib/game/missions/coop.py#L69
What's yours emulator resolution and game's graphic settings?
Also, it will be very convenient if you attach a log with this problem.

No response


Why does it get this page wrong?

wget https://ehoba.hatenablog.com/entry/2020/10/25/190724

sourcepath = 190724

const htmlEncodingSniffer = require("html-encoding-sniffer")
const fs = require("fs");

const htmlBytes = fs.readFileSync(sourcepath);
const sniffedEncoding = htmlEncodingSniffer(htmlBytes);
console.log(sniffedEncoding) // "windows-1252"

The html source is kinda messy, but there is a <meta charset="utf-8"/> in there. Firefox renders the correct utf-8 charset.

Oh, it's exactly because of this:

<meta> elements which declare a character encoding must be located entirely within the first 1024 bytes of the document.


Add timestamps to Documents

Documents should have timestamps so we know when they were created or updated.
We add timestamps and populate them primarily using Edition data, however there
are some cases where a Document has no editions, in which case we use Event
data instead. This is only possible for documents with an en locale, so for
non-en locales we use data from S3.
https://trello.com/c/XloUGpgm/953-store-timestamps-on-documents-(1)

are some cases where a Document has no editions, in which case we use Event
data instead. This is only possible for documents with an en locale, so for
non-en locales we use data from S3.

I'd be interested to know why it's only possible for documents with an en locale, and how Amazon S3 fits in?

are some cases where a Document has no editions, in which case we use Event
data instead. This is only possible for documents with an en locale, so for
non-en locales we use data from S3.
I'd be interested to know why it's only possible for documents with an en locale, and how Amazon S3 fits in?

@kevindew has more knowledge about this than I do

@cbaines When we have a document without any editions we can use the event table to pull out the timestamps. The payload field of these are archived to S3 after 30 (if I remember correctly) days but content_id and timestamps remain in the Event table. So if we have only one locale of the document we can pull the created_at & updated_at just from the last timestamps in Event table. Whereas if we have multiple locales it's trickier.
@emmabeynon Does this take long to run? I'm expecting it fully locks up the Document table while it runs. I imagine with a couple of modifications (conditional on whether table has columns) it could run idempotently and have disable_ddl_transaction! which should improve the locking.

@cbaines When we have a document without any editions we can use the event table to pull out the timestamps. The payload field of these are archived to S3 after 30 (if I remember correctly) days but content_id and timestamps remain in the Event table. So if we have only one locale of the document we can pull the created_at & updated_at just from the last timestamps in Event table. Whereas if we have multiple locales it's trickier.

Ah, ok, that makes sense. Like the variable name, you might want to update the commit message to talk about multiple locales rather than en locales @emmabeynon

@emmabeynon Does this take long to run? I'm expecting it fully locks up the Document table while it runs. I imagine with a couple of modifications (conditional on whether table has columns) it could run idempotently and have disable_ddl_transaction! which should improve the locking.

It took about 1.75 hours locally.  I've added in disable_ddl_transaction!, and will test how long it takes on integration.

@emmabeynon Sure it'll probably take just as long (maybe longer), the difference will be that Publishing API won't get locked while it's running.
You'll need to add an if on line 7 otherwise if this migration fails and you retry it it still won't work.


Investigate contains_human_genetic_sequences error during pipeline processing

On production when Brendan initiates a pipeline run of a dataset the following error is occasionally produced:
[2024-02-14 20:44:05] ERROR in __init__: 'contains_human_genetic_sequences'
Traceback (most recent call last):
  File "/usr/src/app/src/./routes/entity_CRUD/__init__.py", line 515, in call_airflow
    "full_path": ingest_helper.get_dataset_directory_absolute_path(dataset_request, group_uuid, uuid),
  File "/usr/src/app/src/./routes/entity_CRUD/ingest_file_helper.py", line 32, in get_dataset_directory_absolute_path
    if dataset_record['contains_human_genetic_sequences']:
KeyError: 'contains_human_genetic_sequences'

Often I can just reinitialize this without issue but it has been reoccuring.

After adding a log line in production and submitting another dataset I can verify that contains_human_genetic_sequences is present in the request sent to the Ingest API from the portal:
[2024-02-14 21:47:44] INFO in __init__: dataset_request: {
    "assigned_to_group_name": "CODCC",
    "contains_human_genetic_sequences": false,
    "dataset_info": "Curation added empty placeholder microscope_hardware.json file.",
    "dataset_type": "Histology",
    "description": "FFPE, tissue section H&E staining",
    "direct_ancestor_uuids": [
        "23b03073d4385cd3dd15dec5875e3888"
    ],
    "ingest_task": "20240214 CODCC Processing",
    "lab_dataset_id": "JDC_WP_004_c_histology_only_phenocycler",
    "status": "Submitted"
}

Potential solution is to add a check in handleProcessing inside src/pages/edit/dataset.jsx to make a check that contains_human_genetic_sequences exists inside "values"


Switch to go 1.21

Any reason you didn't just go 1.22?
Built a version and works as expected.

This is what im using locally (and should upgrade too) and the latest release was also built on 1.21.
Does not matter much btw, i think i'll just reopen the PR for 1.22 when i fix the linter.

👍 just avoids having to upgrade for longer since 1.22 has recently been released.


Can't load dynamic system when used gsi_tool enable

works now after gsi_tool enable and  reboot device, not reboot by restart DSU button. sorry its my mistake.

😎👍


When will this be available on mobile?

The chrome version running on android doesn't support this.
Is there an eta on when it will be or at least note this in the readme.
The current presentation suggest that it falls on legacy mode due to browser version, but that is not true. The same version on desktop supports the new file api.
Chrome on android simply does not allow this at all. When will we get the simple ability to overwrite a file we saved in a pwa?

Worked fine for me on Brave, with AndroidOS, in legacy mode. What happened when you tried to use it?

In legacy mode you can't save over a file you are using. I am not
interested in legacy mode, I want the new api to work on mobile
On Thu, 15 Apr 2021, 01:05 Anonymous, @.***> wrote:

Worked fine for me on Brave, with AndroidOS, in legacy mode. What happened
when you tried to use it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleChromeLabs/text-editor/issues/35#issuecomment-819926274,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRRWVMI4VMJ77G4ZTM4EDDTIYUTHANCNFSM426KEAFQ
.

Ah, you're referring to the inability to overwrite existing files.
It would be nice to have the new API on mobile, but it's still experimental, I presume that the Chromium developers would put in significantly more effort into making it available on mobile if it is standardized.

For me the only reason to want to use the new file system api is overcoming that inability.
It kind of cripples the UX for progressive web apps on mobile

You mean the inability of selecting the file name or path when you save a text, don't you?
I can use the editor on Chrome but it always saves as "Untitled.txt" in "Downloads" folder.
@abubelinha


v4.1.x Windows Installer copyright 2021

While installing the latest version over Windows I noticed the copyright is "-2021". Should be "-2024".

thanks for reporting this @TonyGravagno . I will fix it in the next release.

it is fixed now with v4.1.5-1 release


rust-bindgen: remove ralith from meta.maintainers [inactivity] [no orphans]

https://github.com/NixOS/nixpkgs/issues/290642
Description of changes

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

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

Looks like you meant to ping someone else.

Last PR by @Ralith seems to be in Dec 2023. They have been fairly inactive on Nixpkgs since then.

Fine with me.


Update commit messages to show what versions added

Unable to tell what the new version includes or fixes
would be helpful to have it added to readme or commit message

Good point. Usally i'm using the CHANGELOG.md file for this. At the moment there's a problem with uploading to unpkg.com. Usually it will be deployed to unpkg.com after publishing the new version but this is not working at the moment :/ it falls always back to version 1.2.4 but the latest ist 1.2.9. I'll try to fix the implementation via CDN. I was trying to trigger a deploy to unpkg and this is why i forced some releases but obviously it didn't help. Sorry for that!


Create command(s)

Refactor the code to, at least have the sync function be an obsidian command.
It may be useful to have command to:

toggle yet_to_be_edited
toggle keep_in_sync
try to sync an open note

At the time being I implemented 5 commands:

Sync
Mark this note as Edited
Mark this note as NOT Edited
Enable Sync for this note
Disable Sync for this note


Dependency on git.exe

I think dev-build.bat has a dependency on git.exe which I don't have installed
I get an error when running that batch file
"C:\Projects\React.NET-master\React.NET-master\b
uild.proj" (default target) (1) ->
(UpdateVersion target) ->
C:\Projects\React.NET-master\React.NET-master
build.proj(50,3): error MSB4018: The "GitVersion" task failed unexpectedly.\r
C:\Projects\React.NET-master\React.NET-master\bu
ild.proj(50,3): error MSB4018: System.Exception: Could not find git.exe.  Looke
d in PATH locations and various common folders inside Program Files.\r
I'm installing Git now, but though you might like to add this to your readme

Even with git installed and in my path, the build still errors because I don't have a local git repo to get the version number from. I ended up just removing the GitVersion msbuild task from the build.proj file

Yes, the build uses Git as the assembly version contains the Git commit hash of the code used to build the library. The build makes some assumptions about the environment, and that's one of them. I'll add it to the readme. Perhaps I should modify build.proj to skip that step if Git is not installed.

Added a note to the readme (https://github.com/reactjs/React.NET/commit/438c8970e28cdd1a17352a4a65841aacb74f3982).

Yes I am ready how to meet


Reserve some Scheme keywords

Resolves #2305

I'm not too familiar with Scheme so there might be a few more keywords that I've missed, but any more problematic words can easily be added to the list in the future.
I also noticed that question marks ? can be added to component names, is this intentional or is that something that should also be fixed as scheme keywords can also contain them.

A few more I found while testing:

YailDictionary
def
JavaStringUtils
foreach
forrange

I think this looks good @conorshipp. If you can add the additional keywords we can go ahead and merge it.

@ewpatton I have added those keywords you suggested.


Respect per-package package.json publishConfig.access

fixes #193
closes #203
is combination of #203 and https://github.com/Andarist/changesets/commit/82c83baf019720cb3289cf460df05a4b6e150056

I think this is good to merge. I'm tempted to merge it despite failing coverage goals, but would be great not to degrade coverage. lmk what you want to do.

I'm afraid I won't be able to work on increasing the coverage in the following days.


[5.2] Update make:auth generated views

Use Blade ‘first’ method instead of ternary condition to render the error class.

From a tweet of Adam Wathan

Since 5.3 is so close to release maybe we should do it there? :smile:

@taylorotwell Created a new PR for 5.3 https://github.com/laravel/framework/pull/14475

Am I the only one to think a simple conditional is much easier to understand?


Update v4-TODO.md

Adding this as a todo. I have already made a bash script for you.
#!/bin/bash

# Check if a directory argument is provided
if [ "$#" -ne 3 ]; then
    echo "Usage: $0 <Path to project> <OriginalComponentName> <StyledComponentName>"
    exit 1
fi

# Assign arguments to variables
DIRECTORY=$1
ORIGINAL_COMPONENT=$2
STYLED_COMPONENT=$3

# Function to replace StyledComponent with OriginalComponent
replace_and_remove_styled() {
    sed -i '' \
        -e "s/$STYLED_COMPONENT/$ORIGINAL_COMPONENT/g" \
        -e "/const $ORIGINAL_COMPONENT = styled($ORIGINAL_COMPONENT);/d" \
        "$1"
    sed -i '' '/import { styled } from ['"'"'"]nativewind['"'"'"];/d' "$1"
}

# Export the function to make it available to find's exec
export -f replace_and_remove_styled

# Find all .jsx and .tsx files and apply the replacement
find "$DIRECTORY"  -maxdepth 1  -type f \( -name "*.jsx" -o -name "*.tsx" \) -exec bash -c 'replace_and_remove_styled "$0"' {} \;
find "$DIRECTORY/src" -maxdepth 5 -type f \( -name "*.jsx" -o -name "*.tsx" \) -exec bash -c 'replace_and_remove_styled "$0"' {} \;

echo "Replacement complete."

I do not understand what this script is going. I need to document why people no longer need styled()

@marklawlor So I've used styled() extensively in my v2 nativewind code.
I needed a way to sustainably remove that function call from all of my files.
This code assumes a directory structure of
/
/src
And looks for styled() in each file.
And since you will have 2 components.
Eg. const StyledView = styled(View)
It removes the above line and all instances of StyledView and replaces it with View
i.e. $StyledComponent and $OriginalComponent