StyleSheet PPX extension

Closes #667
Introduction
This PR attempts to address the StyleSheet issue with the %%stylesheet extension, and also introduce typed styles.
Usage
Add the following to bsconfig.json:
{
  "ppx-flags": [
    ["rescript-react-native/ppx.exe", "-as-ppx"]
  ]
}

Stylesheet
This PR adds the %%stylesheet extension, which removes the need for Js.t types for stylesheet calls. It allows the use of:
%%stylesheet(let style = {
  main: Style.create(~flex=1., ()),
  text: Style.create(~fontSize=14., ()),
})

This will allow you to use style.main and style.text further down in the code (or in another module) if required.
Interaction with %style
This PR also allows for %style extension to be used within a %%stylesheet extension as such:
%%stylesheet(let style = {
  main: %style({ flex: 1. }),
  text: %style({ fontSize: 14. }),
})

Here, you'll get style.main with type Style.typed_t<[> #flex ]>> and style.text with type Style.typed_t<[> #fontSize ]>.
Translation
Consider the following:
%%stylesheet(let style = {
  style1: Style.create(~flex=1., ()),
  style2: Style.create(~fontSize=14., ()),
})

This roughly translates to:
type stylesheet = {
  style1: Style.t,
  style2: Style.t,
}

let style: stylesheet = StyleSheet.unsafeCreate({
  style1: Style.create(~flex=1., ()),
  style2: Style.create(~fontSize=14., ()),
})

In case a %style extension is present, then the tags are also added to the type definition. Consider the following:
%%stylesheet(let style = {
  style1: Style.create(~flex=1., ()),
  style2: Style.create(~fontSize=14., ()),
  style3: %style({ flex: 1. }),
  style4: %style({ fontSize: 14. }),
})

This would translate to:
type stylesheet<+'a, +'b> = {
  style1: Style.t,
  style2: Style.t,
  style3: Style.typed_t<'a>,
  style4: Style.typed_t<'b>,
}

let style: stylesheet<[> #flex ], [> #fontSize ]> = StyleSheet.unsafeCreate({
  style1: Style.create(~flex=1., ()),
  style2: Style.create(~fontSize=14., ()),
  style3: Obj.magic(Style.create(~flex=1, ())),
  style4: Obj.magic(Style.create(~fontSize=14., ())),
})

In both these cases, StyleSheet.unsafeCreate has the following definition:
@module("react-native") @scope("StyleSheet")
external unsafeCreate: 'a => 'a = "create"

Style Typing
Similar to TyXML and bs-css, we can use tagged types and variance to include/exclude specific css elements. I've defined
// Style.resi
type typed_t<+'a>

Which allows labels, such as #flex, #alignContent etc. to be attached. So, a JavaScript style
const style = {
  flex: 1,
  marginTop: 20,
  justifyContent: "center",
}

