after upgrading to version 0.76.0, the application began to weigh 2 times more

Description
after updating to 0.76.0, the application began to weigh 2 times more.
since version 0.74.0, the weight of the application was 39 mb.  updated to 0.76.0 - the size of the application has become 79mb
Steps to reproduce
./gradlew clean &&   ./gradlew assembleRelease
React Native Version
0.76.0
Affected Platforms
Runtime - Android
Output of npx react-native info
$ npx react-native info
info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.22631
  CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-13620H
  Memory: 3.90 GB / 15.71 GB
Binaries:
  Node:
    version: 20.14.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
  npm:
    version: 10.7.0
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-241.15989.150.2411.11948838
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.11
    path: /c/Program Files/Microsoft/jdk-<IP_ADDRESS>-hotspot/bin/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs
Package.jso:

{
    "name": "my_app",
    "version": "2.5.19",
    "private": true,
    "scripts": {
        "android": "react-native run-android --active-arch-only",
        "ios": "react-native run-ios",
        "lint": "eslint .",
        "start": "react-native start",
        "test": "jest"
    },
    "dependencies": {
        "@react-native-async-storage/async-storage": "^2.0.0",
        "@react-native-community/netinfo": "^11.4.1",
        "@react-native-community/slider": "^4.5.5",
        "@react-native-firebase/analytics": "^21.2.0",
        "@react-native-firebase/app": "^21.2.0",
        "@react-native-firebase/crashlytics": "^21.2.0",
        "@react-native-firebase/messaging": "^21.2.0",
        "@react-native-firebase/storage": "^21.2.0",
        "@react-native-masked-view/masked-view": "^0.3.1",
        "@react-navigation/drawer": "^6.7.2",
        "@react-navigation/native": "^6.1.18",
        "@react-navigation/native-stack": "^6.11.0",
        "axios": "^1.7.7",
        "manage-external-storage": "^0.1.3",
        "moment": "^2.30.1",
        "qs": "^6.13.0",
        "react": "18.3.1",
        "react-native": "0.76.0",
        "react-native-blob-util": "^0.19.11",
        "react-native-document-picker": "^9.3.1",
        "react-native-gesture-handler": "^2.20.2",
        "react-native-photo-manipulator": "^1.8.1",
        "react-native-reanimated": "^3.16.1",
        "react-native-safe-area-context": "^4.11.1",
        "react-native-screens": "^3.35.0",
        "react-native-system-navigation-bar": "^2.6.4",
        "react-native-vector-icons": "^10.2.0",
        "react-native-webview": "^13.12.3",
        "yandex-mobile-ads": "^0.1.1"
    },
    "devDependencies": {
        "@babel/core": "^7.26.0",
        "@babel/preset-env": "^7.26.0",
        "@babel/runtime": "^7.26.0",
        "@react-native-community/cli": "15.0.0",
        "@react-native-community/cli-platform-android": "15.0.0",
        "@react-native-community/cli-platform-ios": "15.0.0",
        "@react-native/babel-preset": "0.76.0",
        "@react-native/eslint-config": "0.76.0",
        "@react-native/metro-config": "0.76.0",
        "@react-native/typescript-config": "0.76.0",
        "@tsconfig/react-native": "^3.0.5",
        "@types/jest": "^29.5.14",
        "@types/react": "^18.3.12",
        "@types/react-test-renderer": "^18.3.0",
        "babel-jest": "^29.7.0",
        "eslint": "^9.13.0",
        "jest": "^29.7.0",
        "prettier": "3.3.3",
        "react-test-renderer": "18.3.1",
        "typescript": "5.6.3"
    },
    "engines": {
        "node": ">=18"
    }
}

Reproducer
https://github.com/facebook/react-native
Screenshots and Videos
No response

Hey @valery-lavrik, can you share a reproducer with minimal dependencies?
The issue here could be your project's dependencies.

since version 0.74.0, the weight of the application was 39 mb. updated to 0.76.0 - the size of the application has become 79mb

Also how are you measuring the size of your application? @valery-lavrik ?

since version 0.74.0, the weight of the application was 39 mb. updated to 0.76.0 - the size of the application has become 79mb

Also how are you measuring the size of your application? @valery-lavrik ?

just checking the size of the apk file after the build

Hey @valery-lavrik, can you share a reproducer with minimal dependencies?
The issue here could be your project's dependencies.

I thought that it might be not only react-native, but also the packages that I had to update to get the application to start. Do you happen to know how to view which of the packages in package.how much space does json take up in the apk file?  I can't think of a way right away...

Hey @valery-lavrik, can you share a reproducer with minimal dependencies?
The issue here could be your project's dependencies.

I thought that it might be not only react-native, but also the packages that I had to update to get the application to start. Do you happen to know how to view which of the packages in package.how much space does json take up in the apk file?  I can't think of a way right away...

You can compare your apk in the Android Studio Apk Analyzer.

Hey @valery-lavrik, can you share a reproducer with minimal dependencies?
The issue here could be your project's dependencies.

I thought that it might be not only react-native, but also the packages that I had to update to get the application to start. Do you happen to know how to view which of the packages in package.how much space does json take up in the apk file?  I can't think of a way right away...

You can compare your apk in the

https://github.com/user-attachments/assets/747cf4fd-143f-48ce-9aa5-71d6297b4aac
Android Studio Apk Analyzer.
It doesn't work for some reason...  What am I doing wrong?  (attached video)

Hey @valery-lavrik, can you share a reproducer with minimal dependencies?
The issue here could be your project's dependencies.

I thought that it might be not only react-native, but also the packages that I had to update to get the application to start. Do you happen to know how to view which of the packages in package.how much space does json take up in the apk file?  I can't think of a way right away...

You can compare your apk in the

2024-10-28.151125.mp4
Android Studio Apk Analyzer.
It doesn't work for some reason... What am I doing wrong? (attached video)

You need to select the previous apk and then the latest one.

Hey @valery-lavrik, can you share a reproducer with minimal dependencies?
The issue here could be your project's dependencies.

I thought that it might be not only react-native, but also the packages that I had to update to get the application to start. Do you happen to know how to view which of the packages in package.how much space does json take up in the apk file?  I can't think of a way right away...

You can compare your apk in the

2024-10-28.151125.mp4
Android Studio Apk Analyzer.
It doesn't work for some reason... What am I doing wrong? (attached video)

You need to select the previous apk and then the latest one.

What do you mean, the previous one?  I have one apk file and that's it...

@valery-lavrik You need to select the apk generated in version v0.74.0 (39 mb) and then the new apk generated in version v0.76.0

@valery-lavrik You need to select the apk generated in version v0.74.0 (39 mb) and then the new apk generated in version v0.76.0

But this is not a comparison of two files, but an analysis of one. There's clearly something wrong here...
Anyway, I found an online tool that showed me this picture

x86 I tried to open

It looks like it's about react-native. But I don't understand what it is yet.

Here is a comparison of the two versions

But this is not a comparison of two files, but an analysis of one. There's clearly something wrong here...

I believe this is introduced by AGP 8.3 as reported by other users here:
https://issuetracker.google.com/issues/330756859
You can verify this by upgrading to 0.75 instead of 0.76.
The answer is that you can't just compare the disk size of the APKs as the APK content get compressed differently between different AGP versions (which we bump between RN versions).
I've used the official APK analyser from Google and those are the results of the difference between versions. The delta seems to be in ~10Mb added (which is still a lot, but not a 2x increase).

Also I see you ship a universal APK which is not recommended if you're concerned on APK size. You should instead ship an AAB so the user will download only the needed architecture.

But this is not a comparison of two files, but an analysis of one. There's clearly something wrong here...

I believe this is introduced by AGP 8.3 as reported by other users here: https://issuetracker.google.com/issues/330756859
You can verify this by upgrading to 0.75 instead of 0.76.
The answer is that you can't just compare the disk size of the APKs as the APK content get compressed differently between different AGP versions (which we bump between RN versions).
I've used the official APK analyser from Google and those are the results of the difference between versions. The delta seems to be in ~10Mb added (which is still a lot, but not a 2x increase).

Also I see you ship a universal APK which is not recommended if you're concerned on APK size. You should instead ship an AAB so the user will download only the needed architecture.

