Alsa mixer sets raw alsa volume to 0 for very high volume ranges

I have recently updated librespot to version 0.3.1 c6e97a7 (installed through raspotify), and after porting the configuration I'm facing an issue where any volume change via spotify is setting alsa volume to 0.
Hardware : Raspberry Pi 3 with HifiBerry Amp.
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_amp], device 0: HifiBerry AMP HiFi tas5713.1-001b-0 [HifiBerry AMP HiFi tas5713.1-001b-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

librespot logs :
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z INFO  librespot] librespot 0.3.1 c6e97a7 (Built on 2022-01-18, Build ID: ZBF0gGFJ, Profile: release)
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] Environment variable(s):
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_NAME="raspotify (spotipy)"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_CACHE="/var/cache/raspotify"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_SYSTEM_CACHE="/var/lib/raspotify"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_AUTOPLAY=
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_DISABLE_AUDIO_CACHE=
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_DISABLE_CREDENTIAL_CACHE=
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_ENABLE_VOLUME_NORMALISATION=
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_VERBOSE=
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_BITRATE="320"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_VOLUME_RANGE="100.0"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_DEVICE="sysdefault:CARD=sndrpihifiberry"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_BACKEND="alsa"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_MIXER="alsa"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_ALSA_MIXER_CONTROL="Master"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z TRACE librespot] #011#011LIBRESPOT_VOLUME_CTRL="linear"
Jan 26 16:53:06 spotipy librespot[4971]: [2022-01-26T15:53:06Z DEBUG librespot_discovery::server] Zeroconf server listening on <IP_ADDRESS>:36237
Jan 26 16:53:09 spotipy librespot[4971]: [2022-01-26T15:53:09Z DEBUG librespot_discovery::server] POST "/" {}
Jan 26 16:53:09 spotipy librespot[4971]: [2022-01-26T15:53:09Z INFO  librespot_core::session] Connecting to AP "ap-gew1.spotify.com:4070"
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z INFO  librespot_core::session] Authenticated as "XXXX" !
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_core::session] new Session[0]
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z INFO  librespot_playback::mixer::alsamixer] Mixing with Alsa and volume control: Linear for device: hw:CARD=sndrpihifiberry with mixer control: Master,0
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z WARN  librespot_playback::mixer::alsamixer] Alsa mixer reported maximum dB != 0, which is suspect
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z WARN  librespot_playback::mixer::alsamixer] Please manually set with `--volume-ctrl` if this is incorrect
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::mixer::alsamixer] Alsa mixer control is softvol: true
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::mixer::alsamixer] Alsa support for playback (mute) switch: false
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::mixer::alsamixer] Alsa raw volume range: [0..248] (248)
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::mixer::alsamixer] Alsa dB volume range: [-99999.99..24.00] (100023.99)
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::mixer::alsamixer] Alsa forcing linear dB mapping: false
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] Normalisation Type: Auto
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] Normalisation Pregain: 0.0 dB
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] Normalisation Threshold: -2.0 dBFS
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] Normalisation Method: Dynamic
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] Normalisation Attack: 5 ms
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] Normalisation Release: 100 ms
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] Normalisation Knee: 5 dB
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_connect::spirc] new Spirc[0]
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_connect::spirc] canonical_username: XXXXX
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_core::mercury] new MercuryManager
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] new Player[0]
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z INFO  librespot_playback::audio_backend::alsa] Using AlsaSink with format: S16
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] command=AddEventSender
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::mixer::alsamixer] Setting Alsa raw volume to 0
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z DEBUG librespot_playback::player] command=VolumeSet(0)

Any volume change via spotify yields:
Jan 26 17:17:59 spotipy librespot[4985]: [2022-01-26T16:17:59Z DEBUG librespot_connect::spirc] kMessageTypeVolume "XXXX" 39a51b714048d4ea951be139318f16b9fb152395 388889874<PHONE_NUMBER>656 kPlayStatusStop
Jan 26 17:17:59 spotipy librespot[4985]: [2022-01-26T16:17:59Z DEBUG librespot_playback::mixer::mappings] Input volume 31710 mapped to: 48.39%
Jan 26 17:17:59 spotipy librespot[4985]: [2022-01-26T16:17:59Z DEBUG librespot_playback::mixer::alsamixer] Setting Alsa raw volume to 0
Jan 26 17:17:59 spotipy librespot[4985]: [2022-01-26T16:17:59Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay]
Jan 26 17:17:59 spotipy librespot[4985]: [2022-01-26T16:17:59Z DEBUG librespot_playback::player] command=VolumeSet(31710)

I'm guessing this is related to the following warnings, however I don't see how to set the dB range using --volume-ctrl
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z WARN  librespot_playback::mixer::alsamixer] Alsa mixer reported maximum dB != 0, which is suspect
Jan 26 16:53:10 spotipy librespot[4971]: [2022-01-26T15:53:10Z WARN  librespot_playback::mixer::alsamixer] Please manually set with `--volume-ctrl` if this is incorrect

That message probably mentions the wrong command-line option. Please try with --volume-range and set it to 60.
I see that your Alsa mixer is softvol. Do you. have any particular reason to use that instead of our own softvol? Ours is of higher quality.
Anyway please let me know if that fixes it and we should change the message.

Scrap that and please test #950 if that compiles (I only have a Mac around now).

This seems to be fixing the issue, but there are some weird behaviors.
With volume-control=linear and volum-range not set I'm seeing the log "DEBUG librespot_playback::mixer::alsamixer] Alsa dB volume range was detected as<PHONE_NUMBER>875 but overridden as 60", and changing the volume in spotify changes the volume in alsa
With volume-control=cubic or log, I have to explicitly set volume-range, or I still get the raw alsa volume forced to 0 (with log, the volume gets mapped to NaN)
I'm not sure I understand the volume-range settings. The doc says "For the alsa mixer: what the control supports." , and amixer reports :
Simple mixer control 'Master',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 248
  Mono: 136 [55%]
Simple mixer control 'Channels',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 248
  Front Left: 248 [100%]
  Front Right: 248 [100%]

I would expect to set volume-range to 248 to have the best granularity, is this correct ? It's not possible as volume-range is limited to 100.
Regarding your question about softvol, I wonder if there isn't another bug somewhere. I'm passing this conf via env variables :
LIBRESPOT_MIXER="alsa"
LIBRESPOT_ALSA_MIXER_CONTROL="Master"

But the logs show "DEBUG librespot_playback::mixer::alsamixer] Alsa mixer control is softvol: true"
With the previous version of librespot that I was running (0.24 I believe), I could not get the softvol mixer to a correct setting. Either I had fine control over volume but no possibility to get high volumes, or I could reach high volumes but the smallest change in spotify would cause a big change in audio volume. It also allowed me to used the equalizer plugin of alsa.

I was able to confirm the alsa-mixer-control issue, #953  opened to track it separately;

The weird behavior is caused by your hardware or it’s Alsa driver that reports an insane range of over 10000 dB. That makes no sense and then the volume controls don’t work as expected. This is what the warning is about to set it manually.
The 248 steps are taken over correctly. So you have 10000 dB / 248 steps = non-sensical step size.
It also detects that your Master mixer is not done in hardware, but in software. Is this not correct?
I think my PR fixes the issue and the rest is explained by your configuration.

I think the docs also say that the volume range is specified in dB or did we omit that?

The weird behavior is caused by your hardware or its Alsa driver that reports an insane range of over 10000 dB. That makes no sense and then the volume controls don’t work as expected. This is what the warning is about to set it manually.

What I meant is that when setting volume-ctrl to linear, the default value of 60 for volume-range is used (while the doc seems says it should only be when using mixer=softvol), but when setting volume-ctrl to cubic or log, I must explicitly set the volume-range parameter.
But indeed, a bad driver is the root of the issue.

The 248 steps are taken over correctly. So you have 10000 dB / 248 steps = non-sensical step size.
OK, got it! And indeed the doc states that volume-range is in dB.

It also detects that your Master mixer is not done in hardware, but in software. Is this not correct?
Yes, there is no volume button on the hifiberry board, I did not understand this log correctly.

Thanks a lot for your patience and your explanations!

What I meant is that when setting volume-ctrl to linear, the default value of 60 for volume-range is used (while the doc seems says it should only be when using mixer=softvol), but when setting volume-ctrl to cubic or log, I must explicitly set the volume-range parameter.

Which doc are you referring to?

It also detects that your Master mixer is not done in hardware, but in software. Is this not correct?

Yes, there is no volume button on the hifiberry board, I did not understand this log correctly.

That's not the same. Some DACs do volume control in their own chip, so to speak. I think your HiFiBerry Amp can do that (but not with software plugins), but that's a configuration issue and not something that belongs here.

Thanks a lot for your patience and your explanations!

Sure. We weeded out one bug, after all :+1:


(3.0.53) Inspector should keep associated root object alive ...

This inpsector was opened from a debugger and the debugger itself was subsequently closed:

The item shown was a string originally, but over not too long of a time, the oop for the string was obviously recycled ... it shouldn't be too hard to arrange for the root object of an inspector to be put into an export set until the window is closed ... greatly reduces the utility of the inspector, when you can't count on the objects staying alive for the life of the window ...

The original issue I was able to reproduce before, doesn't seem to be showing up now.


Update 20240906

Minor update for freyja and ivar

Closes https://github.com/UPHL-BioNGS/Cecret/issues/364


Upstream CheMFC infrastructure

Description
Many changes are needed to implement chemistry and some are quite significant. This PR upstreams the core set of modifications that relate to code infrastructure. The PR also includes some non-chemistry, nice-to-have, updates and features.

[x] New feature (non-breaking change which adds functionality)

Scope

[x] This PR comprises a set of related changes with a common goal

How Has This Been Tested?

[x] Local OSX ./mfc.sh test.
[x] GitHub CI.

