Upgrades to broccoli-persistent-filter

Current coverage is 100.00%

Merging #32 into master will not affect coverage as of 9a96f9e

@@            master     #32   diff @@
======================================
  Files            1       1
  Stmts           83      93    +10
  Branches        19      21     +2
  Methods          0       0
======================================
+ Hit             83      93    +10
  Partial          0       0
  Missed           0       0

Review entire Coverage Diff as of 9a96f9e

Powered by Codecov. Updated on successful CI builds.

@stefanpenner A test is failing locally for me. Any idea why?
 Error: ENAMETOOLONG: name too long, open '/var/folders/7r/by3dmymj29ggrnd8w7hhx0000000gn/T/async-disk-cache/65abc5ce05f828f069d26299fc0783e5/{"assetMap":{"fonts/OpenSans/Light/OpenSans-Light.eot":"fonts/OpenSans/Light/fingerprinted-OpenSans-Light.eot","fonts/OpenSans/Light/OpenSans-Light.svg":"fonts/OpenSans/Light/fingerprinted-OpenSans-Light.svg","fonts/OpenSans/Light/OpenSans-Light.ttf":"fonts/OpenSans/Light/fingerprinted-OpenSans-Light.ttf","fonts/OpenSans/Light/OpenSans-Light.woff":"fonts/OpenSans/Light/fingerprinted-OpenSans-Light.woff","fonts/OpenSans/Medium/OpenSans-Medium.eot":"fonts/OpenSans/Medium/fingerprinted-OpenSans-Medium.eot","fonts/OpenSans/Medium/OpenSans-Medium.svg":"fonts/OpenSans/Medium/fingerprinted-OpenSans-Medium.svg","fonts/OpenSans/Medium/OpenSans-Medium.ttf":"fonts/OpenSans/Medium/fingerprinted-OpenSans-Medium.ttf","fonts/OpenSans/Medium/OpenSans-Medium.woff":"fonts/OpenSans/Medium/fingerprinted-OpenSans-Medium.woff","foo/bar/widget.js":"blahzorz-1.js","images/sample.png":"images/fingerprinted-sample.png"},"persist":true}bdaa36755eaa31034b16b125341be8a3

@stefanpenner A test is failing locally for me. Any idea why?

looks like you are trying to write the contents of the file as the filename

👋 using persistent filter in broccoli-asset-rewrite will reduce rebuild times. I found this after fixing a similar problem in ember-cli-sass https://github.com/adopted-ember-addons/ember-cli-sass/pull/215. Is there something we can do to get this merged?

@gabrielcsapo - Probably best to submit a new PR, I'll try to review/merge.

Once I land https://github.com/adopted-ember-addons/ember-cli-sass/pull/215 I will be able to generate a diff between persistent filter and non persistent filter in a larger project.


Invoke-DbaAdvancedInstall - Add Restart-DbaService after Set-DbaTcpPort

Type of Change

[x] Bug fix (non-breaking change, fixes #6865 )
[ ] New feature (non-breaking change, adds functionality, fixes # )
[ ] Breaking change (effects multiple commands or functionality, fixes # )
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose
Port changes need a restart of service to be active
Approach
Just restart the service
We discussed further adjustments to Set-DbaTcpPort on slack, but then got stuck. To at least fix the bug, I would like to implement this change as soon as possible.

Ok,  I need some help here with the tests. As the Restart-DbaService failes on AppVeyor, there is my new message in the notes.
First of all: Can someone tell my why the Restart-DbaService failes?

Restart-DbaService should not be even called here, as it's supposed to be mocked. You might want to assert that mock was properly called
Assert-MockCalled -CommandName Restart-DbaService -Exactly 1 -Scope It -ModuleName dbatools

It fails because there is no instance "foo" on the host.

Thanks. I just found that. Let's see if it works now.

Ok, not yet. Will use your code and try.

Still need help. I used Mock -CommandName Restart-DbaService -ModuleName dbatools -MockWith {} like you used Mock -CommandName Set-DbaTcpPort -ModuleName dbatools -MockWith {}.
Where is the error?

Install-DbaInstance.Tests should also have those mocks, as it's calling the advanced install

Ok, Tests run fine now (failed tests are related to other commands) - so this can be merged from my side,
But @nvarscar , I would like to have your feedback about the change.

There is some changes to functions/Get-DbaAgBackupHistory.ps1. You might want to rebase your branch removing 0bee9d4bf0ab5fe14012a84b52be58c7cdd2a886 and re-adding the line in the test file afterwards.

Rule No 1: Don't do small changes late at night. But I did. And I failed. Thanks @nvarscar for the hint - now it should work...

Looks like it's working! 🥳  @nvarscar can you please approve and I'll merge?

sweet as heck, thank you both!


V0.11.0 is broken on avr

AVR implementation doesn’t work at all.
V0.10.0 was ok

fixed by a hotfix in V0.11.1


bugfix: jdbc parameter set null

Ⅰ. Describe what this PR did
jdbc parameter set null, cause error.
Ⅱ. Does this pull request fix one issue?

fixes #1852
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #1879 into develop will decrease coverage by 0.02%.
The diff coverage is 50%.

@@              Coverage Diff              @@
##             develop    #1879      +/-   ##
=============================================
- Coverage      55.36%   55.34%   -0.03%
+ Complexity      2379     2376       -3
=============================================
  Files            422      422
  Lines          14331    14333       +2
  Branches        1717     1719       +2
=============================================
- Hits            7935     7933       -2
  Misses          5656     5656
- Partials         740      744       +4

Impacted Files
Coverage Δ
Complexity Δ

...a/rm/datasource/sql/druid/BaseMySQLRecognizer.java
94.44% <50%> (-2.7%)
12 <0> (ø)

...asource/sql/druid/oracle/BaseOracleRecognizer.java
94.44% <50%> (-2.7%)
12 <0> (ø)

...in/java/io/seata/server/session/GlobalSession.java
84.54% <0%> (-0.49%)
67% <0%> (-1%)

...o/seata/server/coordinator/DefaultCoordinator.java
48.01% <0%> (-0.4%)
27% <0%> (-2%)


Open source guild improve examples

Codecov Report

Merging #54 into master will decrease coverage by 0.23%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master     #54      +/-   ##
=========================================
- Coverage   36.44%   36.2%   -0.24%
=========================================
  Files          35      35
  Lines         461     464       +3
  Branches       52      52
=========================================
  Hits          168     168
- Misses        293     296       +3

Impacted Files
Coverage Δ

...output/writers/redshift/RedshiftOutputWriter.scala
0% <0%> (ø)
:arrow_up:

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 90ba1ae...7464f81. Read the comment docs.


Sort fails with unicode characters

Add a list item that starts with a unicode character, and then sort by that field name.
In my case, this results in the items prior to this one sorting successfully, but all subsequent items failing to sort.

I'm closing all unicode errors with a reference to #385 :wave:


cranelift: introduce a new WasmtimeAppleAarch64 calling convention

The previous choice to use the WasmtimeSystemV calling convention for
apple-aarch64 devices was incorrect: padding of arguments was
incorrectly computed. So we have to use some flavor of the apple-aarch64
ABI there.
Since we want to support the wasmtime custom convention for multiple
returns on apple-aarch64 too, a new custom Wasmtime calling convention
was introduced to support this.

As a matter of fact, the wasmtime tests using many arguments were broken on trunk, when being run on my M1 machine. I'll look into ways to automate testing on our side, and share the results with a broader audience.

No worries, that was a subtle difference. Thanks for the quick review!

Repeating a message I've sent over to the Zulip:
Hi all! After observing that a recent regression creeped in into a stable release of wasmtime on Mac M1 (that happens in software engineering!), we at Embark Studios have decided that we needed to help with a stopgap solution to set up some CI on Mac M1, without fiddling with Github actions runner.
And here it is! Wasmtime is now being daily tested on an in-house Mac M1, as part of this public repository's CI: https://github.com/EmbarkStudios/wasmtime-aarch64-apple-darwin
While not running on every single commit, it should help us identify new test failures and notice regressions a bit quicker!


redis-namespace endless warnings

Hi @Strech,
First of all, thanks for this great project, really appreciate your work here!
Second, we started to use the out of the box docker you provided, but on our production env
we are seeing endless amount of warnings about that Redis#exists(key) will return an Integer in redis-rb 4.3 .
As part of my investigation, it seems that redis-namespace gem is the root cause for those warnings and
it seems that it was already fixed. Is there any chance to update the version of redis-namepspace to the latest one 1.8.1?
Sources:

Sidekiq issue describing the warning message.
The fix redis-namespace pushed.
The latest version of redis-namespace.
redis-namespace version on docker file that I wish we can change.

Our logs with the warnings:

Hey @RanAbram, thanks for your kind words, I appreciate it 🙏
I have a bit of a trouble with my laptop, but I will try to update redis-namespace this week and release a new Docker image.
Thanks for rising the issue 💚

Thanks man, will try it later on :)

@Strech This seems to still be happening in the latest version of the image (0.1.15-2) Perhaps we should reopen this issue?
$ kubectl logs -f deployment/sidekiq-prometheus
`Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead.
To opt-in to the new behavior now you can set Redis.exists_returns_integer =  true. To disable this message
and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this
option will be removed in 5.0. (/usr/local/bundle/gems/sidekiq-5.2.8/lib/sidekiq/api.rb:907:in `block (3 levels) in each')

Hey @scottcrossen, can you show me gems + ruby version in your deployment/sidekiq-prometheus, like gem list --local and ruby -v, I just want to be sure that we are on the same page

@Strech sorry just saw this. I'll try to get that for you on monday!

@Strech Sorry just saw this!
benchmark (default: 0.1.0)
bigdecimal (default: 2.0.0)
bundler (default: 2.1.4)
cgi (default: 0.1.0)
connection_pool (2.2.3)
csv (default: 3.1.2)
date (default: 3.0.0)
dbm (default: 1.1.0)
delegate (default: 0.1.0)
did_you_mean (default: 1.4.0)
etc (default: 1.1.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
forwardable (default: 1.3.1)
gdbm (default: 2.1.0)
getoptlong (default: 0.1.0)
io-console (default: 0.5.6)
ipaddr (default: 1.2.2)
irb (default: 1.2.3)
json (default: 2.3.0)
logger (default: 1.4.2)
matrix (default: 0.2.0)
minitest (5.13.0)
mutex_m (default: 0.1.0)
net-pop (default: 0.1.0)
net-smtp (default: 0.1.0)
net-telnet (0.2.0)
observer (default: 0.1.0)
open3 (default: 0.1.0)
openssl (default: 2.1.2)
ostruct (default: 0.2.0)
power_assert (1.1.7)
prime (default: 0.1.1)
pstore (default: 0.1.0)
psych (default: 3.1.0)
racc (default: 1.4.16)
rack (2.0.9)
rack-protection (2.1.0)
rake (13.0.1)
rdoc (default: 6.2.1)
readline (default: 0.0.2)
readline-ext (default: 0.1.0)
redis (4.2.5)
redis-namespace (1.8.1)
reline (default: 0.1.3)
rexml (default: 3.2.3)
rss (default: 0.2.8)
sdbm (default: 1.0.0)
sidekiq (5.2.8)
sidekiq-prometheus-exporter (0.1.15)
singleton (default: 0.1.0)
stringio (default: 0.1.0)
strscan (default: 1.0.3)
test-unit (3.3.4)
timeout (default: 0.1.0)
tracer (default: 0.1.0)
uri (default: 0.10.0)
webrick (default: 1.6.0)
xmlrpc (0.3.0)
yaml (default: 0.1.0)
zlib (default: 1.1.0)

(which does have v1.8.1 of redis-namespace)
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux-musl]

@RanAbram  do you still have these errors after upgrading to the latest image?

@scottcrossen Sorry for a long silence, I will take a look this week, was a bit busy 😵

Thanks to everyone for re-rising this issue. The problem was with a redis-rb gem and all the other gems which depend on it.
As the result, I've updated not only redis-namespace, but also sidekiq gem. As an additional bonus ruby was bumped to the version 2.7.3
You can pull updated image with tag 0.1.15-3
docker pull strech/sidekiq-prometheus-exporter:0.1.15-3


NodeChecker remove failed nodes

Remove nodes that fail due to a connect exception (due to node being down or network issue) in NodeChecker.  This should resolve Issue #345 where a client can become disconnected from the cluster if only it is configured with a single node (regardless of actual number of nodes in the cluster) and that node is unavailable/down when NodeChecker connects it.

Coverage increased (+0.2%) to 49.568% when pulling 1afb2a8bdddf8e4d54817885ef2bbe3b53975a6e on bmlining:node_checker_remove_failed_nodes into 01b63de2cf577e09a8b7b7e8744644d15fac2ea0 on searchbox-io:master.

This would be great to have when any call is made to elasticsearch on an http error

HTTP Client implementation specific code should not be in the jest-common module (e.g.: apache http dependencies or org.apache.http references).


chore(npm): npm audit fix

Just running the old npm audit fix to see if it passes CI

I've got one here that has a bunch of TS fixes that are close to making the audit actually work. We talked a bit about this, and decided to rekindle that PR (or one like it) after we get through this wave of Dependabot bumps, toward the end of the 4.0 breaking change window.

Closing this for now... let's get through some more dependabot stuff and try again toward the end of the 4.0 window before the stabilization period.


html and css for the title and navbar

I did some stupid stuff so someone check if everything is fine.

yeah, not sure why you changed the h tags, but it works fine :)

I see @danielhalasz that you reviewed the PR as well :+1:

yeah, not sure why you changed the h tags, but it works fine :)

