[action] Consolidate git_branch action logic into git_helper.rb to ensure consistent results

Fixes: #15034

Checklist

[x] I've run bundle exec rspec from the root directory to see all new and existing tests pass
[x] I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary.

Motivation and Context

As reported in #15034, in certain scenarios the git_branch() Action would return different results than the git_helper.rb method with the same name Actions.git_branch.  This was discovered while trouble shooting issues with the ensure_git_branch() action.  Instead of maintaining 2 copies of the logic to retrieve the current branch, we should consolidate it into the appropriate helper class.
Description

I simply copied the shared values and logic from fastlane/lib/fastlane/actions/git_branch.rb into fastlane/lib/fastlane/helper/git_helper.rb and updated the origin to call the updated internal method.

I signed it!

I'll work on resolving the build errors

Let me know if you have any problem with that, and I can help you look into how your changes influence the failing tests.
Ping @mollyIV regarding the moving of the module SharedValues - this probably doesn't work and should stay where it currently is I guess?
@arri-cc Do you know why we need git_branch in the helper anyway? Can we maybe fully move this to the action?

@janpio it appears moving all of the logic and shared values from the git_branch action to the git_helper.rb class has broken the tests, while also altering the expected behavior as the convention for the helper class is to return nil.  tbh being new to this project I'm not sure why we have actions for git and a git helper class.  It would've been easier to just have ensure_git_branch call the git_branch action instead of the Actions.git_branch helper method.
When I run bundle exec rake test_all there are failed tests related to github PRs and slack, I'm not sure what to do about those as they seem unrelated when i look at the specs.
Failures:

  1) Fastlane Fastlane::FastFile create_pull_request successful correctly submits to github
     Failure/Error:
       result = Fastlane::FastFile.new.parse("
         lane :test do
           create_pull_request(
             api_token: '123456789',
             title: 'test PR',
             repo: 'fastlane/fastlane',
           )
         end
       ").runner.execute(:test)

     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: POST https://api.github.com/repos/fastlane/fastlane/pulls with body '{"title":"test PR","head":null,"base":"master"}' with headers {'Accept'=>'*/*', 'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'}

       You can stub this request with the following snippet:

       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":null,\"base\":\"master\"}",
              :headers => {'Accept'=>'*/*', 'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'}).
         to_return(:status => 200, :body => "", :headers => {})

       registered request stubs:

       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/issues/1347/assignees").
         with(:body => "{\"assignees\":[\"octocat\",\"hubot\",\"other_user\"]}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:patch, "https://api.github.com/repos/fastlane/fastlane/issues/1347").
         with(:body => "{\"labels\":[\"fastlane\",\"is\",\"awesome\"]}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":\"git rev-parse --abbrev-ref HEAD\",\"base\":\"master\"}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:any, "/developer.apple.com\/services-account\/QH65B2\/account\/ios\/identifiers\/.*OMC(s){0,1}\.action/")
       stub_request(:any, "/developer.apple.com\/services-account\/QH65B2\/account\/auth\/key/")
       stub_request(:any, "/appstoreconnect.apple.com\/testflight\/v2/")

       ============================================================
     # /Library/Ruby/Gems/2.3.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/excon_adapter.rb:68:in `handle_request'
     # /Library/Ruby/Gems/2.3.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/excon_adapter.rb:40:in `block in add_excon_stub'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/mock.rb:38:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/instrumentor.rb:34:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/idempotent.rb:19:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/base.rb:22:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/base.rb:22:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/connection.rb:270:in `request'
     # ./fastlane/lib/fastlane/actions/github_api.rb:250:in `call_endpoint'
     # ./fastlane/lib/fastlane/actions/github_api.rb:21:in `run'
     # ./fastlane/lib/fastlane/actions/create_pull_request.rb:18:in `run'
     # ./fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
     # ./fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
     # ./fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
     # ./fastlane/lib/fastlane/runner.rb:227:in `chdir'
     # ./fastlane/lib/fastlane/runner.rb:227:in `execute_action'
     # ./fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
     # ./fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
     # (eval):3:in `block in parsing_binding'
     # ./fastlane/lib/fastlane/lane.rb:33:in `call'
     # ./fastlane/lib/fastlane/runner.rb:49:in `block in execute'
     # ./fastlane/lib/fastlane/runner.rb:45:in `chdir'
     # ./fastlane/lib/fastlane/runner.rb:45:in `execute'
     # ./fastlane/spec/actions_specs/create_pull_request_spec.rb:49:in `block (5 levels) in <top (required)>'

  2) Fastlane Fastlane::FastFile create_pull_request successful correctly submits to github with labels
     Failure/Error:
       result = Fastlane::FastFile.new.parse("
         lane :test do
           create_pull_request(
             api_token: '123456789',
             title: 'test PR',
             repo: 'fastlane/fastlane',
             labels: ['fastlane', 'is', 'awesome']
           )
         end
       ").runner.execute(:test)

     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: POST https://api.github.com/repos/fastlane/fastlane/pulls with body '{"title":"test PR","head":null,"base":"master"}' with headers {'Accept'=>'*/*', 'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'}

       You can stub this request with the following snippet:

       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":null,\"base\":\"master\"}",
              :headers => {'Accept'=>'*/*', 'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'}).
         to_return(:status => 200, :body => "", :headers => {})

       registered request stubs:

       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/issues/1347/assignees").
         with(:body => "{\"assignees\":[\"octocat\",\"hubot\",\"other_user\"]}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:patch, "https://api.github.com/repos/fastlane/fastlane/issues/1347").
         with(:body => "{\"labels\":[\"fastlane\",\"is\",\"awesome\"]}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":\"git rev-parse --abbrev-ref HEAD\",\"base\":\"master\"}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:any, "/developer.apple.com\/services-account\/QH65B2\/account\/ios\/identifiers\/.*OMC(s){0,1}\.action/")
       stub_request(:any, "/developer.apple.com\/services-account\/QH65B2\/account\/auth\/key/")
       stub_request(:any, "/appstoreconnect.apple.com\/testflight\/v2/")

       ============================================================
     # /Library/Ruby/Gems/2.3.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/excon_adapter.rb:68:in `handle_request'
     # /Library/Ruby/Gems/2.3.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/excon_adapter.rb:40:in `block in add_excon_stub'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/mock.rb:38:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/instrumentor.rb:34:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/idempotent.rb:19:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/base.rb:22:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/base.rb:22:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/connection.rb:270:in `request'
     # ./fastlane/lib/fastlane/actions/github_api.rb:250:in `call_endpoint'
     # ./fastlane/lib/fastlane/actions/github_api.rb:21:in `run'
     # ./fastlane/lib/fastlane/actions/create_pull_request.rb:18:in `run'
     # ./fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
     # ./fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
     # ./fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
     # ./fastlane/lib/fastlane/runner.rb:227:in `chdir'
     # ./fastlane/lib/fastlane/runner.rb:227:in `execute_action'
     # ./fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
     # ./fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
     # (eval):3:in `block in parsing_binding'
     # ./fastlane/lib/fastlane/lane.rb:33:in `call'
     # ./fastlane/lib/fastlane/runner.rb:49:in `block in execute'
     # ./fastlane/lib/fastlane/runner.rb:45:in `chdir'
     # ./fastlane/lib/fastlane/runner.rb:45:in `execute'
     # ./fastlane/spec/actions_specs/create_pull_request_spec.rb:64:in `block (5 levels) in <top (required)>'

  3) Fastlane Fastlane::FastFile create_pull_request successful correctly submits to github with assignees
     Failure/Error:
       result = Fastlane::FastFile.new.parse("
         lane :test do
           create_pull_request(
             api_token: '123456789',
             title: 'test PR',
             repo: 'fastlane/fastlane',
             assignees: ['octocat','hubot','other_user']
           )
         end
       ").runner.execute(:test)

     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: POST https://api.github.com/repos/fastlane/fastlane/pulls with body '{"title":"test PR","head":null,"base":"master"}' with headers {'Accept'=>'*/*', 'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'}

       You can stub this request with the following snippet:

       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":null,\"base\":\"master\"}",
              :headers => {'Accept'=>'*/*', 'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'}).
         to_return(:status => 200, :body => "", :headers => {})

       registered request stubs:

       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/issues/1347/assignees").
         with(:body => "{\"assignees\":[\"octocat\",\"hubot\",\"other_user\"]}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:patch, "https://api.github.com/repos/fastlane/fastlane/issues/1347").
         with(:body => "{\"labels\":[\"fastlane\",\"is\",\"awesome\"]}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":\"git rev-parse --abbrev-ref HEAD\",\"base\":\"master\"}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})
       stub_request(:any, "/developer.apple.com\/services-account\/QH65B2\/account\/ios\/identifiers\/.*OMC(s){0,1}\.action/")
       stub_request(:any, "/developer.apple.com\/services-account\/QH65B2\/account\/auth\/key/")
       stub_request(:any, "/appstoreconnect.apple.com\/testflight\/v2/")

       ============================================================
     # /Library/Ruby/Gems/2.3.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/excon_adapter.rb:68:in `handle_request'
     # /Library/Ruby/Gems/2.3.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/excon_adapter.rb:40:in `block in add_excon_stub'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/mock.rb:38:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/instrumentor.rb:34:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/idempotent.rb:19:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/base.rb:22:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/middlewares/base.rb:22:in `request_call'
     # /Library/Ruby/Gems/2.3.0/gems/excon-0.64.0/lib/excon/connection.rb:270:in `request'
     # ./fastlane/lib/fastlane/actions/github_api.rb:250:in `call_endpoint'
     # ./fastlane/lib/fastlane/actions/github_api.rb:21:in `run'
     # ./fastlane/lib/fastlane/actions/create_pull_request.rb:18:in `run'
     # ./fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
     # ./fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
     # ./fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
     # ./fastlane/lib/fastlane/runner.rb:227:in `chdir'
     # ./fastlane/lib/fastlane/runner.rb:227:in `execute_action'
     # ./fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
     # ./fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
     # (eval):3:in `block in parsing_binding'
     # ./fastlane/lib/fastlane/lane.rb:33:in `call'
     # ./fastlane/lib/fastlane/runner.rb:49:in `block in execute'
     # ./fastlane/lib/fastlane/runner.rb:45:in `chdir'
     # ./fastlane/lib/fastlane/runner.rb:45:in `execute'
     # ./fastlane/spec/actions_specs/create_pull_request_spec.rb:79:in `block (5 levels) in <top (required)>'

  4) Fastlane::Actions::GitBranchAction with no CI set ENV values gets the value from Git directly
     Failure/Error: expect(result).to eq("branch-name")

       expected: "branch-name"
            got: nil

       (compared using ==)
     # ./fastlane/spec/actions_specs/git_branch_spec.rb:26:in `block (3 levels) in <top (required)>'

  5) Fastlane Fastlane::FastFile Slack Action parses default_payloads without adding extra fields for git
     Failure/Error: expect(fields.count).to eq(2)

       expected: 2
            got: 1

       (compared using ==)
     # ./fastlane/spec/actions_specs/slack_spec.rb:163:in `block (4 levels) in <top (required)>'

Finished in 4 minutes 10.3 seconds (files took 3.6 seconds to load)
5861 examples, 5 failures

Failed examples:

rspec ./fastlane/spec/actions_specs/create_pull_request_spec.rb:40 # Fastlane Fastlane::FastFile create_pull_request successful correctly submits to github
rspec ./fastlane/spec/actions_specs/create_pull_request_spec.rb:54 # Fastlane Fastlane::FastFile create_pull_request successful correctly submits to github with labels
rspec ./fastlane/spec/actions_specs/create_pull_request_spec.rb:69 # Fastlane Fastlane::FastFile create_pull_request successful correctly submits to github with assignees
rspec ./fastlane/spec/actions_specs/git_branch_spec.rb:17 # Fastlane::Actions::GitBranchAction with no CI set ENV values gets the value from Git directly
rspec ./fastlane/spec/actions_specs/slack_spec.rb:146 # Fastlane Fastlane::FastFile Slack Action parses default_payloads without adding extra fields for git

rake aborted!
Command failed with status (1): [rspec --pattern ./**/*_spec.rb --format pr...]
/Data/GitHub/fastlane/Rakefile:19:in `block in <top (required)>'
/Library/Ruby/Gems/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `load'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:28:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:463:in `exec'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:30:in `block in <top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => test_all
(See full trace by running task with --trace)

I think i'll await some advice/guidance before I make anymore changes.  I'm not sure what the rules are as it relates to dependencies between actions.

Re the failing tests: I think this is internally using git_branch, which is returning null now instead of the executed command which is normally returned when using sh during tests:
       stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":null,\"base\":\"master\"}",
              :headers => {'Accept'=>'*/*', 'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'}).
         to_return(:status => 200, :body => "", :headers => {})

vs.
  stub_request(:post, "https://api.github.com/repos/fastlane/fastlane/pulls").
         with(:body => "{\"title\":\"test PR\",\"head\":\"git rev-parse --abbrev-ref HEAD\",\"base\":\"master\"}",
              :headers => {'Authorization'=>'Basic MTIzNDU2Nzg5', 'Host'=>'api.github.com:443', 'User-Agent'=>'fastlane-github_api'})

Note git rev-parse --abbrev-ref HEAD in there.
If you change      return ENV.fetch(env_name.to_s) {git symbolic-ref HEAD --short 2>/dev/null.strip } to       return ENV.fetch(env_name.to_s) { Actions.sh("git symbolic-ref HEAD --short 2>/dev/null", log: false).chomp this would probably make sure that the command is returned - although it still might be a different one.
Do git rev-parse --abbrev-ref HEAD and git symbolic-ref HEAD --short 2>/dev/null the same thing?

I'm not sure what the rules are as it relates to dependencies between actions.

Same here - this is probably also the reason for the helper. If they all use the helper, they are not interconnected but use some common code. We have this for some other bits as well I guess.

@janpio ok I'll take a closer look tonight, but if the right approach is to enhance the helper then the git_branch spec needs to be rewritten

Do git rev-parse --abbrev-ref HEAD and git symbolic-ref HEAD --short 2>/dev/null the same thing?

The latter resolves to HEAD if no named branch is available instead of throwing an error.  I should use it instead.  The behavior is what exposed the differences.  The expanded set of environment variable names in the helper should resolve the original problem.

@joshdholtz Some guidance on the architecture of action vs. helper here please (we talked about this in other contexts recently).

As a workaround to this issue, instead of using the ensure_git_branch action, which will not get the correct branch name on non-jenkins CI servers, I just do this:
branch = git_branch()
# alternate method of enforcing master branch
unless branch =~ /(?i)^(chore|feat|fix|refactor)\/(\w+-\d{2,3})(-\w+)*(?-i)/
  UI.user_error("branch does not match spec, current branch #{branch}")
end

Would like to know if I should continue down the path of consolidating use of the additional environment variables into the git helper or do something else.

@googlebot I fixed it.


Update Roslyn version and tools to match .NET 5 Preview8

Not sure whether we would want the included build tools to match the .NET SDK tools or the latest VS preview tools.

Versions taken from https://github.com/dotnet/sdk/blob/release/5.0.1xx-preview8/eng/Versions.props, although it can be a moving target.

I will need to update the SDK to a published version.

Going to revert changing the SDK we use in out tests. Will perform manual validation of this build with NET 5 preview. We can update the version after it is released instead of relying on a nightly.

Had to revert to an earlier build of Roslyn. These tests caught a regression in RuntimeMetadataReferenceResolver on Mono platforms.

good test then 🥁


Use mikker/passwordless

Do not merge until we decide which library to use. This is just one option. Ready to review and merge.
Implements mikker/passwordless.

Note that schema.rb includes a change to the notes table. That's just because I ran rails db:drop, rails db:create, and rails db:migrate after merging the latest master. I think the previous work on notes didn't include that merge is all, but it looks correct according to the latest migrations.


Extend constant pools to support f32/f64 too

As of today, there's a concept of constant pools in Cranelift, that works for SIMD 128-bits values. I'd like to extend it to work also for float32 and float64 values, to avoid the need for the bitcast, which I'm sure is pretty terrible performance-wise (and doesn't help register allocation either, since it requires one GPR register with a very short lifetime).
My current plan is the following:

the uimm128 immediate could be reused to store any kind of constants, since it contains an ir::Constant (handle to a vector of bytes of any size); it would be renamed to constant.
a new instruction load_from_constant_pool would be introduced, taking an input constant value.
vconst right now can be inserted in the constant pool only from the parser. It'd be nice if this were done during codegen itself. We could recycle "expand_fconst" to do this and legalize vconst / f32const / f64const into a load_from_constant_pool with the right Constant.
we switch the encodings of vconst to work for load_from_constant_pool on the same types; and we add encodings for f32/f64.

Aligning the constant pool values would be nice to have but not required at this point; it would just be a performance fault on x86.
@abrown Does it sound reasonable to you?

The new backend framework supports this, right?

Yes, the new x64 backend supports constant pools, and uses them at least for 128-bit vector values. It looks like right now we load literal values into integer registers and then move to XMM registers to load 32/64-bit floats, but we could pretty easily change that (using the XmmLoadConst VCode instruction) if we wanted to.
I think we can leave this open to track an evaluation of whether this makes sense to do, though I suspect it's not too important for most code's performance; the exception would be if we have a lot of duplicated constants and dedup'ing gives a meaningful reduction in code size / icache misses.


[Bug]: Groq responses are dicts when strs are expected

Describe the bug
Using Groq in a ConversableAgent is not quite working. The responses from Groq models are returned as dicts, while many parts of the framework expect strs only. By itself, generate_reply still works (assuming you write code to handle this case), but for something like initiate_chats you run into issues (or even initiate_chat singular, which needs its termination condition to handle the different structure).
It seems like the expected behavior is to not require significant other changes if you switch which LLM you're using.
According to msze on Discord:

When the OpenAI response is returned, if there are no tool calls in the response it will just return the message content string (choice.message.content)
For Groq, it returns the whole chat message object and then dumps it to a dictionary. So Groq does not have a different return whether or not tools are called.

Steps to reproduce
Example code to demonstrate issue:
from autogen import ConversableAgent
import os

groq_api_key = os.environ.get("GROQ_API_KEY") or "YOUR_GROQ_API_KEY"

os.environ["GROQ_API_KEY"] = groq_api_key

llm_config_groq = {
    "api_key": groq_api_key,
    "api_type": "groq",
    "model": "llama3-70b-8192",
}

openai_api_key = os.environ.get("OPENAI_API_KEY") or "YOUR_OPENAI_API_KEY"

os.environ["OPENAI_API_KEY"] = openai_api_key

llm_config_openai = {
    "api_key":  openai_api_key,
    "api_type": "openai",
    "model": "gpt-3.5-turbo",
}

agent_groq = ConversableAgent(
    name="chatbot_groq",
    llm_config=llm_config_groq,
    human_input_mode="NEVER"
)

agent_openai = ConversableAgent(
    name="chatbot_openai",
    llm_config=llm_config_openai,
    human_input_mode="NEVER"
)

# Get the agents' responses
response_groq = agent_groq.generate_reply(messages=[{"role": "user", "content": "Hello!"}])
response_openai = agent_openai.generate_reply(messages=[{"role": "user", "content": "Hello!"}])

print("Groq:")
print(response_groq)
print(type(response_groq))
print("--------------------")
print("OpenAI:")
print(response_openai)
print(type(response_openai))

This will result in:
Groq:
{'content': "Hello! It's nice to meet you. I'm here to help with any questions, tasks, or topics you'd like to discuss. How can I assist you today? Do you have something specific on your mind, or would you like some suggestions on where to start?", 'role': 'assistant', 'function_call': None, 'tool_calls': None}
<class 'dict'>
--------------------
OpenAI:
Hello! How can I assist you today?
<class 'str'>

Model Used
Any Groq model
Expected Behavior
The Groq models should return outputs that are compatible with the rest of AutoGen, whether the Groq models return strings now, or the other parts expecting strs are modified to handle a dict with a content field.
Screenshots and logs
No response
Additional Information
AutoGen Version: 0.2.34
Python Version: 3.12

Thanks @gsteinLTU, for clarity on what is needed - the response should just be a string if there are no tools, is that right? I think we should also make sure the response is the same if tools are returned.

I think that would be right, it turns out initiate_chats is handling it correctly in the newest version, so this might not be so necessary (it's just a minor annoyance).

generate_reply

Thanks for noting that initiate_chat(s) are performing as expected now, do you use generate_reply? If so, we can continue to look into changing it for that for consistency.

Unfortunately, we decided not to go with autogen for our project, but personally, I'm not 100% sure what makes sense.
The best solution might be simply to make the documentation be more descriptive about the return types (it briefly explains when a None is returned, but not when str or dict are). IMO it should be consistent between models in either direction, likely making both models output a str when there's only content in the dict so it's consistent with OpenAI's models.

Thanks for the update @gsteinLTU, agreed that for consistency it should align with the string return in that case. For further changes to the client classes I'll make a note to update the return type as well. Appreciated and I'll close this issue for now (feel free to open again, if needed).


Remove unused require and make the plugin compatible with kong 1.0.x

Dear author,
It seems that require "kong.tools.responses" in src/handler.lua is useless. And kong.tools.responses is removed in kong 1.0.x (https://github.com/Kong/kong/blob/master/CHANGELOG.md#plugins-3).
So I just deleted that useless require statement, and added some test cases, and made the plugin compatible with kong 1.0.x.
@stepbeekio  @slimm609

Close due to no response.


Cut down .github/codeowners

Remove DerekRoberts (me!) and SLDonnelly (Sabina) from .github/codeowners, since we're no longer necessary.  Good job team.  :)
We'll still have admin rights on the repo and can help out as necessary.

Don't merge this yet, i gotta merge #333 first 🙏, the actions have been running for 15min +


added inclusionsInfo to onRefresh config-object

To be able to construct a concise textual representation of the filters which are in effect, with this addition you can choose whether to show the exclusions or inclusions  in the onRefresh handler. Typically you will want to show the list with the fewest values.
Maybe this is of use to some people, or is there already a way to achieve the same?
Anyway, thank you for a brilliant piece of work!

This is a neat addition, thank you!


[Examples] COVID Vaccine dashboard contains query errors

In a clean master or latest branch, with docker-compose up the COVID Vaccine dashboard contains many errors like this:
superset_app             | Traceback (most recent call last):
superset_app             |   File "/app/superset/connectors/sqla/models.py", line 1320, in query
superset_app             |     df = self.database.get_df(sql, self.schema, mutator)
superset_app             |   File "/app/superset/models/core.py", line 390, in get_df
superset_app             |     self.db_engine_spec.execute(cursor, sqls[-1])
superset_app             |   File "/app/superset/db_engine_specs/base.py", line 909, in execute
superset_app             |     cursor.execute(query)
superset_app             | psycopg2.errors.UndefinedColumn: column "stage_of_development" does not exist
superset_app             | LINE 2:            WHEN Stage_of_Development = 'Pre-clinical' THEN '...
superset_app             |                         ^
superset_app             | HINT:  Perhaps you meant to reference the column "covid_vaccines.Stage_of_Development".

This is expected with column names that are not all lowercase in Postgres, unless they are wrapped in double quotes
Expected results
The example dashboards should work on a clean installation
Actual results
The example COVID Vaccine dashboard contains many errors. The error in one of the charts is also displayed different than the others, but the problem seems to be the same in the database.
Screenshots

How to reproduce the bug
git clone git@github.com:apache/superset.git
cd superset
docker-compose up

then login and open the dashboard
Environment
(please complete the following information):

superset version: Superset 0.999.0dev
python version: Python 3.7.9
node.js version: v12.20.1
Docker version 20.10.2, build 2291f61
docker-compose version 1.27.4, build 40524192

Checklist
Make sure to follow these steps before submitting your issue - thank you!

[X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[X] I have reproduced the issue with at least the latest released version of superset.
[X] I have checked the issue tracker for the same issue and I haven't found one similar.

thanks for reporting! multiple users have reported, mistaking it as a functional issues.
I consider this as a 1.0 release blocker. hopefully we can address is soon.
@eschutho

thanks for reporting! multiple users have reported, mistaking it as a functional issues.
I consider this as a 1.0 release blocker. hopefully we can address is soon.
@eschutho

Thanks @junlincc for flagging. We're looking at this now.

Thanks @junlincc for flagging. We're looking at this now.

Working on it

Working on it

manually tested, confirmed issues is resolved in master, we will have it in for 1.0 release. thanks for the quick fix! @betodealmeida @eschutho

manually tested, confirmed issues is resolved in master, we will have it in for 1.0 release. thanks for the quick fix! @betodealmeida @eschutho


Updates The Deathnettle Nerf

About the PR

Nothing was changed besides adding the component (pierceArmor: false)
Why / Balance

Despite me wanting to remove armor piercing entirely I ended up making it so that it would pierce armor either way, this fixes that
Technical details

Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog
 :cl:

tweak: Deathnettles no longer penetrate hardsuit armor

Ubuntu failed... That's weird.

I'm not sure that the test failure is related to this PR

I don't agree with this addition whilst my PR exists to keep the Death Nettle armor piercing.


Server RPC-Documentation

I'm currently implementing a client for the server. All I have is the zksync.js-client implementation (which does not contain a lot of comments and a lot of any definitions.)
Maybe I missed it, but I am looking for a detailed documentation for those rpc-endpoints :
https://github.com/matter-labs/zksync/blob/master/core/server/src/api_server/rpc_server.rs#L276

We don't have detailed doc for this methods, but maybe js/zksync.js/src/tranport.ts can help. We use JSONRPC for our protocol.
For example, this code means - call "account_info" method using jsonrpc protocol and use address as a parameter. (this is a client code for the method that you linked)
    async getState(address: Address): Promise<AccountState> {
        return await this.transport.request("account_info", [address]);
    }

NOTE: we are going to eventually move to more convenient REST api from JSONRPC.

Thanks, Yes I looked at transport.ts, but of course here you see how those endpoints are used, so I'm currently digging through the server code to better understand the expected behavior, because when I sent a transfer to the server (tx_submit), I only got an errror-message that some parameter was formated wrong, So currently I'm trying to understand how those are supposed to be formated.

API is now documented and available at https://zksync.io/api/


Unpin @sentry/vue dependency

When using Sentry in an Ionic App built with Vue, the @sentry/vue dependency is pinned to 7.93.0, which does not allow new features and fixes. Would it be possible to unpin it ? Like ^7.0.0 ?
I know there have been prior discussion here and here, but the issues have been closed automatically. I wanted to bring back the subject as it will become (I think) especially important with the update to Capacitor 6.
Thank you!

Hi and thank you for opening this issue!
Due to the complexity of the hybrid SDKs we have opted for keeping the peerDependency fixed.
We will soon bump the VUE SDK to 7.114.0 so hopefully users will have a better time with the Capacitor SDK and Capacitor 6.

I am closing this as it's not planned to unpin the vue dependency.


Tutorial

The context.json on the "setup" page is missing the network configuration

It is not needed anymore ;)
https://github.com/F-Secure/see/pull/39/commits/bdc1d0c861811e852d032d06c9ed064ff6094af8


Finda grave mismatches

The finda_grave directory should probably be within the 1_mismatch_generations directory.

The finda_grave directory should probably be within the 1_mismatch_generations directory.

Fixed that in 47b53c654ef9d10cdfedad60b9393aa9546ec0b1

Quick question here from the first entry: what's the difference between P965 and P119? For Q505270 we're saying there's a mismatch where Section M, Lot 292, Range 5 doesn't exist on P965, but this value from Find a Grave is on P119.

Just want to make sure that if mismatches like this should be ignored, that we should check this again if possible as this'll be a lot of values that people don't need to change :thinking: Would be curious why there are two props :)
Thanks as always for the great work, @funblaster22! Hopefully we can get these in soon :blush:


Default message/action when subcommand is invalid?

I'd like to be able to define a default action/message that would be run when a matching subcommand doesn't exist. Currently, users get a cryptic "No help topic for 'command'":
➜  ~  foo bar
No help topic for 'bar'

Anytime a user uses an invalid subcommand, I'd like to instead print a message and then the usage text. Is this possible today? If not, I'm happy to dive in and make a change if I could get some guidance.

Found the super handy CommandNotFound function:
	app.CommandNotFound = func(c *cli.Context, command string) {
		log.Err("No matching command '%s'", command)
		cli.ShowAppHelp(c)
		log.Die("")
	}

(where log is a helper in our app)


Add supported aggregations to the buildInfo output

What should be done?
We should return a sorted list of supported aggregation pipeline stages in the buildInfo output:
{
	"compatibility": {
		"aggregationStages": [
			"$collStats",
			"$count",
			// ...
		]
	},
	// ...
}

Let's either export internal/handlers/common/aggregations/stages.stages variable or add a function to return a sort list of stages to that package. Then, let's use that variable/function in MsgBuildInfo. And add/update integration tests.
Where?

https://github.com/FerretDB/FerretDB/blob/1d81e46de0ee0712a5dcb1694a2f65ea82f35976/internal/handlers/common/aggregations/stages/stages.go#L29-L30
https://github.com/FerretDB/FerretDB/blob/main/internal/handlers/common/msg_buildinfo.go
https://github.com/FerretDB/FerretDB/blob/1d81e46de0ee0712a5dcb1694a2f65ea82f35976/integration/commands_administration_test.go#L545

Definition of Done

all handlers updated;
integration/compatibility tests added/updated;
spot refactorings done.

@AlekSi Can I work on this one?

@kropidlowsky Sure, thank you!

@kropidlowsky any news?


chore: adds Nix support for static libraries and plugins

Adds Nix rules to support providing/using static library and plugin dependencies.
Example uses: flake.nix files in
https://github.com/zygi/leannixstatic1
https://github.com/zygi/leannixstatic2
One interesting decision here is that to build shared libs we need objects compiled with -fPIC. Some quick googling suggests that with clang, on x86_64, the overhead added by -fPIC is negligible, so for simplicity I changed the Nix setup to compile everything with -fPIC. If desired, I'm happy to change this PR to only add -fPIC when building plugins.

Ideally we should have a test case here, but it's not clear to me how to best do that given https://github.com/NixOS/nix/issues/4265

Oops, looks like rebasing on your recent change broke something here. Looking.

Thanks!


incurred_incidental#edit cannot edit documents

does not populate documents fields therefore there is no way to remove them from the application.
Should research the incurred_incidental model accepts_nested_attributes_for :documents

This is more of a minor bug than a major one.


Issues with :numref: and numfig

I'm trying to have figures in my RTD project referenced by number. To do this I use:
:numref:`my-image`

as stated in the numref description (where mi-image is the image's label).
To have the images referenced by number I set:
numfig = True

in the conf.py file, as stated in the numfig description. Here it also says that "For now, it works only with the HTML builder" which I'm not really sure what it means (what will happen with the PDF then? not compile? compile with this setting turned off?)
After doing this, I get in the local build the following:

Notice that the figure is labeled 5.1 and linked.
This is what I get after pushing the changes to RTD:

see that now the figure is labeled 1 and the link is lost.
If I check the PDF build I get a notice of successful build with the following errors showing in the compilation:
Build Standard Error

/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:36: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:62: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:67: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:87: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/likelihood.rst:11: ERROR: Unknown interpreted text role "numref".
This is makeindex, version 2.15 [TeX Live 2013] (kpathsea + Thai support).
Scanning style file ./python.ist......done (6 attributes redefined, 0 ignored).
Scanning input file ASteCA.idx...done (0 entries accepted, 0 rejected).
Nothing written in ASteCA.ind.
Transcript written in ASteCA.ilg.

which makes the PDF look like:

which I guess is related to the "For now, it works only with the HTML builder" notice in numfig.
Why are the local build and the live version different (local has link to figure, live does not)? And, is there a way to at least disable the numfig option when compiling the PDF or some fix to make both the HTML and the PDF look reasonably well?

Now numref is being completely ignored by RTD, not even the HTML site is picking it up.
If I compile locally, everything works fine (using Sphinx v1.3.1), but after pushing the changes to my Github repo RTD shoes in the build:
Build Standard Error

html
-----

/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:36: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:63: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:68: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/center.rst:88: ERROR: Unknown interpreted text role "numref".
/var/build/user_builds/asteca/checkouts/latest/docs/likelihood.rst:11: ERROR: Unknown interpreted text role "numref".

even though it reports a "successful build".

Not sure if I was messing things up or if something got fixed on that end, but this is working fine now. Referencing using numfig works both in the HTML and the PDF version.
Closing.


Memory leaks in pthread_attr_setaffinity_np

Valgrind reports memory leaks in pthread_attr_setaffinity_np. I'm not exactly sure what the problem is. But, could this explain why the test suite "gets stuck", as repeated allocations/runs would make the simulation slower and slower? Your local machine probably has more memory than the average Travis node, so Travis should run into problems earlier.
Tested with the "Hello World" project with NO_CUDA:
$ valgrind --leak-check=full --log-file="log.out" ./hello_world

Here's an example and the summary of the report:
==21728== 1,280,000 bytes in 10,000 blocks are definitely lost in loss record 16 of 16
==21728==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21728==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21728==    by 0x5053855: pthread_attr_setaffinity_np@@GLIBC_2.3.4 (pthread_attr_setaffinity.c:47)
==21728==    by 0x427E13: SNN::clearExtFiringTable() (in /home/mbeyeler/source/CARLsim4/projects/hello_world/hello_world)
==21728==    by 0x43EBE0: SNN::runNetwork(int, int, bool) (in /home/mbeyeler/source/CARLsim4/projects/hello_world/hello_world)
==21728==    by 0x40899B: CARLsim::runNetwork(int, int, bool) (in /home/mbeyeler/source/CARLsim4/projects/hello_world/hello_world)
==21728==    by 0x40589E: main (in /home/mbeyeler/source/CARLsim4/projects/hello_world/hello_world)
==21728==
==21728== LEAK SUMMARY:
==21728==    definitely lost: 10,251,008 bytes in 80,024 blocks
==21728==    indirectly lost: 0 bytes in 0 blocks
==21728==      possibly lost: 0 bytes in 0 blocks
==21728==    still reachable: 72,736 bytes in 2 blocks
==21728==         suppressed: 0 bytes in 0 blocks

Thanks Michael for checking this. There was indeed a leak when I was not removing the thread_attr instances. I removed them now with pthread_attr_destroy(). A PR is coming.
HEAP SUMMARY: ==15327==     in use at exit: 8,192 bytes in 2 blocks ==15327==   total heap usage: 109,228 allocs, 109,226 frees, 13,208,823 bytes allocated ==15327==  ==15327== 4,096 bytes in 1 blocks are definitely lost in loss record 1 of 2 ==15327==    at 0x4C2B8A8: operator new[](unsigned long) (vg_replace_malloc.c:423) ==15327==    by 0x465F92: SNN::copyAuxiliaryData(int, int, RuntimeData_s*, bool) (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x467FB4: SNN::allocateSNN_CPU(int) (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x43CD48: SNN::generateRuntimeSNN() (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x406431: CARLsim::setupNetwork() (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x405281: main (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==  ==15327== 4,096 bytes in 1 blocks are definitely lost in loss record 2 of 2 ==15327==    at 0x4C2B8A8: operator new[](unsigned long) (vg_replace_malloc.c:423) ==15327==    by 0x465FED: SNN::copyAuxiliaryData(int, int, RuntimeData_s*, bool) (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x467FB4: SNN::allocateSNN_CPU(int) (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x43CD48: SNN::generateRuntimeSNN() (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x406431: CARLsim::setupNetwork() (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==    by 0x405281: main (in /home/hirak/CARLsim4/projects/hello_world/hello_world) ==15327==  ==15327== LEAK SUMMARY: ==15327==    definitely lost: 8,192 bytes in 2 blocks ==15327==    indirectly lost: 0 bytes in 0 blocks ==15327==      possibly lost: 0 bytes in 0 blocks ==15327==    still reachable: 0 bytes in 0 blocks ==15327==         suppressed: 0 bytes in 0 blocks ==15327==

Thanks Michael for checking this. There was indeed a leak when I was not removing the thread_attr instances. I removed them now with pthread_attr_destroy(). A PR is coming.
before:
LEAK SUMMARY:
==13565==    definitely lost: 8,970,752 bytes in 70,022 blocks
==13565==    indirectly lost: 0 bytes in 0 blocks
==13565==      possibly lost: 256 bytes in 2 blocks
==13565==    still reachable: 0 bytes in 0 blocks
==13565==         suppressed: 0 bytes in 0 blocks
==13565==
==13565== For counts of detected and suppressed errors, rerun with: -v
==13565== Use --track-origins=yes to see where uninitialised values come from
==13565== ERROR SUMMARY: 61 errors from 50 contexts (suppressed: 0 from 0)
after:
HEAP SUMMARY:
==15327==     in use at exit: 8,192 bytes in 2 blocks
==15327==   total heap usage: 109,228 allocs, 109,226 frees, 13,208,823 bytes allocated
==15327==
==15327== 4,096 bytes in 1 blocks are definitely lost in loss record 1 of 2
==15327==    at 0x4C2B8A8: operator new[](unsigned long) (vg_replace_malloc.c:423)
==15327==    by 0x465F92: SNN::copyAuxiliaryData(int, int, RuntimeData_s*, bool) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x467FB4: SNN::allocateSNN_CPU(int) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x43CD48: SNN::generateRuntimeSNN() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x406431: CARLsim::setupNetwork() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x405281: main (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==
==15327== 4,096 bytes in 1 blocks are definitely lost in loss record 2 of 2
==15327==    at 0x4C2B8A8: operator new[](unsigned long) (vg_replace_malloc.c:423)
==15327==    by 0x465FED: SNN::copyAuxiliaryData(int, int, RuntimeData_s*, bool) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x467FB4: SNN::allocateSNN_CPU(int) (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x43CD48: SNN::generateRuntimeSNN() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x406431: CARLsim::setupNetwork() (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==    by 0x405281: main (in /home/hirak/CARLsim4/projects/hello_world/hello_world)
==15327==
==15327== LEAK SUMMARY:
==15327==    definitely lost: 8,192 bytes in 2 blocks
==15327==    indirectly lost: 0 bytes in 0 blocks
==15327==      possibly lost: 0 bytes in 0 blocks
==15327==    still reachable: 0 bytes in 0 blocks
==15327==         suppressed: 0 bytes in 0 blocks

We still have some leak here:
SNN::copyAuxiliaryData()

PR
https://github.com/UCI-CARL/CARLsim4/pull/22

fixed with https://github.com/UCI-CARL/CARLsim4/pull/22


[question] Why is the environment instantiated differently for DDPG and DQN?

Hello,
Thanks a lot for this amazing code.
I noticed that the environment is instantiated differently when using either DQN or DDPG. Specifically at line 249 of train.py, the env is created with:
env = gym.make(env_id, **env_kwargs)
env.seed(args.seed)

in the case of DQN and DDPG whereas it is created with the make_env helper:
env = DummyVecEnv([make_env(env_id, 0, args.seed, wrapper_class=env_wrapper, log_dir=log_dir, env_kwargs=env_kwargs)])

for all the other algorithms.
This means that the environment is not vectorized, it is not possible to specify the log directory and to monitor the training. Why did you make a special case for DQN and DDPG?
Thanks

Hello,

This means that the environment is not vectorized, it is not possible to specify the log directory and to monitor the training. Why did you make a special case for DQN and DDPG?

Good point. There was some issue at some point with DQN/DDPG and vectorized environment (the performances where different,i I did that as a safe option) so I need to check if it is still the case, it may be an issue with copying arrays.

Ok I will run a short experiment with and without vectorized environment and let you know if I see any difference.

FYI,
Vectorizing DQN or DDPG does not seem to affect the training, the average return or the training time significantly, see results attached.
comparison_vec_noVec.pdf

Thanks, then I may change that =)
Btw, what did you use to generate that nice pdf?

 I used Latex and Matplotlib for the figures.

Btw I'm not sure whether this will affect the results but I received this warning during training:

You're welcome! I used Latex and Matplotlib for the figures.

I meant: do you have a script somewhere or you wrote the latex file manually?

Btw I'm not sure whether this will affect the results but I received this warning during training:

This is a normal warning when uing eval env, it is hard to check that the training env is the same as the eval env, so instead of throwing an error, we warn the user.

I meant: do you have a script somewhere or you wrote the latex file manually?

It's a template I use for writing report. It's pretty basic but here it is if that can be of any use.
DQN-DDPG_vec_noVec.zip


Track NodeJS native serial port suport

During the hardware working group meetup at Cascadia we were asked to document ioclt or other calls used on all platforms to make sure we're able to target all the features we need for exiting functionality.

Linux/OSX
normal ioctl setup, and custom baud on linux
  serinfo.flags &= ~ASYNC_SPD_MASK;
  serinfo.flags |= ASYNC_SPD_CUST;
  ioctl(fd, TIOCSSERIAL, &serinfo);
  ioctl(fd, TIOCGSERIAL, &serinfo);

osx we use a different ioctl call to do custom baud
if (ioctl(fd,  IOSSIOSPEED, &speed) == -1) {
Then we set control and break codes with
TIOCMSET TIOCM_RTS | TIOCM_CTS | TIOCM_DTR | TIOCM_DSR
TIOCSBRK
TIOCCBRK

Tagging @nebrius and linking to https://github.com/libuv/libuv/pull/379

@saghul what are your thoughts on the above? Would you have time in the next week to break ground on libuv extras?

One thing that would be nice to see is a libuv level API proposal.  If this is going to "inherit" from uv_stream_t we might need to make internal adjustments.  It's important we catch those as early as possible.

For reads uv_stream_t does select on osx

Incorrect.  That's only the case if the fd doesn't work with kqueue.

I don't understand what a serialport is cross platform to libuv.

I consider it an abstract entity.  On Unix it's file descriptor, yeah, but that's it's an implementation detail.  AFAIS it behaves like a stream so it should probably be one, and inherit the heavy lifting already inplace.

On unix it's not a file or a domain socket, but under the hood fs.read is probably using uv_stream_t and that works great.

No, it's not. Streams queue writes, while the fs operations run in parallel and use offsets.

I imagine a uv_serial_t would handle the reading and writing to an open serial connection. Would it include opening the file handles and the configuration primitives too?

I'd say yes.  The whole idea behind putting this in the libuv layer is that the Node native module would just be a wrapper of the C part, plus handling of data types.

Since the plan is to put this in libuv-extras, I'd say something like http://docs.libuv.org/en/v1.x/tty.html would be a good start.  That is: public API and datatypes.
The implementation can start as a C file (plus the header) while I figure out the best way to deal with libuv-extras as a companion library depending on libuv.

ping @reconbot you have a chance to look at this yet?

also @saghul can you build more on how serialport is not a file. Are you speaking in comparison to what you use the fs module for or unix files?
What would you define it as?


only return preferred staking balance

this takes into account if there is more than one gauge for a pool. we now only return stake on a preferred gauge.

closing in favor of #94


added: desktop notifications (on linux)

Hi there,
I'm using cargo check in combination with cargo watch. In this combination, wouldn't it be cool if the watcher in the background would notify you if your crate no longer would compile?
At least I liked that idea :smile:
So I added a feature which enables desktop notifications (only on linux so far).
What do you think?

Actually, wait, this belongs in cargo watch :confused: :smile: sorry


Allow more decimanl places for float slider

Hi,
I just encountered problem when using float sliders - the most precision defaults to 4 - I can change that in .json settings - which is fine, but the problem is that no more than 4 decimal places will be displayed. I am using the GUI for GPS coordinates and ideally I need 6 decimal places for float.

You shouldn't be editing the json save files, this can introduce weird errors, you should let the library create valid jsons.
There are some problems with higher decimal precision in sliders, namely that the value starts acting unpredictably, I don't remember the exact problems with it too well but 4 decimals is a good general trade-off where I could get reasonable precision with predictable interactive value changes when interacting with the slider and avoid the float display switching to scientific notation which I definitely don't want in the sliders.
GPS coordinates are not float values usually anyway, they're double or higher precision to get accurate 5+ decimals
Your problem might be solved by displaying and editing the GPS coordinates as text, which doesn't have these limitations and you can then parse that text as a double

Ok, so I'm thinking it should be possible for the library user to set a higher precision than 4 decimals if they know they can deal with some slightly weird behavior in the sliders, but I'd probably keep the default 4 digits. This will require some testing to ensure it's not generating more problems than it solves, I'll take a look at it in the following weeks.

I guess the slider could actually use a double internally - that should help with weird behavior at the limits of what it can represent and also hopefully avoid scientific notation with more decimals.

Alright, I changed the internal representation of a slider value from float to double and increased the allowed precision up to 7 decimal places because it starts to act wonky at 8. It seems to work, I'll test it for a while and deploy it to production in v1.8.3 this week.

This is now live in v1.8.3 and you're welcome to try it out - the slider precision maximum has been increased from 4 decimals to 8.


raw cat doesn't work?

added a grant transaction
list works
raw cat says folder empty
multisig raw cat cosmos ceph-cosmos

I'm working on fixes for that and also ensure that all raw commands are working fine.

you need to specify the index, eg. multisig raw cat cosmos ceph-cosmos/0


Enable btn#1

buttons enabled #1  , now the prompt will take the number of clicked button as a input.

Thank you @prasoonjain006  for enabling buttons. But I am sorry for, I want you to again make a pull request for a branch "button_enabled" just created by me! For reference, you may check this link.https://stackoverflow.com/questions/9135913/merge-pull-request-to-a-different-branch-than-default-in-github

Okay, i will make a pull request again.

Sure thing! I am closing this one! Thank you


Feedback: give some love to Console and Unit Test applications using Key Vault

The Key Vault documentation is pretty technical. Given that it's still a relatively new application, I'm surprised that I'm finding it difficult to find quick starts/tutorials for other applications that aren't asp.net core or containers. What about console applications? functions? Unit test projects? The documentation could benefit from having these samples.

@samsmithnz I would suggest that you link a specific github document or open this feedback on a document so that an author and someone from the product team can respond to your feedback.

@samsmithnz please either link the relevant document here or leave a new Github issue on a specific document and we will gladly pass on your feedback.

Hi MarileeTurscak. Thanks for the reply. I just wrote about this in a separate more specific issue, but in general:
I know you are always looking for ways to improve the docs. I think the docs could benefit from even a short article on "What about if you aren't developing a web app" options type of doc, to direct people when they aren't creating a web app. I understand why the Azure Key Vault docs are directed towards web apps and containers given their popularity.
As a fairly experienced developer, in general, I found the Azure Key Vault documentation difficult to follow. It gets deep very very quickly. I think some of it could be split into multiple documents and more tutorials and quick starts could be useful. Perhaps if you sat behind someone who had never used Key Vault and watched how they used the documentation you might see what I mean. Thank you for what you do, the docs are a lot better than they were a few years ago!


knife bootstrap ssh: Train::PlatformDetectionFailed for windows platform

Description
While bootstrapping a windows node by using knife bootstrap -o ssh FQDN
it raises an error Sorry, we are unable to detect your platform (Train::PlatformDetectionFailed) 	12: from /usr/bin/knife:97:in '<main>'
Chef Version
Chef Infra: 15.0.235
Platform Version

Window Server 2012 R2 Datacenter
Window Server 2012 R2 Standard

Replication Case

Install chef https://downloads.chef.io/chef/current/15.0.235
Create a Window VM.
Enable SSH on the target host reference https://github.com/chef/knife-windows#knife-bootstrap-windows-ssh
Bootstrap a the target node by

knife bootstrap FQDN -o ssh -N node-name -r "recipe[starter::default]" --connection-user 'username' --connection-password 'password' --no-ssh-verify-host-key

Client Output
ChefCore::TargetHost::ConnectionFailure (ChefCore::TargetHost::ConnectionFailure)

Stacktrace
Traceback (most recent call last):
	19: from /usr/bin/knife:97:in `<main>'
	18: from /usr/bin/knife:97:in `load'
	17: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/bin/knife:24:in `<top (required)>'
	16: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/application/knife.rb:162:in `run'
	15: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife.rb:221:in `run'
	14: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife.rb:459:in `run_with_pretty_exceptions'
	13: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/local_mode.rb:41:in `with_server_connectivity'
	12: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife.rb:460:in `block in run_with_pretty_exceptions'
	11: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife/bootstrap.rb:550:in `run'
	10: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife/bootstrap.rb:604:in `connect!'
	 9: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife/bootstrap.rb:648:in `do_connect'
	 8: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-core-0.0.3/lib/chef_core/target_host.rb:131:in `connect!'
	 7: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/transports/ssh.rb:82:in `connection'
	 6: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/transports/ssh.rb:238:in `create_new_connection'
	 5: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/transports/ssh.rb:238:in `new'
	 4: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/transports/ssh_connection.rb:53:in `initialize'
	 3: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/extras/command_wrapper.rb:128:in `load'
	 2: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/plugins/base_connection.rb:110:in `platform'
	 1: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/platforms/detect.rb:9:in `scan'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.0.12/lib/train/platforms/detect/scanner.rb:41:in `scan': Sorry, we are unable to detect your platform (Train::PlatformDetectionFailed)
	12: from /usr/bin/knife:97:in `<main>'
	11: from /usr/bin/knife:97:in `load'
	10: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/bin/knife:24:in `<top (required)>'
	 9: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/application/knife.rb:162:in `run'
	 8: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife.rb:221:in `run'
	 7: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife.rb:459:in `run_with_pretty_exceptions'
	 6: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/local_mode.rb:41:in `with_server_connectivity'
	 5: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife.rb:460:in `block in run_with_pretty_exceptions'
	 4: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife/bootstrap.rb:550:in `run'
	 3: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife/bootstrap.rb:604:in `connect!'
	 2: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.235/lib/chef/knife/bootstrap.rb:648:in `do_connect'
	 1: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-core-0.0.3/lib/chef_core/target_host.rb:128:in `connect!'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-core-0.0.3/lib/chef_core/target_host.rb:143:in `rescue in connect!': ChefCore::TargetHost::ConnectionFailure (ChefCore::TargetHost::ConnectionFailure)
system:~/pro

https://github.com/inspec/train/pull/416 will resolve this.

@vsingh-msys Did you verify this works now with Chef 15.0.266+ ? Can we close this now?

Yes, @btm now it works thanks.


ScrollablePositionedList with SliverAppBar not working properly

This is repository to create minimal reproducible example.
I want SliverAppBar hidden when ScrollablePositionedList.builder is Scrolled. This is the relevant piece of code I am including here.
          NestedScrollView(
              headerSliverBuilder: (context, innerBoxIsScrolled) => [
                    SliverAppBar(
                      backgroundColor: Colors.blue,
                      expandedHeight: 112,
                      snap: true,
                      pinned: false,
                      floating: true,
                      forceElevated: true,
                      actions: <Widget>[
                        IconButton(
                          icon: Icon(Icons.event),
                        )
                      ],
                      flexibleSpace: SafeArea(
                        child: Column(
                          children: <Widget>[
                            Container(
                              height: kToolbarHeight,
                              child: Column(
                                crossAxisAlignment: CrossAxisAlignment.center,
                                mainAxisAlignment: MainAxisAlignment.center,
                                children: <Widget>[
                                  Text(
                                    'Title',
                                    style: Theme.of(context)
                                        .textTheme
                                        .title
                                        .copyWith(
                                            fontSize: 16, color: Colors.white),
                                  ),
                                  SizedBox(
                                    height: 2,
                                  ),
                                  Text(
                                    'Date',
                                    style: Theme.of(context)
                                        .textTheme
                                        .caption
                                        .copyWith(
                                            fontSize: 10, color: Colors.white),
                                  ),
                                  SizedBox(
                                    height: 2,
                                  ),
                                  Text(
                                    'Another Text',
                                    style: Theme.of(context)
                                        .textTheme
                                        .subtitle
                                        .copyWith(
                                            fontSize: 14, color: Colors.white),
                                  ),
                                ],
                              ),
                            ),
                            Expanded(
                              child: Container(
                                height: kToolbarHeight,
                                width: MediaQuery.of(context).size.width,
                                color: Colors.white,
                                child: Row(
                                  mainAxisAlignment:
                                      MainAxisAlignment.spaceEvenly,
                                  children: <Widget>[
                                    Text(
                                      'Prev',
                                    ),
                                    Text(
                                      'Next',
                                    )
                                  ],
                                ),
                              ),
                            )
                          ],
                        ),
                      ),
                    )
                  ],
              body: ScrollablePositionedList.builder(
                  physics: ScrollPhysics(),
                  itemPositionsListener: itemPositionListener,
                  itemScrollController: _itemScrollController,
                  initialScrollIndex: 0,
                  itemCount: 500,
                  itemBuilder: (BuildContext ctxt, int index) {
                    return Container(
                        margin: EdgeInsets.all(16)
                        ,
                        child: Text('$index'));
                  })),

I tried two approches so far none of them working properly,
Approch 1
I added `physics: ScrollPhysics(),` to `ScrollablePositionedList.builder`
Output:

Approch 2
I added `physics: NeverScrollableScrollPhysics(),` to `ScrollablePositionedList.builder`
SliverAppBar hides this time but now I can not scroll to the very end of ScrollablePositionedList.builder I have 500 items in my list but it goes to only 14 see the output. Also, it lags too much on scroll
Output:

Thanks in advance.

Hi @raviganwal
You can use CustomScrollView as in this example

edited your code
import 'package:flutter/material.dart';
import 'package:flutter_widgets/flutter_widgets.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

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

class _MyHomePageState extends State<MyHomePage> {
  final ItemPositionsListener itemPositionListener =
      ItemPositionsListener.create();
  ItemScrollController _itemScrollController = ItemScrollController();
  int currentIndex = 0;

  @override
  void initState() {
    super.initState();
    currentVisibleIndex();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: CustomScrollView(
        slivers: <Widget>[
          SliverAppBar(
            backgroundColor: Colors.blue,
            expandedHeight: 112,
            snap: true,
            pinned: false,
            floating: true,
            forceElevated: true,
            actions: <Widget>[
              IconButton(
                icon: Icon(Icons.event),
              )
            ],
            flexibleSpace: SafeArea(
              child: Column(
                children: <Widget>[
                  Container(
                    height: kToolbarHeight,
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.center,
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        Text(
                          'Title',
                          style: Theme.of(context)
                              .textTheme
                              .title
                              .copyWith(fontSize: 16, color: Colors.white),
                        ),
                        SizedBox(
                          height: 2,
                        ),
                        Text(
                          'Date',
                          style: Theme.of(context)
                              .textTheme
                              .caption
                              .copyWith(fontSize: 10, color: Colors.white),
                        ),
                        SizedBox(
                          height: 2,
                        ),
                        Text(
                          'Another Text',
                          style: Theme.of(context)
                              .textTheme
                              .subtitle
                              .copyWith(fontSize: 14, color: Colors.white),
                        ),
                      ],
                    ),
                  ),
                  Expanded(
                    child: Container(
                      height: kToolbarHeight,
                      width: MediaQuery.of(context).size.width,
                      color: Colors.white,
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                        children: <Widget>[
                          Text(
                            'Prev',
                          ),
                          Text(
                            'Next',
                          )
                        ],
                      ),
                    ),
                  )
                ],
              ),
            ),
          ),
          SliverList(
            delegate: SliverChildBuilderDelegate(
              (context, index) => Container(
                  margin: EdgeInsets.only(top: 20), child: Text('$index')),
              childCount: 500,
            ),
          ),
        ],
      ),
    );
  }

  currentVisibleIndex() {
    itemPositionListener.itemPositions.addListener(() {
      int min;
      int max;
      if (itemPositionListener.itemPositions.value.isNotEmpty) {
        // Determine the first visible item by finding the item with the
        // smallest trailing edge that is greater than 0.  i.e. the first
        // item whose trailing edge in visible in the viewport.
        min = itemPositionListener.itemPositions.value
            .where((ItemPosition position) => position.itemTrailingEdge > 0)
            .reduce((ItemPosition min, ItemPosition position) =>
        position.itemTrailingEdge < min.itemTrailingEdge
            ? position
            : min)
            .index;
        print('Min Index $min');
        currentIndex = min;
      }
    });
  }
}