What is important here is not the correctness of the chemistry, but that these additions don't break existing code.

Can you add a brief summary of the added features/code cleaning? I realize this is a bit tedious but scrolling through the changed code is harder...

List of changes:

(Main) MFC <-> Pyrometheus compile-time integration (case setup, builds, code-gen, etc.)
(Main) Parts of m_chemistry, some separation of logic for chemistry/non-chemistry cases at compile-time, variable buffers for chemistry, and some early logic like EoS, reactions, and post_processing.
(Minor) Creation of ./mfc.sh spelling.
(Minor) Multi-threaded misc/viz.py.
(Minor) Creation of m_finite_differences.
(Minor) Updated indices.dat to include the cons/prim variables, including mass fractions.
(Minor) Fixed s_rectangle patch for immersed boundaries. Note: I forget how I encountered this. Might have been with a test.
(Minor) Explicitly zero-out rhs_vf at the start of s_compute_rhs.
(Minor) Fixed the computation time_avg in m_rhs so that it works in 1D and 2D (not just 3D).
(Minor) Multi-threaded pip install if you specify -j (could speed up Cantera builds).
(Minor) Created ./mfc.sh spelling (called by CI).

\dots and I think that's most of them. You can wait for the GT runners to come back up to merge this.

List of changes:

(Main) MFC <-> Pyrometheus compile-time integration (case setup, builds, code-gen, etc.)
(Main) Parts of m_chemistry, some separation of logic for chemistry/non-chemistry cases at compile-time, variable buffers for chemistry, and some early logic like EoS, reactions, and post_processing.
(Minor) Creation of ./mfc.sh spelling.
(Minor) Multi-threaded misc/viz.py.
(Minor) Creation of m_finite_differences.
(Minor) Updated indices.dat to include the cons/prim variables, including mass fractions.
(Minor) Fixed s_rectangle patch for immersed boundaries. Note: I forget how I encountered this. Might have been with a test.
(Minor) Explicitly zero-out rhs_vf at the start of s_compute_rhs.
(Minor) Fixed the computation time_avg in m_rhs so that it works in 1D and 2D (not just 3D).
(Minor) Multi-threaded pip install if you specify -j (could speed up Cantera builds).
(Minor) Created ./mfc.sh spelling (called by CI).

\dots and I think that's most of them. You can wait for the GT runners to come back up to merge this.

Fancy. Will do a little code review and merge once runners are up.

new_patch.patch
did you apply this patch? some of it is needed for CCE18 I think...

@sbryngelson I did but it needed some modifications to work with other compilers. I'm fixing the new errors now.

@sbryngelson You haven't approved the PR yet. Let me know if you want anything changed.

I think some documentation may need to be updated. For example, the variables here: https://mflowcode.github.io/documentation/md_visualization.html

I think some documentation may need to be updated. For example, the variables here: https://mflowcode.github.io/documentation/md_visualization.html

Since this PR adds the infrastructure for chemistry and does not claim to have working chemistry, I actively think we should refrain from documenting the existence of chemistry so as not to confuse users.

Phoenix is down, so I might have to wait to merge this. It looks like Frontier is still not working and it is interesting the Phoenix GPU test suite that finished before the servers went down showed a marked increase in performance.

@henryleberre I suppose this is up next, once conflicts are resolved? I merged #599

This is the first almost-mergable PR since #619. It's failing the CI cleanliness check, which is helpful, but in the diff it does find things like this (I was just perusing the "everything diff":
<   766 |         real(kind(0d0)) :: start, finish
---
>   261 |         real(kind(0d0)) :: start, finish
2781c2410
<   766 |         real(kind(0d0)) :: start, finish
---
>   261 |         real(kind(0d0)) :: start, finish
2820,2823d2448

We should probably change the workflow so that strip line numbers or some such before doing the diff. This is a real warning in the sense that those variables are probably not used, but it doesn't make sense to fail the check just because the user moved the subroutine down a few lines or something. @okBrian .

@sbryngelson Do I need to pass the Cleanness CI to merge?

I'd like to see what's involved in passing this test (barring the silly diff warnings, like the line change I commented on above). if no one can actually pass the test, then it needs to be adjusted somehow or removed.

@sbryngelson I'm sure I can remove the new warnings but a few are them are spurious since the testing is done with the chemistry parameter set to False. So everything that's behind chemistry = T causes warnings for being unused. Also, even if I got the new warnings to go away, the CI would still have to be updated to ignore the line number where the warnings were produced on.

ok then we can ignore it


How to ensure a field in a type is unique on recent amplify version

Amplify CLI Version
12.3.0
Question
I'm trying to define a unique field in my model. I've tried this guide: https://dev.to/callmekatootie/aws-appsync-with-amplify-how-to-ensure-a-field-in-a-type-is-unique-51hp but it refers to the outdated/legacy/(deprecated ?) version of the documentation.
It's not clear to me how to achieve the same on using the new resolver logic (This: https://docs.amplify.aws/cli/graphql/custom-business-logic/#lambda-function-resolver ).
Can anyone provide a step-by-step example?

I have the same question

@xshen053 We solved by adding an index on the field we want to be unique using @index(name: "fieldIndex", queryField: "getModelByField") and in the Lambda resolver we implemented the logic by querying the table and throwing an error if the field value is already used.


Exposed CompletionDictionaryMerger in pykeyvi

@hendrikmuhs Please have a look.
P.S. will add python unit-test later on

LGTM

Coverage remained the same at 86.143% when pulling 58f4ca5a1b68cc3814dada67686c0fb432d0ca93 on narek-cliqz:completion_dictionary_merger into 506163b1727d3ce834dc0bcfe152bc857b0e464b on cliqz-oss:master.


Upgrade to latest core/contrib, remove usage of deprecated Int[Sum|Gauge]

Signed-off-by: Bogdan Drutu<EMAIL_ADDRESS>

@bogdandrutu any chance you can run make integration-test and update w/ the results?  I'd be happy to push changes into your branch if preferred.


perf: reduce memory use

What ❔
Enables improving peak memory use by computing circuits incrementally.
The API between this crate and the witness generator changes significantly. Instead of returning circuits, this crate now takes callbacks which it calls whenever a new circuit is ready. It could directly take a channel instead but I feel that is maybe not generic enough.
This PR incrementalizes just one type of circuit to make sure that it is possible.
Also removes unnecessary datastructures, clones etc. which improves memory use as well.
Why ❔
We have to improve memory use to be able to process larger batches on reasonable computers.
The new API allows emitting circuits as soon as possible instead of keeping around circuit inputs till the end and then building all of them. I measured that the vast majority of memory goes into storing the inputs of RAM circuits and MainVM circuits. Fixing those could solve all our memory trouble.
Even with every circuit type incrementalized, an array of all ClosedFormInputCompactFormWitnesses is collected. I don't know how hard it is to get rid of that or if it is big enough to be problematic.

I get the same failures and timeouts when running the tests before and after this PR, so I guess it passes...

We should rollout it on staging, generate witness for the full block, and basically compare them (those are serializable structures, so just compare bytes)

@shamatar A note about comparing witnesses: simple diffing will indicate they have changed because the circuits are in a valid but different order. I used the following script to diff circuits.
import os, os.path, filecmp

def sorted_files(dir):
    return map(lambda x: os.path.join(dir, x), sorted(os.listdir(dir), key=file_order))

def file_order(filename):
    [a, b, c, *r] = os.path.basename(filename).split("_")
    return (int(a), int(c), int(b))

for a, b in zip(sorted_files("reference_artifacts/prover_jobs_fri"), sorted_files("artifacts/prover_jobs_fri")):
    if not filecmp.cmp(a, b):
        print("mismatch", a, b)

We'll do comprehensive testing next week. I'm unavailable tomorrow.


Large amount of aliases causing "Maximum call stack size exceeded"

Do you want to request a feature or report a bug?
Performance Bug

What is the current behavior?
When running webpack with 2050 aliases, I get this error:
>> /Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257
>> 		plugins[i].call(_this, param, innerCallback);
>> 		           ^
>>
>> RangeError: Maximum call stack size exceeded
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/ConcordModulesPlugin.js:23:28)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>>     at next (/Volumes/Repositories/myProject/node_modules/tapable/lib/Tapable.js:257:14)
>>     at Resolver.<anonymous> (/Volumes/Repositories/myProject/node_modules/enhanced-resolve/lib/AliasPlugin.js:55:10)
>> Exited with code: 1.
>> Error executing child process: Error: Process exited with code 1.

If the current behavior is a bug, please provide the steps to reproduce.
I can't provide the actual project but using that amount of aliases causes the error.

What is the expected behavior?
For the aliases to be analyzed in a way that doesn't make the process fail?
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
node 8.6.0
webpack 2.6.0
yarn 1.2.0
mac 10.12.6

@webpack-bot move to webpack/enhanced-resolve


Make runs-on support variable expression

As title.
Close issue: https://gitea.com/gitea/act_runner/issues/445
Follow: https://gitea.com/gitea/act/pulls/91
Move getSecretsOfTask and getVariablesOfTask under models because of circular dependency issues.

@KN4CK3R I have addressed the requested changes in the PR. Could you please re-review it? Thank you!

I was unable to create a backport for 1.21. @sillyguodong, please send one manually. :tea:
go run ./contrib/backport 29468
...  // fix git conflicts if any
go run ./contrib/backport --continue


[7.0.1] Missing types on import

Puppeteer version: 7.0.1
Node.js version: 12.x

import { Browser, BrowserContext, Request } from 'puppeteer';  // <--- Missing types

With the new version, what is the right way to import puppeteer types?

This is possibly a duplicate of #6816.

This seems to be fixed with version 7.0.4

[7.0.4] Seems now it can't find only Request:


360 degree arc is not a circle, is missing part of a sector

