Allow use of own toolchain file

I'm trying to get the library to build as part of another project, which also uses CMake itself. I'm using the ExternalProject facilities for that:
set(source_dir ${CMAKE_CURRENT_LIST_DIR}/../../../embeddedinfralib)
set(install_dir ${CMAKE_CURRENT_LIST_DIR}/../embeddedinfralib-install)

include(ExternalProject)
ExternalProject_Add(embeddedinfralib
    PREFIX      ${source_dir}
    SOURCE_DIR  ${source_dir}
    BINARY_DIR  ${CMAKE_CURRENT_LIST_DIR}/../embeddedinfralib-build
    CMAKE_ARGS  -DCCOLA_DIR=${source_dir}/ccola -DCCOLA_INSTALL_DIR=${install_dir} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DTOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}
)

As can be seen, the toolchain file of the outer project is passed on to the configure command for emil, along with another variable which that specific toolchain file needs. When I do this, the first error is this:
CMake Error at ccola/ccola.inc:47 (include):
[build]   include could not find load file:
[build]
[build]     C:/workspace/beltpack-firmware/embeddedinfralib/ccola/platforms/platform-ARM.inc

When I temporarily comment out this include, the next thing which fails is:
-- adding pack cpp
[build] CMake Error at ccola/packs/cpp/start_pack.inc:583 (if):
[build]   if given arguments:
[build]
[build]     "STREQUAL" "lpc17xx"

There are a lot more if-statements which assume things like CCOLA_PROCESSOR, CCOLA_ARCH_FAMILY to be set by the platform file. However, I only want to use some generic stuff from infra, and I want to build it using my own toolchain and compiler settings, which should be okay because those parts are platform-independent. I also believe that the only responsibility of a CMake toolchain file should be setting built-in variables like CMAKE_C_COMPILER for the actual tools and the ones which define compiler flags for the different build configurations.
Because of this I feel a bit forced to add all the sources I need myself, in my own CMake project for now.

We are planning to severely slim-down CCola, using 'modern CMake' as replacement for a lot of the concepts available in CCola. We will take your use-case into account when starting the refactoring. Thanks for your detailed feed-back.

See #43 for progress on the migration.

Closed by #45.


Keep track of invoked processors

Codecov Report

Merging #44 (35d71ad) into main (df53db2) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #44   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            7         7
  Lines          355       368   +13
=========================================
+ Hits           355       368   +13

Impacted Files
Coverage Δ

src/event_processor/event_processor.py
100.00% <100.00%> (ø)

src/event_processor/invocation_strategies.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Issue 15623 - is(M!N) evaluates to true for M!N that fails to instantiate

Add a new scope flag, and check it to see whether full template instantiation is necessary.

Auto-merge toggled on

Thanks.


🐛 useCameraDevices and Camera.getAvailableCameraDevices issues

What were you trying to do?
I have attempted both available methods:
const devices = useCameraDevices('wide-angle-camera'); returns
{"back": undefined, "external": undefined, "front": undefined, "unspecified": undefined}
phoneDevice returns an entire object, which with all the expected things that I wanted. However, upon passing this to the following:
<ReanimatedCamera
                        ref={camera}
                        photo
                        device={phoneDevice}
                        isActive
                        style={{width: "100%", height: "80%"}}
                    />

It would break, I have also tried using standard "Camera" but it would fail and say the following:
Error: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}). If you meant to render a collection of children, use an array instead.
Reproduceable Code
import { ConsoleLogger } from "@aws-amplify/core";
import { Center, Container, NativeBaseProvider, Image, Button, Text } from "native-base";
import React, { useState, useRef, useEffect } from "react";
import { StyleSheet, TouchableOpacity } from "react-native";
import Reanimated from 'react-native-reanimated';
import { Navigation } from "react-native-navigation";
import { Camera, useCameraDevices } from "react-native-vision-camera";

export const Scanner = (props) => {
    const camera = useRef(null)
    const [data, setData] = useState({})
    const ReanimatedCamera = Reanimated.createAnimatedComponent(Camera);
    // const devices = Camera.getAvailableCameraDevices()
    const devices = useCameraDevices('wide-angle-camera');
    const device = devices.back
    // const deviceList = devices.filter((device) => device.position === "back")
    // const phoneDevice = [...deviceList].shift()
    console.log(devices);
    const handleOnPress = async () => {
        const photo = await camera.current.takePhoto()
        setData(photo)
        console.log(data)
      }

    const styles = StyleSheet.create({
        button: {
            alignSelf: "center",
            alignItems: "center",
            borderColor: "red",
            borderWidth: 2,
            marginTop: 16,
            height: 32,
            flex: 1
        },
        buttonText: {
            backgroundColor: "rgba(245, 252, 255, 0.7)",
            fontSize: 32,
        }
    })

    return (
        <NativeBaseProvider>
            <Center flex={1}>
            { device !== null ?
                <Container width={"100%"} height={"90%"} alignContent={"center"}>
                    <ReanimatedCamera
                        ref={camera}
                        photo
                        device={phoneDevice}
                        isActive
                        style={{width: "100%", height: "80%"}}
                    />
                    <TouchableOpacity onPress={handleOnPress} style={styles.button}>
                        <Text style={styles.buttonText}>Take picture</Text>
                    </TouchableOpacity>
                </Container>
                : <Text> Something went wrong </Text>}
            </Center>
        </NativeBaseProvider>
    )
}

What happened instead?
const devices = useCameraDevices('wide-angle-camera'); returns
{"back": undefined, "external": undefined, "front": undefined, "unspecified": undefined}
phoneDevice returns an entire object, which with all the expected things that I wanted. However, upon passing this to the following:
<ReanimatedCamera
                        ref={camera}
                        photo
                        device={phoneDevice}
                        isActive
                        style={{width: "100%", height: "80%"}}
                    />

It would break, I have also tried using standard "Camera" but it would fail and say the following:
Error: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}). If you meant to render a collection of children, use an array instead.
Relevant log output
Camera.getAvailableCameraDevices():

 {"devices": ["wide-angle-camera"], "formats": [{"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 144, "videoStabilizationModes": [Array], "videoWidth": 192}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 144, "videoStabilizationModes": [Array], "videoWidth": 192}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 58.77882766723633, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 3696, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 288, "videoStabilizationModes": [Array], "videoWidth": 352}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 58.77882766723633, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 3696, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 288, "videoStabilizationModes": [Array], "videoWidth": 352}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 360, "videoStabilizationModes": [Array], "videoWidth": 480}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 360, "videoStabilizationModes": [Array], "videoWidth": 480}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 94.5, "minISO": 24, "photoHeight": 1512, "photoWidth": 2016, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 94.5, "minISO": 24, "photoHeight": 1512, "photoWidth": 2016, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 32, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 540, "videoStabilizationModes": [Array], "videoWidth": 960}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 32, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 540, "videoStabilizationModes": [Array], "videoWidth": 960}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 30, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 768, "videoStabilizationModes": [Array], "videoWidth": 1024}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 30, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 768, "videoStabilizationModes": [Array], "videoWidth": 1024}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 24, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 24, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 24, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 24, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 24, "minISO": 24, "photoHeight": 1188, "photoWidth": 2112, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 24, "minISO": 24, "photoHeight": 1188, "photoWidth": 2112, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 960, "maxZoom": 67.5, "minISO": 24, "photoHeight": 720, "photoWidth": 1280, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 960, "maxZoom": 67.5, "minISO": 24, "photoHeight": 720, "photoWidth": 1280, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 94.5, "minISO": 24, "photoHeight": 1512, "photoWidth": 2016, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1440}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 64.12236022949219, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 94.5, "minISO": 24, "photoHeight": 1512, "photoWidth": 2016, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1440}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 16, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 16, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 16, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 16, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 16, "minISO": 24, "photoHeight": 1188, "photoWidth": 2112, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 16, "minISO": 24, "photoHeight": 1188, "photoWidth": 2112, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 38.36136245727539, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 960, "maxZoom": 135, "minISO": 24, "photoHeight": 1080, "photoWidth": 1920, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 38.36136245727539, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 960, "maxZoom": 135, "minISO": 24, "photoHeight": 1080, "photoWidth": 1920, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 960, "maxZoom": 67.5, "minISO": 24, "photoHeight": 1080, "photoWidth": 1920, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 960, "maxZoom": 67.5, "minISO": 24, "photoHeight": 1080, "photoWidth": 1920, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 1440, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 1440, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 94.5, "minISO": 24, "photoHeight": 1512, "photoWidth": 2016, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1440, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 94.5, "minISO": 24, "photoHeight": 1512, "photoWidth": 2016, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 1440, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 1944, "videoStabilizationModes": [Array], "videoWidth": 2592}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 1944, "videoStabilizationModes": [Array], "videoWidth": 2592}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 2448, "videoStabilizationModes": [Array], "videoWidth": 3264}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 2448, "videoStabilizationModes": [Array], "videoWidth": 3264}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 9, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 9, "minISO": 24, "photoHeight": 2376, "photoWidth": 4224, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 135, "minISO": 24, "photoHeight": 2160, "photoWidth": 3840, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 69.65403747558594, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": false, "maxISO": 2304, "maxZoom": 135, "minISO": 24, "photoHeight": 2160, "photoWidth": 3840, "supportsPhotoHDR": false, "supportsVideoHDR": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": true, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 3024, "videoStabilizationModes": [Array], "videoWidth": 4032}, {"autoFocusSystem": "phase-detection", "colorSpaces": [Array], "fieldOfView": 66.48794555664062, "frameRateRanges": [Array], "isHighestPhotoQualitySupported": true, "maxISO": 2304, "maxZoom": 189, "minISO": 24, "photoHeight": 3024, "photoWidth": 4032, "supportsPhotoHDR": false, "supportsVideoHDR": true, "videoHeight": 3024, "videoStabilizationModes": [Array], "videoWidth": 4032}], "hasFlash": true, "hasTorch": true, "id": "com.apple.avfoundation.avcapturedevice.built-in_video:0", "isMultiCam": false, "maxZoom": 16, "minZoom": 1, "name": "Back Camera", "neutralZoom": 1, "position": "back", "supportsDepthCapture": false, "supportsFocus": true, "supportsLowLightBoost": false, "supportsParallelVideoProcessing": true, "supportsRawCapture": false}
Error: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}). If you meant to render a collection of children, use an array instead.

This error is located at:
    in _callee3 (created by WrappedComponent)
    in WrappedComponent (at renderApplication.js:48)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:133)
    in AppContainer (at renderApplication.js:41)
    in Scanner(RootComponent) (at renderApplication.js:57)
 ERROR  Error: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}). If you meant to render a collection of children, use an array instead.