Side note (no need to do anything on this particular PR).
Remember that merging a PR is not a race. You can ask a question and wait for the report to give feedback. Then, as a team, you can figure out what's the best solution. To provide contextualized feedback, you can click on the line where the heading was changed and add a comment + "start  review".

yeah, not sure why you changed the h tags, but it works fine :)

I actually changed because I created a h1 for the title and you already had a h1, I could use id or class for that, but I was so desperate to finish that it didn't crossed my mind.


Array constructors are not parsed

Currently, array constructs are not parsed. We should add support for them. Simple scalar expressions like
integer :: array(3)
array = (/1, 2, 3 /)
array = [4, 5, 6]

are easy to implement. But array expressions and implied-do loops are also allowed, which will require #3 to be implemented first.

@stadelmanma
I see you have already mentioned array constructs in #3

Oops, I thought the mentioned issue was regarding array constructors and I closed before I looked.

@oponkork among some other fixes I've implemented I did add support for array literals using the square brackets. Implied do loops are still untouched though.

I will try to get the implied do loops working.

Hey @oponkork I was looking through my old branch for this and had a thought, I think I got something working. Checkout my changes in https://github.com/stadelmanma/tree-sitter-fortran/tree/support-implied-do-loops and see what you think. Maybe you have a better solution than just adding a conflict rule.


Update gRPC example to latest hyper, tonic and tower

The examples still reference older versions of hyper, tonic and tower. These libraries have moved on quite a bit so it would be nice to see them being refreshed using the latest versions of the APIs.

Would you be interested in picking up this task?

Yeah I can sort it. I've just recently upgraded hyper, tonic and tower in a project that we use Turmoil for testing too

Much appreciated! I can PR as soon as you get something up.

Raised the PR for that


Added extra exception check for loading tracks

I added this extra check because when I used this file I was getting a TypeError when running into line 213 and this wasn't covered in the file so I'm suggesting adding this change.

I think this is a PR more suitable for the next branch. Let me know what you guys think.

Followed up in #47.


Upgrade to work with new AST format

Hi @ChristianFrisson,
We've revamped the AST structure that Idyll deals with internally to make things easier to work with and more future-proof, but need to upgrade the plugins as a result. This is going to be a major version bump to Idyll, so I'd recommend making a major version bump to this package to make it clear to users which plugin versions are compatible with which plugin versions.
The new AST format is much cleaner, and easier to operate on directly, but we offer a very similar API. For the sake of safety, rather than actually modify your AST manipulation code, I've just added code to the beginning and end to transform between the new/old AST structures and left all the original logic in place.
Let me know if you have any questions. More documentation on the new AST here.

Thanks a lot @mathisonian !
Pull request merged, and repository transferred to idyll-lang, see: https://github.com/idyll-lang/idyll-plugins/pull/4


Support for features seems to be missing

I just ran this on one of our projects, and it totally wrecked it.
It looks like features support is missing, or not working.
For Example:
chrono = { version = "0.4.31", features = ["serde"] }
got replaced with
chrono = "0.4.31"
and
tokio = { version = "1.35.1", features = ["full"] }
tokio = "1.35.1"

Can you link a minimum reproduction for us to test against?
E.g. was the list of features you "lost" specified in workspace.dependencies or in a member's manifest?

It was in the workspace itself, not in one of the members.
Sorry, but a bit busy right now, so can't create a repro,
but can rerun now and then.

That's enough to debug, I think I know where the issue is.

Seems to work for our project now.


Fix array annotations

What's changed?

Fixes parsing for annotated array types
What's your motivation?

Fixes https://github.com/openrewrite/rewrite/issues/3453
Fixes https://github.com/openrewrite/rewrite/issues/2911
Fixes https://github.com/openrewrite/rewrite/issues/3440
Fixes #3667
Anything in particular you'd like reviewers to focus on?

I add a new J.ArrayType.AnnotatedDimension auxiliary structure to store everything needed to represent a single dimension (e.g. <annotations> [])
Anyone you would like to review specifically?

@timtebeek @kunli2
Additional context

https://github.com/openrewrite/rewrite/issues/3453
https://github.com/openrewrite/rewrite/issues/2911
https://github.com/openrewrite/rewrite/issues/3440
#3667

Checklist

[x] I've added unit tests to cover both positive and negative cases
[x] I've added the license header to any new files through ./gradlew licenseFormat
[x] I've used the IntelliJ auto-formatter on affected files
[x] I've updated the documentation (if applicable)

Thanks a lot for this effort @sfc-gh-dtran , and your clear communication around the issue and your approach. Due to the addition of ArrayType.AnnotatedDimension I'm going to defer a more thorough review to Kun & Sam, as they are more experienced around the parsers and impact of adding new constructs on for instance (de)serialization.
From what I read in Slack you're up and running with this change locally; does that mean you're unblocked for making changes ? I know you indicated you needed proper support here, and appreciate you stepping up. I just want to make sure you're on your way before we get to a review, merge & release.