Expected Behavior:
Drawing an arc from angle 0 to 360 * PIXI.DEG_TO_RAD should draw a circle
Current Behavior:
It draws almost a circle, but a bit is missing. See: https://jsfiddle.net/3snvu0dy/83/
At around ~362 degrees, the arc seems to turn into a real circle.
Environment
PIXI 4.8.1, Chrome (67) on Windows and OSX.

Probably related to #5006, first and end points are almost the same => duplicate edge.

I haven't looked into the code that draws the circles yet, but I think I have a limited workaround for my case.
It seems that the arcs being drawn have too short an angular length as a fraction of their angular length. By stretching the start and end each about 0.013 times the angular length of the arc, one backwards, one forwards, we get the arc to have the correct angular length when rendered.
There's a caveat in that the arcs aren't drawn correctly in another way that gets visible when trying to draw a circle as multiple segments. You can't do that without either having crevices at the outside diameter or overlaps on the inside diameter.
That's certainly no fix and if you look closely at e.g. overlaid semi-transparent arc segments, you can see that they overlap more in the center than at the outside, hinting at the arcs having other problems. But for making sure that opaque elements with mostly 45 degree angles don't have gaps when touching each other and "flat" endings, this should be enough.
Here's a fiddle: https://jsfiddle.net/3snvu0dy/159/
If you enable adaptive curves, the necessary factor changes. That seems to indeed point towards the problem of points going missing. Probably points at the outer diameter, which would explain the deformation of the arc segments and the missing angular length.

A better bandaid seems to be to change this line:
https://github.com/pixijs/pixi.js/blob/49b07302126167bb668e3a331d3d579ffde65673/src/core/graphics/Graphics.js#L657
to
const theta = sweep / ((segs * 2) - 1);
and leave adaptive curves off.
This still isn't correct, but changes the drawn arc length from being noticeably too low to being just a tad too high.


Resolving webpack assets in main process unreliable

Preflight Checklist

[x] I have read the contribution documentation for this project.
[x] I agree to follow the code of conduct that this project follows, as appropriate.
[x] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

Electron Forge Version:

6.0.0-beta.54

Electron Version:

v12.0.2

Operating System:

macOS 11.2.1

Expected Behavior
webpack bundled assets present when starting the app with electronForge.start. No difference when restarting the app with rs
Actual Behavior
webpack bundled assets not present when starting the app with electronForge.start. After restarting with rs the bundled asset is present
To Reproduce
run and restart the app with:

electron-forge start
rs

Additional Information

using electron-forge webpack+typescript template
added copy-webpack-plugin

project structure
-src
---index.ts
-assets
---tray-icon
--------icon.png
index.ts / main process
//...
let trayIcon = path.resolve(__dirname, '..', 'assets', 'tray-icon', 'icon.png');
console.log(fs.existsSync(trayIcon)); //false when starting the app, true when restarting with rs
//...

webpack.plugin.js
const copyWebpackPlugin = require('copy-webpack-plugin');

module.exports = [
  // ...
  new copyWebpackPlugin({
    patterns: [{ from: path.resolve(__dirname, 'assets'), to: path.resolve(__dirname, '.webpack', 'assets') }],
  }),
];

Thanks, this has helped me with this same issue.
Just adding that yarn add copy-webpack-plugin@6 needs to be used for this to work.

Duplicate of #1431


Fix on dynamic Adroll script initialization

With previous approach, we could track events only when __adroll object has already been initialized before angularjs bootstraping process.
Now, you can initialize __adroll object in provider (or somewhere else) and still use $analytics.trackEvent() function because it calls registerTrackEvent() method in runtime.

Hi and thanks for contributing, will check everything and merge your commits tonight.
Best regards,
Bogdan

Thank you for your fast response.
Just to mention, I haven't tested if trackPage() works correctly because I don't use it.


remove unnecessary types from environment

Commit message:

The environment is only necessary to support polymorphic functions. If the environment contains type A, it need not also contain type B if B is a subset of A.

I'm not convinced this is a good change. I look forward to hearing from @svozza and others.

What misgivings do you have?

This is the change I find most concerning:
 Invalid value

 div :: FiniteNumber -> NonZeroFiniteNumber -> FiniteNumber
                        ^^^^^^^^^^^^^^^^^^^
                                 1

-1)  0 :: Number, FiniteNumber, Integer, ValidNumber
+1)  0 :: Number

 The value at position 1 is not a member of ‘NonZeroFiniteNumber’.

The argument is required to be a member of NonZeroFiniteNumber, but does not even appear to be a member of FiniteNumber in this case.

I'm going to close this. It's not sitting right with me.


format / toString inconsistency

      print('money: ${m.toString()} ${m.format("0.00")}');

output:
money: 23,55 € 0.23

My locale uses comma as decimal separator and period as thousands separator:
final euro = Currency.create('EUR', 2,
    symbol: '€', invertSeparators: true, pattern: '#.##0,00 S');

It seems that that is confusing format, but I would expect that the pattern is locale-indepent:
      final m = Money.from(23.55, euro);
      print('money: ${m.toString()} ${m.format("0,00")}');

output:
money: 23,55 € 23,55

The problem I'm trying to solve is to transform the monetary value to a double (with period as decimal separator, without thousands separator). The documentation says to use MoneyEncoder, but it seems that it is not exported (dart complains about Undefined class).

For the time being, I worked around the MoneyDecoder problem adding
import "package:money2/src/money_data.dart";
import "package:money2/src/encoders.dart";

to my Dart/Flutter source file.

I've exposed money_data and encoders in the forthcoming 2.0 release.
However I'm a little confused about the problem.
You show an output of:
money: 23,55 € 23,55
Is this not correct? - comma for decimal place.
Can you show me what you expect the output to be?

The documentation of format says:
  * , (comma) a placeholder for the grouping separtor
  * . (period) a place holder fo rthe decimal separator

but that's not what actually happens: the grouping separator and decimal separator on format's pattern depends on the invertSeparators parameter of Currency.create. (FWIW, my preference is to adapt format to the current documentation, not to adapt the documentation to what format currently does).
Then noticed that format is the wrong approach to do what I want, because format will always use the comma as the decimal separator (because my Currency sets invertSeparators = true) and I need a string representation with a period as decimal separator (and without grouping separators). The right thing for this is to use MoneyEncoder.
To recap: this bug is about format not doing what its documentation says.

OK, I think I understand what you are saying.
As it stands, in the format pattern you must always use a '.' for the decimal separator however when formatting it actually uses the currencies defined decimal separator.
This was the original design intent.
So there are four ways we could possibly fix this.

update the document to note your issue.
update the format so if invertSeparator is enabled then the format expects ',' for the decimal and '.' for groups.
change the behaviour of format so that it ignores the 'invertSeparators' field on the currency
use an alternate currency.

So I don't think 3 is viable as when parsing the format pattern we would some how have to guess that you want the '.' and ',' to ignore the inversion. A pattern like '#.#' would be ambiguous in this case.
The only way we could do this would be to add a flag to the format method to explicitly set the invertSeparators flag overwriting the currencies setting.
No. 4 however may actually be the correct approach as I think you requirement is probably unusual.
I think the following should work.
final notEuro = Currency.create('EUR', 2, symbol: '€', pattern: '###0.00 S');
final euro = Currency.create('EUR', 2,
    symbol: '€', invertSeparators: true, pattern: '#.##0,00 S');

final m = Money.from(23.55, euro);
final m2 = Money.fromBigInt(m.minorUnits, notEuro);

 print('money: ${m.toString()} ${m2.format("0,00")}');

My requirement is fulfilled by MoneyEncoder, this issue is no longer related to my original needs, but to the more general problem that I found: the documentation of format not reflecting what the function does.
So my preferred solution is 3, but if that is not acceptable (because the risk of breaking existing user code) doing 1 and 2 are the right thing IMHO to avoid the pitfall that prompted this issue.
BTW, the problem is not only about me trying to misuse format, users working with a Currency that sets inverSeparators=true and writing a pattern as per the specification described in format would likely face the same problem.


feat: implement support for uuid and date-time dataTypes, also added byte, uuid and date-time as supported primary keys

Codecov Report

Merging #201 (fa7d63e) into main (1b96c52) will decrease coverage by 0.26%.
The diff coverage is 42.14%.

@@            Coverage Diff             @@
##             main     #201      +/-   ##
==========================================
- Coverage   40.14%   39.87%   -0.27%
==========================================
  Files          35       35
  Lines        3116     3162      +46
==========================================
+ Hits         1251     1261      +10
- Misses       1707     1741      +34
- Partials      158      160       +2

Impacted Files
Coverage Δ

keys/key.go
81.81% <0.00%> (ø)

query/filter/logical.go
40.00% <0.00%> (ø)

query/filter/selector.go
50.00% <0.00%> (+16.66%)
:arrow_up:

server/metadata/key_encoder.go
35.00% <0.00%> (-8.75%)
:arrow_down:

server/metadata/tenant.go
34.39% <12.50%> (-0.76%)
:arrow_down:

value/value.go
44.97% <23.52%> (-3.27%)
:arrow_down:

schema/fields.go
57.54% <58.06%> (-3.63%)
:arrow_down:

query/filter/filter.go
57.89% <77.41%> (-1.61%)
:arrow_down:

schema/collection.go
42.18% <100.00%> (+0.91%)
:arrow_up:

schema/schema.go
69.30% <100.00%> (ø)

... and 5 more

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 1b96c52...fa7d63e. Read the comment docs.


A patch to solve issue #106

I reduced the tracerStateFieldCount to 2 to make it compatible with Pivotal Cloud Foundry's tracing implementation.

Any concern to block this PR?

Can you add a unit test which lets this package consume a span context that would have failed without this PR?

