Add missing else clause, ensuring hashed filename is used for Webpacker.

This change is

Outstanding! A couple comments.

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.

lib/react_on_rails/utils.rb, line 78 at r1 (raw file):

        hashed_name = Webpacker::Manifest.lookup(bundle_name, throw_if_missing: false)
        hashed_name = bundle_name if hashed_name.blank?
        Rails.root.join(File.join(Webpacker::Configuration.output_path, hashed_name)).to_s

Why do we need to add the to_s here? It seems that Rails.root returns a pathname, so we'd have a pathname when we want a string.

spec/react_on_rails/utils_spec.rb, line 35 at r1 (raw file):

        before { allow(Utils).to receive(:using_webpacker?).and_return(false) }

        it { expect(subject).to eq("public/webpack/development/webpack-bundle") }

The output file should have a .js. I think this just needs to get added to here and above a few places.

Comments from Reviewable

Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.

spec/react_on_rails/utils_spec.rb, line 15 at r1 (raw file):

      subject do
        Utils.bundle_js_file_path('webpack-bundle')

I think it's fine here to use 'webpack-bundle.js'.

Comments from Reviewable

@MrJoy,  Try:
rubocop -a
Inspecting 115 files
..........C........................................................................................................
Offenses:
spec/react_on_rails/utils_spec.rb:11:32: C: Layout/MultilineMethodCallIndentation: Use 2 (not 23) spaces for indenting an expression spanning multiple lines.
                               .and_return("public/webpack/development")
                               ^^^^^^^^^^^
spec/react_on_rails/utils_spec.rb:15:35: C: Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
        Utils.bundle_js_file_path('webpack-bundle')
                                  ^^^^^^^^^^^^^^^^
spec/react_on_rails/utils_spec.rb:22:46: C: Layout/MultilineMethodCallIndentation: Use 2 (not 35) spaces for indenting an expression spanning multiple lines.
                                             .and_return("public/webpack/development")
                                             ^^^^^^^^^^^
spec/react_on_rails/utils_spec.rb:24:41: C: Layout/MultilineMethodCallIndentation: Use 2 (not 30) spaces for indenting an expression spanning multiple lines.
                                        .with("webpack-bundle", throw_if_missing: false)
                                        ^^^^^
spec/react_on_rails/utils_spec.rb:25:41: C: Layout/MultilineMethodCallIndentation: Use 2 (not 30) spaces for indenting an expression spanning multiple lines.
                                        .and_return("webpack-bundle-0123456789abcdef")
                                        ^^^^^^^^^^^
115 files inspected, 5 offenses detected

Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.

lib/react_on_rails/utils.rb, line 78 at r1 (raw file):
Previously, justin808 (Justin Gordon) wrote…
Why do we need to add the to_s here? It seems that Rails.root returns a pathname, so we'd have a pathname when we want a string.

As the other side of the conditional returns a String, I was concerned about exactly introducing a sharp corner to the interface:  People might come to expect that they always get a String or a Pathname -- depending on what configuration they start with -- and build up their own dependency on that semantic.  This could leave them surprised by changing the configuration.
I'd also be amenable to wrapping the String in a Pathname for the else clause, of course.

spec/react_on_rails/utils_spec.rb, line 15 at r1 (raw file):
Previously, justin808 (Justin Gordon) wrote…
I think it's fine here to use 'webpack-bundle.js'.

Will update.

spec/react_on_rails/utils_spec.rb, line 35 at r1 (raw file):
Previously, justin808 (Justin Gordon) wrote…
The output file should have a .js. I think this just needs to get added to here and above a few places.

Will update.

Comments from Reviewable

Updated to address style issues.

Review status: 2 of 3 files reviewed at latest revision, 3 unresolved discussions.

Comments from Reviewable

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


/utils/txs/evaluate does not support additonal UTxOs

Ability to provide additional UTxOs at the stage of ExUnits evaluation is essential when implementing transaction chaining, because the query layer does not know (yet) about newly created UTxOs.
Ogmios does support this, but it looks like in Blockfrost this parameter is not passed properly.

We are working on this.

https://docs.blockfrost.io/#tag/Cardano-Utilities/paths/~1utils~1txs~1evaluate~1utxos/post


Variables not shown in debugging ?

When debugging the current file that contains variables etc, nothing is shown for the variables in the debugging console ?

Please could you provide the information you have failed to provide. the Issue template had a number of sections with information we require to assist you with this issue.
Also please provide a sample code to replicate this issue.

When starting the debugger via the command palette for the current file, the debugging window doesn't show any variables even if there are variables in the current file etc ?
Unless I'm wrong variables etc, should be shown in the debugging window.

Please provide the information as requested in the issue template that you removed. Once that's provided we can re-open this issue and help debug what's going on.


Issue with git archive on Ubuntu 16.04

Description of problem