Thanks a lot for this effort @sfc-gh-dtran , and your clear communication around the issue and your approach. Due to the addition of ArrayType.AnnotatedDimension I'm going to defer a more thorough review to Kun & Sam, as they are more experienced around the parsers and impact of adding new constructs on for instance (de)serialization.
From what I read in Slack you're up and running with this change locally; does that mean you're unblocked for making changes ? I know you indicated you needed proper support here, and appreciate you stepping up. I just want to make sure you're on your way before we get to a review, merge & release.

Thanks a lot for this effort @sfc-gh-dtran , and your clear communication around the issue and your approach. Due to the addition of ArrayType.AnnotatedDimension I'm going to defer a more thorough review to Kun & Sam, as they are more experienced around the parsers and impact of adding new constructs on for instance (de)serialization.
From what I read in Slack you're up and running with this change locally; does that mean you're unblocked for making changes ? I know you indicated you needed proper support here, and appreciate you stepping up. I just want to make sure you're on your way before we get to a review, merge & release.

Yes! I'm unblocked for making changes.

Hi @sfc-gh-dtran, we really appreciate your work on this PR and patience with us on addressing the issue.
We've added a new PR that is backwards compatible with older LSTs, updates the GradleParserVisitor, and fixes a handful of bugs that were noticed while implementing the changes. Thank you, again for being a part of OpenRewrite!


initial pr

PR Description 📜
Please include summary related to the issue you have fixed and describe your PR in brief over here by specifying the issue number on which you were working below
Fixes #2897

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for website preview in assets/images
[x] I have added entries for my game in main README.md
[x] I have added README.md in my folder
[ ] I have added working video of the game in README.md (optional)
[x] I have specified the respective issue number for which I have requested the new game.

Add your screenshots(Optional) 📸

Thank you soo much for contributing to our repository 💗

Thank you @Gauresh11 ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Colour_Jump game complete

Thank you  @Gauresh11 , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀


unable to apply filters to bootstrap_messages

According to documentation:

bootstrap3/messages.html
This renders the Django messages variable.
Variable messages contains the messages as described in https://docs.djangoproject.com/en/dev/ref/contrib/messages/#displaying-messages
messages is passed through three built-in filters
safe https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std:templatefilter-safe
urlize https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std:templatefilter-urlize
linebreaksbr https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std:templatefilter-linebreaksbr

bootstrap messages is supposed to be automatically applying the safe, urlize, and linebreaksbr filters but this does not seem to be happening.  Creating a message of the format
messages.success(request, 'Test message line 1\nTest message line 2')
should produce a linebreak in the HTML via the linebreaksbr filter but it does not.

This was already discussed at https://github.com/dyve/django-bootstrap3/pull/352

Please refer to the discussion in #352


No 'Access-Control-Allow-Origin' header is present on the requested resource.

Hi.
I am following the instructions in the readme file. but the examples are not working.
For instance,
googleTrends.autoComplete({keyword: 'Back to School'}) .then(function(results) {   console.log(results); }) .catch(function(err) {   console.error(err); })
Give the following error on console page.

Can anyone say what's wrong?
Thank's :)

Hello @Hujjat. It seems to be working for me:
{"default":{"topics":[{"mid":"/m/0414j6","title":"Back to School","type":"1986 film"},{"mid":"/m/068pw8","title":"Back to school","type":"Topic"},{"mid":"/m/05357_","title":"Tax holiday","type":"Holiday"},{"mid":"/m/04vwgn","title":"Fight Back to School","type":"1991 film"},{"mid":"/m/02pb6kt","title":"Fight Back to School II","type":"1992 film"}]}}

You are running this in node right? It won't work if you try to run it from the browser because of CORS