what can I do in the end if I want to use RN 0.76.0 and still not lose the file size?  Any ideas?  (I can't use aab for various reasons)

what can I do in the end if I want to use RN 0.76.0 and still not lose the file size? Any ideas?

Can you try to upgrade to 0.75.x and report what's the size difference?

Note that, minSdk bump changed default behavior of extractNativeLibs. On old version of Android, native binaries in APK were compressed, but then during installation, Android would decompress them into a new copy, and you would end up locally with two copies of each binary. Google changed the default to instead ship uncompressed native binaries, because despite the larger looking APK, it takes less space on the actual device.

what can I do in the end if I want to use RN 0.76.0 and still not lose the file size? Any ideas?

Can you try to upgrade to 0.75.x and report what's the size difference?

I conducted an experiment with assemblies:
0.73.5 - 35mb - https://disk.yandex.ru/d/YpF1K_DXu1BstA
0.75.4 - 83.9mb - https://disk.yandex.ru/d/wgp8iIv5jdRPmA
0.76.0 - 79.4mb - https://disk.yandex.ru/d/DBgH6SauAP16ZQ
It seems that something happened in version 75 that greatly increased the size of the application. but it is unclear what exactly...

0.73.5 - 35mb - disk.yandex.ru/d/YpF1K_DXu1BstA
0.75.4 - 83.9mb - disk.yandex.ru/d/wgp8iIv5jdRPmA
0.76.0 - 79.4mb - disk.yandex.ru/d/DBgH6SauAP16ZQ

In your original post you mentioned:

since version 0.74.0, the weight of the application was 39 mb.

But here you point out to 0.73.5, what is the right version you're starting from @valery-lavrik?
Anyway as I already shared above, the way how things are compressed inside the APK changed due to AGP 8.3 (shipped in 0.75).
The reccomendation is to use AAB, but if you can't my suggestion is to either:

Play with the extractNativeLibs as @NickGerleman suggested.
Create a split APK (one per architecture).
Attempt to downgrade AGP to 8.2 (you can do so by patch-packaging the libs.versions.toml file inside @react-native/gradle-plugin.

Ultimately, this is a problem with Android and not with React Native itself so it might be worth raising an issue with the Google Issue Tracker.

But here you point out to 0.73.5, what is the right version you're starting from @valery-lavrik?

The fact is that I've been playing with different versions of react-native and related packages for 3 days now. Probably, the versions of additional packages have changed in today's build, but this does not change the essence.
In any case, I understood the reason, and I will try to follow your recommendations. Thanks for the help!

In any case, I understood the reason, and I will try to follow your recommendations. Thanks for the help!

I'm closing this as there is nothing to fix inside React Native. Feel free to report back if you find a solution that could also help others 👍

Just for information, if anyone comes across my problem.
Experimenting with the parameter
android:extractNativeLibs="true"
I managed to reduce the size of the apk file
android:extractNativeLibs="false" - 79mb
android:extractNativeLibs="true" - 37mb
I studied what this parameter means and if I understood everything correctly, it should have been the other way around but not. But testing has shown the opposite. I must have misunderstood something. Well, that's fine! the main thing is that I managed to reduce the size of the apk file

It's working

Just for information, if anyone comes across my problem.
Experimenting with the parameter extractNativeLibs
I managed to reduce the size of the apk file android:extractNativeLibs="false" - 79mb android:extractNativeLibs="true" - 37mb
I studied what this parameter means and if I understood everything correctly, it should have been the other way around but not. But testing has shown the opposite. I must have misunderstood something. Well, that's fine! the main thing is that I managed to reduce the size of the apk file

It's working.
Thank you @valery-lavrik

The above flag reduces APK size, but will make the app larger on device, and is discouraged by Google for a reason. I would not use it blindly.

The above flag reduces APK size, but will make the app larger on device, and is discouraged by Google for a reason. I would not use it blindly.

Can this affect the braking in the app?  Lags when changing the screen orientation, rendering by steps, etc.


Proper secret and api key support

This PR adds proper command line support for --secret and --key options to folder_sniper. This is in direct response to a Flywheel customer request.
It also contains a number of other overdue cleanup items. Reviewing each commit separately should make things clear.
@ryansanford
A minor update to the scitran/core dev scripting is required to accommodate this. Hence, the blocked tag. Flywheel infra changes may also be required. Probably best to get a checklist started here.
I would like to apply the same enhancement to dicom_reaper, dicom_sniper, and pfile_reaper, by updating reaper.py, which will likely require further Flywheel infra changes, but no additional scitran/core changes. @ryansanford Let me know if I may add those here.

@gsfr Please add the option to those other tools here. I presume relocating the arg to reaper.py will mean orthanc_reaper will be covered as well?

Changes are made. orthanc_reaper is covered.
I also took out the option to upload to multiple targets (-u flag) sequentially, which had no use case, and would have been cumbersome to reconcile with the new auth option flags. Calling code needs to drop the -u flag.
I've added appropriate commits to the related Flywheel PRs.


tensorflow/go: operation attribute getters

This adds the ability to fetch operation attributes. This is needed for any sort of graph rewriting ability.
The tests on this are pretty minimal since I wasn't sure the best way to test all of the attributes. Hunting down operations that match each param seems like a huge pain and the C api style of creating test ops isn't currently possible from Go. https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api_test.cc#L1703-L1753
Not sure if it'd be possible to add in a small .h and .cc file containing just those lines while running the Go tests. Thoughts?

Yeah, that's probably a sane way of doing things. The C api is a bit over verbose.


add known limitation + workaround on using DMS with RBR tables

DOC-6208

Document a known limitation + workaround when using DMS to migrate to a multi-region cluster with RBR tables.
Clarify the crdb_region table in the RBR table description.

tables with hash sharded indexes will have a similar problem, if you want to introduce that later.

For sure. Can you provide more context on this, and we can add to a separate issue?

in general, hidden columns are not well supported by DMS. examples: rowid is an implicit hidden column, regional by row adds a hidden crdb_region column at the front. hash sharded indexes (https://www.cockroachlabs.com/docs/stable/hash-sharded-indexes#:~:text=Hash-sharded indexes distribute sequential,small cost to read performance.) have the same issue as it adds an implicit crdb_internal_ts_shard_16 column at the start


RasterCache does not cache pictures under perspective transforms

When testing raster caching under a perspective transform I discovered that the cache is not caching moving pictures (which is correct), but it is also not caching stationary pictures (which was unexpected). See attached example.
It does not and should not cache pictures which are moving under a perspective transform because their size will change as they simply translate around the scene and are affected by the perspective. This means that even if we fix bugs in the math as indicated below, caching won't help with anything that moves or scrolls inside a perspective transform.
A stationary object could be cached, but due to the way we do our math we end up failing to cache them. In diagnosing the problem I saw that it was correctly doing the bookkeeping, but somehow the matrices failed to match from Preroll to Paint, leaving the entry "unused" and evicted at the end of the frame, never accumulating enough appearances to be populated. The matrix looked identical, but had "off by 1 bit" errors in some of the matrix elements. Looking through the code I believe this may be due to one matrix being accumulated as an SkMatrix in the Preroll and the other being accumulated inside the SkCanvas where it uses a full SkM44 to get more accurate math. There is already an issue filed to upgrade our internal math to SkM44 for other reasons and it will be interesting to see if that change fixes this discrepancy.
In the code sample below it draws 2 "pictures". One is a large blue box in the middle and the other is a small green box that moves around its edges. The checkerboardRasterCache flag is set so that you can see the pattern on them indicating that they are in the cache. They are tagged as "isComplex = true, willChange = false" in their CustomPaint objects to ensure that they are cached even though they are just simple boxes.
Both are cached when the example starts up as planned. But when the perspective checkbox is checked, a perspective transform is added to the mix. At that point it can be seen that the green box running around the outside is not cached and probably should not be since its size is constantly changing. But, it can also be seen that the center blue box is not cached even though it doesn't move or change size.

Code sample
import 'dart:math';

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      checkerboardRasterCacheImages: true,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

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

  final String title;

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

class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateMixin {
  bool _usePerspective = false;
  late AnimationController _controller;

  @override
  void initState() {
    super.initState();
    _controller = AnimationController(vsync: this, upperBound: 4);
    _controller.repeat(period: const Duration(seconds: 4));
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    Matrix4 matrix = Matrix4.identity();
    if (_usePerspective) {
      matrix.setEntry(3, 2, 0.001);
      matrix.rotateX(pi / 3);
      matrix.rotateY(pi / 6);
    }
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
        actions: <Widget>[
          Row(
            children: <Widget>[
              const Text('perspective:'),
              Checkbox(
                value: _usePerspective,
                onChanged: (value) => setState(() {
                  _usePerspective = value!;
                }),
              )
            ],
          ),
        ],
      ),
      body: Center(
        child: Transform(
          alignment: Alignment.center,
          transform: matrix,
          child: SizedBox(width: 300, height: 300,
            child: Stack(
              children: <Widget>[
                Positioned.fromRect(
                  rect: const Rect.fromLTRB(25, 25, 275, 275),
                  child: RepaintBoundary(
                    child: CustomPaint(
                      isComplex: true,
                      willChange: false,
                      size: const Size(250, 250),
                      painter: MyPainter(Colors.blue),
                    ),
                  ),
                ),
                AnimatedBuilder(
                  animation: _controller,
                  builder: (context, child) {
                    double x, y;
                    if (_controller.value < 1) {
                      x = _controller.value * 2 - 1;
                      y = -1;
                    } else if (_controller.value < 2) {
                      x = 1;
                      y = _controller.value * 2 - 3;
                    } else if (_controller.value < 3) {
                      x = 5 - _controller.value * 2;
                      y = 1;
                    } else {
                      x = -1;
                      y = 7 - _controller.value * 2;
                    }
                    return Align(
                      alignment: Alignment(x, y),
                      child: RepaintBoundary(
                        child: CustomPaint(
                          isComplex: true,
                          willChange: false,
                          size: const Size(20, 20),
                          painter: MyPainter(Colors.green),
                        ),
                      ),
                    );
                  },
                ),
              ],
            ),
          ),
        )
      ),
    );
  }
}

class MyPainter extends CustomPainter {
  MyPainter(this.color);

  final Color color;

  @override
  void paint(Canvas canvas, Size size) {
    canvas.drawRect(Offset.zero & size, Paint()..color = color);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) => false;
}

@flar
Hey Jim, I try to run your code, and found some problems:
First I try to log the display_list raster cache like this:
bool RasterCache::Draw(const DisplayList& display_list,
                       SkCanvas& canvas,
                       const SkPaint* paint) const {
  RasterCacheKey cache_key(....);
  SkRect des = display_list.bounds();
  FML_LOG(ERROR) << "-------- DisplayList rect l:" << des.left() << " r:"<< des.right()<< " b:" << des.bottom() << " t:"<<des.top();

  auto res = Draw(cache_key, canvas, paint);
  FML_LOG(ERROR) << "-------- DisplayList id " << display_list.unique_id() << " res -----"<< res;
  return res;
}

I get this log when I run your code:(Not check the perspective)
[VERBOSE-2:raster_cache.cc(433)] -------- DisplayList rect l:-16 r:0 b:568 t:0
[VERBOSE-2:raster_cache.cc(436)] -------- DisplayList id 1 res -----0
[VERBOSE-2:raster_cache.cc(433)] -------- DisplayList rect l:0 r:320 b:568 t:0
[VERBOSE-2:raster_cache.cc(436)] -------- DisplayList id 12656 res -----0
[VERBOSE-2:raster_cache.cc(433)] -------- DisplayList rect l:0 r:250 b:250 t:0
[VERBOSE-2:raster_cache.cc(436)] -------- DisplayList id 3 res -----1
[VERBOSE-2:raster_cache.cc(433)] -------- DisplayList rect l:0 r:20 b:20 t:0
[VERBOSE-2:raster_cache.cc(436)] -------- DisplayList id 4 res -----0
[VERBOSE-2:raster_cache.cc(433)] -------- DisplayList rect l:-20 r:340 b:96 t:-20
[VERBOSE-2:raster_cache.cc(436)] -------- DisplayList id 12657 res -----0
[VERBOSE-2:raster_cache.cc(433)] -------- DisplayList rect l:246.613 r:345.304 b:73.3868 t:-25.3035
[VERBOSE-2:raster_cache.cc(436)] -------- DisplayList id 7 res -----0

According to the above Log, we can find that display_list id 3 should be our middle (250 * 250) rectangle.

But the UI shows that it does not cache.

The raster cache is a legacy feature at this point (no plans on adding it to impeller) so I'm going to close this.


Deserialize fails with Overloaded Constructors

public class Demo
{
    string a;
    public Demo(string foo)
    {
        a = foo;
    }

    public Demo(int foo)
    {
        string a = foo.ToString();
    }
}

For Above Class it fails in Deserializing, Is there any way or workaround to solve this issue ?

Add [JsonConstructor] to one of the constructors. Also the incoming JSON needs to map to the argument name for it to be used with the constructor.


Inline parent classes instead when an Error already extends an Object

Given the high frequency of cases where this pattern has been coming up, I decided to give it a spin.
The logic is the following:
when a model defines a parent class(i.e. allOf and ref ) instead of giving up we inline all of the parent's content (properties, methods, usings) removing the inheritance and allowing to extend the Error class.
Notes:
I added a second commit with a very very early proposal for integration tests covering the compilation for Java code.
It has been done to verify that the newly produced code is not going to break, but I'm fine to remove it from the current PR and follow up with a more "thought-through" process.

🚀 Amazing, thanks a lot for the support again @baywet 🚀


help

help me please.in the morning the icon through which I enter keybase disappeared and I can’t enter it now, I rebooted the computer and reinstalled the file, it doesn’t appear. How do I enter keybase and what should I do?

help me please.in the morning the icon through which I enter keybase disappeared and I can’t enter it now, I rebooted the computer and reinstalled the file, it doesn’t appear. How do I enter keybase and what should I do?


Make 'tmux split-window' compatible with tmux 3.4

Close #76

I upgraded to tmux3.4 and then realized that the "new session" feature was not working. After some searching, I found https://github.com/tmux/tmux/issues/3836#issuecomment-1942216630, after applying the changes, it works again. I also tested this change on tmux3.2a and it works fine.

Sorry for late reply, I was too busy recently :(
Thank you so much for this PR, this also fixes the issue on my machine!


Parsing .tmx: layer data should be stored as long

In the format the data is stored as UInt, which java int can't handle and so TMXLevelLoader will fail to parse some flipped tiles

@AlmasB
Is flipping tiles currently unsupported? Even if a flip is done within the bounds of int, it will still fail here:
https://github.com/AlmasB/FXGL/blob/705e65968326afca51c5be9260b09af97cc388d7/fxgl-entity/src/main/kotlin/com/almasb/fxgl/entity/level/tiled/TilesetLoader.kt#L279-L287
If you haven't started working on this yet, I'll take a look at it and get back to you with a plan.
I read through the reference on flipping tiles here and have had success describing the correct orientation with long.

Flipping should be supported, but the parsing is failing due to this issue. You are welcome to have a look and propose a plan, and we can go from there.

My idea is to store Layer.data which is now List<Int> to List<Long>.
I think something  can be done with base64 encoding with a technique like this
Then the actual flipping can be handled when calling loadView from creatTileLayerEntities like it already is when calling the overloaded loadView createObjectLayerEntities here:
https://github.com/AlmasB/FXGL/blob/b5442a8feff8d9595a5c48b330753bcfc6280e49/fxgl-entity/src/main/kotlin/com/almasb/fxgl/entity/level/tiled/TilesetLoader.kt#L72-L75
But with the addition of a diagonal flip. The 3 most sig. bits can be zeroed by anding with 0x1FFFFFFL from there to work with findTileset.

My idea is to store Layer.data which is now List to List.

Yeah, I think this is fine.

I think something can be done with base64 encoding with a technique like this

For now, let's just focus on the raw data (i.e. without base64). So we should probably have a sample to go to fxgl-samples / / sandbox where a tile has 4 states: normal, flip hor, flip ver, flip both. This sample should currently fail to load.

Then the actual flipping can be handled when calling loadView from creatTileLayerEntities like it already is when calling the overloaded loadView createObjectLayerEntities here:

I assume TilesetLoader won't have to change.

But with the addition of a diagonal flip. The 3 most sig. bits can be zeroed by anding with 0x1FFFFFFL from there to work with findTileset.

There's some code that deals with object flipping, which seems to be using UInt:
https://github.com/AlmasB/FXGL/blob/b5442a8feff8d9595a5c48b330753bcfc6280e49/fxgl-entity/src/main/kotlin/com/almasb/fxgl/entity/level/tiled/TMXLevelLoader.kt#L395-L404
Would it work in a similar way with tiles? Also there seems to be UInt in Kotlin, which may work, but I wonder if we should stick to Long to make it easier to interop with Java.

Would it work in a similar way with tiles? UInt in Kotlin may work for data (List), but I wonder if we should stick to Long to make it easier to interop with Java.

Yes it would work either way, I just went with Long because of Java and because the issue called for it.  However, kotlin Uint would save space and if you want I can go with that until I see some conflict with Java.

For now, let's just focus on the raw data (i.e. without base64). So we should probably have a sample to go to fxgl-samples / / sandbox where a tile has 4 states: normal, flip hor, flip ver, flip both. This sample should currently fail to load.

I can definitely can create a sample, I would create something like this anyway to verify the code.

I assume TilesetLoader won't have to change.

For tiles, we are creating a single ImageView by using WritableImage to place the tiles in the correct place in TilesetLoader.loadView().  I was thinking we could do something like this to rotate the image in place:
for (i in 0.. tileWidth ) {
  for (j in 0.. tileHeight) {
    buffer.pixelWriter.setArgb(i, j, sourceImage.pixelReader.getArgb( rotatedPixelX, rotatedPixelY))
  }
}

This would require a change to TilesetLoader.

I think we can move to implementation.
Long is fine, let's keep it to avoid potential issues.
I've skimmed through loadView() in tileset loader and I think the flip check needs to be done here:
https://github.com/AlmasB/FXGL/blob/b5442a8feff8d9595a5c48b330753bcfc6280e49/fxgl-entity/src/main/kotlin/com/almasb/fxgl/entity/level/tiled/TilesetLoader.kt#L92
As for the actual flipping, I think it's a useful general method we can have in Images.kt (where all image manipulation code lives). fxgl-entity reads fxgl-media (where Images file lives), so we can use it from there. I'm happy to implement:
fun flipHorizontally(Image): Image
fun flipVertically(Image): Image

This will be slower than rotating the image in place (since we effectively iterate twice), but tmx loading doesn't run in critical section of game code, so it's fine.
I will try to implement these image conversions today. If you don't have these functions for your PR, then just create two dummy ones in tileset loader and we can substitute for the real ones once they are ready.
It would be a good time to start thinking about base64 too. See if you can make it work with Long -- existing tests should be of use if something goes wrong.

@AlmasB
Hi thanks for the implementation, I have started on this tonight and noticed this:

Diagonal flips need something like this:
        val srcX = it.y
        val srcY = it.x
        val color = image.pixelReader.getColor(srcX, srcY)

This of course is tricky because of non-square tiles going out of bounds of the image. Tiled has a weird way of handling this, where a diagonally flipped rectangular tile will be present in the neighboring grid-space, although the CSV in the .tmx files still shows 0 in that tile.
I can make a check on every diagonally flipped tile to see if it will go out of bounds and crop the subTexture. Do you think this will work?

Regarding flipDiagonally(), for now let's just read the bits, but not actually do anything with the result:

val isFlipDiagonally = ...
if (isFlipDiagonally ) {
   // empty
}

We can solve this in the future, as needed.

This map has no flipped tiles but will still fail in TilesetLoader as it tries to write out of bounds. I thought it was worth mentioning because going forward, I'm not sure how you want me to handle cases in which there are non-uniform tile dimensions/map dimensions.

Well spotted, I think we should open a separate issue and not consider out-of-bounds maps that come from Tiled in the context of this one. Please can you open a bug issue.


Publish the demo CLI?

Hello @heartsucker! You mentioned in this comment that you've written a demo CLI. I was thinking about working on one, and if you have a foundation, that's even better. Could you publish it to a branch that I could iterate on? Thanks!

Heya. I need to track down the laptop that was on because it looks like that never got pushed to GH. I'll see if I can find it.

Any luck finding that laptop?

Same issue as the TLA+ models. I don't think I have access to it any more?


feat Optimize 3.9.0-preview2

Preview releases are production ready, thus bumping to latest.

Thanks @megglos
so preview is different than alpha releases ? 😅

indeed 😅 https://docs.camunda.io/docs/self-managed/optimize-deployment/version-policy/#preview-releases

TIL thanks.
Sounds a bit like a workaround for our release cycle approach :see_no_evil: Would be happy to see more frequent minor releases.


Docs specify debug to be a boolean, but if true, this would break this line

https://github.com/nostr-dev-kit/ndk/blob/556fb663b4bfb33d87674a1f741f52594c69e4a8/ndk/src/index.ts#L66
if opts provided to NDK() include debug:true, this line would create problems, since the expected value here is of debug.Debugger type

Can you point me to the docs that say this is boolean? Thanks!

https://github.com/nostr-dev-kit/ndk/tree/master/ndk#instantiate-an-ndk-instance
"debug - boolean true/false to turn on degbugging"

thanks!


lomax: Adding company expansion test case scenario

Signed-off-by: Simarpreet Singh<EMAIL_ADDRESS>

This PR works on https://github.com/opendns/lemming/issues/47


bug: Dropdown cannot be nested

What version of daisyUI are you using?
v4.4.9
Which browsers are you seeing the problem on?
All browsers, Chrome
Reproduction URL
https://play.tailwindcss.com/1WsOZ7vjkN
Describe your issue
I need to put a dropdown inside another dropdown, but as shown with Tailwind Play this is not possible.
Upon investigation, I found the problem it's in the file src/components/unstyled/dropdown.css  and src/components/styled/dropdown.css which obviously describes the dropdowns.
here you can see that the .dropdown-content class does not necessarily have to be a first-level child of the .dropdown class but it just needs to be any of its parents
More precisely, line 35 opens the dropdown inside the other dropdown even if this one is not in focus
I would suggest putting the first level child constraint > the result could be something like this
new src/components/unstyled/dropdown.css
.dropdown {
  @apply relative inline-block;
}
.dropdown > *:not(summary):focus {
  @apply outline-none;
}
.dropdown > .dropdown-content {
  @apply absolute;
}
.dropdown:is(:not(details)) > .dropdown-content {
  @apply invisible opacity-0;
}
.dropdown-end > .dropdown-content {
  @apply end-0;
}
.dropdown-left > .dropdown-content {
  @apply bottom-auto end-full top-0;
}
.dropdown-right > .dropdown-content {
  @apply bottom-auto start-full top-0;
}
.dropdown-bottom > .dropdown-content {
  @apply bottom-auto top-full;
}
.dropdown-top > .dropdown-content {
  @apply bottom-full top-auto;
}
.dropdown-end.dropdown-right > .dropdown-content {
  @apply bottom-0 top-auto;
}
.dropdown-end.dropdown-left > .dropdown-content {
  @apply bottom-0 top-auto;
}
.dropdown.dropdown-open > .dropdown-content,
.dropdown:not(.dropdown-hover):focus > .dropdown-content,
.dropdown:focus-within > .dropdown-content {
  @apply visible opacity-100;
}
@media (hover: hover) {
  .dropdown.dropdown-hover:hover > .dropdown-content {
    @apply visible opacity-100;
  }
}
.dropdown:is(details) summary::-webkit-details-marker {
  @apply hidden;
}

new src/components/styled/dropdown.css
.dropdown:is(:not(details)) > .dropdown-content {
  @apply origin-top scale-95 transform transition duration-200 ease-out;
}
.dropdown-bottom > .dropdown-content {
  @apply origin-top;
}
.dropdown-top > .dropdown-content {
  @apply origin-bottom;
}
.dropdown-left > .dropdown-content {
  @apply origin-right;
}
.dropdown-right > .dropdown-content {
  @apply origin-left;
}
.dropdown.dropdown-open > .dropdown-content,
.dropdown:focus > .dropdown-content,
.dropdown:focus-within > .dropdown-content {
  @apply scale-100;
}
@media (hover: hover) {
  .dropdown.dropdown-hover:hover > .dropdown-content {
    @apply scale-100;
  }
}

this should solve the problem, I can do the pullrequest if you want

That's... not a good idea.
A dropdown inside another dropdown is not good UX.
And in daisyUI dropdown (method 2) works with focus. In HTML, only one element can gain focus at a time so if the child dropdown gains focus, the parent will be closed.
That's not a good pattern and not something we want to add to daisyUI.
Instead of nesting dropdowns, you can use a submenu. It's much cleaner, more accessible and easier to read/develop/use:
https://play.tailwindcss.com/MeSTOduz2r


Update dist min JS to match src JS

https://github.com/Mobius1/Selectr/blob/master/dist/selectr.min.js does not match https://github.com/Mobius1/Selectr/blob/master/src/selectr.js.
This creates a issue when you include the lib using NPM, it loads the obsolete file from the dist folder which is specified in the package.json "main": "dist/selectr.min.js".
To see the difference search for this phrase this.select(0); and notice the dist min JS file is missing this IF condition: this.config.data.length > 0.

This is a huge issue for us as the XSS fixes from 8 months ago are not included in the dist/selectr.min.js (works fine using the src selectr.js. How is the min file created and can we get the npm package updated properly??


Fix [HAL] section update.

Avoid postgui.hal and custom.hal duplicates
Use correct keys for postgui.hal and shutdown.hal

Thanks


The variation message filter can't match properperly

the code that reproduces this issue or a replay of the bug

Describe the bug
Describe the bug
The variation response only  prompt but no seed, this cause message filter can't match properperly.But the api can work properly about 2 weeks ago. I think it's  caused by the update of Discord Midjourney. I see someone write an issue about the variation api response with old message, i found it is caused by the same reason.
You can see the pic2, i request a imagine with "cat" prompt , then request the variation api base on this. A few moment later ,i got the debug log in terminal, you can find the filter result is not "variation" but the "imagine"(old message).
Please forgive me for my poor English.
Expected behavior
The variation api can filter variation prompt properly
Screenshots
pic1:

pic2:

error log
I think you may need to adjust the filter logic.

thanks

https://github.com/erictik/midjourney-api/commit/ff27a37a787722f910abdae8da22eccf0b8585c8
solved


Change the commercial MP3 name?

Instead of

Commercial name                          : MPEG Audio

could MP3 be showed?
As i know it is a sensible subject i prefer ask before push a PR for that.

@JeromeMartinez Do the sponsors have any issue with a commercial name like MP3, MP2 or MP1?
Because it will ask less field to be parsed, and be more easily readable IMO.

All patents have expired, so there is nothing commercial about it. It is very important to say that mp3 is not MPEG3. 🤣


Added bfs code in c

It's already been sent. Kindly check Issues tab before sending a Pull Request!


Labels renaming

removing source_ prefix for name and resource_group labels, as they will also be used for other resources, such as channels.

/lgtm
/approve

/lgtm
/approve


[FEAT] 'splicemonitor --display-commands' to log PIDs in decimal instead of hexa

Hi @lelegard
Is your feature request related to a problem?
We can consider it is. Related to the feature enhancement required here https://github.com/tsduck/tsduck/issues/957 , I actually found out some discrepancies between splicemonitor --display-commands and splicemonitor --all-commands :

splicemonitor --all-commands works as expected, meaning:

All logs from the short event description are available in the 'long' event description
All PIDs are displayed in decimal

splicemonitor --display-commands does not entirely work as expected, or at least, does not have the same behavior than --all-commands (But I guess it should) :

Two logs from the short event description are not available in the 'long' event description: packet-index and splice-pid
All PIDs are displayed in hexadecimal

Proposed solution:
To make splicemonitor --display-commands behave exactly like splicemonitor --all-commands:

All logs from the short event description should be available in the 'long' event description
All PIDs shoud be displayed in decimal

Alternatives:
No altermatives.
Additional information:
For --all-commands:
Command:
tsp --realtime=on --bitrate 1000000 --add-input-stuffing 1/10 --initial-input-packets 7 --max-input-packets 7 --max-flushed-packets 7 -I ip <IP_ADDRESS>:11111 -l <IP_ADDRESS> --buffer-size 5000000 -P zap 1 -P history --ignore-stream-id-change -P splicemonitor --all-commands --json-line -O drop
Result:
* splicemonitor: { "#name": "event", "event-id": 67, "event-type": "out", "packet-index": 169028, "progress": "immediate", "splice-pid": 256 }
* splicemonitor: { "#name": "splice_information_table", "#nodes": [ { "#name": "splice_insert", "avail_num": 0, "avails_expected": 1, "out_of_network": true, "splice_event_cancel": false, "splice_event_id": 67, "splice_immediate": true, "unique_program_id": 12 } ], "protocol_version": 0, "pts_adjustment": 0, "tier": 0 }

For --display-commands:
Command:
tsp --realtime=on --bitrate 1000000 --add-input-stuffing 1/10 --initial-input-packets 7 --max-input-packets 7 --max-flushed-packets 7 -I ip <IP_ADDRESS>:11111 -l <IP_ADDRESS> --buffer-size 5000000 -P zap 1 -P history --ignore-stream-id-change -P splicemonitor --display-commands --json-line -O drop
Result:
* splicemonitor: { "#name": "event", "event-id": 67, "event-type": "out", "packet-index": 122026, "progress": "immediate", "splice-pid": 256 }
* splicemonitor: { "#name": "splice_information_table", "#nodes": [ { "#name": "splice_insert", "avail_num": "0", "avails_expected": "1", "out_of_network": "true", "splice_event_cancel": "false", "splice_event_id": "0x00000043", "splice_immediate": "true", "unique_program_id": "0x000C" } ], "protocol_version": "0", "pts_adjustment": "0", "tier": "0x0000" }

Hi @lelegard
Thanks for the swift response! I'm using 3.30-2709.
I will try with the latest commit and keep you posted.

I will try with the latest commit and keep you posted.

This is more than the latest commit. The official release 3.30 has been released. Adding the --select-commands option was the last update in the 3.30 release cycle. Next commit will be a 3.31 pre-release.

Hi @lelegard
Everything is now working as expected with 3.31-2711, thanks a lot !
You are now even able to predict a requested fix before the issue is even raised 👍  Thank you so much once again.


set :safe on two defcustoms

This sets the :safe property on a couple of defcustoms.  This lets users set these variables in file-local variables or in .dir-locals.el.

r? @nikomatsakis
(rust_highfive has picked a reviewer for you, use r? to override)

Looks good to me, FWIW.

These make sense to me too.  Merging it, thanks!


Add CameraBackground

Project URL
https://github.com/yonat/CameraBackground
Description
Show camera layer as a background to any UIView.
Checklist

[x] Only one project/change is in this pull request
[x] Addition in chronological order (bottom of category)
[x] Supports iOS 9 / tvOS 10 or later
[x] Supports Swift 3 or later
[x] Has a commit from less than 2 years ago
[x] Has a clear README in English

          1 Warning

:warning:
Too many changes (when adding, please keep it to one project per Pull Request)

  Generated by :no_entry_sign: Danger


Download error

I can't download Spotify songs, and the error is as follows.

you don't have the latest version installed

I still can't download it

You have a [ in your URL. Just use the 2e6cE etc. part.

I still can't download it

 I still can't download it

you're not using the latest commit...


Change position of Avatar

Can we able to change the postion of avatar / profile image from bottom to top similar to skype in single thread page.
Note: Github also follows the same.

Checkout the answer here. What I did is to remove the constraint on Avatar Container related to Cell Bottom Label and change it to AvatarContainer.top = BubbleTopLabel.bottom. Hope this help.
https://github.com/jessesquires/JSQMessagesViewController/issues/1198

Thanks @zwang :smile:

Thanks

@zwang @Qingzhaowang  How did you get this to work? I checked #1198, but it's still not clear how these properties are set.


Flaky test: DefaultsServerAddress_BindsToIPv6WithHttps

This test fails occasionally with the following error:
System.AggregateException : An error occurred while writing to logger(s). (Unexpected critical error. Log Critical[0]: Unable to start Kestrel. System.IO.IOException: Failed to bind to address https://[::1]:5001: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use ---> System.Net.Sockets.SocketException: Address already in use
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync() in /_/src/Kestrel.Transport.Sockets/SocketTransport.cs:line 95
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync() in /_/src/Kestrel.Transport.Sockets/SocketTransport.cs:line 99
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext() in /_/src/Kestrel.Core/KestrelServer.cs:line 159
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 104
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 108
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) in /_/src/Kestrel.Core/LocalhostListenOptions.cs:line 56
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.DefaultAddressStrategy.BindAsync(AddressBindContext context) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 177
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 46
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) in /_/src/Kestrel.Core/KestrelServer.cs:line 162)
---- System.Exception : Unexpected critical error. Log Critical[0]: Unable to start Kestrel. System.IO.IOException: Failed to bind to address https://[::1]:5001: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use ---> System.Net.Sockets.SocketException: Address already in use
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync() in /_/src/Kestrel.Transport.Sockets/SocketTransport.cs:line 95
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync() in /_/src/Kestrel.Transport.Sockets/SocketTransport.cs:line 99
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext() in /_/src/Kestrel.Core/KestrelServer.cs:line 159
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 104
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 108
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) in /_/src/Kestrel.Core/LocalhostListenOptions.cs:line 56
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.DefaultAddressStrategy.BindAsync(AddressBindContext context) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 177
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding) in /_/src/Kestrel.Core/Internal/AddressBinder.cs:line 46
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) in /_/src/Kestrel.Core/KestrelServer.cs:line 162
-------- System.IO.IOException : Failed to bind to address https://[::1]:5001: address already in use.
------------ Microsoft.AspNetCore.Connections.AddressInUseException : Address already in use
---------------- System.Net.Sockets.SocketException : Address already in use
   at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.KestrelTrace.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter) in /_/src/Kestrel.Core/Internal/Infrastructure/KestrelTrace.cs:line 232
   at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, EventId eventId, Exception exception, String message, Object[] args)
   at Microsoft.Extensions.Logging.LoggerExtensions.LogCritical(ILogger logger, EventId eventId, Exception exception, String message, Object[] args)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.Sta
