CustomPaint drawing stroked text with transparent body and stroke color

Steps to Reproduce
Tested on Android 11 and iOS 15.5.
I uploaded a simple demo, see repo

Clone and run the demo, press button to change both drawBody = true and drawStroke = true. You will see that text body becomes transparent.
Expected results:
CustomPaint drawing stroked text with body color and stroke color
Actual results:
CustomPaint drawing stroked text with transparent body color and stroke color

Code sample

  void drawText(Canvas canvas, Size size) {
    if (drawStroke) {
      // draw text stroke
      p.color = Colors.black;
      p.style = PaintingStyle.stroke;
      p.strokeWidth = 1;
      drawTextInternal(canvas, size);
    }
    if (drawBody) {
      // draw text body
      p.color = textColor;
      p.style = PaintingStyle.fill;
      drawTextInternal(canvas, size);
    }
  }

  void drawTextInternal(Canvas canvas, Size size) {
    tp.text = TextSpan(
      text: "Test",
      style: TextStyle(
        fontSize: fontSize,
        // fontFamily: fontFamily,
        height: 1,
        foreground: p,
      ),
    );
    tp.layout(
      // minWidth:0,
      minWidth: 200,
      maxWidth: 200,
    );
    tp.paint(canvas, Offset(-100, -100));
  }

Logs

Analyzing flutter_stroke_text_issue...

   info • Prefer const with constant constructors • lib/main.dart:116:13 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/main.dart:119:13 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/main.dart:120:13 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/text.dart:62:22 • prefer_const_constructors

4 issues found. (ran in 2.6s)

[✓] Flutter (Channel stable, 3.3.2, on macOS 12.0.1 21A559 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.3.2 on channel stable at /Users/xumingke/Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e3c29ec00c (8 days ago), 2022-09-14 08:46:55 -0500
    • Engine revision a4ff2c53d8
    • Dart version 2.18.1
    • DevTools version 2.15.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/xumingke/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_HOME = /Users/xumingke/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 2021.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 11.0.12+0-b1504.28-7817840)

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

[!] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost,<IP_ADDRESS>
    • NO_PROXY contains localhost
    • NO_PROXY contains <IP_ADDRESS>
    ! NO_PROXY does not contain ::1

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 4604056C-8E2D-4902-AF02-7DF5CB26151F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64     • macOS 12.0.1 21A559 darwin-x64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 105.0.5195.125

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

! Doctor found issues in 1 category.

Thanks for the report and code sample. Using it, I see same behavior:

 complete runnable code sample