If you create a new Angular project (https://angular.io/guide/quickstart) and add the following lines to the app.component.ts file, you will get the CORS error above.  (You may also have to add "types": ["node"] into the src/tsconfig.app.json file too.)
Any way to set the "no-cors" mode on the request, or is a proxy server in order?
var googleTrends = require('google-trends-api');
googleTrends.autoComplete({ keyword: 'Back to School' }).then(function (results) { console.log(results); }).catch(function (err) { console.error(err); });


localsend: goes black after sending a file

Describe the bug
LocalSend's window fades to black after a file is sent.
Steps To Reproduce
Steps to reproduce the behavior:

Go into the Send menu.
Pick a file & send it to another device.
Click Done.

Expected behavior
I should be sent back to the Send menu.
Screenshots

Additional context
Not reproducible with Flatpak (tested).
Notify maintainers
@sikmir
@linsui
@pandapip1

Metadata

Add a :+1: reaction to issues you find important.

Nothing in the changelog seems to indicate that's the case…
But if it is, linking that PR here: https://github.com/NixOS/nixpkgs/pull/353481

Tested the PR on my end. It is indeed fixed with that version.

This is because we had to move to unstable version because the version of Flutter that localsend was using was dropped from nixpkgs. It's likely that at some point a commit was introduced that caused this bug and a later commit fixed it. But no tag actually had said bug.

This is because we had to move to unstable version because the version of Flutter that localsend was using was dropped from nixpkgs. It's likely that at some point a commit was introduced that caused this bug and a later commit fixed it. But no tag actually had said bug.

Ah, that would make sense.


Allow users to ignore changes to image_uri.

Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

Yes ✅

Is your request related to a problem? Please describe.
I want to be about to ignore changes in image_uri.
Describe the solution you'd like.
Setting ignore_source_code_hash  to true adds a lifecycle rule which ignore changes in  image_uri
Describe alternatives you've considered.
Using resources directly

Aah need this really bad for my current project.
Just due to this I am being forced to create resources instead of using module :(
Can this be actioned sooner?


Unstable

This Application closes itself immediately after any process

This

This Application closes itself immediately after any process

This issue will be fixed in next Update Version 1.1 and it will be released soon


Fix multiple download issues on Mobile Safari and desktop versions.

@ishpaul777 @techievivek
Details

Fix multiple download issues on Mobile Safari and desktop versions.
Fixed Issues

$ https://github.com/Expensify/App/issues/35189
PROPOSAL: https://github.com/Expensify/App/issues/35189#issuecomment-1913188877
Tests

Pre-requisite: The user must have sent at least 2 files in the chat. The file types should not be supported for preview (e.g. docx, csv, .zip)
Mobile Safari

Go to the chat where you sent the two files
Tap the download button next to a file name
Verify that Mobile safari will open new tab and process the download in that new tab

Other Platforms

Go to the chat where you sent the two files
Tap the download button next to a file name
Before the first file is downloaded, press the download button of the second file
Ensure that all clicked files will be downloaded.

[x] Verify that no errors appear in the JS console

Offline tests

Users should not be able to download files when offline; the download button should be disabled.
QA Steps

Same as Tests

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
https://github.com/Expensify/App/assets/11847279/331bca11-08c8-434f-8620-53fd43bde1ca

Android: mWeb Chrome
https://github.com/Expensify/App/assets/11847279/8a9d6168-f5de-4e09-bea4-07403c7d501f

iOS: Native
https://github.com/Expensify/App/assets/11847279/bf7555c0-a6c2-40c0-9658-a7f28798b86b

iOS: mWeb Safari
https://github.com/Expensify/App/assets/11847279/fb77d699-dc4d-4f6c-9e3c-43de5ed37c89

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/11847279/33c14a2b-5975-4807-b8a8-511657f1be45

MacOS: Desktop

https://github.com/Expensify/App/assets/11847279/3bc7da72-53dd-4c7d-afa6-343d37fad728

@ishpaul777 sure, thank you

@ishpaul777 @techievivek bump

@ishpaul777 Will you be able to prioritize this today? Thanks.

@ishpaul777 sure, merged

Reviewing this along with @ishpaul777!

@ishpaul777 @allroundexperts

Bug: app crashes on canceling a download.

This issue has been resolved

Delay after the loading stops and download modal appear is unacceptable. I think it should be quick as before

I have solved this problem by using setTimeout with a 1000ms delay:
https://github.com/Expensify/App/blob/4c11059be66ff0d93653f6e1aa14d5ae32e94333/src/libs/fileDownload/index.desktop.ts#L15-L23
The file dialog may not be synchronized with the loading indicator.
It's becoming more complicated than expected. I'm trying to figure out how to listen to electron download completed events, please inform me if you have any suggestions.

@ishpaul777 @allroundexperts The delay problem has been fixed by synchronizing the loading with completed and cancelled events.

@ishpaul777 @allroundexperts conflict has been resolved

@techievivek I'm wondering, wont it be a more consistent / better approach if we created an electron-dl package in our repository instead of adding the library code directly?

@techievivek I'm wondering, wont it be a more consistent / better approach if we created an electron-dl package in our repository instead of adding the library code directly?

@allroundexperts That's team decision

We've decided against adding a new package. Primarily because it's small, poorly maintained, and lacks any secret sauce that would be challenging to implement ourselves. So, let's replicate the logic in our codebase and utilize that instead.

This was discussed here:
https://expensify.slack.com/archives/C03TQ48KC/p1708541023332899
https://github.com/Expensify/App/issues/36305

Yeah, I don't think it is worth keeping this as a separate package as it can easily be accommodated within 2-3 files.

@allroundexperts @ishpaul777

Yea, sure!

Will re-review this in more depth tomorrow.

@allroundexperts @techievivek

Still reviewing this @wildan-m. I'll have an update tomorrow.

@allroundexperts @techievivek

I'll give another pass on it today @wildan-m. Meanwhile, can you please merge main?

I'll give another pass on it today @wildan-m. Meanwhile, can you please merge main?

@allroundexperts Latest main merged

@allroundexperts Can you please take a look at the comments by @wildan-m so we can make progress here? Let's try to get  this merged ASAP.

Gentle bump @allroundexperts to prioritize this since it's open for months now.

I reviewed this yesterday as well. Will post some more comments today.

Requested more changes.

Sure, I hope we can achieve a faster turnaround time.

Requested more changes.

Sure, I hope we can achieve a faster turnaround time.

@wildan-m I made some more comments. If done correctly, I think this would be the last one. Thank you for your patience with this. I fully understand and acknowledge the hard work you're putting into this.

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android build not working

Android: mWeb Chrome

https://github.com/Expensify/App/assets/30054992/2577498c-e149-47d4-9c85-a79e66dea8b3

iOS: Native

https://github.com/Expensify/App/assets/30054992/93ddabbd-eb56-4d88-8c98-426e354e93ed

iOS: mWeb Safari

https://github.com/Expensify/App/assets/30054992/85944ce7-e785-46eb-a516-900649b52b0c

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/30054992/c181c499-a648-4fd9-a1c5-dcf0ceeb38ff

MacOS: Desktop

https://github.com/Expensify/App/assets/30054992/41f9d429-13c6-4e63-800c-29accff5b6c3

@techievivek when will the merge freeze end?

Thank you for your patience and hard work. We are good to merge now.

🚀 Deployed to staging by https://github.com/techievivek in version: 1.4.77-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Question: Existing firmware

Does anyone have a copy of the Magichome Wifi LED controller's firmware based on BL602? I dumped mine using blflash but didn't notice that by default it is only dumping the 1st MB of memory and as far as I know that particular board has 2 MB...
Appreciate a copy of the original firmware. Already investigated if it is somewhere available for download officially by the manufacturer but didn't find anything. Thank you!

You can provide the dump range in the command line argument:
> blflash dump -h
Dump the whole flash to a file

USAGE:
    blflash.exe dump [OPTIONS] <output> --port <port> [ARGS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -b, --baud-rate <baud-rate>                    Flash baud rate [default: 1000000]
        --initial-baud-rate <initial-baud-rate>    Initial baud rate [default: 115200]
    -p, --port <port>                              Serial port

ARGS:
    <output>    Output file
    <start>     start address [default: 0]
    <end>       end address [default: 0x100000]

blflash dump -p COM1 dump.bin 0 0x200000

Thanks, I know this now, but I still need the original firmware :-( I might have forgot to say that after dumping I reflashed the device...

Here is the original firmware
dump.zip
I have more gray hair thanks to something that should be simple.

Raspberry Pi can not do 2 000 000 baud by default, you need to switch uarts else you get garbage when opening a console. screen /dev/ttyAMA0 2000000

Boot pin needs to be held onto V33 when the device boots to enable programming. (Not V+ else dead device)

For some reason -flashing happens at a different baud
./blflash dump -b 230400 -p /dev/ttyAMA0 dump.bin 0 0x200000

Thanks for the firmware! Yes, I realized that too, that CP2102 isn't capable of doing 2M, the FT232R dongles work well! Now I still have the problem, that when reflashing the ble_wifi_demo the board reset-loops as soon as Wifi is enabled... I can't get Wifi to work anymore with any of the examples. As if something got overwritten/erased that is needed for them...


HTTPCORE-639: Configurable ResponseOutOfOrderStrategy

The default implementation does not introduce any change in
behavior. The original discussion can be found on the mailing
list<EMAIL_ADDRESS>

Will review tomorrow.

@carterkozak @michael-o Holy Moses, folks! This started out like a very straightforward and cheap improvement based on InputStream#available and now it has ballooned into something with a strategy, three JIRA tickets and a UN Security Council type of discussion.
Can we tackle the issue in iterative steps? Can we have a strategy interface with three implementations: no-op,  InputStream#available based (to be used as default), and #isDataAvailable based one? Once we have that working, we can consider refining the strategy interface or/and building more complex strategies?
@michael-o If the out of order response check indeed decreases connection throughput by a factor of 6 we have to consider removing #isDataAvailable call from 5.0.x. @carterkozak Could you please confirm your findings?

Can we tackle the issue in iterative steps? Can we have a strategy interface with three implementations: no-op, InputStream#available based (to be used as default), and #isDataAvailable based one? Once we have that working, we can consider refining the strategy interface or/and building more complex strategies?

Completely agree.

If the out of order response check indeed decreases connection throughput by a factor of 6 we have to consider removing #isDataAvailable call from 5.0.x.

Also agree here. I will run a few tests here from within the corporate network, but will take some time for me to do.

The interface might look like that
    interface Strategy {

        long calculateChunk(ClassicHttpRequest request, long totalBytes);

        void checkForEarlyResponse(InputStream socketInputStream, long chunk) throws ResponseOutOfOrderException;

    }

The #calculateChunk method might actually stop incrementing chunks after one or two or three thus effectively stopping any further read operations on the input stream.

@ok2c Interesting approach, a few questions:

#calculateChunk: Should this calculate a chunk size or rather the amount of chunks progressed? The method name is too generic.
#checkForEarlyResponse(): Detecting TLS is done via HttpConnection#getSSLSession()?

This started out like a very straightforward and cheap improvement based on InputStream#available and now it has ballooned into something with a strategy, three JIRA tickets and a UN Security Council type of discussion.

Sorry, I hope I haven't created too much noise, I've tried to isolate findings into separate tickets to keep each discussion somewhat isolated, but I fear I could have done better!

Can we tackle the issue in iterative steps?

I completely agree that this should be done in small steps, my intent for this PR was to avoid changing any functionality, and to simply provide a mechanism that can be used to configure non-default functionality. I've tried to brainstorm potential implementations here in order to collect feedback and ensure the strategy interface can support potential future requirements and ideas, I don't think it's a good idea to make functional changes in this PR.

If the out of order response check indeed decreases connection throughput by a factor of 6 we have to consider removing #isDataAvailable call from 5.0.x

My use case wouldn't be impacted if the isDataAvailable check is removed, my goal for this PR is to provide a way for me to disable the check without adversely impacting other HC users. Very supportive of removing the check from 5.0.x, I defer to your judgement on whether or not the more complex form should be kept in 5.1, or removed entirely.

Could you please confirm your findings?

Of course, I have some analysis from an internal production service.
These graphs are limited to requests with size between 40MiB and 50MiB. The graphs are based on data from our request logs, the charts are based user-agents before and after bypassing out of order response checks. Note that this includes some amount of time processing the request on the server in addition to pure transfer rate.
Clients using out of order response checks (default 5.0.1 behavior):

Clients with the check disabled by subclassing DefaultBHttpClientConnection perform substantially better:

The best case drops from six seconds to below a half second when the check is disabled, and the 50th percentile drops from just over six seconds to just under one second.

@carterkozak I did not mean to hijack your pull request. All I am trying to suggest is extracting the existing logic and putting it behind a strategy interface so we could also have a no-op implementation of that strategy. Once that is done we can proceed with more complex changes, step by step.

@ok2c Interesting approach, a few questions:

#calculateChunk: Should this calculate a chunk size or rather the amount of chunks progressed? The method name is too generic.

Sequence of chunks processed. A greater chunk number would trigger the check for incoming data.

#checkForEarlyResponse(): Detecting TLS is done via HttpConnection#getSSLSession()?

Yes, that too.
Anyway, the interface merely extracts already existing logic and make it possible to replace it with no-op implementation.

@ok2c Alright. It should be in plural then: calculateChunks(). The rest seems pretty fine to me as long as the interface leaves enough freedom is use isDataAvailable() or #available() and other possible options to make the right decision.

I like the idea of moving the logic into an implementation of this interface, but I'm not sure I fully understand the proposed interface. The two proposed methods are tightly coupled, would it make sense to provide a single method that takes the connection, request, socketInputStream, and totalBytes, and does the check if necessarily, otherwise no-ops?
Taking that model a step farther, we could use an interface along these lines:
interface ResponseOutOfOrderStrategy {
    OutputStream create(
        SocketHolder socketHolder,
        BHttpConnection connection,
        ClassicHttpRequest request);
}

This way the entirety of the response checking code can be encapsulated. This interface is broad and could end up being used incorrectly, but it doesn't require that we create unnecessary OutputStream wrappers when the feature is disabled. What do you think?

@carterkozak This idea ist not bad at all, but it seems to me that the client would create implement stuff which are just necessary to satisfy OutputStream contract.

@carterkozak I understand the intent and benefits of this approach but what I do not quite like about it that it effectively breaks the principle of separation of concerns and turns the strategy into OutputStream factory.
Here is a very simple implementation of what I am proposing instead: 93c054967d54f824393b6257d354a0155cd087fe. I extracted the strategy logic into a separate class, which can be turned into an interface with multiple implementations including a no-op one.

That makes sense, the other practical drawback to the outputstream-factory method is that it becomes more difficult to pass data available from the connection implementation into the stream in the future.
Thank you for providing an example. I find it difficult to understand how the interface works without reading the code that calls it, which makes me think we can implement the API in a cleaner way.
What do you think about exposing a single method along these lines? I can write the full example if that makes things easier.
   static class OutOfOrderResponseStrategy {
        // Called prior to every write operation.
        void checkForEarlyResponse(final HttpClientConnection conn, final InputStream inputStream, final long totalBytesSent, final long nextWriteSize) throws IOException {
            if (totalBytesSent == 0 || totalBytesSent / (8 * 1024) < ((totalBytesSent + nextWriteSize) / (8 * 1024))) {
                final boolean ssl = conn.getSSLSession() != null;
                if (ssl ? conn.isDataAvailable(Timeout.ONE_MILLISECOND) : (inputStream.available() > 0)) {
                    throw new ResponseOutOfOrderException();
                }
            }
        }
    }

@carterkozak I personally tend to prefer methods with a few (3 at most) parameters but I am fine with a single method. Please feel free to complete this PR.

I'll push the update shortly. Thank you for the high quality review and feedback!

We discussed changing the default configuration to avoid costly 1ms checks, based on that we may want to rename DefaultResponseOutOfOrderStrategy to something like SafeResponseOutOfOrderStrategy or ParanoidResponseOutOfOrderStrategy to avoid confusion. What do you think?

I will have a look at both proposals this night.

We discussed changing the default configuration to avoid costly 1ms checks, based on that we may want to rename DefaultResponseOutOfOrderStrategy to something like SafeResponseOutOfOrderStrategy or ParanoidResponseOutOfOrderStrategy to avoid confusion. What do you think?

This is another good question. We provide sane implementations with the name prefix Default. In this case it even covers the RFC for connection management we SHOULD (RFC) be the default behavior. In this spirit the name, imho, should stay as-is. The no-op implentating should be NoResonseOufOfOrderStrategy or Ignore since we already have NoConnectionReuseStrategy, for instance.

We already provide sane implementations with the name prefix Default. In this case it even covers the RFC for connection management which SHOULD (RFC) be the default behavior.

In general I agree, however there are common scenarios where limiting upload speed to 8 MiB/second may not be considered sane. I'm worried that users may compare hc5 against other client implementations and find it to under-perform without realizing the ResonseOufOfOrderStrategy can be configured. I think most socket based java http client libraries have either no or limited support for out-of-order response checking, so it may be reasonable not to enable the check by default. On the other hand you're absolutely correct that users may also run into problems due to out order responses blocking request bodies from sending, and in that case it's not obvious how to opt into this feature.
All of that is to say, I think we could make an argument in either one being the default behavior, so we may want to avoid names that lock us into an approach in case there's overwhelming feedback from the community. I don't have a strong opinion on this, I only want call it out because it will be one of the hardest things to change once this feature is released.
I like the sound of NoResonseOufOfOrderStrategy for the no-op implementation. I had planned to keep this change minimal and file another ticket to provide a no-op implementation, I'd be happy to add it to this PR if you prefer.

We already provide sane implementations with the name prefix Default. In this case it even covers the RFC for connection management which SHOULD (RFC) be the default behavior.

In general I agree, however there are common scenarios where limiting upload speed to 8 MiB/second may not be considered sane. I'm worried that users may compare hc5 against other client implementations and find it to under-perform without realizing the ResonseOufOfOrderStrategy can be configured. I think most socket based java http client libraries have either no or limited support for out-of-order response checking, so it may be reasonable not to enable the check by default. On the other hand you're absolutely correct that users may also run into problems due to out order responses blocking request bodies from sending, and in that case it's not obvious how to opt into this feature.
All of that is to say, I think we could make an argument in either one being the default behavior, so we may want to avoid names that lock us into an approach in case there's overwhelming feedback from the community. I don't have a strong opinion on this, I only want call it out because it will be one of the hardest things to change once this feature is released.
I like the sound of NoResonseOufOfOrderStrategy for the no-op implementation. I had planned to keep this change minimal and file another ticket to provide a no-op implementation, I'd be happy to add it to this PR if you prefer.

Right, a safe implementation should not tremendously degrade perfomance. The default case should be using Expect header to avoid this altogether. They maybe also a case where both Expect and out of order detection can be chained. Consider that someone uploads a stream with chunked encoding while server says 100 Continue somewhere in the middle the stream exceeds some internal server limit and the server closes the request prematurely. But I consider this to be an edge case.
We have now the following options since RFC says SHOULD and blocking I/O imposes degregatation of performance:

Make NoResponseOufOfOrderStrategy or IgnoringResponseOufOfOrderStrategy default.
Rename DefaultResponseOufOfOrderStrategy to, as you have proposed, SafeResponseOufOfOrderStrategy or MonitoringResponseOufOfOrderStrategy.

The monitoring implementation can receive another int arg which for how many chunks it should probe for an out of order response. Maybe it is for this implemtation sufficient to try 10 times and then if it hasn't failed yet, it passed server valadation and we can continue w/o any checks. WDYT?

The monitoring implementation may/can receive another int arg which for how many chunks it should probe for an out of order response. Maybe it is for this implemtation sufficient to try 10 times and then if it hasn't failed yet, it passed server validation and we can continue w/o any checks. WDYT?

This design sounds great, I'll implement it shortly. :-)

Looks very nice now. I will test this next week at work. @ok2c Any comments, objections?

Thanks Michael, I've gone ahead and squashed it into one commit.

@carterkozak @michael-o I like the idea of configurable min / max chunks to check. By default however I would not use #isDataAvailable at all and would rather provide an alternative strategy implementation for that. This however can be done in a separate PR. I would also mark ResponseOutOfOrderStrategy as @internal.

@carterkozak @michael-o I like the idea of configurable min / max chunks to check. By default however I would not use #isDataAvailable at all and would rather provide an alternative strategy implementation for that. This however can be done in a separate PR. I would also mark ResponseOutOfOrderStrategy as @internal.

Show would you solve this w/o the method? I agree on the internal annotation.

Show would you solve this w/o the method? I agree on the internal annotation.

I would actually expect InputStream exposed by SSL provides to honor the contract of #available method. When this is not the case one can explicitly opt for a more expensive ResponseOutOfOrderStrategy implementation.

How would you solve this w/o the method? I agree on the internal annotation.

I would actually expect InputStream exposed by SSL provides to honor the contract of #available method. When this is not the case one can explicitly opt for a more expensive ResponseOutOfOrderStrategy implementation.

We can't do more than file an issue with Oracle, can't we?

Others tried and failed: https://stackoverflow.com/q/26320624/696632

On java 13+ I don't believe Socket.getInputStream().available() ever returns non-zero, it didn't appear to do so in my testing anyhow.
I've updated the interface with an @Internal annotation.

@michael-o What is still blocking this PR?

Technically nothing, but I'd like to try it out in the corporate network, just to be sure.

Would you like me to create a patch for 5.0.x to revert out-of-order response functionality based on our discussion earlier in this PR?

Call me stupid or blind, but I see no way to test this properly w/o further modifications: org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder.setConnectionFactory(HttpConnectionFactory<ManagedHttpClientConnection>) needs managed objects, but DefaultBHttpClientConnectionFactory does not satify this. BasicHttpClientConnectionManagerBuilder.
What do I miss?

@michael-o It's not easy to test with the client module, I think our options are:

Write a custom HttpConnectionFactory<ManagedHttpClientConnection> implementation which returns a new ManagedHttpClientConnection implementation extending DefaultBHttpClientConnection and implementing ManagedHttpClientConnection. This is the approach I took to work around the issue originally here: https://github.com/palantir/dialogue/pull/917/files

Test using a RequesterBootstrap based on the test from #207 https://github.com/apache/httpcomponents-core/pull/207/files#diff-082ca5e3279571aba16c172e7cc4b791

I can put together a quick HttpConnectionFactory<ManagedHttpClientConnection> implementation for you if you like.

Would you like me to create a patch for 5.0.x to revert out-of-order response functionality based on our discussion earlier in this PR?

We do not need to revert it. We could just remove the expensive #isDataAvailable call.

Sounds good, I can submit a patch.

Would you like me to create a patch for 5.0.x to revert out-of-order response functionality based on our discussion earlier in this PR?

We do not need to revert it. We could just remove the expensive #isDataAvailable call.

This would bascially mean that we will end up with a halfhearted solution 5.0.x, unusable for TLS.

@michael-o It's not easy to test with the client module, I think our options are:
1. Write a custom `HttpConnectionFactory<ManagedHttpClientConnection>` implementation which returns a new `ManagedHttpClientConnection` implementation extending `DefaultBHttpClientConnection` and implementing `ManagedHttpClientConnection`. This is the approach I took to work around the issue originally here: https://github.com/palantir/dialogue/pull/917/files

2. Test using a RequesterBootstrap based on the test from #207 https://github.com/apache/httpcomponents-core/pull/207/files#diff-082ca5e3279571aba16c172e7cc4b791

I can put together a quick HttpConnectionFactory<ManagedHttpClientConnection> implementation for you if you like.
edit with additional explanation: The httpcomponents-client ManagedHttpClientConnectionFactory duplicates most of httpcomponents-core DefaultBHttpClientConnectionFactory in order to return a DefaultManagedHttpClientConnection which extends DefaultBHttpClientConnection. It might be helpful if we implemented an adapter to allow the factory from core to be used more directly, something like this: apache/httpcomponents-client#243

Thanks, I will pick this up for test. Since the changed the parent, I assume that you will provide another PR for Client 5.1 to pass the new strategy through the ManagedHttpClientConnectionFactory? Otherwise the feature is pretty useless, I guess.

That is correct, I plan to implement a builder for the ManagedHttpClientConnectionFactory based on DefaultBHttpClientConnectionFactory and update ManagedHttpClientConnectionFactory to accept the ResponseOutOfOrderStrategy.
I'll file tickets for each shortly.

Thanks, @michael-o. I've added an integration test for MonitoringResponseOutOfOrderStrategy, I expect the optional JDK: openjdk-ea build to fail as described in HTTPCORE-640. I can add an assume block to skip the test on newer java versions if you like.

openjdk-ea passed, however when I run locally using newer java versions the test does fail. I haven't verified the runtime version used in CI testing.

I have now also tried jdk-15+34 and no IT fails here.

I see the following on Windows:
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.289 s <<< FAILURE! - in org.apache.hc.core5.testing.classic.MonitoringResponseOutOfOrderStrategyIntegrationTest
[ERROR] testResponseOutOfOrderWithDefaultStrategy[http](org.apache.hc.core5.testing.classic.MonitoringResponseOutOfOrderStrategyIntegrationTest)  Time elapsed: 5.039 s  <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 5000 milliseconds
        at org.apache.hc.core5.testing.classic.MonitoringResponseOutOfOrderStrategyIntegrationTest.testResponseOutOfOrderWithDefaultStrategy(MonitoringResponseOutOfOrderStrategyIntegrationTest.java:172)

with
C:\Users\mosipov> mvn -v
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00)
Maven home: D:\Entwicklung\Programme\apache-maven-3.5.4\bin\..
Java version: 1.8.0_232, vendor: AdoptOpenJDK, runtime: C:\Program Files\AdoptOpenJDK\jdk-<IP_ADDRESS>-hotspot\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
C:\Users\mosipov>

will raise timeout and see.

I have updated all 8, 11, and 14 on Windows. All ITs pass now. I will continue merging.

Merged, thank you very much!

This would bascially mean that we will end up with a halfhearted solution 5.0.x, unusable for TLS.

This is a good case of something working partially being better than something not working at all. However I am also perfectly fine with backing out the entire change-set. I will do it shortly if no one objects.

This would bascially mean that we will end up with a halfhearted solution 5.0.x, unusable for TLS.

This is a good case of something working partially being better than something not working at all. However I am also perfectly fine with backing out the entire change-set. I will do it shortly if no one objects.

Please do so, this will provide a better upgrade patch from 5.0.x to 5.1.x.


[sw, dif_plic] Add a check to DIF PLIC unittests

PR #4053 ran into the issue when the unittest interrupt register offsets were not updated with RV_PLIC_PARAM_NUMSRC.
This change aims to make it easier to pinpoint the issue.

Thanks @silvestrst for this :+1:

Understood.  Thanks, @lenary, for sharing your perspective. I see your motivations.   In this case, @silvestrst, I think a high-level HOWTO document, something that enumerates all the steps in top-level PR's would be really helpful to people doing this in the future.
The next step will be to condition people to actually refer to this new document instead of saying "Adding IP's to top is easy, just edit these two files, and..."  ;)    This process is easier than it could be but it sounds like the SW/HW synchronization is always something that we want to handle with care.


Embeds are broken

For some reason, the code is not bypassing embed tags, or potentially the embeds are built different than I expected. Will need to examine and fix.

Correction. Plain embeds work fine. Embedded blocks and headings do not.

Fixed in 0.0.2.


联动的select选项更新失效

以下场景：
<select v-model="provinceId" options="optionsProvinces"></select>
<p>{{provinceId}}</p>
 <select v-model="cityId" options="optionsCities  "></select>

两个联动的select选项省和市，市的选项optionsCites根据选中的provinceId获取（在watch中), 先选择省再选择城市是OK的，但是当选择了市以后重新更改省，“省”更改了选项，但{{provinceId}}未更新，猜测是异步更新的问题，但不理解的这应该是基本的DOM绑定不应该出问题的，故在此提出。

突然想到设置　Vue.config.async = false，结果 {{provinceId}}更新了。
感觉异步模式 下的select 还是有问题，继续研究。

请用 jsfiddle 给个重现.

@yyx990803 can you put a rule for english only here on github?

@allanfreitas it's recommended to use English here, but I wouldn't make it required. Some Chinese users don't feel comfortable or simply can't accurately describe the issue in English.

 Non-English speakers should be able to question too.

hey @wangxuesong29 this issue was closed almost 4 years ago, there is no need to call out someone in that situation, they may have also changed their mind in the meantime and this could create a discussion on an inactive and closed issue. Thanks!


Doc typo

Closes #1889

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.3%) to 87.78%