I hope this corresponds to needed behavior
Closing the issue
If you disagree please write in the comments and I will reopen it
Thank you

Hi @VladyslavBondarenko Thank you for quick response. But I don't need  SliverList as It cannot scroll to a specific item in List. That's why I need to use ScrollablePositionedList.builder only and its not working with CustomScrollView.

This looks like a bug with the ScrollablePositionedList from the https://github.com/google/flutter.widgets package.
ScrollablePositionedList could be used in a CustomScrollView with slivers, if it were wrapped with a SliverToBoxAdapter and it had the shrinkwrap option. It looks like shrinkwrap is not exposed currently, but there is already a feature request for it:  https://github.com/google/flutter.widgets/issues/52
I'll leave this open for tracking and re-label since it appears to be a package issue.

Same here. We really need a fix if it's posiible. If it's not let us know please.

Hi @raviganwal,
Per this comment, it seems to be a package issue you are using flutter_widget. Can you try without using 3rd party plugin and see if it works for you ?

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.


Not getting access token

Configured MSAL4J in my Java App to authenticate AD B2C user and acquiring token using auth code flow. Authentication works fine but not getting access token in the response.
Using Confidential client applications and acquire tokens by authorization code after letting the user sign-in through the authorization request URL.
Getting below error.
com.microsoft.aad.msal4j.MsalClientException: Invalid or missing token, could not parse. If using B2C, information on a potential B2C issue and workaround can be found here: https://aka.ms/msal4j-b2c-known-issues
	at com.microsoft.aad.msal4j.TokenResponse.parseJsonObject(TokenResponse.java:85) ~[msal4j-1.10.1.jar:1.10.1]
	at com.microsoft.aad.msal4j.TokenResponse.parseHttpResponse(TokenResponse.java:36) ~[msal4j-1.10.1.jar:1.10.1]
	at com.microsoft.aad.msal4j.TokenRequestExecutor.createAuthenticationResultFromOauthHttpResponse(TokenRequestExecutor.java:67) ~[msal4j-1.10.1.jar:1.10.1]
	at com.microsoft.aad.msal4j.TokenRequestExecutor.executeTokenRequest(TokenRequestExecutor.java:37) ~[msal4j-1.10.1.jar:1.10.1]
	at com.microsoft.aad.msal4j.AbstractClientApplicationBase.acquireTokenCommon(AbstractClientApplicationBase.java:128) ~[msal4j-1.10.1.jar:1.10.1]
	at com.microsoft.aad.msal4j.AcquireTokenByAuthorizationGrantSupplier.execute(AcquireTokenByAuthorizationGrantSupplier.java:63) ~[msal4j-1.10.1.jar:1.10.1]
	at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:59) ~[msal4j-1.10.1.jar:1.10.1]
	at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:17) ~[msal4j-1.10.1.jar:1.10.1]
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692) ~[na:na]
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[na:na]
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[na:na]
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[na:na]
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[na:na]
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[na:na]