...

DefaultsServerAddress_BindsToIPv6 failed with about the same error.
This comment was made automatically. If there is a problem contact @ryanbrandenburg.

DefaultsServerAddress_BindsToIPv6 failed with about the same error.
This comment was made automatically. If there is a problem contact @ryanbrandenburg.


Build wheel files for Python 3.11

Fixes: #1110
Update .github/workflows/ubuntu_build.yml to use
cibuildwheel v2.11.2
Add 3.11 references to appveyor.yml and setup.py

I see that there are a number of deprecation warnings in the workflow output.

Still seeing "The set-output command is deprecated and will be disabled soon.", but fortunately things won't break completely until June of next year so the maintainer(s) of the affected action(s) have time to fix their stuff. (FWIW, checkout says that theirs is already fixed.


Docs: Tutorial and Guide template

Possible sections

Prerequisites (getting started configuration of tools)
Versions (rewrite, plugins)
What you will build (before/after)
Define a recipe and visitor
… Custom steps
This is how your whole recipe looks
Executing the recipe
Testing the recipe
Declarative YAML usage

For guides that describe a complex recipe like spring boot 1 to 2, junit 4 to 5 migration the sections in the middle will be different.


Rename HttpData.fromText to HttpData.fromString

Codecov Report

Merging #704 (8b2f262) into main (d2ff02d) will not change coverage.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##             main     #704   +/-   ##
=======================================
  Coverage   48.15%   48.15%