This error is located at:
    in _callee3 (created by WrappedComponent)
    in WrappedComponent (at renderApplication.js:48)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:133)
    in AppContainer (at renderApplication.js:41)
    in Scanner(RootComponent) (at renderApplication.js:57)
 LOG  Running "LoginScreen" with {"rootTag":151,"initialProps":{"componentId":"Component1"}}
 LOG  Error happened
 LOG  Error happened

useCameraDevices('wide-angle-camera'):
LOG  {"back": undefined, "external": undefined, "front": undefined, "unspecified": undefined}
 LOG  {"back": undefined, "external": undefined, "front": undefined, "unspecified": undefined}

Device
Iphone Xr, 15.1
VisionCamera Version
2.9.3
Additional information

[ ] I am using Expo
[X] I have read the Troubleshooting Guide
[X] I agree to follow this project's Code of Conduct
[X] I searched for similar issues in this repository and found none.

wow this just stopped me in my tracks. same exact issue. any luck?

You have to use one of those returned devices.
const devices = useCameraDevices()
const device = devices.back

return (<Camera device={device} />)

I had the same issue, it was caused by the Camera component mounting before device had initialized (i.e. it was still undefined).
In your code, you could try changing:
            { device !== null ?
                <Container width={"100%"} height={"90%"} alignContent={"center"}>

to
            { device &&
                <Container width={"100%"} height={"90%"} alignContent={"center"}>

This way, you'll handle the case where device is undefined rather than null.

device != null is better than device !== null or just device (in terms of readability and safety)

Having same issue.
After using
const devices = useCameraDevices()
returns
{"back": undefined, "external": undefined, "front": undefined, "unspecified": undefined}
getting undefined.

The function might still be loading - is it also undefined after a few seconds?

Yes it's still undefined after a few seconds.

Same problem . Undefined forever.
const devices = useCameraDevices()
const device = devices.back

return (
{device && <Camera
    style={{height:"100%", width:"100%"}}
    device={device}
    isActive={true}
  />}
)

"react": "17.0.2",
"react-native": "0.66.4",
"react-native-gesture-handler": "^2.1.0",
"react-native-reanimated": "^2.3.1",
"react-native-vision-camera": "^2.11.2"

On which device?

i'm using infinix hot 11.

As the issue mentioned, Iphone XR for me Ios 15.1. Ill attempt another round of debugging today, ill get back to you about the potential solutions on github.
Let me know your thoughts, ill help debug/ get some directions today.

On 10 Jan 2022, at 01:31, Marc Rousavy @.***> wrote:

On which phone?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.

Hm, weird. I'd like to see what the native code actually does, it surely must have some devices. Could you put a breakpoint in Xcode here: https://github.com/mrousavy/react-native-vision-camera/blob/233094d18e179b534bb15fa3418830b535694267/ios/CameraViewManager.swift#L106
and see what devices is?

You have to use one of those returned devices.
const devices = useCameraDevices()
const device = devices.back

return (<Camera device={device} />)

This works now, I just testing the binding of the camera photos right now.

@SeamusY did you check on android device?

Couldn’t get it running currently, as for some reason android studio is showing some configuration issues after installing back the react native vision camera. Will test it soon, tomorrow after i fix it. But if you have any information on “debugManifest” issue let me know.

On 10 Jan 2022, at 19:38, faizantariq1 @.***> wrote:

@SeamusY did you check on android device?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.

i don't know the exact problem you're facing.
but this link might help you: https://stackoverflow.com/questions/2409923/what-do-i-have-to-add-to-the-manifest-to-debug-an-android-application-on-an-actu

@faizantariq1
VisionCamera: Building with JSC...
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
VisionCamera: Frame Processors are disabled because REA v2 does not exist. C++ part will not be built.
WARNING:: Please remove usages of jcenter() Maven repository from your build scripts and migrate your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
Currently detected usages in: project ':amazon-cognito-identity-js', project ':react-native-async-storage_async-storage', project ':react-native-camera', ...
WARNING:: The specified Android SDK Build Tools version (29.0.3) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.1.
Android SDK Build Tools 30.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '29.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Task :app:processDebugMainManifest FAILED

@faizantariq1 yeah, I just tested it on android seems to be working fine. Samsung Galaxy Note 5 with Android 7
export const ScannerVision = (props) => {
const camera = useRef(null)
const [data, setData] = useState({})
const [allowedCamera, setAllowedCamera] = useState(false)
const [cameraPermission, setCameraPermission] = useState("");
const devices = useCameraDevices();
const device = devices.back

return (
    <NativeBaseProvider>
        <Center flex={1} px="0.5" width={"100%"} padding={16}>
            { (cameraPermission && device) ?
                <Container style={{ width: "100%" }}>
                    <Camera
                        ref={camera}
                        photo
                        isActive
                        device={device}
                        style={{ height: "70%", width: "100%" }}
                    />
                    <Button onPress={handleOnPress}>Take Photo</Button>
                </Container>
                : <Text>You must accept camera permission</Text>
            }
        </Center>
    </NativeBaseProvider>
)

}

@SeamusY related to warnings. basically, jcenter() is going to depreciate in the future. that's why they want it to remove. May be they are using jcenter() in the library.
and related to the code of camera. I'm already taking the permission of the camera. I'll try again and see if it's working or not.

@faizantariq1 if you can, try to debugging this file "CameraView.h" it seems to be the one that returns to you the devices.
I did however, find that the android for some reason defaulted to a permission as denied, not sure if it's a setting or something. But just be sure to check, it might be the reason for blocking.... but it is a guess work on my end.

running ios 15.2 not sure what more to do.

useCameraDevices()
return
{
"back": "undefined",
"external": "undefined",
"front": "undefined",
"unspecified": "undefined"
}
on some devices especially on
Samsung A32, infinix X657B  both have android version 11,
current config:
"react-native": "0.69.0",
"react-native-vision-camera": "^2.15.2",

Please help am stuck a whole day

@SeamusY @ashrazdev did you find a solution? Thanks in advance

@mrousavy I am currently seeing this issue.  Can we re-open this issue?  Or I can create a new one if necessary.
I just tried implementing using the below example from the guide, and device is always undefined and devices always looks like this:
{"back": undefined, "external": undefined, "front": undefined, "unspecified": undefined}

function App() {
  const devices = useCameraDevices()
  const device = devices.back

  if (device == null) return <LoadingView />
  return (
    <Camera
      style={StyleSheet.absoluteFill}
      device={device}
      isActive={true}
    />
  )
}

I've also tried this with getAvailableCameraDevices method and it always returns an empty array ([]).
const devices = await Camera.getAvailableCameraDevices()

Here is my setup:

iPhone simulator (iPhone 14 Pro) with iOS 16.0 on mac 12.6.1
react-native 0.70.3
react-native-vision-camera 2.15.2

VisionCamera does not work on an iOS simulator - apple limitation.

try this code:
import React, { useState, useRef } from 'react';
import { StyleSheet, Text, View, TouchableOpacity, Button } from 'react-native';
import { Camera, CameraRecordingQuality, useCameraDevices } from 'react-native-vision-camera';
// import * as RNVisionCamera from 'react-native-vision-camera';

const VideoCamRecorder = () => {
    const [isRecording, setIsRecording] = useState(false);
    const cameraRef = useRef(null);

    const startRecording = async () => {
        console.log("1234567")
        setIsRecording(true);
        try {
            const options = {
                quality: CameraRecordingQuality['720p'],
                videoBitrate: 12000000, // 12Mbps
                audioBitrate: 256000, // 256Kbps
                fps: 30,
                codec: 'H264',
                enableAudio: true,
            };
            const recording = await cameraRef.current?.startRecording(options);
            console.log('Recording started');
        } catch (error) {
            console.warn(error);
        }
    };

    const stopRecording = async () => {
        setIsRecording(false);
        try {
            const recording = await cameraRef.current?.stopRecording();
            console.log('Recording stopped', recording?.uri);
        } catch (error) {
            console.warn(error);
        }
    };

    const devices = useCameraDevices('wide-angle-camera')
    const device = devices.back
    // const device = devices.front

    return (
        <View style={styles.container}>
            { device && <Camera
                ref={cameraRef}
                device={device}
                isActive={true}
                // style={styles.preview}
                style={StyleSheet.absoluteFill}
            /> }
            {/* <Camera style={styles.preview} /> */}
            <View style={styles.controlsContainer}>
                {isRecording ? (
                    <TouchableOpacity
                        style={styles.button}
                        onPress={stopRecording}>
                        <Text style={styles.buttonText}>Stop Recording</Text>
                    </TouchableOpacity>
                ) : (
                    <TouchableOpacity
                        style={styles.button}
                        // onPress={startRecording}
                        onPress={() => {
                            console.log("ertyui")
                        }}>
                        <Text style={styles.buttonText}>Start Recording</Text>
                    </TouchableOpacity>
                )}
            </View>
        </View>
    );
};

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#000',
    },
    preview: {
        flex: 1,
        justifyContent: 'flex-end',
        alignItems: 'center',
    },
    controlsContainer: {
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'center',
        padding: 20,
        zIndex: 1000,
        position: 'absolute',
        bottom:20,
        width:'100%'
    },
    button: {
        backgroundColor: '#fff',
        borderRadius: 50,
        paddingVertical: 15,
        paddingHorizontal: 25,
        alignItems: 'center',
        justifyContent: 'center'
    },
    buttonText: {
        fontWeight: 'bold',
        fontSize: 18,
    },
});

