[image_picker] Small png image returned as .jpg instead of .png on iOS 14 & above

I'm having the same issue as #70812, which has been from iOS 14.
This is not the same as #17947.

The plugin uses PHPicker on iOS 14, whereas using UIImagePickerController on older versions.
  if (@available(iOS 14, *)) {
    // PHPicker is used
    [self pickImageWithPHPicker:1];
  } else {
    // UIImagePicker is used
    [self pickImageWithUIImagePicker];
  }

https://github.com/flutter/plugins/blob/729c3e4117e6d1a026b50f363b2a202352231fdd/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m#L142-L148

After picking an asset (which is just meta info) by PHPicker, the plugin try to use PHImageManager to get the real binary data, with nil options. And maybe this default value makes the manager pick a jpg file, not a png one.
          [[PHImageManager defaultManager]
              requestImageDataForAsset:originalAsset
                               options:nil

https://github.com/flutter/plugins/blob/729c3e4117e6d1a026b50f363b2a202352231fdd/packages/image_picker/image_picker/ios/Classes/FLTPHPickerSaveImageToPathOperation.m#L109-L111

In this case, using a new PHImageRequestOptions instance that has version set to PHImageRequestOptionsVersionOriginal, the right original png file is returned.
          // fixed
          PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
          options.version = PHImageRequestOptionsVersionCurrent;

          [[PHImageManager defaultManager]
              requestImageDataForAsset:originalAsset
                               options:options

After a few tests, I found that the problem only occurs with small png images. It is reproduced with a png which size is about 300x300 or less.
You can repro with the same source image attached in #70812.

Guessing from this, it's probably that iOS generates a thumbnail of small png as jpg. Because the size of this thumbnail copy is larger than the original, it seems to be returned first.

Hi @red282
Thanks for the test image, I can reproduce the issue with your smaller image.
Reproducible code sample

complete minimal runnable code sample
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:video_player/video_player.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Image Picker Demo',
      home: MyHomePage(title: 'Image Picker Example'),
    );
  }
}

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

  final String? title;

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

class _MyHomePageState extends State<MyHomePage> {
  List<XFile>? _imageFileList;

  set _imageFile(XFile? value) {
    _imageFileList = value == null ? null : [value];
  }

  dynamic _pickImageError;
  bool isVideo = false;

  VideoPlayerController? _controller;
  VideoPlayerController? _toBeDisposed;
  String? _retrieveDataError;

  final ImagePicker _picker = ImagePicker();
  final TextEditingController maxWidthController = TextEditingController();
  final TextEditingController maxHeightController = TextEditingController();
  final TextEditingController qualityController = TextEditingController();

  Future<void> _playVideo(XFile? file) async {
    if (file != null && mounted) {
      await _disposeVideoController();
      late VideoPlayerController controller;
      if (kIsWeb) {
        controller = VideoPlayerController.network(file.path);
      } else {
        controller = VideoPlayerController.file(File(file.path));
      }
      _controller = controller;
      // In web, most browsers won't honor a programmatic call to .play
      // if the video has a sound track (and is not muted).
      // Mute the video so it auto-plays in web!
      // This is not needed if the call to .play is the result of user
      // interaction (clicking on a "play" button, for example).
      final double volume = kIsWeb ? 0.0 : 1.0;
      await controller.setVolume(volume);
      await controller.initialize();
      await controller.setLooping(true);
      await controller.play();
      setState(() {});
    }
  }

  void _onImageButtonPressed(ImageSource source,
      {BuildContext? context, bool isMultiImage = false}) async {
    if (_controller != null) {
      await _controller!.setVolume(0.0);
    }
    if (isVideo) {
      final XFile? file = await _picker.pickVideo(
          source: source, maxDuration: const Duration(seconds: 10));
      await _playVideo(file);
    } else if (isMultiImage) {
      await _displayPickImageDialog(context!,
          (double? maxWidth, double? maxHeight, int? quality) async {
        try {
          final pickedFileList = await _picker.pickMultiImage(
            maxWidth: maxWidth,
            maxHeight: maxHeight,
            imageQuality: quality,
          );
          setState(() {
            _imageFileList = pickedFileList;
          });
        } catch (e) {
          setState(() {
            _pickImageError = e;
          });
        }
      });
    } else {
      await _displayPickImageDialog(context!,
          (double? maxWidth, double? maxHeight, int? quality) async {
        try {
          final pickedFile = await _picker.pickImage(
            source: source,
            maxWidth: maxWidth,
            maxHeight: maxHeight,
            imageQuality: quality,
          );
          print(pickedFile?.path);
          setState(() {
            _imageFile = pickedFile;
          });
        } catch (e) {
          setState(() {
            _pickImageError = e;
          });
        }
      });
    }
  }

  @override
  void deactivate() {
    if (_controller != null) {
      _controller!.setVolume(0.0);
      _controller!.pause();
    }
    super.deactivate();
  }

  @override
  void dispose() {
    _disposeVideoController();
    maxWidthController.dispose();
    maxHeightController.dispose();
    qualityController.dispose();
    super.dispose();
  }

  Future<void> _disposeVideoController() async {
    if (_toBeDisposed != null) {
      await _toBeDisposed!.dispose();
    }
    _toBeDisposed = _controller;
    _controller = null;
  }

  Widget _previewVideo() {
    final Text? retrieveError = _getRetrieveErrorWidget();
    if (retrieveError != null) {
      return retrieveError;
    }
    if (_controller == null) {
      return const Text(
        'You have not yet picked a video',
        textAlign: TextAlign.center,
      );
    }
    return Padding(
      padding: const EdgeInsets.all(10.0),
      child: AspectRatioVideo(_controller),
    );
  }

  Widget _previewImages() {
    final Text? retrieveError = _getRetrieveErrorWidget();
    if (retrieveError != null) {
      return retrieveError;
    }
    if (_imageFileList != null) {
      return Semantics(
          child: ListView.builder(
            key: UniqueKey(),
            itemBuilder: (context, index) {
              // Why network for web?
              // See https://pub.dev/packages/image_picker#getting-ready-for-the-web-platform
              return Semantics(
                label: 'image_picker_example_picked_image',
                child: kIsWeb
                    ? Image.network(_imageFileList![index].path)
                    : Image.file(File(_imageFileList![index].path)),
              );
            },
            itemCount: _imageFileList!.length,
          ),
          label: 'image_picker_example_picked_images');
    } else if (_pickImageError != null) {
      return Text(
        'Pick image error: $_pickImageError',
        textAlign: TextAlign.center,
      );
    } else {
      return const Text(
        'You have not yet picked an image.',
        textAlign: TextAlign.center,
      );
    }
  }

  Widget _handlePreview() {
    if (isVideo) {
      return _previewVideo();
    } else {
      return _previewImages();
    }
  }