=======================================
  Files          68       68
  Lines        2033     2033
  Branches       48       48
=======================================
  Hits          979      979
  Misses       1054     1054

Impacted Files
Coverage Δ

zio-http/src/main/scala/zhttp/http/Response.scala
46.34% <66.66%> (ø)

zio-http/src/main/scala/zhttp/http/HttpData.scala
50.00% <100.00%> (ø)

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 d2ff02d...8b2f262. Read the comment docs.

thanks @rajcspsg !


It keeps loading but pub serve seems ideling and it's unclear what Dartium is waiting for.
A combination of killing pub serve, closing and restarting Dartium, force reloading (Ctrl+F5) the page eventually might get rendered.
If I open the same URL in Chrome it works.
Dartiums browser console doesn't show errors it just keeps spinning the loading indicator.

Dart VM version: 1.16.0-edge.898aa67b430efa9da1dba1010d3146409666ea86 (Wed Apr 13 19:45:57 2016) on "linux_x64"
(same with the version from Friday)
Currently it's impossible to work with Dartium.

I've seen this, too (on Mac).

+1 seen this problem as well on Mac.

@kevmoo, known issue? Does this impact 1.16 RC?

CC @whesse

@zoechi @kwalrath @novabyte Which SDK version are you seeing this on?
Can any of your get a reliable repro? On a project we can look at?