Would like to pay thanks in advance for any resolution.

Hi @hemant7737, did you visit the link included in the error message? (https://aka.ms/msal4j-b2c-known-issues)
You'll have to include your application id as one of the scopes. The issue and the workaround are explained in the link that is shared in the error message.

Hi @sangonzal ,
Have tried with the approach that you mentioned but still no difference.
Although I have downloaded the sample provide on the repository. Could you please help me with any reference where it is working fine?

@hemant7737 There is no sample showing this. It should be as simple as just passing in your ClientId to the scope parameter. For example, something along the lines of:
            Set<String> scope = Collections.singleton(clientId);
            SilentParameters silentParameters =
                    SilentParameters
                            .builder(scope)
                            .account(account)
                            .build();

If this is still not working for you, could you please share your code and a fiddler trace? Instructions on how to do this: https://github.com/AzureAD/microsoft-authentication-library-for-java/wiki/Fiddler


🐛 Bug Report: Exceptions are a serious problem.

👟 Reproduction steps
Sending exceptions in every negative case of the application leads to serious issues. Is it correct to use try-catch everywhere.
Even though I don't use try-catch, some exceptions still cause the application to crash.  We need to urgently move away from this try-catch approach. If necessary, it should be handled within the SDK. We shouldn't force the person using the SDK to put try-catch everywhere; it's not clean code at all.
👍 Expected behavior
lol
👎 Actual Behavior
lol
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
Linux
🧱 Your Environment
lol
👀 Have you spent some time to check if this issue has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Totally agree. Exceptions thrown by Realtime is not catchable as well with try-catch. It crashes the app straightaway. Realtime should use a callback for errors instead of throwing exceptions.

The Android client is an important user group of the BAAS platform architecture. It is really confusing to use such a large number of exception handling methods.

Hi @muratdoglu, we are always open to improvements, in what way would you prefer to handle errors? Maybe methods that return an error object or similar instead of throwing, or did you have something else in mind?

@abnegate I think, It's a good sample;
   fun getUsers (
     successHandler: (SuccessResponse) -> Unit,
     failureHandler: (Throwable?) -> Unit,
     errorHandler: (ErrorResponse?) -> Unit
) {

}

-------------

getCustomers(
{ },
{ },
{ })

@muratdoglu While that kind of pattern is common for callback based asynchronous code,  when using structured concurrency like Kotlin coroutines, it is common to use exceptions. Doing so leads to allowing cleaner and more straight forward code when compared to callbacks.
There are another couple of options, but neither quite provide the same flexibility while sticking to language idioms:

Null returns: Easier to handle, but all information about what went wrong is lost.
Result<T, Exception> returns: Just requires an if(result.success) block instead of try/catch around the function.

For these reasons, we'll stick with exceptions for now

@abnegate  Can you provide an example on how we can handle exceptions thrown by realtime? Please refer this example in realtime docs. There is no way to catch the exception here and they result in app crash.


V5 Dropdowns : Rotate caret on toggle

@devhoussam you can do it now, just add
&.show {
  @include caret(up);
}

after
https://github.com/twbs/bootstrap/blob/e50c11b8c6434b6d68ea5897771e4d35fe12f5c3/scss/_dropdown.scss#L13

Punting on this for now.


'function' object is not subscriptable when using syntax c[1:4:1]

Trying to create a dataframe , syntax c[6:1:-1] not working
df = tibble(x = c(1, 1, 1, 2, 2, 3), y = c[1:6:1], z = c[6:1:-1])
---->  df = tibble(x = c(1, 1, 1, 2, 2, 3), y = c[1:6:1], z = c[6:1:-1])
TypeError: 'function' object is not subscriptable

What does datar.get_versions() print?

python   : 3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]
datar    : 0.8.6
numpy    : 1.21.5
pipda    : 0.6.0
executing: 0.8.3
varname  : 0.8.3
pandas   : 1.4.2