Totals

Change from base Build<PHONE_NUMBER>:
0.3%

Covered Lines:
2550

Relevant Lines:
2905

💛  - Coveralls


Issue when parsing external swearWords file

Using the latest version of your demo code, plus the existing swearWords.json file, the browser produces an error message as follows:
Uncaught TypeError: badWords.concat(...).unique is not a function
at HTMLDivElement. (jquery.profanityfilter.js:148)
at Function.each (jquery.min.js:2)
at init.each (jquery.min.js:2)
at init.$.fn.profanityFilter (jquery.profanityfilter.js:122)
at profanity-original-demo.html:146
From what I can tell, the issue lies with this line:
                    var badWordsJSON = localStorage.getItem(localSwearsKey);
Where the results come back as """" (two actual quotes inside of a quoted string). This causes the next line to fail:
                    if (badWordsJSON === null) {
... because it really isn't null, it's a set of actual quotes. Changing the line to:
                    if (badWordsJSON === null ||  badWordsJSON == "\"\"") {
fixes the problem.
Thank you!

hey Friend, it's been a very very long time since I've looked at this repo. I will absolutely accept a pull request if you know what the issue is and feel like fixing it.

Hello Chase, thanks for your reply. I would love to create a pull request but I don't seem to be able to create a branch in this Github project in order to do so. I do have the fix committed in my local clone of this repo. Could you advise?

You have to fork it to your own account. Make edits there, then pr
Get Outlook for Androidhttps://aka.ms/ghei36

From: rlevy12<EMAIL_ADDRESS>Sent: Wednesday, December 4, 2019 11:21:50 PM
To: ChaseFlorell/jQuery.ProfanityFilter<EMAIL_ADDRESS>Cc: Chase Florell<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [ChaseFlorell/jQuery.ProfanityFilter] Issue when parsing external swearWords file (#30)
Hello Chase, thanks for your reply. I would love to create a pull request but I don't seem to be able to create a branch in this Github project in order to do so. I do have the fix committed in my local clone of this repo. Could you advise?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/ChaseFlorell/jQuery.ProfanityFilter/issues/30?email_source=notifications&email_token=AADTESXVWZ36WNIXN4NBW2DQXCFW5A5CNFSM4JURLP4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF7QYBI#issuecomment-561974277, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADTESWWQGU6IEAMUUQQG33QXCFW5ANCNFSM4JURLP4A.


fixing broken link (resolves #323), adding link to list of MIME types

Current coverage is 95.65% (diff: 100%)

Merging #327 into master will not change coverage

@@             master       #327   diff @@
==========================================
  Files             3          3
  Lines           138        138
  Methods          20         20
  Messages          0          0
  Branches         33         33
==========================================
  Hits            132        132
  Misses            6          6
  Partials          0          0

Powered by Codecov. Last update 9bfaf12...7fd339a


[MRG] Increase test coverage and allow for sparse inputs

Pull Request Test Coverage Report for Build 65

62 of 64 (96.88%)  changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+9.6%) to 97.632%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

stability_selection/randomized_lasso.py
5
6
83.33%

stability_selection/tests/test_randomized_lasso.py
21
22
95.45%

Totals

Change from base Build 63:
9.6%

Covered Lines:
371

Relevant Lines:
380

💛  - Coveralls


Select Item value prop error in production

Browser console error in prod
Error: A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.

Might have to build locally to replicate the bug.
Steps to reproduce:
Make sure you have a bookmark under dashboard/bookmark page and try to edit the bookmark. Error should be thrown.

Solved.


checkpointing fix for mixtral

same as https://github.com/HabanaAI/optimum-habana-fork/pull/215 but for the habana-main branch

OH upstream: https://github.com/huggingface/optimum-habana/pull/909/files


When publishing to GitHub releases, also publish changelog from commit history

Done as part of https://github.com/orgs/appifyhub/projects/1.


Psr\SimpleCache\CacheInterface::clear() has no effect on hasAvailableSpace()

Bug Report
The way the Memory adapter is currently implemented (using only memory_get_usage(true) as source of information), calling Psr\SimpleCache\CacheInterface::clear() has no effect on hasAvailableSpace().
Hence once a CacheException with previous OutOfSpaceException has been thrown, even calling clear() does not reclaim space as far as the Memory adapter is concerned. At this point the cache is permanently unusable because PHP won't ever reclaim allocated memory, only fetch more by 2 MiB increments.

Q
A

Version(s)
1.0.1

If this can't be fixed in some way, please at least document the limitation.

This test code reproduces the problem for me:
MemoryTest.php:
    public function testReclaimMemory()
    {
        // additional 200 bytes for up to 5 SHA1 items
        $this->_options->setMemoryLimit(memory_get_usage() + 200);

        try {
            for ($i = 0; $i <= 50; $i++) {
                $this->_storage->addItem('item' . $i, sha1(rand()));
            }

            self::fail('filling the cache with test data to reach the memory limit failed');
        } catch (OutOfSpaceException $ignore) {
        }

        $this->_storage->flush();
        $this->_storage->addItem('item' . $i, sha1(rand()));
    }

I have tried fixing this using memory_get_usage() and even gc_collect_cycles(). Unfurtunately that doesn't help. There are still references around somewhere.
After some research I have ended up here: https://github.com/laminas/laminas-cache/blob/2.10.x/src/Storage/Adapter/AbstractAdapter.php#L758
A quick experiment not using an ArrayObject to transport the event data seems to help. I am afraid that cannot be fixed easily.

So you say it's actually a laminas-cache issue?
Might be a duplicate of https://github.com/laminas/laminas-cache/issues/14 then, depending on whether/how that will ever be fixed.
I guess for the time being I'll need to consider switching away from laminas-cache entirely then, and check which of the other PSR-16 implementations provide a memory-based adapter, and maybe even a size limit option (which is another, unrelated requirement I have).
BTW I thought that PHP might never free allocated memory as reported by memory_get_usage(true), but I found that's not the case (see below). Which supports the thought taht the memory_get_usage(true) check is actually not the real issue.
<?php
function pm() { echo (memory_get_usage(true) / 1048576) . PHP_EOL; }

pm();

$a = [];
for ($i=0; $i<100_000; ++$i) {
    $o = new stdClass();
    $o->x = $i;
    $a[] = $o;
    if ($i % 10_000 === 0) {
        pm();
    }
}
pm();

unset($a);
pm();

gc_mem_caches();
pm();

prints:
2
2
6
10
14
22
26
30
36
40
44
48
42
6

Thanks for reporting this and thanks @weeman1337 for the failing test.
I've added it in #7 in order to have a starting point.
I've tested few things which did not work. Lets see if we can find the issue.

Is this still a thing or did you switched to a non-laminas-cache-based PSR-16 library meanwhile?
If this bug is still a thing, please let me know and I'll reopen this.

Is this still a thing or did you switched to a non-laminas-cache-based PSR-16 library meanwhile? If this bug is still a thing, please let me know and I'll reopen this.

We still use this (or are at least trying to).

As discussed in laminas/laminas-cache#14 I tried laminas/laminas-cache 4.0.x together with an adapted version of this memory adapter to see whether the signature changes (esp. those reducing the arguments passed by reference) improved the situation. The answer is no.
Next I tried to replace ArrayObject with array but that didn't help either.
Then I started looking for memory profilers and gave https://github.com/arnaud-lb/php-memory-profiler a go.
It showed that memory was consumed not only by the test subjects itself but also PHPUnit (obviously) and the Composer autoloader (not so obvious, but somewhat understandable).
At first I thought maybe PHPUnit is the culprit so I rewrote the test to run standalone. Didn't help either.
Then I replaced the Composer autoloader by hardcoded "require" statements (which obviously need to be put in the correct order, i.e. interfaces before interface implementations etc.). This did the trick, i.e. the "real" PHP memory usage finally dropped after flushing the cache.
I don't have the time to dig deeper or try to investigate possible "fixes" to the Composer autoloader so this is where it ends for me.
Unless someone else is willing to look into it, I guess the only alternative would be to change all occurrences of memory_get_usage(true) to memory_get_usage(), i.e. only look at the used memory pages instead of the allocated ("real") ones. That value seems to drop after flushing the cache. Don't know what the broader consequences of such a change would be, but maybe it could be made configurable, defaulting to the current behavior.
For the sake of completeness, here's the final version of my test script.
Just comment the memprof stuff if you don't have the extension installed locally.
<?php

declare(strict_types=1);

use Laminas\Cache\Exception\OutOfSpaceException;
use Laminas\Cache\Storage\Adapter\Memory;
use Laminas\Cache\Storage\Adapter\MemoryOptions;
use Webmozart\Assert\Assert;

final class MemoryTest
{
    private const MEM_STEPPING = 2 * 1024 * 1024; // 2 MB

    private const LOOP_LIMIT = 10_000;

    public function testReclaimMemory(): void
    {
        //$loader = require_once __DIR__. '/vendor/autoload.php';
        require_once 'vendor/webmozart/assert/src/Mixin.php';
        require_once 'vendor/webmozart/assert/src/Assert.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/StorageInterface.php';
        require_once 'vendor/laminas/laminas-eventmanager/src/EventInterface.php';
        require_once 'vendor/laminas/laminas-eventmanager/src/Event.php';
        require_once 'vendor/laminas/laminas-eventmanager/src/SharedEventsCapableInterface.php';
        require_once 'vendor/laminas/laminas-eventmanager/src/EventManagerInterface.php';
        require_once 'vendor/laminas/laminas-eventmanager/src/EventManager.php';
        require_once 'vendor/laminas/laminas-eventmanager/src/EventsCapableInterface.php';
        require_once 'vendor/laminas/laminas-eventmanager/src/ResponseCollection.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/PluginCapableInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/PluginAwareInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/AvailableSpaceCapableInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/ClearByPrefixInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/ClearByNamespaceInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/ClearExpiredInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/FlushableInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/IterableInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/TaggableInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/TotalSpaceCapableInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/Event.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/PostEvent.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/ExceptionEvent.php';
        require_once 'vendor/laminas/laminas-cache/src/Exception/ExceptionInterface.php';
        require_once 'vendor/laminas/laminas-cache/src/Exception/OutOfSpaceException.php';
        require_once 'vendor/laminas/laminas-stdlib/src/ParameterObjectInterface.php';
        require_once 'vendor/laminas/laminas-stdlib/src/AbstractOptions.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/Adapter/AdapterOptions.php';
        require_once 'vendor/laminas/laminas-cache-storage-adapter-memory/src/MemoryOptions.php';
        require_once 'vendor/laminas/laminas-cache/src/Storage/Adapter/AbstractAdapter.php';
        require_once 'vendor/laminas/laminas-cache-storage-adapter-memory/src/Memory.php';

        // Autoload Assert (used by AbstractAdapter::addItem) to get its memory footprint addition out of the way
        Assert::boolean(true);

        $options = new MemoryOptions();
        $storage = new Memory($options);

        // AbstractAdapter::addItem triggers autoloading of Assert the first time it is called.
        // Call it once here to trigger that initial autoloading and only adjust the memory limit afterward.
        $storage->addItem('init', true);
        $storage->flush();

        $startMem = self::getMem();
        printf('%d real mem at start' .  PHP_EOL, self::getMem());

        $options->setMemoryLimit(self::getMem() + self::MEM_STEPPING);
        printf('%d = new real mem limit' . PHP_EOL, $options->getMemoryLimit());

        try {
            for ($i = 0; $i < self::LOOP_LIMIT; $i++) {
                $storage->addItem('item' . $i, $waste);
            }

            throw new Exception('Filling cache with test data to reach memory limit failed, got to ' . self::getMem());
        } catch (OutOfSpaceException $ignore) {
        }

        printf('%d real mem after exception' . PHP_EOL, self::getMem());
        printf('%d mem (used pages only) after exception' . PHP_EOL, memory_get_usage());

        $storage->flush();
        unset($bin);
        if (isset($loader)) {
            $loader->unregister();
            unset($loader);
            ComposerAutoloaderInit52b4f69827d264f7b84d362d8e816c99::$loader = null;
        }
        gc_collect_cycles();
        gc_mem_caches();

        printf('%d mem (used pages only) after flush' . PHP_EOL, memory_get_usage());
        printf('%d real mem after flush' . PHP_EOL, self::getMem());

        memprof_dump_callgrind(fopen("callgrind.out", "w"));

        $dump = memprof_dump_array();
        file_put_contents('array.out', print_r($dump, true));

        $storage->addItem('item' . $i, sha1((string) mt_rand()));

        assert(self::getMem() < $options->getMemoryLimit());
    }

    private static function getMem(): int
    {
        // Real memory usage (same as in Memory methods getAvailableSpace and hasAvailableSpace)
        return memory_get_usage(true);
    }
}

$test = new MemoryTest();
$test->testReclaimMemory();

Regarding the memory_limit, I've created an RFC to remove the memory_limit in favor of max_items.
I'd love to get some feedback in #57
Thats kinda the same approach as in symfony/cache and thus I guess its well accepted out there and could be an alternative approach to have cache keys limited rather than working with memory_limit which seems flawed anyway.


update content folder links

resolve https://github.com/open-telemetry/opentelemetry.io/issues/2531
i check all links

@Arhell if you run npm run test this will update the refcache and then we can merge this.

@Arhell if you run npm run test this will update the refcache and then we can merge this.

Missing script: "_get:${GET:-submodule}"


png transformation does not apply

I was testing the package and I noticed for png it is stripping the rotation data but not actually applying it. Any thoughts?

Note that it works once I changed const pngSignature = BigInt("0x89504e470d0a1a0a");  to const pngSignature = BigInt("0x30f58d889a0d12"); in src/get-and-remove-orientation/get-and-remove-png-orientation.ts

I ended up having to use both signatures to get the existing tests for getAndRemovePngOrientation to pass:
  if (signature !== pngSignature && signature !== pngSignature2) {
    return undefined;
  }

The orientation is being calculated correctly and the correct transform function is being called but the resulting image is still not rotated correctly. This occurs for png only... very interesting.

I believe I discovered the issue with png orientation not being applied.
I've changed this:
const createTransformedDataURL = async (
  blob: Blob, orientation: number, type: string
): Promise<string> => {

  const canvas = document.createElement("canvas");
  const context = canvas.getContext("2d");

  if (context == undefined) {
    throw new Error("undefined context");
  }

  const objectURL = URL.createObjectURL(blob);
  const image = await createImage(objectURL);

  if (reversedAspectRatioOrientations.has(orientation)) {
    canvas.width = image.height;
    canvas.height = image.width;
  } else {
    canvas.width = image.width;
    canvas.height = image.height;
  }
  transformsByOrientation[orientation](image, context);
  context.drawImage(image, 0, 0);

  const url = canvas.toDataURL(type);

  URL.revokeObjectURL(objectURL);

  return url;
};

To this:
const createTransformedDataURL = async (
  blob: Blob, orientation: number, type: string
): Promise<string> => {

  const canvas = document.createElement("canvas");
  const context = canvas.getContext("2d");

  if (context == undefined) {
    throw new Error("undefined context");
  }

  const objectURL = URL.createObjectURL(blob);
  const image = await createImage(objectURL);
  context.drawImage(image, 0, 0);

  if (reversedAspectRatioOrientations.has(orientation)) {
    canvas.width = image.height;
    canvas.height = image.width;
  } else {
    canvas.width = image.width;
    canvas.height = image.height;
  }
  transformsByOrientation[orientation](image, context);

  const url = canvas.toDataURL(type);

  URL.revokeObjectURL(objectURL);

  return url;
};

And it now works.

I was able to get .png working by handling it as a special case:
// The PNG must be rotated by first drawing
// the image to a canvas, then retrieving the
// image data from that canvas, drawing to a new canvas
// and then applying the transformation.
const createTransformedDataURLPng = async (
  blob: Blob, orientation: number, type: string
): Promise<string> => {

  const objectURL = URL.createObjectURL(blob);
  const image = await createImage(objectURL);

  const startCanvas = document.createElement("canvas");
  const startContext = startCanvas.getContext("2d");
  if (startContext == undefined) {
    throw new Error("undefined startContext");
  }
  startCanvas.width = image.width;
  startCanvas.height = image.height;
  startContext.drawImage(image, 0, 0);
  const imageData = startContext.getImageData(0, 0, image.width, image.height);

  const canvas = document.createElement("canvas");
  const context = canvas.getContext("2d");
  if (context == undefined) {
    throw new Error("undefined context");
  }

  canvas.width = image.width;
  canvas.height = image.height;
  context.putImageData(imageData, 0, 0);

  const width = reversedAspectRatioOrientations.has(orientation) ? image.height : image.width;
  const height = reversedAspectRatioOrientations.has(orientation) ? image.width : image.height;

  transformsByOrientation[orientation](width, height, context);

  const url = canvas.toDataURL(type);

  URL.revokeObjectURL(objectURL);

  return url;
};


Inline out declaration of tuple causes bug.

If I declare a tuple inline with an out variable and then access a named tuple element, the generated javascript code seems wrong. The tuple element names are not  translated to Item1, Item2, ... and so on.
Minimal example to reproduce: (+ working example without inline declaration in contrast):
https://deck.net/a137a958452eb959892805243241d04f
public class App
{
    static void Test(out (int a, int b) tuple)
    {
        tuple = (1, 2);
    }

    static void NotWorking()
    {
        Test(out var tuple);
        Console.WriteLine(tuple.a);
        Console.WriteLine(tuple.b);
    }

    static void Working()
    {
        (int a, int b) tuple;
        Test(out tuple);
        Console.WriteLine(tuple.a);
        Console.WriteLine(tuple.b);
    }

    public static void Main()
    {
        NotWorking();
        Working();
    }
}

I am expecting both functions to write the same two lines to the console ("1" and "2")...
But what happens is the function NotWorking() outputs ("False" and "False")
I tried replacing the inline "var" with "(int a, int b)", but same result.
So the problem seems to be the inline out tuple and not the "var".

Hello! Thanks for reporting the issue!
I couldn't run a similar code in both dotnetfiddle and this repl.it code, but in a console application, it worked apparently the way it was expected to, such that the checks in this unit-tests-friendly version suggests:

https://deck.net/39c40a02848d7547bdebb0c18dcd0fd1

@fabriciomurta I am new to Bridge. I am willing to contribute. Can you give me a hint in which component/file I can start looking to find this bug?

Hello, @timmi-on-rails, thanks for your interest in contributing to the project, and apologies for the delay replying your message.
There are actually two "entry points" I can think of regarding this issue:

The ValueTuple class definition
The C#7 syntax's translator block in one of the files here. As this is an issue tied to C#7 syntax I believe the issue might be in the translation scenario not being handled correctly, but before an investigation takes place, I cannot guarantee you this is the problem in fact.

While you are at checking the issues, you may be interested in running the unit tests, to ensure the fix you make do not introduce other issues -- at least with code in unit tests.

Fixed! The fix will make it to the next Bridge release!


Upgrade org.codehaus.mojo:extra-enforcer-rules 1.6.2 -> 1.7.0

This PR contains the following updates:

Package
Type
Update
Change

org.codehaus.mojo:extra-enforcer-rules (source)
build
minor
1.6.2 -> 1.7.0

Release Notes

mojohaus/extra-enforcer-rules
v1.7.0
Compare Source

:boom: Breaking changes

Move to new Enforcer API - require m-enforcer-p 3.2.0 (#263) @slawekjaranowski

🚀 New features and improvements

Recognize JDK 21 class format (#262) @wendigo

📦 Dependency updates

Bump enforcer-api from 3.2.1 to 3.3.0 (#258) @dependabot
Bump spring-core from 5.3.26 to 5.3.27 in /src/it/banduplicate-classes-wildcard-exclusion (#259) @dependabot

[ ] If you want to rebase/retry this PR, check this box

Suggested commit message:
Upgrade extra-enforcer-rules 1.6.2 -> 1.7.0

See:
- https://github.com/mojohaus/extra-enforcer-rules/releases/tag/1.7.0
- https://github.com/mojohaus/extra-enforcer-rules/compare/1.6.2...1.7.0


[MODEL EVALUATION REQUEST] ibm-granite/granite-3.0-2b-instruct

Model ID
ibm-granite/granite-3.0-2b-instruct
Model type
Decoder model (e.g., GPT)
Model languages

[X] Danish
[X] Swedish
[X] Norwegian (Bokmål or Nynorsk)
[X] Icelandic
[X] Faroese
[X] German
[X] Dutch
[X] English

Merged model
Not a merged model

This is now live on the leaderboards 🎉


Add tests for the engine creation based on the user configuration

This PR adds a basic test for engine.NewForConfig on the engine to ensure that its expected behavior re: rejecting improper configurations works as expected.
Other things in the engine package also need testing, but I believe @samira-barouti is already working on those!
Signed-off-by: Jose R. Gonzalez<EMAIL_ADDRESS>

/lgtm


PHP: replace php/php-dev to php7.2/php7.2-dev and delete php5 tests

This PR is part of deprecate php5. Working towards #23645

This is just rolled back and please update distribution test with PHP7 when trying to make a fix-forward.


feat: Use unbounded channel pattern for mailbox to improve performance

Inspired by https://github.com/golang-design/chann but using thread-safe buffer underneath

@AlexanderTar Also, once you complete your new mailbox implementation, I suggest running the benchmark code to see whether there is a performance improvement.

@AlexanderTar I run your pr locally to check the performance gain and this is the result:

The same bench mark run on the main branch:

I think there is no much difference comparing the two. I am sure there are places in the code we can improve upon.

@Tochemey thanks for looking into this so quickly. I admit, I didn't run benchmarks test, so didn't realise the benefits are negligible.
I do, however, suggest we change Mailbox interface slightly by introducing Iterator() method (#188). It does improve benchmark slightly, but the main improvement is that we avoid busy thread in receive() method of pid. When I was experimenting with eGo for my own service, I noticed that spawning projections immediately makes CPU run at 100%, which profiler suggested is due to pid.receive() spinning, by introducing Iterator() as part of Mailbox interface we can now block until message is available instead of pointlessly spin in for waiting for a new message

@Tochemey thanks for looking into this so quickly. I admit, I didn't run benchmarks test, so didn't realise the benefits are negligible.
I do, however, suggest we change Mailbox interface slightly by introducing Iterator() method (#188). It does improve benchmark slightly, but the main improvement is that we avoid busy thread in receive() method of pid. When I was experimenting with eGo for my own service, I noticed that spawning projections immediately makes CPU run at 100%, which profiler suggested is due to pid.receive() spinning, by introducing Iterator() as part of Mailbox interface we can now block until message is available instead of pointlessly spin in for waiting for a new message

Thanks for this observation. That makes sense. I will take a look at the PR.

@AlexanderTar I merged the other PR. I am going to close this PR. Feel free to bring out any suggestion that will enhance performance 😉