What did you do?
Tried to run an octocatalog-diff between two branches with a custom plugin (https://github.com/dylanratcliffe/onceover-octocatalog-diff)
What happened?

+ bundle exec onceover run diff --from production --to add_jenkinsfile
INFO	 -> Preparing environment for role::vanilla on CentOS-7.0-64
INFO	 -> Preparing environment for role::vanilla on Ubuntu-16.04-64
INFO	 -> Deploying Puppetfile for role::vanilla on CentOS-7.0-64
INFO	 -> Deploying Puppetfile for role::vanilla on Ubuntu-16.04-64
INFO	 -> Compiling catalogs for role::vanilla on Ubuntu-16.04-64
INFO	 -> Storing results for role::vanilla on Ubuntu-16.04-64
INFO	 -> Compiling catalogs for role::vanilla on CentOS-7.0-64
INFO	 -> Storing results for role::vanilla on CentOS-7.0-64
Test: role::vanilla on Ubuntu-16.04-64
Exit: 1
Status: failed
Errors:
E, [2017-06-17T18:57:59.382768 #3955] ERROR -- : Git checkout error: Git archive production->/tmp/d20170617-3955-1cv1jfz failed: STDOUT:
STDERR:
  fatal: Not a valid object name
  tar: This does not look like a tar archive
  tar: Exiting with failure status due to previous errors
E, [2017-06-17T18:57:59.385227 #3959] ERROR -- : Git checkout error: Git archive add_jenkinsfile->/tmp/d20170617-3959-8519q7 failed: STDOUT:
STDERR:
  fatal: Not a valid object name
  tar: This does not look like a tar archive
  tar: Exiting with failure status due to previous errors
OctocatalogDiff::Errors::BootstrapError: Git archive production->/tmp/d20170617-3955-1cv1jfz failed: STDOUT:
STDERR:
  fatal: Not a valid object name
  tar: This does not look like a tar archive
  tar: Exiting with failure status due to previous errors
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog-util/bootstrap.rb:109:in `rescue in git_checkout'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog-util/bootstrap.rb:104:in `git_checkout'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog-util/bootstrap.rb:93:in `bootstrap_directory'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog/computed.rb:130:in `bootstrap'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog/computed.rb:141:in `build_catalog'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog/computed.rb:64:in `build'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog.rb:59:in `build'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/catalogs.rb:237:in `build_catalog'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:33:in `call'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:33:in `execute'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:202:in `execute_task'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:117:in `block (2 levels) in run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:116:in `fork'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:116:in `block in run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:113:in `each'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:113:in `each_with_index'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:113:in `run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:93:in `run_tasks'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/catalogs.rb:92:in `build_catalog_parallelizer'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/catalogs.rb:29:in `catalogs'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/api/v1/catalog-diff.rb:34:in `catalog_diff'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/api/v1.rb:19:in `catalog_diff'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/cli.rb:112:in `cli'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/bin/octocatalog-diff:34:in `<top (required)>'
  /usr/local/bundle/bin/octocatalog-diff:17:in `load'
  /usr/local/bundle/bin/octocatalog-diff:17:in `<top (required)>'

Test: role::vanilla on CentOS-7.0-64
Exit: 1
Status: failed
Errors:
E, [2017-06-17T18:58:01.369349 #4056] ERROR -- : Git checkout error: Git archive add_jenkinsfile->/tmp/d20170617-4056-13m9i4l failed: STDOUT:
STDERR:
  fatal: Not a valid object name
  tar: This does not look like a tar archive
  tar: Exiting with failure status due to previous errors
E, [2017-06-17T18:58:01.369968 #4053] ERROR -- : Git checkout error: Git archive production->/tmp/d20170617-4053-qxyqqv failed: STDOUT:
STDERR:
  fatal: Not a valid object name
  tar: This does not look like a tar archive
  tar: Exiting with failure status due to previous errors
OctocatalogDiff::Errors::BootstrapError: Git archive add_jenkinsfile->/tmp/d20170617-4056-13m9i4l failed: STDOUT:
STDERR:
  fatal: Not a valid object name
  tar: This does not look like a tar archive
  tar: Exiting with failure status due to previous errors
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog-util/bootstrap.rb:109:in `rescue in git_checkout'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog-util/bootstrap.rb:104:in `git_checkout'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog-util/bootstrap.rb:93:in `bootstrap_directory'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog/computed.rb:130:in `bootstrap'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog/computed.rb:141:in `build_catalog'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog/computed.rb:64:in `build'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/catalog.rb:59:in `build'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/catalogs.rb:237:in `build_catalog'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:33:in `call'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:33:in `execute'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:202:in `execute_task'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:117:in `block (2 levels) in run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:116:in `fork'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:116:in `block in run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:113:in `each'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:113:in `each_with_index'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:113:in `run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/parallel.rb:93:in `run_tasks'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/catalogs.rb:92:in `build_catalog_parallelizer'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/util/catalogs.rb:29:in `catalogs'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/api/v1/catalog-diff.rb:34:in `catalog_diff'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/api/v1.rb:19:in `catalog_diff'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/lib/octocatalog-diff/cli.rb:112:in `cli'
  /usr/local/bundle/gems/octocatalog-diff-1.3.0/bin/octocatalog-diff:34:in `<top (required)>'
  /usr/local/bundle/bin/octocatalog-diff:17:in `load'
  /usr/local/bundle/bin/octocatalog-diff:17:in `<top (required)>'

What did you expect to happen?
Comparison between to branches to work.

How can someone reproduce the problem?
For context, I'm using a custom plugin that runs an r10k run of a Puppetfile in a temporary folder, then runs an octocatalog-diff between the two runs.

Command used and debugging output
The actual octocatalog-diff command is this:

bundle exec octocatalog-diff --fact-file /tmp/role__vanilla_on_Ubuntu-16.04-6420170617-9058-1vp701v/spec/factsets/Ubuntu-16.04-64.yaml --from production --to add_jenkinsfile --basedir /tmp/role__vanilla_on_Ubuntu-16.04-6420170617-9058-1vp701v --puppet-binary /var/lib/jenkins/workspace/ontrol-repo_add_jenkinsfile-YF67IPOJSZEA4N7KRTNFGNR644LHR2V3YPYE6BSAEQYMBAKBXGLQ/vendor/bundle/ruby/2.3.0/bin/puppet --bootstrap-script '/tmp/role__vanilla_on_Ubuntu-16.04-6420170617-9058-1vp701v/bootstrap_script.rb' --hiera-config /var/lib/jenkins/workspace/ontrol-repo_add_jenkinsfile-YF67IPOJSZEA4N7KRTNFGNR644LHR2V3YPYE6BSAEQYMBAKBXGLQ/spec/hiera.yaml --pass-env-vars BUNDLER_ORIG_PATH,BUNDLE_BIN_PATH,BUNDLE_GEMFILE,BUNDLER_VERSION,RUBYOPT,RUBYLIB

Platform and version information

Your OS: Ubuntu 16.04
Your Ruby version: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
Your version of Puppet:

bundle exec puppet --version
4.7.1

Your version of octocatalog-diff:

bundle exec octocatalog-diff --version
octocatalog-diff 1.2.0

Do the tests pass from a clean checkout?
Yes

Anything else to add that you think will be helpful?
The same command works fine on OSX, but on Ubuntu I get the git archive error

Working on OSX shown below:
bundle exec onceover run diff --from production --to add_jenkinsfile --debug --trace
DEBUG	 -> Reading /Users/petersouter/projects/psouter-control-repo/environment.conf
DEBUG	 -> Searching puppet code for roles and profiles
DEBUG	 -> Searching puppet code for roles and profiles
DEBUG	 -> Reading factsets
DEBUG	 -> Reading factsets
DEBUG	 -> Creating r10k cache for thread at /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/r10k_cache20170618-24795-1opdrc5
DEBUG	 -> Creating r10k cache for thread at /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/r10k_cache20170618-24795-1gjpxqa
DEBUG	 -> Creating r10k cache for thread at /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/r10k_cache20170618-24795-vk4vtf
DEBUG	 -> Creating r10k cache for thread at /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/r10k_cache20170618-24795-tsy6ty
INFO	 -> Preparing environment for role::vanilla on CentOS-7.0-64
INFO	 -> Preparing environment for role::vanilla on Ubuntu-16.04-64
DEBUG	 -> Creating temp directory
DEBUG	 -> Temp directory created at /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_CentOS-7.0-6420170618-24795-up8vmo
DEBUG	 -> Copying controlrepo to /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_CentOS-7.0-6420170618-24795-up8vmo
DEBUG	 -> Creating temp directory
DEBUG	 -> Temp directory created at /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_Ubuntu-16.04-6420170618-24795-huqie1
DEBUG	 -> Copying controlrepo to /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_Ubuntu-16.04-6420170618-24795-huqie1
DEBUG	 -> Deploying vendored factsets
DEBUG	 -> Deploying vendored factsets
INFO	 -> Deploying Puppetfile for role::vanilla on Ubuntu-16.04-64
INFO	 -> Deploying Puppetfile for role::vanilla on CentOS-7.0-64
DEBUG	 -> Creating before script that overwrites site.pp
DEBUG	 -> Getting Puppet binary
DEBUG	 -> Running Octocatalog diff
INFO	 -> Compiling catalogs for role::vanilla on Ubuntu-16.04-64
DEBUG	 -> Running: bundle exec octocatalog-diff --fact-file /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_Ubuntu-16.04-6420170618-24795-huqie1/spec/factsets/Ubuntu-16.04-64.yaml --from production --to add_jenkinsfile --basedir /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_Ubuntu-16.04-6420170618-24795-huqie1 --puppet-binary /Users/petersouter/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/bin/puppet --bootstrap-script '/var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_Ubuntu-16.04-6420170618-24795-huqie1/bootstrap_script.rb' --hiera-config /Users/petersouter/projects/psouter-control-repo/spec/hiera.yaml --pass-env-vars RUBYMOTION_ANDROID_SDK,RUBYMOTION_ANDROID_NDK,RUBYLIB,BUNDLER_ORIG_PATH,BUNDLE_BIN_PATH,BUNDLE_GEMFILE,BUNDLER_VERSION,RUBYOPT
DEBUG	 -> Creating before script that overwrites site.pp
DEBUG	 -> Getting Puppet binary
DEBUG	 -> Running Octocatalog diff
INFO	 -> Compiling catalogs for role::vanilla on CentOS-7.0-64
DEBUG	 -> Running: bundle exec octocatalog-diff --fact-file /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_CentOS-7.0-6420170618-24795-up8vmo/spec/factsets/CentOS-7.0-64.yaml --from production --to add_jenkinsfile --basedir /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_CentOS-7.0-6420170618-24795-up8vmo --puppet-binary /Users/petersouter/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/bin/puppet --bootstrap-script '/var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_CentOS-7.0-6420170618-24795-up8vmo/bootstrap_script.rb' --hiera-config /Users/petersouter/projects/psouter-control-repo/spec/hiera.yaml --pass-env-vars RUBYMOTION_ANDROID_SDK,RUBYMOTION_ANDROID_NDK,RUBYLIB,BUNDLER_ORIG_PATH,BUNDLE_BIN_PATH,BUNDLE_GEMFILE,BUNDLER_VERSION,RUBYOPT
INFO	 -> Storing results for role::vanilla on CentOS-7.0-64
DEBUG	 -> Backing up modules to thread cache /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_CentOS-7.0-6420170618-24795-up8vmo
DEBUG	 -> Removing temporary build cache
INFO	 -> Storing results for role::vanilla on Ubuntu-16.04-64
DEBUG	 -> Backing up modules to thread cache /var/folders/nn/408ddhln26s1b356ry19q6yr0000gp/T/role__vanilla_on_Ubuntu-16.04-6420170618-24795-huqie1
DEBUG	 -> Removing temporary build cache
Test: role::vanilla on CentOS-7.0-64
Exit: 0
Status: no differences

Test: role::vanilla on Ubuntu-16.04-64
Exit: 0
Status: no differences

I know that the plugin isn't developed by you folk, but this error is really weird looking, and it's strange that the exact same commands work on OSX but no Ubuntu, so I was hoping you'd be able to help. I can give any debug information needed 😄

fatal: Not a valid object name is an error message coming from git. That's the root of the problem here (that output is piped to tar, so the complaints from tar are downstream from whatever's wrong).
The code actually being run here is: https://github.com/github/octocatalog-diff/blob/master/scripts/git-extract/git-extract.sh
My suggestion: cd to the directory where this code actually lives, and run the git archive command that octocatalog-diff is actually running. From your example:
cd /tmp/role__vanilla_on_Ubuntu-16.04-6420170617-9058-1vp701v
git archive --format=tar add_jenkinsfile

Perhaps that will lead you to discover an issue, either with the repository itself, or with different command line arguments that are needed for the particular version of the git command needed for this platform. If there's something that needs to be fixed in git-extract.sh to make that work then I certainly welcome pull requests or suggestions on what you had to do to make the above command work in your environment.

FWIW, I had the same error using octocatalog-diff with GitHub Actions, turns out the "checkout" action only fetches the committed ref by default. Had to update my workflow to fetch both the source and target branches:
    steps:
      - name: Checkout target branch
        uses: actions/checkout@v2
        with:
          ref: ${{ github.base_ref }}
      - name: Checkout source branch
        run: |
          git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin ${{ github.head_ref }}
          git checkout --progress --force -B ${{ github.head_ref }} refs/remotes/origin/${{ github.head_ref }}


[transport-ble] Discussions on implementation

The BLE transport is still in its early stages. Discussions on the future trajectory of the project are held here, to be moved to a better location in the future if necessary.

This is not specific to the implementation of the transport which is a great step forward but a more general observation on the implementation of working solutions.
Without a precise specification, implementations will not be interoperable. See the ISO eID/mDL and the very early draft of the OpenID4VCP over BLE for examples of the level of detail I am thinking of. Aries either needs to adapt to one of the above-listed specs or develop an RFC that provides the level of precision required by vendors.
Device vendors are going to build to the ISO spec as a default stance - NFC/QR engagement with BLE transport.

Good point Tim! For now we've mostly been targeting https://github.com/decentralized-identity/didcomm-bluetooth/blob/main/spec.md.
Once we have a fully working implementation, we'll contribute back to that specification, revise it and make sure we learn from the OpenID4VP over BLE


Increment a Number with ++

Challenge Increment a Number with JavaScript has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
In the instructions, it says that the variable myVar should have value 88, but when I assign it a value of 88, it gives an error. When the variable is assigned a value of 87, it runs properly.
var myVar = 88;

// Only change code below this line
myVar++;

Hi @mujtabahs. If you take a look at the instructions you will see that the ++ operator will increment the variable, so in your code myVar ends up with the value 89. If you have any further questions, please visit the Help chat room.
Happy coding!


Exponential backoff for DNS retries

Builds on #5718 and #5723 which should each be merged first.

failing sanity

LGTM

both qps_test and csharp_coverage  are known flakes.


Integration needs reconfiguring

Periodically (e.g. every 24hts) the integration needs reconfiguring and all entities become unavailable.
Installed the integration recently via HACS. All was working fine then a few days later the Integration showed as follows

Couldn't get the integration to re-authenticate with Amazon so uninstalled, re-installed, reconfigured and all was fine again.
Then a couple days later I noticed the issue was back.
Is this normal behaviour (I expect not) ?
System details

Home-assistant (version): 2021.8.8
Installation Type: docker image
alexa_media  (version from const.py or HA startup): v3.10.8
alexapy (version from pip show alexapy or HA startup):
Amazon [2FA is enabled]: Yes

I removed the integration and re-installed. All good now. Make sure you follow the install instructions for the new install method, you need the code GENERATOR ID, not the actual 6 digit code from the authenticator.
My issue is 100% resolved.

Can you explain how to do this pls ?
I've tried using the authenticator key and placing this in the integration, theis successful and I enter the generated code back on Amazon 2SV which is also successful and I get an new registered app.
Then the integration says it must open a webpage and click the button. An Amazon logon page is display with username.password. I authenticate ok then get another OTP prompt.
At this stage no matter what OTP password I use (e.g. the original one from the integration or the one from the my authenticator app) I can't get past this.

Starting from scratch I entered my username and password, then on the 2FA I did this per the wiki:
Instead of using a separate 2FA code, you can also register a 2FA app with Alexa Media Player.
Go to Amazon.com's 2FA page and Add new App. You should save this key so you can reuse it if you reinstall.
Instead of scanning the QR code, select Can't scan the barcode.
Select the bolded value under Enter your Key (e.g., 35T5 LQSY I5IO 3EFQ LGAJ I6YB JWBY JJPR PYT7 XPPW IDAK SQBJ CVXA)
Enter the value from Step 3 in the Built-in 2FA App Key when adding the integration. 2FA should be automatically generated from now on and can be left blank.
Basically I gave HA the username, password, and 2FA code generator key, so if at any point and time it loses auth, it will regen a new key and reauth automatically.
Hopefully that helps?

Mine was fine again past few days then an hour ago I get this issue again. This has been a recurring issue for 2 weeks or so now.

I am Having this problem too. (Reauth required, then error)
In the configuration of the component the internal URI of HA is defined (192.168.x.x:8123) , but who uses it and for what reason?

Hi all,
same issue here. I tried also proxy login method but is not working. how can I fix it? I followed exactly the wiki.
thanks all

Hi all, same issue here. I tried also proxy login method but is not working. how can I fix it? I followed exactly the wiki. thanks all

For me an homeassistant reboot works. After that i only have to enter the 2FA Code that comes automatically from Amazon via SMS after the homeassistant reboot.

Hi all, same issue here. I tried also proxy login method but is not working. how can I fix it? I followed exactly the wiki. thanks all

For me an homeassistant reboot works. After that i only have to enter the 2FA Code that comes automatically from Amazon via SMS after the homeassistant reboot.

for me is working as well without reboot of HA.
I need to enter the codes received by sms, but I think that we should find a way to not enter it again. thanks

I had to re-authenticate this morning, but by changing NOTHING it reauthenticated flawlessly. I'm wondering if the AMP team needs to look at programmed re-authentication on a certain timeline. Mine was almost exactly a month ago when last authenticated (28 days?).
Bummer that my music alarm didn't go off but the lights and stuff turned on since my alarm is HA-based and not AMP based so I still got up!

Same here. Since 4-5 days I have to reauth AMP every morning. I always get a SMS without requesting/re-adding/rebooting at 8 am CET. If I see this then later, this one is not valid anymore so I have to reboot HA, get a new SMS automatically with a new code and enter this and then it's good (but only till) 8 am CET next morning.
Didn't have this before. Any chance to get rid of this new re-auth every day, with all this reboots, etc.?


Add default debug-level logging for selected TLS protocol and cipher suite

It would be nice if this info was exposed as part of the connectionInfo object on the HttpContext. That way people could use custom loggers and target levels other than debug. I know of a few services that need this feature to be able to know if they can disallow old protocols.

@DavidParks8 that was added in 2.2.0-preview1 via https://github.com/aspnet/KestrelHttpServer/issues/2661


Checkbox inputs leave a large shadow in the background on mobile displays

I don't know whether this is an intended feature or just a side-effect of bootstrap, but I've been trying to implement bootstrap in one of my projects and couldn't help notice this bug. Here is the jsbin:
http://jsbin.com/moqufeyiza/edit?html,js,console,output
As you can see in the small window, if you check the primary or unique boxes, there is a huge shadow in the background which is almost the size of a fully-fledged text-box. But if you see it in proper width (~960px display), the shadow is there, but just small enough to hold the checkbox. Is there any way to remove this huge shadow on mobile displays?

Don't apply input or button classes to checkboxes and radios. That appears to be your problem.


I noticed that MonitoredSession is a very inefficient method.How to save the model according to the set conditions, not periodically.

Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System informationwin10

TensorFlow version (you are using):1.12
Are you willing to contribute it (Yes/No):no

Describe the feature and the current behavior/state.
I noticed that MonitoredSession is a very inefficient method.Saving the model periodically.
Will this change the current api? How?
Setting conditions to save the model, not periodically.
Who will benefit with this feature?
everyone
Any Other info.

Hi There,
We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.
This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.


refactor: Migrate log4j-to-slf4j to JUnit5

Introduction
We are from Neighbourhoodie, the implementation partner of the STF Bug Resilience Program. This work is part of our agreed Milestone 1. Upgrade from JUnit 4 to JUnit 5. This PR migrates the tests located in log4j-to-slf4j to JUnit5.
Checklist

[x] Base your changes on 2.x branch if you are targeting Log4j 2; use main otherwise
[x] ./mvnw verify succeeds (if it fails due to code formatting issues reported by Spotless, simply run ./mvnw spotless:apply and retry)
Non-trivial changes contain an entry file in the src/changelog/.2.x.x directory
Tests for the changes are provided
[x] Commits are signed (optional, but highly recommended)

@Realtin, thanks so much! :bow:


Fix callback refs with non-dynamic args failing in Dart 2

Motivation
Callback refs with non-dynamic arguments weren't being handled properly, and would result in obtuse error messages.
Example:

dynamic ref argument (works):Foo({'ref': (ref) => _fooRef = ref})

non-dynamic ref argument (does not work):Foo({'ref': (FooComponent ref) => _fooRef = ref})

In DDC, the ref function would be called correctly, but the ref argument would be of type NativeJavaScriptObject instead of the expected component class.
This is because the JS component was being passed instead of the Dart one.
In dart2js, React would throw upon creation of the ReactElement, with the following error.

Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

This is because allowInterop was not called on the provided function.
Solution

Fix type checking using Null arity hack shown here: https://github.com/dart-lang/sdk/issues/34593
Add tests

Testing

Verify tests pass in both DDC and dart2js
Verify tests fail in both DDC and dart2js if either of the following changes are made in react_client.dart:

changing the is _CallbackRef<Null> check to is _CallbackRef<dynamic>
removing the as dynamic cast in the ref invocation

Nice nice nice nice

QA in progress

QA +1

[x] Verify tests pass in both DDC and dart2js
[x] Verify tests fail in both DDC and dart2js if either of the following changes are made in react_client.dart:
[x] changing the is _CallbackRef check to is _CallbackRef
[x] removing the as dynamic cast in the ref invocation

+10 - typo fixes do not impact QA


how to call a function of MessageComponentInterface class from another place ?

how can i get live object of MessageComponentInterface class from another place in my project to send a notification to some clients ? i created a new object of WebSocketCon ( $ws = new WebSocketCon(); ) but it does not have any clients!
here is my WebSocketCon class :
<?php
use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;

class WebSocketCon implements MessageComponentInterface {
    protected $clients;
    public $users;

    public function __construct() {
        $this->clients = new \SplObjectStorage;
        $this->users = [];
    }

    public function onOpen(ConnectionInterface $conn) {
        $this->clients->attach($conn);
        echo "New connection! ({$conn->resourceId})\n";
    }

    public function onMessage(ConnectionInterface $from, $msg) {
		$data = json_decode($msg);
		if($data->command=="subscribe"){
			$this->users[(int)$data->uid] = $from;
			echo "New subscribe! ({$data->uid})\n";
		}
    }

	public function sendMessageToAll($msg){
		foreach ($this->clients as $client) {
            if ($from !== $client) {
                $client->send($msg);
            }
        }
	}

	public function sendMessageTo($idusers,$msg){
		foreach ($idusers as $idu) {
			$idu = (int) $idu;
			if(array_key_exists($idu,$this->users)){
				$this->users[$idu]->send($msg);
			}
        }
	}

    public function onClose(ConnectionInterface $conn) {
        $this->clients->detach($conn);
		if (($key = array_search($conn, $this->users)) !== false) {
			unset($this->users[$key]);
		}
        echo "Connection {$conn->resourceId} has disconnected\n";
    }

    public function onError(ConnectionInterface $conn, \Exception $e) {
        echo "An error has occurred: {$e->getMessage()}\n";

        $conn->close();
    }
}

and here is my cmd.php :
<?php
require 'vendor/autoload.php';

use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
require 'classes/WebSocketCon.php';

$server = IoServer::factory(
    new HttpServer(
        new WsServer(
            new WebSocketCon()
        )
    ),
    8081
);

$server->run();
?>

Duplicate issue, answered here


Python code analysis very slow

Local changes like adding a new line or altering "if i > 0:" to "if i < 0:" in a file should not cause a cascading reevaluation of several files in a project. It takes up to 10 seconds of checking other files to verify that adding a new line did not break the code. The time needed seems dependent on the imports - edits in some files are checked immediately, edits in others not.

@excubo-jg Could you set your Log Level to Trace and share the pylance logs?

Both logs are written after setting the log level to triage. Once the initial analysis has run its course a blank line (hitting return) is added in step.py. I have put a note in the logs when this happens. The logs then show the activity until the system settles down again.
Initially behavior is that step.py is checked (not sure why constants.py is accessed). After working with VS for a couple of minutes it gets a bit anxious and starts checking other files which causes noticeable delay. The second log is captured after that change has happened.
inital.txt
broken.txt

@excubo-jg Thanks! If you set your Diagnostic mode to Open files only, do you still observe the same behavior? If the problem persists, to help us narrow down the problem, it would be helpful if you could provide us with a code sample that we can use to reproduce the issue.
Also, based on the logs, it appears that the issue might be related to Pylance rather than PTVS. Are you also encountering the same behavior in Visual Studio Code (VSCode) when Pylance is set as your Python language server? Thanks!

My Diagnostic mode had been set to Open files only.
I have attached another log file which covers the time beginning with opening the project. The last change I did was adding an empty line to check if the delays were reproducible and I then stopped the logging.
full_log.txt
I am not using VSC with this project so I cannot comment.

Looks like pylance is taking a long time to analyze the play_turn.py file. Not sure why. If you could share that code or provide a file that repros the problem, that would make it possible for us to possibly figure out what is taking so long.

Thanks, without the code sample, I'll do my best to understand the issue you're facing. If I understand correctly, you're saying with the diagnostic mode set to Open files only, modifications made to an open file are causing Pylance to analyze and check other closed files as well. Is that correct?

Apologies, no, this is not what I was pointing at. [ I just tested it and with open files only, the diagnostics is only done on open files. With the setting workspace, also closed files are checked. ] What I am observing is that adding a new line in a file causes checks to be done on several other files. You can see in the log files I provided earlier, that numerous files are accessed although there is no reason to do so. And, if these checks take several seconds to run the user experience deteriorates.
To provide you with a code sample, I just downloaded this repo https://github.com/Extrality/AirfRANS and installed it locally. With the diagnostic mode set to workspace, inserting a blank line in metrics.py in line 11 causes several files to be checked and these warning messages:
Info: (11244) [BG(1)] Long operation: getSemanticTokens delta previousResultId:1686161700673 at c:\Users\Admin\Documents\Visual Studio 2022\Projects\AirfRANS-main\metrics.py (2542ms)
Info: (11244) [BG(1)] Long operation: checking: c:\Users\Admin\Documents\Visual Studio 2022\Projects\AirfRANS-main\main.py (2011ms)
I hope this clarifies things

Thanks, if you set diagnosticMode to "workspace" and modify one file, pylance will reanalyze the modified file and any files that depend on it, especially if it's a source file that many other files depend upon, then all dependent files require reanalysis.  If you encounter any further issues related to the language server, I would recommend creating a ticket at the Pylance repository (https://github.com/microsoft/pylance-release). The Pylance repository is dedicated to addressing issues specific to the Pylance language server.


Vanilla Envoy, Connection Drops, and v2 xDS API

While debugging GH-279 we hit a fork in the road where there are two options:

Wait for Envoy upstream to help us understand what is wrong.
See if the behavior is also exhibited when using the v2 xDS mechanism.

We know that our reliance on v1 config hot reload is not desirable long term. There are four outcomes that can come from reporting the issue upstream.

Envoy upstream determines it is a bug in Envoy itself and prescribes a fix.
Envoy upstream determines it is a misconfiguration and explains how we can fix it.
Envoy upstream determines this is expected behavior of static config reloads and that the proper way to do what we want is use the v2 xDS API therefore we need to work on porting to v2 xDS to properly fix GH-279

Outcomes 1 and 2 are effectively wait and see. We know in the long term we need to tackle 3 no matter what so this is a spike task to figure out if xDS v2 solves our problem in which case we will likely strongly consider moving xDS v2 implementation up in the priority chain.
Goals

Use vanilla Envoy
Configure vanilla Envoy to use a simple xDS v2 that implements only CDS (either standalone or using ADS protocol)
Ability to add / remove cluster records from CDS.
Test if Envoy exhibits dropped connections when adding and removing cluster records from CDS.

Non-Goals

Port Ambassador to use xDS v2. We want to keep the experiment simple and targeted.
Writing code for future reuse (favor speed of task completion rather than reuse).

https://github.com/datawire/ambex has the code, the README, etc. -- but, as expected, no connection drops with the ADS.

Going to close this since we've verified what we needed to, I think. Reopen if need be.


Create Excel Sheet for Domain Names with "Focus" Prefix

Description:
We need to create an Excel sheet that lists all the domain names owned with the prefix "Focus". The sheet should have the following columns:

Domain Name: The domain name starting with "Focus".
Description: A brief description of the domain name.
Keywords: Related keywords for the domain name.
Status: Indicates if the domain name is purchased or not.

Domain Names to Include:

focusapp.org
focusapps.org
focusbuzz.org
focuscell.org
focuschef.com
focuscoin.org
focusguide.org
focushive.com
focushive.org
focushub.org
focusjam.com
focuspass.com
focuspath.org
focustracker.org
focustrack.org
focuswallet.org

Acceptance Criteria:

An Excel sheet with the specified columns.
Each domain name listed in the first column.
Appropriate descriptions and keywords for each domain.
Status column indicating if the domain is purchased.

Additional Notes:

Use placeholder text for descriptions and keywords if not available.
Mark all domains as "Purchased".

Attachments:

None

Labels:

Documentation
Excel
Domains

Excel Sheet Structure

Domain Name
Description
Keywords
Status

focusapp.org
Description here
keyword1, keyword2
Purchased

focusapps.org
Description here
keyword1, keyword2
Purchased

focusbuzz.org
Description here
keyword1, keyword2
Purchased

focuscell.org
Description here
keyword1, keyword2
Purchased

focuschef.com
Description here
keyword1, keyword2
Purchased

focuscoin.org
Description here
keyword1, keyword2
Purchased

focusguide.org
Description here
keyword1, keyword2
Purchased

focushive.com
Description here
keyword1, keyword2
Purchased

focushive.org
Description here
keyword1, keyword2
Purchased

focushub.org
Description here
keyword1, keyword2
Purchased

focusjam.com
Description here
keyword1, keyword2
Purchased

focuspass.com
Description here
keyword1, keyword2
Purchased

focuspath.org
Description here
keyword1, keyword2
Purchased

focustracker.org
Description here
keyword1, keyword2
Purchased

focustrack.org
Description here
keyword1, keyword2
Purchased

focuswallet.org
Description here
keyword1, keyword2
Purchased

Link:
Overview Excel Sheet

The excel sheet is created where the first column has the preliminary Focus names. I will work on updating the description and keywords. I will search for other domain names that start with Focus and add them to the sheet. I will continue brainstorming with teammates to discuss how the nav bar menu should look like.


bizarreness, constrained (logical-conflict)

This pull request was generated by the 'mq' tool

/trunk merge


modify name of CI workflow

Changes made:

modify the name of the 1st GitHub Actions workflow to "TDD Tests"
fix typos in README.md

Codecov Report

Merging #142 (ef7426e) into main (b6e2bd2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #142   +/-   ##
=======================================
  Coverage   95.90%   95.90%
=======================================
  Files           4        4
  Lines         293      293
=======================================
  Hits          281      281
  Misses         12       12

Continue to review full report at Codecov.

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


Plugin is incompatible with Packer 1.7

Please update the README file to make this more clear.
% packer build base.json
packer build base.json
Error: Failed to initialize build "veertu-anka"

error initializing builder 'veertu-anka': The protocol of this plugin (protocol
version 4 and lower) was deprecated, please use a newer version of this
plugin.Or use an older version of Packer (pre 1.7) with this plugin.

It seems that there are some plugin API changes in Packer 1.7, see https://github.com/hashicorp/packer/blob/master/CHANGELOG.md#backwards-incompatibilities.

Thank you for reporting! We are working on a version to address this right now. It should
Be out in a day or two. I'll post the link here once it's available.

Available in 1.8.0


fix: Adding screenreader text to the DevTools open icon

While testing our local site with our accessibility testing tool, we recieved the following error:
✗ Main Dashboard
  * Forms: Labelling form controls: Fields must have labels or titles
    - Button has no text: //div[@id='ReactQueryDevtoolsPanel']/div[2]/div[1]/button
    - Button has no text: //main[@id='main-content']/aside/button

The issue is that not all screenreaders support aria values, and so this test is checking that buttons at least have a text value within them, which can be visibility hidden if so required.
To resolve this, this PR adds visually hidden text to the button.
TODO:

[ ] I'm still working out if this is the best way of doing it (I haven't been through all of the code yet)
[ ] I need to test this locally to ensure it meets the requirements.

sorry this was auto closed. can you re-open the PR pointing to main please?

@nicholasgriffintn can you create a new PR to main please?

@nicholasgriffintn can you create a new PR to main please?

Sorry, missed this, I'll pick this up on Monday, I need to finish some testing off too :)

I've reopened this now, sorry for the delay, crazy week, I'm gonna try and validate this now or in the morning :)


In post process mask, why doing expand_masks and expand_box operation?

❓ Questions and Help
Hi, all, I have some puzzle about post process mask and box. is that, ther are some operation such as:
            padded_mask, scale = self.expand_masks(mask[None], padding=1)
            mask = padded_mask[0, 0]
            print(mask)
            box = self.expand_boxes(box[None], scale)[0]
            box = box.numpy().astype(np.int32)

            TO_REMOVE = 1
            w = box[2] - box[0] + TO_REMOVE
            h = box[3] - box[1] + TO_REMOVE
            w = max(w, 1)
            h = max(h, 1)
            mask = Image.fromarray(mask.cpu().numpy())
            mask = mask.resize((w, h), resample=Image.BILINEAR)
            mask = np.array(mask, copy=False)

            cv2.imshow('mm', mask)
            cv2.waitKey()

Simply, this is doing a expand (padding) operation on mask and box. But my question is, why doing this? I think this is time consuming and really not neccesary.

Hi,
This expanding happens because there are boundary effects that happens when simply upsampling the masks, and adding this padding solves that. Also worth noting that this is the default behavior of Detectron.
For a better / faster version of this code, check https://github.com/facebookresearch/maskrcnn-benchmark/pull/129 , which implements a dedicated kernel for computing the masks.
It currently gives very similar results to the approach we have now, but the results are not 100% the same, so I haven't merged it yet in master because it decreases mAP for masks by a few points.
Let me know if you have further questions, or if you'd be willing to try helping solve the boundary differences in #129 .

@fmassa I think I got it, just for mAP calculation more precisely and improve it.


i.CallClient is not a constructor error  in CallComposite

Describe the bug; what happened?

Azure Commuinication Call causing error when requesting call connection

I have followed the GetStarted - CallComposite
 thus updated the code on branch fix/azure-call-composite hoping this would solve the issue but no luck

Project environment

next: 12.3.4
node:  16.13.0
typescript: 4.7.4
react": 17.0.2,

Please help me out and check if I am doing something wrong with the way of using CallComposite component

example:
import { GroupCallLocator } from '@azure/communication-calling'
import { AzureCommunicationTokenCredential } from '@azure/communication-common'
import {
  CallAdapter,
  CallComposite,
  createStatefulCallClient,
  useAzureCommunicationCallAdapter
} from '@azure/communication-react'
import Loading from '@components/common/Loading'
import { mediaQuerySize } from '@constants'
import useResizeHandler from '@hooks/useResizeHandler'
import { log } from '@utils/log'
import { useTranslation } from 'next-i18next'
import { FC, useContext, useEffect, useMemo } from 'react'
import { Context } from 'src/context/ContextProvider'

interface Params {
  displayName: string
  isClosingAcs: boolean
  setIsClosingAcs: Function
  setIsModalOpen: Function
  communicationUserId: string
  credential: AzureCommunicationTokenCredential
  locator: GroupCallLocator
}

const AzureCommunications: FC<Params> = ({
  displayName,
  isClosingAcs,
  setIsClosingAcs,
  setIsModalOpen,
  communicationUserId,
  credential,
  locator
}) => {
  const { setGroupCallId, showCommunications, groupCallId } = useContext(Context)
  const { t } = useTranslation(['common'])

  const windowWidth = useResizeHandler()
  const isMobile = useMemo(() => windowWidth < mediaQuerySize.sm, [windowWidth])

  const statefulCallClient = createStatefulCallClient({
    userId: { communicationUserId }
  })

  const callAdaptorArgs = useMemo(
    () => ({
      userId: { communicationUserId },
      displayName,
      credential,
      locator
    }),
    [communicationUserId, displayName, credential, locator]
  )

  const adapter = useAzureCommunicationCallAdapter(
    callAdaptorArgs,
    async (adapter: CallAdapter): Promise<CallAdapter> => {
      console.log('afterCreate', adapter)
      return adapter
    },
    async (adapter: CallAdapter): Promise<void> => {
      console.log('beforeDispose', adapter)
      await adapter.leaveCall().catch((e) => {
        console.error('Failed to leave call', e)
      })
    }
  )

  useEffect(() => {
    if (adapter) {
      console.log(adapter)
      log('has callAdapter. add callEnded event')
      adapter.on('callEnded', (event) => {
        log('callEnded: ', event.callId)
        setGroupCallId(null)
      })
    }
  }, [adapter])

  useEffect(() => {
    if (isClosingAcs) {
      log('call disposed')
      setGroupCallId(null)
      showCommunications(false)
      setIsClosingAcs(false)
      setIsModalOpen(false)
    }
  }, [isClosingAcs])

  return (
    <>
      {adapter ? (
        <CallComposite adapter={adapter} formFactor={isMobile ? 'mobile' : 'desktop'} />
      ) : (
        <Loading message={t('common:call:initializing_call')} />
      )}
    </>
  )
}

export default AzureCommunications

What are the steps to reproduce the issue?
What behavior did you expect?

CallCompsite to run as expected

If applicable, provide screenshots:
In what environment did you see the issue?

@azure/communication-react npm package version: 1.4.1

@azure/communication-calling npm package version: 1.4.4

OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]

Browser: Google Chrome

Browser Version: 07.0.5304.110 (Official Build) (arm64)

Thanks for sharing this issue. I will be looking into it today.

Hello. I ran the storybook snippet code in a CRA instance and it worked for me. Perhaps there is more you can share about your setup? If there was a repo or something I can try out that would be helpful.
I did see you were using next.js for your project. I do know the calling sdk only works on the browser. So if you are trying to initialize things such as the CallClient but you are in Node as opposed to on the browser it could be an issue?
@henrynoowah

@alkwa-msft
Hi, thank you for the response,

I have checked that all Components using the SDK has been imported dynamically with ssr settings to false
All values that are used in adapter is also managed using useMemo hooks

😓 apologies for not being able to shaire the repo for internal reasons

@alkwa-msft
Hi, I have received a possible solution for this issue on https://github.com/Azure/communication-ui-library/discussions/2616#discussioncomment-4554346

I don't know why but the error is gone when I switch swcMinify: true to false in next.config.js Had similar experience with swcMinify conflicts with ACS before.

I still think it would be a improvement if this problem could be solved when swcMinify set to true when using Nextjs

Sounds like we currently have a mitigation which is fantastic! Created a new github issue for an SWC investigation https://github.com/Azure/communication-ui-library/issues/2620
This is definitely an interesting issue. It is a bit of a slippery slope as you can imagine customers may want us all to support every web framework that they may be using. The goal of this repo is creating a set of react Ui components to help power Azure Communications Services calls and chat experiences.  In this case we would have the UI Library support what we can as a React library but no explicit support for specific frameworks at this time such as Next.JS.
While technically Next.js uses React it also does other things such as bringing in swc and doing their own minification which is more challenging for us to support at this time. If we do find something we can definitely look into bug fixes with the UI Library.


Provide extra capacity for locations

Simulations with capacity-constrained locations can run into situations where there is not enough capacity. Citizens will then scramble for the last available spots in the location type, which can be at the other end of town. This can lead to unrealistic simulations. The capacity management already reports these situations in the mew output file 'capacityAllocationProblems.csv', which can then be used to calculate an extra 'factor' on top of the available square meters of the locations of that location type.

sizeFactor is now a column in the locationtypes.csv file. It is not compulsory to ad: if it is missing, '1.0' will be assumed as the sizeFactor. An example locationTypes csv file now looks as follows:
name,animationClass,reproducible,infectSub,infectTotal,contagiousRateFactor,infectionProbabilityFactor,capConstrained,capPersonsPerM2,sizeFactor
Accommodation,nl.tudelft.simulation.medlabs.location.animation.defaults.HouseAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.25,1.0
Workplace,nl.tudelft.simulation.medlabs.location.animation.defaults.WorkplaceAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
Retail,nl.tudelft.simulation.medlabs.location.animation.defaults.RetailAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.25,1.0
Mall,nl.tudelft.simulation.medlabs.location.animation.defaults.MallAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.1,7.4
BarRestaurant,nl.tudelft.simulation.medlabs.location.animation.defaults.RestaurantAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.5,1.0
FoodBeverage,nl.tudelft.simulation.medlabs.location.animation.defaults.FoodBeverageAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.5,1.3
Supermarket,nl.tudelft.simulation.medlabs.location.animation.defaults.SupermarketAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.2,9.7
Kindergarten,nl.tudelft.simulation.medlabs.location.animation.defaults.KindergartenAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
PrimarySchool,nl.tudelft.simulation.medlabs.location.animation.defaults.SchoolAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
SecondarySchool,nl.tudelft.simulation.medlabs.location.animation.defaults.SchoolAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
College,nl.tudelft.simulation.medlabs.location.animation.defaults.CollegeAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
University,nl.tudelft.simulation.medlabs.location.animation.defaults.UniversityAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
Religion,nl.tudelft.simulation.medlabs.location.animation.defaults.ReligionAnimation,TRUE,TRUE,FALSE,1,1,TRUE,0.5,1.0
Police,nl.tudelft.simulation.medlabs.location.animation.defaults.PoliceAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
FireStation,nl.tudelft.simulation.medlabs.location.animation.defaults.FireStationAnimation,TRUE,TRUE,FALSE,1,1,FALSE,0.5,1.0
Pharmacy,nl.tudelft.simulation.medlabs.location.animation.defaults.PharmacyAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.5,3.6
Healthcare,nl.tudelft.simulation.medlabs.location.animation.defaults.MedServiceAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.25,1.0
Hospital,nl.tudelft.simulation.medlabs.location.animation.defaults.HospitalAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.25,1.0
Recreation,nl.tudelft.simulation.medlabs.location.animation.defaults.RecreationAnimation,FALSE,TRUE,FALSE,1,1,TRUE,0.2,1.9
Park,nl.tudelft.simulation.medlabs.location.animation.defaults.ParkAnimation,FALSE,FALSE,FALSE,1,1,TRUE,0.1,1.0
Satellite accommodation,eu.heros.location.animation.SatelliteAccommodationAnimation,FALSE,FALSE,FALSE,1,1,FALSE,0.25,1.0
Satellite workplace,eu.heros.location.animation.SatelliteWorkplaceAnimation,FALSE,FALSE,FALSE,1,1,FALSE,0.25,1.0

sizeFactor implemented in the LocationType class, tested, and working correctly.


Implement converting Kage to shaderir.Program

https://docs.google.com/document/d/1yVfqWY6B-yF0H3NOVff3r791_n2zUu8BUWdW9TuEorw/edit?usp=sharing

Let's split this into concrete action items.


How to write or append data to an existing excel file in angular project say in asssets folder

Put the file in an exposed folder like /public and fetch it from your app, see the fetch demo for inspiration


luci-app-olsr: migrate to JavaScript-based implementation

https://github.com/openwrt/luci/assets/91346165/ec75e0a1-942f-4197-830e-130957135dc6
Hi! I've almost completed the migration of luci-app-olsr to JavaScript. Most of the features are functioning just like they did in the old Lua app. There are only two minor bugs remaining in the status views, which I will make sure to fix soon.
You can review the changes and please provide any suggestions or improvements. Since this is a very large application, I believe there is ample scope for feedback.
During the migration, I implemented a new RPCD and made changes to how plugins and their configurations were handled in the old app. I have implemented plugin configuration using the previous approach used for interfaces.
Most of the work is complete and functional. I am also uploading a screencast for reference. Fixes #5363
Thank you for your time!

And one issue is the null that you can see in the screencast in some of the status views, which is actually the hostname that I'm attempting to obtain using hosthints.getHostnameByIPAddr(v.gateway). We're getting the data and hosthints successfully, as can be seen in the screenshot, but it's still returning null, meaning that the hostname not known .
It's used in other apps like this. But I'll attempt to fix it as soon as possible.

					network
						.getHostHints()
						.then(function (hosthints) {
							modifiedData = data.map(function (v) {
								if (resolveVal === '1') {
									var hostname = hosthints.getHostnameByIPAddr(v.gateway);

Looks good! You should deal with the empty hostnames by doing something like hostname || '?' when outputting them.
I see you do something like x = '' + v.hostname + ''; in various places. This will allow for XSS injections if someone broadcasts packets containing forged hostnames into the network. Ideally use LuCI's builtin format function together with the %h and %q placeholder which take care of HTML- and quote-escaping their arguments respectively:
x = '%h'.format(v.hostname, v.hostname);

Looks good! You should deal with the empty hostnames by doing something like hostname || '?' when outputting them.
I see you do something like x = '' + v.hostname + ''; in various places. This will allow for XSS injections if someone broadcasts packets containing forged hostnames into the network. Ideally use LuCI's builtin format function together with the %h and %q placeholder which take care of HTML- and quote-escaping their arguments respectively:
x = '%h'.format(v.hostname, v.hostname);

I fixed that for every instance of the hostname.

Hi! @jow- @aparcar @feckert  Now it's ready for review; I fixed all of the bugs, including the Hostname. Everything is functional, and we tested the package for the last 2 weeks and tried to resolve every issue. Could you please review? Thanks

@jow- @aparcar can you please take a look on that PR?
for me it looks good

@andibraeu - I don't have the means to runtime test but if you say it's fine then I'll go ahead and merge it. @Ayushmanwebdeveloper - thanks a lot for your effort!

Hi all,
Just flashing our Freifunk Evernet last nigth with current OpenWrt trunk and Luci we run into the following issue, that might belong to this commit:
after flashing trunk, the LUCI webinterface did only show olsr status - no menu for admin/network & co anymore:

After deinstalling luci-app-olsr the Luci webinterface went back to a normal menu:

Any hints ?
Greets Bluse

Hi all,
Just flashing our Freifunk Evernet last nigth with current OpenWrt trunk and Luci we run into the following issue, that might belong to this commit:
after flashing trunk, the LUCI webinterface did only show olsr status - no menu for admin/network & co anymore:

After deinstalling luci-app-olsr the Luci webinterface went back to a normal menu:

@andibraeu @jow- any hints from the experts ? (seems like something is overloaded by luci-app-olsr)
Greets Bluse

Hello! We migrated the app such that status views are exposed to the public, which means they can be accessed without authentication.
Particularly in this openwrt theme, you can return to admin by choosing Administration in the bottom right area of the page.

In the Freifunk or Material theme everything works okay as shown in my screencast.

Hiho
The button OLSR | ADMINISTRATION is nether on theme material nor on bootstrap visible on our side:

There is no exit to the admin web interface available as long as luci-app-olsr is installed.. ?
Greetz Bluse


Introduction of an  API of adding dxf content.

Getting rid of concatenation of the dxf content.
Introduction of an  API of adding dxf content.
fixing issue #53.

So many changes, is that version 2 candidate?

No it is not for version 2. just new interface for adding tags
I change this:
toDxfString()
  {
      //https://www.autodesk.com/techpubs/autocad/acadr14/dxf/line_al_u05_c.htm
      let s = `0\nARC\n`;
      s += super.toDxfString()
      s += `8\n${this.layer.name}\n`;
      s += `10\n${this.x1}\n20\n${this.y1}\n30\n0\n`;
      s += `40\n${this.r}\n50\n${this.startAngle}\n51\n${this.endAngle}\n`;
      return s;
  }

to:
 tags() {
      const manager = new TagsManager();

      //https://www.autodesk.com/techpubs/autocad/acadr14/dxf/line_al_u05_c.htm
      manager.addTag(0, "ARC");
      manager.addTags(super.tags());
      manager.addTag(8, this.layer.name);
      manager.addPointTags(this.x, this.y);
      manager.addTag(40, this.r);
      manager.addTag(100, "AcDbArc");
      manager.addTag(50, this.startAngle);
      manager.addTag(51, this.endAngle);

      return manager.tags();
  }

This is about a clean interface.
I don't like that concatenation 😉
This commit has no breaking changes of the public api, is internally.


fix(frontend): Adding command slash on config ESP #465

fix(frontend): Adding command slash on config ESP #465
What does this PR do?

resolves #465

Steps to test

Go to tools
Go to Readme
Reload the page
Check don't appear the slash

CheckList

[X] Follow proper Markdown format
[X] The content is adequate
[X] The content is available in both english and spanish
[X] I Ran a spell check

Yes, i verified with @fvives99


Add support for lime.ui.FileDialog in HTML5

Great!

@varadig @jgranick FileDialog open / browse can be called only after you click on the input element. If I'm not mistaken, some browsers also allow mouse / keyboard events to be used to emulate the call to the file selection window.
I think the safest option is to provide the API with the creation of an input element for a multi-platform and cross-browser solution.
FileDialog.save does not cause problems:
Https://github.com/eligrey/FileSaver.js/

Yes I simulate the click event for InputElement:
https://github.com/openfl/openfl/issues/1554#issuecomment-295382382

Adding a comment to show my interest in this enhancement.


Adding ACC test suite

Adding ACC tests. Files added:

run_acc_tests script: this script installs OE on a Node
sgx_tests: this script runs ACC test cases.

@shruti25ratnam do we need keep it? if not, please kindly close it. thanks.

Merged in another PR.


Add contributing section on code review

Summary
The text here is looking predominantly at what should (and shouldn't) be the subject of a code review, and how both the reviewer and PR author should try and behave to make things nicer and more useful for everyone.
Details and comments
Close #6641 (replaces it).  I've tried to incorporate much of what was already in that PR and suggested on that PR, though I cut down some of the "internal" details about who constitutes a maintainer, etc, which might be a bit more appropriate for a governance document.
cc: @1ucian0, @javabster - probably you two want to look at this with your community / dev-rel hats on.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
26 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.03%) to 85.888%

Files with Coverage Reduction
New Missed Lines
%

crates/qasm2/src/expr.rs
1
93.76%

crates/qasm2/src/lex.rs
7
90.63%

crates/qasm2/src/parse.rs
18
96.67%

Totals

Change from base Build<PHONE_NUMBER>:
-0.03%

Covered Lines:
73057

Relevant Lines:
85061

💛  - Coveralls


Issues with interactive-image-buider "typing"

When working with the interactive-image-builder if you attempt to type a number before the script finishing "typing" the number you type will not appear in the UI, but it appears to still register it.  So if you attempt to type the number it throws an error because it thinks you provided an invalid option:

Yeah, I know. What I don't know how to do is how to prevent keys typing from register while the text is displayed.
I can always disable the type-writer effect, but that's cool... :smile:
People, please upvote or downvote this comment if you want me to keep or remove the effect. Which you can do by yourself anyway by editing the last function in helper-functions (simply set delay to 0).

upvote or downvote this comment if you want me to keep or remove the effect.

keep type-writer effect: thumbs up on Guillome's comment
remove type-writer effect: thumbs down on Guillome's comment
I started. And you are right, it is overall a minor issue, can be fixed manually, yet potentially confusing users


OFFBOARD mode docs

Hi,
I would like to get some info regarding the OFFBOARD mode, pointing out:

[x] How to activate it in QGS and how to properly configure an RC switch to it (since http://pixhawk.org/users/system_modes/mode_switch_config doesn't make reference to OFFBOARD mode)
[x] How it is implemented, i.e. if I switch to it (via RC switch or QGC), what's it's behaviour? Does it stay in position hold and hovering waiting for offboard commands?

Regarding offboard2_externalsetpointmessages and https://github.com/PX4/Firmware/pull/1151:

[ ] Is it already testable and how can it be tested (a proper procedure to test it based on OFFBOARD behaviour currently implemented)
[x] What kind of control can already be issued? pos, vel (linear and angular=attitude rate), accel,... ?

@LorenzMeier, @thomasgubler can you give some points here? If you give some guidelines regarding the above I wouldn't mind to do get some documentation ready to add to PX4 docs.
Thanks in advance!

Hi @TSC21 ,
what is the firmare version you used for px4 offboard test?

@dreamkeep this thread is kinda hold but right now you can use current master to do offboard control.
I'm closing this since it's already documented in https://pixhawk.org/dev/offboard_control and https://pixhawk.org/dev/offboard_control/testing.


Update material-components-web to v10.0.0

Feature request
We should update all material web components to the latest version 10.0.0 to benefit from the latest features and bug fixes.

As v13 is already released, we close this and upgrade to v13 instead.


feat: implement conflict checker

Please briefly answer these questions:

what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?)
Implements the conflict checker. It is a replacement for the `conflict_checked_mpmc in the upcoming refactor.

what changes does this pull request make?
Implements the conflict checker

are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc)
No

The conflict checker seems no longer needed in the upcoming refactor, I'll convert it to draft for now.

This PR is no longer required due to another refactor.


SelectableText can't be copied on web easily

When making a flutter web application you cannot copy the text by dragging the cursor over the text and selecting copy. You cannot select more than one word at a time.  This issue has been well documented in other bug reports; they have been closed with no solution. I would expect by using the selectable text widget,  it would make the text easily selectable for the end user. Which is not the case when using for websites. The problem only seems to occur when compiling flutter for the web.
Steps to Reproduce

Execute flutter run on the code sample

 import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: SelectableText("Selectable text"),
    );
  }
}

You'll notice how when you drag your cursor over it you cannot highlight select and copy the text like a normal website.
More examples
This widget is pretty straightforward
    import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',

      home: SelectableText("Selectable text",
        cursorColor: Colors.red,
        showCursor: true,
      ),
    );
  }
}

Here is a very similar issue.
Text is not selectable by default on the web #32246

Logs

[✓] Flutter (Channel stable, 2.10.3, on Linux Mint 20.3 5.4.0-104-generic, locale en_US.UTF-8)
    • Flutter version 2.10.3 at /home/misty/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (3 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /home/misty/Android/Sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /home/misty/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.8139111/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

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

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/misty/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7935034
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] Android Studio (version 2021.1)
    • Android Studio at /home/misty/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.8139111
    • Flutter plugin version 65.2.2
    • Dart plugin version 211.7808
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.65.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Linux Mint 20.3 5.4.0-104-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 99.0.4844.82

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

• No issues found!

I ran the code on dartpad https://dartpad.dartlang.org/?id=fae06b611c183f329d7aa2b4cf116788, and i was able to drag and select the text as well as right click to copy from the context menu. Can you provide a more detailed steps to reproduce the issue you were seeing?

drag your cursor over the text highlight the text

I assume this is working for you too?

copied into clipboard

I can copy by right click context menu -> copy. Or is there a specific way to copy text that doesn't work?

Dart pad does not seem to have the same issue for whatever reason.
https://user-images.githubusercontent.com/97707491/159373981-a0dc4d5e-b426-4ebe-ab28-bcb86829accd.mp4
As you can see, when I drag the cursor over it I cannot get any thing selected or copy and paste anything into the clipboard.

I still can't reproduce it

can you try to run the code at the latest master branch? Also I am running chrome on macOS, what is the platform you are using

Are you able to select both at once?
• Linux (desktop) • linux  • linux-x64      • Linux Mint 20.3 5.4.0-104-generic
• Chrome (web)    • chrome • web-javascript • Google Chrome 99.0.4844.82
That's strange. I'm currently using Linux and I'm currently using Chrome.

I was able to get this to work on Firefox now so I guess this may be a chrome bug.

So to get this to work on Chrome should I just wait for a bug fix?

@qwerty108109 I don't have linux to test, I can't reproduce it on my side. defer this to Web team. CC @mdebbar @yjbanov

I am unable to reproduce the issue on Windows or Linux on the latest stable 2.10.3. I am able to select and copy any part of the SlectableText
Ubuntu
https://user-images.githubusercontent.com/31410839/159691096-1247a835-4b84-468e-b918-48f1d55a4b30.mp4
Windows
https://user-images.githubusercontent.com/31410839/159690468-6935de55-a6e5-4be2-a1a7-4ad262d2f321.mp4

flutter doctor -v (windows)
[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.19044.1526], locale en-US)
    • Flutter version 2.10.3 at C:\flutter_sdk\stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (14 hours ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\mahesh\AppData\Local\Android\sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.11.31727.386
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.64.2)
    • VS Code at C:\Users\mahesh\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.36.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19044.1526]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 98.0.4758.102
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 98.0.1108.56

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

• No issues found!

flutter doctor -v (Linux)
[✓] Flutter (Channel stable, 2.10.3, on Ubuntu 20.04.4 LTS 5.13.0-30-generic, locale en_GB.UTF-8)
    • Flutter version 2.10.3 at /home/mahesh/Development/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (13 days ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/mahesh/Android/Sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /home/mahesh/Downloads/android-studio-2<IP_ADDRESS>-linux/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

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

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/mahesh/Downloads/android-studio-2<IP_ADDRESS>-linux/android-studio
    • Flutter plugin version 63.2.1
    • Dart plugin version 203.8452
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.64.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 20.04.4 LTS 5.13.0-30-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 98.0.4758.102

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

• No issues found!

Having the same issue on Chrome, can't select text anymore. Double clicking on text doesn't do anything either.

Just tried it on Linux in Chrome 100.0.4896.60. Everything works as expected. I tried drag to select one word, multiple words, double-click to select one word, copying text for all types of selections made. It all works.

@maheshmnj Didn't see your comment, sorry. I'm think it still worked on 2.10.0
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.0.1 21A559 darwin-x64, locale en-GB)
    • Flutter version 2.10.4 at /Users/glennruysschaert/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (4 weeks ago), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/glennruysschaert/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

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

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

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

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

[✓] Connected device (3 available)
    • SM S908B (mobile) • R5CT1359BMA • android-arm64  • Android 12 (API 31)
    • macOS (desktop)   • macos       • darwin-x64     • macOS 12.0.1 21A559 darwin-x64
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 100.0.4896.127

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

@vixez do you mean it works on 2.10.0 and and doesn't work on stable 2.10.4? If so, Can you share a video recording of the behavior you are seeing?

@maheshmnj Hello, yes.
As you can see in the video, double clicking selects the text, but dragging the cursor doesn't work
https://user-images.githubusercontent.com/3032294/165061370-95cf8d6a-3a33-4516-8e2a-b9efebb1b7d3.mov

I can't reproduce this on latest flutter (2.13.0-0.0.pre.923) with Chrome 101.0.4951.41 and MacOS 12.3.1

This is in a table
TableCell(
                      child: Padding(
                        padding: const EdgeInsets.fromLTRB(
                          0,
                          kDefaultScreenPaddingHalf,
                          0.0,
                          kDefaultScreenPaddingHalf,
                        ),
                        child: SelectableText(
                          value,
                          style: rightTextStyle,
                        ),
                      ),
                    )

@vixez Please file a separate issue will all the details requested in the issue template along with a minimal and complete code sample which we can directly run with minimal or no code changes.


feat(compatibility): add zkSync support

Component
Forge
Describe the feature you would like
Foundry zkSync Support
To enable Foundry compatibility with zkSync, we created the fork https://github.com/matter-labs/foundry-zksync. This fork introduces changes to support smart contract compilation, deployment, testing, and interaction on zkSync Era.
This feature request is a proposal to integrate zkSync support into Foundry. It details an approach designed to be minimally invasive, complemented by a subsequent request for zksolc support in foundry-compilers. For more info related to zksolc please refer to here, and here.
Objective
The goal is to integrate zkSync support into Foundry, facilitating community and maintainer dialogue on how best to have these changes accepted.
Below is a brief outline on the differences that are accounted for in the proposed approach.
Differences
zkSync VM
The zkSync VM is fundamentally different from the EVM, in it, it uses an entirely different register-based architecture.
Storage
The Storage is as well different from the EVM's account based trie. In the zkSync VM there's a single global trie. Account balances, nonces, etc. are stored under the hashes slots for special system contracts.
Bytecode
Owing to a different VM, the corresponding bytecode is as well different than what is compiled with solc. In comparison, the zkSync VM is compiled with zksolc, which supports all opcodes, with a few exceptions.
Proposed Approach
1. Compilation
The foundry-identified files are passed through zksolc to generate zkSync VM bytecode. This was then matched using the contract's name with its respective EVM/solc counterpart - finally giving us a DualCompiledContract containing both evm and zk bytecodes and their respective hashes (which also differ in how they are computed). This "registry" of compiled contracts was propagated down to the Executors and to the tracers to perform specialized operations in the context of interoperability between the two scopes, namely EVM and ZK.
We're currently in the process of migrating the compilation logic to foundry-compilers, but the concept of compiling the same contract for both environments and passing it down to the internals would probably remain.
2. forge
The proposed approach leverages the CheatcodeTracer and an early implementation can be reviewed on the dev branch of foundry-zksync.
Consider the following contract:
contract Counter {
    uint256 value;

    function setValue(uint256 _value) {
        value = _value;
    }

    function getValue() view returns (uint256) {
        return value;
    }
}

contract CounterTest is Test {
    Counter counter;

    function setUp() {
        counter = new Counter();
    }

    function testSetValue() {
        counter.setValue(10);
        assertEq(10, counter.getValue());
    }
}

We assume the test contract is being tested for deployment on zkSync.

Foundry compiles the test suite with solc and then zksolc. Both bytecodes are bundled as DualCompiledContract and passed down to the Executor, till the CheatcodeTracer.
All interactions from the default CALLER account to the deployed test contract (including ensure_success calls) are handled as normal EVM calls. Except,

address.balance , which are intercepted as opcodes and retrieve the data from ZK-storage
block.timestamp, block.number, which are updated with the ZK-specific context on the Env directly.

Any CALL or CREATE is intercepted in the tracer (with call and create hooks) and translated into a ZK transactions. This includes

Fetching ZK-equivalent bytecode
Fetching correct account nonce, etc.
Marking the callee as EOA (in ZK terms) to bypass EIP-3607 restriction

The transaction is then sent to ZK-VM where it returns the statediff, which is applied on the journaled_state, and the result returned back.
Any console.log() in the ZK-VM execution is translated back for foundry to pick up

This forms the basic premise of our implementation that foundry gets to do foundry-specific operations, and only at the necessary stage with invoke the zkSync VM when passing the --zksync flag.
Challenges

The above use-case assumes forge test case. A similar strategy would be required in forge script.
An executor must be context-aware to set_balance and set_nonce on the correct form of storage - EVM or ZK
Certain cheatcodes like warp, deal, etc. must be context aware to set correct storage - EVM or ZK
Certain functionalities like expectCall must be supported by the ZK tracer to return the appropriate data back to foundry's CheatcodeTracer to evaluate their success.

Plan
Feature Flag
It is proposed to put all zkSync related features behind a zksync feature flag. Rust nightly would be required to compile with this flag, as the zksync libraries currently depend on nightly rust.
Foundry zkSync
A single foundry-zksync module will contain all zkSync specific logic, and translations. Other parts of foundry source will simply use this module.
Foundry Compilers
zksolc compilation would initially be added to foundry-compilers that would later be used in foundry.
Forge Commands
Forge commands like test, create, build, script would be incrementally supported as pull requests.
Conclusion
This is obviously the result of work and testing over several months, and is offered as the best case from our current perspective to integrate foundry into the zkSync ecosystem, while maintaining the same level of foundry's user experience. On that front, we'd like to get the thoughts of foundry developers on anything we may have missed, misunderstood, or vaguely underestimated, in our proposed implementation.
Contributors
@aon, @Deniallugo, @dutterbutter, @HermanObst, @Jrigada, @Karrq, @nbaztec
Additional context
No response

@nbaztec we're supportive in adding such and rolling it in post v1, reviewed https://gist.github.com/nbaztec/205ac47e8e68bbb3264402965816a413 and would like to continue discussion here on impl.
CC @zerosnacks @klkvr @DaniPopes

My preference goes to strategy 1a using generics: https://gist.github.com/nbaztec/205ac47e8e68bbb3264402965816a413#method-1-strategy for performance reasons + type safety at compile time over 1b given that it is not necessary to switch between strategies at runtime. One of my concerns is that the change would be quite invasive making it challenging to roll out in parts. A practical next step could be for ZKSync to implement an example in a draft PR exploring the integration as well as verifying the proposed workaround of Arc/Arc<Mutex<_>> containers with an example.

A practical next step could be for ZKSync to implement an example in a draft PR exploring the integration as well as verifying the proposed workaround of Arc/Arc<Mutex<_>> containers with an example.

Yup, that's our plan. We're currently analyzing the areas where the implementation paths diverge, and want to initially build a PoC that would at least demonstrate the required abstractions. For that PoC we may probably use dynamic dispatch, as it's easier to implement, and then it will be rewritten to use static typing.

We have an example PR that I made in the making of the abstraction doc using dynamic dispatch (as it involved the least amount of code changes) here https://github.com/matter-labs/foundry-zksync/pull/692/files
It's currently not tracking the latest main but captures the essence of the implementation.

@nbaztec is it possible to prepare a benchmark that would show whether trait objects involve any kind of performance penalty? E.g. with your PR above, you can write a benchmark and run it against upstream code and trait-based implementation.

@popzxc Yes I believe the foundry team also has a benchmarking which I saw being done on certain PRs. We'd definitely be running the dynamic dispatch approach with native foundry to figure out the performance hit.


endpoint: Fix nil pointer panic when L7 proxy is disabled

This fixes an issue where Cilium tries to add a visibility redirect even
if the proxy is disabled, causing nil pointer panic.
Fixes: #18773

/test

Failure looks legitimate. Putting back into draft.


Default scope should match current application scope

This is more of an enhancement request than a bug but opening Xplore defaults to the Global scope and should default to the current selected application scope in ServiceNow.

Xplore application scope now defaults to the current user application scope.
A new setting has been added to revert to previous behaviour and always load in global scope.

Implemented with option to have global instead if you prefer.


Disclosable DID DHT Documents

Overview
tl;dr only publish signed commitments to DID Documents instead of encoded documents
There are two use-cases where this might be useful

Large DID Documents
DID Documents that want to be publicly discoverable (and verifiable) but privately shareable

The latter case is mostly useful for discover in the case of uses with type indexing or alias schemes (#77)
Proposal
The proposal is as follows:
Create a Disclosable DID DHT Document

Create a DID DHT Document
Create a hash of the document - this could optionally be salted if we believe plaintext attacks to be of concern
Encode a minimal DNS packet that contains only the hash value
Publish to the DHT as normal

Resolve a Disclosable DID DHT Document

Resolve the DID Document from the DHT
Verify its signature
...
Have the controller of the DID Document send the revealed DID Document and salt if available
Re-compute the hash and compare it to the record from the DHT

Alternate proposal
There is a possible modification to this proposal that reduces the need for a holder to transmit the DID Document to a resolver, which is to rely on a secondary storage mechanism. Alongside the hash DNS record would be a record to a storage system to retrieve and verify the full DID Document. A nice property is that the storage does not need to be trusted as tamper evidence is still provided by the DHT.
Sample Code
This code is a bit contrived. In reality there is no reason to sign the hash separately from the BEP44 packet, unless there is utility in being able to share the document without publishing it to the network.
package main

import (
    "crypto/ed25519"
    "crypto/rand"
    "crypto/sha256"
    "encoding/hex"
    "fmt"
)

// GenerateKeyPair generates a new Ed25519 public/private key pair.
func GenerateKeyPair() (ed25519.PublicKey, ed25519.PrivateKey, error) {
    publicKey, privateKey, err := ed25519.GenerateKey(rand.Reader)
    if err != nil {
        return nil, nil, err
    }
    return publicKey, privateKey, nil
}

// CommitToDocument creates a "commitment" to the DID Document using a hash function.
func CommitToDocument(doc string) string {
    hasher := sha256.New()
    hasher.Write([]byte(doc))
    return hex.EncodeToString(hasher.Sum(nil))
}

// SignCommitment signs the commitment with the private key.
func SignCommitment(commitment string, privateKey ed25519.PrivateKey) ([]byte, error) {
    sig, err := privateKey.Sign(rand.Reader, []byte(commitment), nil)
    if err != nil {
        return nil, err
    }
    return sig, nil
}

// VerifyCommitmentSignature verifies the signature of the commitment.
func VerifyCommitmentSignature(publicKey ed25519.PublicKey, commitment string, sig []byte) bool {
    return ed25519.Verify(publicKey, []byte(commitment), sig)
}

func main() {
    // Simulating a DID Document
    didDocument := `{"id":"did:example:123","publicKey":"...","authentication":[...]}`

    // Generate key pair
    pubKey, privKey, err := GenerateKeyPair()
    if err != nil {
        fmt.Println("Error generating keys:", err)
        return
    }

    // Create a commitment to the DID Document
    commitment := CommitToDocument(didDocument)
    fmt.Println("Commitment:", commitment)

    // Sign the commitment
    sig, err := SignCommitment(commitment, privKey)
    if err != nil {
        fmt.Println("Error signing commitment:", err)
        return
    }
    fmt.Println("Signature:", hex.EncodeToString(sig))

    // Verify the signature
    verified := VerifyCommitmentSignature(pubKey, commitment, sig)
    fmt.Println("Signature verified:", verified)
}

Some general feedback for this thorough proposal (nice work!)
Did you consider using a DID extension to solve the Large DID Documents use-case? If so, what tradeoffs did you find?
I didn't quite understand the second use-case. Would you mind sharing an example?
Re: the section named "Resolve a Disclosable DID DHT Document" has the first step as "Resolve the document from the DHT".  In the latter statement, is Document used to mean something different from "DID Document"? If so, I would recommend using different terminology to avoid confusion.
Another question, how would updates work?

DID extension to solve the Large DID Documents use-case

Hmm could you expand on what you mean by this?

I didn't quite understand the second use-case. Would you mind sharing an example?

Yeah, so for example if someone is using type indexing to advertise that they're a PFI they would still want to publish to the DHT so that gateways return their DID when they get queries for "show me all DIDs that have registered as a PFI type". They still might have a large document that's stored elsewhere, but would want to publish to the network.
I updated to the language everywhere to say "DID Document" which was my intent.

Another question, how would updates work?

As they do today, except an update would point to a new commit value.

DID extension to solve the Large DID Documents use-case

Hmm could you expand on what you mean by this?

Something similar to what linkedResource. So if I have a DID Document that's too big, I can move most of the properties and values from the Document and into a linked resource. Can also attach proofs to the linkedResource.
Another similar approach is what subresource integrity does.

yes, both those approaches could work. I suppose it's a question of is this better to handle at the DHT layer or the DID Doc layer.


framesh: init at 0.5.0-beta.19

Description of changes
Added a package for frame as requested by #168384
Went with framesh as opposed to frame to avoid collision with existing package in nixpkgs.
Decided to package the appimage as opposed to building from source since releases are provided this way, have tested this release for a while with no problems, and I personally find it cumbersome to deal with npm derivations.
Things done

Built on platform(s)

[x] x86_64-linux

[x] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[x] (Package updates) Added a release notes entry if the change is major or breaking
[x] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Thanks for the in depth review @K900

Thanks for your review and comments @SuperSandro2000 :smiley: I believe I am done implementing your revisions