You need to upgrade to v0.9.0 by pip install -U datar.

Solved


fixed grammar in README.md

line 31: "from where to start?" to "Where do i start?"

the same grammar error persists on the js.org page but I won't make a separate pull request for that

@juls0730 thanks for contributing...i hope you will contribute to the codebase as well

@rwbeast I will for sure contribute to the code base


Include  for std::remove_if

For some reason clang includes this already, but GCC does not.

Thanks @notlion !


[Onchain Squad] Create a new developer guide around building on Base

Context
We're continually adding new developer guides and tutorials to the Base Developer Docs for developers to learn new concepts and tooling when building on Base.
Ask
Write a new guide around building onchain apps (dapps) on Base using your favorite tooling, or take one of the existing guides and  improve the existing content to make it more digestible and easier to learn!
Source code for the Base Developer Docs site can be found under /apps/base-docs. The documentation site is built using Docusaurus.

@taycaldwell Could you assign this to me if it is open?

Thank you @taycaldwell I will get to it as soon as possible.

Closing issue with conclusion of 30 Days of Web3.


Cannot read property 'call' of undefined.  Exception occurred when checking element XXXX, check the 'onfocusout' method.

var addCardForm = $( "#addNew" );
 addCardForm.find('input[name="PersonalId"]').rules("add", {
        onfocusout: function(element, event){
            console.log(element);
        }
  });