@basvanbeek I added two special environment variables to simulate that only X-B3-SpanID and X-B3-TraceID available. If the tracerStateFieldCount is 3, it will cause error.
Please help review and verify. Thanks.

Closing due to age. This solution does not properly fix the broken B3 handling issue and adds undesired configuration logic through environment variables. Maybe #119 will be updated to be inline with B3 specs.


Optional fields incorrectly appear in Go output

When using a JSON schema to generate output for Go, the omitempty tag is not applied to embedded objects that are not required by the schema. This results in the optional fields being rendered as "key":null instead of being omitted from the output which causes issues with pedantic JSON parsers.
Example JSON schema:
{
  "id": "http://json-schema.org/geo",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "basic_required": {
        "type": "string"
    },
    "basic_not_required": {
        "type": "string"
    },
    "required": {
        "oneOf": [ { "type": "string" }, { "type": "number" } ]
    },
    "not_required": {
        "oneOf": [ { "type": "string" }, { "type": "number" } ]
    }
  },
  "required": ["basic_required", "required"]
}

quicktype generated types:
type Test struct {
	BasicNotRequired *string   `json:"basic_not_required,omitempty"`
	BasicRequired    string    `json:"basic_required"`
	NotRequired      *Required `json:"not_required"`
	Required         *Required `json:"required"`
}

type Required struct {
	Double *float64
	String *string
}

Minimal Reproduction code:
package main

import (
	"encoding/json"
	"fmt"
)

type Test struct {
	BasicNotRequired *string   `json:"basic_not_required,omitempty"`
	BasicRequired    string    `json:"basic_required"`
	NotRequired      *Required `json:"not_required"`
	Required         *Required `json:"required"`
}

type Required struct {
	Double *float64
	String *string
}

func main() {
	t := Test{}
	b, _ := json.MarshalIndent(t, "", "  ")
	fmt.Println(string(b))
}

Expected output:
{
  "basic_required": "",
  "required": null
}

Actual Output:
{
  "basic_required": "",
  "not_required": null,
  "required": null
}

Playground using full code generation and generated Marshal():
https://go.dev/play/p/abGx9rplr03

Also being bitten by this.
We have a required field that has type string or null in an object in a group of oneOf.
It's missing the omitempty tag in the generated struct.

Resolved as of #2449


clusterToLayer include NaN in mean calculation

Hi there !
When calculating cluster color in clusterToLayer, the presence of a NaN value will result in a NaN mean, producing a grey cluster.
It would probably make more sense to ignore the NaN when calculating the mean.
My current workaround is to define a custom clusterToLayer
window.dlx = Object.assign({}, window.dlx, {
    custom: {
        customClusterToLayer: function (feature, latlng, index, context) {
            const {colorProp} = resolve(context.props.hideout, scatterDefaults, ["colorProp"])
            // Set color based on mean value of leaves.
            const leaves = index.getLeaves(feature.properties.cluster_id);
            let valueSum = 0;
            let nValue = 0;
            for (let i = 0; i < leaves.length; ++i) {
                let value = leaves[i].properties[colorProp]
                if (value || value === 0) {
                    valueSum += value;
                    nValue += 1;
                }
            }
            const valueMean = valueSum / nValue;
            // Render a circle with the number of leaves written in the center.
            const icon = L.divIcon.scatter({
                html: '
' + feature.properties.point_count_abbreviated + '
',
                className: "marker-cluster",
                iconSize: L.point(40, 40),
                color: getColor(context.props.hideout, valueMean)
            });
            return L.marker(latlng, {icon: icon})
        }

    }
});

I have decided to abandon the dlx namespace. I feel that it was not transparent enough, so instead i have added more examples to the doc. But you point is perfectly valid :)


Humanpose Demo - Shapes issue in Python

Nice work on this repo!  I am able to convert the pretrained model to onnx and then to IR format with no issue (using your README).  The model works with running the demo (C++ and shell script ./human-pose) but I am trying to also run it with the Python plugin.  Using your code to reshape the input image and then calling the python plugin, I get the following:
ValueError: could not broadcast input array from shape (1,3,256,384) into shape (1,3,256,456) .
Have you run the model from python on OpenVino?  Just curious (hoping to save myself some time)....

Actually no, but this output looks like that the shape of input image differs from pre-defined (during conversion to onnx) shape of network input layer. In this case network input layer (as well as the rest network) needs to be reshaped, please check this sample. It shows how to reshape network for different batch size, but can be adapted for different weight and height.

Thanks!  I was able to reshape the network prior to inference call and things flowed.  I will look at how to change the shape before conversion to onnx (just to be thorough)

Nice :+1: , thanks for the interest to the work!


请问有messages为什么还要带conversation history？

在向大模型发送messages请求的时候，会带有历史聊天记录，为什么还需要在prompt里带上conversation history呢？

@van1129 LLMs function in a stateless manner, meaning they don't have built-in mechanisms to retain information across interactions. Each query is processed independently, without considering the context of previous exchanges.
In the case of the OpenAI ChatGPT GUI/ Poe GUI, there is a truncation algorithm running in the background. It attempts to determine the relevant information from previous messages that should be included as a prompt for the new chat.
However, when using the OpenAI GPT API, implementing contextual conversation from scratch is necessary. This means managing and passing the conversation history explicitly to maintain context between messages.


Update test generator documentation.

Update the readme to better reflect the current best practices for test
generators.

I would also suggest using a consistent name for the name method (say that 3 times fast!)
The sample lib/$PROBLEM_cases.rb uses test_name, as does the list below it, but the sample example.tt erb reads <%= test_case.name %>. Doh!
A quick scan of the existing generators shows that the consensus name is name. 😄

Hmm name might be the wrong thing to use due to potential conflicts with the json file.
I'll have to check.

Addresses some of the issues discussed in: https://github.com/exercism/xruby/issues/485


Nested (2-level) unification issue

What version of CUE are you using (cue version)?

$ cue v0.4.0 (CUE playground)
$ cue v0.4.1-beta.6

Does this issue reproduce with the latest release?
Not sure
What did you do?
// A 'function' with input and output
#Function: {
    in: _
    out: _
}

// Higher-order 'function': applies input to another 'function'
#Map: {
    function: #Function
    input: _
    result: function & {in: input}
    output: result.out
}

// 'function' that adds 1 to input
#plusOne: #Function & {
    in:  number
    out: in + 1
}

