Generating counterexample behaviors with Interaction seems awkward?

Consider the DieHard example, but this goes for anything: a normal run yields
specification: model check: failure
refuted property: always "isSolved"
  * from: 0x5da6be4b
      #smallJug = 3
      #bigJug = 1
  * to: 0x9ef6be4b
      #smallJug = 0
      #bigJug = 4

This is a perfectly sensible counterexample, but the thing is, I generally don't want the inviolate state; it's the very temporal specification itself, so it's apparent. Instead, I want the behavior resulting in this state so that I can understand how it lead here. The specific use case is CI to record bad traces, but even in normal dev cycles, I'd want this.
So normally I would now run ./Spec.hs -tl and then look through the trace diagram for the ending state, then follow the trace backwards to the root. But why can't this simply be emitted immediately? Am I missing something? I don't think I've seen this functionality anywhere.
Part of it is that the API isn't quite set up for this just yet it seems. modelcheck fundamentally doesn't allow you to access the resulting Tree World trace; its type either gives you a Left Error for a counterexample or Right (Tree World) for a successful trace. So if there is a temporal violation then you can't even get the traces.
So in the above case you'd have to modelcheck, and in the case of an error re-modeltrace and look for the resulting inviolate state in the Tree and track the states leading there with a search. This seems suboptimal, but doable. Alternatively, you could modeltrace from the start and simply look for any inviolate state according to the temporal property, but this seems like a delicate thing the API should handle for you? And it seems like there's probably a reason they're separate APIs, for now.
But ultimately I just want a counterexample behavior. So if I have to modelcheck-then-modeltrace, I suppose that's fine, but this feels like something that should be handled natively. And this will certainly require a big API change between the two I'd think. Honestly, it feels like there should only be one API entry point with an abstract options record we could configure the model checker with to get these results, but this ticket is probably long enough for now and capable of starting a discussion.[^1]
[^1]: I actually think Spectacle being API driven from Haskell is an absolutely massive advantage over something like TLA+ that isn't stressed enough, since it allows a lot of integration flexibility that TLA+ doesn't; for example generating HTML reports from counterexample traces for use in CI is my final goal, and that's just going to be massively easier. Model-based test case generation would be another good example.

Hi @thoughtpolice! Thanks for writing a detailed ticket about what would be more useful for you 🙂 We're pretty busy at the moment so probably won't get around to properly responding to you for a little while.
And yeah, one of the reasons we chose to drive model checking from Haskell was to make integration with Git and CI much nicer. Thanks for affirming our design decisions 🙂
Also, if you do any of the work to generate HTML reports from traces, please contribute it (if you feel so inclined). PRs are welcome!

I made some crude changes to the CLI to enable performing a trace with property checks within the same interaction call in #55, e.g.
$ cabal v2-repl integration-tests
ghci *> :set args --trace --diagram
ghci *> import Specifications.Bitclock
ghci *> check

The model checker will run in check-only mode by default as before. To disable property checking and only trace the specification you can use:
$ cabal v2-repl integration-tests
ghci *> :set args --no-check --trace --diagram
ghci *> import Specifications.Bitclock
ghci *> check

I know this still isn't ideal from the users perspective, but I understand how annoying it was to switch back and fourth between checking and tracing. Leaving this issue open as I think significant improvements can still be made to the CLI to make tracing more user-friendly.

@thoughtpolice oh, and as for this comment:

Alternatively, you could modeltrace from the start and simply look for any inviolate state according to the temporal property, but this seems like a delicate thing the API should handle for you? And it seems like there's probably a reason they're separate APIs, for now.

The motivation for having a separate modeltrace vs modelcheck is that this approach was the most direct path to providing both features. It turned out to be fairly difficult to implement both in features in way that shared the same model checker run without significant changes to the model checker's implementation being needed. Since the current CLI is a very simple tool primarily geared towards debugging issues with the model checker, I didn't feel comfortable making significant changes to the model checker in order to support the CLI. Especially since the model checker's correctness is so sensitive to changes.


Unable to connect PostgreSQL sever

I am getting this error when i try to deploy the sever pod sever
Failed to connect to the database. Retrying in 10 seconds. PostgreSQLSeverity.fatal 28P01: password authentication failed for user "postgres"

Flutter Doctor Results

I had a similiar case where my password is not correct. maybe double check your passwords.yaml credential with your development.yaml passwords for the database

@MrShakila Duplicate #555


"MVP" parser

It is, at this time, possible for me to start on further parts of the compiler/interpreter.
Nothing interesting can be done beyond single assignment form using builtin functions, but that's enough to prove it works. if is a builtin function, after all 🙂
bors: r+

bors: r-
Nightly-only, using 2018 edition now

bors: r+


feat: support configuration via .versionize file in json format

Coverage decreased (-3.1%) to 89.544% when pulling c070caea815e9fc7c1275e93368737484ba39a16 on versionize-configuration into 4308c8a42bb02042a3159f7b507c8fc641fd9cdf on master.


The whole screen repaints on every TextField value change

Steps to reproduce

Run my code sample.
Tap on the TextField.
Start typing something. The debug rainbow will show that the entire screen and all its elements are repainted on every single keyboard tap (but only when TextField is changed).

P.S. RepaintBoundary doesn't help.
https://github.com/flutter/flutter/assets/9081791/56ce8c1f-8b5c-4bf9-80e9-379d9a6662c7
Code sample
Code sample
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

void main() {
  debugInvertOversizedImages = true;
  debugRepaintRainbowEnabled = true;
  debugRepaintTextRainbowEnabled = true;
  runApp(
    const MaterialApp(
      home: Material(child: Home()),
    ),
  );
}

class Home extends StatelessWidget {
  const Home({super.key});

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        const SizedBox(height: 130),
        const RepaintBoundary(child: TextField()),
        const SizedBox(height: 30),
        Container(
          color: Colors.yellowAccent,
          child: const Text('This is a text'),
        )
      ],
    );
  }
}

What target platforms are you seeing this bug on?
iOS
OS/Browser name and version | Device information
iOS Simulator and iPhone 13 Pro on iOS 17.3.1 in debug mode.
Does the problem occur on emulator/simulator as well as on physical devices?
Yes
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel beta, 3.22.0-0.1.pre, on macOS 14.2.1 23C71 darwin-arm64, locale ru)
    • Flutter version 3.22.0-0.1.pre on channel beta at /Users/Xxxxx/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 29babcb32a (2 days ago), 2024-04-03 17:17:04 -0500
    • Engine revision 97550907b7
    • Dart version 3.4.0 (build 3.4.0-282.1.beta)
    • DevTools version 2.34.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/Xxxxx/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (5 available)
    • iPhone Xxxxx (mobile)           • 00008110-000A70163682801E            • ios            • iOS 17.3.1 21D61
    • iPhone 13 Pro (mobile)          • 30C4A575-1621-4739-8469-86004F7CBCA0 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.2.1 23C71 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.2.1 23C71 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 123.0.6312.107

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Even I have noticed the issue with my application.

class Home extends StatelessWidget {

@antontishkov This could be occuring since you are doing this in StatelessWidget.  Stateless will create new instance each time TextField takes input or has focus.
Can you try in StatefulWidget and see if you get same behavior ?

@darshankawar , sure! Here are two different examples with StatefulWidget. Exactly the same behaviour.
StatefulWidget code sample 1
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

void main() {
  debugRepaintRainbowEnabled = true;
  debugRepaintTextRainbowEnabled = true;
  runApp(
    const MaterialApp(
      home: Material(child: Home()),
    ),
}

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        const SizedBox(height: 130),
        const RepaintBoundary(child: TextField()),
        const SizedBox(height: 30),
        Container(
          color: Colors.yellowAccent,
          child: const Text('This is a text'),
        ),
      ],
    );
  }
}

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

void main() {
  debugRepaintRainbowEnabled = true;
  debugRepaintTextRainbowEnabled = true;
  runApp(
    const MaterialApp(
      home: Material(child: Home()),
    ),
}

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        const SizedBox(height: 130),
        const RepaintBoundary(child: StatefulTextWidget()),
        const SizedBox(height: 30),
        Container(
          color: Colors.yellowAccent,
          child: const Text('This is a text'),
        ),
      ],
    );
  }
}

class StatefulTextWidget extends StatefulWidget {
  const StatefulTextWidget({super.key});

  @override
  State<StatefulTextWidget> createState() => _StatefulTextWidgetState();
}

class _StatefulTextWidgetState extends State<StatefulTextWidget> {
  @override
  Widget build(BuildContext context) {
    return const TextField();
  }
}

Thanks for the update. I was able to replicate this on Android as well, so the behavior doesn't seem specific to iOS.
Also saw this on latest stable version as well.

 stable, master flutter doctor -v