export default VideoCamRecorder;

set isActive={true} in Camera props
 <Camera           isActive={true}           device={device}           style={{flex: 1}}         />

Getting the same error. please help.

People are suggesting
const devices = useCameraDevices('wide-angle-camera')
const device = devices.back

but that won't work on all devices e.g. Samsung Galaxy A14 only has an ultra-wide angle camera at the back
We're resorting to this code
const devices = useCameraDevices("wide-angle-camera");
const fallbackDevices = useCameraDevices("telephoto-camera");
const ultraWide = useCameraDevices("ultra-wide-angle-camera");
const device = devices.back || fallbackDevices.back || ultraWide.back;

to avoid device specific issues

@Charles-Johnson two things:

You can also just use useCameraDevices() without any arguments, then do the filtering yourself.
It seems like a bug that Samsung Galaxy A14 only has an ultra wide on the back. Can you confirm this happens even with VisionCamera V3 RC? What's the focal lengths there?

@mrousavy I can confirm that i am getting same error in v3.1.0. I am getting two errors
First One: Cannot read property 'CameraDevices' of undefined
Second One: Cannot read property 'getConstants' of null
This is my code:
`export const VideoCall = ({route, navigation}: any) => {
const devices = useCameraDevices('wide-angle-camera');
const device = devices.back;
const [hasPermission, setHasPermission] = useState(false);
const cameraRef = useRef(null);
const [flip, setFlip] = useState(false);
// const device = devices.front;
// let cameraDevice = flip ? devices.front : devices.back;
const [isCameraActive, setIsCameraActive] = useState(true);
const [isModalVisible, setIsModalVisible] = useState(true);
const toggleCamera = () => {
if (isCameraActive) {
setFlip(!flip);
}
};
useEffect(() => {
const handleBackPress = () => {
navigation.navigate('ChatDetails', {username: route.params.username});
return true;
};
const backHandler = BackHandler.addEventListener(
'hardwareBackPress',
handleBackPress,
);
return () => {
backHandler.remove();
};
}, [navigation]);
const toggleCameraComponent = () => {
setIsCameraActive(!isCameraActive);
};
useEffect(() => {
Camera.requestCameraPermission().then(p =>
setHasPermission(p === 'granted'),
);
}, []);
const panResponder = React.useRef(
PanResponder.create({
onStartShouldSetPanResponder: () => true,
onPanResponderMove: (evt, gestureState) => {
const swipeThreshold = 100;
if (gestureState.dy < -swipeThreshold) {
setIsModalVisible(true);
}
},
onPanResponderRelease: () => {},
onPanResponderTerminate: () => {},
}),
).current;
return (
<View style={styles.container} {...panResponder.panHandlers}>
{device && (
<Camera
ref={cameraRef}
device={device}
isActive={isCameraActive}
style={isCameraActive && StyleSheet.absoluteFill}
/>
)}
<View
style={[
styles.avatarContainer,
!isCameraActive && styles.avatarContainerCameraInactive,
]}>
<Avatar.Text
size={!isCameraActive ? 100 : 40}
label={route.params.username[0]}
style={{
backgroundColor: '#5e01a9',
borderWidth: 1,
borderColor: 'white',
}}
/>
<View
style={
!isCameraActive && {justifyContent: 'center', alignItems: 'center'}
}>
{route.params.username}

@{route.params.username.replace(/\s+/g, '').toLowerCase()}

{isModalVisible && (
<VideoCallModal
onPressTopLine={() => setIsModalVisible(false)}
toggleCamera={toggleCamera}
toggleCameraComponent={toggleCameraComponent}
isCameraActive={isCameraActive}
username={route.params.username}
/>
)}

);
};`
I even tried the documentation code but still the error persist.
My setup:
Xiaomi Redmi Note 10S
Android V13

@SameerAther

You did not include any logs or stacktrace. How do you expect me to help you?
You use V2 code. useCameraDevices('wide-angle-camera') is not part of V3. This is V2 API.
"I even tried the documentation code" - I don't believe you, the documentation never mentions this V2 API.

I am getting the same issue , It works fine for android but in IOS , the device.id is undefined and when I debug the issue I find
const devices = useCameraDevices()
this code gives me :
{ back: undefined,
external: undefined,
front: undefined,
unspecified: undefined }
My configs are:
react-native : 0.70.6
vision-camera: 2.15.4
device : iphone 14 simulator

Still facing this issue in RN 0.73.9 did anyone find a solution?

Has anyone actually solved this issue?


point_moved_by_km

Is your feature request related to a problem? Please describe.
PyCharm is complaining at me that point_moved_by_km has errors because arccos, arctan, and pi aren't recognised
Describe the solution you'd like
Not to have any errors!

don't recognise the method as being used - can it be removed? (Or is it for future?)
alternativley should they be numpy or shapely or whatever methods/properties?

Additional context
has_increase also not used

#19 removed the point_moved_by_km function.
This function attempted to deal with updating lat long coordinates with distances in km. This problem was resolved by converting between different coordinate reference systems (notably WGS84 and OSGB36)


Forms using simple_fields_for with boolean inputs displaying raw html.

Environment

Ruby 2.4.9
Rails 5.1.7
Simple Form 5.0.2

Current behavior
Please find my associated pull request here: https://github.com/heartcombo/simple_form/pull/1703
Under some circumstances when using boolean inputs from inside a simple_fields_for block, escaped html is being rendered rather than the correct html output. So, html text appears in the form rather than the actual form controls.
The cause appears to be in the method #build_hidden_field_for_checkbox of the SimpleForm::Inputs::BooleanInput class returning a String instead of an ActiveSupport::SafeBuffer:
def build_hidden_field_for_checkbox
  return "" if !include_hidden? || !unchecked_value
  options = { value: unchecked_value, id: nil, disabled: input_html_options[:disabled] }
  options[:name] = input_html_options[:name] if input_html_options.key?(:name)
  options[:form] = input_html_options[:form] if input_html_options.key?(:form)

  @builder.hidden_field(attribute_name, options)
end

I believe the return guard on the first line of the method should be :
return "".html_safe if !include_hidden? || !unchecked_value

I believe returning a html safe ActiveSupport::SafeBuffer here stops the final output being converted to a String, because of the behaviour of the (+) operator:
unsafe = "test"
unsafe.class
# => String

safe = "test".html_safe
safe.class
# => ActiveSupport::SafeBuffer

(unsafe + safe).class
# => String

(safe + unsafe).class
# => ActiveSupport::SafeBuffer

Expected behavior
1 ) The method build_hidden_field_for_checkbox always returns an ActiveSupport::SafeBuffer.
2) Forms using boolean inputs rendered inside a simple_fields_for block render correctly.
Thank you.

closed by https://github.com/heartcombo/simple_form/pull/1703


Cannot move file to recycle bin (It tries to copy)

Explain the bug
In Windows Explorer you can move a file to the recycle bin by dragging it into the window.
In Files, Moving it from the sidebar is blocked. And trying  to move it from desktop gives an error message.
To reproduce

Go to your Desktop
Go into the Recycle Bin Folder in Files
Drag a File from the Desktop to the Recycle bin Folder
See the error

Expected behavior
I expected the file to get moved into the recycling bin
Logfile
debug.txt
debug_fulltrust.txt
Screenshots

Move from within files to the sidebar.

Move from Desktop into Recycle bin Folder
System Information