<form style="padding-top:10px;" class="" id="addNew" action="/card/addNewCard">

                                PersonalId
                                <input type="text" placeholder="ÅÅÅÅMMDDXXXX" id="pn" class="form-control" name="PersonalId" value="">

</form>

Anytime I focus out of the field I get the error message "Cannot read property 'call' of undefined.  Exception occurred when checking element pn, check the 'onfocusout' method.
Am I doing something wrong? Because I feel like this is an issue.  I am following the documentation.

the .rules method is only available on the validator object, not on any DOMElement jQuery can find

Are you sure jquery-validate is already loaded at this point in time?

I know this issue is old, but I wanted to answer it.

The rules method used only to add your desired rules to the element, not to override the onfocusout.
See http://jqueryvalidation.org/rules/ for how to use the rules method.

Will close this issue now. Feel free to discuss it further. In case we get to a point where something need to be fixed in jquery-validate-src we can re-open it again


Implement Types that can prove Evaluation Order

Problem:
Some programs may need to prove that one operation will occur before another. Types are responsible for describing Terms, but currently the Type system isn't powerful enough to handle stuff like Linear Types.
Solution:
Implement Linear Types and demonstrate that they are sufficient to describe evaluation order.

LM


do not assume the default box sizing model (content-box) for prefix icons