import 'package:flutter/material.dart';
import 'dart:ui' as ui;

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

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

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

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int style = 0;
  bool drawBody = true;
  bool drawStroke = false;

  void _changeStyle() {
    setState(() {
      style += 1;
      if (style > 2) {
        style = 0;
      }
      switch (style) {
        case 0:
          drawBody = true;
          drawStroke = false;
          break;
        case 1:
          drawBody = false;
          drawStroke = true;
          break;
        case 2:
          drawBody = true;
          drawStroke = true;

          break;
        default:
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text("drawBody   = $drawBody\ndrawStroke = $drawStroke"),
            SizedBox(
              height: 8,
            ),
            Text("press refresh button to change style"),
            SizedBox(
              height: 24,
            ),
            Container(
              width: 300,
              height: 300,
              color: Colors.red,
              child: Center(
                child: CustomPaint(
                  willChange: false,
                  painter: PostTextPainter(drawBody: drawBody, drawStroke: drawStroke),
                ),
              ),
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _changeStyle,
        child: const Icon(Icons.refresh_rounded),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

class PostTextPainter extends CustomPainter {
  final Paint p = Paint();
  final Color textColor = Colors.white;
  final double fontSize = 100;
  final TextPainter tp = TextPainter(
    textDirection: TextDirection.ltr,
  );
  final bool drawBody;
  final bool drawStroke;

  PostTextPainter({this.drawBody = true, this.drawStroke = false}) {
    p.strokeCap = StrokeCap.square;
    p.strokeWidth = 1;
  }

  @override
  bool? hitTest(ui.Offset position) {
    // return super.hitTest(position);
    return false;
  }

  @override
  void paint(Canvas canvas, Size size) {
    drawText(canvas, size);
  }

  void drawText(Canvas canvas, Size size) {
    if (drawStroke) {
      // draw text stroke
      p.color = Colors.black;
      p.style = PaintingStyle.stroke;
      p.strokeWidth = 1;
      drawTextInternal(canvas, size);
    }
    if (drawBody) {
      // draw text body
      p.color = textColor;
      p.style = PaintingStyle.fill;
      drawTextInternal(canvas, size);
    }
  }

  void drawTextInternal(Canvas canvas, Size size) {
    tp.text = TextSpan(
      text: "Test",
      style: TextStyle(
        fontSize: fontSize,
        // fontFamily: fontFamily,
        height: 1,
        foreground: p,
      ),
    );
    tp.layout(
      // minWidth:0,
      minWidth: 200,
      maxWidth: 200,
    );
    tp.paint(canvas, Offset(-100, -100));
  }

  @override
  bool shouldRepaint(PostTextPainter oldDelegate) {
    return this != oldDelegate;
  }
}

 stable, master flutter doctor -v

[✓] Flutter (Channel stable, 3.3.2, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
    • Flutter version 3.3.2 on channel stable at
      /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e3c29ec00c (8 days ago), 2022-09-14 08:46:55 -0500
    • Engine revision a4ff2c53d8
    • Dart version 2.18.1
    • DevTools version 2.15.0

[!] 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.4.0-19.0.pre.438, on macOS 12.2.1 21D62
    darwin-x64, locale en-GB)
    • Flutter version 3.4.0-19.0.pre.438 on channel master at
      /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b2ccdb214d (81 minutes ago), 2022-09-21 23:31:23 -0400
    • Engine revision 1d5013e343
    • Dart version 2.19.0 (build 2.19.0-227.0.dev)
    • DevTools version 2.17.0

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

Hello @ArchangelXu - I made several different pull requests to your demo repo with different possible changes that allow it to work correctly.

add second Paint object for the fill operation  :  https://github.com/ming-xi/flutter_stroke_text_issue/pull/1
make a small change to the TextStyle's height when paint is a fill :  https://github.com/ming-xi/flutter_stroke_text_issue/pull/2
make a change to the TextStyle's overflow when paint is a fill vs stroke :  https://github.com/ming-xi/flutter_stroke_text_issue/pull/3

It appears the the tp.paint() call is 'caching' the TextSpan painted operation and re-using it, unless it detects some change to the TextSpan (or in this case the TextStyle).   All three of the variations above make some change which is then detectable and force an TextPainter to actually paint again.
I also played with moving the paint Offset() of the second (fill) paint operation, and you can see that it does indeed paint it again, but if there is only the internal change to the Paint object p then it is just 'replaying' the paint operation from the first tp.paint() call.  You can see this in https://github.com/ming-xi/flutter_stroke_text_issue/pull/4

I wrote the above comment before I realized that you just can simply call tp.markNeedsLayout() before your call to tp.layout(..).
The TextPainter() code is optimized to try and prevent un-needed layout operations.  The change to the paint style from stoke to fill is not 'detected' and does not force a re-layout, so the layout from the previous tp.paint() call is reused.
See https://github.com/ming-xi/flutter_stroke_text_issue/pull/5
There is a comment within text_painter.dart  ->
  // The TextPainter class should not aggressively invalidate the layout as long
  // as `markNeedsLayout` is not called (i.e., the layout cache is still valid).
  // See: https://github.com/flutter/flutter/issues/85108

I wrote the above comment before I realized that you just can simply call tp.markNeedsLayout() before your call to tp.layout(..). The TextPainter() code is optimized to try and prevent un-needed layout operations. The change to the paint style from stoke to fill is not 'detected' and does not force a re-layout, so the layout from the previous tp.paint() call is reused.
See ming-xi/flutter_stroke_text_issue#5
There is a comment within text_painter.dart ->
  // The TextPainter class should not aggressively invalidate the layout as long
  // as `markNeedsLayout` is not called (i.e., the layout cache is still valid).
  // See: https://github.com/flutter/flutter/issues/85108

Interesting... I'll try it out. Thanks~

@timmaffett is right, I must call TextPainter's markNeedsLayout() to make it's cache invalid:
TextPainter tp = TextPainter(
    textDirection: TextDirection.ltr,
);
tp.markNeedsLayout();//<---add this before layout()
tp.layout(
  minWidth: 200,
  maxWidth: 200,
);

The TL;DR: detail of whats going on is this:
When you call tp.text = TextSpan(...) with your new text span (with the same Paint object 'p' which has had it's style changed to to 'fill' from 'stroke' (and color...)
The setter for TextPainter.text try's to evaluate the change.  It ask the TextSpan's to compare themselves, and then in turn the TextSpan's ask their style's to compare themselves.
The style comparison code is
RenderComparison compareTo(TextStyle other) {
    if (identical(this, other)) {
      return RenderComparison.identical;
    }
    if (inherit != other.inherit ||
        fontFamily != other.fontFamily ||
        fontSize != other.fontSize ||
        fontWeight != other.fontWeight ||
        fontStyle != other.fontStyle ||
        letterSpacing != other.letterSpacing ||
        wordSpacing != other.wordSpacing ||
        textBaseline != other.textBaseline ||
        height != other.height ||
        leadingDistribution != other.leadingDistribution ||
        locale != other.locale ||
        foreground != other.foreground ||
        background != other.background ||
        !listEquals(shadows, other.shadows) ||
        !listEquals(fontFeatures, other.fontFeatures) ||
        !listEquals(fontVariations, other.fontVariations) ||
        !listEquals(fontFamilyFallback, other.fontFamilyFallback) ||
        overflow != other.overflow) {
      return RenderComparison.layout;
    }
    if (color != other.color ||
        backgroundColor != other.backgroundColor ||
        decoration != other.decoration ||
        decorationColor != other.decorationColor ||
        decorationStyle != other.decorationStyle ||
        decorationThickness != other.decorationThickness) {
      return RenderComparison.paint;
    }
    return RenderComparison.identical;
  }

Here you can see that all that is compared is that it checks that foreground != other.foreground  - but you are using the same paint object, so this comparison is OK (because it does NOT go into the Paint object to look for differences).
You need this comparison to return RenderComparison.layout if you want to 'automatically' not have to call markNeedsLayout() yourself.  Because your TextSpan() is not 'different enough' then without calling makrNeedsLayout() manually then the subsequent call to tp.paint() uses the previously cached info/paint operation.


Convert "Amount spent in cents" to "Amount spent in dollars"

Resolves #2406
Description

On the Purchases export, I changed the last column to be shown in dollars instead of cents, and I updated the header to reflect this change.

Type of change

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

How Has This Been Tested?
I added a test to spec/models/purchases_spec.rb
Screenshots

Thank you @librod89 !


Buff's Conditional

I made a simple macro
/cast [nomybuff:Ice_Block] Ice Block
seems that the macro thinks the buff "Ice_Armor" is "Ice_Block"
I can switch the macro conditionals and the effect is the same either way.
P.S. is this something I'm doing wrong or another issue?

After searching your commits it seems to be similar to a bug fixed back in Feb 9
-- https://github.com/DennisWG/CastModifier/commit/1fb2b89b18cad09ae170c5377108fef0c00b1920
I don't know code well enough to know the difference between:
457 --  local pattern = "(@?%w+:?>??<?%w*[_?%-?%w*][/?%w]*)";


Type conflating with MIME type

Ref #151 about type: "gif" being returned on a container's file:

gif isn't a mime type (contrast image/gif)
This field is also used for scientific data types (dicom)

This is troublesome when trying to make UI-relevant decisions (deciding if a viewer icon should be visible, which viewer to launch, etc).
My proposal:

The type field is only used for scientific data - so, dicom and similar. Blank (empty string) if there isn't a scientific data type flagged on this file.
A new mime field is sent on all files (data and attachments) that has a best-guess mimetype on it. Defaults to application/octet-stream.

Thoughts? @mrDarcyMurphy @dpuccetti-flywheel

In various data model-related discussions, the team had previously deemed the mime type on files as superfluous. The API finally caught up this week.
Per our current data model, type is the human-interpretable file type, such as dicom, image, or document. The mime type is not part of the model, but still provided in the HTTP Content-Type header for downloads.
If there is a genuine need for the API to supply the mime type of each file, I would be open to doing so post-bali, as part of the new data model. Note, though, that the API's potential functionality would be limited to guessing the mime type based on filename extension, not on actual file content. I would be concerned about supplying such guesses from what is intended to be an authoritative data source.
Could the UI alternatively take on the guess work?
@elisapoquette: Determining file types will likely need to become part of file uploads, possibly by prompting the user.

The UI is already using a simple regex to grab the file extension to see if it's viewable or not, and how. If that's really the best way then I guess we'll stick with it.
I was hoping the API would be smarter about determining the mime-type other than sniffing the file extension. If not, then maybe the best middle-ground would be to have the API return the extension as an attribute. That'd save some code and processing time on the UI.
{
  created: "2016-02-04T01:24:43.498000+00:00"
  hash: "v0-sha384-6d256b480d71816cb822f721e9cb36d28e7d0fd2b1005ef74ee2c89ea75dc5e9a46c3dc950659eb0a2e689fb02422bfd"
  modified: "2016-02-04T01:24:43.498000+00:00"
  name: "cookie.gif"
  size: 466272
  ext: "gif"
}

Lastly, Rule # 1 of UX is "Don't make me think." Putting the responsibility on the user to figure out what type of file they're uploading would violate that, along with being tedious and frustrating. It'd be a solid foot-gun too, as people are likely to pick the wrong file type.

One additional complication is nifti files. When they're generated they're served like so:
{
  hash: "v0-sha384-c19d53315db25d1678460697767e3e0c5416bfc2cc9fa0915bf15c829877133b900b9972624fde5d8c4568a85e3a1215"
  name: "8892_14_1_dti_nifti.nii.gz"
  size: 34090235
  type: "nifti"
}

However, if I were to download that nifti and reupload it to a different spot, it's served like so:
{
  created: "2016-02-08T16:44:17.213000+00:00"
  hash: "v0-sha384-874966c33a76ca5aeab4654d30015841965c4f35acd0fa45b9d2686c4d4b876e5578a5f81fc65812e750842b47b6e7e9"
  modified: "2016-02-08T16:44:17.213000+00:00"
  name: "8892_1_1_localizer_nifti.nii.gz"
  size: 8738921
}

Since the file extension is gz the UI has no way of knowing which type of file is actually in there. It could be assumed that .nii.gz is a nifti, and I plan on checking for that for now, but it's a guessing game and that seems wrong.

By design, the API does not and will not interpret the files that it is hosting. We are data type and format agnostic. Data sources, such as reapers, gears, and UI, must supply all relevant file metadata.
If it makes anyone's life easier, I'd be happy to add a mimetype field to each file, even to guess it using a standard library if it's not supplied, but I really don't see us adding deep file inspection and knowledge of every possible file type ever invented.

It's reasonable for the API to be agnostic, but it doesn't have to be ignorant. Both the API and the UI need to know what type of files they're working with in order to present them properly to users.
Judging by the standard library's docs, the uploaded nifti example would end up being considered a gzip file. mimetypes.encodings_map['.gz'] => 'gzip'. It's not wrong, but for our use case it's not exactly right either.
Perhaps we aim for a middle ground where the API and the UI make a best guess, and we allow the user to change the file type after upload. I still recommend against forcing the operation during upload, but a "get out of jail free" card afterwards would be alright.
For (a very rough) example:

Clicking Edit could switch the table row, like we do with permissions, so that the user can change the file type and potentially the file name.
Your thoughts?

Agreed on agnostic != ignorant, that's a good way to put it.
Even from a distance I'm not entirely comfortable with the amount of logic that's ending up in the frontend and would be happier if the API can shoulder it as much as possible. The server making a best-effort attempt to help here makes sense. The python extension-guess @gsfr linked would be sufficient, but AFAIK, the most correct option to do this is the standard *nix tool:
$ file --brief --mime-type stuff
text/x-shellscript

$ file --brief --mime-type latest.jpg
image/jpeg

$ mv latest.jpg wat.txt

$ file --brief --mime-type wat.txt
image/jpeg

# Does not take longer on large files; this one is 2 GB
$ time file --brief --mime-type large.tar
application/x-tar
real	0m0.003s

The file command does not read the entire file, not the filename, instead doing a variety of intelligent (and configurable) checks which complete quickly. This is ideal, since extensions aren't real.
Whichever method is used, I most strongly would assert that the API should calculate once and store, rather than re-calculating on request. Our own scientific heuristics belong solely in the type field - if the identifying methodology thinks it's application/octet-stream, we store that unmodified in the mime field where it belongs. The UI then has to look at both to make a decision on what to do; first checking the type field then, if empty (?) using the mime field.
Proposal in action (assuming file is used):

file
type
mime

doc.pdf

application/pdf

image.png

image/jpeg

example.nii.gz
nifti
application/gzip

example.nii
nifti
application/octet-stream

example.dcm
dicom
application/dicom

Download API calls would use the stored mime field in headers for obvious reasons.
Thoughts?
I have less an opinion about editing after the fact - @elisapoquette, what do you think of allowing the user to specify (after a file is uploaded) what sort of file it is? If that's an important feature, I don't see any reason not to allow users with write access to make that change. Validating what they sent first, of course...

Well, when we are looking at a gzipped or native NIFTI file, the critical part for our system's functionality is type="nifti" and measurements=["functional"], for instance. Similarly for a zip of DICOMs. That's what the viewers and gears need to know. The mime type, application/gzip, application/zip, or application/octet-stream is both easy to determine automatically and also much less important for us. No further discussion is needed on this field. We will add it to the data model, and if it's not supplied by the data source, the api will make an educated guess.
Back to the meat: type and measurements are critical for our system's functionality.
Given the lack of an algorithmic solution, letting the user set those fields on file upload as well as allowing later modification seems obvious to me.
To @mrDarcyMurphy's point about the user messing up: Sure, that will doubtlessly happen. But they will figure it out when their gears and viewers fail, provided we give them a rich UI and intelligible feedback.
@elisapoquette: How does that all look from your UX point of view?

Let's take the UI stuff offline. I will make an Aha! ticket for these features and we can go through a design review.

Also, @mrDarcyMurphy proposal is very much inline with what I would recommend

Let's take the "type + measurement" modification stuff to another ticket then, as this ticket is only about resolving the conflation between type and mime. I think I heard agreement on my proposal above; let's go with that. Storing the result of any heuristics leave the door open for user modification after-the-fact.

@kofalt Does that mean the API would return something like this for a nifti file? If so, it'd work well and should eliminate guess work.
{
  name: "example.nii.gz",
  type: "nifti",
  mime: "application/gzip"
}

Yup!

And how would the API know that this file is of type: "nifti"? That's the whole point of this discussion.

Not so:

Per our current data model, type is the human-interpretable file type, such as dicom, image, or document.

My proposal is to do only a subset of the current behaviour - specifically, to only store one of those three examples - in the type field. And to store a more mime-standard string than gif (ref #151) in a separate mime field.

:+1:


[DOC-11064] Update Cloud Upgrade Policy

[DOC-11064] Update Cloud Upgrade Policy

Mike approved offline, can confirm that the page displays correctly.


feat: lightpush new protobuf proposal

Based on https://github.com/waku-org/pm/issues/93 this new version of lightpush protobuf protocol definition is proposed.

More specific fail case definition in response

error status description is now optional rather than hold the factual error cause.
error codes are more-or-less matching HTTP error code means

Response contains the number of successful relay peers.
Placeholder for request type - for future enhancements

As this is a breaking change compared to the original definition, we may consider to version the protocol allow clients to get adapted to new protocol format.
Open discussion topic: Can't we make pubsub_topic optional for lightpush protocol, indicating to handle message as auto-sharded routing? Currently we require from clients to know about how to compute proper shard from content-topic and make light push request properly with that computed shard topic. Although this can be simple handled on the service side. WDYT?

https://github.com/waku-org/specs/pull/20#discussion_r1632370661
@Ivansete-status: I think its better idea to put less such logic into the service side. I feel it more client side one. IMHO we might embed it into SDK rather than to the raw protocol.
Because what does LOW_NUMBER_OF_PEERS implies? Is it a fixed number by configuration which the client side might not know about or depends on other factors like due to bandwidth restriction we might decide to unsubscribe from some of the heavy load shards?
Counting with DOS protection, following bandwidth management and other features may come (e.g. light push request type: push to store) that will impose other considerations.

#20 (comment) @Ivansete-status: I think its better idea to put less such logic into the service side. I feel it more client side one. IMHO we might embed it into SDK rather than to the raw protocol.

hahah yes I've noticed that :) The following comment is related to that and why I consider we should have fewer assumptions in light-node side and more on the full-node side: https://github.com/waku-org/nwaku/issues/1004#issuecomment-2156807537

Because what does LOW_NUMBER_OF_PEERS implies? Is it a fixed number by configuration which the client side might not know about or depends on other factors like due to bandwidth restriction we might decide to unsubscribe from some of the heavy load shards?

<<Is it a fixed number by configuration which the client side might not know about>> --> Yes exactly. In that case, the light node may decide to try again to the same full-node in the near future or try to use another full-node.

Counting with DOS protection, following bandwidth management and other features may come (e.g. light push request type: push to store) that will impose other considerations.

Sorry, but I can't quite follow that statement.

@weboko , @SionoiS, @Ivansete-status : Please take a last look if acceptable. I'm heading to merge this PR. It's time to make some coding soon. :-)

I changed my mind as was thinking of comments from @jm-clius and @weboko... https://github.com/waku-org/specs/pull/20#discussion_r1638422709
I removed SERVICE_UNAVAILABLE and replaced with NO_PEERS_TO_RELAY as in this particular application for lightpush it means exactly that.

@Ivansete-status yes you are right, I will lately extent explanation of relay peer count as it may not matching mesh node count.

@SionoiS: Please take a look and approve if it is now in acceptable form. Thank you.

@fryorcraken thank you for the comments, let's continue tracking those here: https://github.com/waku-org/specs/pull/29


How to let service worker to exclude some urls

I dont want some urls (e.g.  /api/, /admin/, /blog/) to be controlled by service worker,  Can I set a regexp to exclude these urls?

See this entry : https://vite-plugin-pwa.netlify.app/guide/static-assets.html


Update Source code to avoid breaking changes caused by new OpenAI version

The bug
The new version of openai released can cause many errors in using guidance.
Example:
#Older version
import openai
completion = openai.Completion.create(model='curie')

#Newer version
from openai import OpenAI
client = OpenAI()
completion = client.completions.create(model='curie')

Hopefully this is fixed in the new release :)


Fix missing override annotation

FYI, https://www.thefinestartist.com/effective-java/36

Well, it is ok. but pls fix the conflict.

Well, it is ok. but pls fix the conflict.

@jixuan1989 Thanks for your comment. It's done.

@jixuan1989 Thanks for your comment. It's done.


caption not working

Command that caused the error
caption
Image that caused the error
https://cdn.discordapp.com/attachments/764770346800250913/1061681514938634282/watermark.png
Steps to reproduce

Go to 'image'
Right Click on 'image'
Scroll down to 'choose image'
Choose image
Type /caption sugma cock
Shows error

Self-hosted instance?
No
Error file
Message: BodyTimeoutError: Body Timeout Error
    at Timeout.onParserTimeout [as _onTimeout] (/root/esmBot/node_modules/.pnpm/undici@5.12.0/node_modules/undici/lib/client.js:906:28)
    at listOnTimeout (node:internal/timers:561:11)
    at processTimers (node:internal/timers:502:7) {
  code: 'UND_ERR_BODY_TIMEOUT'
}

Stack Trace: BodyTimeoutError: Body Timeout Error
    at Timeout.onParserTimeout [as _onTimeout] (/root/esmBot/node_modules/.pnpm/undici@5.12.0/node_modules/undici/lib/client.js:906:28)
    at listOnTimeout (node:internal/timers:561:11)
    at processTimers (node:internal/timers:502:7)

Additional context
amogus :)

Haven't seen this in the wild since over a year ago, assuming this is fixed.


Memory leak: Webkit dont release memory for tile img

Removing any <img> from DOM tree not causes memory freeing in Webkit (i'm using latest 12.0.742.91):
all image files stay in memory even after removing their  elements.
So even if we set unloadInvisibleTiles to true - it not cause performance increase, and while you scroll the map - your memory leaking out.
You must set image element attribute "src" to "empty.png" or to empty string to remove previous image, stored in memory.

@mourner For reference , The Webkit Bug ID : https://bugs.webkit.org/show_bug.cgi?id=31253
Setting img src = '' does fix the memory leak.


Add tag prop

in my use case,
i want to drag the tr tag in the tbody

    <Sortable
        ...
        tag="tbody"
    >
        <template #item="{element}">

...

        </teamplate
    </Sortable>

Can you add the prop to the README?

Thanks a lot! I’ll make a new release tonight or tomorrow.

Hey there, is there an ETA for a new release?

Ah thanks @odiffey, I completely forgot to push the tag. It's been pushed: https://github.com/MaxLeiter/sortablejs-vue3/commit/a3c2bbd8b7de1949b6fbf70ba01feaa7ee7e2342.


Trade PK not unique!

At the moment we have the following primary key for Trades table. However, every trade happening in the same batch would be included in the same block as part of the same transaction... Unless log index means something else? Any thoughts @vkgnosis
PRIMARY KEY (block_number, log_index)
error returned from database: duplicate key value violates unique constraint "trades_pkey"
this is mostly because of:
pub async fn insert_events(&self, events: Vec<(EventIndex, Event)>) -> Result<()> {

Which I would guess should accept (EventIndex, Vec<Events>) Rather than a Vec of tuples.
There doesn't appear to be a unit test for insert_events that actually takes more than a single tuple.

A log_index is the index of the log (AKA Solidity event in the block). There is only one possible event at a given (block, log_index) AFAIK.

Right, so we can't use this to uniquely specify batchIDand will have to go with transaction hash instead.

Right, so we can't use this to uniquely specify batchIDand will have to go with transaction hash instead.

I don't understand this conclusion. I think you should be able to use (block, log_index) of a Settlement event in order to uniquely identify a batch since it is unique.

I don't understand this conclusion. I think you should be able to use (block, log_index) of a Settlement event in order to uniquely identify a batch since it is unique.

I don't have the settlement event, I am working with the trade events which happen with different log indices in the same batch. Its all good, this is sorted. However, I would use block_number, transaction_index as a much more natural notion of batchId. In particular we can use block_number * 10^4 + transaction_index since (given the current gas limit) the most transactions that can fit into a block are 12.5M / /21K = 595  and this definition would allow for the block gas limit to go all the way up to 21M without needing to be revisited.

Note that just using a transaction has is not enough, since a single transaction can in theory contain multiple settlements.


Allow bypassing internal requests of server-side fetch()

Describe the problem
The fact that svelte can avoid HTTP calls to itself on the server is a great feature, but it seems that it can't be disabled.
(I'm referring to the third point mentioned here)
I'm working on a website that is split between a backend app (PHP + Symfony) and a frontend one (SvelteKit).
Although these are completely separate, they share the same domain.
Requests are dispatched to one or the other depending on the URL's pathname.
For example, any URL that starts with /api should be handled by the backend application, but any other URL should point to the frontend app.
When I'm issuing calls to the API from a load function, they are handled by SvelteKit instead of being forwarded to the backend app.
From what I understand reading this code:

if the origin header of a request doesn't match the app's origin, a fetch call is issued
if no special case is matched, an internal request is issued

In my case, every request falls into the latter case because API calls share the same origin with the app.
Describe the proposed solution
I can see a couple solutions to this problem:

add an option in kit config to bypass this functionality and always make a network request.
test if the requested route actually exists in the application before making an internal request. This would add a little extra cost but would ensure the app can handle the request.

Alternatives considered
I tried forcing a different Origin header on the fetch() request, so SvelteKit is tricked into making a network request, but it doesn't seem to work.
Also, even if it did, it would probably mess with the CORS headers set by the backend app.
Importance
would make my life easier
Additional Information
No response

This can already be done with a handle hook that sends the appropriate API requests out to the external server, rather than having them be handled internally.

I'm sorry to reply after you closed the issue, but could you elaborate a bit?
Do you mean that I should make a fetch call in this hook?
If this is what you mean, I'll loose all the advantages of SvelteKit's fetch like response inlining, credentialed requests, etc.
I tried doing this:
export const handle: Handle = async ({event, resolve}) => {
	if (
		event.url.pathname.startsWith('/api') &&
		event.request.url.startsWith(env.PUBLIC_BASE_URL)
	) {
		return await fetch(event.request);
	}

	return await resolve(event);
};

This fixes the errors I was getting before, but indeed, responses are not inlined and the client is reissuing all the requests.
Maybe this wasn't your point?


Respond to reviews

Follows on #28 - reviewers will likely have comments that need to be addressed.

Issues made, but need to actually make sure these make it through IPDS.


blas/gonum: []float64 slices should be sliced to their shortest needed length

Currently we us s[n:] which matches the fortran. We are missing the opportunity for safety here by not saying s[n:m] where we know what m is.

Was this ticket originally intended for blas(/native)? There is #685 which is the same but for lapack where it does make sense. I would close this one.

Yes, probably.

Are we sure? There are places like https://github.com/gonum/gonum/blob/master/blas/gonum/level2double.go#L266 where the bounds would be tested with -noasm. I agree it's less of a problem than in lapack, but the point still applies

Fair enough. I was hasty.


Added transform algorithm

Thanks for your contribution but it looks like this method has already been contributed before.


globals file

Create, read, and write a globals file.  Should be set up as an environment.

Not sure this needs to be part of the package.  User can do it themselves.

Not necessary.


"Refactor ingestion lambda DB connection to use AWS secrets"

Haven't touched secret.tf, as not sure what bits can be deleted now, if any

I'll sort out the required changes on the add_conn_to_lambda branch first


use camelCase for configuration

kebab-case still works but will be deprecated in graphql-ppx at some point.

@jfrolich seems like camelCase is not working? It behaves as if there were no config there at all.

Oops I didn't cut a release for too long so this wasn't in a beta release yet! 😅 If you update the dependency to 1.0.0 it should work!  🎉


Too many Pretouchs will cost a large amount of time

In our case, a project has almost 3000 structs, and structs will more and more in the future. That will cost a large amount of time if all types are pretouched. In one project, it will cost almost 5 minutes. So what can we do to reduce this cost?

could you try the option:
WithCompileRecursiveDepth(2) // default is 3,

reference: https://github.com/bytedance/sonic?tab=readme-ov-file#pretouch

We use the default options, and the option mentioned above is 1 but not 3.

Yeah, i recommend using WithCompileMaxInlineDepth(2)

I test the cost of Pretouch of the same type on different CPU, but the cost difference is too huge.
Apple M3                                                                       54.792µs
Intel(R) Xeon(R) Platinum 8260 CPU @ 2.40GHz     70.892763ms
How can be this?  Is't because the test is running in a docker and the cpu is oversold? I'm fall down.

I set an environment variable by export SONIC_USE_OPTDEC=1 , then the pretouch run faster, 70s->16s. Does this mean that JIT cannot work on my machine?

yeah, you can try the non-jit implementation by the environment

I conducted some experiments and gathered data, which led me to a few conclusions:

The decode performance of both JIT and non-JIT is similar, while the encode performance of non-JIT is slightly worse, but still better than the standard library.

In terms of warm-up, non-JIT is significantly faster than JIT, especially for decoding.

Therefore, in most cases, using non-JIT is sufficient, particularly when it's uncertain whether the CPU supports JIT.
Does my conclusion seem correct?
The data was measured on Intel(R) Xeon(R) Platinum 8260 CPU @ 2.40GHz.
Both = SONIC_ENCODER_USE_VM=1;SONIC_USE_OPTDEC=1
| Default | Both | ENCODER_USE_VM=1 | USE_OPTDEC=1
-- | -- | -- | -- | --
sonic.Pretouch | 638.024441ms | 13.132942ms | 568.038219ms | 92.612697ms
sonic.Unmarshal | 1.911174528s | 1.736119887s | 1.896258507s | 1.747521228s
  | Default is JIT, and 3 times the performance of the standard library |   |   | Non-JIT, the same performance as JIT, but very faster Pretouch
sonic.Marshal | 581.627122ms | 1.03100576s | 1.064066789s | 591.692847ms
  | Default is JIT, and 3 times the performance of the standard library |   | Non-JIT, half performance of JIT, but faster Pretouch |
stdjson.Unmarshal | 6.640908859s | 6.503718488s | 6.551327596s | 6.480074988s
stdjson.Marshal | 1.397290711s | 1.416261616s | 1.390964037s | 1.400312776s

thanks for your test data. In the future (actually not short), we may remove jit, but we need to fix the performance problem in encoding.

OK, thank you for your reply, it's truly an honor to take part in Sonic's discussion. Salute to your work!


[Feature Request] Spam settings

Would be great to have a space in the mail settings for spam. Specifically:

Reject some messages, possibly with a threshold
Required spam threshold
Mark as spam (current behaviour) or delete
Threshold score for automatically forwarding the received message back to: abuse/postmaster@[Reply-To domain] and optionally abuse/postmaster@[From domain] (if different)

I've not really done much digging but know that there's a difference between SMTP in-session rejects (mail is not accepted) and post-acceptance filtering. And a difference between network-based filtering (looking things up like SPF, block lists) and local based filtering (just on the mail content).
From what I've gathered, rejects can only really happen on local based filtering (because of time taken for network lookups), which is obviously less accurate.
MIAB seems to be quite accurate (so could be used to delete things) but not sure if it does any spam rejecting to put people off sending them?
I'm guessing the spam score is not available at SMTP session time for a reject though.
NB: Also worth making a note somewhere that SMTP connections from new mail servers are first greylisted for 5 minutes. I was confused when getting things like two-factor codes by email that they didn't come through immediately.
Example below:
X-Spam-Flag: YES
X-Spam-Level: *****
X-Spam-Status: Yes, score=5.9 required=5.0 tests=DMARC_PASS,
    FREEMAIL_FORGED_REPLYTO,FROM_NTLD_REPLY_FREEMAIL,FROM_SUSPICIOUS_NTLD,
    FROM_SUSPICIOUS_NTLD_FP,MISSING_MID,RCVD_IN_DNSWL_BLOCKED,
    SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6
X-Spam-Report:
    * 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to
    * DNSWL was blocked. See
    * http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
    * for more information.
    * [<IP_ADDRESS> listed in list.dnswl.org]
    * -0.1 SPF_PASS SPF check passed
    * -0.1 DMARC_PASS DMARC check passed
    * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
    * 0.1 MISSING_MID Missing Message-Id: header
    * 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD
    * 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD
    * 2.5 FREEMAIL_FORGED_REPLYTO Freemail in Reply-To, but not From
    * 1.0 FROM_NTLD_REPLY_FREEMAIL From abused NTLD and Reply-To is
    * FREEMAIL
X-Spam-Score: 5.9

This is something that would take a big chunk of effort, though any advances on this would be helpful.
Meanwhile, there's a guide on how to set up greylist exceptions. It works on MIAB so it'll likely also work here: https://discourse.mailinabox.email/t/how-to-use-postgrey-client-whitelists/8355


Add new rules no-missing-message-ids and no-unused-message-ids

Fixes https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues/57.
Detects:

Using a messageId that does not exist
Leaving a message in meta.messages that is unused

These were implemented as separate rules because:

Each is quite complicated on its own and it helps to be able to test them in isolation
In the event of false positives, the user can just disable one of the rules but not the other

Note that I eliminated many possible false positive scenarios by testing these rules on the ESLint codebase.
TODO

[x] Fix failing test case
[x] Write unit tests for util functions
[x] Add JSdoc for util functions
[x] ~Rename to require-valid-message-ids~
[x] Split into separate rules no-missing-message-ids and no-unused-message-ids since the unused message ID check can have false positives when variables or helper functions are used
[x] Test on ESLint repository to detect edge cases
[x] Ignore usage check when can't statically determine messageIds used like below examples:

function reportEnd(node, messageId) {
    context.report({
        node,
        messageId
    });
}

[x] Consider variable messageId:

let messageId;
if (foo) {
  messageId = 'abc';
} else {
  messageId = 'def';
}

context.report({
  node,
  messageId
});

[x] Handle conditional in suggestions

context.report({
    node,
    messageId: "unexpectedRegExp",
    suggest: noFix ? [] : [{
        messageId: "replaceWithLiteral",
    }]
});

[x] Try to handle some false positives in eslint-plugin-unicorn with dynamic object keys:

const MESSAGE_ID = 'no-this-assignment';
const messages = {
	[MESSAGE_ID]: 'Do not assign `this` to `{{name}}`.',
};

After this is merged:

Use util functions in #252

@aladdin-add updated the messages and I also fixed some false positives affecting eslint-plugin-unicorn due to variable message object keys.


"cleos push action eosio setprods  "{ "schedule": [{\"}]}""" ，set eosio as a producer_name?

when i run : cleos --wallet-url http://localhost:8899 push action eosio setprods "{ "schedule": [{"producer_name": "inita","block_signing_key": "EOS6hMjoWRF2L8x9YpeqtUEcsDKAyxSuM1APicxgRU1E3oyV5sDEg"}]}" -p eosio@active,can eosio as a memeber of producer_name ?

Yes, you can retain eosio as a producer if you wish.  Using your key and the tutorial key:
cleos --wallet-url http://localhost:8899 push action eosio setprods "{"schedule": [{"producer_name": "inita", "block_signing_key":"EOS6hMjoWRF2L8x9YpeqtUEcsDKAyxSuM1APicxgRU1E3oyV5sDEg"},{"producer_name":"eosio", "block_signing_key":"EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"}]}" -p eosio@active
The object with producer_name and block_signing_key may be repeated up to 21 times for 21 different accounts.


jpype launching many threads per java thread

I am working with jpype 0.7 on Ubuntu 18.04, java 1.8_202, python 3.7, with startJVM options of jpype.getDefaultJVMPath(),"-ea","-Djava.class.path=/myjar.jar","-Xms4G","-Xmx32G". My machine has 36 physical cores, 72 with hyperthreading. I'm using jpype through jupyter notebook, although I've verified the same behavior outside of the notebook.
Whenever I call a java method jpype seems to launch 36 threads per java thread. The result is that running with anything over 2 java threads runs very slowly, much slower than using one thread. There is plenty of memory available, and I have also tried serialGC, but that had no effect.  Running the same method call as a java app runs as expected. The method typically uses 6GB of data and this is independent of number of threads.
Any help would be greatly appreciated.

Jpype does not have any capability to launch threads internally, thus they must either be launched by Python or by the JVM.  The best I could recommend is calling it directly from Python to see if it is something to do with Jypter.  If it still happens in Python directly then compile with --enable-tracing to see what JNI calls are being made.
The only difference between a call made from Python and a call made internally from Java is the caller address.  A few procedures detect this and act differently but those are rare cases.  If you can recompile the JAR you can instrument it to see what is being called.

Thanks for the quick response. I traced the issue to OMP_NUM_THREADS being set to #CPUs by numpy. My code is using BLAS.


Disable TLS v1.0 and TLS v1.1

Is it possible to add a configuration option to disable these protocols?

Hey @leandrocruz - it's not the best solution but you could either mount a file at /usr/local/openresty/nginx/conf/ceryx.conf.tmpl with the contents of the current file^1, plus the wanted TLS config.
You'll need, for example, ssl_protocols TLSv1.2 TLSv1.3; inside the server block.
Of course, you can also open a PR in this repository to add support for this, while keeping the default the same as today (the key should not be configured at all if the environment variable is not set).
The environment variable could be CERYX_SSL_PROTOCOLS.


Add chai and @google-cloud/storage as dev dependencies.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[X] Make sure to open an issue as a bug/issue before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[X] Ensure the tests and linter pass
[X] Code coverage does not decrease (if any source code was changed)
[N/A] Appropriate docs were updated (if necessary)

Fixes #813

These seem to be required to run the samples tests (npm run samples-test). Without these dependencies I get this error: https://pastebin.com/jHL24GfK and after I added them as a dev dependencies the sample tests run properly.
I think that anyone should be able to run all the tests in this project without going into a subdirectory and running npm install, but failing that I think we should at least document how to run the samples tests in a way that doesn't lead to an error (currently the testing documentation in CONTRBUTING.md only specifies npm install at the top level of the project and then running npm run sample-test among other test commands). Let me know which you prefer and I'll update this PR.


Dependency Resolution

On the back of #1119, I wanted to start a discussion on the possibility of making Marten more extensible through dependency resolution.
At it's most basic, this could mean StoreOptions having a property Func<T> GetInstance<T> that users can set to provide custom implementations of interfaces (e.g. IManagedConnection) from their preferred IoC/DI container.
Thoughts?

To what end? What concrete use cases are you looking for here?

@jeremydmiller #1119 was a good example of where this might have been useful - swapping out IManagedConnection for a version that included retry handling. That specific example is of course moot now that Marten has retries built-in 😄
You did comment that IManagedConnection was really an implementation detail, and TBH since then I don't recall coming across any other situations where this might be helpful. Perhaps this should just be closed out for now, and potentially revisitied if any extensibility points emerge in the future?

Closed it is, thanks for the response

I don't have opinion about IManagedConnection but I believe we should have some mechanism to inject plugins and replace parts of the Marten. Good example can be NodaTime issues. Imho we should really work on Marten modularity.
That will make Marten more flexible and also give user more options to contribute or swap some implementations without our work.


Add helm rendering gem

Description

Adds all the tooling required to enable our Jekyll docs to render helm charts on the fly. This means we can move our manifest templates from Liquid templating to Helm templating language without impacting the docs, and while gaining the ability to render them via CLI using Helm.
This is accomplished by tweaking our Makefile to download the Helm binary on the host and volume mount it into our build container. We then launch jekyll not in safe mode so that it can load a new jekyll plugin that adds a new "helm" tag that passes input yaml to the helm binary and displays the rendered result. e.g.
---
layout: null
---
{% helm %}
datastore: "kdd"
network: "calico"
typha:
  enabled: true
{% endhelm %}

My merging this PR, we add the capability of rendering helm charts, but do not modify the existing pipeline in any way (since no pages actually call that tag yet).
Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

None required

Deploy preview for calico ready!
Built with commit 8803c5f82dd9f3675860b8cbdfc31d7ff95c8d8f
https://deploy-preview-2321--calico.netlify.com


refactor!: move clock events to clock class

Motivation

Spin-off from https://github.com/ChainSafe/lodestar/pull/5351 to allow re-using clock in network thread

Description

Add event emitter to clock class
Move clock events from chain emitter to clock class
Change subnet class dependencies from chain to clock

:tada: This PR is included in v1.9.0 :tada:


Add minimal model schema and generation of extension types based on it.

Add a schema and a generator that generates extension types based on it.
Obviously we don't have to check in the generated code but it seems useful for now that we review it.
No particular clear ideas on the best way to lay this out, e.g. the top level "schema" folder, the generator under "tool". Happy to hear any suggestions.
No test coverage for the generator yet but we get exactly one golden file test, the output, for free :) happy to add anything you think is useful at this point.
Next steps:

a way to combine manually written code with the generated code, to add docs and helper methods.
a way to construct the extension types that is compatible with representation as a byte buffer, i.e. the underlying collections need to be swapped for special purpose ones.

Added analysis options, filed https://github.com/dart-lang/sdk/issues/56047 because it doesn't work in VSCode (for me) :)


8bit量化没有问题，16bit报错

E RKNNAPI: rknn_init,  recv(MsgLoadAck) fail, -9(ERROR_PIPE) != 368!
E Catch exception when init runtime!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 897, in rknn.api.rknn_base.RKNNBase.init_runtime
E   File "rknn/api/rknn_runtime.py", line 341, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
E Exception: RKNN init failed. error code: RKNN_ERR_DEVICE_UNAVAILABLE
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
E Current device id is: None
E Devices connected:
E ['a9e33f8bbed29138']
E Runtime environment is not inited, please call init_runtime to init it first!
E Runtime environment is not inited, please call init_runtime to init it first!

E Current device id is: None # 没有识别到device，检查一下npu是否识别启动了
E Devices connected:
E ['a9e33f8bbed29138']


feat: Public TypeAliases

Description

Adding typealias for KituraContracts types.
Motivation and Context

For a user to use a type from KituraContracts, they would need to import KituraContacts in their application. Instead we expose these types in public typealiases in Kitura so that when they import Kitura they can access them.
How Has This Been Tested?

Added tests.
Checklist:

[x] If applicable, I have updated the documentation accordingly.
[ ] If applicable, I have added tests to cover my changes.

Codecov Report

Merging #1297 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1297   +/-   ##
=======================================
  Coverage   83.19%   83.19%
=======================================
  Files          41       41
  Lines        3451     3451
=======================================
  Hits         2871     2871
  Misses        580      580

Flag
Coverage Δ

#Kitura
83.19% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8dfbce8...fc9dc42. Read the comment docs.

It turns out that Swift has an alternative way to do this. We could add this to Kitura:
@_exported import KituraContracts

Then, KituraContracts types could be used without a corresponding import KituraContracts. I'm closing this PR while we consider doing that.


remove tooltip v2 payment modal sticker

What does this PR do and why?
removes the tooltip in v2 to match v1 functionality addressed down the pr stack
hover sticker icon, tool tip doesn't show anymore
Acceptance checklist

[ ] I have evaluated the Approval Guidelines for this PR.
[ ] I have tested this PR in all supported browsers.
[ ] I have tested this PR in dark mode and light mode (if applicable).

Current dependencies on/for this PR:

main

PR #1297

PR #1506

PR #1508

PR #1509   👈

This comment was auto-generated by Graphite.

Graphite Merge Job
Current status: ⏳ Queued to merge
This pull request is currently queued to be merged as part of a stack.
This comment was auto-generated by Graphite.

Job Reference: FBdSlkLHRNUzrDzyrjTF

Graphite Merge Job
Current status: ⏳ Queued to merge
This pull request is currently queued to be merged as part of a stack.
This comment was auto-generated by Graphite.

Job Reference: hcVmZSl0NtpcQYTG1Iw4

Graphite Merge Job
Current status: ⏳ Queued to merge
This pull request is currently queued to be merged as part of a stack.
This comment was auto-generated by Graphite.

Job Reference: ukIh7TJlk56j5lLaSiwO

Graphite Merge Job
Current status: 🔄 Waiting for checks to pass
This pull request is currently waiting for CI and mergeability checks to pass before being merged.
This comment was auto-generated by Graphite.

Job Reference: jrBSRizfw0H0WEnCyQfl


pose_stats file

Thanks for your excellent work! Could you provide the pose_stats.txt file for the NCLT dataset? When I reproduced it, the RTE could not reach the level mentioned in the article, and the visualization results were skewed, but the RRE was normal. I think this may be caused by the incorrect mean_t and std_t.

Hi,
Thank you for your interest. Of course, you can! Here is the content of pose_stats.txt:
-104.2464047 -381.2804443 8.2290920
118.8724964<PHONE_NUMBER> 4.8854634

Thank you for your prompt reply! It helps a lot!


How to manager the new Variables:TypeError: unsupported operand type(s) for |: 'dict' and 'str'

Issue you'd like to raise.

When I deploy the server then it report the error like the above.
How can I fix it ? Thank you !
Heres my code:
`
PROMPT_TEST = """Answer the question based only on the following context:
Based on the previous {history}
Question: {question}
Following: {affection}
Totally,You could select one of the above strategy of mix one.
{format_instructions}
"""`
chain_with_history_stream = RunnableWithMessageHistory(     {         "question": itemgetter("question"),         "affection": RunnablePassthrough()     }     | PROMPT_TEST | llm,     lambda session_id: MyRedisChatMessageHistory(session_id, url=REDIS_URL),     input_messages_key="question",     history_messages_key="history",     verbose=True,     max_message_history=30, )
##Error feedback:
Traceback (most recent call last):   File "<string>", line 1, in <module>   File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main     exitcode = _main(fd, parent_sentinel)   File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 125, in _main     prepare(preparation_data)   File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare     _fixup_main_from_path(data['init_main_from_path'])   File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path     main_content = runpy.run_path(main_path,   File "/root/miniconda3/envs/xdan-chat/lib/python3.10/runpy.py", line 289, in run_path     return _run_module_code(code, init_globals, run_name,   File "/root/miniconda3/envs/xdan-chat/lib/python3.10/runpy.py", line 96, in _run_module_code     _run_code(code, mod_globals, init_globals,   File "/root/miniconda3/envs/xdan-chat/lib/python3.10/runpy.py", line 86, in _run_code     exec(code, run_globals)   File "/workspace/xDAN-Dreamy-Chat/app/server.py", line 254, in <module>     { TypeError: unsupported operand type(s) for |: 'dict' and 'str'
Suggestion:
No response

When I deploy the server then it report the error like the above.
How can I fix it ? Thank you !
Heres my code:
`
PROMPT_TEST = """Answer the question based only on the following context:
Based on the previous {history}
Question: {question}
Following: {affection}
Totally,You could select one of the above strategy of mix one.
{format_instructions}
"""`
chain_with_history_stream = RunnableWithMessageHistory( { "question": itemgetter("question"), "affection": RunnablePassthrough() } | PROMPT_TEST | llm, lambda session_id: MyRedisChatMessageHistory(session_id, url=REDIS_URL), input_messages_key="question", history_messages_key="history", verbose=True, max_message_history=30, )
##Error feedback:
Traceback (most recent call last): File "", line 1, in  File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 125, in _main prepare(preparation_data) File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File "/root/miniconda3/envs/xdan-chat/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File "/root/miniconda3/envs/xdan-chat/lib/python3.10/runpy.py", line 289, in run_path return _run_module_code(code, init_globals, run_name, File "/root/miniconda3/envs/xdan-chat/lib/python3.10/runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "/root/miniconda3/envs/xdan-chat/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/workspace/xDAN-Dreamy-Chat/app/server.py", line 254, in  { TypeError: unsupported operand type(s) for |: 'dict' and 'str'
@ DosuBot

how to import RunnableDictionary? @dosu-bot.


How to run Dafny i VSC?

I am a newcomer to Dafny. I became interested in it since I have been developing my project similar to Dafny's goal, but quite different in mathematical background. It is based on denotational semantics and is described on my site
https://moznainaczej.com.pl/denotational-engineering/denotational-engineering-eng
I have already read a few reports and manuals on Dafny, and now I want to try it. In my Visual Studio Code, there is a Dafny extension, but its options for running and testing programs are deactivated. Could you help me out with what to do?
Andrzej Blikle
Institute of Computer Science
Polish Academy of Science
<EMAIL_ADDRESS>

Can you try creating an empty VSCode profile for a "clean" setting, and try working with Dafny again?
Also, for most beginner content, you only need to care about if your assertion or contracts works. It will automatically report error as any normal programming language on VSCode.


This tutorial

I want to tell the author of this, that this is the best tutorial I have ever seen. Not just on this topic, even not just about computers.
This has to be the new standard of precision.
If you didn't notice or have doubts, I am dead serious about this.

Thanks buddy, I really appreciate it! I got frustrated with other ambiguous tutorials, and it inspired me to make my own with very clear instructions.


New stable release?

What about a new stable release? Lastest stable version (<IP_ADDRESS>) was in june and I know there are code improvements that could be released in a new flagrant release :smile:

Here it is

C'est magnifique!

BTW, you should consider following semver specs (you have an issue open for this #155)
:smile:


rustup update doesn't provide any notification that it's taken control of duplicate tools

If rustfmt and cargo-fmt have already been installed by Cargo, rustup update will print something like:
warning: tool `rustfmt` is already installed, remove it from `~/.cargo/bin`, then run `rustup update` to have rustup manage this tool.

After doing this, rustup update provides no notification to the user that this has been successful (e.g. info: moving component 'rustfmt'), which can be a little confusing, as it seems no action has taken place, even though it was successful. It'd be nice if there was an info message for this case!

Closing as dup of #1352 - situation definitely needs improving here.


Make security context configurable.

In order to comply to security policies (such as from Kyverno), make the k8s securityContext configurable via the helm chart values.

This looks great, just one suggestion for the documentation. Thanks for contributing!
Would you mind also adding a changelog entry to the Chart.yaml? You will have to remove the two entries that are there as placeholders now, but you can see an example of this here: 0539494#diff-5e33a9126c77070c5c0eb99dda42378496c379464576c543c5f9a731da91284f

Thanks for the review, @HoustonPutman. Could you please have another look?

Thanks @uluzox!


webkitgtk,wpewebkit: Bump-up to version 2.44.0

wpewebkit: Bump-up to version 2.44.0 and also:

Delete recipes for version 2.40.5

Update test jobs definitions to primary build 2.44.X

Remove preset for 2.40 and add a new one for 2.44

Release notes: https://wpewebkit.org/release/wpewebkit-2.44.0.html

cog: Remove recipe for version 0.16.1

libwpe: Add recipe for release 1.16.0

Release notes: https://wpewebkit.org/release/libwpe-1.16.0.html

webkitgtk: Bump-up to version 2.44.0

Release notes: https://webkitgtk.org/2024/03/16/webkitgtk2.44.0-released.html

wperenderer

Great. I will make the change.

I think we will need to drop the support for old release before bumping up this wpewebkit version. The inability to use Yocto releases before Kirkstone stems from the fact that these older releases do not provide a compiler compatible with C++20, leading to compilation errors such as:

Error: No member named 'bit_width' in namespace 'std'.
Error: 'operator delete' cannot take a dependent type as the first parameter.

These errors prevent the successful compilation of the codebase, hindering development and deployment processes. Upgrading to Kirkstone or later releases of Yocto, which offer compatible compilers with support for C++20 features. This is necessary to address these issues right now.

Closed in favour of https://github.com/Igalia/meta-webkit/pull/496


Improve Documentation

This is really an ongoing challenge, but I'd like to make a concerted effort to get all routines documented and create more detailed doc in readthedocs on the usage of ICAR. ALL are welcome to help with this.

[ ] Need to document how to add a variable to ICAR (e.g. where to add meta data, kVARS,...)
[ ] Need to document how to add a physics model (e.g. request_vars, memory + tile indices)


File::create in gcc-shim sometimes fails with multiple test threads

On macOS 10.14.5 (Mojave) with rustc 1.35.0 and 1.36.0, if I do the following with cc-rs at d2ba46f65cbf56b6b8852a3ab277c45259e38811:
$ export RUST_BACKTRACE=full
$ while cargo test; do sleep 0.00001; done

I eventually get the following:
cargo:warning=thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:997:5
cargo:warning=stack backtrace:
cargo:warning=   0:        0x10b4928c3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hf2949dcf16da83bd
cargo:warning=   1:        0x10b48ed52 - std::sys_common::backtrace::_print::h4b87ed6ba0cd5304
cargo:warning=   2:        0x10b491986 - std::panicking::default_hook::{{closure}}::hde39fed432870543
cargo:warning=   3:        0x10b49172f - std::panicking::default_hook::hfce8820d41dbdcbf
cargo:warning=   4:        0x10b49203f - std::panicking::rust_panic_with_hook::hfcf2d0777bc6c409
cargo:warning=   5:        0x10b491b6c - std::panicking::continue_panic_fmt::h4d668741ea600293
cargo:warning=   6:        0x10b491a58 - rust_begin_unwind
cargo:warning=   7:        0x10b4a21a1 - core::panicking::panic_fmt::hdf67eedb88644e1e
cargo:warning=   8:        0x10b487a1e - core::result::unwrap_failed::h72e112a4d5b9862c
cargo:warning=   9:        0x10b487c2c - core::result::Result<T,E>::unwrap::hd3ca7ccf5659392e
cargo:warning=  10:        0x10b48500a - gcc_shim::main::h533f983c23ce4b8d
cargo:warning=  11:        0x10b485841 - std::rt::lang_start::{{closure}}::h02cd9a674d8a658f
cargo:warning=  12:        0x10b491a37 - std::panicking::try::do_call::h1252fc9a2ff235eb
cargo:warning=  13:        0x10b493a6e - __rust_maybe_catch_panic
cargo:warning=  14:        0x10b4923fd - std::rt::lang_start_internal::h4c054360e442146c
cargo:warning=  15:        0x10b485821 - std::rt::lang_start::h4f275a1c31c55923
cargo:warning=  16:        0x10b485191 - main

error occurred: Command "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-m64" "-o" "/[...]/cc-rs/target/debug/gcc-test.m754lUmxjWLh/foo.o" "-c" "foo.c" with args "cc" did not execute successfully (status code exit code: 101).

I cannot reproduce the panic if I replace cargo test with cargo test -- --test-threads 1.
The panic comes arbitrarily from (a) one of the two uses of File::create in src/bin/gcc-shim.rs and (b) one of the stub executables (cc, ar, etc.)

I'm not really sure what's causing this.
After looking around the std::fs API docs, on a whim, I tried replacing File::create(path) with OpenOptions::new().write(true).create_new(true).open(path), but the panic returned.

Interesting note: If I replace File::create(path) with File::create(path).or_else(|_| File::create(path)), I don't get a panic after running it for many minutes.

FWIW all of the tests were written to be run single-threaded, so there's probably a lot of things lurking here and there...

I see. But this is still a strange one. Do you have any idea why it might be happening?

This in specific sorry no, no idea why it's happening :(

Can you reproduce it?

Sorry I'm not currently trying since I'm busy elsewhere.

No problem. I would appreciate it if you could try when you have time.

For the record, the problem appears to be due to hard-linking (std::fs::hard_link) the gcc-shim executable, and it only happens on macOS out of all the targets tested on Azure. It's a strange problem since it doesn't happen every time, but at least it's often enough to make it easily reproducible. The simplest solution seems to be copying (std::fs::copy) instead of hard-linking it.

On reflection, this could be an Apple File System (APFS) issue. I didn't try any other file systems.

As a follow-up for posterity's sake, I could reproduce the issue on an HFS+ file system but not on an exFAT file system (using a mounted disk image created by Disk Utility).


Update README.md to include sampler and estimator

Summary
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
7 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.001%) to 87.243%

Files with Coverage Reduction
New Missed Lines
%

crates/qasm2/src/expr.rs
1
93.76%

qiskit/extensions/quantum_initializer/squ.py
2
80.0%

crates/qasm2/src/lex.rs
4
90.63%

Totals

Change from base Build<PHONE_NUMBER>:
-0.001%

Covered Lines:
74244

Relevant Lines:
85100

💛  - Coveralls

Labeling as on hold as there is a chain of changes going on the README right now: https://github.com/mtreinish/qiskit-core/pull/19 is on top of https://github.com/Qiskit/qiskit-terra/pull/10530 .

As this PR is moving forward quickly, let's consider it before https://github.com/Qiskit/qiskit-terra/pull/10530 (I can solve the conflicts there after this one is merged). Removing on hold.

We need a code owner to reapprove to merge.

@abbycross this is now merged, so perhaps open a new PR with your edits?

@abbycross this is now merged, so perhaps open a new PR with your edits?

Will do -- I guess it wasn't kidding when it said it would auto-merge once all requirements are met 😆


Added EGLD to Token Metadata

Project official website: https://elrond.com/

Project official social:
https://bitcointalk.org/index.php?topic=5173310
https://twitter.com/elrondnetwork
https://www.reddit.com/r/elrondnetwork/

Could you please verify your smart contract address here? https://iotexscout.io/verifyContract

Are you from elrond team? Mind start a conversation with me on twitter or telegram?

couldn't verify. closing for now. please resubmit if needed.


Search for specific MAC

Hi,
I'd like to use this to search for a specific client MAC address.
I've spent hours trying to do it with little to no success!
Could you point me in the right direction?
Thanks

@PGtips240 maybe you can check the code at this fork of my project which seems to implement some kind of mac filtering. https://github.com/GitaiQAQ/esp8266-sniffer
At this commit:
https://github.com/GitaiQAQ/esp8266-sniffer/commit/2b729cdc4936059ca1ba6b33174837a59763b529

@kalanda that's the kind of thing I was looking for, I was trying to print out the RSSI to a i2c oled and was hoping a relatively easy if statement would do it, however it doesn't seem to be working!!
Thanks for getting back to me so quickly.

Great! 👍


Reuse already defined types

We should avoid creating multiple structurally identical types. E.g. for the following JSON:
{
  "pointA": {
    "x": 3,
    "y": 5
  },
  "pointB": {
    "x": 3,
    "y": 5
  }
}

We currently generate this:
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
struct Rect {
    #[serde(rename = "pointA")]
    point_a: PointA,
    #[serde(rename = "pointB")]
    point_b: PointB,
}

#[derive(Default, Debug, Clone, Serialize, Deserialize)]
struct PointB {
    x: i64,
    y: i64,
}

#[derive(Default, Debug, Clone, Serialize, Deserialize)]
struct PointA {
    x: i64,
    y: i64,
}

But we want something like this:
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
struct Rect {
    #[serde(rename = "pointA")]
    point_a: Point,
    #[serde(rename = "pointB")]
    point_b: Point,
}

#[derive(Default, Debug, Clone, Serialize, Deserialize)]
struct Point {
    x: i64,
    y: i64,
}

Also this seems to not generate any code
[{"key": "10"}, {"key": "2"}, {"key": "1"}]
Should be
struct Item {
    key: String,
}
type TypeName = Vec<Item>;

Also this seems to not generate any code
[{"key": "10"}, {"key": "2"}, {"key": "1"}]

Hmm, that seems weird. Getting output both from the CLI and the old web interface. What interface are you using?


put ressources in repo instead of remotely

let’s also make sure we have the needed resources in our repos, if people want to deploy somewhere else in the future (cf @martinjaggi)
currently, our gcloud server is hosting some images, models, and datasets. we should not depend on it.

I think assets were removed from the repo in the past to make it more lightweight but we could rely on git-lfs rather than gcloud

we could rely on git-lfs rather than gcloud

that's the way to go, and what I'm implementing for wikitext (used to test LLM models)

Task have a DisplayInformation field that allow for an example image to be added. theses images are stored on Google storage. to have theses ressources locally (and to not immensly increase discojs-core bundle size), it will need to be provided via the server.
thus implementing #647 makes sense to do before.

having users using git-lfs is non-trivial for general use. let's add a way to download theses from the server, and a button "use sample data" on the webapp.


JavaFX will be removed from JDK as of Java 11

As of Java 11, next LTS release, JavaFX is decoupled from JDK.
https://www.infoworld.com/article/3261066/java/javafx-will-be-removed-from-the-java-jdk.html
While it should still be possible to run Luke by installing JavaFX, that will be bothersome for many users.
We had better to look for Swing based alternatives or consider going back to Apache Pivot.
(Or can we bundle javafx runtime with Luke distribution?)
https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html

Some information from Oracle White Paper: "Java Client Roadmap Update "
https://www.oracle.com/technetwork/java/javase/javaclientroadmapupdate2018mar-4414431.pdf

Oracle will continue to support JavaFX new fixes for Java SE 8 until 2022.
Having open sourced JavaFX and related tools, Oracle is working with interested
third parties to make it easier to build and maintain JavaFX as a separately
distributable open-source module.
Oracle will continue developing Swing and AWT in Java SE 8 and Java SE 11 (18.9 LTS).
This means they will be supported by Oracle through at least 2026.

OpenJFX planning to release together with java 11, it should be possible to download it as dependency like all rest libraries.

@MaximKulikov Thanks to let me know, I will research the project. Seems there are concerns about licensing issues that should be cleared. OpenJFX is licensed under GPL, this is not compatible with ALv2 (but I am not an expert.)

Just a reminder: This issue makes it possible to include JavaFX as pom dependencies.
https://github.com/javafxports/openjdk-jfx/issues/52

@DmitryKan asked on twitter so... I'd give some advice, but I'm not sure what the specific question is.  In terms of license compatibility for your own projects, I can't help (I'm not your lawyer).  :innocent:
If you want to someday submit your project or code to an Apache project, then you need to be ready to follow the ASF's licensing policy - start here and read the next few FAQ entries:
https://www.apache.org/legal/resolved.html#category-a
If you have more questions, ask on the publicly-archived<EMAIL_ADDRESS>list - or, if you have worked with the Lucene project before, ask on their dev@ list for help.
https://www.apache.org/foundation/mailinglists.html#foundation-legal
Note: having a very specific question is important.
In general, relying on common build or related tools - even GPL - is fine for building an Apache project.  But the intent of the ASF's own licensing policy is that all software code the ASF releases is essentially under the Apache license, or other licenses that are no more restrictive than Apache-2.0.

@ShaneCurcuru Thank you kindly for advise and pointers. I examined licensing policy page, and consulted to Lucene project committers. We would ask questions through proper channels provided by  ASF. Your comments are very helpful for us!

@ShaneCurcuru thanks a lot for your quick reply! Apologies for not being specific on twitter: social media effect at play :) As a context, @mocobeta has sent a pull request to Apache Lucene and our target here is to abide by ALv2.

Great, glad to help!  Licensing is tricky, because it depends on what your goals are - and which lawyers you ask for advice when it comes to details.  Also, the ASF has specific goals for our own software that are separate from our license, so it's a slightly different question if you just want to use Apache-2.0, or if you want to come to the Apache Incubator.

@mocobeta not directly related to this ticket, but wanted to throw an idea of electronjs: https://electronjs.org/
Especially if considering to make Luke part of for instance Solr. It will have a downside of integrating with Solr specifically too deep, but will offer a desktop application "for free".

@DmitryKey Thanks your suggestion, electron is attractive for the cross platform application (I've never used it so far.) I think it's a viable option for this project... but when it comes to make it as a module of Apache Lucene, the discussion would be not so trivial.
Electron essentially introduces all of web goodies and baddies into the app. I mean, it may not be banned, just an open question.

@mocobeta totally agree. When I met folks from Apache back in 2015, they were supportive of making Luke as a standalone project. We can keep this option open too.

Update:
I have pushed luke-swing branch:
https://github.com/DmitryKey/luke/tree/luke-swing
This branch works with JDK only.
All features of current JavaFX version was already re-implemented on top of Swing. However, a lot  works for look & feel adjastments and color schema settings are still remained.
I will work for creating the 7.5.0 release (#117,) this will include the JavaFX edition and the Swing one, next week.
Also, we should test it with JDK 11 and JavaFX 11.

I have published the first release of Swing edition Luke. It works with JDK 8/9/10/11.
https://github.com/DmitryKey/luke/releases/tag/luke-swing-7.5.0

Main branch is now running Swing Luke with unit testing on Travis CI.
The backup branch for JavaFX is here: https://github.com/DmitryKey/luke/tree/luke-javafx
As of the next release, 7.6.0 or 8.0.0 (it's depends on Lucene project,) we will release Swing Luke only and stop maintaining JavaFX branch.
So, this issue can be closed.
Thank you all for your comments and advices!


Validator result interface proposal

This is a proposal of ResultInterface about the stateless validator proposal made in:

https://github.com/zendframework/zend-validator/issues/1
https://github.com/bakura10/zend-validator/pull/1

/cc @bakura10 @zendframework/community-review-team

I agree with @manuakasam , this is highly confusing. Usage in my PR is much easier. People should not having to deal with two different objects for retrieving messages error. The workflow should staty like this:
$result = $validator->validate('foo');

if (!$result->isValid()) {
   foreach ($result->getMessages() as $message) {
      echo $message;
   }
}

This is the typical and most common use case. Translation should only be used for people that needs it. I really don't like this proposal :(.

Also, I'm not sure what you are trying to do here. Trying to integrate the validation result stuff into the 2.x branch? This is a BC, all the validators are not stateless, you are going to go through a lot of pain and hazardous process if you try to make this BC with current architecture.
Also, there are other things I'd like to refactor in the validators themselves to make them more coherent with ZF conventions, so I'd prefer to do all the BC at once.

Also please have a look at my own implementation for different way to solve the same issue https://github.com/bakura10/zend-validator/pull/1

I like the idea of @weierophinney about to use a helper function for to translate the message
I would like to extend de concept of translate to not only an optional feature for HumanLanguageA <=> HumanLanguageB but make it a requirement for do ErrorCode => HumanLanguageX
In such case the translation tool should look for the error code in a message collection and interpolate the message with the validation context and values cardinality
In resume:

Message templates associated to a validator (text-domain)
Validation error code for choose a single template (translation template)
A validation context collection of values for freedom on make contextualized error messages.
Each value have a cardinality associated for proper use of plurals, etc.

For translations, it could make sense to rely on intl's MessageFormatter, as it works much nicer with formatting multiple different variable types in a single message, as opposed to how gettext's plural handling is always based on a single value.

Marking as 3.0, as returning a result instance is a BC break from current usage.

This repository has been moved to laminas/laminas-validator. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

Squash all commits in your branch (git rebase -i origin/{branch})
Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
Run the laminas/laminas-migration tool on the code.
Clone laminas/laminas-validator to another directory.
Copy the files from the second bullet point to the clone of laminas/laminas-validator.
In your clone of laminas/laminas-validator, commit the files, push to your fork, and open the new PR.
We will be providing tooling via laminas/laminas-migration soon to help  automate the process.


[BugFix] Fix invalid compaction when meta change between compaction create and execute

What type of PR is this：

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：

Fixes #17280
Problem Summary(Required) ：

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto backported to target branch

[x] 2.5
[ ] 2.4
[ ] 2.3
[ ] 2.2

run starrocks_admit_test

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.meegoo seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

run starrocks_admit_test

@Mergifyio backport branch-2.5


Design and Develop "VIP Foodie Events" Page

Hey @sunny0625 @khushi-joshi-05
I would like to design and develop a new "VIP Foodie Events" page for website, Foodie. This page will highlight exclusive events for VIP users, showcasing special offers, event details, and RSVP options.

Hey @sunny0625 @khushi-joshi-05 pls assign this issue to me


Escape HTML entities in doc comments

I'm not sure if this is Sami issue or not. I just stumbled on the api documentation of Twig 2:

Twig_TokenParser_Block (Source)

The block reads
 {% block head %}
 {% endblock %}`

...inside is a

Having this issue as well - we have a reference to a <select> tag in one of our classes, and it throws off the whole page: https://github.com/silverstripe/silverstripe-framework/blob/4.0/src/Forms/DropdownField.php#L9
If it's a Twig bug/feature then happy to raise it there as well.

Looks like you can use backticks to escape HTML, like with markdown

Anyone have thoughts on how to fix this? Maybe it's a simple matter of adding htmlspecialchars() somewhere? Probably not as I suspect there's a fancier equivalent somewhere but brainstorming is encouraged. :)
In the meantime I followed @robbieaverill 's backtick workaround although my use case involved an XML parser class so you can imagine how many backticks were required ;)

Is this still an issue if you put the desired HTML into <pre>/<code> (or backticks for the latter)? If you want to show HTML code as-is, you should put them into pre or code tags. The rendering gets effectively done by michelf/php-markdown, which does escaping for codeblocks.


Upgrade node-home-assistant dependency

I made a handful of changes to node-home-assistant which all the node-red nodes in this project use to facilitate communication with Home Assistant.  Need to update dependency and fix breakages ( hopefully without any outward impact )

Done and merged


Revert "Remove field preserveUnknownFields from CRDs"

The preserveUnknownFields flag was removed previously to maintain support for kube v1.14.  With the move to CRD v1 (from v1beta1) we will no longer be able to support kube 1.14 and earlier, so I think it makes sense now to revert the previous change.
See https://github.com/coreos/prometheus-operator/issues/3178

cc @brancz @dgrisonnet

lgtm

Looks good at first sight but would like another review @lilic.


Is there an issue with the generated keyboard descriptor?

Hi, I'm building a keyboard and am currently using this crate. I'm currently using it on MacOS.
I noticed I'm receiving phantom key inputs when I hold down 4 or more keys. Normally this would sound like ghosting, but my keyboard has diodes on every switch, and I verified with probe-run and defmt that I'm not adding these characters to the KeyboardReport struct.

When 3 keys are held down and a fourth is pressed

The letter a gets inserted after the fourth press

When 4 keys are held down and a fifth is pressed

The letter b gets inserted after the fifth press

When 5 keys are held down and a sixth is pressed

The letter c gets inserted after the sixth press

For example:

Held keys: q, w, e

Pressing r results in qwera instead of qwer

Held keys: q, w, e, r

Pressing t results in qweratb instead of qwert

Held keys: q, w, e, r, t

Pressing y results in qweratbyc instead of qwerty

I eventually narrowed this down to the keyboard HID descriptor. I swapped it out for one from another project, and now the keyboard works properly with the scenarios above:
https://github.com/bschwind/key-ripper/pull/10
I don't yet know enough about USB HID descriptors to say what's going on, but it feels like a byte is out of place somewhere.

How are you filling in the descriptor? There should be 6 slots for scancodes:
https://github.com/twitchyliquid64/usbd-hid/blob/d0a80008476d74ef2017908ce256dc56bfc396b1/src/descriptor.rs#L83

I start with an array of 6 zeroes. Then as I walk over my key matrix I push up to 6 keycodes into that keycodes array.
You can see the code for that here:
https://github.com/bschwind/key-ripper/blob/main/firmware/src/main.rs#L222

Gotcha!
I've got two possible theories right now:

The OSX HID parser is hardcoded or being needy - unfortunately stub HID implementations are all too common. Do you see the same behavior on Linux? The Linux parser is the only one i trust not to get all uppity.
The descriptor or the report is subtly malformed. Can you dump the bytes for the descriptor + a report-with-4-keys-pressed, and we can go through it manually to verify?

I'll test this on a linux machine this Thursday when I have access to one, currently sitting out the rest of a quarantine period after covid 😅
Here's the descriptor I currently get from KeyboardReport::desc():
0x05,0x01
0x09,0x06
0xa1,0x01
0x05,0x07
0x19,0xe0
0x29,0xe7
0x15,0x00
0x25,0x01
0x75,0x01
0x95,0x08
0x81,0x02
0x19,0x00
0x29,0xff
0x26,0xff
0x00,0x75
0x08,0x95
0x01,0x81
0x03,0x05
0x08,0x19
0x01,0x29
0x05,0x25
0x01,0x75
0x01,0x95
0x05,0x91
0x02,0x95
0x03,0x91
0x03,0x05
0x07,0x19
0x00,0x29
0xdd,0x26
0xff,0x00
0x75,0x08
0x95,0x06
0x81,0x00
0xc0

Here's a report with 4 keys pressed:
INFO  Descriptor: modifier=0, reserved=0, leds=0, keycodes=[20, 26, 8, 21, 0, 0]

INFO  serialized: [0, 0, 20, 26, 8, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

With a different HID (specified here), I get:
INFO  Descriptor: modifier=0, reserved=0, leds=0, keycodes=[20, 26, 8, 21, 0, 0]

INFO  serialized: [0, 0, 20, 26, 8, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Hi @twitchyliquid64, sorry to get back to you so late on this.
I tested the keyboard with your descriptor on a linux machine and it functioned correctly, so this seems to be a quirk with macos.


Runtime-provided templates

I currently have a use-case where users should be able to provide the template and I just fill it in during runtime and generate the resulting text. Is this possible with yarte? All examples show that you have to specify the path to the template, but in my case this is not possible.

The template will never be incorporated at runtime. For security and performance reasons the logic of must be known at compile time. I recommend you frame all your logic in compilation time.

I normally do agree on that, but in my use case that doesn't really matter.
I did hope that it was possible with yarte as it is one of the faster frameworks.

With kubernetes you can compile and serve the container in a safe and fast way without the need for the framework to have support for it.

Thanks for pointing me out to an alternative :)

You can implement a template in runtime implement Render* or fmt :: Display traits. Even integrate the nested tera template or any other. An example is https://docs.rs/yarte/0.12.1/yarte/struct.Json.html. https://docs.rs/yarte/0.12.1/yarte/#traits
Excuse me, I thought that with your mastery you would have taken it into account.

Oh, I skimmed through the docs but it seems that I missed the render traits. Thanks for pointing them out!