would be typed as:
let style: Style.typed_t<[> #flex | #marginTop | #justifyContent ]>

At consumption, we can write:
module Element = {
  @react.component
  let make: (~style:Style.typed_t<[< #flex ]>=?) => React.element
}

where we put all the supported style attributes in the list. In the example above, this element only accept the flex attribute, so if we were to write:
<Element style /> // Compile error

This would raise a compile error, since style contains at least #flex, #marginTop and #justifyContent, and Element wants at most #flex.
However, if we had a style:
let style1: Style.typed_t<[> #flex ]>

Then
<Element style=style1 />

would be allowed.
The %style extension
Normally, it would be pretty difficult to achieve this kind of covariant tagging, since the only thing that would make sense for it would be lists, and you'll end up with lots of code that breaks the zero-cost principle. So, an extension is introduced to specifically perform this translation. It also has the benefit of making the code look closer to how it's written in JavaScript. In the example above, we fine the JavaScript as
const style = {
  flex: 1,
  marginTop: 20,
  justifyContent: "center",
}

Currently, we would have to write:
let style = Style.style(~flex=1., ~marginTop=dp(20.), ~justifyContent=#center, ())

With the %style extension, we'll write:
let style = %style({
  flex: 1.,
  marginTop: dp(20.),
  justifyContent: #center,
})

Translation
The extension roughly translates the above call to:
let style: Style.typed_t<[> #flex | #marginTop | #justifyContent ]> = Obj.magic(
  Style.style(
    ~flex=1.,
    ~marginTop=dp(20.),
    ~justifyContent=#center,
    ()
  )
)

The tags are read from record fields themselves, and the field/value pair gets translated into a labelled argument to the function style. To give a very arbitrary example:
let arbitrary = %style({
  field1: value1,
  field2: value2,
  field3: value3,
})

translates to
let arbitrary: Style.typed_t<[> #field1 | #field2 | #field3 ]> = Obj.magic(
  Style.style(
    ~field1=value1,
    ~field2=value2,
    ~field3=value3,
    ()
  )
)

Practical Usage (tags)
I've included TypedStyle.res with definitions scraped from @types/react-native definitions, and are clustered similarly.
They include:

flexStyle
transformsStyle
shadowStyleIOS
viewStyle
textStyleIOS
textStyleAndroid
textStyle
imageStyle

I've also included utility functions to convert subsets of the above typed styles to Style.t. To give an example, we have:
let flexStyle: Style.typed_t<[< flexStyle ]> => Style.t

We can begin to migrate component definitions to utilise the tagged styles and use these functions for conversion in the meantime.
Composition
I've also included 2 ways of composing typed styles. These are:

The compose function defined in TypedStyle.res
Overloading the ++ operator defined in module Infix.

Both methods are defined using arrays, that is:
open TypedStyle.Infix // shadows the ++ operator (the ^ operator in OCaml)

let composed = style1 ++ style2 ++ style3

would produce something like:
const composed = $caret(style1, $caret(style2, style3))

which is equivalent to
const composed = [style1, [style2, style3]]

Implementation
The entire project is built on esy and dune, and exists in the ppx directory. In order to allow development work on Windows, OCaml 4.11.x was used with ocaml-migrate-parsetree to allow the code to understand 4.06.1 parsetree generated by bs-platform.
A postinstall script is created to copy the ppx.exe to the top-level of the package.
Limitations
The %%stylesheet extension only works on "structure items", so:
%%stylesheet(let style1 = { ... }) // works

module A = {
  %%stylesheet(let style2 = { ... }) // should work, not tested
}

let make = () => {
  %%stylesheet(let style3 = { ... }) // not supported
}

Next Steps
This is still more or less a work-in-progress, there's some things I'll need to do

[ ] Validate build on Windows
[ ] Validate multiple stylesheets with same fields
[ ] Validate stylesheets within modules

Additionally, I'd like the community's help to validate if the extension can be built and provide your thoughts on using the extension.
You can try this version by changing package.json:
{
  "dependencies": {
    "rescript-react-native": "diaozheng999/reason-react-native#stylesheet-ppx-rebased",
  }
}

A few things I see that bother me:

syntax doesn't really match ReScript syntax that use @annotation  (eg: @react.component let make ...)
postinstall hook is clearly a bummer the way it is (not even sure npm & yarn will support them on the long run, as they cause various issues that we won't discuss here)
Ppxlib is an issue too, it has been clearly discouraged by ReScript team
I saw Obj.magic a few times, is this mandatory?
Infix operator is not a good idea too, and I think ReScript team would be against it usage
The "Style Typing" is confusing me a little. We already have style (not recommended), viewStyle, textStyle and imageStyle that are the only official accepted different styles if I am correct (see https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/StyleSheetTypes.js).

I am mitigated with this as some parts are cool, but after all this seems to be more complicated. My main idea was to make it easier to write & read style for new comers, not to have something weird and more complex to understand. Having too many way to author styles doesn't seems a good idea. Just having 2 annotations seems way too much.
I would have found something cool if we could just have something like
@react.native.styles
let styles = {
  container: viewStyle(/*...*/)
  bodyText: texStyle(/*...*/)
}

<View style=styles.container>

that would translate to
let styles = {
  open Style
  StyleSheet.create({
    "container": viewStyle(/*...*/)
    "bodyText": texStyle(/*...*/)
  }
}

<View style=styles["container"]>

This would be a minimal changes (and maintenance). Not more (too complex), not less (otherwise useless).
Curious to know what ReScript think about this (poke @chenglou @bobzhang @ryyppy) as well as other contributors (poke @cknitt @sgny @jfrolich @Freddy03h etc) and users
Note that in all case, if we don't accept this

It's an interesting idea. Not 100% sure about the benefits. Sometimes it's better to be explicit. Some notes:

I think extension points are better here, because it fails when the ppx is not run. Annotations are (like the name says) annotations.
ppxlib is not encouraged by the ReScript team, but neither are ppx's, so I think they won't be in favor of this in any form. In my opinion ppxlib is the most sane way to write a ppx as a maintainer while Hongbo is in favor of a more low level approach of directly working with the parsetree of the current ReScript version, so opinions differ.
I agree mostly with the comments of @MoOx, but I don't think what he proposes is possible because a ppx works on the parse tree and not the typed tree. The transform of styles.foo => styles["foo"] is not possible because we won't know the type. Unless the ppx generates a record type definition and uses that for style sheets.
This is a nice opportunity to infer dp and pct from the number in the stylesheet; transform 1.0 to dp and 100% to pct
Perhaps just have a %style extension for the styles itself, and not have the extension point at the style sheet level, so it can also be used for inline styles
A thing that I always wanted to build (that would benefit our production performance) is building a ppx that converts all static inline styles to static Stylesheet's.

Hi! I'm not a rescript/reason expert, I have 2 projects on production (a react-native app and a react-native-web electron app) but I never wrote ppx myself.
I find ppx intimidating and as a user of lib using it, not really clear of the code it will generate (never found a way to see the "generate reason/rescript" the same way we can see the "generated JS").
For example, I understood only recently how @react.component ppx really work and who I can do without it to customize something I wanted. It something I don't yet master with lenses-ppx when I use reform, still the impression to do dark magic.

So I'm more with @MoOx way of seing it as a thin layer.
Maybe is there a way by doing multiple StyleSheet.create ?
In react-native, this an identity function and in react-native-web, it will do a forEach on the object to register the style. So I don't se a big difference between calling  StyleSheet.create 1 time with a 4 attributs object or calling StyleSheet.create 4 times with 1 attribut object.
Maybe an outpout like this is acceptable (but I don't know if it can be helpful):
module Styles = {
  open Style;

  let container =
    StyleSheet.create({
      "idontcare": style(~flexDirection=`row, ~alignItems=`center, ()),
    })##idontcare;
  let inner =
    StyleSheet.create({
      "idontcare": style(~flexDirection=`column, ~alignItems=`flexStart, ()),
    })##idontcare;
};

<View style=Styles.container>

I'm no longer supervising anything RRN-related but imo this really isn't worthwhile.

Hi guys, Let me address some of the concerns here:

ReScript uses a combination of both extensions (e.g. %json) and annotations (e.g. @react.component). Using extensions here make the PPX extension itself more manageable, since Ppxlib takes away a lot of hard work with parsing the AST.
Regarding postinstall script, I do agree. However, the PPX extensions are platform-native binaries. Ideally, when we're distributing, we'll a version for each platform and architecture, and copy the appropriate one to the root directory. If none matches, we'll still need to fallback to using postinstall script to manually do the compilation. This behaviour is similar to other highly native-dependent packages such as fs-watcher, and even bs-platform itself.
The Obj.magic is there to allow the expanded ReScript to spit out zero-overhead JS.
Having PPX introduces a whole can of worms no matter how you slice it, which may also be why it's highly discouraged by the ReScript team. I guess we have to weigh the benefits of the PPX vs the cost of maintaining it. It won't ever be a thin layer. That was as maintainable as I can make it...
I am able to remove the %style extension from within the %%stylesheet extension, so we can clean up the syntax to look like:

%%stylesheet(
  let styles = {
    container: {
      height: Style.dp(0.),
      overflow: #visible,
      flexDirection: #column,
      justifyContent: #flexEnd,
    },
    wrapper: {
      backgroundColor: Color.purple,
      flexDirection: #columnReverse,
      margin: Style.dp(8.),
      alignItems: #flexEnd,
    },
  }
)

To give examples of what this PPX is doing currently, these are from the project I'm working on right now:
// this was part of an component
%%stylesheet(
  let styles = {
    container: %style({
      height: Style.dp(0.),
      overflow: #visible,
      flexDirection: #column,
      justifyContent: #flexEnd,
    }),
    wrapper: %style({
      backgroundColor: Color.purple,
      flexDirection: #columnReverse,
      margin: Style.dp(8.),
      alignItems: #flexEnd,
    }),
  }
)

compiles to
import * as ReactNative from "react-native";

var styles = ReactNative.StyleSheet.create({
      wrapper: {
        backgroundColor: "purple",
        alignItems: "flex-end",
        flexDirection: "column-reverse",
        margin: 8
      },
      container: {
        flexDirection: "column",
        height: 0,
        justifyContent: "flex-end",
        overflow: "visible"
      }
    });

I've also had style files that contains reusable styles:

%%stylesheet(
  let title = {
    style: %style({
      marginTop: dp(49.),
      marginHorizontal: dp(26.),
      height: dp(109.),
      justifyContent: #center,
    }),
  }
)

%%stylesheet(
  let emphasis = {
    outerContainer: %style({marginHorizontal: dp(16.), marginTop: dp(10.)}),
    innerContainer: %style({flexDirection: #row, alignItems: #center}),
    iconContainer: %style({borderRadius: 32.}),
    textContainer: %style({flex: 1., paddingLeft: dp(16.), justifyContent: #center}),
    contentTitle: %style({fontWeight: #bold, fontSize: 16.}),
    contentText: %style({fontSize: 14.}),
    xpContainer: %style({paddingRight: dp(8.), justifyContent: #center}),
    xpAlignmentWrapper: %style({
      flexDirection: #row,
      alignItems: switch ReactNative.Platform.os {
      | p if p == ReactNative.Platform.android => #center
      | _ => #baseline
      },
      justifyContent: #flexEnd,
    }),
    xpValue: %style({fontWeight: #bold, fontSize: 20., paddingRight: dp(2.)}),
    xpLabel: %style({fontWeight: #_400, fontSize: 14.}),
    checkbox: %style({
      width: dp(30.),
      height: dp(30.),
      alignItems: #center,
      justifyContent: #center,
    }),
    checkboxAnimation: %style({width: dp(200.), height: dp(200.)}),
  }
)

This compiles to
// Generated by ReScript, PLEASE EDIT WITH CARE

import * as ReactNative from "react-native";

var title = ReactNative.StyleSheet.create({
      style: {
        height: 109,
        justifyContent: "center",
        marginHorizontal: 26,
        marginTop: 49
      }
    });

var p = ReactNative.Platform.OS;

var emphasis = ReactNative.StyleSheet.create({
      checkboxAnimation: {
        height: 200,
        width: 200
      },
      checkbox: {
        alignItems: "center",
        height: 30,
        justifyContent: "center",
        width: 30
      },
      xpLabel: {
        fontSize: 14,
        fontWeight: "400"
      },
      xpValue: {
        fontSize: 20,
        fontWeight: "bold",
        paddingRight: 2
      },
      xpAlignmentWrapper: {
        alignItems: (function () {
              switch (p === "android" ? "center" : "baseline") {
                case "flexStart" :
                    return "flex-start";
                case "flexEnd" :
                    return "flex-end";
                case "center" :
                    return "center";
                case "stretch" :
                    return "stretch";
                case "baseline" :
                    return "baseline";

              }
            })(),
        flexDirection: "row",
        justifyContent: "flex-end"
      },
      xpContainer: {
        justifyContent: "center",
        paddingRight: 8
      },
      contentText: {
        fontSize: 14
      },
      contentTitle: {
        fontSize: 16,
        fontWeight: "bold"
      },
      textContainer: {
        flex: 1,
        justifyContent: "center",
        paddingLeft: 16
      },
      iconContainer: {
        borderRadius: 32
      },
      innerContainer: {
        alignItems: "center",
        flexDirection: "row"
      },
      outerContainer: {
        marginHorizontal: 16,
        marginTop: 10
      }
    });

export {
  title ,
  emphasis ,

}
/* title Not a pure module */

I think an approach like:
@rn.stylesheet
module Styles = {
  let x = {"foo": "bar"}
  let y = {"foo": "bar"}
}

that'd compile to
module Styles_ = {
  let x = {"foo": "bar"}
  let y = {"foo": "bar"}
}

module type Styles_Type = module type of Styles_

module Styles: Styles_Type = unpack(StyleSheet.create(module(Styles_: Styles_Type)))

would be both simpler and more useful: dead-code elimination + nice dot access syntax.

Regarding typed styles:
The following is allowed in the current implementation
let style = Styles.imageStyle(~resizeMode=#cover, ())

@react.component
let make = () => <Text style />

However, the current TypeScript implementation doesn't allow this, and React Native is also not happy with this at runtime:
Warning: Failed prop type: Invalid props.style key `resizeMode` supplied to `Text`.
Bad object: {
  "resizeMode": "cover"
}

When we tag the styles, we can have:
let style : Style.t<[> resizeMode ]> = // however we create this

@react.component
let make = () => <Text style />

This will produce the following error at compile time:
  This has type:
    ReactNative.Style.typed_t<[> #resizeMode] as 'a> (defined as
      \"Style-ReactNative".typed_t<'a>)
  Somewhere wanted:
    ReactNative.TypedStyle.t<[< ReactNative.TypedStyle.textStyle] as 'b>
      (defined as \"Style-ReactNative".typed_t<'b>)

  The incompatible parts:
    'a vs
    'b (defined as
      [<
  | #_end
  | #alignContent
  | #alignItems
  | #alignSelf
  | #aspectRatio
 ...
  | #translateY
  | #width
  | #writingDirection
  | #zIndex
])
  The second variant type does not allow tag(s) `resizeMode

This mirrors the error message that React Native gives at runtime:
 ERROR    Warning: Failed prop type: Invalid props.style key `resizeMode` supplied to `Text`.
Bad object: {
  "resizeMode": "cover"
}
Valid keys: [
  "display",
  "width",
  "height",
  ...
  "textDecorationLine",
  "textDecorationStyle",
  "textDecorationColor",
  "textTransform",
  "writingDirection"
]

Additionally, some libraries read only a subset of the styles. Examples include:

lottie-react-native: does not support borders
react-native-vector-icons: does not support margins

We will be able to define what values are acceptable in these cases.

For this last comment: that was a design choice. We didn't wanted to make things more difficult that what they are for new comers.
We could have used different type for style/viewStyle/textStyle/image styles but we didn't so people can easily start. Anyway, RN will provide a red screen so during development you will be immediately blocked. Not sure if we want to complexity this a lot. This currently allow to reuse some basic styles across some various components.
We also already do things more agressive than ReScript React regarding unit (ReactDOM.Style accept string in most props for example). We didn't wanted to create a huge gap between both layers.

I actually prefer @bloodyowl 's suggestion if we can implement that without PPX at all.

Hi, I am not an expert in styled css. Here are some updates for next release that structural typing is simplified a lot in case you missed it:

Js.t is not needed any more
## is not needed, you can just write a#b (reason syntax) or a["b"] (rescript)
we may consider add pattern match over structural objects

The main issues with the structural objects APIs is that they don't allow to simply report unused styles, and are pretty syntax heavy.
I'd say that the ideal PPX-less solution would be the ability to create a external "functor":
@module("react-native") @scope("StyleSheet") external Create: 'a => 'a = "create"

So that we'd be able to do:
module Styles = StyleSheet.Create({
  let x = style(~a, ~b, ~c)
  let y = style(~a, ~b, ~c)
})

Is it something possible @bobzhang?

👍 for a PPX-less and zero-cost solution.
For the styles themselves, this could be very helpful: https://forum.rescript-lang.org/t/rfc-more-general-type-checking-for-structural-typings/1485

I didn't wanted to close this topic. I renamed master to main branch. Feel free to reopen something on main branch with a PPX-less solution.


build: add Docker Compose file and service for running Ollama with Do…

Add Docker Compose file for running Ollama with Docker
Create a new file docker-compose.yaml
Define the ollama service in the Docker Compose file
Build the image and set the image name to jmorganca/ollama
Mount the runtime/ollama directory to /home/ollama in the container

Hi @blogbin thank you for the PR. The documentation improvements to Ollama + Docker is awesome. We probably don't want to put too much in the main README.md. It would be best to move it to a new docs/docker.md file.

Hi @blogbin just wanted to check in on this PR. Are you looking to update it as an example or docker.md doc? Thanks again!

Hi @blogbin going to close this for now – please feel free to re-open if you'd like to pick it up!


Add installation docs

Fixes #5
Fixes #7

This does not add the actual libs if you're not using pods. See #19 and #23 for issues popping up by following the installation guide. Maybe add Carthage support for the lottie-ios?


Instructions for running on Raspberry PI is missing in the "Prerequisites for .NET Core on Linux"

The instructions found here: https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md contains these instructions for running .NET Core 2.0 on a Raspberry Pi:
Getting the app to run on the Pi.
Linux

Install Linux on your Pi.
Install the prereq packages for .NET Core.
Copy your app, i.e. whole publish directory mentioned above, to the Raspberry Pi and execute run ./helloworld to see Hello World! from .NET Core running on your Pi! (make sure you chmod 755 ./helloworld)

Number 2) links to this page:
https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x#tabpanel_-r1y2MrINK_netcore2x
There are no instructions here for installing the "prereq packages for .NET Core" on Raspberry Pi.

The wording could probably be better but its telling you to install the stuff under the section "Linux distribution dependencies" in that document from the package manager on your distro.

I made a small commit to the instructions to hopefully clarify. https://github.com/dotnet/core/commit/a500d1be4c51101e01eeed996e47c617a7b38427


Maximum image, logo upload size is 2048 kb. how to change it?

Have you found a solution to this?

Have you found a solution to this?

yes, it was in SettingUpdate.php under  app->Http->Requests


Jfrog rt dpl 400 Bad Request Error

Description
Using JFrog CLI version 1.40.0 to pull an image from the Artifactory private registry and using Github actions to run the cli, while the cli set up and login is successful and even the image gets pulled and is available locally, there is error below that keeps coming and the CICD step fails. 400 Bad Request Error
Steps to reproduce
Run the below steps in a Gihub actions pipeline
- name: SETUP JFROG
   uses: jfrog/setup-jfrog-cli@v1
   with:
     version: 1.39.4
   env:
    JF_ARTIFACTORY_1: ${{ secrets.ARTIFACTORY_DEPLOYER }}

- name: Docker Pull
    run: |
      jfrog rt dpl --server-id xyz <repo_name>.jfrog.io/ecs-runner-helpers:v5 https://<source_repository>

No 400 Bad Request Error
Ideally after the image gets pulled through jfrog rt dpl, no 400 bad request error should come.
Versions

JFrog CLI version: 1.40.0
JFrog CLI operating system: ubuntu:latest
Artifactory Version:

Additional Error Details from pipeline
[Info] Getting repository 'https://<repo_name>/artifactory/abc-local' details ...
Error:  Artifactory response: 400 Bad Request
{
  "errors": [
    {
      "status": 400,
      "message": "Bad Request"
    }
  ]
}
Error: Process completed with exit code 1.

Could some one please take a look at this?

Could some one please take a look at this?

Anyone with any inputs on this one?

Anyone with any inputs on this one?

@supratim-persistent -
Thanks foe reporting this issue and my apologies for the late response.
Will you be able to try this again with the latest release of JFrog CLI? We've implement some fixes and improvements which may resolve this issue.
If the issue is not resolved, can you please include the Artifactory version you're using and tell us if the error you're receiving is exactly the same as you mentioned above?


Add gewarren as author of run-time config folder

Added as author and ms.author

I had forgotten to update the codeowners file so I added that as well to this PR.


Update to Julia 1.10

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.03%. Comparing base (54c157d) to head (2494400).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   94.36%   95.03%   +0.67%
==========================================
  Files          15       15
  Lines        1188     1188
==========================================
+ Hits         1121     1129       +8
+ Misses         67       59       -8

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Set up app to render templates

User Stories

As a user, I want to be able to view the home and dashboard pages in the browser

set up init files and folders


[Refactoring] compiler module JavaCompilerTest testcase can be made irrelevant

As maven plugin uses compiler indirectly, it is better to test datastore using maven plugin, exactly like sample-app.
That way, we can reduce so much of duplicate between  maven plugin and compiler test code sqlcomponents\compiler\src\test\java\org\sqlcomponents\compiler\java\JavaCompilerTest.java

DB2JavaDTMapperTest.java is still relevant to compiler module


ApplePay for web error

When I do applePay.performValidation() , the browser throw exception as below:

Failed to load resource: the server responded with a status of 422
https://api.sandbox.braintreegateway.com/merchants/stdg7bpqdhwdk2v6/client_api/v1/apple_pay_web/sessions

Request
{
    "_meta": {
        "merchantAppId": "<IP_ADDRESS>:3000",
        "platform": "web",
        "sdkVersion": "3.0.1",
        "source": "apple-pay",
        "integration": "custom",
        "integrationType": "custom",
        "sessionId": "322d18cb-9300-4ce0-abcf-5cef71608932"
    },
    "applePayWebSession": {
        "validationUrl": "https://cn-apple-pay-gateway.apple.com/paymentservices/startSession",
        "domainName": "<IP_ADDRESS>",
        "merchantIdentifier": "merchant.com.mycompany.iphone.sandbox",
        "displayName": "my display name"
    },
    "braintreeLibraryVersion": "braintree/web/3.0.1",
    "authorizationFingerprint": "***|created_at=2016-08-31T02:51:21.909332121+0000&merchant_id=***&public_key=***"
}

Response
{
    "error": {
        "message": "Unexpected validation URL"
    },
    "fieldErrors": []
}

I suspect it has something to do with the incompatibility for ApplePay China gateway, but I have no further ideas.
Braintree documentation for apple-pay-web is too simple to do further investigation.
Update
Just tried with a different sandbox account that pointing to:

https://apple-pay-gateway-cert.apple.com/paymentservices/startSession

Response following:
{
    "error": {
        "message": "Apple Pay Web is not enabled for this merchant"
    },
    "fieldErrors": []
}

Does it have something to do with "merchantAppId": "<IP_ADDRESS>:3000" ?

Hi @owen26 -
The error with a status of 422 is caused by the unexpected validation URL. We'll look into whether this is due to the China gateway.
The second error is likely due to your Braintree merchant not being enabled for Apple Pay on the Web. Apple Pay on the Web is currently in beta, and we are working directly with select merchants to ensure a smooth integration.
Please contact<EMAIL_ADDRESS>with your Braintree merchant ID, and we'll help from there.

@intelliot
Thank you for your assistant. I will make contact with<EMAIL_ADDRESS>see if I can be SELECTED MERCHANT to make my project integration successful.

I have the same 422 issue. Do you resolve it successfully?

@owen26
I have the same 422 issue. Do you resolve it successfully?

@estellehuang Please reach out to our support team for assistance with the details of the error you are seeing. https://developers.braintreepayments.com/forms/contact


Description of FOX in the header on the new FOX page is not translatable

Overview
The new FOX page includes a description of the token in the header, right under the title. I've found that it's not defined as a translatable string currently, it's a const in the code and doesn't pass through the translation function: https://github.com/shapeshift/web/blob/27798dfc62f3f53d037c285ddd60cc91a478cad9/src/plugins/foxPage/foxPage.tsx#L72
Reported by Firebomb
References and additional details
https://cdn.discordapp.com/attachments/898694346705080350/986719969351958528/unknown.png
Acceptance Criteria
Header description needs to be able to be translatable
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response

hey @gomesalexandre, who should I assign to this one?

hey @gomesalexandre, who should I assign to this one?

You can keep me assigned to it! Just to clarify before we start work on it, this is just a technical change and won't bring translations for the Fox Page unless provided by product, does it sound good to you?

this is just a technical change and won't bring translations for the Fox Page unless provided by product

The Globalization team will gladly translate it when the string is available 👍 (which is why I've reported it as the French translator)
Aside from this specific FOX page, in which the description is in the "web" repo code, there is a broader problem with asset descriptions being displayed only in English in the app and not being translatable/translated.
From what I've seen, fixing this would affect "lib" (where other asset descriptions are retrieved) and "web" (where the user language is known). Should this be fixed while we're at it?
The good news is the CoinGecko API endpoint used in "lib" to get asset descriptions already returns translated descriptions when available (e.g. for Ethereum, see the "description" key), we just only use English ones currently. Falling back to English descriptions when a translation is not available would be good enough I think.
The kinda bad news is we also have "overridden" descriptions that are located in "lib" that are currently only in English... so we should provide a way to get these strings translated if possible.

"overridden" descriptions

I guess the override of the Fox description should operate only on fox page, not on the asset page and whatever.
If we need to override the description of that asset everywhere, let's override it in lib and then find a solution to provide i18n strings from that lib override

"overridden" descriptions

I guess the override of the Fox description should operate only on fox page, not on the asset page?
If we need to override the description everywhere, let's override it in lib and then find a solution to provide i18n strings from lib

Correct @NeOMakinG those are two different problems. Within the scope of the Fox Page, moving the current constant to translations will make it translatable and will close that issue.
WRT the descriptions from Coingecko coming back as English only, there is a bit more work involved that will span across lib + updating web consumption of descriptions. We should definitely spike the best way to achieve it in a different issue.
Thanks a lot for spiking this @firebomb1

@firebomb1 Here's the lib issue for this: https://github.com/shapeshift/lib/issues/836

Fixed by https://github.com/shapeshift/web/pull/2098

@firebomb1 All ready for globalization team to translate this! Let me know if there's anything you guys need on how to contribute them

Reopening as this will still need an accompanying web PR fox the original issue


Move mock implementations from src into a test folder

Is your feature request related to a problem? Please describe.
Main library source contains mock implementations of the library. We should move them into test repository or elsewhere, to clearly separate them from the remaining code.

We can't really do that because they are used externally to the project (IE in TcMenu and other projects) so they need to be on the path.

OK, can we keep this issue open and focus on improving the other projects to not use these resources? If you think the code has to stay there and there is no way how to refactor, you can close this issue.


modbus master 是否可以支持传入的参数来设置停止位的功能 (IDFGH-4119)

你好，
components\freemodbus\port\portserial_m.c：xMBMasterPortSerialInit() 中串口的参数配置项停止位是默认为1的，是否可以支持传入参数来设置呢？或者说这个串口的stopbits参数配置与否都没啥影响呢？

uart_config_t xUartConfig =
{
.baud_rate = ulBaudRate,
.data_bits = ucData,
.parity = ucParity,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
.rx_flow_ctrl_thresh = 2,
.source_clk = UART_SCLK_APB,
};

Hello zjykymt,
The extra stop bit can be a useful way to add a little extra receive processing time, especially at high baud rates and/or using software driven UART, where time is required to process the received byte. However the devices today have hardware driven UARTs and are fast enough, work at even higher baud rates without the need of an extra stop bit. The one stop bit configuration is usually enough for most of device UARTs and do not cause any issues. Do you have any issues communication between devices in your infrastructure due to fixed stop bit config?
If you have very strong opinion about two stop bit configuration it can be added to Modbus configuration and propagated to Modbus serial code initialization function.

Hi alisitsyn, thanks for your reply.
Under the test there is no problem with the communication at 115200bps.

In addition, I want to describe another modbus communication problem that I tested here.
ESP-IDF version: 4.1
I have configured the following two configurations: Place UART ISR function into IRAM or Place timer interrupt handler into IRAM

But when the program calls esp_partition_write or esp_partition_erase_range function,
the following two read errors will still occur when the Master modbus command is sent at this time：

MB_CONTROLLER_MASTER: mbc_master_send_request(131): SERIAL master send request failure error=(0x107) (ESP_ERR_TIMEOUT).

I would recommend to change the priority of modbus tasks (CONFIG_FMB_PORT_TASK_PRIO) to be higher.
The modbus master uses polling approach to process input packets and reads FIFO byte by byte.
This may cause the errors you showed. In this case possible solution is just retry the modbus write/read request.
This is known issue related to coexistence of Wi-Fi and flash functionality with modbus.
The fixes for the v4.1 as well for other branches are ready but not merged yet. You could test the patch below to apply the fixes. The modbus v4.1 with these patches works significantly better and allows avoiding most of the problems but reading errors are still possible in your application in some conditions (priority of the tasks which do intensive work related to Wi-Fi and flash access). In this case the only retry will help.
Please disable the CONFIG_MB_TIMER_PORT_ENABLED option after applying patch to allow longer delays during modbus packet processing due to periodical suspend of its tasks.
freemodbus_backport_latest_fixes_v41.zip
Please let me know the results. Thanks.

Hi alisitsyn，
I use xTaskCreate to create application tasks, all tasks have a priority of 2, and the modbus serial task priority is 10.

After I apply the patch and set CONFIG_MB_TIMER_PORT_ENABLED to disable, the modbus read/write errors still occur but the chances have been reduced(ESP_ERR_TIMEOUT error no longer appears).

After esp_partition_erase_range:
E (381754) MB_PORT_COMMON: vMBMasterRunResRelease(172): vMBMasterRunResRelease: resource release failure.

After esp_partition_write:
E (637180) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).

The general logic of my code is: tell the modem to use HTTP GET to obtain a file of 1M size. After the modem is downloaded, use UART (115200bps) to transmit to the ESP32, and every 256 bytes received by the ESP32 are stored in the flash (of course, before downloading the flash has been erased). While downloading, read 6 consecutive modbus times as a complete implementation, and execute a complete implementation every 5 seconds
This patch seems to have some optimization effects, but I don’t quite understand that MODBUS_UART_ISR runs in RAM.
The uart received FIFO is also in RAM, will the flash operation cause the MODBUS_UART_ISR insertion of the FIFO to fail?
Due to the development plan of my own project, I am sorry that I can only simply test and provide not very specific information.
When the development of my project reaches a certain level, I will try to understand the reasons for the above modbus uart tx/rx and flash r/w/erase errors in ESP-IDF.
Thanks.

Hi @zjykymt,
Thank you for thest results. I will investigate the issues related to using esp_partition_erase_range(). I guess it is due to constraints of current Modbus architecture. I am trying to reproduce and check solution for this. This will take some time.  As a workaround I can propose to do retries of modbus read/write requests if the error returned:
err == ESP_ERR_TIMEOUT;
for (int retry = 0; (retry < MB_MAX_RETRY) && (err != ESP_OK); retry++) {
    err = mbc_master_get_parameter(cid, (char*)param_descriptor->param_key,
                                                    (uint8_t*)&value, &type);
}

I have the same problem with the freemodbus master component.
My application consists of a web server via a wifi access point with an embedded web page that allows updating the esp32 firmware via OTA, and a connection with a slave device via modbus.
For the OTA update firmware I use the native APIs provided by app_update component (esp_ota_write).
To avoid the error=(0x108) (ESP_ERR_INVALID_RESPONSE) during the firmware update I deactivate the communications via modbus and when the update is completed I perform a software reset (esp_restart()).
My problem is that after resetting the esp32 the modbus component is corrupted and all the requests fail with the "E (637180) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE)".
The only solution at the moment is to try a hardware reset with the EN pin.
I am developing the application with version 4.2 of the esp-idf.
Does alisitsyn have a freemodbus component patch for this version?
The esp_restart function does not reset the peripherals (except for WiFi, BT, UART0, SPI1, and legacy timers) but my modbus connection use the UART2.
Is there a software reset that does reset all the peripherals?

@JavierSVE,
The modbus actually was not designed to work with OTA update and there are things that might prevent to work properly. But in your case the modbus is restarted after update. It is interesting case and need more investigation to fix this issue. I do have the patch for v4.2 version to fix most of known issues. Please apply patch below to check if it fixes the issue.
0001_backport_latest_fixes_v42.diff
I will try to reproduce your issue in my environment and will connect you then. Would appreciate if you can send the example to reproduce.
Thanks.

alisitsyn thank you very much for your quick response.
To reproduce this problem you can use the versamodule's example "ESP-OTA-Webserver" and add a task to it with a modbus master that interrogates a slave vía UART2:
https://github.com/versamodule/ESP32-OTA-Webserver
Now I'm going to test the patch for version 4.2 of esp-if.

I have applied the patch provided by alisitsyn to esp-idf v4.2 and the problem of the modbus master after the esp_restart continues.
This is the trace log.
First the ESP32 start from the ota_0 (at offset 0x10000). All run ok. So I run a firmware update from the embedded web and the esp_restart runs.
Now esp32 starts from partition ota_1 (at offset 0x380000) but when the vMasterTask task starts to interrogate the slave via modbus, error=(0x108) (ESP_ERR_INVALID_RESPONSE) appears forever.
`ets Jun  8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:7132
load:0x40078000,len:13696
load:0x40080400,len:4000
entry 0x40080688
I (28) boot: ESP-IDF v4.2-dev-1995-g636b964c8-dirty 2nd stage bootloader
I (28) boot: compile time 10:37:10
I (29) boot: chip revision: 1
I (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 8MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (77) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (85) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  3 ota_0            OTA app          00 10 00010000 00370000
I (100) boot:  4 ota_1            OTA app          00 11 00380000 00370000
I (107) boot:  5 storage          Unknown data     01 82 006f0000 00100000
I (115) boot: End of partition table
I (119) boot_comm: chip revision: 1, min. application chip revision: 0
I (126) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x3fe9c (261788) map
I (235) esp_image: segment 1: paddr=0x0004fec4 vaddr=0x3ffb0000 size=0x00154 (   340) load
I (236) esp_image: segment 2: paddr=0x00050020 vaddr=0x400d0020 size=0x9e66c (648812) map
I (489) esp_image: segment 3: paddr=0x000ee694 vaddr=0x3ffb0154 size=0x03d58 ( 15704) load
I (496) esp_image: segment 4: paddr=0x000f23f4 vaddr=0x40080000 size=0x00404 (  1028) load
I (496) esp_image: segment 5: paddr=0x000f2800 vaddr=0x40080404 size=0x17ea8 ( 97960) load
I (560) boot: Loaded app from partition at offset 0x10000
I (560) boot: Disabling RNG early entropy source...
I (560) cpu_start: Pro cpu up.
I (564) cpu_start: Application information:
I (569) cpu_start: Project name:     SAF840DU_WS
I (574) cpu_start: App version:      e4163eb-dirty
I (580) cpu_start: Compile time:     Dec 14 2020 10:59:25
I (586) cpu_start: ELF file SHA256:  93a8fe4335f060bf...
I (592) cpu_start: ESP-IDF:          v4.2-dev-1995-g636b964c8-dirty
I (599) cpu_start: Starting app cpu, entry point is 0x40081a94
I (0) cpu_start: App cpu up.
I (609) heap_init: Initializing. RAM available for dynamic allocation:
I (616) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (622) heap_init: At 3FFBAA20 len 000255E0 (149 KiB): DRAM
I (628) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (635) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (641) heap_init: At 400982AC len 00007D54 (31 KiB): IRAM
I (647) cpu_start: Pro cpu start user code
I (665) spi_flash: detected chip: gd
I (666) spi_flash: flash io: dio
I (666) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (729) MAIN: Press the switch to run...
I (731) uart: queue free spaces: 20
esp32 (I (1805) wifi_setup: starting tcpip adapter
/spiffs) > I (1807) wifi_setup: setting gateway IP
I (1808) wifi_setup: starting DHCPS adapter
I (1810) wifi_setup: starting event loop
I (1815) wifi_setup: initializing WiFi
I (1821) wifi:wifi driver task: 3ffcdfd4, prio:23, stack:6656, core=0
I (1825) system_api: Base MAC address is not set
I (1830) system_api: read default base MAC address from EFUSE
I (1852) wifi:wifi firmware version: 9f3395e
I (1852) wifi:wifi certification version: v7.0
I (1852) wifi:config NVS flash: enabled
I (1853) wifi:config nano formating: disabled
I (1857) wifi:Init data frame dynamic rx buffer num: 32
I (1862) wifi:Init management frame dynamic rx buffer num: 32
I (1867) wifi:Init management short buffer num: 32
I (1872) wifi:Init dynamic tx buffer num: 32
I (1876) wifi:Init static rx buffer size: 1600
I (1880) wifi:Init static rx buffer num: 16
I (1884) wifi:Init dynamic rx buffer num: 32
I (3668) phy: phy_version: 4182, f1ba940, Jun  4 2020, 19:40:07, 0, 0
I (3669) wifi:mode : softAP (24:0a:c4:b8:e6:f9)
I (3673) wifi:Total power save buffer number: 16
I (3674) wifi:Init max length of beacon: 752/752
I (3677) wifi:Init max length of beacon: 752/752
I (3682) wifi_setup: WiFi set up!
I (3683) wifi_event_handler: Access Point Started
I (3691) server_handle_task: task starting
I (3692) server_task: server listening
I (3700) count_task: starting task
I (24170) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1
I (24171) wifi:station: d0:37:45:ab:b1:e3 join, AID=1, bgn, 40U
I (24185) wifi_event_handler: station d0:37:45:ab:b1:e3 join, AID=1
I (25228) esp_netif_lwip: DHCP server assigned IP to a station, IP is: <IP_ADDRESS>
I (36890) server_task: new client
I (36891) http_server: reading from client...
I (36891) http_server: read from client
I (36893) http_server: Sending /
I (36895) server_task: new client
I (36907) http_server: reading from client...
I (37032) http_server: read from client
I (37033) http_server: Sending /root.css
I (37037) server_task: new client
I (37037) http_server: reading from client...
I (37039) server_task: new client
I (37041) http_server: read from client
I (37048) http_server: Sending /jquery.js
I (37125) http_server: reading from client...
I (37126) http_server: read from client
I (37126) http_server: Sending /root.js
I (37225) server_task: new client
I (37226) http_server: reading from client...
I (37228) http_server: read from client
I (37229) http_server: Sending menu.png
I (37397) server_task: new client
I (37397) http_server: reading from client...
I (37398) http_server: read from client
I (37400) http_server: Requesting websocket on /
I (37408) websocket_callback: client 0 connected!
I (137300) parseReceivedJson: received binary chunk (251 to go) of size 4096:
I (142753) OTA: Writing to partition subtype 17 at offset 0x380000
I (142766) sendFirmwareJsonAck: (to client: 0) NEXT:
I (142767) websocket_callback: PD_FIRMWARE_CHUNK with length 5500:
I (142790) parseReceivedJson: received binary chunk (250 to go) of size 4096:
I (142791) OTA: Writing to partition subtype 17 at offset 0x380000
I (142806) sendFirmwareJsonAck: (to client: 0) NEXT:
I (142806) websocket_callback: PD_FIRMWARE_CHUNK with length 5500:
I (142825) parseReceivedJson: received binary chunk (249 to go) of size 4096:
I (142826) OTA: Writing to partition subtype 17 at offset 0x380000
I (142842) sendFirmwareJsonAck: (to client: 0) NEXT:
I (142842) websocket_callback: PD_FIRMWARE_CHUNK with length 5500:
I (142861) parseReceivedJson: received binary chunk (248 to go) of size 4096:
I (142861) OTA: Writing to partition subtype 17 at offset 0x380000
I (142877) sendFirmwareJsonAck: (to client: 0) NEXT:
I (142877) websocket_callback: PD_FIRMWARE_CHUNK with length 5500:
I (142893) parseReceivedJson: received binary chunk (247 to go) of size 4096:
I (142893) OTA: Writing to partition subtype 17 at offset 0x380000
I (142909) sendFirmwareJsonAck: (to client: 0) NEXT:
I (142909) websocket_callback: PD_FIRMWARE_CHUNK with length 5500:
I (142923) parseReceivedJson: received binary chunk (246 to go) of size 4096:
I (142923) OTA: Writing to partition subtype 17 at offset 0x380000
I (142940) sendFirmwareJsonAck: (to client: 0) NEXT:
I (142941) websocket_callback: PD_FIRMWARE_CHUNK with length 5500:
I (142956) parseReceivedJson: received binary chunk (245 to go) of size 4096:
I (142956) OTA: Writing to partition subtype 17 at offset 0x380000
I (142972) sendFirmwareJsonAck: (to client: 0) NEXT:
Continue with the rest of the pieces ....
I (150594) websocket_callback: PD_FIRMWARE_CHUNK with length 5498:
I (150609) parseReceivedJson: received binary chunk (3 to go) of size 4096:
I (150609) OTA: Writing to partition subtype 17 at offset 0x380000
I (150625) sendFirmwareJsonAck: (to client: 0) NEXT:
I (150625) websocket_callback: PD_FIRMWARE_CHUNK with length 5498:
I (150639) parseReceivedJson: received binary chunk (2 to go) of size 4096:
I (150640) OTA: Writing to partition subtype 17 at offset 0x380000
I (150656) sendFirmwareJsonAck: (to client: 0) NEXT:
I (150657) websocket_callback: PD_FIRMWARE_CHUNK with length 5498:
I (150665) parseReceivedJson: received binary chunk (1 to go) of size 1744:
I (150667) OTA: Writing to partition subtype 17 at offset 0x380000
I (150679) esp_image: segment 0: paddr=0x00380020 vaddr=0x3f400020 size=0x3fe9c (261788) map
I (150755) esp_image: segment 1: paddr=0x003bfec4 vaddr=0x3ffb0000 size=0x00154 (   340)
I (150756) esp_image: segment 2: paddr=0x003c0020 vaddr=0x400d0020 size=0x9e66c (648812) map
I (150942) esp_image: segment 3: paddr=0x0045e694 vaddr=0x3ffb0154 size=0x03d58 ( 15704)
I (150948) esp_image: segment 4: paddr=0x004623f4 vaddr=0x40080000 size=0x00404 (  1028)
I (150950) esp_image: segment 5: paddr=0x00462800 vaddr=0x40080404 size=0x17ea8 ( 97960)
I (150987) esp_image: segment 0: paddr=0x00380020 vaddr=0x3f400020 size=0x3fe9c (261788) map
I (151060) esp_image: segment 1: paddr=0x003bfec4 vaddr=0x3ffb0000 size=0x00154 (   340)
I (151062) esp_image: segment 2: paddr=0x003c0020 vaddr=0x400d0020 size=0x9e66c (648812) map
I (151246) esp_image: segment 3: paddr=0x0045e694 vaddr=0x3ffb0154 size=0x03d58 ( 15704)
I (151252) esp_image: segment 4: paddr=0x004623f4 vaddr=0x40080000 size=0x00404 (  1028)
I (151254) esp_image: segment 5: paddr=0x00462800 vaddr=0x40080404 size=0x17ea8 ( 97960)
I (151312) OTA: Next boot partition subtype 17 at offset 0x380000
I (151315) sendFirmwareJsonAck: (to client: 0) OK:
I (151316) parseReceivedJson: Reboot Commad, Restarting ...
I (153320) wifi:station: d0:37:45:ab:b1:e3 leave, AID = 1, bss_flags is 134243, bss:0x3ffde05c
I (153322) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1
I (153327) wifi_event_handler: Unregistered event=3
I (153330) wifi_event_handler: station d0:37:45:ab:b1:e3 leave, AID=1
I (153338) wifi_event_handler: Access Point Stopped
I (153376) wifi:flush txq
I (153376) wifi:stop sw txq
I (153378) wifi:lmac stop hw txq
ets Jun  8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:7132
load:0x40078000,len:13696
load:0x40080400,len:4000
entry 0x40080688
I (29) boot: ESP-IDF v4.2-dev-1995-g636b964c8-dirty 2nd stage bootloader
I (29) boot: compile time 10:37:10
I (30) boot: chip revision: 1
I (34) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (41) boot.esp32: SPI Speed      : 40MHz
I (46) boot.esp32: SPI Mode       : DIO
I (50) boot.esp32: SPI Flash Size : 8MB
I (55) boot: Enabling RNG early entropy source...
I (60) boot: Partition Table:
I (64) boot: ## Label            Usage          Type ST Offset   Length
I (71) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (78) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (86) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (93) boot:  3 ota_0            OTA app          00 10 00010000 00370000
I (101) boot:  4 ota_1            OTA app          00 11 00380000 00370000
I (108) boot:  5 storage          Unknown data     01 82 006f0000 00100000
I (116) boot: End of partition table
I (120) boot_comm: chip revision: 1, min. application chip revision: 0
I (127) esp_image: segment 0: paddr=0x00380020 vaddr=0x3f400020 size=0x3fe9c (261788) map
I (236) esp_image: segment 1: paddr=0x003bfec4 vaddr=0x3ffb0000 size=0x00154 (   340) load
I (237) esp_image: segment 2: paddr=0x003c0020 vaddr=0x400d0020 size=0x9e66c (648812) map
I (490) esp_image: segment 3: paddr=0x0045e694 vaddr=0x3ffb0154 size=0x03d58 ( 15704) load
I (497) esp_image: segment 4: paddr=0x004623f4 vaddr=0x40080000 size=0x00404 (  1028) load
I (497) esp_image: segment 5: paddr=0x00462800 vaddr=0x40080404 size=0x17ea8 ( 97960) load
I (561) boot: Loaded app from partition at offset 0x380000
I (561) boot: Disabling RNG early entropy source...
I (562) cpu_start: Pro cpu up.
I (565) cpu_start: Application information:
I (570) cpu_start: Project name:     SAF840DU_WS
I (575) cpu_start: App version:      e4163eb-dirty
I (581) cpu_start: Compile time:     Dec 14 2020 10:59:25
I (587) cpu_start: ELF file SHA256:  93a8fe4335f060bf...
I (593) cpu_start: ESP-IDF:          v4.2-dev-1995-g636b964c8-dirty
I (600) cpu_start: Starting app cpu, entry point is 0x40081a94
I (592) cpu_start: App cpu up.
I (610) heap_init: Initializing. RAM available for dynamic allocation:
I (617) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (623) heap_init: At 3FFBAA20 len 000255E0 (149 KiB): DRAM
I (629) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (636) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (642) heap_init: At 400982AC len 00007D54 (31 KiB): IRAM
I (648) cpu_start: Pro cpu start user code
I (667) spi_flash: detected chip: gd
I (667) spi_flash: flash io: dio
I (667) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (730) MAIN: Press the switch to run...
I (732) uart: queue free spaces: 20
esp32 (I (1806) wifi_setup: starting tcpip adapter
/spiffs) > I (1808) wifi_setup: setting gateway IP
I (1809) wifi_setup: starting DHCPS adapter
I (1811) wifi_setup: starting event loop
I (1816) wifi_setup: initializing WiFi
I (1822) wifi:wifi driver task: 3ffcdfd4, prio:23, stack:6656, core=0
I (1826) system_api: Base MAC address is not set
I (1831) system_api: read default base MAC address from EFUSE
I (1853) wifi:wifi firmware version: 9f3395e
I (1853) wifi:wifi certification version: v7.0
I (1853) wifi:config NVS flash: enabled
I (1854) wifi:config nano formating: disabled
I (1858) wifi:Init data frame dynamic rx buffer num: 32
I (1863) wifi:Init management frame dynamic rx buffer num: 32
I (1868) wifi:Init management short buffer num: 32
I (1873) wifi:Init dynamic tx buffer num: 32
I (1877) wifi:Init static rx buffer size: 1600
I (1881) wifi:Init static rx buffer num: 16
I (1885) wifi:Init dynamic rx buffer num: 32
I (3668) phy: phy_version: 4182, f1ba940, Jun  4 2020, 19:40:07, 0, 0
I (3670) wifi:mode : softAP (24:0a:c4:b8:e6:f9)
I (3674) wifi:Total power save buffer number: 16
I (3674) wifi:Init max length of beacon: 752/752
I (3678) wifi:Init max length of beacon: 752/752
I (3683) wifi_setup: WiFi set up!
I (3684) wifi_event_handler: Access Point Started
I (3692) server_task: server listening
I (3696) count_task: starting task
I (3696) server_handle_task: task starting
E (6866) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (6868) MASTER: ComandRequest (0x4) an invalid response from slave.
I (6968) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1
I (6969) wifi:station: d0:37:45:ab:b1:e3 join, AID=1, bgn, 40U
I (6980) wifi_event_handler: station d0:37:45:ab:b1:e3 join, AID=1
I (6988) esp_netif_lwip: DHCP server assigned IP to a station, IP is: <IP_ADDRESS>
E (8866) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (8868) MASTER: ComandRequest (0x1) an invalid response from slave.
E (8949) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (8950) MASTER: ComandRequest (0x3) an invalid response from slave.
E (9214) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (9215) MASTER: ComandRequest (0x3) an invalid response from slave.
E (9349) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (9350) MASTER: ComandRequest (0x4) an invalid response from slave.
E (9619) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (9620) MASTER: ComandRequest (0x4) an invalid response from slave.
E (10816) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (10818) MASTER: ComandRequest (0x1) an invalid response from slave.
E (10890) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (10891) MASTER: ComandRequest (0x3) an invalid response from slave.
E (11154) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (11155) MASTER: ComandRequest (0x3) an invalid response from slave.
E (11289) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (11290) MASTER: ComandRequest (0x4) an invalid response from slave.
E (11556) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (11557) MASTER: ComandRequest (0x4) an invalid response from slave.
E (12853) MB_CONTROLLER_MASTER: mbc_master_send_request(131): Master send request failure error=(0x108) (ESP_ERR_INVALID_RESPONSE).
E (12854) MASTER: ComandRequest (0x1) an invalid response from slave.
For ever ....
`

After applying the second proposed patch that corrects some fixes for esp_restart() to address the incorrect reset of UART1/2 tx/rx fifo, now everything works correctly.
Thank you very much.

@JavierSVE,
I was able to reproduce the issue with my simple modbus master example and OTA update through web with the result almost the same as yours (had timeout modbus errors instead of invalid response). Then it was possible to fix the issue applying patch below. The UART2 is able to work correctly after this and I do not have issues.
0002_driver_fix_uart_module_reset_issue.diff


[CMake] Adjust module cache path so it matches the build script.

What's in this pull request?

I recently was encountering some strange stdlib build failures in the CoreGraphics SDK overlay which seemed to be related to the recent import-as-member work. I fixed my build by manually deleting the module cache. I then discovered that the build script contains code to wipe the module cache before each build, however it turns out that this was not doing its job because a different module cache path is being specified by the Swift CMake configuration. This PR fixes the path to match what the build script expects. (See https://github.com/apple/swift/blob/master/utils/build-script-impl#L1606)

Before merging this pull request to apple/swift repository:

[ ] Test pull request on Swift continuous integration.

Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please smoke test
    OS X platform               | @swift-ci Please smoke test OS X platform
    Linux platform              | @swift-ci Please smoke test Linux platform

Validation Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please test
    OS X platform               | @swift-ci Please test OS X platform
    Linux platform              | @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

This seems to be an accidental mismatch, but given that we now stamp the compiler version into the module hash, any mismatches shouldn't cause broken builds -- the hash will be different and the compiler will rebuild the module.  @cwillmor @benlangmuir
@swift-ci Please test and merge


[Advanced Logbook] Fix map for selected QSOs after empty search

If managed to break my own stuff again :)
Fix for selecting QSOs to map in LBA.

Confirmed fix working. Tnx :)


Order-preserving groupby-aggregations

Is your feature request related to a problem? Please describe.
Users need a way to succinctly get the "row where the value of x is the maximum value", potentially grouped by a certain key.
More concretely:
|  A  |  B  |  C  |
|  a  |  1  | "x" |
|  a  |  2  | "y" |
|  b  |  1  | "x" |
|  b  |  2  | "y" |

# Group by A, B'=max(B), C'=get(C where row is B=max(B))

|  A  |  B' |  C' |
|  a  |  2  | "y" |
|  a  |  2  | "y" |

This operation is only valid for "selection-type aggregations", which are aggregations that will return an existing value rather than computing a new one. These are: max, min, median etc. It doesn't make sense, for example, on a mean.
SQL
In most dialects of SQL, this seems to not be possible to express without a JOIN (see: stackoverflow).
Proposal
Allowing for order-preserving groupbys should cover most of the required cases, where we want to do this for a max(B) or min(B). Adding additional complexity to the aggregation API to allow for "selecting columns based on the results of other aggregations" might be too complicated, and isn't part of SQL either.
In general, keeping aggregations independent of each other seems to be a good idea, and makes for a less confusing user-API. Each column requested in .agg is an independent aggregation that will be performed over the potentially grouped dataframe.,
df.sort("B", desc=True).groupby("A", preserve_ordering=True).agg(
    B_prime=col("B").agg.first(),
    C_prime=col("C").agg.first(),
)

Closing - adding stable ordering to groupby may be too strict for future development


How do I increase drop down year more than 2100?

My drop down year only limit to 2100.

If you're on the latest version I believe if you set a maxDate with a year greater than 2100 then that should solve that issue


Changed to show sdkmanager output only when Debug is enabled

https://github.com/amyu/setup-android/issues/228


GEODE-3117: fix Gateway authentication with legacy security

add GatewayLegacyAuthenticationRegressionTest to reproduce bug
fix authentication of Gateway sender/receiver with
SECURITY_CLIENT_AUTHENTICATOR

Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

[x ] Has your PR been rebased against the latest commit within the target branch (typically develop)?

[x ] Is your initial contribution a single, squashed commit?

[x ] Does gradlew build run cleanly?

[x ] Have you written or updated unit tests to verify your changes?

[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to<EMAIL_ADDRESS>

+1.  Huzzah for more test coverage.

@pdxrunner thanks for finding the commented out code! I fixed it.

If you are using IntelliJ as your IDE, please remember to update your style file to that located in geode/etc/intellij-java-modified-google-style.xml to be consistent with Geode's established style guide.  This file was updated June 13 with commit a561bd12 to be consistent with documented expectations.
After having done so, please optimize the imports to the correct order and to eliminate the use of the wildcard imports.


chore: Updated WAL cleanup statement in resources.md

#48  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


Using with System Proxy on Simulator

It seems that when using this framework on a simulator (I've been using it for a while now, but never on the simulator), the connection request ignores the system proxy. Other network requests (e.g. REST API calls using Alamofire) are handled appropriately and routed through the proxy. IS there a way to set the proxy for this framework or have others experienced this issue?

I haven't heard of any issues with proxies. I would assume since proxies are suppose to be transparent and we are relying the Apple networking APIs just like AlamoFire does, it should work fine.

So, after hours of exploring, researching, and testing, I've got it working with the following:
//WebSocket.swift
//This was already here
inputStream = readStream!.takeRetainedValue()
outputStream = writeStream!.takeRetainedValue()
//Added code below
let proxyDict = CFNetworkCopySystemProxySettings()
let socksConfig = CFDictionaryCreateMutableCopy(nil, 0, proxyDict!.takeRetainedValue());

CFWriteStreamSetProperty(outputStream, kCFStreamPropertySOCKSProxy, socksConfig);
CFReadStreamSetProperty(inputStream, kCFStreamPropertySOCKSProxy, socksConfig);

This picks up the system wide proxy settings. Additionally, it seems that it only observes the SOCKS proxy setting. I've been able to get it working by running Charles Proxy on the host machine with External Proxy settings only set for HTTP/HTTPS.

Ah great work and thanks for taking the time to figure this out. Seems like the system proxy settings should be already be applied to the NSStream, but Cocoa APIs 😄. I'll make sure to look at this when I do the Swift 3 stuff. Thanks again.

Is this implemented?

The above code may run on the simulator (I didn't check TBH) but will not work on a real iOS device. The reason is that you can not specify a SOCK5 server in the iOS setting. Therefore CFNetworkCopySystemProxySettings() will return a dictionary that only contains HTTP proxy information.
Unfortunately the HTTP proxy is completely useless in this case as it will be ignore (you would have to create the socket using CFReadStreamCreateForHTTPRequest() (which is deprecated by the ways) as far as I understand it.
I think the easiest and simplest solution for everybody would be if you could set the sock5 proxy information on the WebSocket instand yourself before you call connect(). Somewhat like this:
        self.webSocket = WebSocket(url: encodedURLRequest.url!)
        self.webSocket!.delegate = self
        self.webSocket!.setSocks5ProxyInformation(host: "<IP_ADDRESS>", port: "8889")
        self.webSocket!.useSocks5Proxy = true
        self.webSocket!.connect()

If will create a pull request if I find the time.

3.0.2 released with #423!

I confirm it doesn't work on real device (ios12)

error same to me

For now you can do something like this. Find if enableSOCKSProxy {  section and replace it with
if enableSOCKSProxy {
    let socksConfig = CFDictionaryCreateMutableCopy(nil, 0, CFNetworkCopySystemProxySettings()!.takeRetainedValue())
    let propertyKey = CFStreamPropertyKey(rawValue: kCFStreamPropertySOCKSProxy)
    let dict = socksConfig as? [String: Any]
    if let ip = dict?["HTTPSProxy"]  as? String, let port = dict?["HTTPSPort"] as? Int {
        let customSocksConfig = ["SOCKSProxy": ip, "SOCKSPort": port + 1, "SOCKSEnable": 1] as CFDictionary?
        CFWriteStreamSetProperty(outputStream, propertyKey, customSocksConfig)
        CFReadStreamSetProperty(inputStream, propertyKey, customSocksConfig)
    }
 }

To adjust socks proxy turn on in charles https & socks proxy simultaneously. Socks we will user to sniff the traffic, http proxy will help other network services work properly. And we will use default proxy setting UI in ios preferences.
Then  device proxy setting fill in with proper ip and http proxy port (eg 8888). Socks proxy port by default will listen on 8889 port.
On simulator all should work without any additional changes.

Thanks, but sadly it doesn't work 😞

@dai-cb You did something wrong, because i am case it's working solution

Is this on device? You can't set iOS proxy settings in Simulator.

@dai-cb It's in both case. Simulator uses proxy setting of mac os - so the computer which is running your simulator

sacred0x01's code is working for a device. Thanks! Didn't test on simulator yet.

This solution is not in work code now. But why? And how to intercept traffic by CharlesProxy from real device now?


Optimize binary size a bit

Possible opportunities for saving some code size:

Better compression of unicode table in common/text/unicode_data.cpp

Lots of space is wasted because all entries use 4 byte code point values. Code point ranges in [0, 256) and [256, 65536) can use a different layout.
Note that the source file is generated by a python script (which should also be migrated to cog)

Wrapper around absl::flat_hash_set(/table) for maps and sets of Id keys (e.g. InstId). All of those Id types are simple wrappers around integers (usually u32), but their template instantiations seem to be distinct. By creating a wrapper type that is a simple map of integers we could save some code, although probably not that much because the value the value types would still be distinct.
Look into the code size of fmt:: symbols

Tools like Bloaty are useful when working on this.

Unicode tables are a bit smaller now. General categories are longer stored, we only have information about XID_Start (+ Continue) and Whitespace. Tables are still not compressed in any way.


Testing with cryptopp 7.0.0

cc @jcfr is this fine with you?

Thanks for checking :smile:

Thanks for checking 😄

Giving the mess with CryptoPP::byte we might completely drop support for CryptoPP < 7...


Invalid query param signature when signature validation is enabled

Going through the spid-saml-check hell.. Don't know if it's an issue with the tool itself or what, but Keycloak is rejecting the response (this is the Keycloak's generated SPID SP metadata.xml.zip). Could it be because the 1st IdP certificate is used in place of the requested one?

org.keycloak.common.VerificationException: org.keycloak.common.VerificationException: Invalid query param signature

ERROR [org.keycloak.broker.spid.SpidSAMLEndpoint] (default task-100) validation failed: org.keycloak.common.VerificationException: org.keycloak.common.VerificationException: Invalid query param signature
at org.keycloak.keycloak-services@12.0.4//org.keycloak.protocol.saml.SamlProtocolUtils.verifyRedirectSignature(SamlProtocolUtils.java:169)
at org.keycloak.keycloak-services@12.0.4//org.keycloak.protocol.saml.SamlProtocolUtils.verifyRedirectSignature(SamlProtocolUtils.java:127)
at deployment.spid-provider.jar//org.keycloak.broker.spid.SpidSAMLEndpoint$RedirectBinding.verifySignature(SpidSAMLEndpoint.java:645)
at deployment.spid-provider.jar//org.keycloak.broker.spid.SpidSAMLEndpoint$Binding.handleSamlResponse(SpidSAMLEndpoint.java:548)
at deployment.spid-provider.jar//org.keycloak.broker.spid.SpidSAMLEndpoint$Binding.execute(SpidSAMLEndpoint.java:250)
at deployment.spid-provider.jar//org.keycloak.broker.spid.SpidSAMLEndpoint.redirectBinding(SpidSAMLEndpoint.java:154)

Issue happens only if Validate signature is enabled as per wiki

Tests performed:

it doesn't happen when the flag is disabled on the 1st SPID provider (not the required one)
it does happen if the flag is enabled on the 1st SPID provider and disabled in the required one => seems like it's not honored on the provider-specific SPID settings

Deployed spid-saml-check instance metadata: https://www.spid-validator.it/metadata.xml

spid-saml-check response

similar to #4

By enabling backchannel logout, issue was fixed. Don't understand why, but it's ok! :D


Easy 8FBCA751 has multiple solutions.

I can't see what would make this solution incorrect.
The islands are rectangular, spaced apart and the input shapes are copied verbatim sans background.
Unless you're willing to point out something I missed, would you consider moving this to the multiple solutions category?

Perhaps there's a rule implied that islands have to touch corners, but none of the examples make that decidable. The second one comes closest, but there is no other way to solve it even without this implied rule, so it's not really showcasing the rule distinction.

Exactly the issue I pointed out earlier in the original repository: https://github.com/fchollet/ARC-AGI/issues/84 . As François stated "This is an acceptable level of ambiguity", so it is fine.


Determine How to Fire and Handle Internal Events

The application needs to be able to fire and handle events internally. For example, when a new workspace is created, an event should be fired to update the MobX store.

using this library
https://www.npmjs.com/package/events
app/constants/Events.ts
import * as EventEmitter from 'events'

export const eventTypes = {
    WORKSPACE_CRUD: 'WORKSPACE_CRUD',
    WORKSPACE_ERR: 'WORKSPACE_ERR',
    DEPLOYMENT_CRUD: 'DEPLOYMENT_CRUD',
    DEPLOYMENT_ERR: 'DEPLOYMENT_CRUD',
    WIKI_CRUD: 'WIKI_CRUD',
    WIKI_ERR: 'WIKI_CRUD',
}

export const events = new EventEmitter()

app/stores/WorkspacesStore.ts
...
  updateWorkspace = async () => {
      const form = this.selectedWorkspace.updateWorkspaceForm
      const successful = await form.submit(this.selectedWorkspace.id)
      if (successful) {
         events.emit(eventTypes.WORKSPACE_CRUD, 'Updated')
      } else {
         events.emit(eventTypes.WORKSPACE_ERR, 'Updated')
      }
      return successful
   }
...

app/stores/SnackbarStore.ts
...
    initEvents(){
        events.on(eventTypes.DEPLOYMENT_CRUD, (data)=>{
            this.push({message: `Deployment successfully ${data}`, variant: 'success'})
        })
        events.on(eventTypes.DEPLOYMENT_CRUD, (data)=>{
            this.push({message: `Deployment failure ${data}`, variant: 'error'})
        })
        events.on(eventTypes.WORKSPACE_CRUD, (data)=>{
            this.push({message: `Workspace successfully ${data}`, variant: 'success'})
        })
        events.on(eventTypes.WORKSPACE_ERR, (data)=>{
            this.push({message: `Workspace Failure: ${data}`, variant: 'error'})
        })
    }
...

app/models/workspaces/deployments/index.ts
export class Deployments extends BaseModelCollection<Deployment>{
    /**
     * A collection of deployments within a workspace
     */

    constructor(public workspace: Workspace) {
        super(Deployment)

        this.load()

        events.on(eventTypes.DEPLOYMENT_CRUD, () => {
            this.load()
        })
    }
...

the above shows the use case for decoupling form submission, snackbar addition and reloading data.


Gradle error when trying to run my app

I got this error the first time i tried to run with the plugin logger_flutter and logger. But when I removed the logger_flutter package from pubspec.yaml and deleted the logger_flutter folder, it worked fine.
I recently migrated to AndroidX, so it could be the the cause.
                    ------------------------------------------------------------
                    Gradle 4.10.2
                    ------------------------------------------------------------

                    Build time:   2018-09-19 18:10:15 UTC
                    Revision:     b4d8d5d170bb4ba516e88d7fe5647e2323d791dd

                    Kotlin DSL:   1.0-rc-6
                    Kotlin:       1.2.61
                    Groovy:       2.4.15
                    Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
                    JVM:          1.8.0_152-release (JetBrains s.r.o 25.152-b01)
                    OS:           Windows 10 10.0 amd64
[  +11 ms] Initializing gradle... (completed in 1,3s)
[   +1 ms] Resolving dependencies...
[        ] executing: [C:\Users\Erik\Projects\apps\hazizz_mobile\android\]
C:\Users\Erik\Projects\apps\hazizz_mobile\android\gradlew.bat app:properties
[+2800 ms]
                    > Configure project :app
                    WARNING: API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variant.getAssemble(), use -Pandroid.debug.obsoleteApi=true on the command line to
                    display a stack trace.
                    WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with
                    'variantOutput.getProcessResourcesProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the
                    command line to display a stack trace.
                    WARNING: API 'variantOutput.getProcessManifest()' is obsolete and has been replaced with
                    'variantOutput.getProcessManifestProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variantOutput.getProcessManifest(), use -Pandroid.debug.obsoleteApi=true on the
                    command line to display a stack trace.
                    WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with
                    'variant.getMergeResourcesProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variant.getMergeResources(), use -Pandroid.debug.obsoleteApi=true on the command
                    line to display a stack trace.
                    WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with
                    'variant.getMergeAssetsProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line
                    to display a stack trace.
                    WARNING: API 'variant.getPackageApplication()' is obsolete and has been replaced with
                    'variant.getPackageApplicationProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variant.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the
                    command line to display a stack trace.
                    WARNING: API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with
                    'variant.getExternalNativeBuildProviders()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variant.getExternalNativeBuildTasks(), use -Pandroid.debug.obsoleteApi=true on the
                    command line to display a stack trace.
                             *********************************************************
                    WARNING: This version of android_alarm_manager will break your Android build if it or its dependencies aren't
                    compatible with AndroidX.
                             See https://goo.gl/CP92wY for more information on the problem and how to fix it.
                             This warning prints for all Android build failures. The real root cause of the error may be unrelated.
                             *********************************************************

                    FAILURE: Build failed with an exception.

                    * Where:
                    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 245

                    * What went wrong:
                    A problem occurred configuring project ':logger_flutter'.
                    > Failed to notify project evaluation listener.
                       > Could not get unknown property 'android' for project ':logger_flutter' of type org.gradle.api.Project.
                       > Could not find method debugProvided() for arguments [file collection] on object of type
                       org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

                    * Try:
                    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
                    Run with --scan to get full insights.

                    * Get more help at https://help.gradle.org

                    BUILD FAILED in 2s
[  +14 ms] Resolving dependencies... (completed in 2,8s)
[  +13 ms] * Error running Gradle:
           ProcessException: Process "C:\Users\Erik\Projects\apps\hazizz_mobile\android\gradlew.bat" exited abnormally:

           > Configure project :app
           WARNING: API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variant.getAssemble(), use -Pandroid.debug.obsoleteApi=true on the command line to display
a stack
           trace.
           WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with
           'variantOutput.getProcessResourcesProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command
line to
           display a stack trace.
           WARNING: API 'variantOutput.getProcessManifest()' is obsolete and has been replaced with
           'variantOutput.getProcessManifestProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variantOutput.getProcessManifest(), use -Pandroid.debug.obsoleteApi=true on the command
line to
           display a stack trace.
           WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variant.getMergeResources(), use -Pandroid.debug.obsoleteApi=true on the command line to
display a
           stack trace.
           WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to
display a stack
           trace.
           WARNING: API 'variant.getPackageApplication()' is obsolete and has been replaced with
'variant.getPackageApplicationProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variant.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the command line
to display a
           stack trace.
           WARNING: API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with
           'variant.getExternalNativeBuildProviders()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variant.getExternalNativeBuildTasks(), use -Pandroid.debug.obsoleteApi=true on the command
line to
           display a stack trace.
                    *********************************************************
           WARNING: This version of android_alarm_manager will break your Android build if it or its dependencies aren't compatible
with
           AndroidX.
                    See https://goo.gl/CP92wY for more information on the problem and how to fix it.
                    This warning prints for all Android build failures. The real root cause of the error may be unrelated.
                    *********************************************************

           FAILURE: Build failed with an exception.

           * Where:
           Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 245

           * What went wrong:
           A problem occurred configuring project ':logger_flutter'.
           > Failed to notify project evaluation listener.
              > Could not get unknown property 'android' for project ':logger_flutter' of type org.gradle.api.Project.
              > Could not find method debugProvided() for arguments [file collection] on object of type
              org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

           * Try:
           Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with
--scan to
           get full insights.

           * Get more help at https://help.gradle.org

           BUILD FAILED in 2s
             Command: C:\Users\Erik\Projects\apps\hazizz_mobile\android\gradlew.bat app:properties

[  +31 ms] "flutter run" took 5 327ms.
[        ] "flutter run" took 5 327ms.
Please review your Gradle project setup in the android/ folder.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:24:3)
#1      _readGradleProject (package:flutter_tools/src/android/gradle.dart:154:7)
<asynchronous suspension>
#2      _gradleProject (package:flutter_tools/src/android/gradle.dart:107:34)
<asynchronous suspension>
#3      getGradleAppOut (package:flutter_tools/src/android/gradle.dart:101:29)
<asynchronous suspension>
#4      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:157:23)
<asynchronous suspension>
#5      ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart:47:32)
<asynchronous suspension>
#6      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:351:56)
<asynchronous suspension>
#7      HotRunner.run (package:flutter_tools/src/run_hot.dart:253:39)
<asynchronous suspension>
#8      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:461:37)
<asynchronous suspension>
#9      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:488:18)
#10     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#11     _rootRunUnary (dart:async/zone.dart:1132:38)
#12     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#13     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#15     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#16     Future._complete (dart:async/future_impl.dart:473:7)
#17     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#18     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)
#19     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
#20     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#21     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#22     _rootRunUnary (dart:async/zone.dart:1132:38)
#23     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#24     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#25     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#26     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#27     Future._complete (dart:async/future_impl.dart:473:7)
#28     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#29     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#30     _rootRun (dart:async/zone.dart:1124:13)
#31     _CustomZone.run (dart:async/zone.dart:1021:19)
#32     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#33     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#34     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#35     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#36     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

🤔 This is really strange. I'll investigate it...


feat: migrating linting/formatting exclusively to rust

This PR fixes issue #746. The following files were edited for migration of linting/formatting within the ansys/pyansys repo to Ruff:

pyproject.toml
.pre-commit-config.yaml
README.rst

I also trialed the current ruff configuration for pre-commit locally before submitting this pull request. The reviewer should check the re-formatted files to decide if we need to customize a couple of options prior to merging, or not.

One issue @jorgepiloto :
link.py and config.py fail due to these rules:

It's a good thing, already shows which files in our repo already violate each of the configured rules. I propose correcting those files to start making everything consistent moving forward. What do you think?

Yes, that's the right approach @moe-ad. This pull-request should contain both the new configuration and any changes required so that the CI/CD passes.

@jorgepiloto ready for another review.
FYI: I couldn't find an alternative for os.getenv in config.py so the os module is still used in that script. But for links.py, I was able to discard the os module completely in favour of pathlib.Path.


Page gap

Describe your suggested feature
I use a surface duo, and the lack of a page gap option causes the inner edge of the pages to disappear into the gap. Adding an option to set a gap of a configurable amount of pixels between the pages would entirely fix that.
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
[X] I have written a short but informative title.
[X] I have updated the app to the newest version Latest.
[X] I have checked through the app settings for my feature.
[X] I will fill out all of the requested information in this form.

I'm assuming you mean on the double page spread?

I'm assuming you mean on the double page spread?

Yes indeed

Oh yeah just to add, the gap in the duo hides 88 pixels that are still rendered in software, so i'd need a gap of 88 pixels between the pages to have them display correctly. Though a configurable value would still be better considering the duo 2 has a 66 pixels gap, and there may be more dual display phones in the future.

Will probably be on the backburner for a while.  Talked to Jay from J2K and he mentioned its bit tough to do, especially if its a legit dual page, and not one stitched together

Oh yeah if its a true dual page straight from the server, you'd need to render two single pages instead, thats kinda ass. Otherwise thanks for at least considering it, and have a good [insert timezone appropriate time].

2.10.11


current_user not usable in blueprints

I'm probably just being thick, but I've been trying to build user profile update forms and am unable to the do the usual current_user object stuff I've used in the past.
Is there something about factories and blueprints I'm missing? The current_user proxy is definitely there in the templates, I just can't use it anywhere else. For instance
in user/views.py
from flask.ext.login import (current_user, login_required)
...
form.populate_obj(current_user)
results in the login manager nulling the current_user object. I can access properties (user_id, for instance).

Ah, found a working solution:
form = UpdateForm(request.form, obj=current_user,csrf_enabled=False
works. Why form.populate invalidates the current_user I can't guess.


What's new sheet? Changelog?

Store in CloudStorageSync
Store value when pressing button

https://github.com/SvenTiigi/WhatsNewKit/blob/main/Sources/View/WhatsNewView.swift

Closed via e61621f2707a46702de16f66a3950f893c7e0801.


Add Wireframes

This PR solves issue #26
Created the UI for:

Getting Started

Add Cycle Length

Add Last Period Date

Congratulations on your First successful PR.


Feedback

Hey,
since I can't get access to the TG group and I'm too lazy to fix the issues myself, I'm writing here a couple of disjoint points I found so far while glossing over the book.

In felt type, I find the latex notation used to define P quite strange.
In boolean type: "Booleans are one byte in size." IMO that statement is not true. Did you want to say one bit? But then it's felts all the way down, so not sure if that's 100% correct either.
In short string, you should mention that the max length of a short string is 31 chars and also the reason why. It's valuable to know.
A lot of the code snippets are formatted in a weird way. Consider running cairo-format (which is, coincidentally, mentioned in the appendix) on all of them, so people get a habit of creating properly formatted code.

In any case, great work overall, you absolute chads!

Thanks a lot for the feedbacks 🔥


Adjust check in sys to fix browserify

Fixes #4359

pinging @jbrantly as this change partially rolls back https://github.com/Microsoft/TypeScript/pull/4308

:+1:

:+1:

I think that undoing #4308 is likely the wrong way to do it. That corrected behavior where browserify was "covering up" the issue (by shimming fs). I can see two ways of going about it.

Keep the current return undefined behavior for ts.sys in the case of a browser but reduce the test harness's dependency on it. For instance, the current error is because the CScript and Node executing environments currently always run and look like this:
export let readFile: typeof IO.readFile = ts.sys.readFile;
export let writeFile: typeof IO.writeFile = ts.sys.writeFile;

but if you added some protection:
```typescript
let sys = ts.sys || {};
export let readFile: typeof IO.readFile = ts.sys.readFile;
export let writeFile: typeof IO.writeFile = ts.sys.writeFile;
```

similar to the way you do the same for fso for CScript then that issue goes away. However, there are numerous other dependencies on ts.sys like useCaseSensitiveFileNames and newLine and it would probably be a pretty large undertaking to fix all occurrences. It's not clear to me if TypeScript, in general, is designed to run with ts.sys undefined.

Instead of returning undefined, go ahead and shim ts.sys in a minimal way that works for the browser. I did something like this:return {
    args: [],
    newLine: "\n",
    useCaseSensitiveFileNames: false,
    write: null,
    readFile: null,
    writeFile: null,
    resolvePath: null,
    fileExists: null,
    directoryExists: null,
    createDirectory: null,
    getExecutingFilePath: null,
    getCurrentDirectory: () => "/",
    readDirectory: null,
    exit: null
};

and that seemed to allow me to run the fourslash tests. This is roughly equivalent to allowing browserify to shim stuff.

closing in favor of #4394


Running audio-to-audio with interpolate on M1 mac error: Expected a 'mps' device type for generator but found 'cpu'

Running the audio-to-audio in streamlit on a M1 mac mps device works great, but swithcing to interpolate between two prompts returns an error (works if I switch to cpu but is much slower of course). Anyone know how to fix for this? Seems strange it works flawlessly without interpolation...
File "riffusion/riffusion/riffusion_pipeline.py", line 371, in interpolate_img2img
noise_a = torch.randn(
RuntimeError: Expected a 'mps' device type for generator but found 'cpu'

Also make sure to change line 259 otherwise inference will still be done on CPU.


SASS-1736 Adding feature switch for NRS Submission

Description
Adding feature switch for NRS Submission to income-tax-employment-frontend
Add a link to the relevant story in Jira
SASS-1736
Checklist PR Reviewer
Before Reviewing

[x]  Have you pulled the branch down?
[x]  Have you assigned yourself to the PR?
[x]  Have you moved the task to “in review” on JIRA?
[x]  Have you checked to ensure all dependencies are up to date?
[x]  Have you checked to ensure its been rebased against the current version of main?

Whilst Reviewing

[x]  Have you run the tests?
[ ]  Have you run the journey tests?
[x]  Have you looked at the JIRA story to make sure all Acceptance Criteria has been met?

After Reviewing

[ ]  Have you checked for merge conflicts or any changes in the current main that may affect the current pull request? i.e. does it need another rebase?
[ ]  Have you checked to make sure there are no builds in the pipeline before you merge?
[ ]  Have you moved the task to “in pipeline” on Jira?

[x]  Have you rebased against the current version of main?
[x]  Have you checked code coverage isn’t lower than previously?

After PRs been raised

[ ]  Have you checked the PR Builder passes?

branch has been rebased