When using the <vaadin-text-field> element with a prefix icon, as a developer, I expect it to look the same way regardless of the box sizing model set for all elements on the page. Currently with the Lumo theme the prefix icon would display incorrectly if there is a global reset of the box sizing model to 'border-box' (which is one of the commonly used CSS resets).

JS fiddle showing the issue: https://jsfiddle.net/27ps74ao/1/
The CSS rule that seems to be causing the issue:
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */

[part="input-field"] ::slotted(iron-icon[icon^="vaadin:"]) {
  width: calc(var(--lumo-icon-size-m) - 0.5em);
  height: calc(var(--lumo-icon-size-m) - 0.5em);
  padding: 0.25em;
}

The specific issue with Lumo has been fixed some time ago:
https://github.com/vaadin/vaadin-text-field/blob/master/theme/lumo/vaadin-text-field.html#L338-L341
Not sure if there’s anything else left to do here.


Build: Add missing PrettyDiff test file

LGTM 🍥

[Current coverage][cc-pull] is 100% (diff: 100%)

Merging [#244][cc-pull] into [master][cc-base-branch] will not change coverage

@@           master   #244   diff @@
====================================
  Files          23     24     +1
  Lines         253    273    +20
  Methods        40     43     +3
  Messages        0      0
  Branches       31     34     +3
====================================
+ Hits          253    273    +20
  Misses          0      0
  Partials        0      0

[][cc-pull]

Powered by Codecov. Last update [59745cd...d436c61][cc-compare]
[cc-base-branch]: https://codecov.io/gh/Adslot/alexandria/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/Adslot/alexandria/compare/59745cdf2f110b73ba2a4a452e0554e449efcad9...d436c618d5daa0a5fa6c26654c7d904449f36b53?src=pr
[cc-pull]: https://codecov.io/gh/Adslot/alexandria/pull/244?src=pr

@omgaz merge?

merging 🍜


⚠ Bofrost.at has degraded performance

In 69c5dfc, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1424 ms

Resolved: Bofrost.at performance has improved in 8292ed2.


Find an alternative solution for bou.ke/monkey

Currently, all tests will fail with the following log:
# bou.ke/monkey
Error: ../../../go/pkg/mod/bou.ke/monkey@v1.0.2/replace.go:24:14: undefined: jmpToFunctionValue

This seems to be related to the library's implementation on Mac M1. The bou.ke/monkey library has been archived for a long time and has license restrictions as mentioned in this issue.
I've found an alternative library, gomonkey, but there seems to be some API incompatibilities like Patch, UnpatchAll, etc.
Any suggestions @suchen-sci ?

This problem has existed for a long time, and it's unfortunate that bou.ke/monkey does not work on Mac M1. If gomonkey works on all chips and offers all the functionality we need, we might consider using it. However, this change would be significant; a lot of code would need to be updated in this case.
Or we can fork the bou.ke/monkey and fix that problem on mac M1?

Fortunately, I came across another monkey library, derived from bou.ke/monkey.
However, there are still some incompatibilities with this library, such as the removal of PatchInstanceMethod. I've submitted an issue requesting the restoration of the PatchInstanceMethod method.
Perhaps we should wait for their response before deciding whether to fork and fix the issue.

Summary:

The bou.ke/monkey library is only compatible with the amd64 architecture.
The macos:latest runner corresponds to macOS-14-arm64.

Given these points, we have two options:

Seek an alternative to bou.ke/monkey that supports arm64, which needs extra coding and testing work.
Use an amd64-based runner like macos-13, which is a straightforward change but may not align with the release cycle of easeprobe.

What are your opinions, @suchen-sci?

Well, I thought you were using a Mac M1... If it doesn’t affect your work, I would prefer the second option. Could we also add another build.yaml to the GitHub Actions to ensure that Easeprobe can be built on the latest Mac version?
What do you think? Additionally, could we update it when github.com/go-kiss/monkey is ready?

Great idea! Let's fix it quickly and keep an eye on the progress on github.com/go-kiss/monkey.


Microk8s.reset Breaking Docker Build Command

Using

18.10 of Ubuntu
18.06.1-ce Docker snap
1.11/edge Microk8s snap

If I build an image with docker, then run microk8s.reset, then run the build command again, I get
OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/6240667963cc03f41ebb95973b882af4e99151c15f39ac0bd5ca9bbba1279495/log.json: no such file or directory): exec: "docker-runc": executable file not found in $PATH: unknown