OS Version: Windows 10 20H2 19042.985
App version: <IP_ADDRESS>

Additional comment
It also happens after restarting.

Also, when closing Files while the dialogue is still open it can make this Copy dialogue stick to the front of your screen which i can still see while typing this even though i closed Files and checked if it was still running through the taskmanager

This issue should be resolved with #5273.


As a project coordinator, I want the drop down list of contacts and operators to add to a project to be in alphabetical order so that I can scroll through easier.

Description:
When creating a project, the drop down lists are currently in order created. During usability testing, ops team mentioned they would like these lists in in alphabetical order. This is low priority because they have the option to search through the list.
Acceptance Criteria:
Given
When
Then
Development Checklist:

[ ] Checklist item
[ ] Checklist item
[ ] Checklist item
[ ] Meets the DOD

Notes:

Based on CIF prioritization session on Aug 16, 2022, CIF team agrees this is a low priority and can remain in the icebox for now.


Remove domain from numericValue

@dylan-sa @rjyounes
The domain of gist:numericValue is gist:Magnitude.
If I want to have an inexact duration such as 5 months, I want to model it as if it was a Magnitude:
ex:_InexactDuration_5_month
	a ex:InexactDuration ;
	gist:numericValue "5"^^xsd:decimal ;
	skos:prefLabel "5 month"^^xsd:string ;
	ex:hasInexactDurationUnit ex:_InexactDurationUnit_Month ;
	.

Because of the domain axiom, this instance is inferred to be a Magnitude, but it is not a Magnitude because Month not a proper UnitOfMeasure for a duration -- a month is a pseudo-duration. Math would not work.
This can be solved by removing the domain axiom and using gist:domainIncludes instead.

A month is based on the lunar calendar, which doesn't mean it's not an exact duration, only a duration that is out of alignment with the solar calendar we use to define days and years.

I'm talking about a calendar month in common parlance. Exactly 3 months can in the number of days it is, depending on which months.  But I can say exactly 3 months after Jan27, 2021 and it always means May 27, 2021.  The enterprise is much less concerned with astronomical months based on the moon.

A calendar month that is not from the first day to the last day, is not a good concept. What is one month from Jan 31, 2023?
In most cases, that gets restated as 30 (or 60, or 90) days.

A calendar month that is not from the first day to the last day, is not a good concept. What is one month from Jan 31, 2023?

That's an interesting question, you had me stumped for a while. In that case Ione might say one month would last until the day before the last day in  February - or some agreed sensible convention for such cases.  I don't know how warranty periods work, maybe no-one ever has a N month warranty period, only in days, for the exactness. But there are 1 year warranty periods.
Similar issue arises for birthdays and anniversaries or purchases that happen on Feb 29. When is the end of the year that started on Feb 29, 2020?  One reasonable convention would be Feb 28, 2021.

@uscholdm Here are some examples of how Excel's EDATE() function handles this:
1/31/2020 + 1 month = 2/29/2020
2/29/2000 + 1 month = 3/29/2020
2/29/2000 + 12 mos. = 2/28/2020

A calendar month that is not from the first day to the last day, is not a good concept.

We use this all the time. "We are having our anniversary party one month from today." "I last saw you one month ago yesterday." Etc.
If I say the first sentence on Oct 3, the party takes place on Nov 3. If I say it on Oct 31, the party takes place on ...? This is the difficulty. But it's not that we can't use the notion of calendar month for anything but Oct 1 - Oct 31.

Excel EDATE - cool. Here are the results for end January.

Makes sense to me.

@rjyounes Yes, EDATE("10/31/2023", 1) = 11/30/2023

@philblackwood Is there impact from the new units and measures model?

@philblackwood Is there impact from the new units and measures model?

I don't think so.

One potential use case for numeric values on non-magnitudes: we've defined a class FiscalYear to which I want to add an integer value. I could use gist:sequence, but I would like the option to use gist:numericValue.

Already rolled into Phil's PR.


Added Notre Dame Prep and Marist Academy

@Nolan1324 Pull request merged. Please notice that free educational license for JetBrains tools is for high and higher schools students, i.e. those who are over 13 of age. Thank you!


0.54.5 crash

Hi,
One of the nodes in 3 node cluster started crashing shortly after start (30-120 sec.) leaving core dump as below:
https://dl.dropboxusercontent.com/u/3182365/crate/hs_err_pid20324.log
any suggestions how to fix this and make this node work again much appreciated.
Regards,
Chris

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31398408-0-54-5-crash?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github).

hi chris,
our team is investigating! will get back to you asap.
jodok

Are you still running on OpenVZ? If so, this could be related to https://github.com/crate/crate/issues/2461

No, this cluster runs on KVM, not OpenVZ.

Hi, to give you an update: the node has been now rebooted and after re-start Crate is not crashing any more.

It seems this is caused by the compress-lzf library.
I've only found similar issues that occured on Solaris / Sparc. So this might be worth reporting upstream.
In Crate we'll eventually remove LZF and switch to DEFLATE during the upgrade of ES to 2.X (which we're currently working on)

Thanks for an update. Looking forward to upcoming ES 2.x release.
Would switching indices.recovery.compress to false in configuration provide temporary workaround? Or is there any other config option to disable compression to avoid this issue?

Yes it should provide a workaround.
The all other places which can use compression already default to false (at least currently - that will also change)


Clean NPM dependencies

Remove unneeded, organize duplicates, updated outdated, replace bower with yarn.

@amotenko I closed the PR, as it was already stale.
I'll recheck the latest branch once all the PRs are merged and I'll redo, if needed.

Done


Update Microsoft.Data.SqlClient to 1.0.19221.1-Preview

See the release notes.

cc @anurse (This includes the buildTransitive fix)

Thanks, I'll do an update of the other components.


Documentation request: mention support for Phlex in the README

It's fantastic that Lookbook supports Phlex and regular Rails view templates, in addition to components built with ViewComponent. This would (IMHO) be worth mentioning in the README.  Many will otherwise assume based on being developed as part of the  ViewComponent project that it only supports components built with the view_component gem.

Feels like this would be a pretty straightforward thing to submit an unsolicited PR on. Easier for maintainers to approve or critique than to sit down and do the work, nah?

Yes, please submit a PR if you can dedicate some time to it, it will help move this forward! Thanks

Feels like this would be a pretty straightforward thing to submit an unsolicited PR on. Easier for maintainers to approve or critique than to sit down and do the work, nah?

I think documentation should ideally come from people who know the project. I could mention that Phlex is supported and not much else, but I'm sure a knowledgeable person would think of other points worth mentioning.
I generally don't do PRs that are not desired, as the work may be wasted. In the case of documentation it might only be a few minutes, so your point would stand if I really knew enough to be a source of information.
If you know enough to have anything useful to say, you could do it.

@brandondrew so sorry for the slow reply. PR's are always appreciated but it's no problem for me to add a note in the README about Phlex support. To be honest I thought I had already mentioned it in there but apparently not!
It's definitely a good idea to mention it so I'll add a short note with a link out to the documentation for more info.
Thanks for bringing it to my attention :)

I've added a very brief note on compatibility here - hopefully that is enough to get interested people to click through to the main docs site.
I'll go ahead and close this now, thanks for your input everyone.


Install itch.app crash on macOS

Basic facts
itch-setup is a golang app. "Install itch.app" is a regular app bundle.
The app bundle is signed, and the DMGs are signed. spctl and codesign are both happy with it.
"Install itch.app" findings:

Extracted .zip = fails on first open, succeeds on second
Mounted dmg = fails on open until you check "Don't ask me again for this volume" and open again
ditto'd from dmg = works on open

xattrs
dmg xattr for com.apple.quarantine
0183;5bc99105;Safari;84A9D2E3-A14A-4E55-AFEE-4D0A79E3010B

The important part are the first four characters, which are flags: 0183.
Setting this xattr value for com.apple.quarantine on Install itch.app reliably makes it:

Pop up a Gatekeeper dialog
Then pop up in the Dock, then crash

GIF capture:

After cancelling open: com.apple.quarantine has flags 01a3.
After confirming open, com.apple.quarantine has flags 01e3.
Working theory
The app is ran differently the first time when it has that xattr and you pick "Open" in the gatekeeper dialog.

It doesn't seem to matter that it's in ~/Downloads, ~/Applications or /Applications
what matters isthe xattr

When ran from the DMG;

The DMG file has the quarantine xattr
The app bundle inside the mounted volume does not have the quarantine xattr
Picking "Open" in the dialog makes itch-setup crash (the Launch Service Monitor duly notes that our app exited)
Picking "Don't ask again for apps in this volume" probably sets DMG's com.apple.quarantine xattr flags to 01e3.

What happens if you open the DMG with FastDMG?

Breakthrough
AS IT TURNS OUT, macOS passes an argument that looks like -psn_0_3281697 when the app is launched in the conditions described above.
kingpin validates all arguments, and so it exits immediately:

What the heck. Nice work tracking that down

https://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder

Seems to be side effect of the app supporting pre-10.9 versions of Mac OS X?

Fixed in:

https://github.com/itchio/itch-setup/commit/3f1e9486fece37aededf696323e828498d579b2f
https://github.com/itchio/itch-setup/commit/f2239197ebbaf767f1c8c354666561b9010668ee