[!] Flutter (Channel stable, 3.19.5, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
    • Flutter version 3.19.5 on channel stable 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 300451adae (4 days ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1
    • 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.

[!] Flutter (Channel master, 3.22.0-5.0.pre.55, on macOS 12.2.1 21D62
    darwin-x64, locale en-GB)
    • Flutter version 3.22.0-5.0.pre.55 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 ddf79b755d (6 hours ago), 2024-04-07 18:34:24 -0400
    • Engine revision c10e950c66
    • Dart version 3.5.0 (build 3.5.0-18.0.dev)
    • DevTools version 2.34.1
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/dhs/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13C100
    • CocoaPods version 1.11.2

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

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 65.1.4
    • Dart plugin version 213.7228

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

[✓] Connected device (3 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 15.3.1 19D52
    • macOS (desktop)           • macos                                    •
      darwin-x64     • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)              • chrome                                   •
      web-javascript • Google Chrome 109.0.5414.119

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

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

This is a fairly trivial application, so even through the entire screen is repainting, there really isn't anything there to repaint. If this is causing performance problems on more complicated applications, I'd file a more specific bug.


About default training with test dataset generator

when I use test dataset generator, I think I should return some training data, but how can I use is for train, cause in train.py I found that you use generated data with method "set_mode" which doesn't have definition in test_data.py
here is error report:
(dip) crnn-pytorch-master python3 train.py --test-init True --test-epoch 10 --output-dir ./snap
testdata
Test phase
Traceback (most recent call last):
File "train.py", line 143, in
main()
File "/Users/jing/anaconda3/envs/dip/lib/python3.6/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/Users/jing/anaconda3/envs/dip/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/jing/anaconda3/envs/dip/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/jing/anaconda3/envs/dip/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "train.py", line 83, in main
data.set_mode('test')
TypeError: set_mode() takes 1 positional argument but 2 were given

Error was fixed


Size of m_train and calculation of grad_train parameters

Hi @ziyiyin97 ,
a few questions on the training script especially in line 200, 201 and 202 (and correspondingly 204-206).
I'm a little confused as to how the m_train is a 4D array. Also, the calculation of grad_train and keep_offset_idx is not very obvious. I currently have the Model, Model0 and the sscig rtm (offset, x, z) saved and wanted to know how this maps to the variables you've loaded. If you could help clarify this that'll be great!

m_train is in size of nx*nz*1*batchsize. We followed the ML literature in our configuration so the third dimension is the so-called "channel" dimension -- e.g., would be in size of 3 for RGB images.
grad_train is in size of nx*nz*nh*batchsize, where nh is number of offsets. So you would permute your sscig rtm so that the offset dimension would be moved to the end.
keep_offset_idx is a manually set up variable to select how many offsets one would use to train the CNFs. For example, if you only keep the index in the middle (for 51 offsets, it's 26:26), then you are only using the RTM (zero-offset). To use the full offsets, you would do 1:51.
Hope this clarifies!

Thanks for your clarifications, @ziyiyin97! I got a couple of follow ups on other parts of the code.

Could you explain this normalization a bit (especially using 300) and the reason behind it?

max_y = quantile(abs.(vec(grad_train[:,:,:,1:300])),0.9999);
grad_train ./= max_y;

Also, what does the Summarizednet of UNet and CNF mean and what is the advantage of such a formulation?

Are there any constrainst on setting L and K? How are they determined?

Velocity models typically have a limited range, say 1.5 to 5, but CIGs might have various ranges. Therefore, a typical trick in the ML literature is to apply a normalization so that the input and output roughly stay in the same range. After this normalization, most values in grad_train will be in the range of -1 to 1. It should be insensitive w.r.t. 300.
The summary network (UNet) is applied to the CIGs, so in the end the CNFs are trying to learn from pairs (velocity models, summary network applied on CIGs). During training, the CNFs and the UNet are jointly trained. Many literatures indicate that this summary network would improve the quality of inference because it "helps" CNFs to further process the observables (in this case CIGs). Useful references include: https://arxiv.org/abs/2003.06281 (see Equation 18). We think this is a technical detail / engineering choice so it is omitted in the WISE paper.
We suggest you set L such that 2^L is divisible by both nx and nz, because a lot of CNFs layers involve partition the current image into 2 * 2 block and rearrange them. For K there is no such constraint. More details can be found here https://github.com/slimgroup/InvertibleNetworks.jl/blob/1a4cba93b1976d868d2f922b7628115a7ebf5e72/src/networks/invertible_network_conditional_glow.jl#L114

Yes I confirm both chan_target and chan_cond are equal to 1 in my case.
To further debug, could you make a minimal failing example with just a single y (CIG) and the unet, and do unet(y)? It seems like the error comes only from the unet evaluation.
Also may I know what package versions you are using? I have a https://github.com/slimgroup/WISE.jl/blob/main/Manifest.toml to keep track of the version of all the packages. If you follow my DrWatson-ized repo and activate the environment correctly, you would use my versions by default.

I get the same error when executing this println(unet(grad_train[:,:,:,1])). I have my own Manifest file here. Looks like the versions for Flux, UNet, and Invertible Networks are the same as your environment though I seem to have an updated version of JUDI.

It needs to be unet(grad_train[:,:,:,1:1]) since the input needs to be a 4D array. Not sure whether this is related to this https://github.com/slimgroup/WISE.jl/issues/2#issuecomment-1984429242 though.

Something weird is happening with the UNet code. Here is the minimal toy code that gives the error
unet_lev = 4
unet = Unet(chan_obs, chan_cond, unet_lev) |> device;
trainmode!(unet, true);

random_array = rand(Float64, 256, 256, 21, 10)
println(unet.conv_blocks)
println(unet(random_array[:,:,:,1:1]))

The result for the first print is an Integer, 1. However, the UNet model.jl file has the line I referenced above op = u.conv_blocks[1:2](x) which throws an index error (rightly so), and I'm trying to figure out how an Integer appears where there should clearly be an array according to the constructor.

@ziyiyin97 I fixed the UNet error. Turns out I was using UNet.jl from https://github.com/DhairyaLGandhi/UNet.jl instead of https://github.com/mloubout/UNet.jl. However I'm still running into an error when running this code:
cond_net = NetworkConditionalGlow(chan_target, chan_cond, n_hidden,  L, K;  split_scales=true, activation=SigmoidLayer(low=low,high=1.0f0)) |> device;
X_train_batch = m_train[:,:,:,1:1] |> device
Y_train_batch = grad_train[:,:,:,1:1] |> device
println(cond_net(X_train_batch, Y_train_batch))

X_train has size (64,64,1,1) and Y_train has size (64,64,11,1).  Any idea what's happening here?

Is there any reason why you dropped the summary network (Unet)? It seems like that line is pointing out that it fails to find a summary network.

I get the same error when running with a summarized network. So I feel it's more of the cond net issue.  Another question I have is  that should chan_cond be equal to the number of offsets in the CIG or can it be an arbitrary number (like 1). I'm still getting the error either way but I want to understand that better. Byond that, I seem to be running out of ideas as to why  this  code is failing


[Feature Request]

Checklist

[X] This feature is merely a UI/UX update.
[X] This feature is not going to conflict with many of the existing options.

Is your feature request related to a problem? Please describe.
No response
Describe the solution you'd like
Would it be possible to add a pure black or amoled theme.
Additional context
No response

That would be awesome if it gets implemented. Many material you themed apps provide this option.


Some fixes for modular inversion

Break long lines in comments and tests and fix some hardcoded bit sizes
Fix the hardcoded Limb size in inv_odd_mod() - was set to 64 (did not cause errors, just made the inversion twice as slow on 32-bit targets)
Added inv_odd_mod_bounded() for cases of argument/modulus known to be small
Removed inv_odd_mod_option() - we do not provide such interface for other constant functions

Additionally:

Introduced a CtChoice ( == Word) type alias for constant-time const fns
Replaced some multiplications by Word::MAX with negations
Normalized constant-time comparisons API in Limb and Uint: removed ct_cmp(), matched const fns with subtle trait methods, matched methods between Limb and Uint
Removed SingedWord and SignedWideWord

Tangentially related: what should we return as is_some in constant functions that can fail - Limb or Word? There are cases of both in the codebase.

Tangentially related: what should we return as is_some in constant functions that can fail - Limb or Word? There are cases of both in the codebase.

It should probably always be Word, as Limb is mainly intended for use inside the inner array of a Uint

Hm, in some places we also return u8 in {0, 1}. Which makes sense if it's converted to Choice, but inconvenient if it has to be chained with const fn analogues of subtle.

Yeah, subtle's use of u8 is a bit odd as I imagine most of the time LLVM is implicitly widening them to word-sized values sitting in a register.
I don't really have a better suggestion for Word -> Choice than casting to an intermediate u8.

I don't really have a better suggestion for Word -> Choice than casting to an intermediate u8.

It's more of a question, whether we should return Word everywhere, or u8 everywhere. Currently both are used in different places.

Word seems like it had the most mechanical sympathy to me

Ok, updated to Word everywhere.

I wonder if it even makes sense to define some type IsSome = Word to make it more distinguishable.

@fjarri sounds like a great idea!

More things that could be done here:

Match the self usage in comparison API between Limb and Uint: Uint uses self and rhs, Limb uses lhs and rhs. The former seems more natural, the latter does not conflict with subtle traits.
Make CtChoice an actual type, with TRUE and FALSE constants, conversion to Choice etc?
Where do I put CtChoice? Currently it lives in limb.rs.
Normalize taking Uint by ref or by value (I think it should be taken by ref everywhere, but there are instances where it's passed by value)

Just in case there's an ambiguity: those things could be done, but not necessarily in this PR since it has already overgrown its initial purpose.


Prprabhu/esbuild todos

Add path maps for monorepo
Add Proxy server to redirect API calls.

SVG assets still aren't loading correctly, but I'm going to ignore that for now.

Hmm... need to figure out a way to not spam everybody as reviewers for these FHL PRs.
Sorry.


AnimatedProps does not exist as an attribute in typescript

I'm using react native 0.69.10, react native svg 13.5.0 and reanimated 2.10.
But when I try to use the animatedProps attribute, it does not exist. Can anyone help?
<AnimatedPath animatedProps={animatedProps} />;
This is the problem statement. I tried the tutorial below
const radius = useSharedValue(50);

  const animatedProps = useAnimatedProps(() => {
    // draw a circle
    const path = `
    M 100, 100
    m -${radius.value}, 0
    a ${radius.value},${radius.value} 0 1,0 ${radius.value * 2},0
    a ${radius.value},${radius.value} 0 1,0 ${-radius.value * 2},0
    `;
    return {
      d: path,
    };
  });

But when I add the line
<AnimatedPath animatedProps={animatedProps} />;
I am seeing this error in typescript
Type '{ animatedProps: Partial<{ d: string; }>; }' is not assignable to type 'IntrinsicAttributes & AnimatedProps<(PathProps | Readonly) & RefAttributes>'.
Property 'animatedProps' does not exist on type 'IntrinsicAttributes & AnimatedProps<(PathProps | Readonly) & RefAttributes>'.ts(2322)
Outside of my Fuctional component I'm actually declaring
const AnimatedCircle = Animated.createAnimatedComponent(Circle);
but this also does not have a an animatedProps attribute.
Please help

Sorry this was my fault! I was using Animated from react-native instead of Animated from react-native-reanimated


Key Error

Please see the last line in the code below.  starts_idx and end_idx are not even used.  Shouldn't the last line be commented out?
   if language is not None:
        low,high = self.categories[s][language]
        try:
            categories = rng.choice(range(low,high),size=(N,),replace=False)
        except ValueError:
            print("this language doesn't have enough characters for that one-shot task")
        indices = rng.randint(0,self.n_examples,size=(N,))
    else:
        categories = rng.choice(range(n_classes),size=(N,),replace=False)
        start_idx, end_idx =self.categories[s][language]  # <--- language is None here and causes an error

Not sure what I was thinking here, but I've fixed it now.


Expand API to get access to dependencies or module

Currently we can only get to the exports of the module resolved, not the actual module itself.
My use case is this:
I have a series of tests cases that test default export of a module, who's classes changes depending on environment variable -- the "classes changing depending on environment variable" was the easiest way I could integrate these two different solutions (temporarily)
In order to do this, I have to unsee the imported modules, so that the next time ember tries to resolve them, they will be reevaluated. One of my problems is that since (to my knowledge) I can't access the dependencies of the file, and addon files are reexported app -> addon, I can't programatically get to the underlying addon file to have it reexported.
// right now I hard code, which is fine since this is temporary
require.unsee('my-addon/serializer/user');
require.unsee('my-app/serializer/user');

// I feel as though I should be able to do something like
const module = resolver.findModule('serializer:user');
// unsee module and it's deps so they are re-evaluated even if the serializer comes from an addon.

Thoughts or ideas?

@stefanpenner thoughts?

Based on a conversation with @krisselden, I believe that we should refactor things to essentially ref-count, so we can also unsee all modules which are no longer in use after unseeing the only module that depended on them.  I believe that this would satisfy the issue you described above?

I think this would work for most cases.
Not sure if it still holds up when inheritance is in the picture:
BaseComponent
ClassA extends BaseComponent
ClassB extends BaseComponent

// my-addon/addon/component/base.js
class Base {}
// my-addon/addon/component/class-a.js
import Base from './base';
// my-addon/addon/component/class-b.js
import Base from './base';

// re-exports
// my-addon/app/component/base.js
export { default } from 'my-addon/base'
// my-addon/app/component/class-a.js
export { default } from 'my-addon/components/class-a'
// my-addon/app/component/class-b.js
export { default } from 'my-addon/components/class-b'

If we didn't have the other classes extending from base, and we unsee my-addon/app/component/base.js then my-addon/addon/components/base would have only been used in one place and should be unseen (given the logic explained above).
However with other classes importing my-addon/addon/components/base, then there would still be other modules that depend on it.

Based on a conversation with @krisselden, I believe that we should refactor things to essentially ref-count, so we can also unsee all modules which are no longer in use after unseeing the only module that depended on them. I believe that this would satisfy the issue you described above?

IMHO this to too much complexity to add


MessageEvent type missing user

Description
Describe your issue here.
What type of issue is this? (place an x in one of the [ ])

[x] bug
[ ] enhancement (feature request)
[ ] question
[ ] documentation related
[ ] example code related
[ ] testing related
[ ] discussion

Requirements (place an x in each of the [ ])

[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report
MessageEvent type mission user
Reproducible in:
package version: 3.1.1
node version: 14.1
OS version(s): MacOS 11.1
Steps to reproduce:

Define an app.message("hello", async ({ message, say }) => { ... listener.
Try to access message.user

Expected result:
The type of message argument should have the user property.
Actual result:
Property 'user' does not exist on type 'MessageEvent'.
Property 'user' does not exist on type 'MessageChangedEvent'.

Full reproduction code:
import { App } from "@slack/bolt";

const app = new App({
  token: process.env.SLACK_BOT_TOKEN,
  signingSecret: process.env.SLACK_SIGNING_SECRET,
});

// Listens to incoming messages that contain "goodbye"
app.message("hello", async ({ message, say }) => {
  // say() sends a message to the channel where the event was triggered
  await say(`hello<EMAIL_ADDRESS>:wave:`);
});

(async () => {
  await app.start(process.env.PORT || 3000);
  console.log("Bolt app is running!");
})();

Workaround
Add assertion like this: (message as GenericMessageEvent).user

Hey @sunakane, thanks for taking the time to report this issue! It seems that you are right. This should be a bug introduced by https://github.com/slackapi/bolt-js/pull/709. The Slack team will fix this issue shortly but, if you are interested in making a pull request for this, we are happy to be reviewers on it 👋

Hey @sunakane, thanks for taking the time to report this issue! It seems that you are right. This should be a bug introduced by https://github.com/slackapi/bolt-js/pull/709. The Slack team will fix this issue shortly but, if you are interested in making a pull request for this, we are happy to be reviewers on it 👋

Fixed by #782 - let me close this issue now.


Fix Cohere Embeddings issue #11820

Description
Cohere Embeddings fix input_type issue
Fixes #11820
Version Bump?

No

Type of Change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

I stared at the code and made sure it makes sense

Suggested Checklist:

I have performed a self-review of my own code
My changes generate no new warnings
I ran make format; make lint to appease the lint gods

@logan-markewich could you please take a look when you have some time?


Return when resolving so that another setTimeout isn't executed.

This prevents the possibility of a reject also being called on the subsequent timeout (noticed on Win8.1/IE11).

Please submit your PR on the development branch and I will merge it.
https://github.com/nraboy/ng2-cordova-oauth/tree/development#contribution-rules
Best,

Done!


Update the component docs for state stores to capture all the metadata fields and have complete examples

You can see an examples here for pub/sub components https://v1-rc3.docs.dapr.io/operations/components/setup-pubsub/supported-pubsub/setup-redis-pubsub/. The same needs to be done for the state store components listed here https://v1-rc3.docs.dapr.io/operations/components/setup-state-store/supported-state-stores/.
This means having a component example and a table describing each of the available fields with descriptions and defaults.

Resolved as complete

Resolved as complete

https://github.com/dapr/docs/issues/1137

https://github.com/dapr/docs/issues/1137


Broken sourcemap

Describe the bug
Vite create broken sourcemap file.
I reproduce this situation on clear vite bolerplate project use the follow command: pnpm create vite my-react-app --template react-ts
Than, I add two files with one hook:

hookBad.ts
hookGood.ts

And call both hook in App.tsx
Then, debug hookBad.ts sourcemap with incorrect line
Then, debug hookGood.ts sourcemap with correct line
The difference is import react as multiline.

Bad sourcemap

Good sourcemap

Reproduction
https://github.com/SenyaMur/vite-reatct-bad-hook
Steps to reproduce
clone repo https://github.com/SenyaMur/vite-reatct-bad-hook
pnpm i
pnpm dev
launch site in browser (for example: Chrome)
open DevTools and refresh site (press F5)
System Info
System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
    Memory: 4.99 GB / 15.42 GB
  Binaries:
    Node: 18.16.1 - C:\Program Files\nodejs\node.EXE
    npm: 8.3.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.7 - ~\AppData\Roaming\npm\pnpm.CMD
  npmPackages:
    @vitejs/plugin-react: ^4.0.4 => 4.0.4
    vite: ^4.4.9 => 4.4.9

Used Package Manager
pnpm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Any news on the issue?

In which version this issue will be?

This will come in the next Vite beta release, which should be 5.0.0-beta.1


feat(datetimepicker): new DateTimePicker component

Closes #854
Summary

Supports presets, relative and absolute times
Presets and relative options are configurable

Change List (commits, features, bugs, etc)

Known item to be addressed after this PR is through: RTL support

Acceptance Test (how to verify the PR)

?path=/story/watson-iot-experimental-datetime-picker--default and sibling stories

@enricoberti this is looking great! I did see one small bug. If you click on your start and end date for custom range. Then click on any date under the selected. It will start to increment the end date by months.

@enricoberti Looking great! A few scenarios to consider checking that will cause problems that Graphite has had to fix for the Dropdown component:

When positioned near the bottom of a page, the editing dialog should expand upwards, rather than below the page fold. Example at bottom of this storybook: https://pages.github.ibm.com/maximo-app-framework/graphite/react/storybook/?path=/story/components-✓-dropdown--dropdown
Plan for issues with z-index. It would be good to demonstrate what this does inside of a dialog, for instance. The editing dialog of this component should overlap the modal buttons and expand outside of a modal, rather than cause an internal scroll: See dropdown 2: https://pages.github.ibm.com/maximo-app-framework/graphite/react/storybook/?path=/story/components-✓-dropdown--datasource-dropdown-on-a-dialog

thanks @davidicus and @JordanWSmith15, valid feedback! fixing the issues now

thank you for the feedback @stuckless ! i pushed a few changes:

a bit more documentation on the returned object
i18n
better cancelation flow
date time mask
ellipsis on overflowing text
filter out non HH:mm characters on the timepickerspinner

Minor RTL issue when picking a custom range

:tada: This PR is included in version 2.70.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


GLIBC bug

I use ubuntu16.04, at before it is OK to build, after I updated GLIBC, this bug happened.
ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/tools/proto_text/BUILD:31:1: Linking of rule '//tensorflow/tools/proto_text:gen_proto_text_functions' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -o bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions ... (remaining 26 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
/usr/bin/ld: bazel-out/host/bin/tensorflow/core/liblib_internal.a(numbers.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.

Can you rebuild from scratch or revert to your previous glibc? Also, if the issue persists, please fill out all of the information in the template provided when you click "New Issue".

Closing via your commit in 09d2363, thanks for the PR!

 Do you know why?
ERROR: /home/s1510032/.cache/bazel/_bazel_s1510032/5dcba7ab6ef0dd7febafd447d7c0db96/external/protobuf/BUILD:331:1: Linking of rule '@protobuf//:protoc' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -o bazel-out/host/bin/external/protobuf/protoc ... (remaining 15 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
/opt/rh/devtoolset-3/root/usr/bin/ld: /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libstdc++_nonshared.a(hashtable_c++0x.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5'
//lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.


Don't show dash when no version description

Why was this change made? 🤔
A version 1 user version may not have a version description. Instead of showing a dash next to empty space, hide the dash. (I know this wasn't ticketed, @amyehodge, but it's been bugging me while we've been working on versions and is easy to fix.)
Before:

After:

If a work version and description created later:

I'll add a test to this to improve coverage.


scheduler(ticdc): split span by region written keys

What problem does this PR solve?

Issue Number: ref #7720
What is changed and how it works?
Support split span by region written keys by evenly distribute write throughput to every TiCDC nodes.
Check List
Tests

Unit test

Questions
Will it cause performance regression or break compatibility?
No.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note
Support split span by region written keys by evenly distribute write throughput to every TiCDC nodes.

/run-all-tests

/run-all-tests

/merge

/run-engine-integration-test
/run-dm-integration-test

/run-all-tests

/run-kafka-integration-test


NetworkTarget - Added SslProtocols option to support for SSL/TLS for TCP

as option to tcp://
e.g.
<target name='target1'
  type='network'
  layout='${message}'
  address='tcp://somesite.com'
  sslProtocols='tls,tls11' />

supersedes #2678

Also looks good. Still needs verification that it actually works :)

superseded by https://github.com/NLog/NLog/pull/2678


LICM: add an optimization to move multiple loads and stores from/to the same memory location out of a loop.

This is a combination of load hoisting and store sinking, e.g.
  preheader:
    br header_block
  header_block:
    %x = load %not_aliased_addr
    // use %x and define %y
    store %y to %not_aliased_addr
    ...
  exit_block:

is transformed to:
  preheader:
    %x = load %not_aliased_addr
    br header_block
  header_block:
    // use %x and define %y
    ...
  exit_block:
    store %y to %not_aliased_addr

This optimization is important to optimize inout arguments, especially with COW support in SIL: it relies on values being in SSA values rather than in memory.

@swift-ci benchmark

@swift-ci test

Build failed
Swift Test Linux Platform
Git Sha - 9ff63b01eb90c6e92b34d4fe15bc755ef9afee5b

Build failed
Swift Test OS X Platform
Git Sha - 9ff63b01eb90c6e92b34d4fe15bc755ef9afee5b

@swift-ci test

@swift-ci test

@swift-ci benchmark

@swift-ci benchmark

Performance: -O

Regression
OLD
NEW
DELTA
RATIO

PrefixAnyCollection
58
76
+31.0%
0.76x

DropFirstAnyCollection
59
76
+28.8%
0.78x

SuffixAnyCollection
22
28
+27.3%
0.79x

DropLastAnyCollection
22
28
+27.3%
0.79x

DropWhileAnyCollection
76
94
+23.7%
0.81x

PrefixWhileAnyCollection
111
129
+16.2%
0.86x

Improvement
OLD
NEW
DELTA
RATIO

ExclusivityGlobal
8
5
-37.5%
1.60x

NSStringConversion.LongUTF8
589
542
-8.0%
1.09x (?)

NSStringConversion.UTF8
835
777
-6.9%
1.07x (?)

Code size: -O
Performance: -Osize

Improvement
OLD
NEW
DELTA
RATIO

ExclusivityGlobal
8
5
-37.5%
1.60x

ArrayAppendOptionals
2020
1300
-35.6%
1.55x (?)

Code size: -Osize

Regression
OLD
NEW
DELTA
RATIO

RandomShuffle.o
3533
3581
+1.4%
0.99x

Performance: -Onone

Regression
OLD
NEW
DELTA
RATIO

ClassArrayGetter2
3940
4260
+8.1%
0.92x

Code size: -swiftlibs

How to read the data
The tables contain differences in performance which are larger than 8% and
differences in code size which are larger than 1%.
If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.
Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

Build failed
Swift Test OS X Platform
Git Sha - 10d96a86768c8cc4f1610c42ea91c7d2e2c5ece3

Build failed
Swift Test Linux Platform
Git Sha - 10d96a86768c8cc4f1610c42ea91c7d2e2c5ece3

@swift-ci test

@swift-ci test


Handle closing of GUI window in simulation script

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
313

Relevant Lines:
328

💛  - Coveralls


MSSQL IDN_ARTIFACT_STORE table does not get created

Environment
Windows 2016 server
MSSQL
IS 5.9.0-m8- snapshot
Suggested Lables
Type/Bug
Priority/High
Steps to Reproduce
Execute the script in below location against MSSQL
wso2is-5.9.0-m8-SNAPSHOT/dbscripts/identity/mssql.sql
The table with the name IDN_ARTIFACT_STORE is not getting created.

In MSSQL script, table creation checks for the existence of SP_AUTH_SCRIPT table. Instead it should be IDN_ARTIFACT_STORE
IF NOT EXISTS(SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_AUTH_SCRIPT]') AND TYPE IN (N'U'))
CREATE TABLE IDN_ARTIFACT_STORE (


Fix Web UI API client's fetch User Details from Auth Server path

Change web API client to fetch user details from auth server using /login/ path with trailing slash.
This should hopefully prevent the redirect being returned without the correct scheme. i.e. redirecting to http when on https.#
Addresses #5

Deployed the release candidate 53 images to https://spectacular-test.specmore.org/ and the user details are now showing 👍


Update OWNERS

/test coverage

/hold not ready to execute on this, open discussion still

/hold cancel

/lgtm


Azure Pipelines Resource Trigger (branch filter) not working as expected.

I have a following YML:
name: "$(Date:yyyyMMdd).$(Rev:r)"
trigger: none
pr: none
resources:
pipelines:
- pipeline: build-pipeline
source: "roc-ui Build Pipeline"
branch: develop
trigger:
branches:
include:
- develop
- release/*
According to the documentation: The above YML/pipeline is supposed to get triggered if the 'roc-ui Build' is completed on develop or release/* branch.
Issue: Pipeline is getting triggered for develop branch correctly. But when I complete a build on release/* branch it still gets triggered on develop branch's last commit. It picks up the correct Build Artifact produced from release/* branch build but the pipeline itself gets triggered from develop branch last commit instead of release/* branch commit. Kindly Help please!!!!
[EDIT]: My repository is on Bitbucket Cloud

@ayush2708 does you release branch have the yml pipeline?

@vishalvatsal yes


added anchor lead slot, added tile title

Linked Issue
Closes #1549
Description

added slot lead to the docs example
centered the icon content of AppRailAnchor.
added title to AppRail and AppRailTile (this could required changeset but I will wait for you to decide)
updated docs to use the title also in AppRailTile
deleted an outdated test that was covering Overrides tag when href is passed which is now replaced by AppRailAnchor.

Checklist
Please read and apply all contribution requirements.

[x] This PR targets the dev branch (NEVER master)
[x] Documentation reflects all relevant changes
[x] Branch is prefixed with: docs/, feat/, chore/, bugfix/
[x] Ensure code linting is current - run pnpm format
[x] All test cases are passing - run pnpm test
[x] Includes a changeset (if relevant; see above)

@Mahmoud-zino this is almost perfect - but you'll need to remove the title attribute on the AppRail (parent) as title's are intended to be unique descriptors. Kind of like an alt tag - but visible. It's the text you see when hovering the element like so:

By setting this on the parent all the Items (children) would inherit the same value - which would be a bad thing

@endigo9740 Yeah this makes sense, I've applied the changes.

I made a super minor tweak to the prop documentation. The word "tooltip" might be confused with our popup feature's use of that term.
That aside, all is well and merged this!


RuntimeError: Failed to generate mesh: The original task is not a valid task

2024-10-03 23:19:37,371 - root - INFO - Starting server
2024-10-03 23:19:37,371 - root - INFO - To see the GUI go to: http://<IP_ADDRESS>:8188
2024-10-03 23:20:06,401 - root - INFO - got prompt
2024-10-03 23:21:10,947 - root - ERROR - !!! Exception during processing !!! Failed to generate mesh: The original task is not a valid task
2024-10-03 23:21:10,948 - root - ERROR - Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in map_node_over_list
process_inputs(input_dict, i)
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Tripo_init.py", line 140, in generate_mesh
raise RuntimeError(f"Failed to generate mesh: {result['message']}")
RuntimeError: Failed to generate mesh: The original task is not a valid task
2024-10-03 23:21:10,949 - root - INFO - Prompt executed in 64.54 seconds
## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

{"last_node_id":26,"last_link_id":28,"nodes":[{"id":21,"type":"TripoAnimateRetargetNode","pos":{"0":2346,"1":1283},"size":{"0":352.79998779296875,"1":78},"flags":{},"order":7,"mode":0,"inputs":[{"name":"original_model_task_id","type":"RIG_TASK_ID","link":22},{"name":"apikey","type":"API_KEY","link":24}],"outputs":[{"name":"MESH","type":"MESH","links":[23],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"TripoAnimateRetargetNode"},"widgets_values":["preset:walk"]},{"id":19,"type":"TripoRefineModel","pos":{"0":1484,"1":1052},"size":{"0":342.5999755859375,"1":46},"flags":{},"order":3,"mode":0,"inputs":[{"name":"model_task_id","type":"MODEL_TASK_ID","link":18,"slot_index":0},{"name":"apikey","type":"API_KEY","link":19}],"outputs":[{"name":"MESH","type":"MESH","links":[26],"slot_index":0,"shape":3},{"name":"MODEL_TASK_ID","type":"MODEL_TASK_ID","links":[20],"slot_index":1,"shape":3}],"properties":{"Node name for S&R":"TripoRefineModel"},"widgets_values":[]},{"id":20,"type":"TripoAnimateRigNode","pos":{"0":1901,"1":1129},"size":{"0":430.8000183105469,"1":46},"flags":{},"order":5,"mode":0,"inputs":[{"name":"original_model_task_id","type":"MODEL_TASK_ID","link":20},{"name":"apikey","type":"API_KEY","link":21}],"outputs":[{"name":"MESH","type":"MESH","links":[27],"slot_index":0,"shape":3},{"name":"RIG_TASK_ID","type":"RIG_TASK_ID","links":[22],"slot_index":1,"shape":3}],"properties":{"Node name for S&R":"TripoAnimateRigNode"},"widgets_values":[]},{"id":22,"type":"TripoGLBViewer","pos":{"0":2925,"1":1296},"size":[600,500],"flags":{},"order":8,"mode":0,"inputs":[{"name":"mesh","type":"MESH","link":23}],"outputs":[],"properties":{"Node name for S&R":"TripoGLBViewer"},"widgets_values":[null]},{"id":25,"type":"TripoGLBViewer","pos":{"0":2865,"1":670},"size":[600,500],"flags":{},"order":6,"mode":0,"inputs":[{"name":"mesh","type":"MESH","link":27}],"outputs":[],"properties":{"Node name for S&R":"TripoGLBViewer"},"widgets_values":[null]},{"id":24,"type":"TripoGLBViewer","pos":{"0":2128,"1":492},"size":[600,500],"flags":{},"order":4,"mode":0,"inputs":[{"name":"mesh","type":"MESH","link":26}],"outputs":[],"properties":{"Node name for S&R":"TripoGLBViewer"},"widgets_values":[null]},{"id":26,"type":"TripoGLBViewer","pos":{"0":1457,"1":397},"size":[600,500],"flags":{},"order":2,"mode":0,"inputs":[{"name":"mesh","type":"MESH","link":28}],"outputs":[],"properties":{"Node name for S&R":"TripoGLBViewer"},"widgets_values":[null]},{"id":7,"type":"LoadImage","pos":{"0":785,"1":988},"size":{"0":313.6480407714844,"1":434.7273254394531},"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[13],"slot_index":0,"shape":3},{"name":"MASK","type":"MASK","links":null,"shape":3}],"properties":{"Node name for S&R":"LoadImage"},"widgets_values":["q23433a.jpg","image"]},{"id":14,"type":"TripoAPIDraft","pos":{"0":1170,"1":1062},"size":{"0":264,"1":311},"flags":{},"order":1,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":13,"slot_index":0},{"name":"image_lr","type":"IMAGE","link":null},{"name":"image_back","type":"IMAGE","link":null}],"outputs":[{"name":"MESH","type":"MESH","links":[28],"slot_index":0,"shape":3},{"name":"MODEL_TASK_ID","type":"MODEL_TASK_ID","links":[18],"shape":3},{"name":"API_KEY","type":"API_KEY","links":[19,21,24],"slot_index":2,"shape":3}],"properties":{"Node name for S&R":"TripoAPIDraft"},"widgets_values":["image_to_model","APIKEY_NUMBER_REPLACED","","RIGHT",false,"v2.0-20240919",0,0,0]}],"links":[[13,7,0,14,0,"IMAGE"],[18,14,1,19,0,"MODEL_TASK_ID"],[19,14,2,19,1,"API_KEY"],[20,19,1,20,0,"MODEL_TASK_ID"],[21,14,2,20,1,"API_KEY"],[22,20,1,21,0,"RIG_TASK_ID"],[23,21,0,22,0,"MESH"],[24,14,2,21,1,"API_KEY"],[26,19,0,24,0,"MESH"],[27,20,0,25,0,"MESH"],[28,14,0,26,0,"MESH"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.6830134553650706,"offset":[-813.455119999998,-333.8830400000004]}},"version":0.4}

## Additional Context
Trying to use model version v2.0-20240919

Also receiving this error.

I think you refined a model generated by model_version 2.0, which is not supported.


test: allow nagging from eviction task

Should had been caught in the review.

Reproduces 100% with time.sleep(10) after creating the tenant, but can also happen on CI: https://neon-github-public-dev.s3.amazonaws.com/reports/pr-4071/debug/4798442479/index.html#suites/4c54991a1bdef2d920f741ae5ea7d1a1/1da88b6c87ec335c/.


[21.11] Backport phoronix-test-suite to fix CVE

Motivation for this change
Fixes #155342
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 155812 run on x86_64-linux 1

1 package built:

phoronix-test-suite


calling caputres_iter in an async function may cause memory leak

What version of regex are you using?
Latest 1.10.5
Describe the bug at a high level.
Calling the static regular instance's caputres_iter in an async function may cause memory leak.
What are the steps to reproduce the behavior?
// complete code: https://github.com/ziyoung/memory-leak-example/blob/master/src/main.rs

static REG: Lazy<Regex> = Lazy::new(|| Regex::new(r#"(Object\.\w+)"#).unwrap());

async fn memory_leak_demo() -> Vec<u8> {
    let text = reqwest::get("https://cdnjs.cloudflare.com/ajax/libs/vue/3.4.34/vue.cjs.js")
        .await
        .unwrap()
        .text()
        .await
        .unwrap();
    let mut buf = Vec::from(text.as_bytes());
    for (i, caps) in REG.captures_iter(&text).enumerate() {
        println!("process text: {}", i + 1);
        tokio::time::sleep(Duration::from_millis(50)).await;
        let m = caps.get(0).unwrap();
        let start = m.start();
        let end = m.end();
        let text = &text[start..end];
        buf.extend(text.as_bytes());
    }
    buf
}

async fn task() {
    for _ in 0..50 {
        let buf = memory_leak_demo().await;
        let s = String::from_utf8(buf).unwrap_or_default();
        println!("string length: {}", s.len());
    }
}

#[tokio::main]
async fn main() {
    tokio::spawn(async {
        for i in 0..5 {
            task().await;
        }
    })
    .await
    .unwrap();
    println!("done");
}

What is the actual behavior?
The memory allocated during the execution of the captures_iter method was not released. I dump the memory profile file during the program running. https://github.com/ziyoung/memory-leak-example?tab=readme-ov-file#regex-memory-issue

If I change my code like follwings, there's no memory leak. https://github.com/ziyoung/memory-leak-example/pull/1/files#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fc
+ fn get_tag_positions(src: &str) -> Vec<(usize, usize)> {
+     REG
+         .clone()
+         .captures_iter(src)
+         .map(|caps| {
+             let m = caps.get(0).unwrap();
+             (m.start(), m.end())
+         })
+         .collect::<Vec<_>>()
+ }
// ...
- for (i, caps) in REG.captures_iter(&text).enumerate() {
+ for (i, (start, end)) in get_tag_positions(&text).into_iter().enumerate() {

What is the expected behavior?
There's no memory leak.

The memory allocated during the execution of the captures_iter method was not released.

This doesn't imply a leak. When you run a regex, it has to allocate space to run the search. This space is tied to the Regex and it's cached in a thread safe manner. The amount of memory allocated scales proportionally to the maximum number of simultaneous requests. Not all memory allocated is kept, but some is.
When you clone the Regex, you're creating a new pool of memory that gets dropped at the end of the function.
The expectation that all memory allocated during a search gets released is just wrong. A memory leak is something that happens when memory used grows without bound given an otherwise fixed set of resources.

Thanks. Cloning the original regex object does indeed avoid the growth of memory usage.
-    for (i, caps) in REG.captures_iter(&text).enumerate() {
+    for (i, caps) in REG.clone().captures_iter(&text).enumerate() {

// Total: 1.3M
for (i, caps) in REG.clone().captures_iter(&text).enumerate() { // <--- 0.8M
  // ...
}

According to the regex documentation, we should indeed avoid using regex across threads. So this is not a bug. Close this issue.

Using a regex across threads is fine. And cloning a regex for every search is almost certainly wrong and will lead to much much slower searches. Your peak memory usage should generally be the same in either case.

And that section in the regex docs is specifically about contention on shared mutable resources leading to slower searches. Not memory usage.

Using a regex across threads is fine.

If I execute memory_leak_demo more than 200 times, I find that the memory usage keeps growing. Suppose I am writing an API request program. For each request, I need to call the REG.captures_iter method, and the memory usage will keep growing. This is unacceptable.

Times
Total
Regex memory usage

100
18.1M
17.6M

150
31.7M
31.2M

200
41.3M
40.8M

225
51.8M
51.3M

Is there an upper limit to the memory occupied by regex?

After testing, the memory usage will not keep growing when executing the code snippet below (no regex cloning here).
Can we say: if you use regex.captures_iter in an async function, wrap it in a synchronous blocking function？
+ fn get_tag_positions(src: &str) -> Vec<(usize, usize)> {
+     REG
+         .captures_iter(src)
+         .map(|caps| {
+             let m = caps.get(0).unwrap();
+             (m.start(), m.end())
+         })
+         .collect::<Vec<_>>()
+ }
// ...
- for (i, caps) in REG.captures_iter(&text).enumerate() {
+ for (i, (start, end)) in get_tag_positions(&text).into_iter().enumerate() {

I finally had a chance to take a quick peek at this, and your MRE is over-complicated. So I trimmed it down to this:
use std::time::Duration;

use once_cell::sync::Lazy;
use regex::Regex;

static REG: Lazy<Regex> = Lazy::new(|| Regex::new(r#"(Object\.\w+)"#).unwrap());

async fn memory_leak_demo() -> Vec<u8> {
    let text = tokio::fs::read_to_string("vue.cjs.js").await.unwrap();
    let mut buf = Vec::from(text.as_bytes());
    for (i, caps) in REG.captures_iter(&text).enumerate() {
        println!("process text: {}", i + 1);
        tokio::time::sleep(Duration::from_millis(50)).await;
        let m = caps.get(0).unwrap();
        let start = m.start();
        let end = m.end();
        let text = &text[start..end];
        buf.extend(text.as_bytes());
    }
    buf
}

async fn task() {
    for _ in 0..200_000 {
        let buf = memory_leak_demo().await;
        let s = String::from_utf8(buf).unwrap_or_default();
        println!("string length: {}", s.len());
    }
}

#[tokio::main]
async fn main() {
    tokio::spawn(async {
        task().await;
    })
    .await
    .unwrap();
    println!("done");
}

With this Cargo.toml:
[package]
name = "memory-leak-example"
version = "0.1.0"
edition = "2021"

[dependencies]
tokio = { version = "1", features = ["full", "tracing"] }
regex = "1.10.5"
once_cell = "1"
anyhow = "1"

Notice that task now has a loop that runs 200_000 times. I ran this with cargo run -r. I watched RES memory usage in htop and it remains fixed. No increases. That means there are no leaks.
Your measurement process is likely flawed. Diagnosing a memory leak is hard. But the fact that you're seeing differences between async and sync should be a tip-off that perhaps there is something about async that is causing higher peak memory usage for you. For example, if you have a bunch of tasks running simultaneously, perhaps with some paused because of your await points, then running other tasks cannot access or use the memory used by regex in the paused tasks. So those other tasks will have to create their own memory. In some cases, that memory is dropped, and in others it is put back into the pool for reuse. But invariant remains: memory usage scales proportionally with the number of simultaneous of the Regex. So if you have a lot of simultaneous uses, it could look like a leak, but it isn't.
If you want to demonstrate a leak, then please provide a simple program that I can run where the resident memory usage grows without bound while otherwise using fixed resources as reported by a process monitor like htop. The technique of running a memory profile is great for debugging leaks, but they aren't dispositive of leaks themselves.

I watched RES memory usage in htop and it remains fixed. No increases. That means there are no leaks.

I used htop to monitor the memory usage and it showed no significant increase. The memory profile file here misled me.

But invariant remains: memory usage scales proportionally with the number of simultaneous of the Regex.

I wrote the following code to simulate a large number of regular matches in a short period of time. Putting regular matching in a synchronous statement reduces the number of regular simultaneous matches and reduces memory usage. I think the problem that comes up in my project has something to do with this. Of course, this is not a memory leak, it is just a matter of how it is used.
use std::{env, time::Duration};

use once_cell::sync::Lazy;
use regex::Regex;
use tokio::{fs, task::JoinSet};

static REG: Lazy<Regex> = Lazy::new(|| Regex::new(r#"(Object\.\w+)"#).unwrap());

async fn memory_leak_demo() -> Vec<u8> {
    let file = fs::read("./vue.js").await.unwrap();
    let mut buf = file.clone();
    let text = String::from_utf8(file).unwrap();

    if env::var("SYNC_REG_MATCH").is_ok() {
        let positions = REG
            .captures_iter(&text)
            .map(|caps| {
                let m = caps.get(0).unwrap();
                (m.start(), m.end())
            })
            .collect::<Vec<_>>();
        for (start, end) in positions {
            buf.extend(text[start..end].as_bytes());
        }
    } else {
        for caps in REG.captures_iter(&text) {
            tokio::time::sleep(Duration::from_millis(5)).await;
            let m = caps.get(0).unwrap();
            let start = m.start();
            let end = m.end();
            let text = &text[start..end];
            buf.extend(text.as_bytes());
        }
    }
    buf
}

#[tokio::main]
async fn main() {
    {
        tokio::spawn(async {
            for i in 0..20 {
                let mut set = JoinSet::new();
                for _ in 0..10_000 {
                    set.spawn(memory_leak_demo());
                }
                while let Some(_res) = set.join_next().await {}
                println!("task {} done", i);
                tokio::time::sleep(Duration::from_millis(10)).await;
            }
        })
        .await
        .unwrap();
    }
    println!("use CTRL + C to exit");
    tokio::signal::ctrl_c().await.unwrap();
}

./memory-leak-example:
memory usage: about 1099M

SYNC_REG_MATCH=1 ./memory-leak-example:
memory usage: about 72M

Yes, as I said, the likely reason here is that in your "synchronous" version, there are no await points while you're collecting the matches in your regex. So your async task cannot be stopped while you're consuming captures_iter. But in your asynchronous task, you have await points while traversing captures_iter. If a task is stopped during iteration and another starts in its place, then the second task can't use the same memory that the first task was using because it's still being borrowed by captures_iter. Once both tasks complete, the memory is either dropped or put back in the pool.
So I think the lesson here is to be careful of introducing await points while consuming a regex match iterator, because a regex match iterator has memory associated with it that can't be shared with another iterator so long as it's live.

I've been debugging a memory "leak" that I only finally tracked down to this allocation of memory
The application I maintain (the rust port of the matomo device detector) has tens of thousands of regexes and they must be run in a concurrently, but locking every individual regex is not great, and cloning before every match is not great, trying to somehow reinitialize a regex through Lazy periodically might be doable, somehow, maybe, limiting the concurrency per query is really not great, but I'm really not sure what else to do, as the memory gradually creeps up over the span of weeks.

@mindreader It might be worth pursuing a compaction strategy: https://github.com/rust-lang/regex/blob/ab88aa5c6824ebe7c4b4c72fe5191681783b3a68/regex-automata/src/util/pool.rs#L318-L320
Or alternatively, we could be more aggressive about throwing away scratch memory here: https://github.com/rust-lang/regex/blob/ab88aa5c6824ebe7c4b4c72fe5191681783b3a68/regex-automata/src/util/pool.rs#L607-L625
Today, we only throw memory away when there is too much contention on the shared resource. But maybe there should be other cases where we throw it away.
It seems hard to pick a correct heuristic for this. And adding a method to "clear cached memory because it might get too big over time" seems pretty unfortunate.
I'm going to re-open this and think about it a bit more.

Thanks for pointing out the relevant code. I will definitely take a closer
look.
On Wed, Aug 14, 2024, 12:34 PM Andrew Gallant @.***>
wrote:

@mindreader https://github.com/mindreader It might be worth pursuing a
compaction strategy:
https://github.com/rust-lang/regex/blob/ab88aa5c6824ebe7c4b4c72fe5191681783b3a68/regex-automata/src/util/pool.rs#L318-L320
Or alternatively, we could be more aggressive about throwing away scratch
memory here:
https://github.com/rust-lang/regex/blob/ab88aa5c6824ebe7c4b4c72fe5191681783b3a68/regex-automata/src/util/pool.rs#L607-L625
Today, we only throw memory away when there is too much contention on the
shared resource. But maybe there should be other cases where we throw it
away.
It seems hard to pick a correct heuristic for this. And adding a method to
"clear cached memory because it might get too big over time" seems pretty
unfortunate.
I'm going to re-open this and think about it a bit more.
—
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/regex/issues/1214#issuecomment-2289259148,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFGHHZED6FX6MFEQY2Y7HTZROBH7AVCNFSM6AAAAABLQDGN4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBZGI2TSMJUHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Another point to consider is that the memory increase should only occur if you're iterating over matches, and within the handling of each element there are await points. If there aren't any await points, there there isn't any opportunity for the scratch memory to be held by a task and not sent back to the pool.
This happens because memory is retrieved at the start of iteration and not put back until the iterator is dropped. This is done to avoid needing to retrieve this memory for each search. But perhaps this is the wrong trade-off to make when each iteration has an await point.

Everything you say tracks, it shouldn't lose memory at all, but it seems to in my case. But I need to find a truly minimal test case before I can even begin to understand why.
I had no idea how much effort went into this. While I intend to experiment with this, I have little hope that I will discover something you haven't, so feel free to close this, and if I do by miracle find something workable I promise I will respond or open a PR.

Do you have await points in your captures_iter loop?

Aye, understood. Thank you for investigating!

I had some time this weekend to run a lot of tests and now I understand how it all works. It isn't a loss of memory, it is just that over time if your application uses a lot of different threads, you will accrue 8 full cache lines on each regex and they will never go away.
It isn't a matter of lots of concurrency, merely accessing via many threads gradually will eventually fill up the cache, even if each one is accessed one thread at a time. That's why this happens to me over a span of weeks.
The following change was enough to reduce my memory usage in real world scenarios by 50%+ while increasing cpu usage by only 15%, a tradeoff I would happily accept, except for the difficulty of exposing that level of configurability without forking.
`diff --git a/regex-automata/src/util/pool.rs b/regex-automata/src/util/pool.rs
index d90d4ec..be5142e 100644
--- a/regex-automata/src/util/pool.rs
+++ b/regex-automata/src/util/pool.rs
@@ -328,7 +328,7 @@ mod inner {
///
/// See this issue for more context and discussion:
/// https://github.com/rust-lang/regex/issues/934

const MAX_POOL_STACKS: usize = 8;

const MAX_POOL_STACKS: usize = 1;
thread_local!(
/// A thread local used to assign an ID to a thread.
@@ -628,7 +628,7 @@ mod inner {
/// Create a guard that represents the special owned T.
#[inline]
fn guard_owned(&self, caller: usize) -> PoolGuard<'_, T, F> {

       PoolGuard { pool: self, value: Err(caller), discard: false }

       PoolGuard { pool: self, value: Err(caller), discard: true }
   }

`
So we get rid of the owner thread cache because it is basically used once and never again in this scenario. And we remove all but the first cache since it will almost definitely never need more than one at a time, and I'm willing to allocate in the case that we do.
Since memory can only be reclaimed upon use of the regex, that greatly limits the ways in which you could optimize this. I thought of maybe a cache where each cache line was thread independent but it would take some real time to validate this theory and I have a feeling it would definitely hurt some benchmarks.

I had some time this weekend to run a lot of tests and now I understand how it all works. It isn't a loss of memory, it is just that over time if your application uses a lot of different threads, you will accrue 8 full cache lines on each regex and they will never go away.

Ah I see. That's interesting. I do still wonder if number of threads has a role to play here though, since each cache line is a stack of reusable allocations. As long as there isn't any contention, these stacks can continue to grow I think. But I suppose growth is only possible when there is actual concurrency happening.
Some thoughts:

I am generally okay with exposing some kind of knob for this in the public API. For regex, I would prefer not to, of if so, something simplified. For regex-automata, I'm generally more open to exposing more knobs.
I am generally open to the idea of some kind of automatic compaction. I very specifically did not build compaction into the pool because I don't really have a target to optimize for. If someone invested the time to make an MRE of their use of regexes, I wouldn't mind investigating how compaction might help in that case.
While you may know this, it's important to note that this pool isn't just about reusing allocations. That's a part of it, but the bigger part of it is actually avoiding the recalculation of work already done. Specifically, for the lazy DFA, the transition table is populated at search time. So when you reuse that allocation, you avoid needing to re-populate transitions that have already been created.

It is an interesting problem. I will give it a shot if I can get enough spare time. I can't honestly give super good odds of success.


Callback registered with ConnectionStatusHandler is never invoked

ConnectionConfiguration.ConnectionStatusHandler allows you to register a callback that should be invoked on every request. Using 2.0.0-alpha1, however, the registered callback is never invoked. (The equivalent functionality worked fine with 1.7.1.)
The ConnectionStatusHandler method is a nice and simple way to handle logging needs. Is there an alternative method that could/should be used from version 2.0.0?

Thanks for reporting this.  I think this was unintentionally removed during the transport refactoring and should definitely be added back.
I'd also propose that we rename it to something like OnRequestCompleted().

++ to the name change

Thanks for dealing with the issue so quickly! Any thoughts/guesses as to when the next release (whether another alpha, or a beta) is coming?


timeout for tpu check

What does this PR do?
Fixes #4324
This PR adds a timeout of 10 secs to the process which is used to fetch the type of XLA device. This ensures that the process does not hang indefinitely and does not block the importing of lightning as in the case of #4324.
Before submitting

[x] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
[ ] Did you make sure to update the documentation with your changes?
[x] Did you write any new necessary tests?
[x] Did you verify new and existing tests pass locally with your changes?
[x] If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

[x] Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

@lezwon mind rebasing?


Why is AR.js waitin for domElement.videoWidth before adding video element to DOM?

Describe the bug
Because iOS does not allow getUserMedia in third party apps using the WkWebView (p.e. Cordova) there is a native mock that hooks the navigator.getUserMedia function and provides the camera stream.
Unfortunately the property element.videoWidth is not set.
So my questsion is: why does AR.js wait for the stream inisitialisation inside ARjs.Source.protoype._initSourceWebcam? If I directly show the video element after assigning the stream, is see no side effects. Imho there is no need to wait.
To Reproduce

setup cordova iOS project
install plugin cordova-plugin-iosrtc and register the golbal hooks
copy AR.js project into ww folder
run cordova app

Expected behavior
App should initialize AR.js and show the camera image.
But it waits with an interval for element.videoWidth as trigger for adding video element to the DOM.
Smartphone (please complete the following information):

Device: iPhone 7 & XR
OS: 13.2.2
Browser WkWebView

hi!
Please provide a PR for this, we will look into that, do tests, and if no problems are added but only enhancements, we will merge it

PR is on the way...

@smuddy Do you have a demo repo? I'm working on iosrtc+AR.js too.


Analyzer for IAsyncCollector et al.

Don't let people use the WebJobs way of output binding

Better yet, implement support for them

If an ICollector<T> or IAsyncCollector<T> type is parameter is used with any of the WebJobs attribute decoration, our current WebJobsAttributesNotSupported analyzer will report an error.

Same when using out parameter

But the below one will not report any diagnostic errors.
[Microsoft.Azure.WebJobs.StorageAccount("Con")]
public static class Function2
{
    [Function("Function2")]
    [return: Queue("dest-q")]
    public static string Run([QueueTrigger("input-q")] string data) => "foo";
}

I feel that, with the existing analyzer, more code samples & docs, we should be good here.  We can keep an eye on the reports from users and based on the data we can revisit this item.

Let's use this issue to track an enhancement to the existing analyzer so that it handles the return case.
It would also be good to ensure ICollector and IAsyncCollector cases are handled when using worker extensions.

Using this to track the fix @kshyju has in place with #1092
For the type validation, we'll use #1036 to track that work as it covers a broader set of scenarios.

This work is completed and released with https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.8.0-preview2


Go to Matching Bracket have save active key binding as Pin/Unpin

Description
Noticed that the "Go to Matching Bracket" have the same active key binding as "Pin/Unpin" - both are using Ctrl+Shift+P.
DBeaver Version
Community  <IP_ADDRESS>305071722
Operating System
Windows
Database and driver
No response
Steps to reproduce
Click on HELP -> "Show Active KeyBindings...."
Additional context
No response

Thank you for bug report.

Thabks everyone!
On Fri, May 26, 2023, 3:52 PM Serge Rider @.***> wrote:

Closed #20031 https://github.com/dbeaver/dbeaver/issues/20031 as
completed via #20088 https://github.com/dbeaver/dbeaver/pull/20088.
—
Reply to this email directly, view it on GitHub
https://github.com/dbeaver/dbeaver/issues/20031#event-9347647023, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AFLHD23DCRAKOYV2WYBR3ILXIBOL5ANCNFSM6AAAAAAYJZH7HA
.
You are receiving this because you authored the thread.Message ID:
@.***>


For some reason I can't access my webcam on the Raspberry Pi

After a few problems with the api, which i solved successfully, now i really dont know how to fix this:
If i execute my code without the webcam plugged in everything is working as expected. But with my webcam plugged in i got the following exception:
My code:
import com.github.sarxos.webcam.Webcam;
import com.github.sarxos.webcam.ds.v4l4j.V4l4jDriver;

public class DetectWebcamExample {
	static {
	     Webcam.setDriver(new V4l4jDriver()); // this is important
	}
	public static void main(String[] args) {
		Webcam webcam = Webcam.getDefault();
		if (webcam != null) {
			System.out.println("Webcam: " + webcam.getName());
		} else {
			System.out.println("No webcam detected");
		}
	}
}

The output with webcam:
Exception in thread "main" com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: au.edu.jcu.v4l4j.VideoDevice.doInit(Ljava/lang/String;)J
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124)
	at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:816)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:879)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:856)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:834)
	at DetectWebcamExample.main(DetectWebcamExample.java:14)
Caused by: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: au.edu.jcu.v4l4j.VideoDevice.doInit(Ljava/lang/String;)J
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:116)
	... 5 more
Caused by: java.lang.UnsatisfiedLinkError: au.edu.jcu.v4l4j.VideoDevice.doInit(Ljava/lang/String;)J
	at au.edu.jcu.v4l4j.VideoDevice.doInit(Native Method)
	at au.edu.jcu.v4l4j.VideoDevice.<init>(VideoDevice.java:271)
	at com.github.sarxos.webcam.ds.v4l4j.V4l4jDevice.<init>(V4l4jDevice.java:66)
	at com.github.sarxos.webcam.ds.v4l4j.V4l4jDriver.getDevices(V4l4jDriver.java:55)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.base/java.lang.Thread.run(Thread.java:844)

------------------
(program exited with code: 1)
Press return to continue

The Jars i used:

slf4j-nop-1.6.1
webcam-capture-driver-v4l4j-0.3.10-20140923.154112-11
slf4j-api-1.7.2
v4l4j-0.9.1-r507
webcam-capture-0.3.10

My Hardware:

Logitech C 170 (Im pretty sure its compatible)
Raspberry Pi 3B with Raspbian 9 (stretch)

Thanks for helping
Edit:
Yesterday I tried the webcam of an friend and it was the same problem. I just wanted to be sure.

I am having the same Problem, could you post yur answer when you find it out ?
I am trying to solve this as well

Of course no problem. Could u pls also post it if u find the solution before me?
Sent with GitHawk

Are you also a student at uiniversity duisburg essen?
If yes itr is a wrapper problem. The wrapper we got does not work with webcams ( except for the LegoCams)

@ysz0507 Would you mind trying the ffmpeg driver? It was reported to be working with Raspberry Pi.

Are you also a student at uiniversity duisburg essen?   ...

@Grashalmbeisser no sry i‘m not a student. In the moment i‘m visiting the 11th class. But thx for the advice.

@ysz0507 Would you mind trying the ffmpeg driver? It was reported to be working with Raspberry Pi.

@yuripourre Sry I’ve just read this jet. Yes for sure, but i‘m not really confident because the same thing was written a few times about the V4L4J-Driver. But we will see maybe it will work. 👌🏻 thx for helping

I belive the FFMpeg drive has more chances to work because it doesn't rely on JNI solutions, it may be less performant but since it uses Java Process it requires less configurations.
If you have issues, please, let me know.

I belive the FFMpeg drive has more chances to work because it doesn't rely on JNI solutions, it may be less performant but since it uses Java Process it requires less configurations. ...

@yuripourre
Yes, it really works as i changed it! 😁😁 Thanks a lot! It was really helpful 😄
@Grashalmbeisser does it also work for your project?


Validation optional as part of $generate

Great point. Probably would be good to add an "INFORMATION" validation message that asserts "validation was not performed on this report". I may do that sometime over the next couple weeks...


Where is the documentation for OnThisPlatform() method?

I cannot find a method named OnThisPlatform() in Xamarin.Forms.Label class documentation. Where did this method come from? Which namespace and class this method belongs to?

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

ID: 29831d4e-b931-c6fa-9a7b-ac3d2ff8f67c
Version Independent ID: 9117e985-c3e2-b419-5ae4-da008050130f
Content: Platform-Specifics - Xamarin
Content Source: docs/xamarin-forms/platform/platform-specifics/index.md
Product: xamarin
Technology: xamarin-forms
GitHub Login: @davidbritch
Microsoft Alias: dabritch

Hi @davidbritch
Look at the sample this doc links to.


ansible_ssh_host variable deprecated in OSA Ocata

Do NOT include any confidential information, this issue will be created on a public repo
This section is completed by the issue reporter
On which version(s) do you encounter this issue?
OSA's current master (to be Ocata). See https://review.openstack.org/#/c/390672/ and https://bugs.launchpad.net/openstack-ansible/+bug/1636606
Please provide the output to 'git describe --all' for  all deployments where you have confirmed it occurs.
What type of issue is this? Please tick the appropriate box.

[x] bug - existing functionality that does not work for you as documented
[ ] feature - new functionality that you would like to see added

What is the expected behavior?
References to ansible_ssh_host in this project will need to be updated to ansible_host instead, due to upstream Ansible deprecations. (http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups, see Note section)
What is actually happening?
What were you attempting to do when you encountered this error (give as much detail as possible)?
How can we reproduce this issue?
How can we verify your issue is addressed?
ansible_ssh_host references removed as of the Ocata release of RPC-O.
If you are using or know of a workaround please describe the necessary steps?
What is your evaluation on the importance of this issue, and why?
Currently minor, but will result in breakage due to MaaS and other roles relying on an to-be-removed variable.

This section is completed during the issue resolution process. If you are reporting an issue, please do not modify the section below.
Which branches are impacted by this issue?
Remove branches that are not impacted.
For each pull request, update the branch line to reference it.

[ ] master
[ ] mitaka-13.0
[ ] liberty-12.2
[ ] kilo

Upgrade impact. Consider the impact on moving between major, minor and patch releases.

[ ] This change does not impact upgrades
[ ] This change addresses a potential upgrade impact
[ ] The upgrade impact is being tracked by another issue.

The issue tracking the upgrade impact is:
Testing impact

[ ] An issue/pull-request has been create or exists to track the testing gap, and is referenced below
[ ] This change includes additional testing
[ ] This change is tested by the existing setup

Additional testing links:
Release note

[ ] This change includes a release note.
[ ] This change does not require a release note.

Doc Impact
Does your change require documentation?

[ ] Yes, and I submitted an issue to Docs issues
[ ] Yes, and I contributed a documentation patch to docs-rpc
[ ] No documentation required for this change

Additional documentation links (please add links if you have ticked yes):

This report is largely meant to serve as a heads up/reminder for when RPC-O reaches the Ocata stage, even though I know that it hasn't yet begun on Newton.

It may be worth doing some preventative work now to cater for both variable names being usable.

While this impacts Ocata, it can realistically be done in Newton/14.0, as Jesse mentioned. OSA has supported both variables at least since Liberty, if not Kilo. A small bit of preventative maintenance to be sure things don't blow up in a way we can prevent.
I'll leave it to @alextricity25 to work out if this will go into the 14.0 work or later.

Hmm, I think we may need to clarify here:
ansible_ssh_host is an Ansible 1.x var which OSA supports up to Newton, and Ansible supports up to 2.1
ansible_host is the replacement which is required from Ansible 2.2 onwards, which for OSA is Ocata
Therefore you can implement transitions in Newton, but it must be done for Ocata because it simply won't work for Ocata.

@odyssey4me I did not mean to imply otherwise; however, OSA has written both of these values out previously, even though Ansible didn't care about both. In the OSA PR, we stopped writing out the ansible_ssh_host one.

@nrb Ah, thanks for clarifying. You were speaking from an inventory standpoint, whereas I was trying to also cover the Ansible standpoint.


Setting up with Google Cloud Functions

I am trying to set this program up with Google Cloud Functions in order to make this work with the Google Assistant and therefore my Google Home Mini.  I tried copying the index.js file to the function and also the .json file to its respective spot, but it says it is unable to deploy.
-Is it because I didn't include the cli.js file?
-Did I miss a part of the code where I was supposed to insert my ip address and live device id?
-Did I do something wrong with the "function to execute" section at the bottom?
Any help would be greatly appreciated!

I'm not sure, but I feel like the documentation is pretty complete... The usual setup would be to install the node module and instantiate the module, but it looks like you might be doing something different.  You also need to make sure that whatever's executing this code has access to your local network.

Never used Google Cloud Functions but the program comes as a module and normally requires npm to be installed as it is. Guessing Google Cloud Functions does not have this so you'll need to modify it to work.
Assuming Google has full node.js support then all you should need is the index file you have and at the bottom add the following,
`var xbox = new Xbox("<IP_ADDRESS>", "FD006CE51AA0E3FD"); // Create new xbox
// Optional, defaults shown
var options = {
tries: 5,
delay: 1000,
waitForCallback: false
};
xbox.powerOn(options);`
Replace obviously with your own Xbox's IP and its LiveID. Remember you'll need to setup port forwarding for this to work since you are connecting into your home network from the internet.


Confirm: versions of OSes

Hi,
I just pushed version 0.5.5 of the podspec.  While I was doing that I noticed that the README says:
It is compatible with OS X 10.6+, iOS 8.0+, tvOS, and watchOS.
Would it make sense to add the versions for tvOS and watchOS as in:
It is compatible with OS X 10.6+, iOS 8.0+, tvOS 9.0+, and watchOS 2.0+.
Just a thought.
Cheers!

Sure! Want to open a pull request? 😄


HSEARCH-2041 Upgrade to WildFly 10.0.0.CR4

https://hibernate.atlassian.net/browse/HSEARCH-2041

Rebased, merged to master and 5.5.


Parallel runs do not have bitwise agreement

At one time, results from runs on different proc counts agreed to machine precision. This no longer seems to be the case.  Look into this!

There is a difference between the asynchronous ghost fill routine and the non-async ghost fill.  With the async ghost fill (the one that is the most well tested), the results compare exactly.  Clear that the logic in these two is different, but not clear where.  This will be a separate issue.


Getting error while create spoke

Error: error updating EC2 Transit Gateway Attachment (tgw-attach-0d42be5b321cc1c72) Route Table () association: error associating EC2 Transit Gateway Route Table () association (tgw-attach-0d42be5b321cc1c72): MissingParameter: Missing required parameter in request: TransitGatewayRouteTableId.

I see the below are disabled in the spokes:
transit_gateway_default_route_table_association = false
transit_gateway_default_route_table_propagation = false
Once i enable the error goes away , what i understand to use with RAM for tgw we need to be enabled for the following flag :
transit_gateway_default_route_table_association
transit_gateway_default_route_table_propagation
Is it bug or there is some design consideration to make the above flag false?

Default route table association and propagation are disabled by design, this is to stop unwanted behaviour and should be followed. Enabling these breaks the solution.
The previous PR dealt with some standardisation of case and descriptions. This could potentially cause issues if the example wasn’t also updated correct.
What params are you using for the spike VPC?
Looks like an issue with the data source looking up the TGW route table Ids.

The data lookup has failed to get the route table ID form reading the error message.
I suspect this is to do the TGW route table name or relating to the env?

I have just done a full clean deploy of a network hub and spoke account. Both deployed successfully with zero issues.
This issue is due to mis configuration or changes you have made to the solution.
Closing issue due to user error or misconfiguration.


No Such Module "ProtocolBuffers"

Version of protoc (protoc --version)
2.6.1
Version of ProtocolBuffers.framework
2.4.3
Description
I am getting "No Such Module ProtocolBuffers" on this line at the top of a Swift file:
import ProtocolBuffers
I am using OSX 10.11.5
The pods are installed, do you know why it can't find the module?

My apologies, I see now that using this package manager prevents one from opening and using the Xcode project directly. Instead, you must use a workspace file. I did not realize and now it builds.


Update section1.tsx

I'm making use of createRef() method to create a reference to the video element, and then using the play() method to start the video when the onCanPlay event is fired. This allows the video to start playing automatically, while also addressing the limitations of the autoplay attribute on Safari.
Also, I added a new method handleEnded that will be called when the video ends, it will reset the currentTime to 0 and call the play method again so the video can loop.

@MantisClone , what do i do if this PR fails to build

Superseded by #137


Merge 1.0.x branch with master

Get latest changes from master for IPK.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.5 out of 6 committers have signed the CLA.:white_check_mark: yasinmiran:white_check_mark: bhagyasakalanka:white_check_mark: ThaminduDilshan:white_check_mark: shanggeeth:white_check_mark: ImalshaG:x: wso2-jenkins-botYou have signed the CLA already but the status is still pending? Let us recheck it.