  Future<void> retrieveLostData() async {
    final LostDataResponse response = await _picker.retrieveLostData();
    if (response.isEmpty) {
      return;
    }
    if (response.file != null) {
      if (response.type == RetrieveType.video) {
        isVideo = true;
        await _playVideo(response.file);
      } else {
        isVideo = false;
        setState(() {
          _imageFile = response.file;
        });
      }
    } else {
      _retrieveDataError = response.exception!.code;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title!),
      ),
      body: Center(
        child: !kIsWeb && defaultTargetPlatform == TargetPlatform.android
            ? FutureBuilder<void>(
                future: retrieveLostData(),
                builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
                  switch (snapshot.connectionState) {
                    case ConnectionState.none:
                    case ConnectionState.waiting:
                      return const Text(
                        'You have not yet picked an image.',
                        textAlign: TextAlign.center,
                      );
                    case ConnectionState.done:
                      return _handlePreview();
                    default:
                      if (snapshot.hasError) {
                        return Text(
                          'Pick image/video error: ${snapshot.error}}',
                          textAlign: TextAlign.center,
                        );
                      } else {
                        return const Text(
                          'You have not yet picked an image.',
                          textAlign: TextAlign.center,
                        );
                      }
                  }
                },
              )
            : _handlePreview(),
      ),
      floatingActionButton: Column(
        mainAxisAlignment: MainAxisAlignment.end,
        children: <Widget>[
          Semantics(
            label: 'image_picker_example_from_gallery',
            child: FloatingActionButton(
              onPressed: () {
                isVideo = false;
                _onImageButtonPressed(ImageSource.gallery, context: context);
              },
              heroTag: 'image0',
              tooltip: 'Pick Image from gallery',
              child: const Icon(Icons.photo),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              onPressed: () {
                isVideo = false;
                _onImageButtonPressed(
                  ImageSource.gallery,
                  context: context,
                  isMultiImage: true,
                );
              },
              heroTag: 'image1',
              tooltip: 'Pick Multiple Image from gallery',
              child: const Icon(Icons.photo_library),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              onPressed: () {
                isVideo = false;
                _onImageButtonPressed(ImageSource.camera, context: context);
              },
              heroTag: 'image2',
              tooltip: 'Take a Photo',
              child: const Icon(Icons.camera_alt),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                isVideo = true;
                _onImageButtonPressed(ImageSource.gallery);
              },
              heroTag: 'video0',
              tooltip: 'Pick Video from gallery',
              child: const Icon(Icons.video_library),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                isVideo = true;
                _onImageButtonPressed(ImageSource.camera);
              },
              heroTag: 'video1',
              tooltip: 'Take a Video',
              child: const Icon(Icons.videocam),
            ),
          ),
        ],
      ),
    );
  }

  Text? _getRetrieveErrorWidget() {
    if (_retrieveDataError != null) {
      final Text result = Text(_retrieveDataError!);
      _retrieveDataError = null;
      return result;
    }
    return null;
  }

  Future<void> _displayPickImageDialog(
      BuildContext context, OnPickImageCallback onPick) async {
    return showDialog(
        context: context,
        builder: (context) {
          return AlertDialog(
            title: Text('Add optional parameters'),
            content: Column(
              children: <Widget>[
                TextField(
                  controller: maxWidthController,
                  keyboardType: TextInputType.numberWithOptions(decimal: true),
                  decoration:
                      InputDecoration(hintText: "Enter maxWidth if desired"),
                ),
                TextField(
                  controller: maxHeightController,
                  keyboardType: TextInputType.numberWithOptions(decimal: true),
                  decoration:
                      InputDecoration(hintText: "Enter maxHeight if desired"),
                ),
                TextField(
                  controller: qualityController,
                  keyboardType: TextInputType.number,
                  decoration:
                      InputDecoration(hintText: "Enter quality if desired"),
                ),
              ],
            ),
            actions: <Widget>[
              TextButton(
                child: const Text('CANCEL'),
                onPressed: () {
                  Navigator.of(context).pop();
                },
              ),
              TextButton(
                  child: const Text('PICK'),
                  onPressed: () {
                    double? width = maxWidthController.text.isNotEmpty
                        ? double.parse(maxWidthController.text)
                        : null;
                    double? height = maxHeightController.text.isNotEmpty
                        ? double.parse(maxHeightController.text)
                        : null;
                    int? quality = qualityController.text.isNotEmpty
                        ? int.parse(qualityController.text)
                        : null;
                    onPick(width, height, quality);
                    Navigator.of(context).pop();
                  }),
            ],
          );
        });
  }
}

typedef void OnPickImageCallback(
    double? maxWidth, double? maxHeight, int? quality);

class AspectRatioVideo extends StatefulWidget {
  AspectRatioVideo(this.controller);

  final VideoPlayerController? controller;

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

class AspectRatioVideoState extends State<AspectRatioVideo> {
  VideoPlayerController? get controller => widget.controller;
  bool initialized = false;

  void _onVideoControllerUpdate() {
    if (!mounted) {
      return;
    }
    if (initialized != controller!.value.isInitialized) {
      initialized = controller!.value.isInitialized;
      setState(() {});
    }
  }

  @override
  void initState() {
    super.initState();
    controller!.addListener(_onVideoControllerUpdate);
  }