Thanks for tuning in @gingerbeardman !

Seems to be side effect of the app supporting pre-10.9 versions of Mac OS X?

Oh, do you think it wouldn't pass that argument if I specified, say, macOS 10.10 as the target in the Info.plist ? (I can't remember the exact name of the key, my mac-fu is rusty since my MBP went to mac heaven)

Yes, I think the argument would not be passed if you made that change.


The moment package should be moved to devDepencencies

Why Moment.js is in dependencies section, should it be moved to devDependencies?

The datepicker depends on moment to run, so it cannot be moved to devDependencies.

@rafeememon then the README should be updated:

You’ll need to install React and Moment.js separately since those dependencies aren’t included in the package.

I think that bit of text is a bit of a conversational piece, not direct instructions on how to use the component, but PRs to clarify the text are welcome.


Improve CONTRIBUTING.md for beginners

I took a stab at rewriting our CONTRIBUTING.md file to try to make it more accessible/inviting to new contributors.  It now walks you through:

installing git+Go+Godep
building the swarm binary
building the swarm docker image
forking the repo
rebasing your fork
submitting a PR
how to contact us

Thoughts?  @vieux @abronan @nishanttotla @dongluochen @amitshukla

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "improve-contributing" git@github.com:mgoelzer/swarm.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

It might be also worth adding steps to rebase a branch on top of master and sign the commits correctly and how to fix a non-signed commit. We saw many PRs doing it wrong and merging instead of rebasing for example ;)

@abronan said "It might be also worth adding steps to rebase a branch on top of master and sign the commits correctly"
Is this the procedure they should follow?
cd $GOPATH/src/github.com/docker/swarm
git checkout -b issue-9999              # create a branch for your work
vi README.md                            # edit a file in your branch
git fetch origin master                 # get latest commits to master
git rebase origin/master                # rebase your local branch
git add README.md                       # git add your changed files
git commit -s -m "Edited README"        # make a signed commit to your local branch
git push <username> issue-9999          # push your local branch to your fork

I updated the PR with everyone's feedback.  Also removed the duplicate build instructions in README.  @nishanttotla @thaJeztah @abronan

@mgoelzer This is what we describe in the contribution guide; https://docs.docker.com/opensource/workflow/work-issue/#pull-and-rebase-frequently
I think we should be careful with the naming, because the contribution guide assumes the https://github.com/docker/swarm remote is called upstream, and your fork is called origin
w.r.t. the rebase; you probably need a -f (force) push after a rebase, otherwise it won't work.

@thaJeztah Using Alex's approach, there are two remotes:   (your fork) and origin (docker/swarm).  Like this:
$ git remote -v
mgoelzer	https://github.com/mgoelzer/swarm.git (fetch)
mgoelzer	https://github.com/mgoelzer/swarm.git (push)
origin	https://github.com/docker/swarm.git (fetch)
origin	https://github.com/docker/swarm.git (push)

Do you think I should rename origin to upstream?  The only reason I am hesitant is that under Alex's approach, docker/swarm actually is the origin repo, i.e., it's what we originally cloned.  Unless I just don't understand what those terms actually mean (which is quite possible!).
I fixed the -f, thanks.

@mgoelzer Yes, there's always been two camps in this naming;

"upstream" is the "official" repo
and "upstream" is "my repository".

In the online contributions guide we use "upstream" as the official repository (and so does the GitHub documentation). I know some maintainers use the other approach, but for contributors, I think it's best to be consistent, in case they try to use the other documentation and get confused.
For reference, this is my setup for docker/docker;
git remote -v
origin	https://github.com/thaJeztah/docker.git (fetch)
origin	https://github.com/thaJeztah/docker.git (push)
upstream	no-pushing (push)
upstream	https://github.com/docker/docker.git (fetch)

In case you're wondering, I always set my "upstream" push url to a bogus "no-pushing" url;
git remote set-url --push upstream no-pushing

you never know when you make a slip-up ;)

@thaJeztah I see what you're saying, but don't you have:
$GOCODE/src/github.com/docker/docker     # <-- has origin thaJeztah/docker (not docker/docker)

I'm not sure I've ever totally understood the nuances of golang's directory structure, but it just feels weird that a directory called github.com/docker/docker would actually be a clone of a github.com/<username>/docker.  (This is why I had the symlink weirdness in the original draft.)  But maybe this is fairly common/normal?

@mgoelzer good point :cry:, I don't know what's best; perhaps we should have a wider discussion among all projects. Do you think it'd make sense to send out an e-mail to the maintainers mailing-list for discussion? Consistency is important for me; especially if we want contributors to participate in multiple open-source projects. But I do understand your point.

I'd really like to help out with this and get the build instructions updated.
w.r.t. git setup, I've found that having the remotes set like:
λ git remote -v
origin	git@github.com:docker/swarm.git (fetch)
origin	git@github.com:MHBauer/swarm.git (push)

is both convenient and fairly understandable to n00bs. There's basically two levels of people, those familiar enough with git that any instructions here are probably ignored, and people completely unfamiliar with git or github.

