text:
[Path Provider] MissingPluginException(No implementation found for method getApplicationDocumentsDirectory when app is in the background

Describe the bug
For example when using path_provider inside a BackgroundMessageHandler the handler stops execution with an error like this:
I/flutter ( 4554): FlutterFire Messaging: An error occurred in your background messaging handler: I/flutter ( 4554): MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)`
Steps to reproduce
Steps to reproduce the behavior:
Take the [example project](https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging/firebase_messaging/example)
Add [path_provider](https://pub.dev/packages/path_provider) to the pubspec.yaml.
Call getApplicationDocumentsDirectory in main.dart's _firebaseMessagingBackgroundHandler.
Run the app and put in the background in order to use the BackgroundMessageHandler.
Send a message through firebase.

Expected behavior
I expected that getApplicationDocumentsDirectory would return the same value as if i run it in the main method and not to throw an error.
Sample project
If you use the example project for firebase messageing the only difference is to add path_provider to the pubspec.yaml and edit the main.dart beginning like this.
import 'dart:async';
import 'dart:convert';

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:firebase_messaging_example/firebase_config.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:path_provider/path_provider.dart';

import 'message.dart';
import 'message_list.dart';
import 'permissions.dart';
import 'token_monitor.dart';

/// Define a top-level named handler which background/terminated messages will
/// call.
///
/// To verify things are working, check out the native platform logs.
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
  // If you're going to use other Firebase services in the background, such as Firestore,
  // make sure you call `initializeApp` before using other Firebase services.
  WidgetsFlutterBinding.ensureInitialized();
  print(getApplicationDocumentsDirectory());  // this line produces a MissingPluginException
  await Firebase.initializeApp(options: DefaultFirebaseConfig.platformOptions);
  print('Handling a background message ${message.messageId}');
}

/// Create a [AndroidNotificationChannel] for heads up notifications
late AndroidNotificationChannel channel;

/// Initialize the [FlutterLocalNotificationsPlugin] package.
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  print(getApplicationDocumentsDirectory());  // however this does not.
  await Firebase.initializeApp(
    options: const FirebaseOptions(
      apiKey: 'AIzaSyAHAsf51D0A407EklG1bs-5wA7EbyfNFg0',
      appId: '1:448618578101:ios:0b11ed8263232715ac3efc',
      messagingSenderId: '448618578101',
      projectId: 'react-native-firebase-testing',
    ),
  );

  // Set the background messaging handler early on, as a named top-level function
  FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);

  // the rest of the file

Additional context
I tried several fixes including a clean build an even uninstalling the sdk completely an re-clone the project to make sure I have no build files leftover on my pc.
A coworker also build the build the project but clean an for the first time.
His machine did not have this problem.
Flutter doctor
Run flutter doctor and paste the output below:
$ /opt/sdk/flutter/bin/flutter doctor -v
[✓] Flutter (Channel stable, 2.10.2, on Arch Linux 5.16.11-arch1-1, locale en_US.UTF-8)
    • Flutter version 2.10.2 at /opt/sdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 097d3313d8 (11 days ago), 2022-02-18 19:33:08 -0600
    • Engine revision a83ed0e5e3
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /opt/sdk/android
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 13.0.1
    • cmake version 3.22.2
    • ninja version 1.10.2
    • pkg-config version 1.8.0

[✓] Android Studio (version 2021.1)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 64.1.2
    • Dart plugin version 211.7798
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3)
    • IntelliJ at /opt/intellij-idea-ultimate-edition
    • 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

[✓] Connected device (3 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 12 (API 32) (emulator)
    • Linux (desktop)              • linux         • linux-x64      • Arch Linux 5.16.11-arch1-1
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 98.0.4758.102

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

• No issues found!
`
```

Hi @mAlkhatieb, Thanks for filing the issue. I am able to reproduce the issue on stable and the master channel.  Calling getApplicationDocumentsDirectory() when the app is in the background it throws missing plugin exception.
Notice the logs calling getApplicationDocumentsDirectory in main prints Instance of 'Future<Directory> but throws missing plugin exception when called while app is in background

logs
Launching lib/main.dart on Redmi K20 Pro in debug mode...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
W/FlutterActivityAndFragmentDelegate(17048): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Connecting to VM Service at ws://127.0.0.1:52159/EOdwXFZOGMA=/ws
I/flutter (17048): Instance of 'Future<Directory>'
W/FlutterJNI(17048): FlutterJNI.loadLibrary called more than once
I/ResourceExtractor(17048): Found extracted resources res_timestamp-1-1646305914058
W/FlutterJNI(17048): FlutterJNI.prefetchDefaultFontManager called more than once
W/FlutterJNI(17048): FlutterJNI.init called more than once
I/FLTFireBGExecutor(17048): Creating background FlutterEngine instance, with args: [--start-paused, --enable-dart-profiling]
D/PathProviderPlugin(17048): Use TaskQueues.
I/flutter (17048): Token monitor set null
I/FLTFireMsgService(17048): FlutterFirebaseMessagingBackgroundService started!
I/flutter (17048): FCM Token: dFHYqUaMTamHwNU_idOH9-:APA91bHGfitU8DHpaxxfXNv09hNy3VhVOAPzY_bgBCZYOfrgqZM0TZAIEOAP5oqxc35H0Qdvjub1E8FLMnQEnp7CzoEzWmusbWv9ehryPbkp0lLfbntr4z7Z6wHPsMIG_woT0jel9o9Y
I/flutter (17048): Token monitor set null
I/evercode.triag(17048): ProcessProfilingInfo new_methods=1846 is saved saved_to_disk=1 resolve_classes_delay=8000
D/FLTFireMsgReceiver(17048): broadcast received for message
W/evercode.triage(17048): type=1400 audit(0.0:342914): avc: denied { read } for name="u:object_r:vendor_displayfeature_prop:s0" dev="tmpfs" ino=17608 scontext=u:r:untrusted_app:s0:c14,c260,c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0 app=com.nevercode.triage
E/libc    (17048): Access denied finding property "ro.vendor.df.effect.conflict"
E/libc    (17048): Access denied finding property "ro.vendor.knock.type"
W/evercode.triag(17048): Accessing hidden method Landroid/os/WorkSource;->add(I)Z (greylist,test-api, reflection, allowed)
W/evercode.triag(17048): Accessing hidden method Landroid/os/WorkSource;->add(ILjava/lang/String;)Z (greylist,test-api, reflection, allowed)
W/evercode.triag(17048): Accessing hidden method Landroid/os/WorkSource;->get(I)I (greylist, reflection, allowed)
W/evercode.triag(17048): Accessing hidden method Landroid/os/WorkSource;->getName(I)Ljava/lang/String; (greylist, reflection, allowed)
W/FirebaseMessaging(17048): Unable to log event: analytics library is missing
I/flutter (17048): Instance of 'Future<Directory>'
E/flutter (17048): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)
E/flutter (17048): #0      MethodChannel._invokeMethod
E/flutter (17048): <asynchronous suspension>
E/flutter (17048): #1      getApplicationDocumentsDirectory
E/flutter (17048): <asynchronous suspension>
E/flutter (17048):
I/flutter (17048): Handling a background message 0:1646305938972130%a9039156a9039156

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

// @dart=2.9

import 'dart:async';
import 'dart:convert';

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:http/http.dart' as http;
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:path_provider/path_provider.dart';

import 'message.dart';
import 'message_list.dart';
import 'permissions.dart';
import 'token_monitor.dart';

AndroidNotificationChannel channel;
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;

/// Define a top-level named handler which background/terminated messages will
/// call.
///
/// To verify things are working, check out the native platform logs.
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
  // If you're going to use other Firebase services in the background, such as Firestore,
  // make sure you call `initializeApp` before using other Firebase services.
  WidgetsFlutterBinding.ensureInitialized();
  print(getApplicationDocumentsDirectory());
  await Firebase.initializeApp();
  print('Handling a background message ${message.messageId}');
}

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  print(getApplicationDocumentsDirectory());
  // Set the background messaging handler early on, as a named top-level function
  FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);

  if (!kIsWeb) {
    /// Create a [AndroidNotificationChannel] for heads up notifications
    channel = AndroidNotificationChannel(
      'high_importance_channel', // id
      'High Importance Notifications', // title
      description:
          'This channel is used for important notifications.', // description
      importance: Importance.high,
    );

    /// Initialize the [FlutterLocalNotificationsPlugin] package.
    flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();

    /// Create an Android Notification Channel.
    ///
    /// We use this channel in the `AndroidManifest.xml` file to override the
    /// default FCM channel to enable heads up notifications.
    await flutterLocalNotificationsPlugin
        .resolvePlatformSpecificImplementation<
            AndroidFlutterLocalNotificationsPlugin>()
        ?.createNotificationChannel(channel);

    /// Update the iOS foreground notification presentation options to allow
    /// heads up notifications.
    await FirebaseMessaging.instance
        .setForegroundNotificationPresentationOptions(
      alert: true,
      badge: true,
      sound: true,
    );
  }

  runApp(MessagingExampleApp());
}

/// Entry point for the example application.
class MessagingExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Messaging Example App',
      theme: ThemeData.dark(),
      routes: {
        '/': (context) => Application(),
        '/message': (context) => MessageView(),
      },
    );
  }
}

// Crude counter to make messages unique
int _messageCount = 0;

/// The API endpoint here accepts a raw FCM payload for demonstration purposes.
String constructFCMPayload(String token) {
  _messageCount++;
  return jsonEncode({
    'to': token,
    'data': {
      'via': 'FlutterFire Cloud Messaging!!!',
      'count': _messageCount.toString(),
    },
    'notification': {
      'title': 'Hello FlutterFire!',
      'body': 'This notification (#$_messageCount) was created via FCM!',
    },
  });
}

/// Renders the example application.
class Application extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _Application();
}

class _Application extends State<Application> {
  String _token;

  @override
  void initState() {
    super.initState();
    FirebaseMessaging.instance
        .getInitialMessage()
        .then((RemoteMessage message) {
      if (message != null) {
        print("Got initial message $message");
        Navigator.pushNamed(context, '/message',
            arguments: MessageArguments(message, true));
      }
    });

    FirebaseMessaging.onMessage.listen((RemoteMessage message) {
      RemoteNotification notification = message.notification;
      AndroidNotification android = message.notification?.android;
      print('A new onMessage event was published!');
      if (notification != null && android != null && !kIsWeb) {
        flutterLocalNotificationsPlugin.show(
            notification.hashCode,
            notification.title,
            notification.body,
            NotificationDetails(
              android: AndroidNotificationDetails(
                channel.id,
                channel.name,
                channelDescription: channel.description,
                // TODO add a proper drawable resource to android, for now using
                //      one that already exists in example app.
                icon: 'launch_background',
              ),
            ));
      }
    });

    FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
      print('A new onMessageOpenedApp event was published!');
      Navigator.pushNamed(context, '/message',
          arguments: MessageArguments(message, true));
    });
  }

  Future<void> sendPushMessage() async {
    if (_token == null) {
      print('Unable to send FCM message, no token exists.');
      return;
    }

    try {
      var resp = json.decode((await http.post(
        Uri.parse('https://fcm.googleapis.com/fcm/send'),
        headers: <String, String>{
          'Content-Type': 'application/json; charset=UTF-8',
          'Authorization':
              'key=AAAAcVC6H8o:APA91bF9eBcw6f4RbqJ89uYUGJ7RpMm2w0-yU8T8TIJ5LgXbjc91z_WxlOOzsUotZc6kYpqIQs7EnO5Im00xrLNuLpbkZ7VHgtFQ_Jv19W-XMi2dvWLteOZDTo77u8SzPHy-qF1bxBgp'
        },
        body: constructFCMPayload(_token),
      ))
          .body);
      print(resp);
      if (resp['failure'] == 1) {
        print(
            "Failed to send to $_token due to ${resp['results'][0]['error']}");
      }
    } catch (e) {
      print(e);
    }
  }

  Future<void> onActionSelected(String value) async {
    switch (value) {
      case 'subscribe':
        {
          print(
              'FlutterFire Messaging Example: Subscribing to topic "fcm_test".');
          await FirebaseMessaging.instance.subscribeToTopic('fcm_test');
          print(
              'FlutterFire Messaging Example: Subscribing to topic "fcm_test" successful.');
        }
        break;
      case 'unsubscribe':
        {
          print(
              'FlutterFire Messaging Example: Unsubscribing from topic "fcm_test".');
          await FirebaseMessaging.instance.unsubscribeFromTopic('fcm_test');
          print(
              'FlutterFire Messaging Example: Unsubscribing from topic "fcm_test" successful.');
        }
        break;
      case 'get_apns_token':
        {
          if (defaultTargetPlatform == TargetPlatform.iOS ||
              defaultTargetPlatform == TargetPlatform.macOS) {
            print('FlutterFire Messaging Example: Getting APNs token...');
            String token = await FirebaseMessaging.instance.getAPNSToken();
            print('FlutterFire Messaging Example: Got APNs token: $token');
          } else {
            print(
                'FlutterFire Messaging Example: Getting an APNs token is only supported on iOS and macOS platforms.');
          }
        }
        break;
      default:
        break;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Cloud Messaging'),
        actions: <Widget>[
          PopupMenuButton(
            onSelected: onActionSelected,
            itemBuilder: (BuildContext context) {
              return [
                const PopupMenuItem(
                  value: 'subscribe',
                  child: Text('Subscribe to topic'),
                ),
                const PopupMenuItem(
                  value: 'unsubscribe',
                  child: Text('Unsubscribe to topic'),
                ),
                const PopupMenuItem(
                  value: 'get_apns_token',
                  child: Text('Get APNs token (Apple only)'),
                ),
              ];
            },
          ),
        ],
      ),
      floatingActionButton: Builder(
        builder: (context) => FloatingActionButton(
          onPressed: sendPushMessage,
          backgroundColor: Colors.white,
          child: const Icon(Icons.send),
        ),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            MetaCard('Permissions', Permissions()),
            MetaCard('FCM Token', TokenMonitor((token) {
              print('Token monitor set $_token');
              _token = token;
              return Column(
                children: [
                  token == null
                      ? const CircularProgressIndicator()
                      : Text(token, style: const TextStyle(fontSize: 12)),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      IconButton(
                        onPressed: () async {
                          var before = _token;
                          print('Before: $_token');
                          var token;
                          if (kIsWeb) {
                            token = await FirebaseMessaging.instance.getToken(
                                vapidKey:
                                    "BHOPmb4Gz7mSLtue-BSzZGOzIO1LTiHThiHl1_ZbUtRaj5PhHJhR2Isr9hGBH1gfw4jhcKJVTyDPneau8kdLyVw");
                          } else {
                            token = await FirebaseMessaging.instance.getToken();
                          }
                          _token = token;
                          print('After: $_token');
                          if (_token == null) {
                            ScaffoldMessenger.of(context).showSnackBar(
                                SnackBar(content: const Text("No token!")));
                            return;
                          }
                          if (before == _token) {
                            ScaffoldMessenger.of(context).showSnackBar(SnackBar(
                                content:
                                    const Text("Current token is valid!")));
                          } else {
                            ScaffoldMessenger.of(context).showSnackBar(SnackBar(
                                content: const Text("Got new token!")));
                          }
                        },
                        icon: const Icon(Icons.refresh),
                        tooltip: "Get token",
                      ),
                      if (_token != null)
                        IconButton(
                          onPressed: () {
                            Clipboard.setData(ClipboardData(text: _token));
                            ScaffoldMessenger.of(context).showSnackBar(SnackBar(
                                content:
                                    const Text("Copied token to clipboard!")));
                          },
                          icon: const Icon(Icons.copy),
                          tooltip: "Copy token to clipboard",
                        ),
                      if (_token != null)
                        IconButton(
                          onPressed: () async {
                            await FirebaseMessaging.instance.deleteToken();
                            print('Deleted token $_token');
                            var token =
                                await FirebaseMessaging.instance.getToken();
                            print("New token $token");
                            ScaffoldMessenger.of(context).showSnackBar(SnackBar(
                                content: const Text("Deleted token!")));
                          },
                          icon: const Icon(Icons.delete_forever),
                          tooltip: "Delete token",
                        ),
                    ],
                  ),
                ],
              );
            })),
            MetaCard('Message Stream', MessageList()),
          ],
        ),
      ),
    );
  }
}

/// UI Widget for displaying metadata.
class MetaCard extends StatelessWidget {
  final String _title;
  final Widget _children;

  // ignore: public_member_api_docs
  MetaCard(this._title, this._children);

  @override
  Widget build(BuildContext context) {
    return Container(
        width: double.infinity,
        margin: const EdgeInsets.only(left: 8, right: 8, top: 8),
        child: Card(
            child: Padding(
                padding: const EdgeInsets.all(16),
                child: Column(children: [
                  Container(
                      margin: const EdgeInsets.only(bottom: 16),
                      child:
                          Text(_title, style: const TextStyle(fontSize: 18))),
                  _children,
                ]))));
  }
}

flutter doctor -v (mac)
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.1 21C52 darwin-arm, locale en-GB)
    • Flutter version 2.10.3 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (18 hours ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.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 4.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.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (3 available)
    • Redmi K20 Pro (mobile) • 192.168.1.5:5555 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)        • macos            • darwin-arm64   • macOS 12.1 21C52 darwin-arm
    • Chrome (web)           • chrome           • web-javascript • Google Chrome 99.0.4844.51

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

• No issues found!

[✓] Flutter (Channel master, 2.11.0-0.0.pre.715, on macOS 12.1 21C52 darwin-arm, locale en-GB)
    • Flutter version 2.11.0-0.0.pre.715 at /Users/mahesh/Documents/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 8b95cd6f35 (7 hours ago), 2022-02-28 16:31:12 -0800
    • Engine revision 615a60512c
    • Dart version 2.17.0 (build 2.17.0-150.0.dev)
    • DevTools version 2.11.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! CocoaPods 1.10.2 out of date (1.11.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on
        the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

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

[✓] Android Studio (version 4.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.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (4 available)
    • Redmi K20 Pro (mobile) • 192.168.1.2:5555                     • android-arm64  • Android 11 (API 30)
    • iPhone 13 Pro (mobile) • CBEF6BFA-D3DC-4680-8900-E01C62A4B04C • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.1 21C52 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 98.0.4758.109

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

! Doctor found issues in 1 category.

Duplicate of https://github.com/flutter/flutter/issues/99155
See https://github.com/flutter/flutter/issues/99155#issuecomment-1052023743 for the current workaround.

I can confirm the work around works, verified on Android

logs
mahesh@Maheshs-MacBook-Air-M1 firebase_messaging_example % flutter run
Multiple devices found:
Redmi K20 Pro (mobile) • 192.168.1.2:5555                     • android-arm64  • Android 11 (API 30)
iPhone 12 Pro (mobile) • 14F40EC6-3B73-469A-A1C0-8CF0B152290F • ios            •
com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.1 21C52 darwin-arm
Chrome (web)           • chrome                               • web-javascript • Google Chrome 99.0.4844.51
[1]: Redmi K20 Pro (192.168.1.2:5555)
[2]: iPhone 12 Pro (14F40EC6-3B73-469A-A1C0-8CF0B152290F)
[3]: macOS (macos)
[4]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 1
Launching lib/main.dart on Redmi K20 Pro in debug mode...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.12/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-11.2.8/android/src/main/java/io/flutter/plugins/firebase/messaging/JobIntentService.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleDebug'...                            128.4s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...                20.2s
W/FlutterActivityAndFragmentDelegate(10458): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
I/flutter (10458): Instance of 'Future<Directory>'
W/FlutterJNI(10458): FlutterJNI.loadLibrary called more than once
W/FlutterJNI(10458): FlutterJNI.prefetchDefaultFontManager called more than once
W/FlutterJNI(10458): FlutterJNI.init called more than once
I/flutter (10458): Token monitor set null
I/flutter (10458): FCM Token: dFHYqUaMTamHwNU_idOH9-:APA91bHGfitU8DHpaxxfXNv09hNy3VhVOAPzY_bgBCZYOfrgqZM0TZAIEOAP5oqxc35H0Qdvjub1E8FLMnQEnp7CzoEzWmusbWv9ehryPbkp0lLfbntr4z7Z6wHPsMIG_woT0jel9o9Y
I/flutter (10458): Token monitor set null
I/evercode.triag(10458): ProcessProfilingInfo new_methods=1846 is saved saved_to_disk=1 resolve_classes_delay=8000
W/Choreographer(10458): Frame time is 0.072607 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
Syncing files to device Redmi K20 Pro...                           688ms

Flutter run key commands.
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 unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

An Observatory debugger and profiler on Redmi K20 Pro is available at:
http://127.0.0.1:49773/sORnwN-3fRQ=/
The Flutter DevTools debugger and profiler on Redmi K20 Pro is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:49773/sORnwN-3fRQ=/
D/FLTFireMsgReceiver(10458): broadcast received for message
E/libc    (10458): Access denied finding property "ro.vendor.df.effect.conflict"
E/libc    (10458): Access denied finding property "ro.vendor.knock.type"
W/evercode.triage(10458): type=1400 audit(0.0:447007): avc: denied { read } for name="u:object_r:vendor_displayfeature_prop:s0" dev="tmpfs" ino=17608 scontext=u:r:untrusted_app:s0:c14,c260,c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0 app=com.microsoft.office.outlook
W/evercode.triag(10458): Accessing hidden method Landroid/os/WorkSource;->add(I)Z (greylist,test-api, reflection, allowed)
W/evercode.triag(10458): Accessing hidden method Landroid/os/WorkSource;->add(ILjava/lang/String;)Z (greylist,test-api, reflection, allowed)
W/evercode.triag(10458): Accessing hidden method Landroid/os/WorkSource;->get(I)I (greylist, reflection, allowed)
W/evercode.triag(10458): Accessing hidden method Landroid/os/WorkSource;->getName(I)Ljava/lang/String; (greylist, reflection, allowed)
W/FirebaseMessaging(10458): Unable to log event: analytics library is missing
I/flutter (10458): Instance of 'Future<Directory>'
I/flutter (10458): Handling a background message 0:1646392240172387%a9039156a9039156

Please share the code if possible

@subhashish-bacancy not sure what code you are looking for the workaround for the problem is here https://github.com/flutter/flutter/issues/99155#issuecomment-1052023743

authors: mAlkhatieb maheshmnj stuartmorgan subhashish-bacancy


text:
Prepare the analyze_once test for removal of analysis_options_user support

Fixes https://github.com/flutter/flutter/issues/138227. Work towards https://github.com/flutter/flutter/issues/82948
In https://github.com/dart-lang/sdk/commit/c033718da0502ed92609f8c6cee2f6a59ccc058e, the analyzer's support for analysis_options_user.yaml is dropped. So no lint is reported in this test, as expected. This PR changes the test to expect no lint, and also no write the edits that trigger the lint.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

CC @goderbauer

source: gharchive/pull-request

repo: flutter/flutter

license_type: permissive

license_source: github-api


text:
[WIP] Opt-in for smooth pointer scrolling

WIP
Loosely based on the chromium smooth scroller for animating stepped mouse wheel scrolling.
Fixes https://github.com/flutter/flutter/issues/32120
The original PR (https://github.com/flutter/flutter/pull/115314) could not move forward until we could reliably distinguish trackpad input from mouse wheels on web. This was needed because trackpads already curve input deltas for smooth scrolling. If this curve is applied to already curved input, the user's scrolling input would go no where. A heuristic was added a while ago to identify trackpads on web, and it seems to be working well so let's see if we can get this in. :)
Based on the issues we had with this proposal before, I'd like to confirm this change does not have poor scrolling side effects in the following scenarios (unit tests won't capture the eccentricities of platforms that automatically curve data):

❔ To test
✅ Tested
❌ Issue found

Test app: https://gist.github.com/Piinks/35ff7fdfaad3a6d8f3bcc3e084abf59f

Web-on-desktop app scroll
Desktop app scroll

iOS - trackpad
✅
✅

iOS - mouse wheel
✅
✅

Android - trackpad
✅
✅

Android - mouse wheel
✅
✅

Mac - trackpad
✅
✅

Mac - mouse wheel
✅
✅

Windows - trackpad
❔
❔

Windows - mouse wheel
❔
❔

Linux - trackpad
❔
❔

Linux - mouse wheel
❔
❔

Pre-launch Checklist

[ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] I read the Tree Hygiene wiki page, which explains my responsibilities.
[ ] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[ ] I signed the CLA.
[ ] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Here's Windows - mouse wheel, scrolling works but appears to not respect my system's scroll speed settings:

Here's Windows web - trackpad, scrolling works but it is slow and appears to ignore scroll events sporadically if animatePointerScroll is true. Here's me attempting to scroll to the ends of the list as quickly as possible:

Ah ok, thank you @loic-sharma this is very helpful. Trackpads on web should not be going through the animated pointer path. This is why we were unable to land this change previously because it caused sporadic results with trackpad on web. It looks like we need to better identify trackpads on web so that they do not go through this code path.

Thanks again to @loic-sharma. I filed https://github.com/flutter/flutter/issues/139990 to follow up on the issue with identifying trackpads on web. I also updated https://github.com/flutter/flutter/issues/32120 to reflect the latest info on the bug, along with some work arounds and packages I found that achieve the desired effect. Until we resolve the web issue, I do not think we can land this as it causes erratic scrolling with trackpads on web, which is definitely not an improvement. 🙃

authors: Piinks loic-sharma


text:
Add CloseButtonTooltip to the 'X' button on a SnackBar

Adds a localized Close Button tooltip to the 'X' Button on a SnackBar, making it readable by screen readers.
Github Issue #143793
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[ ] I signed the CLA. (No need. I am a Googler.)
[x] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).  No need. I made a one-line change to a function.
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[ ] I followed the breaking change policy and added Data Driven Fixes where supported.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

LGTM with two tiny nits

@goderbauer Suggestions applied, thank you so much! Quick question: I don't have write access to this repo -- how can I merge this PR once the checks pass?


text:
[flutter_driver] use mostly public screenshot API.

Instead of completely private. This has been broken for Impeller for years, which shows how much this method is getting used.

Nice. Is it possible to test this on CI?

authors: jonahwilliams zanderso


text:
Roll engine 4ee648914f91..16922dd4125f (1 commits)

https://github.com/flutter/engine/compare/4ee648914f91...16922dd4125f
git log 4ee648914f91..16922dd4125f --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)
The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

@rmistry @liyuqian : New roll has been created by https://flutter-engine-flutter-roll.skia.org

Trybots failed. These were the failed builds: https://flutter-dashboard.appspot.com/build.html

Commit queue failed; closing this roll.


text:
Add "changes" to PointerEvents

Description
This PR adds a new property changes to PointerEvents, which describes the changes from the last event to this one.
Changes are essential to gesture recognition. For example, when the framework receives a mouse down event of button = 0x03 (left button and right button are pressed), it has no idea which button is newly pressed at this event, while which button had been held before this event.
This PR only adds a few properties to PointerDifference: timeStamp, position, buttons, down, pressure, distance. Size, shapes, orientation and tilt are not added, because they're more complicated (to be used together instead an independent scalar). Feel free to add them when they in demand in the future.
_PointerState and _pointers are renamed to _DeviceState and _devices, because they're indexed by device ID instead of pointer ID. _DeviceState now only stores the latest event, and represents the state of a device.
Other changes:

Fixed an issue where ui.PointerChange.remove with position change is not expanded to any events with position change.

Discussion

Is there a better way to initialize PointerEvent with PointerDifference? Currently due to PointerEvent being const, the computation of difference has to be done outside, and a lot of effort has to be added to make sure changes correctly reflects the difference between the last event to this.
What should PointerChange.remove with position change be expanded to? Currently it is expanded to "Cancel, Hover, Remove". Another options is "Hover/Move, Cancel, Remove", which is more complicated because the first event can be either hover or move.

Related Issues

This PR is part of the project of adding button support to Flutter desktop.

Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read Handling breaking changes).
[x] No, this is not a breaking change.

Generally we have been preferring level-based APIs to edge-based APIs, which is the reverse of the approach here. Is there a design doc or issue that discusses the design here so I can learn more about the trade-off being considered?

(Please get an LGTM from me before checking this in; I'd like to make sure I understand the design and purpose before we add something like this as this is something it would be very hard to change back later.)

@Hixie I will. Also I linked the related design doc in chat.

Cool, thanks.

@Hixie Can you take a look at the current PR? I removed the changes property, but I think the remaining changes are worth merging as a refactor. I've changed the PR description to include changes.

Please also talk to @chunhtai to make sure this will work with his refactoring.

This PR will be split into multiple parts. The first one is https://github.com/flutter/flutter/pull/29998.

authors: Hixie dkwingsmt goderbauer


text:
flutter tools hook support

This pr enable developers to add some customized hooks point into flutter tools. So that they can do some things before/after a flutter command, by specify a hooks.yaml under the root directory of their flutter project without modifying the flutter_tools.
A typical hooks.yaml is given below:
# Use the analysis options settings from the top level of the repo (not
# the ones from above, which include the `public_member_api_docs` rule).

commands:
  doctor:
    hook:
      before:
        executable: "perl"
        argument: "flutter_tools_hook.pl"
      after:
        executable: "/bin/sh"
        argument: "flutter_tools_hook.sh"
  build:
    bundle:
      hook:
        after:
          executable: "python"
          argument: "flutter_tools_hook_bundle.py"
    ios:
      hook:
        before:
          executable: "python"
          argument: "flutter_tools_hook.py"
        after:
          executable: "ruby"
          argument: "flutter_tools_hook.rb"

For example, 'python flutter_tools_hook_bundle.py "build bundle --target-platform=ios --target=lib/main.dart --release --depfile=build/snapshot_blob.bin.d --asset-dir=/Users/kylewong/Codes/Flutter/alibaba-flutter/flutter/examples/hello_world/ios/Flutter/App.framework/flutter_assets --precompiled" will be executed when flutter build bundle command is executed.
Tests
I added the following tests:
packages/flutter_tools/test/hooks_test.dart
It includes test logic for hooks.yaml parser, hooks execution logic.
Breaking Change

[ ] No, this is not a breaking change.

@jonahwilliams
This pr originally comes from a case that we want to do some dill transformation after it's generated by "flutter build bundle" command.
flutter build bundle command is often wrapped in flutter build apk, flutter build ios,etc, if we want to wrap it using a shell or some scripts, we need to modify the xcode_backend.sh or flutter.gradle, this kind of injection would make things more complex.
Besides, now, different from gradle/cocoapods, flutter_tools don't offer hooks so that developers can do this kind of stuff before or after a flutter command. A natively supported hook mechanism would give developers freedom to do their own job without injecting the flutter_tools.

I developed a aop framework aspectd available at https://github.com/alibaba-flutter/aspectd
Its core logic is to do dill transformation after a dill file is generated.
However, I want the dill transformation is called automatically if aop annotation is enabled, for a developer who want to use the aop, they can still use flutter build ios flutter build apk, flutter run --debug flutter run --release, without changing their way to use the flutter command.
So aspectd has to modify the flutter_tools, so that the dill transformation logic is executed after a dill file is generated, which would request more inner knowledge about the flutter_tools and made the injection logic vulnerable to changes.
Aspectd tries to solve the aop problem without invasion, however, the logic of flutter_tools still made it necessary to do invasion to flutter build process.
In this pr, i not only want to solve the aspectd invasion problem, but also provides a more general way to give developers chance to do some job they want.

We also have hook logic as above.
Which brings some differences from the github flutter repo and makes it hard to maintain.

@gspencergoog
What do you think is the best way to do provide hook support when using flutter command?

@jason-simmons
Different from gradle, flutter_tools provides no ways to do the hook related job when needed, that's what I'm trying to solve.

@kangwang1988 It looks a bit like you're using the aspectd package to plugin into the CFE. It would be great to start with a detailed issue describing a bit more how this works and what sort of transformations you are making. I think the CFE might have some APIs to do this sort of thing. We could cc the dart team and get a discussion going

Close this issue as I think we are on the right way to have a better solution to resolve my problem, see:https://github.com/flutter/flutter/issues/36738 for more.


text:
Deflake ImageProvider.evict test

This test became flaky after flutter/engine#9486, which changed the way that image stream resolution happens.  The test was probably flaky before that, but just harder to reproduce the flakiness.
fixes https://github.com/flutter/flutter/issues/35993 by waiting for the stream to complete on both the cache and the image provider.
/cc @chinmaygarde

Will land this on red once tests pass - the last failure was the exhausted heap space on windows flake.


text:
Roll Engine from ece904289bea to 02daceb261e4 (1 revision)

https://github.com/flutter/engine/compare/ece904289bea...02daceb261e4
2020-08-09 mouad.debbar@gmail.com [web] Implement support for WidgetSpan (aka paragraph placeholders) (flutter/engine#20276)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC liyuqian@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Commit queue failed; closing this roll.


text:
[framework] reland increase compute threshold to 50 KB

Description
Since the last time this was attempted I've stabilized the hot reload/restart benchmark. Should we try again?

I'm not really sure what the results will be - I cannot repro the slowdown locally so I'm sort of hoping when this runs on the devicelab nothing shows up

Oops, need to rebase


text:
Update README.md

Fixed bad variable name for tutorial

I signed it!

repo: flutter/plugins


text:
Enable no_leading_underscores_for_local_identifiers

Enables the no_leading_underscores_for_local_identifiers lint to align with
flutter/flutter, and fixes all violations.
Part of https://github.com/flutter/flutter/issues/76229
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[x] I signed the CLA.
[ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
[x] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

Sigh, I forgot script/tool/ again.


text:
Backdrop with NavigationRail

Is your feature request related to a problem? Please describe.
Material Design Guideline have come up with a new component called NavigationRail which have explained its behaviour with backdrop (Check Backdrop section in the Guideline).
Describe the solution you'd like
The NavigationRail should rest on backLayer when backdrop is active (backLayer is visible) as shown in the picture in guideline

@WieFel Let me know your views on it.

Interesting!
As far as I can see, NavigationRail is aimed for tablet/desktop sized screens, or am I wrong?
I think we could include it in the future, but I would suggest to do that after v1.0.

source: gharchive/issue

authors: WieFel daadu

repo: fluttercommunity/backdrop

license: MIT


text:
Address CVEs in go-lang binaries

When running a security scanner like Trivy against the latest release (which at the moment is 0.35.1), some CVEs and vulnerabilities are reported:
bin/kustomize-controller (gobinary)

Total: 2 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 0, CRITICAL: 0)

┌───────────────────────────┬───────────────┬──────────┬───────────────────┬───────────────┬────────────────────────────────────────────────────────────┐
│          Library          │ Vulnerability │ Severity │ Installed Version │ Fixed Version │                           Title                            │
├───────────────────────────┼───────────────┼──────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
│ github.com/aws/aws-sdk-go │ CVE-2020-8911 │ MEDIUM   │ v1.44.224         │               │ aws/aws-sdk-go: CBC padding oracle issue in AWS S3 Crypto  │
│                           │               │          │                   │               │ SDK for golang...                                          │
│                           │               │          │                   │               │ https://avd.aquasec.com/nvd/cve-2020-8911                  │
│                           ├───────────────┼──────────┤                   ├───────────────┼────────────────────────────────────────────────────────────┤
│                           │ CVE-2020-8912 │ LOW      │                   │               │ aws-sdk-go: In-band key negotiation issue in AWS S3 Crypto │
│                           │               │          │                   │               │ SDK for golang...                                          │
│                           │               │          │                   │               │ https://avd.aquasec.com/nvd/cve-2020-8912                  │
└───────────────────────────┴───────────────┴──────────┴───────────────────┴───────────────┴────────────────────────────────────────────────────────────┘

Before opening more issues like this, please read https://fluxcd.io/flux/security/#scanning-for-cves

authors: carrodher stefanprodan

repo: fluxcd/kustomize-controller


text:
ssa: Skip suspended resources from wait result errors

Fix: https://github.com/fluxcd/flux2/discussions/4738

Found some issue with this approach, since we remove the suspended resources at from the result, this means wait has to timeout. We need to find a way to filter the objects before passing them to the wait function... but without DDoS-ing the API and make new queries for each one.

repo: fluxcd/pkg


text:
Documenting the permission system of Flux

Flux and the GitOps toolkit leverages RBAC to control permissions. Flux creates a complex RBAC set up (and the set up based on the new impersonation will be even more complex) and this role/permission set up is not well-documented. In order to get an understanding of the RBAC set up it is currently required to inspect the implementation of RBAC yaml files themselves. We consider this to be a significant issue since the RBAC roles and Flux will be deployed within a cluster running potentially sensitive operations.

Provide a conceptual description of the permission system of Flux, preferably with schematic to make it easy for a reader to quickly understand what the roles, resources and permissions are in the Flux system. Highlight in particular:

What RBAC roles are used
What resources are used by the roles and the permissions on these resources
Whether Flux asks for more than necessary to ease implementation.
If the RBAC system is modifiable to create a more secure model.
The effect that the RBAC implementation of Flux has on the entire state of the cluster.

#598 is the meta tracking issue.

repo: fluxcd/website


text:
🛑 Delegaciones is down

In dbaff55, Delegaciones (https://extranet.osam.org.ar/Consulta/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Delegaciones is back up in 6a71914 after 18 minutes.

repo: flvanney/OSAMuptime


text:
Vagrantfile: Adding DeleteOnTermination to root volume for AWS

By default, the root volumes stick around after the Vagrant goes away. This is not a good default if builder instances are cycled regularly.

The commit needs a DCO sign-off, but other than that, LGTM.

Derp. I always forget the DCO . . . fixed.

repo: flynn/flynn


text:
Remove bin/python from Executor Path

TL;DR
This removes /bin/python from the executor path. Since we use sys.executable we no longer need /bin/python. Otherwise resulting in something like /usr/bin/python3.8/bin/python instead of /usr/bin/python3.8.
Type

[x ] Bug Fix
[ ] Feature
[ ] Plugin

Are all requirements met?

[x] Code completed
[ ] Smoke tested
[ ] Unit tests added
[ ] Code documentation added
[ ] Any pending items have an associated Issue

Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
https://github.com/lyft/flyte/issues/
Follow-up issue
NA
OR
https://github.com/lyft/flyte/issues/

@wild-endeavor @katrogan @kumare3 I believe that this may break non-containerized serialization since /bin/python was needed for that case, is my understanding correct?

should we add the /bin/python then to the out of container case? https://github.com/flyteorg/flytekit/blob/master/flytekit/clis/sdk_in_container/serialize.py#L258

@katrogan I'm not too familiar with the new sdk but wouldn't that cause issues elsewhere? Looks like that gets later on assigned as flytekit_virtualenv_root and that might be used here https://github.com/flyteorg/flytekit/blob/776e012caabb98b01fdead3d939e8b5ab8552aa6/flytekit/clis/sdk_in_container/serialize.py#L136

@migueltol22 i think you're right, we might want two ctx obj vars: one for the path and one for the flytekit_virtualenv_root or perhaps even just a flag that indicates whether we're in container or not and serialize and append /bin/python as required

Codecov Report

Merging #381 (de6c7d5) into master (776e012) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
- Coverage   96.00%   95.94%   -0.06%
==========================================
  Files           2        2
  Lines          75       74       -1
  Branches        8        8
==========================================
- Hits           72       71       -1
  Misses          1        1
  Partials        2        2

Impacted Files
Coverage Δ

tests/scripts/test_flytekit_sagemaker_runner.py
100.00% <0.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 776e012...de6c7d5. Read the comment docs.

@katrogan @wild-endeavor Tested this with both in container serialize and out of container serialize.

authors: codecov-io katrogan migueltol22

repo: flyteorg/flytekit


text:
Flyway doesn't support Mariadb 10.3 by using latest jdbc-driver

Latest Flyway Core (version 5.2.4) doesn't support MariaDB version 10.3 when you are using MariaDB Java Client version 2.4.0 or 2.4.1.
Snippet from Gradle:
compile group: 'org.flywaydb', name: 'flyway-core', version: '5.2.4'
compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.4.1'
Using versions mentioned up causes following exception:
org.flywaydb.core.api.FlywayException: Unsupported Database: MariaDB 10.3
at org.flywaydb.core.internal.jdbc.DatabaseType.fromDatabaseProductNameAndPostgreSQLVersion(DatabaseType.java:168)
at org.flywaydb.core.internal.jdbc.DatabaseType.fromJdbcConnection(DatabaseType.java:117)
at org.flywaydb.core.internal.database.DatabaseFactory.createDatabase(DatabaseFactory.java:90)
at org.flywaydb.core.Flyway.execute(Flyway.java:1670)
at org.flywaydb.core.Flyway.clean(Flyway.java:1499)
Best,
Eero.

Latest versions of MariaDB Connector/J driver return "MariaDB" server type instead of "MySQL", that's why Flyway worked with previous versions of this driver.
To make it work with 2.4.x: simply add useMysqlMetadata=true to your jdbc url -> driver will return "MySQL" server type.
Source: https://mariadb.com/kb/en/library/about-mariadb-connector-j/#essential-parameters -> useMysqlMetadata

Duplicate of #2289

@jonathanlermitage

To make it work with 2.4.x: simply add useMysqlMetadata=true to your jdbc url -> driver will return "MySQL" server type.

Did this actually work for you? It has no effect when I try :/

I have the same issue, and even with useMysqlMetadata=true prop, still does not work, any new suggestions are welcome, thx.

@vasilemihali 6.0.0-beta contains a fix for this.

In my experience, even with MariaDB, you still need to use MySQL's syntax. That means you treat a MariaDB connection as a MySQL connection.
I documented my finding here: https://datmt.com/backend/java/spring/flyway-spring-boot-integration-guide/#Very_important_note_for_MySQLMariaDB_users

authors: axelfontaine datmt eerokosk jonathanlermitage tomas-silhavy vasilemihali

repo: flyway/flyway


text:
Classloader Improperly cached with 2 datasources causing missed migrations (WORKAROUND AVAILABLE)

Which version and edition of Flyway are you using?
6.5.0
If this is not the latest version, can you reproduce the issue with the latest one as well?
N/A -latest at time of writing
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java API
Which database are you using (type & version)?
SQL Server
Which operating system are you using?
Linux
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Create 2 flyway objects against 2 datasources with 2 sets of database migration files using the classpath location.
What did you expect to see?
All migrations are run against the target datasources independently from each migration location.
What did you see instead?
Only if the same number of migration files are present in both locations will the migrations be found. Otherwise migration versions are missed.
========================
Given a project with 2 databases and 2 flyway configurations, it appears the classloader is improperly cached and shared between independent Flyway objects thus causing missed migrations.
Given these files, the V4 migration of DB2 will be missed, but the others will be found properly.
src/main/resources/db/migration/DB1/V2__sql1.sql
src/main/resources/db/migration/DB1/V3__sql2.sql
src/main/resources/db/migration/DB2/V2__sql1.sql
src/main/resources/db/migration/DB2/V3__sql2.sql
src/main/resources/db/migration/DB2/V4__sql3.sql
WORKAROUND:  Manually reset the classloader between each migrate() with setClassLoader(null)
import org.flywaydb.core.Flyway;
import org.flywaydb.core.api.MigrationVersion;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
import javax.sql.DataSource;

@Configuration
public class FlywayDBMigrations {

    private final DataSource DataSource1;
    private final DataSource DataSource2;

    //Manually handle dependency injection in constructor to help disambiguate
    FlywayDBMigrations(@Qualifier("DataSource1") DataSource qbds,
                       @Qualifier("DataSource2") DataSource qnds){
        this.DataSource1 = qbds;
        this.DataSource2 = qnds;
    }

    @Bean
    public Flyway flywayDisable(){
        return null;
    }

    public Flyway flywayQN() {
        return Flyway.configure().baselineOnMigrate(true)
                .locations("classpath:db/migration/DB2")
                .dataSource(DataSource2 )
                .schemas("dbo")
                .target(MigrationVersion.LATEST)
                .load();
    }

    public Flyway flywayQB() {
        return Flyway.configure().baselineOnMigrate(true)
                .locations("classpath:db/migration/DB1")
                .dataSource(DataSource1 )
                .schemas("dbo")
                .target(MigrationVersion.LATEST)
                .load();
    }

    @PostConstruct
    public void migrateDBs() {
        Flyway flywayQB = flywayQB();
        Flyway flywayQN = flywayQN();

        flywayQN.migrate();
        flywayQN.setClassLoader(null); // <- WORKAROUND!
        flywayQB.migrate();
    }

}

Closing due to inactivity


text:
step22 - fails for Gatemate flash programming or flash reading

In step22, the application expects the app image data to be uploaded into the flash memory at a 1M offset. This step currently fails due to issues with SPI flash access. The issue is that no output is visible on the serial line. This can have several possible root causes:
(A) Selected wrong flash read mode for spi_flash.v. 4 modes are defined:

SPI_FLASH_READ
SPI_FLASH_FAST_READ
SPI_FLASH_FAST_READ_DUAL_OUTPUT
SPI_FLASH_FAST_READ_DUAL_IO

So far, I unsuccessfully tried 1. and 4.
(B) Using the wrong openFPGALoader flash offset value
openFPGALoader only understands an offset provided in bytes. I am using openFPGALoader  -b gatemate_evb_spi -o 1048576 data/scene1.dat, assuming the 1M offset calculates with 1024.
(C) It is the first time that I am using the +uCIO flag for the Gatemate place and route tool 'p_r', trying to directly access the flash from the FPGA.
(D) A pin swap is another common cause (e.g. MOSI->MISO), hopefully it's that simple.
The make output example below shows the successful flash execution, but the program output does not show :-(
fm@nuc7fpga:~/fpga/projects/git/gatemate-riscv/step22$ make prog
Programming scene data at 1M offset:
/home/fm/cc-toolchain-linux/bin/openFPGALoader/openFPGALoader -b gatemate_evb_spi -o 1048576 data/scene1.dat
Jtag frequency : requested 6.00MHz   -> real 6.00MHz
Detail:
Jedec ID          : c2
memory type       : 28
memory capacity   : 17
EDID + CFD length : c2
EDID              : 1728
CFD               :
00
Detail:
Jedec ID          : c2
memory type       : 28
memory capacity   : 17
EDID + CFD length : c2
EDID              : 1728
CFD               :
flash chip unknown: use basic protection detection
Erasing: [==================================================] 100.00%
Done
Writing: [==================================================] 100.00%
Done
Wait for CFG_DONE DONE
Programming E1 SPI Config:
/home/fm/cc-toolchain-linux/bin/openFPGALoader/openFPGALoader -b gatemate_evb_spi SOC_00.cfg
Jtag frequency : requested 6.00MHz   -> real 6.00MHz
Detail:
Jedec ID          : c2
memory type       : 28
memory capacity   : 17
EDID + CFD length : c2
EDID              : 1728
CFD               :
00
Detail:
Jedec ID          : c2
memory type       : 28
memory capacity   : 17
EDID + CFD length : c2
EDID              : 1728
CFD               :
flash chip unknown: use basic protection detection
Erasing: [==================================================] 100.00%
Done
Writing: [==================================================] 100.00%
Done
Wait for CFG_DONE DONE

Hi,
thanks a lot for reworking BrunoLevy's tutorial on a CCA1 EVB! I had some headache using the wrong libgcc in step 21, but finally arrived at this step :-)
Using openFPGALoader -b gatemate_evb_jtag --dump-flash --offset 0 --file-size 8388608 test.bit and by comparison using hexedit I would say that programming of the Flash with both bitstream and data file works fine.
Debugging it with gtkwave revealed that MISO is Z all the time. It took a while to see it, but in my case the CCF file declared both MOSI and MISO as output?! Changing MISO to Pin_in certainly helps, but still doesn't solve it.
In simulation MISO remained Z ... also after adding a Flash device model and a RESET pulse to the testbench. If I hardwire MISO to 1 or 0, the SPI reads the corresponding values back. SCK, MOSI, CS# look ok, the command sent (0x03) also looks valid to me. SCK starts from 0 for mode 0. What's missing to get the MISO signal?
The FPGA initialization probably uses QSPI mode, but we should be free to change the IO mode after that?

Hi g3grau,
Thank you very much for sharing your experience and attempts to solve the flash reading. A second person trying is very helpful! Sadly I have not made any progress myself yet. I need to give it another try on one of the coming weekends. Solving step22 is key to progress further.
Next I want to try and connect a logic analyzer to the J3 pin header. Per schematic, J3 is directly connecting to the Flash IC SPI lines. Recording the SPI protocol and decode the state would be great.
There is a discussion post for the ARTY board on https://github.com/BrunoLevy/learn-fpga/discussions/108 that also struggles with the Flash in the same step.

I just connected a scope and got surprised.
During programming everything looks as expected. When the design is running, SCK keeps toggling at 10MHz which somehow fits because CS# is permanently low (as opposed to the simulation) and MOSI keeps repeating the same pattern (which doesn't match any expected pattern from the design) with a period of 45us (should be my test loop in main()).
MISO is always low (simulation is always Z). Since CS# doesn't react, the memory can't do anything.
For comparison I just loaded the design from step21 .. there CS#, MOSI and MISO are 1 as expected.
So we do have (some) control over these pins, but the FPGA doesn't seem to to what the design/simulation tells :-S
More spooky ... I added some reg in the main design for non-blocking assignment of the SPI signals to them, and then assign that to the 3 free LED (I think I do not yet understand this bidirectional IO). It doesn't change anything in the simulation, but suddenly the scope shows the expected signals on CS# and MISO! The program still doesn't run 100%, my printf statements are nuts, but maybe I made something wrong with memory size and stack pointer (I tried to increase RAM 4x). Apart from the direction fixing in gatemate-e1.ccf for SPIFLASH_MISO, this should be my relevant change.
I have no clue why the LED stuff affects the function of the SPI...
`module SOC (
input 	     CLK, // system clock
input 	     RESET,// reset button
output [7:0] LEDS, // system LEDs
input 	     RXD, // UART receive
output 	     TXD, // UART transmit
output 	     SPIFLASH_CLK,  // SPI flash clock
output 	     SPIFLASH_CS_N, // SPI flash chip select (active low)
//    inout        SPIFLASH_MOSI, // SPI flash IO pins
//    inout        SPIFLASH_MISO  // SPI flash IO pins
output        SPIFLASH_MOSI, // SPI flash IO pins
input        SPIFLASH_MISO  // SPI flash IO pins
);
MappedSPIFlash SPIFlash(
.clk(clk),
.word_address(mem_wordaddr[19:0]),
.rdata(SPIFlash_rdata),
.rstrb(isSPIFlash & mem_rstrb),
.rbusy(SPIFlash_rbusy),
.CLK(SPIFLASH_CLK),
.CS_N(SPIFLASH_CS_N),
.MOSI(SPIFLASH_MOSI),
.MISO(SPIFLASH_MISO)
);
// ...
reg dbg[2:0];
always @(posedge clk) begin
dbg[2] <= SPIFLASH_CS_N;
dbg[1] <= SPIFLASH_MOSI;
dbg[0] <= SPIFLASH_MISO;
end
assign LEDS[7] = dbg[2];
assign LEDS[6] = dbg[1];
assign LEDS[5] = dbg[0];
`

After fixing an error in my memory sizing I could read the first 4 bytes .. but the memory address does not increase.
Multiple reads return the (endian-scrambled) sequence 07 7F 80 05. The hexdump at 0x100000 reads 7f07 0580.
Getting closer :) But I wonder why the simulated Flash doesn't work (and MISO is still Z all the time). Must be something fundamental with bidirectional signals?

Well..?! I really don't know why it works now and how exactly it fails in the other cases (not only the Flash access, also the code execution seems broken in that case), but now I get the full demo at maybe 3Fps :-)
I put my changes on a gist.
In addition I use the -nomx8 flag for Yosys as this was used in the EVB defaults.

👏 Congratulations! This is awesome. Thank you very much for the hard work, and documenting progress inside the comments!  I am still processing changes from the files in your gist, so I can update the step22 files. My first quick attempt failed, so I better double-check. I may need to ask a question if I get stuck...
What is the pin assignment you had in your .ccf file? I fixed mine to:
Pin_out "SPIFLASH_CLK"   Loc = "IO_WA_B8";
Pin_out "SPIFLASH_CS_N"  Loc = "IO_WA_A8";
Pin_out "SPIFLASH_MOSI"  Loc = "IO_WA_B7";
Pin_in  "SPIFLASH_MISO"  Loc = "IO_WA_A7";

Meanwhile I was getting a handle on basic SPI protocol analysis for the E1 board's flash operation. I took down my notes for it in a gist at Gatemate E1 Board - SPI Flash Programming and Boot Operation. In a nutshell, openFPGA programs the flash at 6.25MHz by using repeat PP "page program" commands to write the bitstream data in 256 byte chunks. For the E1 FPGA boot from flash, a single FASTREAD operation is done at 33MHz after checking the flash access with a couple of RDID commands.
Getting over step22 is great!

It would be awesome if I would understand the issue :-D It's a workaround but not a fix yet.
Cool debugging with the logic analyzer! Maybe that can help to understand what happens if you just comment out
the assignment to the 3 LED (I just have a scope at hand). In my case this still runs the demo, but apparently loads data from a different address, starting it somewhere in the middle.
The design can run at 30MHz (I switched the power mode to speed), but more seems to be not possible due to the SPI clock limit (fast should allow 80MHz after configuring it with an initially slower clock) and a timing issue in the design (PR reports 28MHz max). I didn't check if my RAM increase may be the bottleneck.

The FPGA flash IC can be directly read or written to with the flashrom program on a Raspberry Pi. Just connecting the PI's GPIO pins for SPI over the J3 header to the E1 board works. I used this method to dump the flash image for checking that scene.dat is indeed available at the 1MB offset, just as intended. The flashrom program should also be able to write binary data straight into flash without the programmer (eliminates the 'firmware_words' binary conversion step into hex format).

Left side is FPGA code repository file check, right is the Gatemate flash image copy on the Raspberry Pi.

Awesome! Yes it works for me too! Your changes made all the difference. This is great. Big thanks for solving it!

The major fix was to set the right signal directions, and to declare the top module SPI signals as a register.
module SOC (
    input  CLK,               // system clock
    input  RESET,             // reset button
    output [7:0] LEDS,        // system LEDs
    input  RXD,               // UART receive
    output TXD,               // UART transmit
    output SPIFLASH_CLK,      // SPI flash clock
    output reg SPIFLASH_CS_N, // SPI flash chip select (active low)
    output reg SPIFLASH_MOSI, // SPI flash MOSI output
    input  reg SPIFLASH_MISO  // SPI flash MISO input
);

Great! Just to be sure: your demo starts with a yellow "Oxygene" string? I had variants which seem to start somewhere else.
I tried your variant (with reg in the interface), that also worked for me. It it is still kind of unstable. E.g. it only works if I comment out my debug block. Changing the clock back from 30 to 10MHz also breaks it again. As an analog designer I know this kind of side effects, but here I didn't expect it :-D The SOC_pr.log tells me that it should run up to 21 MHz.  The opposite is true...no output at CPU_FREQ 10 but works fine at 30 :-S
I'll double check again with your repo update, maybe I just changed too much ;) I just noticed that you started step23 and ran into an issue "program doesn't run" .. which may also be this kind of timing issue I have with step22? Did you try changing the clock?

Hello, I'm struggling also.
From another project there was a problem in the gatemate cc-toolchain-linux which requires defining IO pins as in or out.  I think this problem will be solved very soon by a toolchain update.

@g3grau: what was the solution to the wrong libgcc. I'm trying to use the riscv64-unknown-linux-gnu-gcc and I'm struggling with the compiler flags

Hi,
I didn't remember anything about the libgcc, but the makefile kept a memory!
That's my src-sieve/Makefile with some comments on different attempts :) Hope that helps to find the right one
### Local Makefile for building the RISC-V native application.  ###
### Requires riscv-toolchain, linker script and firmware_words  ###
### hex conversion program. Creates the 'firmware.hex' output   ###
### for FPGA upload together with the bitstream.                ###
### ----------------------------------------------------------- ###

TOOLCHAINDIR = /usr/cadtools/riscv-gnu-toolchain
RVLINKSCRIPT=/home/ggrau/projects/FPGAsrc/GateMate/CologneChip/gatemate-riscv/ldscripts-shared/bram.ld
FW_WORDS_DIR=$(TOOLCHAINDIR)/firmware_words
# RV32I_LIBGCC=$(TOOLCHAINDIR)/lib/gcc/riscv64-unknown-elf/8.3.0/rv32i/ilp32/libgcc.a
# RV32I_LIBGCC=$(TOOLCHAINDIR)/build-gcc-linux-stage2/gcc/lib32/ilp32/libgcc.a        !! DON'T USE LINUX !!
# RV32I_LIBGCC=$(TOOLCHAINDIR)/build-gcc-newlib-stage2/gcc/libgcc.a         # undefined reference to __mulsi3 ?!
RV32I_LIBGCC=$(TOOLCHAINDIR)/build/riscv64_multilib/lib64/gcc/riscv64-unknown-elf/11.1.0/rv32i/ilp32/libgcc.a

ASFLAGS= -march=rv32i -mabi=ilp32 -mno-relax
LDFLAGS= -m elf32lriscv -nostdlib --no-relax -T $(RVLINKSCRIPT)
CFLAGS= -march=rv32i -mabi=ilp32 -fno-pic -fno-stack-protector -w -Wl,--no-relax

all: firmware.hex

# Step-3: Convert the RISCV elf binary into an readmem() formatted hex file
# -------------------------------------------------------------------------
RAMSIZE=6144

firmware.hex: sieve.bram.elf
        $(FW_WORDS_DIR)/firmware_words $< -ram $(RAMSIZE) -max_addr $(RAMSIZE) -out $@

# Step-2: Link the object files into a RISCV elf binary
# -----------------------------------------------------
sieve.bram.elf: %.o
        $(TOOLCHAINDIR)/bin/riscv64-unknown-elf-ld start.o wait.o putchar.o print.o sieve.o $(RV32I_LIBGCC) $(LDFLAGS) -o $@

# Step-1: build object files (.o) from assembler source files (.S)
# ----------------------------------------------------------------
%o:
        $(TOOLCHAINDIR)/bin/riscv64-unknown-elf-as $(ASFLAGS) start.S -o start.o
        $(TOOLCHAINDIR)/bin/riscv64-unknown-elf-as $(ASFLAGS) wait.S -o wait.o
        $(TOOLCHAINDIR)/bin/riscv64-unknown-elf-as $(ASFLAGS) putchar.S -o putchar.o
        $(TOOLCHAINDIR)/bin/riscv64-unknown-elf-gcc $(CFLAGS) -c print.c -o print.o
        $(TOOLCHAINDIR)/bin/riscv64-unknown-elf-gcc $(CFLAGS) -c sieve.c -o sieve.o

clean:
        rm -f *.o *.hex *.elf

.SECONDARY:
.PHONY: all clean

Hello, I'm struggling also. From another project there was a problem in the gatemate cc-toolchain-linux which requires defining IO pins as in or out. I think this problem will be solved very soon by a toolchain update.

That's an interesting note. I tried to get a data logger working with a lot of headache this spring, but at some point I gave up on the Hyperram complexity and lack of deeper knowledge how to use DDR interfaces, multiphase clocks or timing constraints in this environment. I got it working (with inout) using a Verilog interface from Kevin M. Hubbard (which is much slower than the theoretical possible throughput, but at least it works). I think a "full speed" reference implementation of this hyperram interface would provide a great insight how to use these tools on an advanced level.

Hello g3grau,
the new toolchain is out and claims to fix the problem. Ich will start checking next week. I didn't have time to work on the Libgcc topic.
With best regards


text:
Always include home server in the dropdown of server list

It will be great to always show the home server as one of the dropdowns when doing dc travel.
This will make it easier to check if the price of an item is lower or higher compared to home server.

Or have a button next to the dropdown for quicker access.

authors: JSharpie Joshtst

repo: fmauNeko/MarketBoardPlugin


text:
Project Status

Is this project still alive?
Are contributions still welcome i.e. would they be possibly merged?

I don't actively add code to this repo anymore as you might have guessed from the commit history. What did you have in mind to contribute?

Since issues like #16, #37, #23 pretty much break the entire Docker setup, this project is currently unusable in a Docker only setup. Trying to get it to run since a while, but these one in a king compile time SQL checks really make the deployment very hard.

Compile time checked sql queries are extremely useful for catching very common bugs, so that will not be disabled.

Source
I see the point of this, but if one is doing crazy safety/integrity stuff like this, one ought to also put in the effort to make it actually work. One safe broken program is more useless than a running one without the safety. & not being able to run this on Docker basically means you are excluding it from any meaningful use, besides a one-man local server for testing or something.
(There also could've just been a switch to disable it temporarily, until the feature is fixed.)
The (new) migration is also not included in the Alpine image, which should actually be the default. The libc dependent images are actually secondary, when using Docker.
Soo, my status quo is now, that I finally fixed the issue of not being able to connect to PostgreSQL during build. At first, I did not understand the error, because I couldn't believe, that the app is connecting to a database during build. Only the aforementioned Github issues had the power to enlighten my poor mind.
Experiences like this are usually a sign of bad and/or inaccessible documentation.
At second, the actual SQL query tests aren't running, because I'm now not sure, whether the database needs the new migration or something. Not sure, how to populate the database, just to make the tests work. Do I really need to manually populate the database somehow or do I need to run the migration locally as mentioned in one of the issues or what should be done here?
Again, a big documentation issue.
If I'm going to make this run, I'd be willing to present it as a contribution to this project. 🙂

Compile time checked sql queries are extremely useful for catching very common bugs, so that will not be disabled.

I have somewhat changed my mind on this since then. A proper test suite for the DB queries are much more useful than just syntax checking the queries.
Any contribution would certainly be welcome to improve the status quo of the repo!

I have somewhat changed my mind on this since then. A proper test suite for the DB queries are much more useful than just syntax checking the queries.

Ah, I see. Good to know. Does that still imply a working PostgreSQL connection during build time, which includes supposedly(?) tests?

Any contribution would certainly be welcome to improve the status quo of the repo!

Nice. So, could you please tell me whether I need to populate the database, to make the build work or what else I would need to do, to make the SQL related checks pass? 🙂

Ah, I see. Good to know. Does that still imply a working PostgreSQL connection during build time, which includes supposedly(?) tests?

I don't think it needs to connect to psql at all during compilation. A separate test phase should check for DB failures or sql syntax issues and so on.

Nice. So, could you please tell me whether I need to populate the database, to make the build work or what else I would need to do, to make the SQL related checks pass? 🙂

Are you asking for what is required to build the current repo? Then I believe the issue you linked to describes a way to do it by running the migration with sqlx cli before starting the app. To be fair, I haven't started this app in at least a year, so not completely sure. Feel free to experiment and implement a better approach here!

I don't think it needs to connect to psql at all during compilation.

I could never get it to finish compiling, because connection to the PostgreSQL database timed out during compilation. 😀
Then, I provided the connection and the SQL tests started failing...

Then I believe the issue you linked to describes a way to do it by running the migration with sqlx cli before starting the app.

The way I understood this, the database had be working & then you apply the migration utility to "upgrade" the existing, working database, so it keeps working.
Since I am attempting to run the whole thing for the first time, I do not have any data in the database. It's empty. So, technically, nothing to "migrate" there.

Feel free to experiment and implement a better approach here!

Thanks. I'll contribute my improvements, once I have it all running. Although, we need to figure out the database stuff, first. 😁

authors: fmeringdal theAkito

repo: fmeringdal/nettu-scheduler


text:
Change the return type of RRuleSet::all to a struct

Fix #80
@fmeringdal is “limited” a correct wording? I still don't know its use case :)
Isn't “truncated” better?
Fix #64
I didn't test it, but don't forget to add your API token as CARGO_REGISTRY_TOKEN in the repo Settings > Secrets > Actions

Thanks @fmeringdal
What about my first comment/question?

@fmeringdal is “limited” a correct wording? I still don't know its use case :)
Isn't “truncated” better?

I think limited is a good enough term as it tells that the result is "limited" and could potentially contain more dates and the iteration was "limited" to avoid infinite loops. Open to other suggestions, but I still think limited is more accurate than truncated.

@fmeringdal cool, np, will add more doc comment soon, and then I'm good I think

Looks good! Only need to update the example in the README and it should be good to merge

Thanks @omid !

authors: fmeringdal omid

repo: fmeringdal/rust-rrule


text:
🛑 Site nxtc is down

In a0235ad, Site nxtc ($SECRET_SITE_2) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Site nxtc is back up in 654d76d after 7 minutes.

repo: fmmaia/fmAtAllUptime


text:
Added Heap in python

Related to issue #152

Please add the proper description. For more information please look at the contributing guidelines.

Please add the proper description. For more information please look at the contributing guidelines.

Done

Thanks for contributing.

repo: fnplus/interview-techdev-guide


text:
Fibonacci.java

fibonacci series

add the issue number in your description

#179 added

Thanks for contrubuting


text:
[258] Support build-arg in fn build, run, deploy.

We have a function with a custom pom.xml and custom Dockerfile. The build has multiple profiles (default, release). The release build contains more optimisations. To support this we need to pass build arguments to the Docker build command. Currently there is no support for this in the fn run or in fn deploy.
This Pull Request adds a possibility to pass the build-arg to fn build, fn run and fn deploy.
Open questions:

The Dockerfile has to have an ARG directive for each build-arg. For our case it's not a problem as we have a custom Dockerfile. How to support the build-arg with LanguageHelpers?

Yes, I am Oracle employee.

d'oh, great. cla bot didn't seem to pick up public @oracle stamp, hmm. big green button is blocked here, will attempt to merge this manually. thanks

+1 on this - There are bunch of things we can make configurable in (e.g. the Java build) with  this after the fact

thank you!

authors: rdallman tzezula zootalures

repo: fnproject/cli


text:
Flowable(四)：CICD持续集成部署

https://polofox.com/article/flowable-knowledge-cicd
Flowable想必正在学习的你，应该不会陌生，对其内部的CI管理，你发现了多少可窥见的秘密呢？或者说，你还没有了解过什么是CI/CD?

有问题欢迎留言~

repo: fntp/my-blog-talk


text:
🛑 Contaboo is down

In 862b892, Contaboo (https://contabo.com) was down:

HTTP code: 403
Response time: 435 ms

Resolved: Contaboo is back up in f337e53 after 1 hour, 10 minutes.

repo: fnzv/status


text:
Can't configure signs

I've tried different symbols and plain text. Doesn't seem to make any difference. The action_keys config works.
use {
  'folke/lsp-trouble.nvim',
  requires = {
    'kyazdani42/nvim-web-devicons'
  },
  config = function()
    require( 'trouble' ).setup {
      action_keys = {
        toggle_fold = { '<Space>' }
      },
      signs = {
        error = ' ',
        warning = ' ',
        hint = ' ',
        information = ' '
      }
    }
  end
}

That's odd, can you post a screenshot?

The signs are there in the list on the left 😄
You probably mean the signs in the editor? Trouble doesn't change those. I use lsp-saga for that, but you can probably also easily define them yourself using the lsp API

No I mean changing the signs. Those are same as the default if I don't configure any signs. I can't set them to anything else.

The signs are there in the list on the left
You probably mean the signs in the editor? Trouble doesn't change those. I use lsp-saga for that, but you can probably also easily define them yourself using the lsp API with
vim.lsp.diagnostic.set_signs()

@folke can you elaborate more on set those signs? maybe an example or your config; either for lsp saga or through vim.lsp.diagnostic.set_signs(), I tried with the latter but simply don't know how to get it to working:-(

@LuisxSullivaN you can check the lspconfig wiki. That's the exact code I use https://github.com/nanotee/nvim-lua-guide#learning-lua

authors: LuisxSullivaN ReubenM folke


text:
https://jira.desk.technology/browse/APIC-140

@nartiles please review

What about the second item in the description?

Should add a hook to DSAPIClient to change cache policy.

@eldark88 first pass done

I changed cache policy in initializer of DSAPIClient like this:
        NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
        config.requestCachePolicy = NSURLRequestReturnCacheDataElseLoad;
        _session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil];

When I tested traffic through proxy, I didn't notice any change, and then I started diving more deeper to identify why it's not changing. After that I found that  we are also setting cache policy per request, which is overriding the cache policy for session.
In DSAPIHTTPRequestSerializer line 296:
    NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url];
    mutableRequest.HTTPMethod = method;
    mutableRequest.allowsCellularAccess = self.allowsCellularAccess;
    mutableRequest.cachePolicy = self.cachePolicy;
    mutableRequest.HTTPShouldHandleCookies = self.HTTPShouldHandleCookies;
    mutableRequest.HTTPShouldUsePipelining = self.HTTPShouldUsePipelining;
    mutableRequest.networkServiceType = self.networkServiceType;
    mutableRequest.timeoutInterval = self.timeoutInterval;

Since cachePolicy in serializer is taking precedence, I think we can set cache policy like
let client = DSAPIClient()
client.requestSerializer.cachePolicy = .ReturnCacheDataElseLoad

What do you think?

Yea, makes sense

@nartiles please review

@nartiles This method clears the cache which is saved in filesystem. When the new instance of NSURLSession is created, it uses the cache which is generated by another NSURLSession(which no longer exist).

@nartiles please review

@eldark88 :shipit:

repo: forcedotcom/DeskApiClient-ObjC

license_source: bigquery


text:
🛑 UNAL Discord bot is down

In 6ed4f1b, UNAL Discord bot (https://unal.forero.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: UNAL Discord bot is back up in f86352a after 53 minutes.

repo: forerosantiago/upptime


text:
Get values in validationSchema for dynamic validation rules

As well as accessing the props in validationSchema is it possible to get the current values? I'm wanting a way to define the validation dynamically based on the values selected by the user.
e.g.
validationSchema?: Schema | ((props: Props) => Schema)
// becomes
validationSchema?: Schema | ((values: Values, props: Props) => Schema)

happy to submit a PR if you're interested in this.

Hi Dave
Is yup.lazy enough to solve your problem?
https://github.com/jquense/yup/blob/master/README.md#yuplazyvalue-any--schema-lazy
On Wed, 30 Aug 2017 at 00:23 Dave Timmins notifications@github.com wrote:

As well as accessing the props in validationSchema is it possible to get
the current values? I'm wanting a way to define the validation dynamically
based on the values selected by the user.
e.g.
validationSchema?: Schema | ((props: Props) => Schema)// becomes
validationSchema?: Schema | ((values: Values, props: Props) => Schema)
happy to submit a PR if you're interested in this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jaredpalmer/formik/issues/145, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFj60XxOsLDgusTVRG3AZ1eqX3_eHpIks5sdOPPgaJpZM4PG2Z2
.

Yes it is thanks!
so if anyone is interested it's now
validationSchema: props => {
    return Yup.lazy(values => {
      return Yup.object().shape({

whereas before it was
validationSchema: props =>
    Yup.object().shape({

👍👍👍
On Wed, 30 Aug 2017 at 05:49 Dave Timmins notifications@github.com wrote:

Closed #145 https://github.com/jaredpalmer/formik/issues/145.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jaredpalmer/formik/issues/145#event-1227272474, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAFj64mgA77ie2nKnuvs1FEdfa16JLrNks5sdTAigaJpZM4PG2Z2
.

@davetimmins Sounds good!!

@davetimmins
Amazing

authors: MohammadHosseinBagheri davetimmins nitaking skattyadz

repo: formium/formik


text:
useFormik validation doesn't change isValidating

🐛 Bug report
Current Behavior
When use async validation withFormik(), it doesn't change isValidating
Expected behavior
isValidating should be true when validation in pending state
Reproducible example
https://codesandbox.io/s/formik-playground-m92iv?file=/src/index.js

Got the same issue. Did you find a solution @fireridlle ?

@pirquessa kinda of
  const validate = ({ data }: Data) => {
    if (!data) return Promise.resolve()
    formik.setStatus({ isValidating: true })
async validation
 formik.setStatus({ isValidating: false })
  }

then at the component
<Button
      loading={formik.isSubmitting || formik.status?.isValidating}
      className="mt-6 mb-4"
      disabled={!formik.isValid}
      stretched
    >
      Continue
    </Button>

How did you get a ref on formik instance ?

didn't get your question. you can pass formik to validate method as a prop, or in my case I have custom hook

export const useIntroduceYourselfForm = (props: Props) => {
  const onSubmit = useOnSubmit(props)

  const validate = ({ promoCode }: PromoCodeParam) => {
    if (!promoCode) return Promise.resolve()
    formik.setStatus({ isValidating: true })

    return new Promise(resolve => {
      debouncedValidatePromoCode(
        { ...props.otpVerification, promoCode },
        (error: ApiAxiosError | ValidationError) => {
          formik.setStatus({ isValidating: false })
          resolve(error)
        }
      )
    })
      .then(onlyValidationError(({ fields }) => fields))
      .catch(defaultOnError)
  }
  const formik = useFormik({
    initialValues: {
      fullName: '',
      email: '',
      promoCode: '',
      emailSubscriptionStatus: true,
    },
    validationSchema,
    validate,
    onSubmit: data => onSubmit(data).catch(defaultOnError),
  })

  return formik
}

authors: fireridlle pirquessa


text:
Added unit tests and example for ng-required

I recently was struggling to understand how to use ngModelAttrsManipluator to set a dynamic ng-required.
So I added a unit test and a new jsbin example (as requested in #156 ;-))
A fresh new PR with only a single commit! Stack Overflow FTW!

Thanks a ton! This is great :-)

I'll have the example on the site next time I update (should be later today)

This has been deployed! http://angular-formly.com/#/example/other/toggle-required
Thanks!

authors: kentcdodds koenweyn

repo: formly-js/angular-formly

license: mit


text:
Input radio key attribute name

the key must have the same value as the name. I want the following (uncheked radio)
Demo:
https://stackblitz.com/edit/angular-qlbrvk?file=app/app.component.ts

you can explicitly set the name for both field:
    {
      key: "radio",
      type: "radio",
      name: 'radio',
    }

Thanks

authors: aitboudad davidoween

repo: formly-js/ngx-formly


text:
message.content is undefined, "that file might've been a virus"

i was starting my ddrive and i kept noticing that it kept crashing during launch. i've dug into this and found that discord, apparently, detected one of the uploading files as a virus and in result did not upload it. solved by deleting the messages, but i'd suggest adding a failsave for that
// my own code i added to find the exact messages
// src/discordFS/index.js, just before messagesGroupByType
tempMessageCache.forEach(message => {
    if (!message.content) {
        debug('>>> INVALID MESSAGE CONTENT')
        debug(message)
    }
})

Thanks for bringing this up. Will patch it.

Fixed in version 3.7.1 #56

authors: NoNameLmao forscht

repo: forscht/ddrive


text:
Fix join online video button after customer feature is removed

This PR is fix issue join online video not work after removed customer feature in eventyay-tickets
How has this been tested?

Checklist

[ ] I have added tests to cover my changes.

Summary by Sourcery
Fix the 'Join Online Video' button functionality by updating the API request method and payload after the removal of the customer feature. Enhance the system by adding a utility function to encode user emails into a short hash for improved API interactions.
Bug Fixes:

Fix the issue with the 'Join Online Video' button not working after the removal of the customer feature by updating the API endpoint and payload.

Enhancements:

Introduce a new utility function to encode user emails into a short hash for use in API requests.

Merging this for further testing.

authors: lcduong mariobehling

repo: fossasia/eventyay-talk