x0: 1
x1: {#Map, function: #plusOne, input: x0}.output
x2: {#Map, function: #plusOne, input: x1}.output
x3: {#Map, function: #plusOne, input: x2}.output

s0: 1
s1: (#Map & {function: #plusOne, input: s0}).output
s2: (#Map & {function: #plusOne, input: s1}).output
//s3: (#Map & {function: #plusOne, input: s2}).output // fails with structural cycle

What did you expect to see?
s0: 1
s1: 2
s2: 3
x0: 1
x1: 2
x2: 3
x3: 4
s0: 1
s1: 2
s2: 3

What did you see instead?
x0: 1
x1: 2
x2: {
	#Map
	function: #plusOne
	input:    x1
}.output
x3: {
	#Map
	function: #plusOne
	input:    x2
}.output
s0: 1
s1: 2
s2: 3

A bug surely?
Why are x2 and x3 not concrete? Moreover, when we uncomment s3 we get a structural cycle?
Now if we alter plusOne a bit (with the same 'semantics') we get the result we expect, except for s3 (see take 2)??
What did you do? (take 2)
// A 'function' with input and output
#Function: {
    in: _
    out: _
}

// Higher-order 'function': applies input to another 'function'
#Map: {
    function: #Function
    input: _
    result: function & {in: input}
    output: result.out
}

// 'function' that adds 1 to input
#plusOne: {
    in:  number
    out: in + 1
}

x0: 1
x1: {#Map, function: #plusOne, input: x0}.output
x2: {#Map, function: #plusOne, input: x1}.output
x3: {#Map, function: #plusOne, input: x2}.output

s0: 1
s1: (#Map & {function: #plusOne, input: s0}).output
s2: (#Map & {function: #plusOne, input: s1}).output
s3: (#Map & {function: #plusOne, input: s2}).output | "Failure" // fails with structural cycle

What did you expect to see? (take 2)
s0: 1
s1: 2
s2: 3
x0: 1
x1: 2
x2: 3
x3: 4
s0: 1
s1: 2
s2: 3
s3: 4 | "Failure"

What did you see instead (take 2)?
s0: 1
s1: 2
s2: 3
x0: 1
x1: 2
x2: 3
x3: 4
s0: 1
s1: 2
s2: 3
s3: "Failure"

What's going on?
It looks like something is off.

It took me 1/2 a day to get this issue condensed to the above.
I was trying something completely different but got cyclic errors as a result.

It took me 1/2 a day to get this issue condensed to the above.
I was trying something completely different but got cyclic errors as a result.

The following gives more correct output. I'm not sure what is going on, though I would also suspect a bug of some sort.
// A 'function' with input and output
#Function: {
    in: _
    out: _
}

// Higher-order 'function': applies input to another 'function'
#Map: {
    function: #Function
    input: number
    // Note, result has been inlined here
    output: (function & {in: input}).out
}

// 'function' that adds 1 to input
#plusOne: #Function & {
    in:  number
    out: in + 1
}

x0: 1
x1: {#Map, function: #plusOne, input: x0}.output
x2: {#Map, function: #plusOne, input: x1}.output
x3: {#Map, function: #plusOne, input: x2}.output

// Note the change in references here
s0: 1
s1: #Map & {function: #plusOne, input: s0}
s2: #Map & {function: #plusOne, input: s1.output}
s3: #Map & {function: #plusOne, input: s2.output}

The same output reference rewrite also works with xN with result not inlined

Thanks @verdverm for the fix/workaround. Still looks like this is probably a bug because I would expect similar behaviour in all cases.

Yeah, probably a bug resulting from an inaccurate structural cycle tagging.
I'm actually in the processes of simplifying comprehension code which will have a knock-on effect on various parts of the code. I expect it will also make it easier to address this issue then.

@mpvl I have a test for a bug I found in the latest of the new comp code. Where should I create an issue or put the test? It's on slack currently

The new comp code isn't entirely finished. So it is hard to find a good spot to put it. Perhaps you can DM it to me on slack so I don't have to dig through the threads.

Some documentation/design-doc about how structural tagging works would helpful for implementors. Low priority.

@mpvl I have a test for a bug I found in the latest of the new comp code. Where should I create an issue or put the test? It's on slack currently

@verdverm - please feel free to comment in https://review.gerrithub.io/c/cue-lang/cue/+/529524 for now. I think we picked up your example and are, along with two other cases, investigating now.

Apologies - I just saw @mpvl's response above (didn't read it closely enough). Either way, I think we are covered but shout if anyone disagrees.


update ogles_gpgpu to v0.2.9

NOTE: Updating toolchains https://github.com/ingenue/hunter/pull/206

I've tested this package remotely and have excluded all broken builds.
Here is the links to the Travis/AppVeyor with status "All passed":

https://travis-ci.org/headupinclouds/hunter/builds/352156163
https://ci.appveyor.com/project/headupinclouds/hunter-8w0rs/build/1.0.15

UPDATE: ogles_gpgpu tests :point_up:

NOTE: Updating toolchains ingenue#206

Here is the links to the Travis/AppVeyor with status "All passed"

Those are aglet package testing.

Sorry about that.  Fixed.

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.3422
https://travis-ci.org/ingenue/hunter/builds/352330975?utm_source=github_status&utm_medium=notification

Uploading:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.3426
https://travis-ci.org/ingenue/hunter/builds/352351526?utm_source=github_status&utm_medium=notification

Released: https://github.com/ruslo/hunter/releases/tag/v0.20.17


plan9port: 2020-01-08 -> 2021-04-22

Motivation for this change
Relicense as MIT! Remove broken Darwin patches.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of some binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Darwin people probably need to prepare new patches.

Result of nixpkgs-review pr 127998 at 16e9c743 run on aarch64-linux 1

2 packages built successfully:

kakounePlugins.kak-plumb
plan9port

Marked darwin broken.


Unable to get empty stores list

When calling the method "ListStores" using the "OpenFgaApi" http client, I get the following error:
The JSON value could not be converted to System.DateTime. Path: $.stores[0].deleted_at | LineNumber: 0 | BytePositionInLine: 177.
It is highly blocking as I'm currently writing a middleware which creates a store if none of them exists and set up the authorization model afterwards, and this needs the stores list to be retrieved even if stores have never been deleted or if the list is empty.
Let me know if you need more information about the issue.

Thanks for raising this @geoffroybraun. Will look into it and get back to you

@geoffroybraun Can you share with us the API response when you call it through curl?
Also can you share:

Version of the OpenFGA .NET SDK
Whether you are targeting Auth0 FGA or OpenFGA?
If OpenFGA, can you share the version and whether you are running it from Docker or a prebuilt from releases?

Hello @geoffroybraun , thank you for reporting the issue. The fix is available in our latest .NET SDK release v0.1.1.  Please let us know if you still any issues. Thank you.

Hey guys ! Thank you for having fixed the bug before I even had a chance to provide all required informations. I was able to keep working on the middleware as the stores list is properly retrieved even empty or with at least one never deleted store, so thank for that I can keep improving my POC. Cheers !


Custom SVG at the end

Hi, thanks for a such a wonderfull tool :)
But i have a problem with custom svg. I wanted to add new svg icon and combine with entypo set which i use on my website. The problem is that new icon appears as the first one and all the unicode's are changed, which generating a problem. The result is, all the icons are moved one position forward.
Is there a chance, that I could generate webfont selecting custom svg which would be at the end? That would not change all the entypo unicode's inside the webfonts and I would be super happy.

Codes are automagically moved only upon conflicts. So, what you can do is:

reset all existing changes
import custom svg
select imported icons
(!) go to Customize Codes and set codes which are not in conflict with Entypo
select Entypo icons

See #283


Allow ingesting Avro complex types into JSON column.

Description
Handle Avro complex types (RECORD, ARRAY, MAP, and UNION) so that we can ingest Avro complex type data into a JSON column.
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)

[ ] Yes (Please label as backward-incompat, and complete the section below on Release Notes)

Does this PR fix a zero-downtime upgrade introduced earlier?

[ ] Yes (Please label this as backward-incompat, and complete the section below on Release Notes)

Does this PR otherwise need attention when creating release notes? Things to consider:

New configuration options
Deprecation of configurations
Signature changes to public methods/interfaces
New plugins added or old plugins removed

[ ] Yes (Please label this PR as release-notes and complete the section on Release Notes)

Release Notes

Documentation

High level question: how do JSON index, jsonextractscalar or any of the other features associated with JSON columns work with this feature?
Please submit a design document for what you want to achieve so it can be reviewed.

Codecov Report

Merging #8243 (01f8568) into master (dfc7ea8) will decrease coverage by 55.51%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             master    #8243       +/-   ##
=============================================
- Coverage     69.66%   14.14%   -55.52%
+ Complexity     4238       81     -4157
=============================================
  Files          1629     1584       -45
  Lines         85140    83275     -1865
  Branches      12815    12613      -202
=============================================
- Hits          59310    11778    -47532
- Misses        21698    70610    +48912
+ Partials       4132      887     -3245

Flag
Coverage Δ

integration1
?

unittests1
?

unittests2
14.14% <0.00%> (+0.02%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

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

High level question: how do JSON index, jsonextractscalar or any of the other features associated with JSON columns work with this feature?

This PR doesn't effect JSON index, jsonextractscalar, or any of the json querying features in any way. All we are doing here is ensuring that we recognize avro complex types (which currently throws an error message) for ingestion into a JSON column.

Please submit a design document for what you want to achieve so it can be reviewed.

If one ignores the test file, the actual change here is less than 10 lines of code with this piece being the most important:
      case MAP:
      case ARRAY:
      case RECORD:
      case UNION:
        return DataType.JSON;

Basically, what we are saying is that if you have a complex type in your avro file, we will allow for ingesting that field into a JSON column.

Where exactly is the error thrown? Can you share the exception trace?
We already handle complex avro types today. See AvroRecordExtractorComplexTypesTest and BaseRecordExtractor.convert(). Are you trying to solve the same thing? Or is this more about the "allowing" part than what happens after it is allowed? Because I see the changes will only affect the _ingestionSchemaValidator within SegmentIndexCreationDriverImpl which has no usages, and some data generation tools.

We are trying to support offline ingestion. Transforming avro file containing complex types into a Pinot segment containing JSON column. The test case JsonIngestionFromAvroQueriesTest mimics our offline ingestion usecase well. cc: @jackjlli.

Where exactly is the error thrown? Can you share the exception trace?

If you run the test case from this PR without any of the other changes, the following exception given below is produced. The changes in the PR is for making the test case pass.
java.lang.RuntimeException: Caught exception while transforming data type for column: jsonColumn

	at org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.transform(DataTypeTransformer.java:95)
	at org.apache.pinot.segment.local.recordtransformer.CompositeTransformer.transform(CompositeTransformer.java:83)
	at org.apache.pinot.segment.local.segment.creator.RecordReaderSegmentCreationDataSource.gatherStats(RecordReaderSegmentCreationDataSource.java:80)
	at org.apache.pinot.segment.local.segment.creator.RecordReaderSegmentCreationDataSource.gatherStats(RecordReaderSegmentCreationDataSource.java:42)
	at org.apache.pinot.segment.local.segment.creator.impl.SegmentIndexCreationDriverImpl.init(SegmentIndexCreationDriverImpl.java:173)
	at org.apache.pinot.segment.local.segment.creator.impl.SegmentIndexCreationDriverImpl.init(SegmentIndexCreationDriverImpl.java:155)
	at org.apache.pinot.queries.JsonIngestionFromAvroQueriesTest.setUp(JsonIngestionFromAvroQueriesTest.java:200)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
	at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:166)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
	at org.testng.TestRunner.privateRun(TestRunner.java:744)
	at org.testng.TestRunner.run(TestRunner.java:602)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
	at org.testng.TestNG.runSuites(TestNG.java:1144)
	at org.testng.TestNG.run(TestNG.java:1115)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
Caused by: java.lang.IllegalArgumentException: Cannot read single-value from Object[]: [this, is, a, test] for column: jsonColumn
	at org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.standardize(DataTypeTransformer.java:145)
	at org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.transform(DataTypeTransformer.java:63)
	... 30 more

@amrishlal You have to set jsonFormat transform function . We already handle these complex types (for all formats, not just Avro), using the code I mentioned above. Please check out the AvroRecordExtractorComplexTypesTest test I pointed to above.

Because I see the changes will only affect the _ingestionSchemaValidator within SegmentIndexCreationDriverImpl which has no usages, and some data generation tools.

Also I don't see how this change is helping. Comment from above: Because I see the changes will only affect the _ingestionSchemaValidator within SegmentIndexCreationDriverImpl which has no usages, and some data generation tools.
Is this the main line of change in this PR? Everything else doesn't seem relevant.
if (dest != PinotDataType.JSON) {
          value = standardize(column, value, dest.isSingleValue());
        }

And you shouldn't need this with jsonFormat.

Discarding commit after discussion with @npawar since our usecase appears to be handled by TransformConfig on offline side as well.


Speaker group Spotify not working

It doesn't seem to be possible to start Spotify with playback on a chromecast speaker group     "cast_type": "group" using the spotify_example.py. Do I need to use the multizone code to achieve this?

ping @emontnemery

@fondberg The point of the multizone code is just to keep track of which players are in which groups.
When using the spotify_example.py with a group, the Spotify app seems to launch successfully: the "start cast sound" is played by the group members, and the Google Home apps says that the group is casted to with Spotify.
The problem might be with spotipy, once this code is done, device_id is None:
    for device in devices_available['devices']:
         if device['name'] == CAST_NAME:
             device_id = device['id']
             break

@emontnemery I tested a little more and unfortunatly I think you are correct, the problem must be ub spotify (the least maintained library on github, last PR merged was oct -17).
Thanks for the feedback and I'll keep you updated on that I find

Hi,
I think spotipy only returns a list of available devices through this Spotify API
https://api.spotify.com/v1/me/player/devices
https://developer.spotify.com/console/get-users-available-devices/
So if the app is launched properly on the Chromecasts group Spotify should register these devices and return this value.
I did see that when starting the cast from my iPhone the device_id returned from Spotify API is in caps whilst regular devices values are returned in lower cases.
Might it be that the namespace differs?

@phr0z interesting, I only checked with what I got back from spotipy and yes it only returns devices from that endpoint.
What we need is the spotify device id so if you found which API endpoint from spotify the iOS app spoke to we can reverse engineer it.

I used this code to retrieve the following;
code:
`import logging
import sys
import time
import pychromecast
from pychromecast.controllers.spotify import SpotifyController
import spotify_token as st
import spotipy
device_id = None
device_name = None
data = st.start_session("myspotifyusername", "myspotifypassword")
access_token = data[0]
expires = data[1] - int(time.time())
client = spotipy.Spotify(auth=access_token)
sp = SpotifyController(access_token, expires)
devices_available = client.devices()
print("devices found:", devices_available)
`
result:
root@plex:/librespot/target/release# python3 spotify_refresh_devices.py devices found: {'devices': [{'id': 'xvbny', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'DESKTOP', 'type': 'Computer', 'volume_percent': 41}, {'id': 'xbzvy', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'iPhone', 'type': 'Smartphone', 'volume_percent': 100}, {'id': 'ABCDEFGHIJ1234', 'is_active': True, 'is_private_session': False, 'is_restricted': False, 'name': 'MultiRoom', 'type': 'CastAudio', 'volume_percent': 100}]}
Note that Im running this while Im playing on my group initiated by Spotify app on iPhone. (Spotify drops the devices pretty quickly if they're not being used)
There's also the possiblity to start casting from play.spotify.com with Chrome web browser. That would allow for some additional debugging.
MultiRoom is infact my group and it's not listing any other single chromecast devices.
I'll keep digging and see what else I can find.

Some data captured from Wireshark when initiating a cast to my group from Spotify iPhone app.
The device_id registered in Spotify is based on the mdns reply. Sorry for the red-out.
Basically the red-out aread contains an "id/guid/whatever" which is the one https://api.spotify.com/v1/me/player/devices returns.
https://imgur.com/a/Gakm3Am

I think I actually solved it.
Will upload example soon. :-)

example here: https://github.com/phr0z/pychromecast/blob/master/examples/spotify_example_group.py
It does seem like it initializes another application in fact 531A4F84
For now I only seem to be able to playback single tracks uri's. It throws an error when i specify playlist uri.
Might be spotipy, too tired to continue right now. :-)
Please try.

wow! Cool i'll try!

I'm reopening this because I think we can add this functionality without Spotify help

Hi,
Yes using my script and also Chrome browser it seems that way. "Master device" can change between my Chromecasts. But it will be the device witch uses the new app id.
Simple way for you to verify this is to try with Chrome browser, go to http://play.spotify.com
Then fetch your current running app_ids on your Chromecasts.
If I understand you correctly this is not the case for you when you use my script? I mean it doesnt always launch 531A4F84 on one of your devices?
This is the output i get with either my script or Spotify launched and casted from Chrome.
current_launched_apps
after_cc_device_id: Sovrum
after_cc_app_id: 705D30C6
after_cc_device_id: Vardagsrum
after_cc_app_id: 531A4F84
after_cc_device_id: MultiRoom
after_cc_app_id: CC32E753
after_cc_device_id: Kok
after_cc_app_id: 705D30C6
master_device: Vardagsrum

Im speculating in that the reason _.app_id() returns "None" might have something to do with the how the session is handled. You can't really run it outside the scope of your application.

The example from @phr0z is a good start, but I think it's better to check group membership instead of app id, it seems a bit error prone in case several family members are casting at the same time.

Question though: is there a way to get more information on a device with cast_type='group'? Can I get its individual devices?

Yes, that's the point of the multizone stuff.
Here's an example for how to do just that that:
https://github.com/balloob/pychromecast/blob/master/examples/multizone_example.py
With this, we can see if the cast Spotify reports in the API is a member of the group we want to play to, although just by name.
Checking group membership only is enough: If one group member is playing individually while the group is also active, a unique dynamic/temporary group excluding the individually playing group is formed. The temporary group has the same name, but a different UUID.
Just checking app id seems a bit error prone in case several family members are casting at the same time.
It's error prone to match on player name, cast allows multiple devices to have the same name, and the casts have a UUID to distinguish them.
@fondberg Any idea how the id in the v1/me/player/devices response is derived?

the spotify id in devices is derived from mdns name. check my imgur above.

@phr0z Would you mind you explaining how it's derived? Your image seems to have all the juicy bits censored and you're not mathcing spotify id with cast mdns data in your example either.

I dont think anyone but Spotify themselves know exactly how it's derived. The API is not transparent.
A qualified guess would be a simple extract of the ID string in the MDNS record (TXT,SRV or PTR don't remember off the bat) which is not the same as the UUID which pychromecast gets. UUID contains dashes while the ID in the MDNS record is just one long identifier.
I do agree that it would be better to match directly against the id and to do so we need pychromecast to extract this ID value from the MDNS records.

@phr0z ok..
Anyway, will you update your example to check group membership for a better guess of which cast to cast to?
@fondberg do you suggest anything but an example is added to PyChromecast?

Sure I can add a check for that with the help of
if _device.cast_type == 'group'` :)

I meant to check group membership as outlined here: https://github.com/balloob/pychromecast/issues/292#issuecomment-491174814

I think we don't need to update anything but the spotify example. Preferably one example instead of 2.

@emontnemery
Yes Im not sure I understand. To me it seems like the multizone example is for handling chromecast members dynamically, that's not what (at least Im) we're after here.
The APP ID ("master device") I check for only launches if it the cast is initiated on a group. (which I think pychromecast already handle the members for?)
Go ahead and extend if I misunderstood.
Please excuse me. This is my first encounter with python.

To me it seems like the multizone example is for handling chromecast members dynamically, that's not what (at least Im) we're after here.

What I tried to explain before is that there might be other users already casting. Hence, just looking for a cast which has the spotify app launched is not good enough, we need to make sure that cast is a member of the group we want to cast to.
I'll update the example to show how this can be done.

@fondberg, @phr0z Please have a look here: #294

@emontnemery looks promising. I will test this as soon as I can

@emontnemery
Ah yes I see, nice!
Seems to be working properly.


Muted video still pauses playing Android audio

Current behavior
Going to a screen with the Video component displayed causes any background music to stop playing on the Android device.
Reproduction steps
v3.2.0
Add the component to a screen with muted={true}:
         <Video
                    muted={true}
                    source={...}
                    style={...}
                />

Expected behavior
I would expect the Video component to not affect any background audio at all.
Platform
Which player are you experiencing the problem on:

Android

Related
#1103

The same issue also happened on iOS. Any solution for this?

@stacywang0601 Encountered the same problem, for iOS, please see https://github.com/react-native-community/react-native-video#audio-mixing.

Me too I am facing this issue. Any fix?

Hi From my understanding you trying to set the video to mute when it starts,
I found a solution for Android for it it is in the plugin file ExpoPlayerView.java
in function  setVideoView set player.setVolume(0.0f);
private void setVideoView() {
if (surfaceView instanceof TextureView) {
player.setVolume(0.0f);
player.setVideoTextureView((TextureView) surfaceView);
} else if (surfaceView instanceof SurfaceView) {
player.setVolume(0.0f);
player.setVideoSurfaceView((SurfaceView) surfaceView);
}
}

Anyone still having related issues try changing the following in the /android/settings.gradle file:
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
to
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')

2 years later... still happening :|

Why this issue still present, hays!

We use autolinking, and since the correct player is not linked by default, we needed to modify our react-native.config.js to use the correct exoplayer like in this issue:
module.exports = {
  dependencies: {
     'react-native-video': {
       platforms: {
         android: {
           sourceDir: './node_modules/react-native-video/android-exoplayer',
         },
     },
  },
};

We also needed to make sure that this config wasn't getting changed by a previous installation, so we removed these lines from settings.gradle:
include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')

These lines, along with any other leftover native code, should also be able to be removed with react-native unlink react-native-video depending on your setup.

android-exoplayer

but i need to use android-exoplayer

Anyone still having related issues try changing the following in the /android/settings.gradle file:
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
to
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')

but i need to use android-exoplayer


Unauthorized No Body but alias added for Telegram user

Describe the bug
The issue is coming up when the local user is created and the email server while alias creation throws some error. And since the check is not made is the server returned any issue, the email is allocated to the user despite on the server side it was not created.
To Reproduce
Steps to reproduce the behavior:

Add invalid credentials in the config.
Create an email from the telegram

Expected behavior
If the server throws error while email-id creation, the email should not be assigned to the telegram user.

Will be addressed in #16


feat: 🎸 add HfApi.update_repo_settings to set a repo as gated

It also allows to disable/enable the discussions.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

not sure if there's a need to expose this programmatically to end users?
WDYT @osanseviero @Wauplin?
If not, maybe keep it in your downstream code or in a helper

OK

Probably there is not much interest in programmatically gating repos. Maybe we can revisit this PR if we get requests on this

You're right, it's much simpler to keep it in my downstream code.

I currently find myself needing to gate access to 498 datasets and feel it would be useful to expose that in HfApi, or maybe in the web interface on organization level (i.e. every dataset I publish in an org has to be gated with the following user agreement).

Here is the code I'm using, in case it helps:
https://github.com/huggingface/datasets-server/blob/main/e2e/tests/fixtures/hub.py#L24-L92

I sadly cannot access that file; any chance you could include it in a gist? :smiley_cat:

Oh, sorry, here it is: https://gist.github.com/severo/0e9a1d8fb91f5ecb9c123ac48fbe6ea4
btw, we plan to opensource datasets-server in the next months.

well... i stand corrected then! there is user demand for this!
Should we merge/add this feature then? WDYT?

(though by "user", i mean @cakiki-level power user 😅)


[doc, entropy_src] Provide description of how otp_en_entropy_src_fw_read_i is used

I am mapping the TODOs that came from chip level testplan reviews to issues. One of these is:
Add description on how otp_en_entropy_src_fw_read_i input from OTP is used by entropy_src

A description is provided in PR #7497.

i think we can close this one now since the description is there.


HTML rewriter transform not going inside of element() { } method

Hello,
I am trying to work with HTML rewriter but having some trouble.
Here is the code i am trying to run
class LinksTransformer {
    constructor() {
      this.links = linksData
      console.log('constructorrr')
    }
    element(element) {
      console.log('comeon come here')
      console.log(`Incoming element: ${element.tagName}`)
    }
    text() {
      console.log('hereeee')
    }
  }
async function transformResult(response) {
    return new HTMLRewriter()
      .on("*", new LinksTransformer())
      .transform(response)
}

Although, when the transformResult function is called, and hence HTMLRewriter, which will create new instance of LinksTransformer() function.
I am getting console.log from the constructor. Although, I am not getting any log from element() or text() functions.
I was wondering if there is some issue with the HTML rewriter.
I examined the response and response.text() contains the HTML that i want to edit.
I looked up in the docs and community questions but nothing helped. Any help is appreciated! Thanks!!

Hello Snehi,
What's calling transformResult?
Joaquin
On Sun, Oct 11, 2020 at 6:03 PM 'Snehi Pachchigar' via
cloudflare-assignment-application <
<EMAIL_ADDRESS>wrote:

Hello,
I am trying to work with HTML rewriter but having some trouble.
Here is the code i am trying to run
class LinksTransformer {
constructor() {
this.links = linksData
console.log('constructorrr')
}
element(element) {
console.log('comeon come here')
console.log(Incoming element: ${element.tagName})
}
text() {
console.log('hereeee')
}
}
async function transformResult(response) {
return new HTMLRewriter()
.on("*", new LinksTransformer())
.transform(response)
}
Although, when the transformResult function is called, and hence
HTMLRewriter, which will create new instance of LinksTransformer() function.
I am getting console.log from the constructor. Although, I am not getting
any log from element() or text() functions.
I was wondering if there is some issue with the HTML rewriter.
I examined the response and response.text() contains the HTML that i want
to edit.
I looked up in the docs and community questions but nothing helped. Any
help is appreciated! Thanks!!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/cloudflare-hiring/cloudflare-2020-general-engineering-assignment/issues/2,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARBVIAIJZXRFGZIIPLMQ36DSKI2S7ANCNFSM4SMCTKGQ
.
--
You received this message because you are subscribed to the Google Groups
"cloudflare-assignment-application" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to<EMAIL_ADDRESS>To view this discussion on the web visit
https://groups.google.com/a/cloudflare.com/d/msgid/cloudflare-assignment-application/cloudflare-hiring/cloudflare-2020-general-engineering-assignment/issues/2%40github.com
https://groups.google.com/a/cloudflare.com/d/msgid/cloudflare-assignment-application/cloudflare-hiring/cloudflare-2020-general-engineering-assignment/issues/2%40github.com?utm_medium=email&utm_source=footer
.
For more options, visit
https://groups.google.com/a/cloudflare.com/d/optout.

--
Joaquin Madruga | Engineering Director
<EMAIL_ADDRESS>1 888 99 FLARE  |  www.cloudflare.com

Hi Joaquin,
So I have set up a router , for path /:
r.get('/',request => renderStaticPage(request))
This renderStaticPage essentially calls await transformResult(response)
The response can be the one fetched from URL, but I changed the code above in transformResult() to fetch response directly from URL.

It sounds like the page you're passing to transformResult may not be HTML.
I'd try removing the router and directly passing the response from a
subrequest with a hardcoded URL to see if that works.
Joaquin
On Mon, Oct 12, 2020 at 10:41 AM 'Snehi Pachchigar' via
cloudflare-assignment-application <
<EMAIL_ADDRESS>wrote:

Hi Joaquin,
So I have set up a router , for path /:
r.get('/',request => renderStaticPage(request))
This renderStaticPage essentially calls await transformResult(response)
The response can be the one fetched from URL, but I changed the code above
in transformResult() to fetch response directly from URL.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/cloudflare-hiring/cloudflare-2020-general-engineering-assignment/issues/2#issuecomment-707196075,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARBVIAMHV575BWC5LV6GZFDSKMPRJANCNFSM4SMCTKGQ
.
--
You received this message because you are subscribed to the Google Groups
"cloudflare-assignment-application" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to<EMAIL_ADDRESS>To view this discussion on the web visit
https://groups.google.com/a/cloudflare.com/d/msgid/cloudflare-assignment-application/cloudflare-hiring/cloudflare-2020-general-engineering-assignment/issues/2/707196075%40github.com
https://groups.google.com/a/cloudflare.com/d/msgid/cloudflare-assignment-application/cloudflare-hiring/cloudflare-2020-general-engineering-assignment/issues/2/707196075%40github.com?utm_medium=email&utm_source=footer
.
For more options, visit
https://groups.google.com/a/cloudflare.com/d/optout.

--
Joaquin Madruga | Engineering Director
<EMAIL_ADDRESS>1 888 99 FLARE  |  www.cloudflare.com

But this line - .transform(await fetch(url)) directly fetches response from the URL.
I examined the response it fetches. So in response.text() from the URL, I got the HTML response which I need to modify.


Feature: Request visionOS Support

Issues are used to track bugs and feature requests.
Need help or have a general question? Ask on Stack Overflow (tag sqlite.swift).

Build Information

Include the SQLite.swift version, commit or branch experiencing the issue.
Mention Xcode and OS X versions affected.
How do do you integrate SQLite.swift in your project?

manual
CocoaPods
Carthage
Swift Package manager

General guidelines

Be as descriptive as possible.
Provide as much information needed to reliably reproduce the issue.
Attach screenshots if possible.
Better yet: attach GIFs or link to video.
Even better: link to a sample project exhibiting the issue.

@loganblevins visionOS support is now added in 0.15.1, you can use it via SPM and let us know if you face any issue.

Oh yeah I forgot to close that issue, it was not linked to the PR apparently


Block-scoped declarations (let and const)

@MStoykov (and others interested), I'd like you to give it as much regression testing as possible and let me know if it broke anything. There are obviously a lot of changes and at least one breaking change: functions are now declared at the block level (as they are in es6).

I managed to run the k6 tests yesterday. The two commits are just updating goja and rerunning tc39 and then dropping check-es2015-constants and transform-es2015-block-scoping from the plugins that babel is using.
The way k6 runs scripts is "special" in that it will try to run them through goja and if there is an error during parsing and (now) during compilation, the script will be transformed by babel and then retried again.
The file js/tc39/breaking_test_errors.json is the errors from the tests that do not pass so any changes to those are potential problems, although in general, most are just changes in the text of the error (one of the bigger problems with this approach). I haven't had time to go through all the errors and to see whether for example if someone users babel and then runs through goja will not now have some of their code is broken and to what extend (as sometimes in the past the breakages haven't been interesting or important - like allowing for methods to have arguments and caller ;).
I will be going through the diff of breaking_test_errors.json more during the next week, although we are a week before a release, so I might not have as much time as I would like :(. Here is a list with some questions and problems so far (will likely update them during the week),  I am going to use numbers instead of "names" as naming things is hard ;):
1
A thing that I noticed is that a lot of tests are now failing with SyntaxError: Unexpected strict mode reserved word for tests that just have some class in it, which seems like for some reason whatever code babel returns is then rejected by goja.
The example that I went through is test/built-ins/Function/internals/Call/class-ctor.js which gets transformed(I personally add fmt.Println in the compiler) to:
'use strict';
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-ecmascript-function-objects-call-thisargument-argumentslist
description: Error when invoking a class constructor
info: |
  [...]
  2. If F's [[FunctionKind]] internal slot is "classConstructor", throw a
     TypeError exception.
features: [class]
---*/function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}let

C = function C() {_classCallCheck(this, C);};

assert.throws(TypeError, function () {
  C();
});

with the error SyntaxError: Unexpected strict mode reserved word at test/built-ins/Function/internals/Call/class-ctor.js:12:155
funnily enough
function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}

let C = function C() {_classCallCheck(this, C);};
C();

Works as expected(throwing the TypeError) so this seems to be because of the let placement?
2
Another thing is that for example test/built-ins/Function/prototype/toString/function-declaration.js is failing with ReferenceError: assertToStringOrNativeFunction is not defined which is defined as const if it was defined with var it works(this is what babel used to basically ;)). I don't wrap or create any blocks between the "imports", but it seems like goja automatically does? Or maybe something else is happening :man_shrugging:

for 1. the following code breaks:
"use strict";
function s(){return 5}let
p = s()

breaks.
Moving the p = s() fixes it. as well as adding ; before let. Removing "use strict" just changes the error to the fact that let in undefined.
Dropping
https://github.com/dop251/goja/blob/1f489c2c21c198e3e8bf5689a7d5c95e1eabe80e/parser/lexer.go#L252-L260
"fixes" it, but obviously breaks other cases. But for example, after that around 200 tc39 tests pass in k6.
From some of the other tests, I am not certain if this shouldn't be fixed in the compiler though. Either way, I haven't read the spec in detail enough and I don't understand the parsing code(or most of goja :joy: ) , enough, to be able to easily fix it ;(
The remaining tests seemed to be either one of 2 or 3 or to do with arguments of a function, but I would argue it will be easier to figure out when the above problems are fixed :).

Hi, yes, sorry for not responding earlier. 1. is due to the fact that let can be used as an identifier in non-strict mode (unless it's a name of a lexical binding) which makes parsing non-trivial, especially when ASI is thrown in the mix.
2 and 3 is the same issue, to do with the way lexical bindings work in the global context which is rather tricky (but then again, in ECMAScript, what isn't?).
I believe I have fixed the both issues, just running some checks...

I tested the latest patches and that seem to fix all the newly broken tests :tada: (or at least it seems so on first glance) , but introduces a breaking change for us:
we added a way to catch panics inside k6 (if they are while executing scripts) and are printing the place they are happening inside the js script, unfortunately, after the last update CaptureCallStack returns just native :(. Looking at the changes I can't see anything obvious :(

The new behaviour is correct I'm afraid. The reason it "worked" before (in quotes, because the reported location is incorrect anyway) was the fact that vm.prg was not reset when leaving the execution context (i.e. when the top-level call returns). Basically at the point when your defer() is called the execution context has been already abandoned, the vm is restored to its initial state ready for the next run. Calling CaptureCallStack at this time is pointless.
If you need to catch 'native' panics, you need to do this in the native code (in this example in the panic function) and re-throw them after wrapping in GoError or any other Value. Then the error will be returned as an *Exception in the fn call here: https://github.com/loadimpact/k6/pull/1697/files#diff-0f675fa3e61b737c161f4231ff48d85831738d5ec7aea1223315c16c994b2e44R642

The new behaviour is correct I'm afraid.

That is unfortunate, but I understand why you prefer it to be implemented like that.
The point though is that sometimes (rarely) we get panics in places where we don't expect - for example, some of the ones I have reported here. So sometimes there isn't a non goja code before it. So being able to see that the errors happened at line 12 in this js file was really useful at least once. We also had some other cases where the k6 code wasn't doing enough checks and we had some null pointer panics or out-of-bounds access :facepalm: .
In general, I would say that this code doesn't catch as many things to be all that useful, and obviously, we want to basically then fix them, so this is mostly making debugging and diagnosing those harder.
I have redone my commits in the branch, predominantly to fix k6 tests of which there were a lot which ware reusing a runtime and calling a script after script sometimes having the same variable name ... which now breaks ... so that took some fixing and we actually have been planning to split those tests ... for quite some time, so this likely is better either way.
Additionally here is a list of tc39 tests that have either started failing or are failing in a ... new way compared to using babel + goja from master:

test/language/statements/for-of/scope-head-var-none.js is now failing the first assert. Some tests with similar names are now passing through.
test/language/statements/for-in/scope-head-var-none.js same but for for-in not for-of
test/language/global-code/decl-lex.js - there is class in this one, but it actually dies on line 26 with TypeError: Cannot read property 'hasOwnProperty' of undefined or null so apparently this doesn't have hasOwnProperty ?
test/language/eval-code/indirect/var-env-func-init-global-update-non-configurable.js - seems this.f is configurable after the eval
test/language/eval-code/direct/var-env-func-init-global-update-non-configurable.js same as above but eval is called not funnily
test/language/block-scope/syntax/for-in/disallow-initialization-assignment.js
test/language/expressions/arrow-function/lexical-new.target-closure-returned.js it is about arrow functions, but the babel transformed code is the same:

function F() {
  this.af = function (_) {
    if (new.target) {
      return 1;
    }
    return 2;
  };
}

var f = new F();

assert.sameValue(f.af(), 1);

a bunch of arguments-object tests that I am going to not link one by one ;) (there are a lot of failures around this either way so ... likely nothing of consequence have been broken):

test/language/arguments-object/mapped/nonwritable-nonenumerable-nonconfigurable-descriptors-set-by-param.js
test/language/arguments-object/mapped/nonwritable-nonenumerable-nonconfigurable-descriptors-set-by-arguments.js
test/language/arguments-object/mapped/nonwritable-nonenumerable-nonconfigurable-descriptors-basic.js
test/language/arguments-object/mapped/nonwritable-nonconfigurable-descriptors-set-by-param.js
test/language/arguments-object/mapped/nonwritable-nonconfigurable-descriptors-basic.js
test/language/arguments-object/mapped/nonconfigurable-nonwritable-descriptors-define-property-consecutive.js
test/language/arguments-object/mapped/nonconfigurable-nonwritable-descriptors-basic.js
test/language/arguments-object/mapped/nonconfigurable-nonenumerable-nonwritable-descriptors-basic.js

Apart from that I have not seen any problems, but also have run very small number of tests with it, but hopefully, after the release(of k6 v0.31.0) we will have some more time and will upgrade to this to try out with some more real scripts.
We have a pathological script (quite big and very ... unlikely to run okay either way) which was taking around 50 minutes+ to transform with babel. I did find out the problem was the "plugin-transform-block-scoping" as without it (and code that doesn't need it) it was done in under a minute, now it takes exactly 1 minute in my testing so .... that's nice ;)
Thanks a lot again and I hope we will be able to upgrade to it soon :tada:

1, 2, 3 and 7 are babel bugs (or perhaps it's just not possible to implement it properly in ES5, I didn't look close enough). I have now fixed what was genuine bugs, could you please run the tests again? If there are no new failures I think it's in good enough state to be merged into master.

Everything else seems fine :rocket:
Great job and thank you again for working on goja :bow:

Was this implemented? I'm getting errors when using let or const:
let x = 1;
console.log(x)

SyntaxError: test.js: Line 1:5 Unexpected identifier (and 1 more errors)

Ah, I had an older version of goja. Works fine!


The commits regarding CodeRay and regexps cause the specs to fail, so I'm holding off on them.

Il giorno sab, 03/03/2012 alle 01.02 -0800, Matijs van Zuijlen ha
scritto:

The commits regarding CodeRay and regexps cause the specs to fail, so I'm holding off on them.

I'll check the specs again then (I have different checkouts due to
packaging issues).
What about the Addressable change though?
--
Diego Elio Pettenò<EMAIL_ADDRESS>


Update report_updateLastRead to not set the sequenceNumber backwards unless specifically told to by the user

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Stale update requests are causing people's messages to be marked as unread on accident. This change will prevent stale requests from doing that, while still letting markAsUnread work as intended
Changes:

Add a new param setByUser
Add a check that prevents the new lastReadSequenceNumber from being less than the previous lastReadSequenceNumber
If setByUser is passed, then we ignore that check and allow it to be set to whatever the user chose

View all open jobs on GitHub

cc @kidroca does this look fine for the requirements?

@johnmlee101 looks good 👍

Maybe I'm confusing myself but after looking at this for a while but:

What is different about either of these cases?
How do these differ from updateLastRead?

updateLastRead just sets the current sequenceNumber read on the report so:

Mark everything up to this comment as read and if it's read anyway it'll just do nothing

To accomplish this we set the lastRead sequenceNumber to the sequenceNumber of that comment which can be accomplished by updateLastRead

Mark this comment as unread then and only then it would mark everything past that point as unread

This is the same thing right? We just set the lastRead sequenceNumber to that comment which makes everything past it unread

It's way too easy to make a mistake and mark messages as unread the way updateLastRead works currently
The aim for this change is to avoid auto setting possibly read messages as unread, and instead have a specific action that would only be used after user deliberately marks an older message as unread
The linked comment and the discussion points out such cases

The discussion and overview of how this helps is from https://github.com/Expensify/App/issues/3981#issuecomment-962437872

Gotcha. So I don't think we need new API commands based on that comment. Like I mentioned above the functionality of both could be done with the current updateLastRead command. All it does is take a sequenceNumber and set that as the last read.
What do you think of doing this update to updateLastRead instead:

Add a new param setByUser
Add a check that prevents the new lastReadSequenceNumber from being less than the previous lastReadSequenceNumber
If setByUser is passed, then we ignore that check and allow it to be set to whatever the user chose

Thoughts?

What do you think of doing this update to updateLastRead instead:

Add a new param setByUser
Add a check that prevents the new lastReadSequenceNumber from being less than the previous lastReadSequenceNumber
If setByUser is passed, then we ignore that check and allow it to be set to whatever the user chose

I remember it was proposed to create a new action or add a parameter to the existing, like you say, but I don't remember why we decided to go with separate action
Maybe the intent is clearer

markAsUnread -> marks everything since the sequence number as unread
markAsRead -> marks everything before the sequence number as read

After talking to @stitesExpensify 1:1 we decided that having 2 API commands isn't strictly necessary. One flow is a soft-set of the unread/read marker pivot point, and the other is a force set. If the user is marking manually, that will force the sequence number no matter what, while if it isn't manually set it will do a soft check to make sure its not setting below the existing sequenceNumber.
Given that, I will be putting this on hold as we'll be pursuing a potential high-level refactor of this logic to simplify and inevitably fix these issues.

After thinking about this some more and chatting with @marcaaron I decided that this is a very easy change that should significantly improve the experience WRT stalled requests. PRs are up

Not done yet

App PR is on staging, waiting for it to go to prod before we merge the web-e PR

Web PR is on prod, unsure why it didn't get posted here, but that means this is done!