I think you've convinced me, @thaJeztah .  Consistency with docker/docker is probably the best policy.  So if they are doing, upstream = docker/docker, origin = <username>/docker (but in the directory `github.com/docker/docker), then I think we should go with that.
(Even though @MHBauer's solution is very elegant.)

ping @rolfedh @moxiegirl

ping @mgoelzer

I have updated the PR with every piece of feedback on this page except @abronan 's suggestion to include steps to rebase a branch on top of master and fix a non-signed commit.  Maybe it's good enough to be merged at this point and we can keep improving it over time?
Also, I went with @thaJeztah 's approach to origin vs upstream for consistency with docker/docker, even though I like the cleverness of @MHBauer 's method.  Consistency just seemed more important to me.

LGTM @moxiegirl can you please take a look ?

@mgoelzer @thaJeztah I'd prefer to use upstream as the official repo.  The reason is users work in a fork, the git clone defaults to calling the remote origin and --- its confusing but its what git does out of the box...and it makes sense -- that is the origin of the code on the local fork.
Bonus is we are consistent with docker/docker  and the current contributor's guide. It would be nice if we could get consistency across all projects.  @thaJeztah is driving us there...thank god.
LGTM on the actual text. I would tweak more to make the procedures slightly easier but at this point that would be gravy on some really good mashed potatoes. Nice, but unnecessary. Since it isn't going ddc, not an issue.

@moxiegirl Makes sense.  The latest version is using upstream as the official and origin as the fork as you say.
Also, I agree with you that is going in the right direction but would benefit from further improvements by the community.

@moxiegirl can we merge this one ? thanks

@moxiegirl Can you sign off on this?  It's an updated CONTRIBUTING.md file, no connection to the docs.docker.com site.

LGTM


Integration showing twice, while one unauthenticated?

Describe the bug
Hassio Integrations page is showing duplicate alexa component, with one unauthenticated.
To Reproduce
Go to Configuration > Integrations. See screenshot for result.
Expected behavior
Only one component would be expected. As I can send commands to alexa without a problem, the component to the right seems to be fine. But I cannot remove the unauthenticated component, as there is no removal button for it.
Screenshots

System details

Home-assistant (version): 0.115.1
Hassio (Yes/No): Yes
alexa_media  (version from const.py or HA startup): 3.0.0
alexapy (version from pip show alexapy or HA startup): I searched the whole /custom_components folder, but could not find any file called alexapy. If you guide me, I could add the version.
Amazon [2FA is enabled]: yes

Additional notes
Follow up from https://github.com/custom-components/alexa_media_player/issues/936

The component has detected that you needed to relogin. Some functionality may remain even when this happens as Amazon is strange like that.
Once you reauthenticate the discovered component will disappear. This is how HA handles reauths.

Strange thing is that relogin is not possible. I have 2FA enabled, and when hitting the Submit button, no token is send to me. Thus I need to find a way to get rid of the duplicate component here...

@membersound had same problem. I did it without filling in 2FA. I get a popup to enter the 2FA and Amazon was sending me a code. That did the trick for me

Per the documentation, It's highly recommended to use an authenticator app.

@alandtse i have this already but still it wasn't work. So I did the first screen without 2FA filled in. Then get popup to enter a 2FA code. Amazon send me one to my mobile... When I use the authenticator app it isn't work.


Roll Engine from 2b47c37a4eb6 to f17721139dde (3 revisions)

https://github.com/flutter/engine/compare/2b47c37a4eb6...f17721139dde
2021-03-05<EMAIL_ADDRESS>Roll Skia from bf2dd2af4947 to 319565ac6e65 (2 revisions) (flutter/engine#24815)
2021-03-05<EMAIL_ADDRESS>Roll Clang Linux from crEO9FDXg... to SrCqaGdSF... (flutter/engine#24795)
2021-03-05<EMAIL_ADDRESS>[linux] Fix text selection via Shift+Home/End (flutter/engine#24623)
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<EMAIL_ADDRESS>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.


Use cleaner concepts for analyzers rather than ad-hoc solutions

Right now we check which analyzer is running at ad-hoc places throuhout the codechecker. It would be better to have all the analyzer specific code in the corresponding analyzer class.
Two major source of ad-hoc checks: statistics collection and ctu preanalysis.
We should have a clear concept of pre-analysis phase in the abstract base class which could be a no-op for clang tidy. This pre-analysis phase could be respondible for collecting statistics and ctu. An analysis could have multiple preanalysis steps if required.

I think there is one additional facility that we did not consider yet. We need the analyzer plugins to be able to add command line flags to the CodeChecker analyze command. Some of the flags only makes sense for some analyzers, so it makes no sense to show those flags if a certain analyzer is not available.


lightning: check checkpoint schema conflict

What problem does this PR solve?
When checkpoint is enable and use mysql driver, if there are some data file which name is same as checkpoint schema, return an error and exit before start restore.
close #353
What is changed and how it works?
Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Side effects
Related changes

/run-all-tests

/run-all-tests

/run-all-tests

/run-all-tests tidb=release-4.0 tikv=release-4.0 pd=release-4.0 importer=release-4.0

Test Failed. Need TiKV merge this PR https://github.com/tikv/tikv/pull/8298 first


unify script_server.launch and android_script_server.launch

there should be one launch file after https://github.com/ipa320/cob_android/issues/5 is done

related to https://github.com/ipa320/cob_android/issues/5


Fix attributes diff on DOM node

Expected behaviour
Diff should remove attributes when they are no longer present in the next html state (see unit test)
Actual behaviour
It behaves as expected when the merged node is created using h.
It preserves removed attributes when the merged node comes from the DOM.
Possible solutions

I suggest to approve this pull request :)

Coverage remained the same at 100.0% when pulling 15cf5ccf2fc78f230e6b9292bf5939b6901846d6 on dmail-fork:master into c4f3fb0e4c18bd502b9084a11149749fa6a08c9b on developit:master.

Coverage remained the same at 100.0% when pulling 4f816a12cfb3fa0daad92b88d9b8d21a4c25112f on dmail-fork:master into abcdcdaa55200a98301e571cef6223b4ed50f565 on developit:master.

@developit code updated to loop over attributes only when not cached : https://github.com/developit/preact/pull/677/files#diff-a0896fa5d65b1d80ca4d496badbae50fR127

Coverage remained the same at 100.0% when pulling 1d8c474d7c15fccb7773917134cd4ff9141aa674 on dmail-fork:master into 9001436a453d736267359538e2d822ccf23e3115 on developit:master.

Coverage remained the same at 100.0% when pulling 5122ca98be8a0b46778f25b74e526a9bab1b22e3 on dmail-fork:master into 5b6c21b3dcdf59af65933da0265f744c9fdfbeb4 on developit:master.

Hi @developit, is there a planned release with this fix ?

Yup, 8.2 out soon.

@developit would love that release!

Me too, heh.


Use full-size path secrets (#398)

https://github.com/mlswg/mls-protocol/pull/398

After reviewing the private tree and key packages these changes seem to have been implemented.


Better parameter name for GameRegion::clearAssociations

GameRegion::clearAssociations has a parameter named "memberFunctionPointer". This gives too much information about the implementation (and this may be a false assumption) and not enough information about what the parameter does.
Rename this to something that is more insightful.

Stamp of approval


I Run VS Code as root so i can enable the glow effect of color theme Synthwave '84 in Linux Ubuntu

VSCode Version: Latest
OS Version: Linux

Steps to Reproduce:

Install the theme "Synthwave '84"
2.And follow the steps to enable the Glow effect

Does this issue occur when all extensions are disabled?: Yes/No

Not sure what you're asking exactly, but if it's because you need to run it as root that's because the Synthwave theme patches VS Code itself, which we wouldn't recommend doing and can't support the client if you do.

Not sure what you're asking exactly, but if it's because you need to run it as root that's because the Synthwave theme patches VS Code itself, which we wouldn't recommend doing and can't support the client if you do.

hi there,
actually I  tried to enable glow effect of that theme and also in their guide they also said enabling glow effect might
make VS Code buggy, they stated that "VS code doesn't natively support text effects and as a result, the glow is experimental. It's likely to be buggy " and when I activated the glow effect the bug appeared whenever i start my editor it use to give me error message. then i install extension fix VScode checksum which fix that issue.

Ok, just note that you're changing the source of the client though, and then removing our protections which detect the source has changed. Not recommended as the extensions might cause random issues since they're patching the source which changes every month.


Single Address Allocation

As agreed here. Keep current Hyperty Addresses and Data Object allocations addresses in order not to break compatibility at least during one release cycle

Ok @pchainho


watch

Vue version
vue3.0
Link to minimal reproduction
https://github.com/vuejs/core
Steps to reproduce
watch's callback faunction have bug,the new value have no difference with the old value when use deep:true options. so how can i do
What is expected?
Hope to be solved
What is actually happening?
bug
System Info
windows

Any additional comments?
write code learning vue3.0

https://github.com/vuejs/core/issues/6198

#6198

ok i got thanks bro🤠


Feature request: Get name and id attributes from input fields and make a request with them as query parameters

Input fields are one of the most common places where reflected xss vulnerabilities happen. It would great if there was a way to find if a query parameter is being reflected in an input field even if that parameter didn't exist in the initial url. The way I imagine this would work is:
1-User browses to the website as normal.
2-XnlReveal parses the dom and finds all input fields and their id and name attributes.
3-XnlReveal sends a seperate request with those ids and input names as key for query parameters and a token as value.
4-XnlReveal reports back to the user if it finds any reflections.

Hi @KarahanGuner. Thanks for the great idea. I will add to the TODO list, but not sure when I'll get to it yet

I'm glad you liked the idea. Thanks for creating this extension, it is really good.


Allow multi-line contact info.

Hi. First of all, thanks for publishing this template, I like it very much.
Since many people (and I think now more than ever) are digital nomads or are working for offshore companies, it's important to write a full address in the contact info section. Currently due to the usage of makebox only one line of text is allowed, which is not enough for most addresses if you need to include the state/province and country. To sort out this restriction I changed the infofield command to do something similar to the job command, so now you can put multi-line text and it's typeset properly aligned.
To check nothing else broke, I processed the original file with the updated class and it yields almost exactly the same result. I'm using LuaLaTeX 1.13.2 though, not XeLaTeX (BTW just to let you know, the template works fine with it).
I'm creating this PR just in case you consider this change useful. If you see my resume, you'd know I'm not very proficient in LaTeX, so feel free to make any modifications you deem necessary.
Regards.

Thanks for keeping this template up-to-date!
Having a more flexible info field can be useful for many, I suppose. Back when I wrote this template, I just didn't need that flexibility.


Replace BASE value from OpenAPI const to have a dynamically defined url

Description
This is my OpenAPI const in core/OpenAPI.ts :
export const OpenAPI: OpenAPIConfig = {
  BASE: "http://<IP_ADDRESS>:3100",
  CREDENTIALS: "include",
  ENCODE_PATH: undefined,
  HEADERS: undefined,
  PASSWORD: undefined,
  RESULT: "body",
  TOKEN: undefined,
  USERNAME: undefined,
  VERSION: "1.0",
  WITH_CREDENTIALS: false,
  interceptors: { request: new Interceptors(), response: new Interceptors() },
};

For production I need to replace the value that is currently written in hard copy with an environment variable for security reasons. I think the same should be done for other sensitive attributes such as PASSWORD and others.
Is it possible to add this feature?
Thank you

@valentin-harrang you can do this by importing OpenAPI and modifying it. Example:
import { OpenAPI } from 'client';

// Set the base server address using the environment variable.
OpenAPI.BASE = env.serverAddress;

// Password using constant value
OpenAPI.PASSWORD = 'xx';

// Password using async function
OpenAPI.PASSWORD = async () => {
	return sessionStorage.getItem(SESSION_ID_KEY) ?? '';
};

Let me know if this solves the issue!

@jordanshatford Nice! Thank you!

Glad to help!

I have a related issue: I want to use my client to connect to several different services (say, a development service and a production service). The services are the same, except that they have different base URLs and API keys.
My understanding is that the approach recommended here of setting OpenAPI.BASE and OpenAPI.PASSWORD will all clients globally. Is there any way to have multiple instances of the clients configured that point to different backends? Thanks!

@corbt not at the moment, please follow https://github.com/hey-api/openapi-ts/issues/300 for updates


add dutch translation

Added dutch

Thank you so much for your contribution to Reactive Resume @2imad! :)


Remove duplicates from RawExposureTable

It appears there are some duplicates in the raw exposure table causing problems during calexp production:
e.g.:
2021-04-29 01:46:42.144 | ERROR    | huntsman.drp.services.base:_wrap_process_func:58 - Exception while processing {'dateObs': '2020-09-15', 'filename': '/data/nifi/huntsman_priv/images/fields/Frb200914/1919420013090900/20200915T120511/20200915T121504.fits.fz', 'visit':<PHONE_NUMBER>1605502, 'field': 'FRB200914', 'dataType': 'science', 'taiObs': '2020-09-15T12:16:05.502(UTC)', 'ccd': 8, 'expId': 'PAN000_1919420013090900_20200915T121504', 'ccdTemp': -0.5, 'expTime': 60.0, 'filter': 'g_band'}

RuntimeError('Multiple matches found for document in <huntsman.drp.collection.RawExposureCollection object at 0x7f80ba8b7b50>: {}.')

These need to be removed from the table and we need to figure out how they were inserted in the first place.

This seems to be an issue with dupicate .fits and .fits.fz files causing problems with the calexp monitor.


Tests timeout on macOS

Currently it is impossible to run the tests on a mac.
Ideally mac would also be tested on Travis

Is this still an issue? I am able to run npm test just fine on my macbook pro.


add unraid template

Hi, thanks for the suggestion.  I have already added an Unraid template in a separate repo as per the Unraid CA submission guidelines.  So I don't think we need one in the main repo.
Last week, I submitted the template for inclusion in Unraid CA, but am still waiting for a response from the maintainers.

apologies, I didn't see that repo. If you send Squid a DM on the forum, it might remind him to look at the submission.


Should resource.save be replaced with resource.save! on ldap_create_user?

Devise depends crucially on the resource being saved correctly in order to work. resource.save allows it to fail silently, causing Devise to be unable to set the session properly. Took me a couple hours of poking around to find it, so it might save some time for others to fix it.

I feel like this should be fast-tracked to master. There are no objections, and a number of people have been gotcha'd by this issue: https://github.com/cschiewek/devise_ldap_authenticatable/issues/3#issuecomment-2464098


etcd heartbeat timeout too low

In my grid these log messages appear quite often:
kontena-etcd | 2017-03-31 15:31:20.978783 W | etcdserver: failed to send out heartbeat on time (deadline exceeded for 6.940455ms)
kontena-etcd | 2017-03-31 15:31:20.978812 W | etcdserver: server is likely overloaded

The deadline is exceeded even in close to zero load situations by a few ms and when deployments etc. are running or there are real customers using the patform you see spikes of exceeded deadlines by 100-200ms. This is not a failure scenario and when you have not all hosts colocated (which should be the default in a real HA case) then you have longer trips between the "initial nodes" that build the etcd quorum. So it should be possible to configure this.

what kind of machines are you running?

I have these messages on both clusters, one uses a few VServer (master + 2 nodes) and one dedicated root server, the other one has the master in a vserver and the nodes are dedicated root servers.
As I wrote they are not all in one datacenter, but all are located at the same hosting company (hetzner.de).

failed to send out heartbeat on time (deadline exceeded for 6.940455ms)

Reading the etcd FAQ, the default --heartbeat-interval=100ms is not the same as a 100ms timeout: it's how frequently the leader will send out heartbeats. Missed heartbeats are caused by congestion: either disk, CPU or possibly network. The default follower heartbeat timeout is 1000ms: --election-timeout=1000
Check the etcd WAL fsync durations first, to see if you have disk I/O bottlenecks. The distribution should tail off (i.e. stop increasing) around the {le="0.64"}  -> 64-128ms bucket.
Agreed that this could be a tunable value, for cases where your normal RTT is on the order of ~100ms and your worst-case RTT is high enough to hit 1000ms and cause spurious leader re-elections.
curl -s http://<IP_ADDRESS>:2379/metrics | grep wal_fsync_durations
# HELP etcd_wal_fsync_durations_seconds The latency distributions of fsync called by wal.
# TYPE etcd_wal_fsync_durations_seconds histogram
etcd_wal_fsync_durations_seconds_bucket{le="0.001"} 444
etcd_wal_fsync_durations_seconds_bucket{le="0.002"} 934
etcd_wal_fsync_durations_seconds_bucket{le="0.004"} 1973
etcd_wal_fsync_durations_seconds_bucket{le="0.008"} 2550
etcd_wal_fsync_durations_seconds_bucket{le="0.016"} 2602
etcd_wal_fsync_durations_seconds_bucket{le="0.032"} 2611
etcd_wal_fsync_durations_seconds_bucket{le="0.064"} 2617
etcd_wal_fsync_durations_seconds_bucket{le="0.128"} 2618
etcd_wal_fsync_durations_seconds_bucket{le="0.256"} 2619
etcd_wal_fsync_durations_seconds_bucket{le="0.512"} 2619
etcd_wal_fsync_durations_seconds_bucket{le="1.024"} 2619
etcd_wal_fsync_durations_seconds_bucket{le="2.048"} 2619
etcd_wal_fsync_durations_seconds_bucket{le="4.096"} 2619
etcd_wal_fsync_durations_seconds_bucket{le="8.192"} 2619
etcd_wal_fsync_durations_seconds_bucket{le="+Inf"} 2619
etcd_wal_fsync_durations_seconds_sum 8.646908939999994
etcd_wal_fsync_durations_seconds_count 2619

Metrics from the VServer:
root@node2 ~ # curl -s http://<IP_ADDRESS>:2379/metrics | grep wal_fsync_durations
# HELP etcd_wal_fsync_durations_seconds The latency distributions of fsync called by wal.
# TYPE etcd_wal_fsync_durations_seconds histogram
etcd_wal_fsync_durations_seconds_bucket{le="0.001"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.002"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.004"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.008"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.016"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.032"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.064"} 1340
etcd_wal_fsync_durations_seconds_bucket{le="0.128"} 18915
etcd_wal_fsync_durations_seconds_bucket{le="0.256"} 24538
etcd_wal_fsync_durations_seconds_bucket{le="0.512"} 24833
etcd_wal_fsync_durations_seconds_bucket{le="1.024"} 24858
etcd_wal_fsync_durations_seconds_bucket{le="2.048"} 24864
etcd_wal_fsync_durations_seconds_bucket{le="4.096"} 24868
etcd_wal_fsync_durations_seconds_bucket{le="8.192"} 24868
etcd_wal_fsync_durations_seconds_bucket{le="+Inf"} 24868
etcd_wal_fsync_durations_seconds_sum 2753.403110287991
etcd_wal_fsync_durations_seconds_count 24868

And this is from the root server:
root@node3 ~ # curl -s http://localhost:2379/metrics | grep wal_fsync_durations
# HELP etcd_wal_fsync_durations_seconds The latency distributions of fsync called by wal.
# TYPE etcd_wal_fsync_durations_seconds histogram
etcd_wal_fsync_durations_seconds_bucket{le="0.001"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.002"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.004"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.008"} 7943
etcd_wal_fsync_durations_seconds_bucket{le="0.016"} 20552
etcd_wal_fsync_durations_seconds_bucket{le="0.032"} 22206
etcd_wal_fsync_durations_seconds_bucket{le="0.064"} 22621
etcd_wal_fsync_durations_seconds_bucket{le="0.128"} 22858
etcd_wal_fsync_durations_seconds_bucket{le="0.256"} 22910
etcd_wal_fsync_durations_seconds_bucket{le="0.512"} 22919
etcd_wal_fsync_durations_seconds_bucket{le="1.024"} 22920
etcd_wal_fsync_durations_seconds_bucket{le="2.048"} 22921
etcd_wal_fsync_durations_seconds_bucket{le="4.096"} 22921
etcd_wal_fsync_durations_seconds_bucket{le="8.192"} 22921
etcd_wal_fsync_durations_seconds_bucket{le="+Inf"} 22921
etcd_wal_fsync_durations_seconds_sum<PHONE_NUMBER>770012
etcd_wal_fsync_durations_seconds_count 22921

If I'm reading those histograms right, then it looks like your VServer has a really bad case of terribly slow disk IO, your p90 fsync latency is somewhere around 100-200ms. The root-server looks fine.

Especially in the cloud you often have no direct control over the specific performance criteria, so kontena should have a way to make etcd a little bit more relaxed regarding this timeout ;-)

If it does hit the 1000ms timeout, then it'll result in a leader re-election. The pre-timeout warning logging seems to be serving its purpose, you found the disk IO problem before it resulted in actual errors :)
Agreed that there could be such grid-level tunables, and the infrastructure is mostly there in the server/agent to implement them. But they wouldn't fix the slow disk IO issue, they would mostly be relevant if doing inter-continental grids where your nodes have RTT latencies on the order of 100-200ms.
Increasing the etcd timeout also comes at a cost: it will also take longer for the etcd cluster to recover from leader failures, making initial node failures more disruptive.

I'll speak with the hosting company to see if they can do something on their end, I agree that raising the timeout makes some things harder to see, but the etcd shouldn't have a big wrote workload anyway, I think. So being able to tweak the values helps to be able to utilize even multiple cloud providers which would also introduce higher roundtrip times even in the "good case"

I've also seen this on cheap machines on Azure (A1 (?)) that have terrible IO. I would really like to use those machines for my dev cluster for cost reasons.

This is currently with 1.2 on my node 1
root@kw-node1 ~ # curl -s http://localhost:2379/metrics | grep wal_fsync_durations
# HELP etcd_wal_fsync_durations_seconds The latency distributions of fsync called by wal.
# TYPE etcd_wal_fsync_durations_seconds histogram
etcd_wal_fsync_durations_seconds_bucket{le="0.001"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.002"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.004"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.008"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.016"} 0
etcd_wal_fsync_durations_seconds_bucket{le="0.032"} 11
etcd_wal_fsync_durations_seconds_bucket{le="0.064"} 72387
etcd_wal_fsync_durations_seconds_bucket{le="0.128"} 180116
etcd_wal_fsync_durations_seconds_bucket{le="0.256"} 184883
etcd_wal_fsync_durations_seconds_bucket{le="0.512"} 185658
etcd_wal_fsync_durations_seconds_bucket{le="1.024"} 185836
etcd_wal_fsync_durations_seconds_bucket{le="2.048"} 185930
etcd_wal_fsync_durations_seconds_bucket{le="4.096"} 185941
etcd_wal_fsync_durations_seconds_bucket{le="8.192"} 185942
etcd_wal_fsync_durations_seconds_bucket{le="+Inf"} 185942
etcd_wal_fsync_durations_seconds_sum 13926.65366939507
etcd_wal_fsync_durations_seconds_count 185942

Maybe there is a cut-off value for the logging? like "don't bother me if lag is below 500ms" ;-)

If this is happening more frequently with 1.2, it would be good to know if the changes in the Kontena 1.2 agent is causing more disk IO load in this case than before... that would be using the CoreOS toolbox to install something like iotop (or btrace)and see what's actually causing that IO load.

I can later check iotop, but I have no reference data from 1.1.x


Unexpected exception error

Hi,
Login process is not working and, after deleting the integration and creating again, I get the following error.
Please, advise.
Thanks!
This error originated from a custom integration.
Logger: custom_components.garmin_connect.config_flow
Source: custom_components/garmin_connect/config_flow.py:47
integration: Garmin Connect (documentation, issues)
First occurred: 7:22:30 AM (4 occurrences)
Last logged: 7:24:46 AM
Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/garmin_connect/config_flow.py", line 47, in async_step_user
await self.hass.async_add_executor_job(api.login)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/garminconnect/init.py", line 181, in login
self.display_name = self.garth.profile["displayName"]
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/garth/http.py", line 104, in profile
assert isinstance(self._profile, dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Garmin seems to have changed their API, we are looking into fixing the underlaying library. Duplicate of #200

Temp fixed in version 0.2.20!

can confirm it is working.
thanks!

Working! Thanks 👍

I updated to 0.2.22 and restarted HA, still getting:
Traceback (most recent call last):
  File "/config/custom_components/garmin_connect/__init__.py", line 82, in async_login
    await self.hass.async_add_executor_job(self._api.login)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.12/site-packages/garminconnect/__init__.py", line 212, in login
    self.display_name = self.garth.profile["displayName"]
                        ^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.12/site-packages/garth/http.py", line 104, in profile
    assert isinstance(self._profile, dict)

I can  confirm that I'm getting the same error

+1 here. Not much help I know but happy to know I am not on my own. :-)

Hey there,
I think the problem here is the 2-factor security introduced by Garmin. After logging in, you normally receive a security code by e-mail. The query was probably not built into the integration here. Unfortunately, I am not a developer myself. Can someone check this?

No 2FA here and Garmin integration documents the need to disable it anyway.

I just got a new Garmin watch and was trying to get this working. After reading about the 2FA issue, I tried to disable 2FA on my brand new account. It seems like Garmin has "permanent 2FA" set on new accounts, so I cannot disable it. So for any accounts created going forward, it seems like this won't work until/unless 2FA is supported by this plugin.

It looks like it's broken again (clean install and same garth issue).

@dgolovach should be fixed in last version, can you try?

Still seeing the same error in 0.2.26

Still seeing the same error in 0.2.26

Which error exactly? Can you post part of log?

Still seeing the same error in 0.2.26

Which error exactly? Can you post part of log?

ESC[31m2024-12-20 14:35:30.975 ERROR (MainThread) [custom_components.garmin_connect] Unknown error occurred during Garmin Connect login reque
st
Traceback (most recent call last):
  File "/config/custom_components/garmin_connect/__init__.py", line 82, in async_login
    await self.hass.async_add_executor_job(self._api.login)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.12/site-packages/garminconnect/__init__.py", line 212, in login
    self.display_name = self.garth.profile["displayName"]
                        ^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.12/site-packages/garth/http.py", line 104, in profile
    assert isinstance(self._profile, dict)
AssertionErrorESC[0m


Allow collectors to edit observations

This allows users listed as the "Collector" in the notes field of an observation to edit that observation.  This allows foray recorders to create new observations that appropriate users can later add to and edit.
This PR also fixes a bug when users get automatically added to a Project due to scanning a field slip.  It didn't used to create the needed ProjectMember object.  It might be a bit cleaner to combine the maintenance of the Project user groups with the ProjectMembers, but for now I just took a direct approach to solving this problem.  Note that it is doing something very similar to Projects::MembersController.set_status (see app/controllers/projects/members_controller.rb).

coverage: 93.424% (-0.006%) from 93.43%
when pulling cb1790720620577f379c7ffb6cd5e5636e749473 on njw-allow-collectors-to-edit
into 8e20f27a23cf5284b3802437bda65e5a12282eeb on main.


offer a quick fix to remove dead code (code that's now a no-op due to null safety)

After some null safe migrations, I see several places in my code where null checks are now dead code:
The operand can't be null, so the condition is always true.
Remove the condition.

We should offer a quick fix to remove these.

We have a fix for some forms of dead code, but either it isn't associated with the specific diagnostic or it doesn't handle the specific case.

https://dart-review.googlesource.com/c/sdk/+/165481

Thanks!


Traffic output like with senza command directly

part of https://github.com/zalando/lizzy/issues/123

Coverage increased (+0.4%) to 85.671% when pulling b7ad2dffa33e63b875fbbbe43f59d02dc731afc8 on rafaelcaricio:traffic-cmd-as-senza into 2a4669551512a3f131b879a04055dc444499f1c2 on zalando:release2.0.

:+1:

👍


Checksum incoming address for estimation and propagate type

Summary
In order to maintain a strict type and checksummed address throughout the project, we should validate the incoming addresses. In newer controllers, we started doing this by adding an AddressSchema to address. This begins adding it to "existing" controllers.
This checksums the incoming address of EstimationsController['getEstimation'] and propagates the stricter (0x${string}) type throughout the project accordingly.
Changes

Increase strictness of IEstimationsRepository['getEstimation'] address argument and implementation.
Increase strictness of all related methods across domain/controllers and implementations:

Messages
Safe
Transactions

Increase strictness of all relevant cache keys and dirs.
Update tests accordingly.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

6 of 6 (100.0%)  changed or added relevant lines in 5 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.06%) to 92.877%

Files with Coverage Reduction
New Missed Lines
%

src/routes/transactions/entities/tests/human-description.builder.ts
2
80.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.06%

Covered Lines:
7109

Relevant Lines:
7364

💛  - Coveralls


House ForageConfig info in POSUIState

What

Why

Test Plan

✅ | ❌ I've added unit tests for this change.
✅ | ❌ The reviewer should manually test the changes in this PR.

Demo

How

Current dependencies on/for this PR:

main

PR #171   👈

PR #172

PR #173

This stack of pull requests is managed by Graphite.


FlexboxItemDecoration inserts decoration at the start when justifyContent=CENTER

[x] I have searched existing issues and confirmed this is not a duplicate

Issues and steps to reproduce
FlexItemDecoration seems to add decoration at the beginning of the flex line if the layout managermJustifyContent property is set to Justify.Center. Not sure if this is the intended behaviour or I am doing something wrong here. I've linked a sample project to reproduce the issue
If I could solve this issue by overriding FlexItemDecoration, then please provide some details on how to do it.
Sample code -
 val layoutManager = FlexboxLayoutManager(this, FlexDirection.ROW, FlexWrap.WRAP)
 layoutManager.justifyContent = JustifyContent.CENTER

 val itemDecoration = FlexboxItemDecoration(this)
 itemDecoration.setDrawable(ContextCompat.getDrawable(this, R.drawable.divider_vertical)!!)
 itemDecoration.setOrientation(FlexboxItemDecoration.VERTICAL)
 recycler.addItemDecoration(itemDecoration)

 recycler.layoutManager = layoutManager

Reference screenshot -

Expected behavior
Drawable is not drawn for the first item on each line.
Version of the flexbox library
1.0.0
Link to code
Sample project - https://github.com/Protino/FlexboxDemo

@thagikura Could you please provide some guidance on how to solve this?

@thagikura Is this an intended behavior and not a bug?

@thagikura Can you please let me know if this is a bug, so that I will get on fixing it otherwise will close it.


Select item on a  Tag

How to use puppeteer to paginate the list on this page:
https://cnae.ibge.gov.br/?view=classe&tipo=cnae&versao=10&classe=03221
When i try to choose the select item on dom using:
document.getElementsByName("tbResult_length")[0].selectedIndex = 4
It doesn't change the result, keeping only ten results in the page instead of 35 results.

That table is a jQuery widget. You can trigger the change event after selecting the item:
jQuery("#tbResult_wrapper SELECT").change()


corrections to the pr to the pr to the pr

PR inception continues. Corrections for https://github.com/bmorris3/jdaviz/pull/4 (for https://github.com/spacetelescope/jdaviz/pull/2179).

Thanks! I'll merge this and then clean up my PR to your PR. Hang in there!