  @override
  void dispose() {
    controller!.removeListener(_onVideoControllerUpdate);
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    if (initialized) {
      return Center(
        child: AspectRatio(
          aspectRatio: controller!.value.aspectRatio,
          child: VideoPlayer(controller!),
        ),
      );
    } else {
      return Container();
    }
  }

Test Image
small png
Pubspec.yaml
  image_picker: ^0.8.3+3
  video_player: ^2.1.14

Logs

logs
[   +3 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h List all available interactive commands.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] 💪 Running with sound null safety 💪
[        ] An Observatory debugger and profiler on iPhone 11 Pro is available at: http://<IP_ADDRESS>:50140/8N3XdXrJYGM=/
[ +380 ms] DevTools activation throttled until 2021-09-01 22:18:33.584585.
[+2775 ms] The Flutter DevTools debugger and profiler on iPhone 11 Pro is available at:
                    http://<IP_ADDRESS>:9101?uri=http://<IP_ADDRESS>:50140/8N3XdXrJYGM=/
[+28330 ms] flutter:
/Users/tahatesser/Library/Developer/CoreSimulator/Devices/A9530DDA-3DB6-4737-BD67-26506428926F/data/Containers/Data/Ap
plication/72B0CC3E-45CC-4AF9-B796-BB3C4C037429/tmp/image_picker_4CACA693-1D4E-41FA-9C69-70D5F52C01E4-4656-000002D72FCA
8979.jpg

stable
master

❗
❗

Check flutter doctor -v outputs for each channel below

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on macOS 12.0 21A5304g darwin-x64, locale en-GB)
    • Flutter version 2.2.3 at /Users/tahatesser/Code/flutter_stable
    • Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/tahatesser/Code/SDK
    • Platform android-31, build-tools 30.0.3
    • ANDROID_HOME = /Users/tahatesser/Code/SDK
    • Java binary at: /Users/tahatesser/Code/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 13.0, Build version 13A5212g
    • CocoaPods version 1.10.2

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

[!] Android Studio (version 2020.3)
    • Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

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

[✓] Connected device (3 available)
    • iPhone 11 Pro (mobile) • A9530DDA-3DB6-4737-BD67-26506428926F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64     • macOS 12.0 21A5304g darwin-x64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 92.0.4515.159
    ! Error: Unable to prepare Taha’s iPhone for development.  (code -1)

! Doctor found issues in 1 category.=

[✓] Flutter (Channel master, 2.6.0-1.0.pre.153, on macOS 12.0 21A5304g darwin-x64, locale en-GB)
    • Flutter version 2.6.0-1.0.pre.153 at /Users/tahatesser/Code/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d5ec3cfde5 (50 minutes ago), 2021-09-01 02:36:03 -0400
    • Engine revision d149231127
    • Dart version 2.15.0 (build 2.15.0-66.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/tahatesser/Code/SDK
    • Platform android-31, build-tools 30.0.3
    • ANDROID_HOME = /Users/tahatesser/Code/SDK
    • Java binary at: /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • CocoaPods version 1.10.2

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

[✓] Android Studio (version 2020.3)
    • Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

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

[✓] Connected device (3 available)
    • iPhone 11 Pro (mobile) • A9530DDA-3DB6-4737-BD67-26506428926F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64     • macOS 12.0 21A5304g darwin-x64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 92.0.4515.159
    ! Error: Unable to prepare Taha’s iPhone for development.  (code -1)

• No issues found!

✅: No Issue ❗: Issue reproduced
Thanks for filing the issue

In this case, using a new PHImageRequestOptions instance that has version set to PHImageRequestOptionsVersionOriginal, the right original png file is returned.

See https://github.com/flutter/plugins/pull/2572#issuecomment-887783117. It is unlikely that just changing that constant is the right fix.

Yes, I agree with you. I just showed a point where make some different result.

red282 nice work

@vashworth was this fixed by https://github.com/flutter/plugins/pull/7084? GitHub claims you mentioned this issue in that PR but I don't see it.

@vashworth was this fixed by flutter/plugins#7084? GitHub claims you mentioned this issue in that PR but I don't see it.

No, it was not fixed. I thought it might be when I was working on https://github.com/flutter/plugins/pull/7084 because I did fix some PNGs from getting converted to JPGs, but I double checked with this issue of small PNGs and turned out it wasn't fixed. I think I edited it out of the fix list, which is probably why Github says I mentioned it.

I can reproduce this issue using the latest version of the image_picker package , video_player package and on the latest stable and master channels.
Code Sample
  flutter doctor -v
[✓] Flutter (Channel master, 3.11.0-2.0.pre.55, on macOS 13.3 22E252 darwin-arm64, locale en-NG)
    • Flutter version 3.11.0-2.0.pre.55 on channel master at /Users/dammya/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 835b892d7f (10 days ago), 2023-05-07 01:30:22 +0530
    • Engine revision 23f730efbf
    • Dart version 3.1.0 (build 3.1.0-83.0.dev)
    • DevTools version 2.23.1

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

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

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

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

[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

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

[✓] VS Code (version 1.78.0)
    • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (4 available)
    • Damilola’s iPhone (mobile) • 71c843fa5f3dec767999f36224653c0faa78660e • ios            • iOS 16.4 20E247
    • iPhone 14 Pro Max (mobile) • D7F3302D-D66F-4B89-B8CF-DBEE1CDB5449     • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)            • macos                                    • darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)               • chrome                                   • web-javascript • Google Chrome 113.0.5672.92

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

• No issues found!

[✓] Flutter (Channel stable, 3.10.0, on macOS 13.3 22E252 darwin-arm64, locale
    en-NG)
    • Flutter version 3.10.0 on channel stable at /Users/dammya/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 84a1e904f4 (7 days ago), 2023-05-09 07:41:44 -0700
    • Engine revision d44b5a94c9
    • Dart version 3.0.0
    • DevTools version 2.23.1

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

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

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

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

[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

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

[✓] VS Code (version 1.78.0)
    • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (4 available)
    • Damilola’s iPhone (mobile) • 71c843fa5f3dec767999f36224653c0faa78660e •
      ios            • iOS 16.4 20E247
    • iPhone 14 Pro Max (mobile) • D7F3302D-D66F-4B89-B8CF-DBEE1CDB5449     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 113.0.5672.92

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

• No issues found!

Hi, any solution on this? i still encounter this issue using the version 1.0.4


white screen

scanning work, but showing white blank screen instead of showing camera view.
sometimes app is not response at all

hey @Kyi-Moe-Min sorry, but can't debug further without further details

closing due to inactivity, please feel free to reopen if this is still an issue


why does helm require a remote called origin in the cache directory?

for example, I have a deis/deis repo added in my helm cache:
ENG000656:deis aaronschlesinger$ pwd
/Users/aaronschlesinger/.helm/cache/deis
ENG000656:deis aaronschlesinger$ git remote -v
arschles	git@github.com:arschles/charts-1.git (fetch)
arschles	git@github.com:arschles/charts-1.git (push)
deis	https://github.com/deis/charts (fetch)
deis	https://github.com/deis/charts (push)

and helm fetch deis/deis complains that I don't have an origin (but still works). should this be required for fetch?
ENG000656:deis aaronschlesinger$ helm fetch deis/deis
[ERROR] Git failed to get the origin name: exit status 1
---> Fetched chart into workspace /Users/aaronschlesinger/.helm/workspace/charts/deis
---> Done

It uses origin to look for the canonical name of the upstream Git repo. It uses that to resolve dependency issues.
https://github.com/helm/helm/blob/4cefaa5057930494cd5383eeb2a5e0f8bd8d201f/chart/chartfile.go#L54

got it, thanks. would it be possible to make the remote name configurable?

I think we could make it configurable in the config.yaml file, and then add a nice CLI flag for helm repo add.

Should we re-title this and mark it as an enhancement instead of a question?

done

The future of Helm is at kubernetes/helm. Helm Classic is in maintenance mode, so I'm closing this enhancement request.


Implement Bus Encryption in Go SDK

In order to use fancy encryption layer in Bus one must implement it in Go Bus library. We need a hero here.

Seems useful, I will try to do it in my spare time.


[2622] Change 'Other age range' field from autocomplete to select

Context
https://trello.com/c/92avoV21/2622-s-change-other-age-range-autocomplete-to-standard-select
Changes proposed in this pull request
Change 'Other age range' field from autocomplete component to standard select.
Guidance to review

Head to a manual course details page for a provider-led trainee, for example
Select 'Other age range'
Check that the revealed field is now a standard select rather than an autocomplete
Select an age range and check that the form still saves correctly

Working as expected, nice one!


Compile/run as embedded or standalone executable

This is to clarify how to compile and run as embedded mode or as an standalone executable.
The previous documentation was unclear about the executable=true setting in gradle.properties.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks much for the patch.
This documentation does not belong here. You should consider updating the README for the overlay project that shows how one might go about running CAS. Review the notes here and update as necesary: https://github.com/apereo/cas-initializr/blob/master/app/src/main/resources/common/README.md.mustache
Thanks again!

Thanks @mmoayyed , very true!
New PR lives now at https://github.com/apereo/cas-initializr/pull/151


expand renter-host integration test

No bugs found. Slight reorganization of the server tester, and of the
file + function organization in the api package.

fixed


Dynamic electricity prices Functionality

I'd like to use emhass with dynamic electricity prices like they are provided with Tibber, E.ON (german) and others. From 2025 at the latest, electricity suppliers in Germany will be obliged to offer "dynamic electricity tariffs" to end consumers in conjunction with them using smart meters. So this will be an important feature of emhass in the future.
Up to now the config provides "peak hours" and "non-peak hours". With tibber you would have to provide 24 hours which can have an individual pricing for each hour. With other providers there may be prices per 15 minutes, when they correlate to the European spot price market in Germany, France et al. which also use 15 minute slots. These day-ahead-prices are published once a day in the afternoon.
How could it be implemented into the software stack rather smooth?

This is totally supported by passing your own list of data.
There are examples in the documentation here: https://emhass.readthedocs.io/en/latest/intro.html#passing-your-own-data
And here: https://emhass.readthedocs.io/en/latest/forecasts.html#passing-your-own-forecast-data
Read that carefully and you can easily achieve what you are looking for using Home Assistant templates.
There are also lots of people doing this with their configuration shared in this thread: https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant

When passing your own data as lists, those "peak hours" and "non-peak hours" for the original configuration will be ignored. Either way you can check that your passed data is correct by using the add-on web ui

This is an example shell command from an user passing data from ENTSO-e:
trigger_entsoe: "curl -i -H \"Content-Type: application/json\" -X POST -d '{\"load_cost_forecast\":{{((state_attr('sensor.entsoe_average_electricity_price_today', 'prices_today') | map(attribute='price') | list + state_attr('sensor.entsoe_average_electricity_price_today', 'prices_tomorrow') | map(attribute='price') | list))[now().hour:][:24] }},\"prod_price_forecast\":{{((state_attr('sensor.entsoe_average_electricity_price_today', 'prices_today') | map(attribute='price') | list  + state_attr('sensor.entsoe_average_electricity_price_today', 'prices_tomorrow') | map(attribute='price') | list))[now().hour:][:24]}}}' http://localhost:5000/action/dayahead-optim"

Didn't had a clue yet, thanks so much.


Colab crashes

every time i start the stable diffusion in colab it disconnects. im a colab pro user and when i start the sd webui the console shows this error: ^C and it stops working, Can anybody help me because i cant find a way for it to work

are you using colab pro ?


App and Device Updates

Smart App:
Re-worked the adding and removing of the clients devices. (Subscribing to the devices events directly was locking the devices preventing the parent app from removing them unless uninstalling the app)
The manager app now creates/removes selected or unselected clients based on selections.
I also added smart app version, server (version, platform, and name) info to the client page.
Important: To prevent issues please remove existing app and then re-install.
Device Type:
I added deviceCommand(cmd, data, dni) to all command methods to handle sending the events directly to the parent app. <- This works really well in the apps that I have created.

Hey man, could you please resolve conflicts with the current mainline- then I will happily merge in your changes.
Cheers

Sorry i've been busy with other projects.  I will review this when I get some time and merge my changes with your code

Thanks, it is much appreciated. My apologies for not merging your changes sooner!


How to add an Icon to a QLabel?

What exactly is the python code for the Label in the example from the readme?

The corresponding code is in the example.py file.


Links are broken

The links for this page are broken. Get a 404 error.

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

ID: 5e974bd0-4652-62e1-2780-b9c36092434b
Version Independent ID: 0afc3625-d3bb-dabe-411b-2010a00aa0f0
Content: Azure Spatial Anchors Unity overview - Azure Spatial Anchors
Content Source: articles/spatial-anchors/unity-overview.md
Service: azure-spatial-anchors
GitHub Login: @rgarcia
Microsoft Alias: rgarcia

@kojoopuni Thank you for your feedback! We will review and provide an update as appropriate.

@kojoopuni Thanks for pointing this out. PR has been created to fix the broken links. After peer review and merge, changes will go live by EOD.
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


feat: helm import (#1202)

Backport
This will backport the following commits from 2.x to 1.x:

feat: helm import (#1202)

Questions ?
Please refer to the Backport tool documentation

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 1488

Questions ?
Please refer to the Backport tool documentation


Fix remove symbols when removing more than one symbol. Close #6.

Fix remove symbols when removing more than one symbol. Close #6.

Any updates on when this will get merged?

Will this ever get merged?

It doesn't really fix the issue on some keyboards

Merge please. U can install from @Nublo repo via gradle
compile 'com.github.Nublo:masked-edittext:eeb70445d313647870a9fc398d997a6a65e1d673'

Please Merge !


(Perl) Fix codegen for spacer in GridBagSizer.

In codegen/perl_codegen.py, tmpl_gridbagsizerspacer was missing the calls to Wx::GBPosition->new and Wx::GBSpan->new, resulting in incorrect perl code.

Thanks


Ensure we have a single JDK module

It was a wrong decision of mine to merge the PR, this PR is merely a "smart hack" and as we know, every hack sooner or later will require more hacks down the road. Problems with this approach:

IDE is unusable
running UTs from IDE is imposible (due that above)
reusing the library is impossible in any downstream project that uses enforcer to enforce byte-code level
it produces "broken artifact", a JAR that mixes byte-code levels in non standard way (those classes are not in their "proper place" like META-INF/version but in root) -- this also have implications when enumerating classes on classpath with this jar on classpath...

Am undoing this change.

Strictly speaking:

IDE was unusable before (was lost between java version) so guess it is kind of a limitation of such setups
I did it when working on the PR so I assume you just didnt tune the compiler release version of the module?
enforcer has several pitfalls can be one but not sure why it would be worse than the mjar flavor, it stays java (actually what we do since > 10 years)
This is not broken, any fatjar is in this case and it is java friendly, actually MJAR is this kind of jar

However mjar enforces:

more work on the jvm (classloading)
more work (or blocker) on any consumer that uses an IoC and scanner
more work (or blocker) on any consumer not using a flat classpath or classloader compatible with mjars (most of them actually, keep in mind EE does not know about modules and mjar yet, or several spring boot packaging flavors ignore it for ex)

If the issue is just about mixing bytecode major version we can have jdk module (release=8) depending on jdk11 one and be it, would probably help with IDE issue too (for idea at least).
That said I agree with your original analyzis that the IoC should skip the not loadable component (jdk8 there) and compiling everything with java 11 is the simplest, the 17/21 new API can be handled with reflection quite easily so sounds like the best compromise to me too.
You mentionned sisu can break that but I guess we should just ensure it stays a feature either with a global or specific flag (ignorable classes or alike).

I disagree with you, as MJAR in this case is transparently handled by JDK classloader, as "Maven as resolver using code" in this case is completely oblivious (and should be oblivious) what is "changed" when running on different JDK versions. Moreover, the superiority of pattern that this PR replaced is visible in Central as well:
https://repo.maven.apache.org/maven2/org/apache/maven/resolver/
Basically, each "constituent" JAR (along with proper bytecode) is deployed to Central, along with the -jdk MR one. This means, that consumer has a choice: to consume MR JAR or go directly for Java 11 without any fuss. IMHO, for libraries meant for downstream consumption, this is the cleanest and most "maven way" solution (and works in IDEs as well).


seperate the classes for window and audio processing

Created another for audio processing so that can be scaled independently of the window class

approved


Need help generating code off sandify.org

Once I set up the track how I like with shapes and modifiers and adjust my machine settings, I have a Sisyphus table, I am having trouble actually getting the code to generate.
After I click the generate code button a window comes up called code parameters.  It askes for program star and end code 1)What are these supposed to be? 0,0 or 0,1?
Regardless of what I enter in here once I click the button to generate the thetarho code nothing happens,  2) What am I doing wrong here? Or, where is it saving the files to?

You can leave them empty. They are really more applicable to gcode, where there are speeds and homing procedures at the start and end of the gcode.
It should open a download dialog as though you were downloading a file. But it also has to build that file in memory first (which is usually quick, and small enough). The Theta Rho code can get quite large though, and IIRC, some browsers won't work with larger files. Try something much simpler first, like with 1 loop, and see if it's actually working. Then, if that works, you can try another browser. If another browser works, let me know so I can try to fix it (at some point).

Thanks for the quick reply.  Seems like Microsoft Edge just wont open the download dialog from the sandify site.  Switched over to Chrome and works quickly for short or long tracks, from some quick testing.

OK. Thanks for reporting. I will see if I can get access to an edge browser someday to find a fix. I run Linux on all my machines at home.

Just checked with the new, improved Edge browser that came out in the big update last week and can say it's not improved enough. It still doesn't work. No really useful errors, just couldn't download.
Bill
Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------
From: Jeff Eberl<EMAIL_ADDRESS>Date: 11/19/19 3:18 PM (GMT-08:00)
To: jeffeb3/sandify<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: Re: [jeffeb3/sandify] Need help generating code off sandify.org (#84)
OK. Thanks for reporting. I will see if I can get access to an edge browser someday to find a fix. I run Linux on all my machines at home.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/jeffeb3/sandify/issues/84?email_source=notifications&email_token=ABM4AODSW3ASM2BYSJND2U3QURX4DA5CNFSM4JPKFCMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEQDZXQ#issuecomment-555760862, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABM4AOHIDP4CEAM5ORZGEQDQURX4DANCNFSM4JPKFCMA.

Does it have any "console"? In Firefox, it's in the developer tools. There might be a useful error there.

It looks like there's some sort of developer mode in Edge but I haven't had a chance to check it out.
Bill
Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------
From: Jeff Eberl<EMAIL_ADDRESS>Date: 11/19/19 9:22 PM (GMT-08:00)
To: jeffeb3/sandify<EMAIL_ADDRESS>Cc: Bill Seymour<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [jeffeb3/sandify] Need help generating code off sandify.org (#84)
Does it have any "console"? In Firefox, it's in the developer tools. There might be a useful error there.

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jeffeb3/sandify/issues/84?email_source=notifications&email_token=ABM4AOE5PO7TICQ6POO3L23QUTCRHA5CNFSM4JPKFCMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEQX5LI#issuecomment-555843245, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABM4AOE6QSV3YET3KFFYAILQUTCRHANCNFSM4JPKFCMA.

@billsey Can you confirm this works with Edge? I tested it here, but I would love some more eyes on it. I'm going to close it for now.


chore: add new vault policy []

What will change?

update policy

Chicken - Egg issue - what was there first
The npm token from the old policy is no longer available, and the new one can't be accessed yet 😓


Formatting not consistently applied with Tailwind + Sveltekit + Flowbite

Describe the bug
I'm struggling to figure out a bug and I'm lost trying to figure out where the issue might live? I'm working with Sveltekit and trying to style portions of text inside ActivityItems from Flowbite while using Tailwind. The problem is the styling doesn't show up in dev or prod. I just get plain text. But then if I add an unrelated component on the same page that uses that same e.g., color, suddenly the styling shows up inside the ActivityItem component.
I created an example here on stackblitz  where I just forked Flowbite-Svelte-Kit-1.16.3 as recommended by @shinokada and dropped in some code that shows the problem. If you look at the feed route each activity should have colored elements, but only one of them shows up with pink which is somehow only showing up because I added an extra element with pink in it.
In case that code is too cluttered, here is how I asked the question on discord:

Anyone know if that sounds like a Flowbite problem, a Tailwind problem, or a Sveltekit problem?  (it is definitely a me doing something wrong problem).
A minimum example is that I define a color in tailwind.config.js like:
theme: {extend: {colors: {ctpf: {pink: '#f4b8e4'}}}}
Then inside my +page.svelte I create an ActivityItem with
title: Formatted unformatted
that will show all unformatted text. But if I then add an unrelated button to the page that also uses ctpf-pink, suddenly the word Formatted shows up with the pink color I wanted all along.

Note, I'm pretty new to all of this so good chance it is just me doing something completely wrong.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-uvz2zh?file=src%2Froutes%2Ffeed%2F%2Bpage.svelte
Flowbite version and System Info
I'm not sure how to pull the system info out of the stackblitz linked above.

After a bit more digging I suspect that I'm just trying to use custom colors incorrectly.
It doesn't say it explicitly in the colors documentation  but perhaps I need to stick with the standard color names (e.g. Primary, Secondary) instead of trying to extend in custom color names?
For what it is worth, I'm just trying to get the catppuccin palette. I'm also trying to use their tailwind package https://github.com/catppuccin/tailwindcss

I believe I found the explanation for what I was doing wrong here:
https://tailwindcss.com/docs/content-configuration#dynamic-class-names
If I can solve this in the next few days I'll close this out with a comment about how I fixed it in case anyone else ever makes the same mistake. If I can't solve it, I'll close it and just say that I gave up.

Looks like I have to explicitly create an array that spells out all the classes so the tailwind regex and pick it up.


Nested chat for hierarchial planning

Nested chat for hierarchial planning
Prompt changes in many places to make planning work
Reintroduced key combination skill set (useful for pagedown, and enter).
Changes to text entry to ensure previous search term is removed from field
Early version of mutation observer implementation and ability for skills to listen to DOM changes (This only triggers when new elements are added to DOM. In reality, the implementation of popups or dropdowns as a consequence of user action may differ to toggling visibility, opacity or display style attribute)
Added todays date as part of the prompt. Many tasks may require it. (e.g. what is the cheapest flight from A to B today?)
Changes to evaluator to run webvoyager benchmark. Revert some of the cost related logging in evaluator since autogen does not return cost computation in results when nested chat is used.
Add ALT text of images as part of text_only DOM content_type

Introduce hierarchial planning


Documentation about horizon.Error.Problem

Hi guys,
When using the horizonclient go package (with Client.SubmitTransactionXDR), I sometimes get the error:
horizon error: "Transaction Failed" - check horizon.Error.Problem for more information

Maybe I missed something obvious, but looking at both documentation and source code, I just can't find how I'm supposed to do that. The error returned by SubmitTransactionXDR is just a standard go error type, without a Problem field, I can't find Error.Problem constants neither in horizonclient nor protocol/horizon, and I don't find anything else I could check.
Could you give an example about how we're supposed to check for error details?
Thanks!

Returned error type should be horizonclient.Error. Then you can use the provided helper methods to get details of what happened.
If that's not what you're seeing, please provide a minimal example code that repros the problem and we'll take a look.

Hi,
Thanks for your time!
Here is an example.
It wouldn't run for several reasons like missing source account or bogus
secret key, but it doesn't matter, it doesn't compile because of the
problem I want to show. If I try to build it, I get the error:
$ go build main.go
./main.go:47:7: herr.ResultString undefined (type error has no field or method ResultString)

If I try to force it to horizonclient.Error type, I get:
$ go build main2.go
./main2.go:46:10: cannot assign error to herr (type horizonclient.Error) in multiple assignment: need type assertion
./main2.go:47:10: cannot convert nil to type horizonclient.Error

And indeed,
SubmitTransactionXDR is returning a standard error type. Am I missing something?

I agree it's not the clearest interface. Usually the returned error will be subtyped, but the signature is a more general interface, so it's left to documentation to tell you what to expect. The godoc for the method mentions what can be returned:

SubmitTransactionXDR submits a transaction represented as a base64 XDR string to the network. err can be either error object or horizon.Error object.

The correct way to use this is to check the type and then take appropriate action. Using your example, something like this works:
	_, herr := client.SubmitTransactionXDR(xdr)
	if herr != nil {
		if herr2, ok := herr.(*horizonclient.Error); ok {
			fmt.Println("Error has additional info")
			fmt.Println(herr2.ResultCodes())
			fmt.Println(herr2.ResultString())
			fmt.Println(herr2.Problem)
		}
		return
	}

This type assertion pattern is a standard error approach (see e.g. the Go blog).


New room - When adding room name & use Space "-" is displayed between words instead of "_"

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Navigate to staging.new.expensify.com
Click on the green + button
Click on the "New Room" option
Enter room name that contain few words & use "Space" to separate the words (e.g #hello room name)

Expected Result:
When entering the room name, entering a "Space" should add a "_" to the name (e.g #hello_room_name)
Actual Result:
When entering the room name, entering a "Space" adds a "-" to the name (e.g #hello-room-name)
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/78819774/1c751605-2e83-4885-b261-c028af87d189
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub

Yeah, we use hyphens instead of underscore for room names. CC: @MitchExpensify
We need to update this test case, specifically this line:

Verify that when entering the room name, entering a "Space" adds a "_" to the name (e.g #hello_room_name)

To

Verify that when entering the room name, entering a "Space" adds a "-" to the name (e.g #hello-room-name)

It's a minor edit, I've done that directly. Closing this out! CC: @isagoico for vis.


Update README.md

new documentation URI in Readme

@simonoakesepimorphics
please check this and merge if the links are now correct


[#82] Add deploy.imagePullSecrets field to pull from private registries

This fixes #82.
Signed-off-by: Jeff Mesnil<EMAIL_ADDRESS>

@yersan Could you please review?


Create unit tests for Fluctuation Strength implementation

[x] Create a "test_fluctuation_strength.py" file with the unit tests for the Fluctuation Strength implementation
[x] Add it to the "tests/sq_metrics/fluctuation_strength" folder.
[ ] Create unit tests based on literature (Sottek's papers, Fastl & Zwicker, ECMA-418-2)

Current assumptions in the code that need confirmation:

[ ] Fastl & Zwicker define signal amplitude (e.g. 60 dB SPL) of modulated signals before applying modulation
[ ] Fastl & Zwicker define AM modulation depth in dB as the modulation depth in percentage (e.g. 100%), calculated to dB - so 20*log10(100) = 40 dB modulation depth

Suggestion for test/validation: compare Fluctuation Strength calculation with modeled curves for synthetic sounds (amplitude- and frequency-modulated pure tones). Sottek et al [1] has analytical expressions for:

The effect of modulation rate on the Fluctuation Strength of an amplitude-modulated (AM) 1 kHz tone at 70 dB and 40 dB modulation depth [Eq. 1];
The effect of modulation rate on the Fluctuation Strength of a frequency-modulated (FM) 1.5 kHz tone at 70 dB and 700 Hz frequency deviation [Eq. 2];
The effect of sound pressure level in dB on the Fluctuation Strength of AM and FM signals [Eq. 3];
The effect of frequency deviation and carrier frequency on the Fluctuation Strength of FM signals [Eq. 4].

[1] R. Sottek et al, "Perception of Fluctuating Sounds", DAGA 2021 - https://pub.dega-akustik.de/DAGA_2021/data/articles/000087.pdf

The equations from Sottek et al (DAGA 2021) describing the perceived Fluctuation Strength to synthetic, stationary AM/FM sounds are now implemented in tests/sq_metrics/fluctuation_strength/test_fluctuation_strength.py. These could be used to validate the Fluctuation Strength function, such as checking for max. 20% deviation from these metrics.

Added unit tests for Fluctuation Strength implementation: they generate the required test signals to compare with the Figures 1, 2, 3a, 3b, 5 and 6 in Sottek et al (DAGA 2021), and assert that all FS values are within 20% of the expressions given in the same paper.
At the moment, the dummy implementation of fluctuation_strength.py always returns 1, so all tests will always fail.

Batch of unit tests created successfully, in test_fluctuation_strength.py
The auxiliary variable force_pass inside this function lets the test progress and creates the figures even when the actual test calculation fails, which helps to see the results and run all the tests.


Added my name 'Abhishek Yadav' in README file

What changes does this PR do?
Added my name in README file

closing due to inactivity feel free to reopen


Client improvements and refactor

The client now keep track of policy names internally. Callers should not have to deal with any details of this.
This PR also refactors the client. It:

Simplifies the client implementation
Removes a few unnecessary methods
Makes it have proper python types
Adds docstrings to methods
Adds basic tests for the client

This PR breaks the existing tests. I don't exactly understand how they work. They use environment variables. Should I try to fix them? Any thoughts?

Ok, this passes all tests on python 3.8 and 3.9. There was some unittesting stuff added in 3.8 which I use here. I could probably figure out how to use pytest to do this if needed. Do we need to support python 3.6 and 3.7?

For this library it would be good if we support 3.6+, so it’s useful for more people :) I can check later today what we could do to make it work.

Good stuff! I like how you get the policy name from the first request and populate it that way, instead of assuming policies. Makes it more future proof and fault tolerant.

I'm going to merge this PR. We'd need to rewrite the tests to work on 3.6 up. I couldn't figure out an easy way to do that. I might not be using pytest right, I'm using the builtin unittest stuff for python which is what I'm used to. Happy to look into this more if you think it's important to.


Integration with Homebridge / Homekit?

I know this might be a bit far reaching but I am running a lot of things with Homebridge. It allows for many custom API to be running on Homekit which is much more restrictive.
The advantage is that you can use a more open environment as well and are not as tied to a specific vendor.
Thanks in advance

Have you tried the custom API screen?

Closing as been waiting a bit for a question answered. Feel free to reopen

Hi,
sorry was quite busy in the last couple of weeks. I have looked at the custom API part, however, I am really not a coder so I am a bit lost here. The solution I would like to interface with is https://github.com/dresden-elektronik/deconz-rest-plugin/wiki
If you feel like it and have some time, would be cool to get some guidance.
The API will need authentication, that much I do know
The other think I look for is simply when busy, switch on a light, if not switch it off.
Thanks a lot in advance


Cased Model?

Are you going to release a danish-based-cased model?

We have no plans for that at the moment, could you describe your use case?

Hi @mollerhoj,
I was using the Danish Version 1 model in an Aggression Detection task for Danish. However, the results were slightly worse than bert-multilingual-cased model. I believe for a task like aggression detection case matters. (For English - I assumed it might be the case for Danish too - I don't know Danish - I only use language models).
However, I will try the Danish version 2 too and will let you know.

That is a very reasonable assumption I must admit. I'll be considering cased models in the future.


Updated Contributer.js

Fixed a typo in details

Congrats 🎉, your PR got merged. To be eligible for the swags from iNeuron X ClueLess. Follow this steps.

SignIn / SignUp in [ClueLess Website](https://www.clueless.tech/) .

Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.

Here's my prof :  https://www.clueless.tech/profile/admin/40909973


Added method to retrieve documentation contributors.

Tests have to be improved after discussing test strategy in next meeting.

Applied all mentioned changes. I'll close this PR and make a new one based on the current state of the main branch to avoid conflicts.


Build a conda package for jina-hubble-sdk

From slack info
Build a conda package for jina-hubble-sdk. Otherwise, Jina and docarray do not work on conda.

First:
we generate conda based on the pypi package. so the conda package must be generated after the pypi package is released.
Second:
we need two keys:

one is  github_token
the other is anaconda token.

#93

Example:

GitHub: https://github.com/floralatin/floralatin-hubble-sdk/actions/runs/3334860436
Pypi: https://pypi.org/project/floralatin-hubble-sdk3/
Anaconda: https://anaconda.org/floralatin/floralatin-hubble-sdk3

just wait the pr merged by conda-forge adm


Initialize 2.6.1.dev0 version

Coverage remained the same at 89.126% when pulling e2f6e8e2f6a236dcfca2ac560934d500cd7af0ed on release/dev into a2303cb8bab0846f65b389e8de09e8fca704e7c7 on master.


SASS errors with Ember/Ember-CLI 3.4

I'm unsure of where the issue lies, but seeing this when I try to use 3.4 betas.
  - errorType: Sass Syntax Error
  - location:
    - column: 1
    - file: /Users/rwwagner/shipshape/shipshape.io/tmp/sass_compiler-input_base_path-xj0rSZNA.tmp/website/styles/app.scss
    - line: 8
    - treeDir: [undefined]
  - message: Build Canceled: Broccoli Builder ran into an error with `SassCompiler` plugin. 💥
Error: File to import not found or unreadable: pod-styles.
        on line 8 of tmp/sass_compiler-input_base_path-xj0rSZNA.tmp/website/styles/app.scss
>> @import 'pod-styles';

ya.. https://github.com/ember-cli/ember-cli/pull/7894 fixed it for me. It's not in the beta for some reason, but it's in master.

Ah okay, cool. Will try running master version of ember-cli, thanks!


feat: codegen for hyper,

PR Description
Through this PR I have added codegen file for rust hyper library and made necessary changes in other files to accomadate the change. The cargo.toml file is attached below:
name = "reqwest"
version = "0.1.0"
edition = "2021"

[dependencies]
reqwest = { version = "0.12.7", features = ["multipart", "rustls-tls"] }

hyper = { version = "0.14", features = ["client", "http1"] }
hyper-tls = "0.5"
hyper-rustls = "0.22"

bytes = "1.2"

serde_urlencoded = "0.7"

# Tokio for async runtime
tokio = { version = "1", features = ["full"] }

# Multipart for handling form data
multipart = "0.18"

# Serde for serializing/deserializing JSON
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

NOTE: Hyper doesnt support multipart and formdata. To accomplish this I have used reqwest library (I have referred reqwest codegen for this) but the my package version seems to conflict . But the implementation is exactly the same as that in codege of Reqwest and chances of error are less. I have contacted @Tanish2002 , the author of reqwest codegen file asking for his cargo.toml file but hasn't received a response . I will send the updated cargo.toml once I receive that.
Related Issues

Related Issue #149
Closes #149

Checklist

Yes I have gone through the contributing guide
Yes I have updated my branch and synced it with project main branch before making this PR
Yes I have run the tests (flutter test) and all tests are passing

Added/updated tests?

No, and this is why: Kinda hard for me and probably would require some mentoring.

##Preview

@Clasherzz I think using 2 libraries (reqwest and hyper) that do the same thing in the codegen is counterproductive.
Since hyper doesn't support multipart forms you can create the multipart data yourself. APIDash does expose the boundary data of attaced files.
https://github.com/foss42/apidash/pull/190 might help you a ton. ureq didn't support multipart forms as well so I did a custom implementation.
python's http_client has the same implementation as well

Thanks for the quick response Tanish . I was informed to use another library by @ashitaprasad . Which is why opted for reqwest . Let me see if i can create a multipart .

@Clasherzz By using another library, I meant what we have done for Python requests where we use requests_toolbelt for Multipart encoding
https://github.com/foss42/apidash/blob/main/lib/codegen/python/requests.dart
You have to use a helper library for multipart that is commonly used by the people using hyper. (Check with the project community or raise an issue asking if no community is available)
reqwest cannot be used as it is a competing HTTP client library and it is a high probability people will not use them together.

A custom implementation just like in #190 would also be accepted right?

No @Clasherzz
Custom implementation are no longer accepted and we have migrated from it for some earlier implementations.
You have to pick the library which is most used by the hyper community as that is what people who are generating the code will prefer.
There are a lot of crates available for this very purpose.
Some starting points:

https://crates.io/keywords/multipart
https://crates.io/search?q=form data

You can further investigate.

I haven't worked much with boundaries and is still a little confused. Here i was trying to use hyper_multipart_rfc7578 and to  my knowledge the boundary should be generated by its own. Upon execution of :
extern crate hyper_multipart_rfc7578 as hyper_multipart;
extern crate hyper_tls;

use hyper::{Body, Client, Request};
use hyper_tls::HttpsConnector;
use hyper_multipart::client::multipart;
use hyper::body::to_bytes;
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    // Create an HTTPS connector
    let https = HttpsConnector::new();
    let client = Client::builder().build::<_, Body>(https);

    // Create a multipart form and add text fields
    let mut form = multipart::Form::default();
    form.add_text("times", "3");
    form.add_text("text", "API");
    form.add_text("sep", "|");

    // Build the request
    let req_builder = Request::post("https://api.apidash.dev/io/form");

  //  let req_builder = Request::post("http://localhost:3000/api/hello");
    let req = form.set_body_convert::<Body, multipart::Body>(req_builder)
        .map_err(|e| format!("Failed to set body: {}", e))?;

    // Send the request and await the response
    match client.request(req).await {
        Ok(res) => {
            // Print the response status
            println!("Response Status: {}", res.status());

            // Convert the response body to bytes and print it as a string
            let body_bytes = to_bytes(res).await?;
            let body_string = String::from_utf8(body_bytes.to_vec())?;
            println!("Response Body: {}", body_string);
        }
        Err(e) => {
            eprintln!("Failed to send request: {}", e);
        }
    }

    Ok(())
}

An Error was  generated:
Failed to send request: error trying to connect: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file. (os error -2146762495)

Does this mean i have to send a custom boundary through a header. The same worked fine when i send it a local endpoint .Could you point out what going wrong.

@Clasherzz go through some example for text and file multipart input.
The whole purpose of using an external library is make it easier as user does not need not deal with creation of boundaries and content.

I am aware of this testcase and my previous code made a request  towards the same endpoint  (https://api.apidash.dev/io/form) . I thought this was the error of my code but now that you mentioned i ran the exact code in this test case :
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder

url = 'https://api.apidash.dev/io/form'

payload = MultipartEncoder({
  "text": "API",
  "sep": "|",
  "times": "3",
})

headers = {
  "content-type": payload.content_type
}

response = requests.post(url, data=payload, headers=headers)

print('Status Code:', response.status_code)
print('Response Body:', response.text)

But its showing an SSLCertification Error . I did this same for http.client package which resulted in similar error.
I am starting to think this is more of a server side problem .

@Clasherzz The server-side issue is now resolved. Please check again.

The branch is now ready for review
The new cargo.toml would be useful for testing :
[package]
name = "hypermulti"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hyper = { version = "0.14", features = ["client", "http1"] }
hyper-tls = "0.5"
hyper-rustls = "0.22"

bytes = "1.2"

serde_urlencoded = "0.7"
tokio = { version = "1", features = ["full"] }

hyper-multipart-rfc7578 = "0.7"

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

@Clasherzz You have to include the test file for this codegen. You can refer to the test files for other codegens here -
https://github.com/foss42/apidash/tree/main/test/codegen
Also, you need to ensure that the code generated for each and every test case actually works in your local setup. This will help you fix any issue.

I will start on that. In the meantime Is this thrid party library okay to use. The multipart library that you mentioned doesn't work for async requests. There is multipart- async which is not as widely used and the documentation is also poor. Currently there is scarcity of good libraries that works along with new hyper versions.This felt like an easier choice.

The testfile is added @ashitaprasad

The branc is ready for review @ashitaprasad .

There were two instances of CodegenLanguage.rustCurl in the test cases.
As per guidelines, you had to validate each and every test case locally and it looks like you haven't done so.

There were two instances of CodegenLanguage.rustCurl in the test cases.
As per guidelines, you had to validate each and every test case locally and it looks like you haven't done so.

There was a commit mistake while committing. I would add the correct files without delay.

Thanks for the support 🚀

Hey i just wanted to let you guys know that this was my first open source contribution. Thank for the support @Tanish2002 . Thanks for taking your time and patience on me @ashitaprasad.

@Clasherzz It is definitely a wonderful achievement and you should celebrate it on social media (LinkedIn, Twitter) and let your friends know about it 🎉🙌


Module resolution

Description
Module resolution

Use “module-resolver” babel plugin to transform module imports to use local paths rather than built files during dev/test thus improving workflow by obviating the need for watch/build processes
Update npm scripts respectively
Flattens package hierarchy for easier pattern matching
Add testing docs and update other docs

Motivation and context
Improves DX and obviates need for watch processes
How has this been tested?

Builds work properly
Demos work properly
Tests pass

Types of changes

Other (provide details below)

Refactor
Checklist

[x] Renders and functions properly in all supported browsers - [n/a]
[x] Automated tests written and passing - Existing test coverage
[x] Accessibility and inclusivity considered - [n/a]
[x] Rendering performance (initial load time & 60fps) and perceived performance considered - [n/a]
[x] Documentation created or updated

How does this PR make you feel?

@kylegach Comments addressed, thanks!


Updating Custom Tasks Versions

I am unable to locate the documentation for when a extension is updated in the Organization and how the task gets updated on the build/release agent itself.  If an extension is published multiple times in a day to the market place with the organization automatically install the latest version of the extension when the release is triggered?

Hi @Dejulia489, Thanks for reaching out. I'm following up on this and will be in touch! Thanks again.

Hi @Dejulia489 ,
When extensions are published, the next time there is activity for the organization is when the latest version of the extension is installed.
During this installation process, if there is a task in the extension, we start a process to install the tasks in the Azure Dev Ops service.
At runtime of the build/release the agent gets a message that contains what tasks are needed. The agent then downloads these tasks from the service. The agent will pull the latest task version within the major version that the Build/Release author chose. So, if they chose 2.* and the task is updated from 2.1.0 to 2.1.1 the agent will pull 2.1.1.
Does this help? Please let me know whether you have any further questions. Thank you!

Hello @chcomley ,
This is very helpful thank you!

Previously defined builds not using new updated version of task, until edit each definition.


[WIP][SPARK-33098][SQL] Fix In expression casts

What changes were proposed in this pull request?
Fix InConversion rule by finding the common wider type of list expressions first and then the final common type for comparison between the value and the list expressions.
Before this PR the query SELECT * FROM t WHERE c IN ('2') where c is Int generated the following filter:
Filter cast(c#31 as string) IN (cast(2 as string))

After this PR it generates:
Filter cast(c#31 as int) IN (cast(2 as int))

that is identical to what a WHERE c = '2' would do.
Why are the changes needed?
To make In behave like = and avoid issues described in https://issues.apache.org/jira/browse/SPARK-33098
Does this PR introduce any user-facing change?
Yes, some queries will not fail.
How was this patch tested?
Existing UTs and I will add some new ones as well.

Test build #129587 has started for PR 29988 at commit 558c032.

Does it duplicate #22038?

Does it duplicate #22038?

Hmm, it might be the case. Unfortunately, I didn't notice that old PR. Let check how they relate to each other.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34192/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34192/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34192/
Test PASSed.

Does it duplicate #22038?

Hmm, it might be the case. Unfortunately, I didn't notice that old PR. Let check how they relate to each other.

It is a duplicate indeed. I will close my PR.

Test build #129587 has finished for PR 29988 at commit 558c032.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/129587/
Test FAILed.


Trying to reinstall HAP-NodeJS and can't add or see accessories

Can you help me with with this issue? Also can you let me know what is the simplest way to update to the latest version of the server.
Kind regards
Bluntiless

Your raspberry pi is connected to a network? WiFi or Ethernet?
Please copy the output of the command ifconfig

Hi Rodorgas,
Its connected via WiFi.
I'll try the ifconfig next


Add intructions for building with ASAN

For easily reporting crash bugs

Even if binaries are provided with ASAN, it still needs a local install of libasan and LD_PRELOAD. So this is out of scope for most users anyways.


update qq to v4.1.1

Thank you for the contribution. It needed some fixes, so they were made in 8f7bfb90f3c2000953655161b38d0dc777d90000. Your contribution is still included (and still credited to you), with the appropriate modifications. Please feel free to ask about any of the changes.


Parse extended class to read some informations

import React, {Component} from "react"

class A extends Component {

  static propTypes = {
    whatever: PropTypes.isRequired,
  }

  render() {
    return {this.props.whatever}
  }
}

class B extends A {
  render() {
    return {this.props.whatever}
  }
}

B gets an error on propTypes undefined on this component.

Mmm, I think we can only have a limited support for this case.
We can handle the above script but not this one for example:
import A from "a"

class B extends A {
  render() {
    return {this.props.whatever}
  }
}

In this case the extended class is in another file and we cannot know if the propTypes property is defined in it or not.

I think the fs read might be a problem. But it's doable right ?
Maybe disabled by default but that can be handled when set to true ?

Linting is only made on the current file content, starting to jump from file to file, resolving imports and finding how the class is constructed will be very complicated (but I accept PR :wink: ).
I can handle the original case and if you encounter the second one I think the best way to handle it should be to ignore the prop-types rule for this class:
import A from "a"

class B extends A { // eslint-disable-line react/prop-types
  render() {
    return {this.props.whatever}
  }
}

Is there a way we could do a decorator-style comment above a class manually to inform the parser that the class is a descendent of a Component and lint it thusly?


Improve browsers icons

Now we are doing:
    iconElem.src = `/assets/browser_logos/${id}.svg`;

It has 2 problems:

When Can I Use added new browser, we will have 404 error
SVG files are not processed by Vite. For instance we do not add cache busters.

Instead we should import all icons by import imgUrl from './img.svg'

Is there svg-loader for vite?..
I found only vue loader.

You don’t need SVG loader.
When you write import svgPath from './path/to/file.svg' you will have URL to SVG in svgPath variable. This is the default behavior of Vite.
import imgUrl from './img.svg'

iconElem.src = imgUrl


Fill up privacy policy form in App Store Connect

Needed to submit updates after December 8, 2020.
According to: https://help.apple.com/app-store-connect/#/dev1b4647c5b
Form at: https://appstoreconnect.apple.com/apps/1358230430/appstore/privacy
Note that https://alphawallet.com/privacy-policy/ rads like it's for the website rather than for the app(s).

Done sometime last week.

Done sometime last week.


[WIP] session tickets

Still have some problems with linking new OpenSSL.
LibreSSL has not SSL_SESSION_get0_ticket. But if we need it, I will look if tickets can be accessed directly.
Do we need session_id?
The following info is for client code and we can not use it in server. SSL object or SSL_SESSION should  be used instead.
            struct {
                char *server_name;
                h2o_cache_t *session_cache;
                h2o_iovec_t session_cache_key;
                h2o_cache_hashcode_t session_cache_key_hash;
            } client;

would be nicer if it works with integrated libressl.
is it not possible to access libressl's typedef struct ssl_session_st SSL_SESSION; directly?


solve_triangular vs spsolve_triangular: Treating non-triangular matrices

I need to solve upper-triangular systems with both dense and sparse matrices. To this end, I'm looking at solve_triangular for dense and spsolve_triangular for sparse.
The second thing is that solve_triangular correctly discards the unused part, i.e., the solution works even if the input matrix A is not triangular. This is useful in many cases, e.g., in stationary methods like Gauss-Seidel; it saves you all matrix-manipulation shenanigans.
import numpy as np
from scipy.linalg import solve_triangular

A = np.array([
    [1.0, 2.0],
    [3.0, 4.0]
])
b = np.array([1.0, 1.0])

sol = solve_triangular(A, b)
print(sol)

[0.5, 0.25]

spsolve_triangular one the other hand flat out won't accept non-triangular matrices. This
import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.linalg import spsolve_triangular

A = csr_matrix([
    [1.0, 2.0],
    [3.0, 4.0]
])
b = np.array([1.0, 1.0])

sol = spsolve_triangular(A, b)

numpy.linalg.LinAlgError: A is not triangular: A[0, 1] is nonzero.

This is a feature request for accepting non-triangular matrices to spsolve_triangular to avoid having to create temporary matrices for the solution of triangular problems.
This is with SciPy 1.6.3.

Here's where we do the check: https://github.com/scipy/scipy/blob/701ffcc8a6f04509d115aac5e5681c538b5265a2/scipy/sparse/linalg/dsolve/linsolve.py#L613
It's a little complex because we're doing indexing tricks to avoid seeking through the nonzero entries of each row to find the diagonal entry. I think a rewrite could improve the code's readability and remove this limitation at the same time. We'll want to be careful not to incur a performance penalty, as well.


Plugin relevance

This was a really great plugin, and though there is a native file list, it does not allow file deletion. I think this is a design choice by Mattermost because they want people to buy enterprise then use the data retention policy. That leaves community users no way to easily delete files, for security or disk space. Maybe you no longer have any interest, but this plugin could be relevant again if it was reduced to providing a delete button and its back-end handler.

is this plugin still compatibile with current Mattermost (version 10) ?

@lukasMega compatibility broke a long time ago.


Add #ifdef for changes in c8e38df to allow building on LLVM > 3.5 again.

LGTM, thanks for the fix. I will test on my end and merge if there are no problems.

Fixes #702

Hold off on this for a minute.
I might have been a bit hasty...and this won't fix the leak in 3.5...

From what I gather reading though 3.5, c8e38df did introduce a leak.
Unless there is an objection I'm going to update this to fix the leak as well as compilation errors for 3.6+.

Yes,  please.
On February 6, 2017 12:34:59 PM PST, marsupial<EMAIL_ADDRESS>wrote:

From what I gather reading though 3.5, c8e38df did introduce a leak.
Unless there is an objection I'm going to update this to fix the leak
as well as compilation errors for 3.6+.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/imageworks/OpenShadingLanguage/pull/703#issuecomment-277805036

--
Larry Gritz
<EMAIL_ADDRESS>

Ok, updated. I'd certainly build and test against 3.5 as I haven't.
There was a possible leak, though the chances of it were probably small.

To make it still work for LLVM 3.4 / C++03, you need to change
#if OSL_LLVM_VERSION < 40
    typedef std::error_code LLVMErr;
#else
    typedef llvm::Error LLVMErr;
#endif

to
#if OSL_LLVM_VERSION >= 35
#if OSL_LLVM_VERSION < 40
    typedef std::error_code LLVMErr;
#else
    typedef llvm::Error LLVMErr;
#endif
#endif

because std::error_code is not present prior to C++11.
AFTER we branch RB-1.8, then we can be totally free with the C++11 idioms.

Yes llvm::Error, llvm::error_code, and std::error_code was horrifically annoying me last week.
I'm not sure how that relates to these changes though, or you want me to add something on top?

As far as I can tell, those error codes are only used for LLVM 3.5 and beyond (which are C++11), so I just enclosed that section in one more layer of
#if OSL_LLVM_VERSION >= 35

It would be handy if you did it on your end, but I can apply it on my end if you want. (I did so and was ready to merge, before you added another change; each time you push an update I have to re-apply it.)

I'll apply it on my end again, for the sake of expediently getting this merged.

Let's just keep this as is confined to the leak and failure to build > 3.6 from the previous commit?
Here's how I wound up solving the problem in unrelated code. The problem was that
LLVM 3.4 no std::error_code, llvm::error_code
LLVM 3.5+ std::error_code
LLVM 3.9/4.0 both use std::error_code but 4.0 changes the usage of llvm::Error for some calls
#if OSL_LLVM_VERSION <= 34
typedef llvm::error_code LLVMErr;
typedef llvm::error_code std_error_code;
#else
typedef std::error_code std_error_code;
# if OSL_LLVM_VERSION >= 40
typedef llvm::Error LLVMErr;
inline bool error_string (llvm::Error err, std::string *str) {
    if (err) {
        if (str) {
            llvm::handleAllErrors(std::move(err),
                      [str](llvm::ErrorInfoBase &E) { *str += E.message(); });
        }
        return true;
    }
    return false;
}
# else
typedef std::error_code LLVMErr;
# endif /* OSL_LLVM_VERSION >= 40 */
#endif /* OSL_LLVM_VERSION <= 34 */

inline bool error_string (const std_error_code &err, std::string *str) {
    if (err) {
        if (str) *str = err.message();
        return true;
    }
    return false;
}

So, would you like me to merge this one now, and then tackle the LLVM 3.4 fix separately? Is that what you mean?
I just want the smallest possible fix for LLVM 3.4, because as soon as we branch, master is going to have the LLVM 3.4 support taken away.

Exactly which LLVM versions are you able to test against on your end?

With your latest patch here, I'm still getting build errors for LLVM 3.5 (but works for 3.4 and 3.9).

llvm_util.cpp:534:41: error: no viable conversion from 'llvm::MemoryBuffer *' to 'std::unique_ptr<llvm::MemoryBuffer>'
    std::unique_ptr<llvm::MemoryBuffer> buf =
                                        ^

Ugh! Think if I move that to a construction rather than assignment it should work.

yes, it does!
I'll just do that on my end

OK, with that change, I'm getting clean builds on OSX with llvm 3.4, 3.5, 3.9, and on Linux with 3.4, 3.5, 3.9, and 4.0.
Merging as soon as I see non-disastrous results from the TravisCI builds!

Updated here as well. I've noticed Travis not passing for any PR, but master seems to go fine.
It's a weird issue with building ImageIO on Linux, failing for -ldl.
For what it's worth I write/compile against 3.9 (against a 3.9 debug build tree).
Compile and run the tests against 4.0 release install.
Every now and then I run the changes against a 3.4 release install.
So before I submit a PR it's passing all tests on OS X for 3.4, 4.0; and definitely compiles against 3.9.

Don't worry about the Travis, I have a set of changes to address that.

Oh, are they available somewhere? I just started copying/pasting some Travis stuff I have so I can stop running the tests locally.

Not yet. Working on it. The code base keeps shifting around underneath me!

Your current #703/this patch (with my minor fixes on top of them) pass all the Linux flavors on Travis now.
The OSX Travis builds are messed up for an entirely different reason.
Merging...

MERGED!
No more code changes will be merged until I branch, working on that now.


Core_Matx.fromMat_ Windows 8.0 failure

Windows 8.0 has Core_Matx.fromMat_ test failure.
Initial check based on test-contrib branch.
Also reproduced on Windows 8.0 for Itseez master
Repro:
Itseez master

Generate projects for Visual Studio 2012 (cmake -G "Visual Studio 11 2012" <path to src> w/o additional parameters should be enough)
Build solution
Start opencv_test_core.exe. You may use parameter --gtest_filter=*fromMat_ to reduce execution time

test-contrib branch

Set all environment variables and install required tools from this readme
Run the following command from platforms\winrt to generate solution:
setup_winrt.bat WS 8.0 x86 -G "Visual Studio 11 2012"
Build solution
Start opencv_test_core.exe. You may use parameter --gtest_filter=*fromMat_ to reduce execution time

Log:
[----------] 1 test from Core_Matx
[ RUN      ] Core_Matx.fromMat_
..\..\..\..\..\..\modules\core\test\test_mat.cpp(1217): error: Value of: 0.
  Actual: 0
Expected: norm(a, b, NORM_INF)
Which is: 13
[  FAILED  ] Core_Matx.fromMat_ (0 ms)
[----------] 1 test from Core_Matx (0 ms total)

Additional info:
 TEST(Core_Matx, fromMat_)
 {
     Mat_<double> a = (Mat_<double>(2,2) << 10, 11, 12, 13);
     cout << " MatA: " << a; // a is correct there
     Matx22d b(a);
     cout << " MatB: " << b; // b is [0, 0; 0, 0]
     ASSERT_EQ( norm(a, b, NORM_INF), 0.);
 }

Say, replacing of Matx22d b(a); with explicit initialization via pointer Matx22d b((double *)a.ptr()); makes the test pass. However I think this cannot be considered as fix because test checks work of the constructor b(a)

No repro on the latest rebase


OSX: Add signing of directory structure when exporting for OSX

This enable to sign all dylib and framework in a directory added as shared objects.
This is useful when you need a dependency that contains several dylib, taking care of directory structure (as an example an unsigned JVM build.
This checks if shared object is a directory.
If it is, it will call new method EditorExportPlatformOSX::_code_sign_directory to explore folder, find all dylib and framework in it and sign them.
If it is not a directory, this will call EditorExportPlatformOSX::_code_sign as before.
Changes can be easily added to 3.4.
This resolves #52184

Will do some more testing with JVM to check how it behave without non executables files.
Then I'll update this PR.

Will do some more testing with JVM to check how it behave without non executables files.

Probably the best option is to add an extra argument to the EditorExportPlugin::add_shared_object function (or a new dedicated function) to indicate there are non-executable files. If it's set, copy it to the Resources instead.

BTW, just for knowledge.
Is it an apple requirements to have only executable code in Framework dir of the app ?
Because with all jvm files included it works on my side.

Is it an apple requirements to have only executable code in Framework dir of the app ?

It's Apple requirement for notarization. It's not preventing the app from working.

Is it an apple requirements to have only executable code in Framework dir of the app ?

It's Apple requirement for notarization. It's not preventing the app from working.

I think JVM will cause troubles for notarization :/
There is a file named module in lib folder of JVM. If I remove it, JVM cannot initialize properly.
I tried to place it in resource folder with same layout, but it seems JVM needs it right next to dynamic libraries.

It's OK to put all other dynamic libraries to the Resources as well.

The only restricted folders are Frameworks and MacOS, everything else can have any files.
I have seen Java based notarized apps with the structure like this (Java stuff it the root of the bundle):

Putting everything Resources seems like a cleaner way, but if it's not working for some reason, it might be an option as well.

Hey ! It should work in Resources folder, After all we just dlopen jvm dynamic lib.
I just want to be sure what's the best folder for embedded jre.   It seems Oracle is putting it in PlugIns` directory. Do you think it is a better option ?

PlugIns directory. Do you think it is a better option ?

If other Java app use PlugIns, it's probably better to do the same.

PlugIns directory. Do you think it is a better option ?

If other Java app use PlugIns, it's probably better to do the same.

Thx ! Will add a method to add to PlugIns directory.

@bruvzg everything should be fixed

@bruvzg need another review as I just spotted I forgot clearing osx plugins when export ends.

Please squash your commits into one with a single descriptive commit message (title of the PR is okay).

Please squash your commits into one with a single descriptive commit message (title of the PR is okay).

Done :)

Thanks! And congrats for your first merged Godot contribution :tada:


Saving the polygonized inundated area

It would be good to have polygonized results after the reclassification of the inundation map tiff. It is necessary for further visualization purpose.

@rkalyanapurdue note to self: save out polygonized raster to geojson in processor's target folder


Make a react component?

This would be useful as a react component. Especially for use in future react projects.

Complete: https://github.com/pallant/react-character-map