If I reinstall the docker snap, I can run the build command again with no errors. I've echo'd $PATH before and after microk8s.reset and it is unchanged, so I am not sure yet why this is happening.

Hi @pixelshaded, I suspect some AppArmor denials. Can you check the output of dmesg?

I cannot reproduce this @pixelshaded. Can you share the Dockerfile you are using and/or any other info I may be missing?

Thanks for trying to help. Not sure if this is related, but as I got further trying to use microk8s, I found some issues mentioning that it doesn't play nice with a local install of docker, so I've opted instead to alias the docker that comes with microk8s. I haven't experienced this issue since.


Plugin requires a bump to support 1.18

Mojang has announced 1.18 to be their latest version, Spigot and Paper have 1.18 builds out now. Please note that Mojang now requires Java 17 for 1.18
The latest build from https://ci.codemc.io/job/EpicEricEE/job/ShopChest/ doesn't load, causes the following error:
[10:04:47 INFO]: [ShopChest] Enabling ShopChest v1.13-SNAPSHOT
[10:04:47 ERROR]: Error occurred while enabling ShopChest v1.13-SNAPSHOT (Is it up to date?)
java.lang.NoClassDefFoundError: Could not initialize class de.epiceric.shopchest.utils.Utils
    at de.epiceric.shopchest.ShopChest.onEnable(ShopChest.java:175) ~[ShopChest-1.13-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.18.jar:git-Paper-17]
    at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.18.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:726) ~[paper-1.18.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:501) ~[paper-1.18.jar:git-Paper-17]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:313) ~[paper-1.18.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1201) ~[paper-1.18.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.jar:git-Paper-17]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