I just tried with https://github.com/bwu-dart-playground/route-example-for-ie10 and it doesn't load. Not even Ctrl+F5 makes it work.

@kevmoo I don't have anything reproduceable. I think I was using 1.16.0-dev.4.0 and earlier dev versions. I noticed intermittent trouble loading the last two times (at least) that I updated the angular.io/dart site to reflect new angular2 releases.
For each release I update all the dart samples, which live in public/docs/_examples/*/dart, and I make sure they run in Dartium checked mode without any new warnings. Eventually they all did.

Gunter,
Seems to work you'll need to use:
pub get
pub serve
Then the URL in Dartium should be localhost:8080
On Tue, Apr 19, 2016 at 9:45 AM, Günter Zöchbauer<EMAIL_ADDRESS>wrote:

I just tried with
https://github.com/bwu-dart-playground/route-example-for-ie10 and it
doesn't load. Not even Ctrl+F5 makes it work.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/dart-lang/sdk/issues/26260#issuecomment-212011212

Thanks @terrylucas, I know how to load a Dart client application :D but Dartium doesn't, at least not here.

@zoechi I just tried 1.16.0-dev.5.1 on Mac with no issue. Could you try with the latest dev build?

@zoechi Are you starting the application using WebStorm? I can reproduce the behavior most of the time if I use Webstorm via Run 'index.html' but it works if I start pub serve via terminal in Webstorm or command line.
WebStorm 2016.1.1
Build #WS-145.597, built on March 30, 2016
JRE: 1.8.0_45-b15 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Dart VM version: 1.16.0-dev.5.1 (Mon Apr 18 01:40:24 2016) on "windows_x64"

@denniskaselow yes I tried with WebStorm

Is this a behavior that has changes since Dart 1.15? – or is it a change since updating the pkg/angular2 version you're using?

Can't speak for @zoechi or anyone else, but I think I've pinned down the reason a bit more after fiddling around with different versions of everything etc.
First of all: It's not only happening to angular applications. And I couldn't reproduce it with Dart 1.15.
Did caching of pub served resources get added in 1.16? Cause that's where I'm seeing the issue but I did not get anything cached in 1.15.
What I'm seeing is this:
If I start the application using WebStorm it runs pub serve web --port=60554 (or whatever other random port).
Then WebStorm opens http://localhost:63342/route-example-for-ie10/web/index.html.

In Dartium those resources remain pending (not all resources though, some get a status code of 200, some 304) , when viewing in the Network-tab. On canceling the errors posted in @zoechi report happen.
Now.. if I use the port used by pub when WebStorm executed pub serve and open localhost:60554 I'm getting [web] GET Served 484 cached assets. and everything works just fine. Important: These are still cached resources, so the caching just isn't working correctly when using WebStorms URL with port 63342.
Hope this helps and @zoechi or @kwalrath can confirm this.

@denniskaselow  See also https://groups.google.com/a/dartlang.org/forum/#!topic/web/kkwtCScfPEg

@denniskaselow @zoechi
WebStorm works as a transparent proxy for Pub Serve. Inside IDE URLs like http://localhost:63342/route-example-for-ie10/web/index.html are simply redirected to URLs like http://localhost:60554/index.html (where 60554 is a random port used to start Pub Serve, see its tool window).
If you observe different app behavior if you change WebStorm's http://localhost:63342/... URL to direct Pub Serve's URL right in the browser, then it may be a bug in the IDE. If so then I'd ask you to file a bug in [https://youtrack.jetbrains.com/issues/Web WebStorm's issue tracker] with the following information: IDE build number (Help | About), Dart SDK and Dartium versions configured in the IDE, sample project and steps to reproduce.

@alexander-doroshko  Done https://youtrack.jetbrains.com/issue/WEB-21355

@kevmoo I just tried with 1.16.0-dev.5.1 on Mac, and the issue was still there. (The first command-reload worked, though, so it wasn't as frustrating as it sometimes is.)
I was testing using the beta.15 template-syntax example: https://github.com/angular/angular.io/tree/master/public/docs/_examples/template-syntax/dart

@kwalrath This may be an issue at IDE side as well. Are you using WebStorm / IntelliJ IDEA (which build number if so)? If yes, will the issue go away if you change URL to access Pub Serve directly (see Pub Serve tool window to find port number)?

@kevmoo Am I right that in SDK 1.16 Pub Serve has a new feature related to assets caching?
WebStorm seems to have problems with it. We are investigating the problem.

@alexander-doroshko
Same behavior (direct URL works, :63342 hangs)
IntelliJ IDEA 2016.1, Build #IU-145.970, Win10
Dart plugin 145.597.6
Dart SDK 1.16.0-dev.5.1

@munificent is looking at this right now. It might be related to his pub caching changes.

Also seeing this issue, and only in 1.16.x

Are you also seeing this in the latest dev build, 1.16 RC0, build number 1.16.0-dev.5.4?

WebStorm doesn't work well with Pub Serve from SDK 1.16, including 1.16.0-dev.5.4. The issue seems to be at IDE side as there are no problems using Pub Serve directly without WebStorm (at least for me). We are investigating the issue.

I had been seeing this problem with pub serve from the command line, but I don't see the problem any more with 1.16.0-dev.5.4. (I've run 3 or 4 apps, and they all loaded quickly the first time.)
@alexander-doroshko is there a bug # for the WebStorm issue with pub serve?

Bob wrote that there was a problem with Pub Serve that is fixed in 1.16.0-dev.5.4. I do not know if there are more bugs with it.
WebStorm's issue is tracked as https://youtrack.jetbrains.com/issue/WEB-21355

@alexander-doroshko, that's right. I did indeed recently break and then fix some stuff around caching in pub. My guess is that's what's going on here.
I'm going to speculatively close because, as far as I know, I fixed the two issues around this in pub serve. If you still run into issues if you test with a build that includes bf62fde1a92f618db0e17ebb291c2b9f5c96be41, then let me know and I'll reopen.

We've fixed the issue at WebStorm side. Bugfix update is planned for the next week.
@munificent Playing with Dartium + Pub Serve (without IDE) I noticed that if you quickly do Refresh (F5) in browser several times (without waiting for the page to load) Dartium hangs or crashes. Pub Serve seems to be alive but according to its output it hasn't served all the assets N times (may be it was not asked to).
Reproduced with SDK+Dartium both 1.15.0 and 1.16.0-dev.5.4 (Windows 8.1, x64) and this project where each Refresh asks for 484 assets. Is this a known limitation or not a real use case or do you want me to file a separate issue?

Is this a known limitation or not a real use case or do you want me to file a separate issue?

Definitely not a known issue. Please do file a bug. Thanks!


v4 - Addition of $link-decoration variable

Rather than hard-coding the 'text-decoration' property for links to 'none' in _reboot.scss, would it not be better for this to be defined by a variable, as with $link-hover-decoration, enabling a user to set the default link state to underlined via a variable, rather than having to write a CSS override?

Fixed in 8f9e50c.


Disable AutomaticDecompression for WASM

Hello, I started making a simple BlueSky client on Blazor WebAssembly using FishyFlip.
The current version of the library crashes because it tries to set the property HttpClientHandler.AutomaticDecompression, which is not supported on WASM. I removed that property and now it works perfectly. If you want, you could add an explicit target for "net9.0-browser" which would warn you if you ever add anything incompatible.
I also added DefaultVersionPolicy = RequestVersionOrHigher to enable HTTP/2 and HTTP/3, which are disabled by default. This should increase performance for simultaneous requests if the server supports it.

Automatic Decompression was added to address https://github.com/drasticactions/FishyFlip/issues/57. I also had a Blazor WASM demo in the past (https://github.com/drasticactions/FishyFlip/tree/v1.8/samples/FishyFlipSite) but I got rid of it since maintaining so many samples was a pain to keep updated and I wasn't sure the best way to show what this could do. Egg on my face since it meant I couldn't check it again! lol.
This is fine, but instead of blanket turning it off, could you make it a setting instead inside of options to enable or disable it? It's fine if it's disabled by default for WASM, but if it is ever available it would be nice to override it and allow it.

Checking the docs, HttpClientHandler also has a bool for SupportsAutomaticDecompression, so maybe
internal HttpClient GenerateHttpClient(HttpMessageHandler? handler = default)
    {
        HttpClient httpClient;
        if (handler is not null)
        {
            httpClient = new HttpClient(handler);
        }
        else
        {
            var handle = new HttpClientHandler { MaxRequestContentBufferSize = int.MaxValue };
            if (handle.SupportsAutomaticDecompression)
            {
                handle.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
            }

            httpClient = new HttpClient(handle);
        }

        httpClient.DefaultRequestHeaders.Add(Constants.HeaderNames.UserAgent, this.UserAgent);
        httpClient.DefaultRequestHeaders.Add("Accept", Constants.AcceptedMediaType);
        httpClient.BaseAddress = this.Url;
        return httpClient;
    }

would work here? That way we wouldn't need a option for it, it should work automatically if the operation session supports it, assuming WASM respects those settings.

Checking what I wrote and adding my WASM sample back, it should work fine now with https://github.com/drasticactions/FishyFlip/pull/108. I added the DefaultVersionPolicy change you put here to it as well.
It should be live on Nuget. Try that and see if it still has issues for you and if so, feel free to file issues or PR again. Thanks for the PR and sorry I regressed it!


Support ARM64 architecture by upgrading to<EMAIL_ADDRESS>

Python 3.7 does not support ARM64 architecture (e.g. Apple Silicon M1 chips), but 3.9 does (https://docs.python.org/3/whatsnew/3.9.html).
Please consider supporting ARM64 for cairo-lang because a significant fraction of the smart contract devs use MacBooks with an Apple M1 chip.

i can use<EMAIL_ADDRESS>on m1_mac_rosseta
and install cairo smoothly.

I just installed v0.4.1 in a 3.9.6 virtualenv without a problem; macOS 11.6, M1 Macbook.


vendor: Update dep vendoring

This PR updates the way to perform the vendoring of the repository by relying on latest dep tool.
It does:

Remove all the unneeded constraints (only packages directly imported by virtcontainers should be constrained)
Add a prune section in Gopkg.toml so that a simple dep ensure will take care of pruning every unneeded files.

@sameo @jodh-intel @grahamwhaley @egernst

LGTM


fix: Ensure aws_eks_addons with before_compute flag get destoyed after compute resources

Description
With the added dependency, the aws_eks_addon.before_compute resources get destroyed after the node groups.
Motivation and Context
Destroying the vpc-cni EKS addon before destroying the node groups may result in leaked EC2 network interfaces.
Current behavior:
module.eks.aws_eks_addon.before_compute["vpc-cni"]: Destruction complete after 2s
module.eks.module.eks_managed_node_group["test"].aws_eks_node_group.this[0]: Destroying...

Breaking Changes
NA
How Has This Been Tested?
I have manually tested the change by provisioning and then destroying a Terraform module with AWS VPC and AWS EKS cluster with multiple node groups and the vpc-cni configured as a "before_compute" addon.

I am familiar with the VPC CNI leaking ENIs, but I don't believe this will solve that (or have the intended effect)
Do you have proof or supporting evidence to support this change?

Do you have proof or supporting evidence to support this change?

We experienced frequent ENI leaks in automated tests right after we enabled managed EKS addon for vpc-cni (a lot more than usual). Using this fix I could not reproduce the issue with 4 or 5 provision/destroy cycles.
The expectation is not to solve the ENI leaking issue entirely, but (considerable) reduce the frequency of its occurrence.
When the vpc-cni addon is destroyed, aws-node pods are terminated on all nodes. Can't this explain the issue, at least partially?
Regardless of ENI leaking issue, I do think the explicit dependency makes sense. It guarantees that "before_compute" EKS addons are provisioned before compute resources and destroyed after.

The VPC CNI is known to leak ENIs, I don't know that this will solve that and instead would recommend that you set preserve = true on the VPC CNI addon configuration. When you run terraform destroy this will leave the VPC CNI running on the cluster instead of having Terraform delete it, allowing it to handle the ENI cleanup

Note: preserve = true is going to be the default setting for addons on the next v20.x release

set preserve = true on the VPC CNI addon configuration

Thank you for the info. This resolves our issue and makes this PR kind of redundant.


Support multiple providers in a single test

For some cases, it could be nice to support multiple providers in a single test, as what is possible with Pact JVM and JUnit: https://github.com/pact-foundation/pact-jvm/blob/master/consumer/junit/src/test/java/au/com/dius/pact/consumer/junit/pactproviderrule/PactMultiProviderTest.java.
Looking at the code, it seems to me that one way to achieve this would be to provide a new trait similar to BasePactForgerResourcesForPlatform that defines a list of pacts rather than a single one:
trait BasePactForgerResourcesForPlatformMultiProvider[Pact <: BasePact] extends BasePactForgerResources {

  // def pact: Pact
  def pacts: Seq[Pact]

  ...

}

The existing BasePactForgerResourcesForPlatform could actually be inheriting BasePactForgerResourcesForPlatformMultiProvider with a sequence of a single pact to avoid too much code duplication.
Then this could be implemented "on demand" for each test framework (scalatest/munit/weaver).
Any thought on this?

I believe https://github.com/jbwheatley/pact4s/pull/624 covers the initial need behind this feature request.


Computing KDE can still be slow for some numax/dnu

For some values of numax/dnu the prior sample is still very dense.
Suggest selecting a subsample of stars if number within the range used for the KDE exceeds X.

Fixed with PR #198
Downsamples to KDEsize (default = 100) if the interval in numax spans more than 100.


Empty password field after invalid entry

When the user doesn't enter a valid password, the password field should return to empty.
Current behavior, field still has last password but empties it instantly on typing.

done


24 hours

hi i wanted to thank you for this amazing bot
i wanted to ask u if i can upload it on heroku and make it working 24 hours but it didnt work
if u can tell me how or give me a tutorial for that pls thank you again !

If you want to upload something to Heroku, there is mandatory downtime for the free tier of apps. You would have to upgrade to a paid plan, which I am not sure if you are willing to do. It would likely be much more cost-efficient to have the program running 24/7 from a Raspberry Pi Zero, which can go for $5 depending on your retailer. They consume very little power and you would hardly notice the difference in your electricity bill. Closing this for now, but if you are genuinely willing to pay for 24/7 hosting on Heroku I will be willing to reopen this and help you configure it for anybody who wants to attempt something similar in the future.
If this has helped you at all, please leave a star to show your support of the project :)


[yaml] add YAML SDK component to issue template

Add a YAML SDK component to the issue templates so that the yaml label can be automatically assigned to new bugs/features.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[x] Update CHANGES.md with noteworthy changes.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

R: @damccorm

R: @robertwb

Confirmed working - https://github.com/apache/beam/issues/28681


RxSwift 5.0 support

Hi, @jdisho ! Will you update your lib to support RxSwift 5.0?

Hi @BaldyAsh,
Thanks for raising this issue. I can update to Swift 5.0 and upgrade the libs. However, I would appreciate if you can create a PR. 😊

Closed by #12


Tensorflow  Does Not Seem to Work With Latest cuDNN 8.8 Version

Click to expand!
Issue Type
Bug
Have you reproduced the bug with TF nightly?
No
Source
source
Tensorflow Version
tf 2.8
Custom Code
Yes
OS Platform and Distribution
Linux Ubuntu 20.04
Mobile device
No response
Python version
3.8
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
CUDA 11.2, cuDNN 8.8
GPU model and memory
No response
Current Behaviour?
Note: I am using a custom docker container that is based on an older `tensorflow/tensorflow:latest-gpu` image. This image is Ubuntu 20.4 with tf 2.8 and CUDA 11.2. My actual computer running the container is Ubuntu 18.04 with a Quadro RTX 8000 and NVIDIA driver 460.106.0.

I recently upgraded packages in my docker container, and it seems that the newest version of libcudnn8, being cudNN 8.8, conflicts with Tensorflow 2.8 (possibly other versions too, but I can only speak for TF 2.8). I am able to load one of my pre-trained Conv2d-based models just fine, but actually using the model (for both training and prediction) causes trouble.

As soon as I try to run any data through my model, TF cannot create the cudnn handle and suggests that I have an insufficient driver version. I tried updating the driver version, but that newer version requires CUDA 12.0, which TF is not compatible with. After many hours of trial and error, it seems that if I do NOT upgrade the libcudnn8 library in my docker image, and keep it as the original version of 8.1, then I do not have any problems.

Since someone else reported an issue with cuDNN 8.8 as well on a different matter (https://github.com/tensorflow/tensorflow/issues/59890), it would seem that TF 2 is not compatible with this newer version.

Standalone code to reproduce the issue
Any piece of code that passes data through a tf.model should result in an error (especially with conv2d layers, since that's what my model uses).

Relevant log output
2023-03-12 17:40:03.421988: E tensorflow/stream_executor/cuda/cuda_dnn.cc:373] Could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
2023-03-12 17:40:03.422120: E tensorflow/stream_executor/cuda/cuda_dnn.cc:382] Possibly insufficient driver version: 460.106.0
2023-03-12 17:40:03.422182: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at conv_ops.cc:1120 : UNIMPLEMENTED: DNN library is not found.
Traceback (most recent call last):
  File "semantic_segmentation.py", line 378, in <module>
    SemSeg.train()
  File "semantic_segmentation.py", line 231, in train
    loss = self._train_step(image_batch, mask_batch)
  File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/execute.py", line 54, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.UnimplementedError: Graph execution error:

Detected at node 'model/conv2d/Conv2D' defined at (most recent call last):
    File "semantic_segmentation.py", line 378, in <module>
      SemSeg.train()
    File "semantic_segmentation.py", line 231, in train
      loss = self._train_step(image_batch, mask_batch)
    File "semantic_segmentation.py", line 213, in _train_step
      predicted_probs = self.model(images, training=True)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 64, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/base_layer.py", line 1096, in __call__
      outputs = call_fn(inputs, *args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 92, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/functional.py", line 451, in call
      return self._run_internal_graph(
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/functional.py", line 589, in _run_internal_graph
      outputs = node.layer(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 64, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/base_layer.py", line 1096, in __call__
      outputs = call_fn(inputs, *args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 92, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/layers/convolutional.py", line 248, in call
      outputs = self.convolution_op(inputs, self.kernel)
    File "/usr/local/lib/python3.8/dist-packages/keras/layers/convolutional.py", line 233, in convolution_op
      return tf.nn.convolution(
Node: 'model/conv2d/Conv2D'
DNN library is not found.
         [[{{node model/conv2d/Conv2D}}]] [Op:__inference__train_step_1535]

@tsender  Could you please have a look at this tested build configuration for different compatible versions and let us know if it helps?
Thank you!

Thank you for pointing me to that table. I am currently using cuDNN 8.1 and CUDA 11.2 without any issues. In this past, however, I may have been using a version of cuDNN between 8.1 and 8.7 without problem, hence why I thought that TF would work with any cuDNN 8.x version and submitted this ticket (though, I do not know exactly which version I was using previously as that docker image has been rewritten).

@tsender Thank you for the response!
Could you please confirm if the issue resolves in the latest TF version?
Thank you!

I'm rather busy at the moment and likely won't be able to get back to this until the end of next week. But if I have time before then I will try.

@tsender Could you please let us know if the issue still persists?
Thank you!

Hi @sushreebarsa.
I tried using the tensorflow/tensorflow:2.12.0-gpu docker image, however, it seems to require that I upgrade my cuda version, which I don't have the time to deal with. Seeing that this entire issue was created because I had accidentally created a setup in which TF was not tested/guaranteed to work in, I do not really see a need to keep this ticket open. Once you told me about the driver compatibility page, I had since downgraded back to cuDNN 8.1 and have not had any issues. I also do not have the time to do any further compatibility testing, nor do I even use the latest version of TF in my work. Hence, I think we can close this issue.

@tsender Glad it is working for you!
Thank you for your response. Closing this ticket as per your above comment please feel free to reopen if you still face any issue. Thank you!


Loaded results are unordered

System Info
System: Ubuntu 22.04.2 LTS
Python: 3.9.17
safetensors: 0.3.3
Information

[ ] The official example scripts
[X] My own modified scripts

Reproduction

Create OrderedDict
Create raw_bytes by safetensors.numpy.save
Save raw_bytes from OrderedDict via zipfile into archive.zip
Load archive.zip via zipfile
Load data via safetensors.numpy.load

Code
import safetensors.numpy
import zipfile
import numpy as np
import collections
import os

def create_archive(filename:str, data:collections.OrderedDict, name:str):
    raw_bytes = safetensors.numpy.save(data)

    if not os.path.isfile(filename):
        archive = zipfile.ZipFile(
            file=filename,
            mode="x",
            compression=zipfile.ZIP_STORED,
        )
        archive.writestr(str(0), raw_bytes)
        archive.close()

def read_archive(filename:str, name:str):
    archive_new = zipfile.ZipFile(
        file=filename,
        mode="r",
        compression=zipfile.ZIP_STORED,
    )
    data = safetensors.numpy.load(archive_new.read(name=name))
    return data

if __name__ == "__main__":

    # Ordered Demo Data
    name="0"
    filename = "archive.zip"
    data = collections.OrderedDict({
        "key0": np.random.rand(3,2),
        "key1": np.random.rand(3,2),
        "key2": np.random.rand(3,2),
        "key3": np.random.rand(3,2),
        "key4": np.random.rand(3,2),
        "key5": np.random.rand(3,2),
        "key6": np.random.rand(3,2),
        "key7": np.random.rand(3,2),
        "key8": np.random.rand(3,2),
        "key9": np.random.rand(3,2)
    })

    # Create Archive
    create_archive(filename=filename, data=data, name=name)

    # Read Archive
    data_new = read_archive(filename=filename, name=name)

    print("data.keys()", data.keys())
    print("data_new.keys()", data_new.keys())

Output
data.keys() odict_keys(['key0', 'key1', 'key2', 'key3', 'key4', 'key5', 'key6', 'key7', 'key8', 'key9'])
data_new.keys() dict_keys(['key1', 'key6', 'key5', 'key0', 'key2', 'key8', 'key9', 'key3', 'key7', 'key4'])

Expected behavior
I would have expected that loading data results in the same order as it is written, but the order gets lost in the process.
This is because safetensors.numpy.load loads the data in a Dict. https://github.com/huggingface/safetensors/blob/main/bindings/python/py_src/safetensors/numpy.py#L80
By utilizing OrderedDict the order could be preserved.
The use case I am facing is saving layer weights from a neural network, where the order represents the training graph.
A workaround for my use case is to save the order as well and then sort it, but it seems to me that a preserved order might be useful for multiple use cases.
Is there a reason why Dict is used instead of OrderedDict ?

I am interested in having ordered keys as well ... internally safetensors is written in rust and the passed in dict from python gets converted into a rust HashMap which does not preserve order...
upon further investigation, there seems to be no way to guarantee both efficiency & key order on the rust end 😞

This is because safetensors.numpy.load loads the data in a Dict.
https://github.com/huggingface/safetensors/blob/main/bindings/python/py_src/safetensors/numpy.py#L80

Note: Changed in version 3.7: Dictionary order is guaranteed to be insertion order.

A workaround for my use case is to save the order as well and then sort it, but it seems to me that a preserved order might be useful for multiple use cases.

Agreed, for individual use cases saving the keys & sorting might be the best choice
If one desired to embed the information into the safetensors, at first glance a potential (naiive) solution could look something like:
import np
import safetensors

# naiive hardcoded approach ...

def save_ordered(tensors: Dict[str, np.ndarray], metadata: Optional[Dict[str, str]] = None) -> bytes:
    tensors = {f'{i}#{k}': v for i, (k, v) in enumerate(tensors.items())}
    return safetensors.numpy.save(tensors, metadata=metadata)

def load_ordered(data: bytes) -> Dict[str, np.ndarray]:
    loaded = safetensors.numpy.load(data)
    loaded = dict(sorted(loaded.items()))
    loaded = {''.join(k.split("#")[1:]): v for k, v in loaded.items()}
    return loaded

Though, on a testable scale it might be difficult to validate/track which models were or were not ordered this way... for using safetensors in leu of other pickling techniques, such as the example you give above, errors wouldn't be to difficult to navigate... however for loading the statedict of a model checkpoint with hundreds of layers where names are meaningful, I suspect a full validating solution, without compromising the current library, would require significantly more cohesion than the above magic hackery 🤖...
Hope you or others find this useful!

Can you share a bit as to why you care about key order and what's the actual underlying issue  ?
What is it preventing you to do ? What would it enable  ?


fix fedora CI

Presumably Fedora 36 came out, as our docker label moved, and we can no
longer install. Fix the docker label to fedora:35 to fix.
Signed-off-by: John Levon<EMAIL_ADDRESS>commit-id:ae8f8c5c

cc @jraman567


Release 6.0.0

Summary of the Pull Request
What is this about?
Release 6.0.0.
Includes PR that enables refactored C# App Function. #2650
SERVICE ENGINEERS: If you currently run an instance of OneFuzz you will need to follow the below instructions to manually upgrade.

BEFORE running the deployment script over your existing instance, DELETE BOTH Azure App Functions AND the Azure App Service Plan.
Once they are deleted, run the deployment scripts. This will deploy TWO DOTNET Azure App Functions. This will allow existing OneFuzz Agents (& jobs) to continue without failure. A subsequent release will remove the old -net App Function.

PR Checklist

[ ] Applies to work item: #xxx
[ ] CLA signed. If not, go over here and sign the CLI.
[ ] Tests added/passed
[ ] Requires documentation to be updated
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Info on Pull Request
What does this include?
Validation Steps Performed
How does someone test & validate?

Codecov Report

Merging #2657 (ce4d562) into main (95abeea) will decrease coverage by 4.35%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2657      +/-   ##
==========================================
- Coverage   29.26%   24.91%   -4.36%
==========================================
  Files         290      121     -169
  Lines       35686    12537   -23149
==========================================
- Hits        10444     3123    -7321
+ Misses      25242     9414   -15828

Impacted Files
Coverage Δ

src/agent/onefuzz-agent/src/agent/tests.rs

...ent/onefuzz-task/src/tasks/generic/input_poller.rs

src/agent/debugger/src/target.rs

src/agent/win-util/src/wer.rs

...t/onefuzz-task/src/local/libfuzzer_crash_report.rs

src/agent/onefuzz-task/src/tasks/report/generic.rs

src/agent/onefuzz/src/libfuzzer.rs

src/agent/onefuzz-task/src/local/radamsa.rs

src/agent/input-tester/src/summary.rs

src/agent/input-tester/src/appverifier.rs

... and 159 more

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


Failure while converting geojson to wkt

Expected behavior and actual behavior.
shapely throws error while converting geojson to wkt. The geojson can be visualised in map as polygon.
Steps to reproduce the problem.
from shapely import geometry

def geojson_to_wkt(geojson):
    area = geometry.asShape(geojson)
    return "SRID=4326;%s" % (area.wkt)

geojson = {"type": "Polygon", "coordinates": [[[55.12916764533149, 24.980385694214384, 2.5], [55.13098248044217, 24.979828079961905], [55.13966519231666, 24.97801442415322], [55.13966563924936, 24.97801442415322], [55.14139286840762, 24.982307444496097], [55.14169331277646, 24.983717465495562], [55.14203489144224, 24.985419446276566, 2.5], [55.14180327151276, 24.98428602667792, 2.5], [55.14170091915952, 24.984242720177235, 2.5], [55.14122966992623, 24.984954809433702, 2.5], [55.14134021791831, 24.985473928648396, 2.5], [55.141405876161286, 24.986090184809793, 2.5], [55.141361358941225, 24.986138101357326, 2.5], [55.14093322994411, 24.986218753894093, 2.5], [55.140897653420964, 24.986214283545635, 2.5], [55.14095492976058, 24.9863027591922, 2.5], [55.140900447388745, 24.98628436557094, 2.5], [55.140867059473706, 24.98628869622101, 2.5], [55.14089155325796, 24.986402364143782, 2.5], [55.14090938808566, 24.986479011993385, 2.5], [55.140943893587824, 24.986471188883584, 2.5], [55.1410161176551, 24.9864174050037, 2.5], [55.140996932409635, 24.986521806266644, 2.5], [55.14163554031332, 24.986910400619593, 2.5], [55.14095781686062, 24.987033474900578, 2.5], [55.14058258698692, 24.98693261266349, 2.5], [55.14032624044253, 24.98747538747211, 2.5], [55.14007240846915, 24.988001119077232, 2.5], [55.14013122149105, 24.98831115636925, 2.5], [55.13991827457961, 24.98834356639557, 2.5], [55.139779460946755, 24.988254625087706, 2.5], [55.13974742344948, 24.988261377176524, 2.5], [55.139515198160304, 24.98841811876934, 2.5], [55.13903617238334, 24.98817914139135, 2.5], [55.1391330764994, 24.988660542040925, 2.5], [55.13914369357698, 24.989438289540374, 2.5], [55.136431216517785, 24.98966711550207, 2.0], [55.13659028641709, 24.99041706302204, 2.0], [55.1355852030721, 24.990933481401207, 2.5], [55.13535549235394, 24.99110470506038, 2.5], [55.13512578163577, 24.99127592871955, 2.5], [55.129969653784556, 24.991440074326995, 2.5], [55.130221623112746, 24.988070688875112, 2.5], [55.130451333830905, 24.98789946521594, 2.5], [55.13089208224919, 24.98742639990359, 2.5], [55.132177586827666, 24.989003408454433, 2.5], [55.13238862452779, 24.988701566801254, 2.5], [55.132482594977674, 24.988501518707757, 2.5], [55.132525994610624, 24.988048802794115, 2.5], [55.13249018525683, 24.987180623870653, 2.5], [55.13253358488978, 24.986727907957015, 2.5], [55.1322761673244, 24.985827132742713, 2.5], [55.13163341503516, 24.98503862846729, 2.5], [55.131514764536504, 24.984469124700183, 2.5], [55.131275600894, 24.983796337257242, 2.0], [55.13066865795855, 24.98387601190528, 2.0], [55.13026930682963, 24.981537228037503, 2.0], [55.130260412698846, 24.981495691049748, 2.0], [55.13025151856806, 24.981454154061993, 2.0], [55.13022925995803, 24.98096497686874, 2.5], [55.12984453059386, 24.9804285816199, 2.5], [55.129998291954365, 24.98021419115843, 2.5], [55.12916764533149, 24.980385694214384, 2.5]]]}

wkt = geojson_to_wkt(geojson)

It gives error:
Traceback (most recent call last):
  File "shapely/speedups/_speedups.pyx", line 246, in shapely.speedups._speedups.geos_linearring_from_py
AttributeError: 'list' object has no attribute '__array_interface__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in geojson_to_wkt
  File "/Library/Python/3.7/site-packages/shapely/geometry/base.py", line 373, in wkt
    return WKTWriter(lgeos).write(self)
  File "/Library/Python/3.7/site-packages/shapely/geos.py", line 393, in write
    if geom is None or geom._geom is None:
  File "/Library/Python/3.7/site-packages/shapely/geometry/proxy.py", line 50, in _geom
    self.__geom__, n = self.factory(self.context[0], self.context[1])
  File "/Library/Python/3.7/site-packages/shapely/geometry/polygon.py", line 509, in geos_polygon_from_py
    ret = geos_linearring_from_py(shell)
  File "shapely/speedups/_speedups.pyx", line 371, in shapely.speedups._speedups.geos_linearring_from_py
IndexError: list index out of range

Operating system
MacOS 10.15.2
Shapely version and provenance
1.7.0

@rohanil the problem is in asShape() and is triggered by the mix of 2 and 3 element coordinates. As a workaround: normalize the innermost coordinate sequences so that they all have 2 or 3 elements. I tried this and it works.

Based on some poking around it seems like this specifically happens when a following coordinate has lower dimensionality than the initial coordinate, which is what's being used to determine geometry dimensionality:
>>> g = {'type': 'LineString', 'coordinates': [[0.0, 0.0], [0.0, 1.0, 0.0]]}
>>> shape(g)
<shapely.geometry.linestring.LineString object at 0x10b05c278>
>>> g = {'type': 'LineString', 'coordinates': [[0.0, 0.0, 0.0], [0.0, 1.0]]}
>>> shape(g)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    shape(g)
  File "/Users/tom/.virtualenvs/geomet/lib/python3.6/site-packages/shapely/geometry/geo.py", line 33, in shape
    return LineString(ob["coordinates"])
  File "/Users/tom/.virtualenvs/geomet/lib/python3.6/site-packages/shapely/geometry/linestring.py", line 48, in __init__
    self._set_coords(coordinates)
  File "/Users/tom/.virtualenvs/geomet/lib/python3.6/site-packages/shapely/geometry/linestring.py", line 97, in _set_coords
    ret = geos_linestring_from_py(coordinates)
  File "/Users/tom/.virtualenvs/geomet/lib/python3.6/site-packages/shapely/geometry/linestring.py", line 254, in geos_linestring_from_py
    raise ValueError("Inconsistent coordinate dimensionality")
ValueError: Inconsistent coordinate dimensionality

@sgillies, just running a project-wide search for "if n == 3" shows a number of places where there is mixed guarded and unguarded access to a 3rd item of a coordinate which may or may not exist. Does an ideal fix for this issue add a check for a third item, raising the ValueError above if it doesn't exist? Or would it check for inconsistency in shape/asShape, raising an error or normalizing coordinates at that step?

Resolved by #877, which raises a more helpful exception in this specific case.

Released in 1.7.1.


replace spurious underscore with space

Pointed out at https://github.com/spdx/license-list-XML/pull/488#discussion_r153060418

Heya mlinksva.
Thank you for catching this!


Use USART interrupt

The current recommended approach to parse NMEA messages is to use a timer interrupt that polls the hardware serial for data.
While I did not observe any real problem with this approach, it seems wasteful.
This patch breaks everything, but avoids HardwareSerial entirely, using its own USART interrupt.
Since Arduino 1.5.x, not referring to SerialN means the buffer and interrupt are not instantiated.
So this frees up a few CPU cycles and 128 bytes of SRAM.
Usage on the Mega is as follows
// copy from HardwareSerialN.cpp
Adafruit_GPS GPS(&UBRR2H, &UBRR2L, &UCSR2A, &UCSR2B, &UCSR2C, &UDR2);

ISR(USART2_RX_vect)
{
  GPS.read();
}

ISR(USART2_UDRE_vect)
{
  GPS.write();
}

void setup()
{
  GPS.begin(9600);
}

If there is any interest, I can try to make it backwards compatible.

What is the plan with this?

Nothing much. It solves a problem for met. If Adafruit wants to merge it, that would be cool. Let me know if you have any comments.


Any Firefox Version? #21

https://addons.mozilla.org/en-US/firefox/addon/github-repo-size/

That shows only the total repo size, here the size of each individual file is shown...


Listen to a path (IPC) instead of a port

Would you be open to a pull request to implement listening to a path instead of a port?
E.g. serve --socket /tmp/mysocket.sock
One possible use case would be continuous delivery:

have a reverse proxy rule to proxy https://cd.domain.tld/<group>/<user>/<commit>/<path> to /tmp/cd.<group>.<user>.<commit>.sock with a /<path> request URI
build static assets
use serve --socket /tmp/cd.<group>.<user>.<commit>.sock to serve the assets

Please tell me if you’re interested.

Currently implemented at rednetio/serve with a --path (or -P for short) parameter

Thank you for the effort you've put into this!
This is now possible by passing --listen. As described in the notes for the new release, it's now a completely fresh start for this project. You can run --help to see what's possible.