[10:04:47 INFO]: [ShopChest] Disabling ShopChest v1.13-SNAPSHOT

If you need more information feel free to ask.

please update plugin version 1.18 + thx

Need an update to 1.18

Friendly bump after a week.
Update: Paper 1.18.1 has been released. We're ready to go live.

So, seems like plugin is abandoned and developer is just don't care about it anymore

So, seems like plugin is abandoned and developer is just don't care about it anymore

Not something you should just assume. For all we know they've been dealing with covid in the family, or even loss. Or yes, maybe they have moved on to other things. Their personal life is not our business, but yes, it sucks for us.
Thankfully it's open source, hopefully either the author lets us know he's abandoned it and we can contact a dev somewhere else, or we try to PR ourselves (i tried, i failed..)

So, seems like plugin is abandoned and developer is just don't care about it anymore

Not something you should just assume. For all we know they've been dealing with covid in the family, or even loss. Or yes, maybe they have moved on to other things. Their personal life is not our business, but yes, it sucks for us.
Thankfully it's open source, hopefully either the author lets us know he's abandoned it and we can contact a dev somewhere else, or we try to PR ourselves (i tried, i failed..)

Any update on getting a development build for this or should I hire someone to try and get it up and working ?

Hey there, sorry for not responding.
I don't think I will get to updating this anytime soon. I'd be happy if someone can be found to fork and further maintain this plugin. However, as past updates have mostly been done in a not very thoughtful way, the code has over time become messier and more painful to maintain, so restructuring some parts the project and especially dropping support for old Minecraft versions would likely be very helpful. There are already some forks that fixed or improved parts of that mess, though I didn't yet find any "officially" published versions.

Ah, it is so nice to at least hear something. Now we know where we stand.
I am sorry to hear it got so messy that you didn't or can't work on it anymore. I guess it's official. This is not something we can use or recommend on production. Shame, I always enjoyed it.
By the time someone cleaned this up it is time for 1.19 probably, I need a solution today. Will purge, and move to something else.
Best of luck eric and thank you for the years we got to use this.


workaround: always cast floats in read_scalar_data to 64bit

otherwise leads to incorrect rendering (at least on Linux Debian)
and it is done directly in read_scalar_data so it is in effect for
add_contour_overlay as well as add_overlay

also -- altogether since it is viz. problem not io. problem per se -- wouldn't you think it would make more sense to offset it into viz. module?  I was refactoring it just tiny bit anyways... ?

especially because now it wouldn't take an effect if someone provides 32bit array as input instead of a filename

you're right ! It makes more sense in viz that io

forced pushed a new commit which absorbs RF + workaround into 1

looks good. Merged thanks !


(#100) Updated support matrix for README.md

Fixes #100

Hi @adrianhall, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (adrianha). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;


Overflowing products grid, taking 120% of the container instead of 100% - messing with the responsiveness.

CSS was handling the lower res images deliberately. The 'products' grid was overflowing, taking extra space i.e. more than 100% of the products container - messing with the responsiveness.


deprecation: allowEdit

Platforms affected
All
Motivation and Context

Deprecate allowEdit. It's already known and documented that on Android that it's unreliable and unsafe to use for reasons outside of our control. While it might be stable enough for iOS, I don't think we can ever provide the same capability for Android without grossly entering scope creep for the plugin responsibilities.
Generally speaking we should refrain from having platform-specific features. Therefore I propose to formally deprecate it in v8.0.0 so that we can indicate that we don't intend to support issues arising form using allowEdit, either on iOS or on android.
Note: While I have language indicating that it will be removed v9.0.0, that will obviously depend on who decides to make that release in the future, so don't consider have to consider it as a promise, but it should serve as a sufficient warning that in v9 or any future release the feature can disappear.
Description

Adds a deprecation warning in the JS console, if getPicture is used with allowEdit === true
Testing

npm test
Checklist

[x] I've run the tests to see all new and existing tests pass
[x] I added automated test coverage as appropriate for this change
[x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
[x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
[x] I've updated the documentation if necessary

However, since this PR only adds a deprecation warning without actually removing the feature, we might be able to reach a consensus within this PR to include it in version 8.0.0. If the mailing list discussion ultimately decides not to remove it, we can easily revert the deprecation warning in a patch release.

I'll send a proposal thread in the mailing list for a call out. I'm also going to initiate the release buy-in and I'll explicitly mention this open PR as well, stating that the release may or may not include the PR depending on the consensus reached by tomorrow.