Map merge crashes build when trying to replace string value with map

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.76.5/extended windows/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?
Yes.
When running the command hugo server on my computer, the build crashes when trying to perform a map merge where a value being replaced is a string and is being replaced with a map. Since nested maps are supported, and since variable types are not enforced, it seems like this behavior should definitely be allowed. After seeing this issue with my code, I distilled it down to a few test cases which you can see below, that clearly demonstrate the issue.
{{/*  This works */}}
{{ $testDict :=                 (dict "someKey" "a string value" ) }}
{{ $testDict = merge $testDict  (dict "someKey" "any other string" ) }}
{{ $testDict = merge $testDict  (dict "someKey" (dict "innerKey" "innerval" ) ) }}

{{/*  This works  */}}
{{ $testDict :=                 (dict "someKey" (dict "innerKey" "innerVal") ) }}
{{ $testDict = merge $testDict  (dict "someKey" "any string" ) }}

{{/*  This Works  */}}
{{ $testDict :=                 (dict "someKey" (dict "sameInnerKey" "innerval" ) ) }}
{{ $testDict = merge $testDict  (dict "someKey" (dict "sameInnerKey" "different innerval" ) ) }}

{{/*  This Works  */}}
{{ $testDict :=                 (dict "someKey" (dict "notSameInnerKey" "innerval" ) ) }}
{{ $testDict = merge $testDict  (dict "someKey" (dict "differentInnerKey" "different innerval" ) ) }}

{{/*  This Works  */}}
{{ $testVar := "string" }}
{{ $testVar = (dict "someKey" "someVal" ) }}

{{/*  This Crashes  */}}
{{ $testDict :=                 (dict "someKey" "a string value" ) }}
{{ $testDict = merge $testDict  (dict "someKey" (dict "innerKey" "innerval" ) ) }}

I don't think it changes anything, but just in case it helps, here is the code that I originally found this bug with for some additional context:
{{ if $currentBundledProduct }}
  {{/* There is no variant select for bundled items, so default to variant 0 if product has multiple */}}
  {{ if not $currentBundledProduct.variant }}
    {{ $currentBundledProduct = merge $currentBundledProduct (dict "variant" (index $currentProduct.variants 0).id ) }}
    {{ if (eq $currentBundledProduct.subscription "seeVariants") }}
      {{ $currentBundledProduct = merge $currentBundledProduct ( dict "subscription" (index $currentBundledProduct.variants 0).subscription )  }}
    {{ end }}
  {{ end }}
{{ end }}

$currentBundledProduct is a map. $currentBundledProduct.variants is a slice. If the length of
$currentBundledProduct.variants is less than 2, then $currentBundledProduct.subscription is a map. If the slice length is more than 1, it is instead set to the string "seeVariants". $currentBundledProduct.variants[index].subscription is alwasy a map.
So here, when we encounter a case in which we want to display the product with no option for the user to pick from different variants, then we just want to replace "seeVariants" with the map from variants[0].subscription. This substitution triggers a crash.

Two things:

The first example does not work for me.  Can you confirm?
What do you mean by "crash?"  For me the build fails with error calling merge: reflect: Key of non-map type string.  "Crash" to me means a panic with a stack trace.

Nevermind.  I see a stack trace after writing a Go test.

Two things:

The first example does not work for me.  Can you confirm?
What do you mean by "crash?"  For me the build fails with error calling merge: reflect: Key of non-map type string.  "Crash" to me means a panic with a stack trace.

Yes, apologies for the poor terminology. I am getting the same error you mention there and it is causing the build to fail. That's what I meant by "crash".
Thank you.


Make rav1e_status_to_str return a static string

As discussed on IRC.

Coverage remained the same at 75.595% when pulling 1c91c8b0583154c0d19fcd7032e837a57b0660e0 on rust-av:static_rav1e_status_to_str into 513ca08d15c43823f2397332926ff3eeb57b8da0 on xiph:master.

I it ok to land it and then move on clarifying the API in another PR?

I it ok to land it and then move on clarifying the API in another PR?

Yes, of course.


fix(pss): fix trojan mining

PR #2140 was merged with an incorrect bit.w

This change is

https://github.com/ethersphere/bee/pull/2287/checks?check_run_id=2981967728 data race detected

https://github.com/ethersphere/bee/pull/2287/checks?check_run_id=2981967728 data race detected

addressed

@zelig there has been no changes to the PR in terms of synchronization, how was the data race solved? maybe good not to squash commits for such changes

@zelig there has been no changes to the PR in terms of synchronization, how was the data race solved? maybe good not to squash commits for such changes

actually a good lesson why named return params are evil.
this line https://github.com/ethersphere/bee/pull/2287/files#diff-8fbb0a5de11b7fd685c32244eddae4545b09f56c82050c57902c08a1abfa2fe9R251
is racy with the assignment on line 245 if err is a named param.

@zelig there has been no changes to the PR in terms of synchronization, how was the data race solved? maybe good not to squash commits for such changes

actually a good lesson why named return params are evil.
this line https://github.com/ethersphere/bee/pull/2287/files#diff-8fbb0a5de11b7fd685c32244eddae4545b09f56c82050c57902c08a1abfa2fe9R251
is racy with the assignment on line 245 if err is a named param.

oh wow... nice :clap: yeah named params should be avoided in general


Refactor/architecture

Branch ready to be pushed into main to upload the first release.

@SergioRibera Take a look at it when you can.


How do I add 5 keys from shaggy note code to my own mod please?

5 keys? Did you mean 6? Because 5 keys aren't included in the mod.

oh okay whatever, so how do I add 6k?
Vào Th 2, 29 thg 11, 2021 vào lúc 00:00 PIjus-Github <
@.***> đã viết:

5 keys? Did you mean 6? Because 5 keys aren't included in the mod.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/GithubSPerez/the-shaggy-mod/issues/26#issuecomment-981117958,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUGFIC4IFFHKJBJOJ62C5JTUOJN2BANCNFSM5IWG3QGA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


fix: refactor to use cond pr comment action

Refactors the check-build action to use our new open-turo/action-conditional-pr-comment action.

Good catch @tagoro9 , the README is wildly out of date with the implementation :(. I will fix that.


[Feature request] Required attribute and empty collections

In RequiredAttribute, empty string are treated as missing data however empty collections are allowed. Is there a reason for that ? There should be AllowEmptyCollections besides AllowEmptyStrings.

Thanks for contacting us, @ZBAGI.
@dougbu, can you please answer this question? Thanks!

@ZBAGI [Required] is not part of ASP.NET Core. Instead it comes from the underlying framework -- .NET Framework or .NET Core. I suggest making your request in the dotnet/corefx repo.
FYI the source for this attribute is here.

Marking this as external and closing.


refactor: refactor params methods

Summary of Changes
Replace this text with a high-level summary of the changes included in this PR.
Related Issues
Please reference here any issue #'s that are relevant to this PR, or simply enter "N/A" if this PR does not relate to any existing issues.
Pull Request Checklist
This is just a reminder about the most common mistakes.  Please make sure that you tick all appropriate boxes.  But please read our contribution guide at least once; it will save you a few review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

[x] Applied changes to both WSGI and ASGI code paths and interfaces (where applicable).
[x] Added tests for changed code.
[x] Prefixed code comments with GitHub nick and an appropriate prefix.
[x] Coding style is consistent with the rest of the framework.
[x] Updated documentation for changed code.

[x] Added docstrings for any new classes, functions, or modules.
[x] Updated docstrings for any modifications to existing code.
[x] Updated both WSGI and ASGI docs (where applicable).
[x] Added references to new classes, functions, or modules to the relevant RST file under docs/.
[x] Updated all relevant supporting documentation files under docs/.
[x] A copyright notice is included at the top of any new modules (using your own name or the name of your organization).
[x] Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.

[x] Changes (and possible deprecations) have towncrier news fragments under docs/_newsfragments/, with the file name format {issue_number}.{fragment_type}.rst. (Run towncrier --draft to ensure it renders correctly.)

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
PR template inspired by the attrs project.

@CaselIT @copalco do you know if this refactoring was superseded by other PRs in the 4.0 work stream, or is it still due?
We would need to address merge conflicts before proceeding, though.

not sure this is any better. it does dry things up a bit, but it's not great to type

Thanks, I will block this until the release then so we can make a decision after 4.0.0.

Yes didn't have time to move it further

no worries.

Aye, thanks for the effort @copalco, sorry that this got caught up in the hectic 4.0 finish sprint.
We can still revise and reopen it later for 4.1.


Bump version to 4.0.0

PR automatically created by release.py

cc @clalancette

Pulls: https://github.com/gazebo-release/gz_cmake_vendor/pull/10
Gist: https://gist.githubusercontent.com/clalancette/bd0e153c59418ec4ef78605c3f2c46dc/raw/62e704805a590a1951ee0179e24d2dd3c5ffbde3/ros2.repos
BUILD args:  --packages-above-and-dependencies gz_cmake_vendor
TEST args:  --packages-above gz_cmake_vendor
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14615

Linux
Linux-aarch64
Linux-rhel
Windows


Added custom code based slugger for making <details> blocks linkable

This is another solution for making a unique link for the <details> block. This uses custom Slugger to provide the custom code/word to make the hash link unique and eliminates the possibility of links pointing to another place if we perform some page updates.
Some considerations with this methods are:

the code must be provided in case of duplicates titles otherwise development will show an error and the build also fails
Also, there is also an optional props position for the position of the code in the hash link (which is "end" by default, also accepts "start")

For an example implementation, I have updated docs/start/data-and-model-versioning which had two <details> components with the title Expand to see what happens under the hood. so I have updated one with code and also used optional positoin to place the code at the start of the hash id.

The generated link will be /doc/start/data-and-model-versioning#storing-and-sharing-Expand-to-see-what-happens-under-the-hood.
Note: This preview deployment may fail since I have not updated all the docs <details> block having the same title.
Continue on PR #3329

I'm not too enthusiastic about this one, if a manual id is going to be provided then I imagine it should entirely take the place of the generated slug; a completely manual id gives the same benefits as a combined slug with simpler code and the added benefit of being able to change the details block's text without breaking existing links to it.

Or I think we can do it this way:
if we add position prop then it will be added to the respective position i.e start or end otherwise code will be taken entirely for id.

if we add position prop then it will be added to the respective position i.e start or end otherwise code will be taken entirely for id.

It would be an improvement, but I don't see any use case for a code+content-derived id that isn't already solved by a code-only id.

close in favor of #3329.


More Shanghai table updates

Erigon has put up (what I believe is) the last of their 3 PRs for implementing EIP 4895, so I've added it to the table!  And now it's merged, so I've marked that cell merged.
Also on 4895, Besu closed their existing PR and opened a new one, so updated the table to point to that as well.
Meanwhile, on 3860, Erigon was marked as merged, but turns out they need a second PR for it, so I've put up that as well and marked them as "partly merged".

(I guess if #676 gets merged, I'll close this PR and open a new one.)

@haltman-at as always, thanks for this! Yes, can you please rebase this on https://github.com/ethereum/execution-specs/pull/676? Thanks!


Record notes from Preview UI session (on whiteboard)

Have a photo - need to transcribe / summarize
(outcome was a Figma design that we need to prioritize to work on)

Note: I found the photo & emailed it to myself, still need to transcribe it.

Will share with team when we discuss review so we can re-scope this if needed. Closing.


Add readout of hardcoded settings

This PR displays the location of the Python server file and port number the current backend is running from.

Works like a charm, thanks!


Fixed issue 5981 by updating mpl drawer

Summary
Fixes #5981
Details and comments
When drawing a circuit using the mpl drawer, there is a subset of multi-qubit gates which is drawn in a particular way (such as CX or SWAP). For the case of multi-controlled Z gates, only CZ was included in such cases. This was fixed by including all variations of the Z gate in the case, excluding Z itself.
All multi-controlled Z gates have Z as their base_gate. To exclude Z, we only make sure that gate_name is not Z.
The drawer takes the last parameter in the list of qubits as the 'target' qubit.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Done @javabster ! Let me know if anything else is needed.


PGVector logger message level

Change the logger message level
The library is logging at error level a situation that is not an error.
We noticed this error in our logs, but from our point of view it's an expected behavior and the log level should be warning.

out of curiosity, wouldn't trying to delete a collection that's not there indicate a mistake in logic somewhere?

Could be, but it does not have to be always the case.
This class in particular has a init parameter pre_delete_collection: bool = False to delete the collection if it exists, so you can easily "clean" the embeddings of a collection (and the collection itself).
Using the param pre_delete_collection=True any operation would trigger the error in the log until the collection exists. It could be avoided checking if the collection exists, but that would imply an extra DB access and adding useless complexity to the code using this library.

Could be, but it does not have to be always the case.
This class in particular has a init parameter pre_delete_collection: bool = False to delete the collection if it exists, so you can easily "clean" the embeddings of a collection (and the collection itself).
Using the param pre_delete_collection=True any operation would trigger the error in the log until the collection exists. It could be avoided checking if the collection exists, but that would imply an extra DB access and adding useless complexity to the code using this library.

thanks for explaining @jmtristancho! makes sense


Get-LatestUpdate returns delta updates

Expected Behavior
Get-LatestUpdate returns cumulative updates only
Current Behavior
Get-LatestUpdate returns both delta and cumulative updates which will then get downloaded and imported into MDT when automated. Think this may have started happening since January? I have to put an additional filter in place (for the word "cumulative") to avoid this as a workaround in the mean time.

I'm only seeing the cumulative update. Is this still occurring for you?

I think this issue only affects the 1st monthly cumulative and from my testing the issue is not present in KB4487029. I ran Get-LatestUpdate -WindowsVersion Windows10 -Build 17134
But if you check KB4487017 you will notice there are delta's in the catalogue. I'm pretty sure the feed that is used has them present and that is why I found them appearing.
Further testing would be needed on Patch Tuesday. I will try to remember to run further tests for you.

Can confirm I am correct.
PS C:\Windows\system32> Get-LatestUpdate -WindowsVersion Windows10 -Build 17134 -Verbose
VERBOSE: Checking updates for Windows10 17134.
VERBOSE: Downloading feed of updates https://support.microsoft.com/app/content/api/content/feeds/sap/en-us/6ae59d69-36fc-8e4d-23dd-631d98bf74a9/atom.
VERBOSE: GET https://support.microsoft.com/app/content/api/content/feeds/sap/en-us/6ae59d69-36fc-8e4d-23dd-631d98bf74a9/atom with 0-byte payload
VERBOSE: received -1-byte response of content type application/atom+xml; charset=utf-8
VERBOSE: Reading RSS XML from C:\Users\ASHLEY~1.ADM\AppData\Local\Temp\1htqeosp.b4x.
VERBOSE: Deleting C:\Users\ASHLEY~1.ADM\AppData\Local\Temp\1htqeosp.b4x.
VERBOSE: Found 22 items matching build 17134.
VERBOSE: Latest Windows 10 build is: 17134.648.
VERBOSE: Searching http://www.catalog.update.microsoft.com/Search.aspx?q=KB4489868.
VERBOSE: GET http://www.catalog.update.microsoft.com/Search.aspx?q=KB4489868 with 0-byte payload
VERBOSE: received 59939-byte response of content type text/html; charset=utf-8
VERBOSE: Contructing temporary table with KB, ID and URL.
VERBOSE: Checking Microsoft Update Catalog for Id: e13360f7-03eb-4341-9bb2-b526de5b1d52.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32181-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_delta_f0c8c93b9aa33310f68d5d100304a819a46d0cae.msu to output.
VERBOSE: Checking Microsoft Update Catalog for Id: 3b88f267-abec-4cdf-9397-5ff8f81b1237.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32174-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-arm64_delta_ae2ead7d4e08a8f8cde3209ab4ec5a6885c003e0.msu to output.
VERBOSE: Checking Microsoft Update Catalog for Id: f65ae239-c986-432c-a36c-f051eff613c0.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32166-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_delta_f0c8c93b9aa33310f68d5d100304a819a46d0cae.msu to output.
VERBOSE: Checking Microsoft Update Catalog for Id: 9de58188-5319-4758-8eb1-bef0a9f3a736.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32164-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x86_delta_266eaf09438b2bff34d78fb5921550e772c59d48.msu to output.
VERBOSE: Checking Microsoft Update Catalog for Id: 3f9ff099-4497-4d8f-8410-f581ca2adeca.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32162-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x86_70c1a58885238d8c7a4f581cab9e0d0aa00e5852.msu to output.
VERBOSE: Checking Microsoft Update Catalog for Id: b9b03135-18e3-474e-b97e-92c5565b35d4.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32199-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_e5aaf33c58b19b162cbbbf559b9cbb5306df1a67.msu to output.
VERBOSE: Checking Microsoft Update Catalog for Id: da2aaa3a-8602-49f0-b073-1a5f17eba62c.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32172-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-arm64_db280c6eb5ce7aca6abdf8a49145bba4ad0d7569.msu to output.
VERBOSE: Checking Microsoft Update Catalog for Id: 33aaf8ee-bfe9-4b24-ab07-d33a207fe74f.
VERBOSE: POST http://www.catalog.update.microsoft.com/DownloadDialog.aspx with -1-byte payload
VERBOSE: received 32164-byte response of content type text/html; charset=utf-8
VERBOSE: Adding http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_e5aaf33c58b19b162cbbbf559b9cbb5306df1a67.msu to output.
KB      : KB4489868
Arch    : ARM64
Version : 1803
Note    : 2019-03 Delta Update for Windows 10 Version 1803 for ARM64-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-arm64_delta_ae2ead7d4e08a8f8cde3209ab4ec5a6885c003e0.msu
KB      : KB4489868
Arch    : x64
Version : 1803
Note    : 2019-03 Delta Update for Windows 10 Version 1803 for x64-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_delta_f0c8c93b9aa33310f68d5d100304a819a46d0cae.msu
KB      : KB4489868
Arch    : x86
Version : 1803
Note    : 2019-03 Delta Update for Windows 10 Version 1803 for x86-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x86_delta_266eaf09438b2bff34d78fb5921550e772c59d48.msu
KB      : KB4489868
Arch    : x86
Version : 1803
Note    : 2019-03 Cumulative Update for Windows 10 Version 1803 for x86-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x86_70c1a58885238d8c7a4f581cab9e0d0aa00e5852.msu
KB      : KB4489868
Arch    : ARM64
Version : 1803
Note    : 2019-03 Cumulative Update for Windows 10 Version 1803 for ARM64-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-arm64_db280c6eb5ce7aca6abdf8a49145bba4ad0d7569.msu
KB      : KB4489868
Arch    : x64
Version : 1803
Note    : 2019-03 Cumulative Update for Windows 10 Version 1803 for x64-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_e5aaf33c58b19b162cbbbf559b9cbb5306df1a67.msu
KB      : KB4489868
Arch    : x64
Version : 1607
Note    : 2019-03 Delta Update for Windows Server 2016 (1803) for x64-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_delta_f0c8c93b9aa33310f68d5d100304a819a46d0cae.msu
KB      : KB4489868
Arch    : x64
Version : 1607
Note    : 2019-03 Cumulative Update for Windows Server 2016 (1803) for x64-based Systems (KB4489868)
URL     : http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows10.0-kb4489868-x64_e5aaf33c58b19b162cbbbf559b9cbb5306df1a67.msu

There's an issue with the Atom feed at the moment https://support.microsoft.com/app/content/api/content/feeds/sap/en-au/6ae59d69-36fc-8e4d-23dd-631d98bf74a9/atom. It's not returning the list of updates consistently.

This should be fixed in v3 - f3e8f6ba5b754c55e6d16f452ca76fc33691d5e5


SRAM with 2 banks is messed up

I think this is because the rule for FixMod(_, Const(r)) is:
    case (_, Const(r)) if r.isPow2 && r > 0 =>
      val i = INT[F].v + Number.log2(r).toInt - 1
      if (i <= 0) a.from(0)
      else a.bits(i::0).asUnchecked[Fix[S,I,F]]

If r is 2, then it will take the (i <= 0) branch but it shouldn't.  I made this fix locally for now and will push it if this confirmed to be incorrect

Looks correct. Did we confirm this fixed the addressing issue with 2 banks yet?

Fixed this and a few other rewrite rules a while back


bump nunit package

:white_check_mark: Build ServiceBusExplorer 4.1.0-PullRequest0185.165.build.354 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/9956e0b1c5 by @SeanFeldman)


proposal: Go 2: allow interface types to match fields as well as methods

I'm opening this issue as a place to record this idea, which has come up several times.  I'm not personally in favor of this proposal.  An example of an earlier discussion: https://groups.google.com/d/msg/golang-nuts/ZJ5DEv_36S8/opZ__-l6XxAJ .
The proposal: allow interface types to list fields, with types, as well as methods.  An interface type that lists a field may only be implemented by a struct type that has a field with the same name and type.
For example:
type I interface {
        F int
}

type S struct {
    E, F, G int
}

// S has no methods.

var V1 I = S{} // ok
var V2 I = &S{} // ok

func GetI(i I) int {
        return i.F // ok
}

func SetI(i I, v int) {
        i.F = v // ok
}

Note that since the interface type could be implemented by struct types that put the field at different offsets, the seemingly simple expressions/statements like i.F and i.F = v would most likely be implemented by function calls.
The advantage of this proposal is that when several different struct types have fields with the same names and types, and interface could be used to access those fields directly, rather than requiring each type to define boilerplate getter/setter methods.
A disadvantage is that it changes the meaning of an interface type from one that purely describes behavior to one that also describes implementation.  This is particularly clear in the fact that an interface that defines a field can only be implemented by a struct type.

For getters, it would suffice to allow explicit conversion to a struct type with fewer fields, like
type Three struct { X, Y, Z int }
var three = Three{1, 2, 3}

type Two struct { X, Y int }
var two = Two(three) // so that two == Two{1, 2}

For the record: This idea has been discussed in the very early days of Go (the first months). I am not a fan as it destroys the notion of an interface being an abstract type which doesn't imply a specific implementation.
This could be finessed by defining that an "interface field" is simply syntactic sugar for setter and getter methods. But at that point, the problem is not about interfaces anymore, but a convenient way to write setters and getters. I'd rather address that problem directly.

@jimmyfrasche Sounds like MOVE CORRESPONDING in COBOL (I have in fact written actual COBOL programs).

I’d try to use this for additional type expressiveness by composition via embedding.
Without a real-world example I’m having a tough time seeing the tradeoffs. The thread mentions http.ResponseWriter’s Header method which seems like a clear win in code simplicity with this.

Modelling an interface field as a getter and setter undermines the notion of interfaces describing abstract behaviour. Getter and setters are not behaviours, they are state.

@pciet Lack of a real-world example is a fair complaint.  By the nature of the proposal, real-word examples are somewhat complex.  They arise, for example, when using many different protocol buffer types in proto3.  Often several different protocol buffer types will have the same field name with the same type, because they represent the same concept.  However, there is no struct embedding going on, because the Go code used for protocol buffers is machine generated by the protocol buffer compiler.  So now let's suppose you want to write a function that operates on several different protocol buffer types in the same way by accessing the field that exists in all of them.  In Go that is naturally represented using an interface, but to do it here requires writing a new type for each protobuf type, that embeds that protobuf type, and defines getter/setter methods, where the getter/setter methods all look exactly the same.  If we could could declare an interface type with a field, all of that boilerplate could be avoided.
So that is still pretty abstract but I hope it gives a flavor for the kind of case where this could be useful.  Today people handle this kind of thing using the reflect package and reflect.Value.FieldByName.

For the protocol buffer example maybe the generator should have an option to also generate getter/setter methods (or a separate program that bulk generates getter/setters for a struct so that it could be used with).
I've had similar issues but the only example I can think of is with the Name field on various types in go/ast. Either manually adding appropriate getters or a top-level func like NameOf(Node) *Ident that handles the type switches would work for me in that case.
In both cases, though, the problem involves a closed set of definitions so it seems like an API design issue rather than a language issue.
Are there any ad hoc examples when this is needed for structs from vastly different sources (packages, types generated by different means, etc.)?

Are there any ad hoc examples when this is needed for structs from vastly different sources (packages, types generated by different means, etc.)?

Not that I know of.

Just a thought: rather than changing the definition of an interface to include struct fields, structs could be special in that struct fields can satisfy a zero argument interface method with the same name and type. For example:
type I interface {
    F() int
}

type S struct {
    E, F, G int
}

func main() {
    var i I = S{}
    i.F() // returns a copy of the field S.F
}

I haven't thought through all of the implications of this change.

Note that since the interface type could be implemented by struct types that put the field at different offsets, the seemingly simple expressions/statements like i.F and i.F = v would most likely be implemented by function calls.

Also &i.F. That further complicates the "they're just getters and setters" story; you need addr-ers as well. I ran into this in a very painful way when attempting to do experimental automated refactoring of the compiler that hid Node fields behind accessors.

Looks like a convoluted way of implementing properties without calling them properties.

We wouldn't need to compile to a function call.  The itab could contain offsets in the underlying struct of all the fields declared in the interface.
x = i.F then compiles to:
   t := i.itab
   if t == nil { ...panic }
   off := &t.fields[n] // where n = ordinal of field in interface declaration
   x = *(i.data + off)

This would also handle &i.F neatly, by just leaving off the last dereference.
I'm pretty on the fence about this proposal.

I'd like to point out that typescript supports this, and from what I've seen its used to allow passing literal objects to functions that accept such an interface.
I'm not particularly for the original proposal, however I think @bontibon has an interesting take.

This proposal would lead to interfaces forcing structs as types to implement them, whereas today it's possible to have the implementation be a completely different type, like a func or a string, for example, see https://play.golang.org/p/irTsnlldaea as an example for this.
package main

import "fmt"

type (
	demo    func()
	hello   string
	Helloer interface {
		Hello()
	}
)

func (demo) Hello() {
	fmt.Println("Hello, playground")
}

func (h hello) Hello() {
	fmt.Println("Hello, " + h)
}

func call(h Helloer) {
	h.Hello()
}

func main() {
	d := demo(func() {})
	call(d)

	h := hello("world")
	call(h)
}

If the problem is accepting a restricted, common subset of fields, maybe a different venue to pursue this would be to allow passing of structs that get narrowed down to a subset of the fields. For example, maybe this would be a way to solve passing data around: https://play.golang.org/p/57BBaoUlMhu
package main

import "fmt"

type (
	BaseStruct struct {
		F2 string
	}

	Struct1 struct {
		F1, F2 string
	}

	Struct2 struct {
		F2, F3 string
	}
)

func call(b BaseStruct) {
	fmt.Printf("f2: %v\n", b.F2)
}

func main() {
	s1 := Struct1{
		F1: "f1",
		F2: "f2",
	}
	call(s1)

	s2 := Struct2{
		F2: "f2",
		F3: "f3",
	}
	call(s2)
}

Obviously, this does not solve the problem of calling methods on the type itself. I can't think of any better answer than: if data is needed, accept a common struct, if functionality is needed, accept an interface.
One could say: why not use embedding of BaseStruct in the Struct1 and Struct2. Obviously, embedding would be preferable but in this case please assume that Struct1 and Struct2 are coming from two different place which the author does not full control over.
Reading / writing into the fields of BaseStruct should be passthrough to the value that was used to call the function.

This proposal would lead to interfaces forcing structs as types to implement them, whereas today it's possible to have the implementation be a completely different type, like a func or a string, for example,

That is already possible today: if a particular type is inspected using reflection, it may be required to be a pointer-to-struct or a channel or obey any number of other invariants. For example, proto.Message is required to be a pointer to a struct type with appropriate field tags. (That's not fundamentally different from the invariants of the standard encoding/json, encoding/gob, or text/template packages: they just happen to use interface{} instead of naming some more specific type.)
To enforce the level of behavioral abstraction you'd like today, you'd have to strike reflection from the language. Given that that's not at all likely to happen (much as I might wish for it), I don't see that it's all that harmful to codify a particularly common type constraint in the interface definition.
That is: we already have those sorts of constraints, and to me it seems strictly positive to promote at the least the common ones from ad-hoc comments into the language proper.

We haven't seen any strong arguments in favor of this proposal.  Retracting it.

Just in case this gets reopened:
Do we consider fields of a struct as part of their behavior or not? If yes, then I think interfaces should be able to capture that.
This comes up often when I have multiple types that I pass to a function. They are supposed to have a particular field, but I cannot express that through the interface that the function accepts. The two workarounds are:

use reflection
which drops the benefits of type checking at compile time.

add getter/setter methods to the types
which doesn't work since typically in go we do not have getter/setter methods for fields, they are expected to be accessed directly.
If I own the type then I can add a getter/setter methods, but it diverges from common go practice. If I don't own the type, then situation is worse, I have to define a new type alias for each of the types I am passing to the function and then add new methods to them.

I think allowing to express requirement for existence of fields in interfaces would have resolved this issue cleanly.

Dave Cheney Modelling an interface field as a getter and setter undermines the notion of interfaces describing abstract behaviour. Getter and setters are not behaviours, they are state.

My apologies. There are times when I wish to define implementation. On those rare occasions I use Setters and Getters in my interface. I am not a purist, I do what is convenient and readable. I do not like exposing properties without a setter if I want to validate the data. And setters and getters in the interface means that the underlying implementation can be completely different for unit testing.
I am philosophically opposed to this suggestion but if adopted, it will be something I need not use.

But to my point, your are describing properties of the implementation; “it has the field X, you can get it and set it thusly”. That is not behaviour, David holds a pen, I got the pen and it was blue, is not behaviour, it is state.

On 5 Jun 2018, at 08:42, David Skinner<EMAIL_ADDRESS>wrote:
Dave Cheney Modelling an interface field as a getter and setter undermines the notion of interfaces describing abstract behaviour. Getter and setters are not behaviours, they are state.
My apologies. There are times when I wish to define implementation. On those rare occasions I use Setters and Getters in my interface. I am not a purist, I do what is convenient and readable. I do not like exposing properties without a setter if I want to validate the data. And setters and getters in the interface means that the underlying implementation can be completely different for unit testing.
I am philosophically opposed to this suggestion but if adopted, it will be something I need not use.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Dave Cheney But to my point, your are describing properties of the
implementation; “it has the field X, you can get it and set it thusly”.
That is not behaviour, David holds a pen, I got the pen and it was blue, is
not behaviour, it is state.

I really do not want to get into an argument with Dave Cheney.
Considering that I sometimes influence computer science students with my
somewhat antiquated ideas,
I think I should express myself more precisely, as  I would to a student. I
am open to corrections..

We can have a transparent data type by declaring a structure with the
names of the properties with an upper case first letter.
We can have an opaque data type by declaring a structure with the
names of the properties with a lower case first letter. This enforces
information hiding, since its values can only be manipulated by calling
functions that have access to the missing information. The concrete
representation of the type is hidden from its users, and the visible
implementation is incomplete.
We can have an opaque pointer  to an undefined data type that has a
specific interface for exchange of information.
Information hiding reduces software development risk by shifting the
code's dependency on an uncertain implementation onto a well-defined
interface. Clients of the interface perform operations purely through it so
if the implementation changes, the clients do not have to change.

With regard to the specific example above

I define an interface for pen with the functions all pens have.
I then define 5 types of pens

ChromePens cannot change colors.
BicPens can be any of 4 select colors.
SharpiePens can be any color.
ThermalPen is Red when hot and Blue when cold, and in the underlying
hidden data structure there is no color state, only a temperature state.
When you use the getter function Color() it is not returning a state but it
is returning a behavior.
DebugPen does nothing but create log entries to debug my main program
before all the other pens are defined.

With regard to the topic under discussion.

Like C++, Go allows a hybrid type which exposes some properties and
meets the interface requirements for others.
An interface which defines a required property, is not an interface,
it is making implementation decisions.
Defining a setter and getter in the interface may suggest an
implementation, but it does not require it. It allows the programmer to
maintain data validity, data integrity, collateral effects, with the data
structure of his choice.

Coming up with useful abstract data types by properly defining interfaces
is an important skill in creating software. It is one with which I have
difficulty.
On Tue, Jun 5, 2018 at 6:07 AM Dave Cheney<EMAIL_ADDRESS>wrote:

But to my point, your are describing properties of the implementation; “it
has the field X, you can get it and set it thusly”. That is not behaviour,
David holds a pen, I got the pen and it was blue, is not behaviour, it is
state.

On 5 Jun 2018, at 08:42, David Skinner<EMAIL_ADDRESS>wrote:
Dave Cheney Modelling an interface field as a getter and setter
undermines the notion of interfaces describing abstract behaviour. Getter
and setters are not behaviours, they are state.
My apologies. There are times when I wish to define implementation. On
those rare occasions I use Setters and Getters in my interface. I am not a
purist, I do what is convenient and readable. I do not like exposing
properties without a setter if I want to validate the data. And setters and
getters in the interface means that the underlying implementation can be
completely different for unit testing.
I am philosophically opposed to this suggestion but if adopted, it will
be something I need not use.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/23796#issuecomment-394669646, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGBWOWjZ8222KIy5A8q13QgvgOX0u4-ks5t5maIgaJpZM4SCkBH
.


Create New Address Form - Appellation - not passed to API

When appellation field is populated, the appellation does not pass through to the API.

Implemented - please test in next version

Appellation field in UI now populates Certificate of Title field. Certificate of Title field in UI doesn't seem to populate anything.

fixed, please test in release 0.1.28

Retested. Successful.


Use tox for tests?

Have you considered using https://tox.readthedocs.org/ for tests?

Personally I've not been sold on the value of tox over GitHub + TravisCI. My main issue with tox is that I've run into issues getting it to play nicely with (Ana)conda in the past, and I found it easier to do multi-platform testing on Travis.
I guess the big advantage of Tox is that you can test multiple environments locally, but in practice I've found that single-environment local testing, combined with multi-environment cloud testing at PR time, is nearly as efficient.


Block editor dies on large programs

blocks_rts.js:9974 Uncaught Ran out of type variables!
blocks_rts.js:9974 Uncaught TypeError: Cannot read property 'appendChild' of null

One way to reproduce is to start here: https://code.world/funblocks#PojMLWr-HZtKKJleM89qZxA and then change the color to mixed(dark(red), red), then click Run.

web/blockly/core/type_expr.js:172:  throw 'Ran out of type variables!';

There's something odd going on here.  Looking at the code, it appears that it's intended to throw this error when a program uses more than 52 polymorphic type variables.  That arbitrary limit is worth investigating on its own; but in this case, there are no polymorphic types at all.

Another example: do any kind of non-trivial edit on https://code.world/funblocks#PsTt2AwuGXLT2WNb8jLUlUQ


Updating met repo with all changes on epic engage

Issue #: https://github.com/bcgov/met-public/issues/
Description of changes:

Survey Result Tracking:

Implemented a new analytics table to comprehensively track all available options for multiple-choice questions in the survey results.
This enhancement ensures the display of options on the survey result graph, even if none of the users have selected a specific option.
Corresponding ETL (Extract, Transform, Load) changes have been incorporated to seamlessly integrate this new table.

Rejection Email Template for Closed Engagements:

Introduced a new rejection email template specifically designed for closed engagements.
If a user's comment is rejected after the engagement is closed, the new email template is triggered. It informs the user about the rejection without providing an option to edit the comment, considering the closure of the engagement period.

CSV Export Format for Proponent:

Revamped the CSV export format for proponents to be in Excel format.
Implemented additional formatting changes on the Excel file to enhance readability and presentation.

Formio Version Update:

Upgraded the Formio version to ensure the latest features, improvements, and security updates are incorporated.

Survey Editing for Open Engagements:

Enabled the editing of surveys linked to open engagements, providing superusers with the flexibility to modify the survey during the open engagement period.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

@VineetBala-AOT Thanks for submitting this with the great summary. I've moved it to a draft PR just to prevent it from being merged accidentally.
FYI this PR has been submitted for review only at the moment. Vineet has said this includes general improvements brought over from the Epic project. Could members of the DES team please not approve/merge this PR until Steve and I have had a chance to review it.

Codecov Report
Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (f7e3ac7) 68.56% compared to head (949b8cf) 68.89%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2348      +/-   ##
==========================================
+ Coverage   68.56%   68.89%   +0.33%
==========================================
  Files         472      510      +38
  Lines       15593    15967     +374
  Branches     1193     1165      -28
==========================================
+ Hits        10691    11001     +310
- Misses       4693     4757      +64
  Partials      209      209

Flag
Coverage Δ

analyticsapi
78.69% <43.47%> (?)

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

Files
Coverage Δ

.../analytics_api/models/available_response_option.py
100.00% <100.00%> (ø)

met-api/src/met_api/__init__.py
97.18% <ø> (-0.12%)
:arrow_down:

met-api/src/met_api/config.py
100.00% <ø> (+3.22%)
:arrow_up:

met-api/src/met_api/models/__init__.py
100.00% <ø> (ø)

met-api/src/met_api/models/base_model.py
92.30% <ø> (+0.92%)
:arrow_up:

met-api/src/met_api/models/engagement.py
76.13% <ø> (+0.61%)
:arrow_up:

met-api/src/met_api/models/engagement_metadata.py
60.00% <ø> (-1.54%)
:arrow_down:

met-api/src/met_api/models/engagement_slug.py
100.00% <100.00%> (ø)

met-api/src/met_api/models/feedback.py
90.74% <ø> (ø)

met-api/src/met_api/resources/__init__.py
100.00% <ø> (ø)

... and 57 more

... and 35 files with indirect coverage changes


[5.1] [5.2] SQLSRV query fail with fatal error 'Maximum function nesting level of '256' reached, aborting!'

mentioned in [Bug?] SQLSRV query fail with fatal error 'Maximum function nesting level of '256' reached, aborting!'
I upgrade my Laravel version:
18:59:34 › php artisan -V
Laravel Framework version 5.1.26 (LTS)

and still got the same error

Thanks for reporting. :)

@wuhsien try this cli command php -i "echo phpinfo();" | grep "xdebug.max_nesting_level"
If the value is set to 256 then you have set xdebug.max_nesting_level in that file which is not loaded by PHP.
I think this should solve the problem because its seem related to xdebug, correct me if I'm wrong.

@Modelizer No, there is an actual issue with an infinite loop here. Blindly just changing that value is not how to "fix" this.

@GrahamCampbell I faced the same issue and it was resolved my increasing max_nesting_level to 1000 and if loop is infinite then error will persist even after changing max_nesting_level.

@wuhsien just update XDebug configuration to 0 in php.ini and restart Apache.
xdebug.max_nesting_level = 0

@joko-wandiro I think it will go in an infinite loop :thinking: Would not be a better approach.

xdebug.max_nesting_level = 0

Not a good idea really.

Can anyone confirm if this occurs on Laravel 5.5? 5.1 and 5.2 are no longer supported...


Could not find module glimmer-reference and Could not find module ember-resolver imported from www/resolver

Versions that I am using
ember-cli: 2.6.2
node: v8.11.3
After I installed this addon, I received an error on my console.

Please do let me know if I am missing something. Any response is much appreciated. Thank you
Docs says : Supports Ember 2.12, 2.16, 2.18, 3.1, 3.2, 3.3, 3.4, 3.8, 3.9
Update: Even if upgrade to 2.12 and 2.16, it does return the same error as well

Would you mind sharing a demo repo that I can use to dig into this?


Post cleanup letting through bad content in  tag with highlink density

Hello!
Firstly, wanted to say how great and useful this tool is. It's been very useful for me.
I've ran across an issue with content parsing for this one site (247wallst).
For some articles in 247wallst's website, the parser outputs some high density link texts.
Here's the example:
article url: https://247wallst.com/special-report/2018/09/19/americas-fastest-growing-and-shrinking-housing-markets/
article.text: A decade has passed since the U.S. housing market crash and the beginning of the 2008 financial crisis. The typical American home lost about a third of its value during the recession. While the median home price has since surpassed its pre-crisis levels and reached an all-time high of $269,000 in the second quarter of 2018, the recovery from the Great Recession has been largely uneven. Some housing markets have even been on the decline in the recent years. Like anything else, home prices are driven by supply and demand forces, which are highly correlated with the area’s economy, job market, and population changes. Demand tends to be higher in stronger economies, with a healthy job market, and a growing population. While the price of a typical single-family home rose by more the $100,000 in some of the more high-demand metropolitan areas from the second quarter of 2017 to the second quarter of 2018, in a handful of cities, the median home value declined over the past year. Based on median single-family home price changes over the year through the second quarter from the National Association of Realtors, 24/7 Wall St. reviewed the fastest growing (and shrinking) housing markets. Click here to see the full list of America’s fastest growing housing markets. Click here to see the full list of America’s fastest shrinking housing markets. Click here to see our detailed findings and methodology.
See that the last three sentences are link texts and should be removed from the content body:
Click here to see the full list of America’s fastest growing housing markets. Click here to see the full list of America’s fastest shrinking housing markets. Click here to see our detailed findings and methodology.
In the HTML of the original article, those links take the structure:

      Link Text

These links are part of the top_node, which is fine because it's part of the article body tag. However in the post_cleanup step, I thought it should be removed. But when I looked at the code, it seems like all
 tag's are not removed.
See code reference:
https://github.com/codelucas/newspaper/blob/master/newspaper/extractors.py#L1043-L1045
Is there any case where just the is_highlink_density check is enough? In other words, would it be possible to just remove the
 tag check if there's also a is_highlink_density check? This would resolve all cases where there are links that take the form:

non-content text

I'll gladly provide any more information if you need. Any help or explanation would be appreciated!
Thanks!

Thanks for the awesome issue and writeup @youhyunkim! 💯
The point you bring up is valid, but since newspaper is just heuristic based and does not have any machine learning we can't get too sophisticated with the rules, since every heuristic change will be good for some news websites and bad for others.
The most recent change in this space was done here: https://github.com/codelucas/newspaper/commit/7697eb021370892334c1da1aa7ae0879a5f5f1f5
Where we made the cleaning step more lenient, if you can prove with 100 sample articles that this cleanup step can be avoided without damaging the full-text extraction I'd be in favor of making the change. We may need something more sophisticated than removing the  check though since sometimes an article actually does have high link density but because they put it into a
 the publisher is telling us it is part of the article


Fix for #331. Transporter was stopped after sending. This resolves Sw…

I know this issue is closed but this problem still continues.
This PR  resolves : Swift_TransportException: Expected response code 250 but got code "", with message ""

This is a bad idea as it will stop the connection after each mail, so users using persistant connections or doing direct connections will be blacklisted after a few emails.
A simple example is if you send to orange or wanadoo or free in france after 60 mails you'll be put on throttle list and blacklisted a few mails later.
I'll recommend avoiding this patch as it will break the compatibility and implement bad behaviour for bulk sender.


re-enable flaky test

Re-enable this flaky/slow test: https://github.com/sourcegraph/cody/blob/main/vscode/test/e2e/history-new-ui.test.ts#L6

Re-enabled in https://github.com/sourcegraph/cody/pull/2079


Allow strings to be passed to push and replace

Currently the push and replace method only allow Objects, while the spec also allows strings
Therefore I added the types as specified here: https://github.com/mjackson/history/blob/master/docs/Glossary.md#locationdescriptor
that not just allow strings now but use a more specified type for the object allowed

Closing because this repo is no longer maintained and Flow is not actively used in our projects. Thank you for your interest in our repo!


Tapsell for Godot

In a screenshot in this repository's readme file; looks like there is a plugin called Godot Tapsell Plugin.
I wanted to ask that is this plugin part of this repository? because other than in app payment; I was looking for a way to display ads in my game.

I'll publish Tapsell plugin in a separate repository in about next 10 days. Rewarded video and native banner are incuded in this version.

@dorjoosoft That is very cool 👍🏻

I just wanted to ask again about its development. Is it done? If you put it on GitHub, others can help with it.

@dorjoosoft ?

Never mind. I ended up implementing it myself.


Pin v1.1-branch for management cluster

Part of https://github.com/kubeflow/gcp-blueprints/issues/118

/assign @jlewi

/approve

/lgtm
/approve


reputation datastore size

Seems that the datastore size is too big for the data is containing.
Take a further look to see this.

After taking a deeper look at the datastore keys and values, I can see that nothing is leaking.
Seems that even forcing GC or manual compactions doesn't help.
Related with https://github.com/ipfs/go-ds-badger/issues/54
Closing since isn't a bug in our repo.


Mast: Watch +91932177384

Mast requests the watch of the watch_number +91932177384. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

Approved by Daniil in Charcoal HQ


change version->parse to version->declare to allow for correct compar…

…ison of samtools mixed two and three component versions (1.2 vs 1.3.1)


[BUG] - Can not import basis set form LCModel correctly.

Describe the bug
Can not import basis set form LCModel correctly.
To Reproduce
Steps to reproduce the behavior:
1 Run the function [BASIS] = io_LCMBasis(basis_folder, 0, 'unedited', 'none');
Screenshots

Computer configuration (please complete the following information):

OS: Windows
Version: 11
MATLAB version 2022b

Hello,
I am using the io_LCMBasis function in Osprey to read basis sets from LCMdel, but I'm encountering some issues that do not occur when reading the built-in .basis files in Osprey. Specifically, when I try to import press_te30_3t_v3.basis, MATLAB does not respond and I have to force quit.
I suspect that the bug I initially reported may be related to not specifying the .basis file name. If this is the case, can you please modify the relevant content in 7.1 io_LCMBasis?
Thank you for your help.

Hi @shaokunzhao,
I have just added an update version of io_LCMBasis.m to the develop branch. This one should be able to read the _v3.basis files from LCModel.
You should be able to run it as follows:
[BASIS] = io_LCMBasis('.../3t/all/press_te30_3t_all_v3.basis',1,'unedited','none',0)
The previous version failed for several reasons:

.basis files are not standardized and sometimes contain unexpected whitespace etc.
the _v3 basis files from the LCModel website are encrypted and need an additional step to work

Another comment is that I would not use this basis set as it is a measured one with unknown settings, pulse timings, vendor etc.  I highly recommend using the basis sets already included in Osprey which are simulated using matrix density formalism. You can also use the tools on MRSCliud (https://onlinelibrary.wiley.com/doi/10.1002/mrm.29370) to generate a new basis set for Osprey (or LCModel) if your specific echo time is not available by default.
Best,
Helge


TypeError: Cannot read property 'startLoadWithResult' of null, js engine: hermes

I am facing issues like the above image
it's completely working in Android but when i click on button for open web view then shows me an error in IOS only for
It shows me after updating my Expo version
and if i' trying to update web view version then show me different different error
Please help me for it.

webview is not working so i used web browser view

i'm facing same issue and i don't want to use web browser please help me to resolve it .

Update react-native-webview you the latest version

Update react-native-webview you the latest version

no bro it's not working it's show me different error like
`
Invariant Violation: Tried to register two views with the same name RNCWebView, js engine: hermes
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:105:15 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:150:4 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:26:18 in handleError
at node_modules/expo/build/errors/ExpoErrorManager.js:27:16 in createErrorHandler
at node_modules/expo/build/errors/ExpoErrorManager.js:32:8 in
at node_modules/@react-native/js-polyfills/error-guard.js:51:16 in ErrorUtils.applyWithGuard
at http://<IP_ADDRESS>:19000/index.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:null in global
Invariant Violation: "main" has not been registered. This can happen if:

Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:105:15 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:150:4 in handleException

... 7 more stack frames from framework internals`

same for me. any solutions?

No updates?

No updates?

I CHANGED THE VERSION OF WEBVIEW

it's not working properly

@oscadev , @Mrebai and @evgenyshenets91
Have you found any solution.

same problem

any solution for this ?

any solution for this ?

Can you please create build APK and after test in real device , so issue should be resolved

Any solution to this

"react-native-webview": "~13.6.3",
i just fixed it, update your lib with that exactly

I had an issue with the release version and for me the solution was to include
const path = require('node:path');
in the first line of metro.config.js

"react-native-webview": "~13.6.3",
i just fixed it, update your lib with that exactly

thank you this worked for me!


Let cabal build mapnik-vector-tile FFI

Automate this so users don't have to care. Might need users to point us to a checkout of mapnik-vector-tile, although maybe we should just do that as part of the setup.

Setup.hs now used to build the FFI and take care of all that. Still a lot of work required by users to get dependencies built and referenced. The dream is to eventually break the dependency on mapnik and write our own MVT implementation.


Question: route vs handle directive

I was wondering if there is a specific reason for using route directive as opposed to handle / handle_path, can we use also use these?
I know they both group directives;

route "Directives contained in a route block will not be reordered internally", is this critical for this plugin?
"Evaluates a group of directives mutually exclusively from other handle blocks" would this mean every jwt defined would need to be primary (since mutually exclusive implies no inheritence?)?

I guess this is a bit of a caddy related question...

@cceyda , that’s a very good question! 👍 at the moment, idk the answer to it, because as you’ve said, it is about how caddyserver works.

@cceyda , one thing to point out is that portal and jwt are different plugin types. The portal is a regular http handler, while jwt is “authorizer” plugin. Each of them have their own dynamic.

@cceyda , when you read handle docs, see “Only HTTP handler directives can be used inside handle blocks.”
It could be that “jwt” plugin is not http handler (not supposed to serve any content) and therefore should not be used inside “handle” directive.

Hmm that makes sense. Thanks for explaining~


Licensing under an Apache2.0/MIT License?

I'd be interested in having discussions with merging this algorithm into the Rust standard library, since Rust currently uses Grisu and it has known issues including in the Rust implementation. However, this would require dual licensing it under the MIT license. Since I've already done much of the work porting this to Rust, it might be useful contributing to the core library, if desirable.
This would require discussion since the tradeoffs with Ryu, which would be better for embedded systems, might be noticeable in limited resource environments.
Related to: https://github.com/rust-lang/rust/issues/52811
Another issue could be requiring all contributors to sign off on this change, which might be difficult.

First of all, thanks for your contribution and continued interest!
Regarding the license, (1) I do not want to change the license of this library, and (2) but I do not mind redistributing a derivative of my work with MIT. Actually I already did so, as you can see here: https://github.com/jbeder/yaml-cpp/blob/9ce5a25188d83b43dd5cd633f2975be10f5d6608/src/contrib/dragonbox.h#L6 All I want is to just a short note of my agreement as written there. I'm not a lawyer so am not sure if that's enough (b/c technically speaking there are contributors other than me) but since the file dragonbox.h specifically is almost entirely written by myself, I believe it should not cause any problem. It's especially so since what is to be distributed is not this library itself but just a derivative.
Regarding the stack size issue, I believe the main cause of the bloat for Grisu is the fallback implementation (Dragon4 maybe?) which requires bignum math. Since Ryu and Dragonbox both only do math within 192-bits, I think the stack usage should be similar. I guess Dragonbox probably uses a bit more locals though. But note that for embedded usage, the table size would be an issue, in which case it's advised to use the compact table. That will increase the code size and stack usage a bit more. I have been doing some experiments on embedded usage recently by the way: https://github.com/jk-jeon/dragonbox/discussions/57


feat: Compute volume of balls of higher dimension for Lp norms

We give a formula measure_unitBall_eq_integral_div_gamma for computing the volume of the unit ball
in normed finite dimension ℝ-vector space E with an Haar measure:
theorem measure_unitBall_eq_integral_div_gamma {E : Type*} {p : ℝ}
    [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E]
    [BorelSpace E] [Nontrivial E] (μ : Measure E) [IsAddHaarMeasure μ] (hp : 0 < p) :
    μ (Metric.ball 0 1) =
      ENNReal.ofReal ((∫ (x : E), Real.exp (- ‖x‖ ^ p) ∂μ) / Real.Gamma (finrank ℝ E / p + 1))

We also provide a theorem measure_lt_one_eq_integral_div_gamma to compute the volume of the ball {x : E | g x ≤ 1} for a function g defining a norm on E.
theorem measure_lt_one_eq_integral_div_gamma {E : Type*}
    [AddCommGroup E] [Module ℝ E] [FiniteDimensional ℝ E] [mE : MeasurableSpace E]
    [tE : TopologicalSpace E] [TopologicalAddGroup E] [BorelSpace E] [T2Space E]
    [Nontrivial E] [ContinuousSMul ℝ E] (μ : Measure E) [IsAddHaarMeasure μ]
    {g : E → ℝ} (hg0 : g 0 = 0) (hgn : ∀ x, g (- x) = g x) (hgt : ∀ x y, g (x + y) ≤ g x + g y)
    (hgs : ∀ {x}, g x = 0 → x = 0) (hns :  ∀ r x, g (r • x) ≤ |r| * (g x)) {p : ℝ} (hp : 0 < p) :
    μ {x : E | g x < 1} =
      ENNReal.ofReal ((∫ (x : E), Real.exp (- (g x) ^ p) ∂μ) / Real.Gamma (finrank ℝ E / p + 1))

This provides a way to compute the volume of the unit balls for the norms L_p for 1 ≤ p in any dimension over the reals volume_sum_rpow_lt_one and the complex Complex.Measure.volume_sum_rpow_lt_one.
variable (ι : Type*) [Fintype ι] [Nonempty ι] {p : ℝ} (hp : 1 ≤ p)

theorem volume_sum_rpow_lt_one :
    volume {x : ι → ℝ | ∑ i, |x i| ^ p < 1} =
      ENNReal.ofReal ((2 * Real.Gamma (1 / p + 1)) ^ card ι / Real.Gamma (card ι / p + 1))

theorem Complex.volume_sum_rpow_lt_one {p : ℝ} (hp : 1 ≤ p) :
    volume {x : ι → ℂ | ∑ i, ‖x i‖ ^ p < 1} =
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * card ι / p + 1))

[ ] depends on: #7693
[ ] depends on: #8033
[ ] depends on: #8034
[ ] depends on: #8036

@fpvandoorn, I believe you said you already had a formalization of this. Could you check this version works for you?

Yes, this result generalizes our result (which is waiting on #7341 for over a month now). We only computed it for the L^2 norm. One thing I would like to see added here is the volume of balls of radius R, but that is easy.

I added the computations for balls of radius r. It would be nice to add a statement directly in terms of balls in PiLp but they do not have a MeasureSpace instance.

Is it possible to also state the result for volume of balls in inner product spaces? Normally it should follow readily from what you've done in volume_sum_rpow_lt_one.

I added
theorem InnerProductSpace.volume_ball {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [Nontrivial E] (x : E) {r : ℝ}
    (hr : 0 ≤ r) :
    volume (Metric.ball x r) =
      .ofReal ((r * Real.sqrt π ) ^ finrank ℝ E / Real.Gamma (finrank ℝ E / 2 + 1))

I am not sure of the name though since it looks like the namespace InnerProductSpace is not that much used. I did not use volume_sum_rpow_lt_one but did it directly using #8427


test size of blockgates

When adding blockgates, ancilla qubits are sometimes required. We should check if such a gate is added to a step to a program, that the program contains enough qubits to deal with this.

Fixed by #108


refactor: code error message

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

[x] N
[ ] Y

refactor: code error message

Pull Request Test Coverage Report for Build<PHONE_NUMBER>2
Details

6 of 31 (19.35%)  changed or added relevant lines in 3 files are covered.
16 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.02%) to 70.715%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

kclvm/runner/src/runner.rs
0
1
0.0%

kclvm/error/src/lib.rs
6
15
40.0%

kclvm/src/lib.rs
0
15
0.0%

Files with Coverage Reduction
New Missed Lines
%

kclvm/tools/src/LSP/src/tests.rs
1
98.6%

kclvm/tools/src/LSP/src/inlay_hints.rs
3
92.31%

kclvm/tools/src/LSP/src/state.rs
12
82.57%

Totals

Change from base Build<PHONE_NUMBER>3:
-0.02%

Covered Lines:
51261

Relevant Lines:
72490

💛  - Coveralls


Create container contains illegal character

Package Name:  azure-cosmos
Package Version: 4.4.0
Operating System: Windows 10 enterprise
Python Version: python 3 in databricks

Describe the bug
I used the used the container_management.py in the samples area to created my containers.  I have run the code but the container name inadvertently had a tab character at the end of the name.
The container exists within the database, but I am unable to delete it manually or with the delete container script.  The script generates this error -CosmosHttpResponseError: Status code: 400
To Reproduce
Steps to reproduce the behavior:

Copy all the code from https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/cosmos/azure-cosmos/samples/container_management.py into new notebook and where the container_id is set add a tab to the end of the name.  The container should create as expected.
using the same notebook, using the delete_container function try to delete the container with the tab.

Expected behavior
I would have hoped that any illegal characters would have failed the create container function.
Screenshots
The below is the container in cosmos as you can see it looks like there are 2 container with the same name. At the bottom the container cant be read due to the qla_pupil_results_maths1_2023-2\t container havinig a tab char at the end.

Additional context
Is there any way to delete this container?

Hi @ValTay80, thank you for opening this issue and using our SDK. Unfortunately, it seems like you've found a gap for our SDK in which we do not check for tab characters on the client side when creating the container - which then causes an issue since the service cannot read resource id's with tab characters.
To delete the container, in this case you will have to use the rids that are unique to the database and container respectively, and use those in conjunction as opposed to their ids. Your code will look something like this:

I will be pushing a PR to address this gap and other gaps we may have with our resource validation. Truly sorry that you ran into this - do let me know if the solution does not work for some reason.

Closing since PR is out. Should be available in the next release we have. Thanks again for pointing this out @ValTay80.


Update FlightCore guide

Updates the guide to include new features for FlightCore, and change asterisks to underscores to better fit formatting

Doesn't this need the changed images from #144 ?


Include metadata diff in exceptions for unexpectedly changed asset metadata

For https://github.com/dandi/dandisets/issues/340#issuecomment-1936057412.

looks good, thank you!


Fix suggest project template

Remove obligatory for answer, forcing users to answer "No" to question "Is the Project a DPG?"

Thanks so much -- sorry for the delay on this.


Merge dev branch into master

Hello, I am a code review bot on flows.network.
It could take a few minutes for me to analyze this PR. Relax, grab a cup of coffee and check back later. Thanks!


Update jersey version

What changes are proposed in this pull request?
Try updating jersey to resolve some CVEs.
Why are the changes needed?
Some CVEs are caused by jersey. This PR updates jersey to a fixed version.
Does this PR introduce any user facing changes?
No

Failed test cases:

ConcurrentFileInStreamIntegrationTest: flaky
FileOutStreamIntegrationTest: flaky

Failed test cases.

alluxio.client.fs.io.FileOutStreamIntegrationTest.cancelWrite: flaky

Success at 2nd attempt:

alluxio.client.fs.concurrent.ConcurrentFileInStreamIntegrationTest.FileInStreamConcurrency

@apc999 @yuzhu @ggezer please take a look at this upgrade.

@ddadaal  please check the test failure, see if those fall into the excel.

alluxio-bot, merge this please

Old failures: #15, #7, #17, #18, #19, #20, #21, #22


Smart multi reply

Currently, two buttons Reply and Reply All.
But Those occupy spaces. So, I would like to put only Reply button.
When clicked reply, it becomes to selected state that the texts of another user.

Sounds convenient. I'm for it. Alternatively, could make "Reply" and "Reply All" text disappear, and leave the reply icons with narrow screen widths. But "Smart" reply is good.


Create a pod spec

We need to make this available through cocoapods.

Thanks @krzyzanowskim, let me know if you have any questions.


Random Number Generator API

Fixes #25.
Implemented the API and an example app which asks for some random numbers and prints them.
The app works fine on the microbit.
Added fake driver and tests.

Please rebase this.

@alexandruCarp any updates here?

I don't think it is possible to also check the buffer size for the async generation, so I guess I will leave that with the behavior of the driver (which is to only write buf.len() bytes if more are requested). The sync function now returns SIZE error in this case. Is there anything else I should do?

I suggest writing a RandomListener similar to:
struct RandomListener<'a> {
    buffer: &'a mut [u8]
}

impl RandomListener {
   pub fn new (buffer: &'a mut [u8]) {...}
}

The generate_random function will get this listener as an argument an share it with the driver.


Model initialization goes wrong when a field's type is a Union

Initial Checks

[X] I have searched GitHub for a duplicate issue and I'm sure this is something new
[X] I have searched Google & StackOverflow for a solution and couldn't find anything
[X] I have read and followed the docs and still think this is a bug
[X] I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like FastAPI or mypy)

Description
I'm developing a project that involves Abstract Syntax Trees, and I use pydantic models to represent ASTs (that's maybe not the best idea, but that's pretty irrelevant to the bug). Recently, I started using Unions to split ASTs into categories — such as the category of expressions, statements, etc. — but when I started to use these Unions in pydantic models, I noticed an absolutely unpredictable behavior. I tried to reproduce it with an extremely small example:
from __future__ import annotations
from typing import Union
from pydantic import BaseModel

Value = Union[int, str, None]

class AST:
    def compute(self) -> Value:
        raise NotImplementedError()

class ValueAST(AST, BaseModel):
    value: Value

    def compute(self) -> Value:
        return self.value

class PlusAST(AST, BaseModel):
    left: Expr
    right: Expr

    def compute(self) -> Value:
        return self.left.compute() + self.right.compute()

class MinusAST(AST, BaseModel):
    left: Expr
    right: Expr

    def compute(self) -> Value:
        return self.left.compute() - self.right.compute()

class PrintAST(AST, BaseModel):
    value: Expr

    def compute(self) -> Value:
        print(f"Printing the value: {self.value.compute()}")
        return None

Expr = Union[ValueAST, PlusAST, MinusAST]

if __name__ == "__main__":
    PlusAST.update_forward_refs(Expr=Expr)
    MinusAST.update_forward_refs(Expr=Expr)
    PrintAST.update_forward_refs(Expr=Expr)

    program = PrintAST(value=PlusAST(left=ValueAST(value=1), right=ValueAST(value=2)))

    print(program)

    program.compute()

The expected output is this:
value=PlusAST(left=ValueAST(value=1), right=ValueAST(value=2))
Printing the value: 3

However, we are getting this:
value=ValueAST(value=None)
Printing the value: None

Surprisingly, the PrintAST was initialized with a wrong value, i.e., with an instance of ValueAST instead of PlusAST. I tried to examine the behavior to understand what exactly goes wrong, and it seems that during initialization, assigned attributes are different from passed ones:
...

class PrintAST(AST, BaseModel):
    value: Expr

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        print(f"Kwargs: {kwargs}")
        print(f"Self: {self.__dict__}")

...

The output is:
Kwargs: {'value': PlusAST(left=ValueAST(value=1), right=ValueAST(value=2))}
Self: {'value': ValueAST(value=None)}
...

(I purposefully used __dict__ instead of .dict() to display class names.)
This happens only when a field's type is a union, such as Expr. If we change every occurrence of Expr with just AST, everything works as expected:
from __future__ import annotations
from typing import Union
from pydantic import BaseModel as PydanticBaseModel

Value = Union[int, str, None]

class BaseModel(PydanticBaseModel):
    class Config:
        arbitrary_types_allowed = True

class AST:
    def compute(self) -> Value:
        raise NotImplementedError()

class ValueAST(AST, BaseModel):
    value: Value

    def compute(self) -> Value:
        return self.value

class PlusAST(AST, BaseModel):
    left: AST
    right: AST

    def compute(self) -> Value:
        return self.left.compute() + self.right.compute()

class MinusAST(AST, BaseModel):
    left: AST
    right: AST

    def compute(self) -> Value:
        return self.left.compute() - self.right.compute()

class PrintAST(AST, BaseModel):
    value: AST

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        print(f"Kwargs: {kwargs}")
        print(f"Self: {self.__dict__}")

    def compute(self) -> Value:
        print(f"Printing the value: {self.value.compute()}")
        return None

if __name__ == "__main__":
    program = PrintAST(value=PlusAST(left=ValueAST(value=1), right=ValueAST(value=2)))

    print(program)

    program.compute()

The output is:
Kwargs: {'value': PlusAST(left=ValueAST(value=1), right=ValueAST(value=2))}
Self: {'value': PlusAST(left=ValueAST(value=1), right=ValueAST(value=2))}
value=PlusAST(left=ValueAST(value=1), right=ValueAST(value=2))
Printing the value: 3

It appears that it's only the issue of models, as rewriting the code to use dataclasses instead works as expected:
from __future__ import annotations
from typing import Union
from pydantic.dataclasses import dataclass

Value = Union[int, str, None]

class AST:
    def compute(self) -> Value:
        raise NotImplementedError()

@dataclass
class ValueAST(AST):
    value: Value

    def compute(self) -> Value:
        return self.value

@dataclass
class PlusAST(AST):
    left: Expr
    right: Expr

    def compute(self) -> Value:
        return self.left.compute() + self.right.compute()

@dataclass
class MinusAST(AST):
    left: Expr
    right: Expr

    def compute(self) -> Value:
        return self.left.compute() - self.right.compute()

@dataclass
class PrintAST(AST):
    value: Expr

    def compute(self) -> Value:
        print(f"Printing the value: {self.value.compute()}")
        return None

Expr = Union[ValueAST, PlusAST, MinusAST]

if __name__ == "__main__":
    PlusAST.__pydantic_model__.update_forward_refs(Expr=Expr)
    MinusAST.__pydantic_model__.update_forward_refs(Expr=Expr)
    PrintAST.__pydantic_model__.update_forward_refs(Expr=Expr)

    program = PrintAST(value=PlusAST(left=ValueAST(value=1), right=ValueAST(value=2)))

    print(program)

    program.compute()

with the output:
PrintAST(value=PlusAST(left=ValueAST(value=1), right=ValueAST(value=2)))
Printing the value: 3

As reported, I use Python 3.10, but I used the old union notation and other stuff to make the bug reproducible on older versions.
Example Code
No response
Python, Pydantic & OS Version
pydantic version: 1.10.2
            pydantic compiled: True
               python version: 3.10.7 (main, Oct  1 2022, 18:06:05) [GCC 7.5.0]
                     platform: Linux-4.15.0-193-generic-x86_64-with-glibc2.27
     optional deps. installed: ['typing-extensions']

Affected Components

[ ] Compatibility between releases
[X] Data validation/parsing
[ ] Data serialization - .dict() and .json()
[ ] JSON Schema
[ ] Dataclasses
[ ] Model Config
[X] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[ ] Generic Models
[ ] Other Model behaviour - construct(), pickling, private attributes, ORM mode
[ ] Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.

Your example is too complex for me to dig into, but the problems with union behaviour is well know and documented both in the docs and many existing issues.
Did you try Smart Unions?


bin/etc: make raft cf configurable

Make column family raft configurable.

@ngaut @siddontang @BusyJay @disksing PTAL

Any benchmark?

LGTM

LGTM


Suppress warnings during tests

This PR is aimed at suppressing warnings when running the unit test.  See Issues #586, #585, and others.

This warning suppression is going great!  Thanks @texadactyl for guiding us to these issues.
I'm having trouble running the "raise error on warning trick" that @barentsen showed me for the special case of RuntimeWarning.  What API tree hierarchy should I replace in the ???? placeholder?
py.test -v test_targetpixelfile.py -W error::????.RuntimeWarning

By the way, the coverage is almost guaranteed to drop because we are now avoiding warnings in the first place.  The strategy to raise coverage should be to catch the warnings with pytest, which I've done only sparingly in this work so far.

Hey @barentsen this PR is a step in the right direction and future-proofs some now-failing tests due to TESS data making Kepler-10 have more search results than before.  It's not 100% silencing all warnings, and it drops the coverage significantly.

Quick check of py.test with no remote data
master 117 passed, 47 skipped, 25 warnings in 17.38 seconds
this PR 118 passed, 47 skipped, 13 warnings in 17.78 seconds

Thanks @gully!  This is all look spiffy! :+1:

@gully @barentsen
My only concern is that by suppressing warnings (normally highly inadvisable) about log() or sqrt() failures, the test in question is not completing the intended exercize.  If you are confident that this is not the case, then okay.
As I have said before, I understand that you folks are primarily scientists and need to prioritize your time.

@texadactyl Agreed, we have to be very careful with silencing RuntimeWarning messages related to math operations.  (And if we silence them, we need to have sufficient inline comments explaining why it is appropriate if at all.)
Fortunately the ~12 warnings that were fixed by this PR are unrelated to e.g. log or sqrt failures.  Those RuntimeWarnings are amongst the ~13 warnings that still remained after this PR was merged.


Fix EMR EKS example DAG

The PR addresses following changes:

Fail the shell script if any of the commands fail
Currently, the shell script is silently ignoring failure of
commands. As a result, the Airflow task calling this shell script
is marked as 'success' which should not happen because the DAG
proceeds to execute subsequent tasks resulting in late failures.
With this change, we want to report error in any command upfront
so that the task is marked 'failed' and the DAG does not continue
executing downstream tasks.
Add separate Dockerfile for EMR-EKS example DAG image
The current Dockerfile for local development is missing a few libraries
required for the EMR-EKS example DAG. So, create a separate Dockerfiles
with the required libraries to help aid faster local development.

Cloudformation template is failing with below reason:
 AWS::EKS::Nodegroup/ManagedNodeGroup: CREATE_FAILED – "Resource handler returned message: \"[Issue(Code=AsgInstanceLaunchFailures, Message=You've reached your quota for maximum Fleet Requests for this account. Launching EC2 instance failed., ResourceIds=[eks-ng-a0731f88-2ec026b0-8620-cc3d-82e3-dee3ed01e00a]), Issue(Code=NodeCreationFailure, Message=Instances failed to join the kubernetes cluster, ResourceIds=[DUMMY_11448ab7-f2d5-42a7-a6cc-0d74ccb2e8e9, DUMMY_1bb6f31e-92c8-43d5-9ca3-8e815cbff947, DUMMY_2a5d16f9-291c-4d58-bf35-2eb5c0db88f5, DUMMY_4e4b490f-ef51-4d5b-87a5-3a5141ac6f9c, DUMMY_77a3e8d7-3af0-49e6-afa5-7c5ebc9a0eeb, DUMMY_7e88602e-c7f8-4d6a-943b-5f5078a4eb3f, DUMMY_a129f26a-1a81-4b5e-9c84-2285d8734a8f, DUMMY_abb67e19-d841-4bd0-ad05-5418f73149d1, DUMMY_ae850f0d-0693-4772-9d9b-4f4d442bab0e, DUMMY_ff345f8f-3468-4f2b-b8cf-ac1560c4150d])] (Service: null, Status Code: 0, Request ID: null, Extended Request ID: null)\" (RequestToken: 98ef1611-2341-fd34-ef08-4e8970c34e47, HandlerErrorCode: GeneralServiceException)"
I tried setting instance_type to m4.xlarge both is staging deployment environment as well as running a local command:
eksctl create cluster --name pankaj-test --with-oidc --ssh-access --ssh-public-key providers_team_keypair --instance-types=m4.xlarge. But, it keeps on creating an instance with m4.large type and then fails with the above error.
I checked IAM roles/policies in our account to see if they have some limitation on instance type. But, could not find anything like that.

still needs fix to make it run end to end successfully.

@phanikumv I believe the DAG is failing due to restrictions on our AWS account and we need no change on the code to fix the failure.

still needs fix to make it run end to end successfully.

@phanikumv I believe the DAG is failing due to restrictions on our AWS account and we need no change on the code to fix the failure.
Edit: We need some code change to pass variables to the shell script via BashOperator from the DAG

The permission issue should be resolved as we are now using our AWS account


Convert keydown_util to TypeScript.

Testing Plan: Manually tested the last commit by trying out all keys in the settings panel since it uses all the keys you can specify.

If we’re switching from keyCode to key (which we should), we might as well also replace our custom aliases "enter_key", "left_arrow", … with the standard names "Enter", "ArrowLeft", … everywhere. If we want to preserve the semantic letter aliases like vim_left, we can export const vim_left = "h" and use computed property syntax.

This is ready for review. I replaced our custom aliases with standard names and manually tested all of them:

static/js/activity.js is the user search input on the right.
static/js/components.js is the Settings and Organization tab on top-right in the settings panel.
static/js/settings_panel_menu.js is the menu item in the setting panel.
static/js/info_overlay.js is the help modal that opens up on the ? key.
``static/js/stream_list.js` is the stream search input on the left.

This looks great, merged, thanks @priyank-p!
I think it'd be well worth working through the other small modules that use e.keyCode or e.which and then trying to tackle hotkey.js once it's all ready.
$ git grep e.keyCode
static/js/composebox_typeahead.js:    const code = e.keyCode || e.which;
static/js/composebox_typeahead.js:    const code = e.keyCode || e.which;
static/js/dropdown_list_widget.js:            if (!/(38|40|27)/.test(e.keyCode)) {
static/js/dropdown_list_widget.js:                keyCode: e.keyCode,
static/js/dropdown_list_widget.js:                which: e.keyCode,
static/js/emoji_picker.js:    if (e.keyCode === 13) {
static/js/input_pill.js:            const char = e.keyCode || e.charCode;
static/js/input_pill.js:            const char = e.keyCode || e.charCode;
static/js/message_edit.js:    const code = e.keyCode || e.which;
static/js/message_edit.js:    const code = e.keyCode || e.which;
static/js/poll_widget.js:            if (e.keyCode === 13) {
static/js/poll_widget.js:            if (e.keyCode === 27) {
static/js/poll_widget.js:            if (e.keyCode === 13) {
static/js/poll_widget.js:            if (e.keyCode === 27) {
static/js/settings_org.js:        if (e.keyCode === 13) {
static/js/stream_create.js:        if ((e.keyCode || e.which) === 13) {


acme/Watch: dial unix /tmp/ns..:0/acme: not supported by plan 9

I was hoping to get acme commands to run on native Plan 9 edition 4.
Unfortunately, neither acme/Watch nor acme/acmego wasn't able to run. I assume that's because they rely on UDS that is provided by plan9port's version of acme, which is not the case on Plan 9 (?).
I'll be glad to implement the fix, but I'm not fluent enough with Plan 9/acme architectures yet. If you could give me a hint, I could give it a try. In either case, I can test somebodies PR.

Yesterday I was scrolling issues and PRs, and I've found https://github.com/9fans/go/pull/28, which was a good starting point in porting these must-have applicaitons to Plan 9.
I've rebased this PR to the latest main, and implemented acme/Watch and acme/acmego commands that work on Plan 9. I've even added cb(1) as a supported acme/acmego formatter.
Unfortunately, it seems that these changes are too big to be merged into trunk, so I will maintain them under my fork: https://github.com/anton2920/9fans-go.
Closing.


LOG4J2-3256: Reduce ignored package scope of KafkaAppender

@garydgregory So, you mean...

Make a list of kafka-clients packages in the resources directory.
When KafkaAppender is initialized, load 1.
Determine whether the given logging message should be ignored with 2.

Do I understand correctly?

@garydgregory So, you mean...

Make a list of kafka-clients packages in the resources directory.
When KafkaAppender is initialized, load 1.
Determine whether the given logging message should be ignored with 2.

Do I understand correctly?

@dongjinleekr
Exactly, my thought is to allow for a simpler way to manage this list.

@garydgregory Great, with more maintainability! :+1:

Hi @garydgregory,
After some trial and error, I concluded that maintaining the ignored package list in an array would be better than a file-based approach. Here is why:

The effort to use an array is similar to a resource file.
The code becomes much concise and straightforward.
The array-based approach is much faster than the file-based one in initialization.

I also updated the PR to follow this way. How do you think? Is there any specific reason for the file-based approach?

@dongjinleekr
I modified GitHub patch #640 and pushed patches to branches release-2.x and master.
You are credited in changes.xml.
Thank you for your help!


can't detect video

hello ,
the program can detect and download the rest season video's except this one i need to download it in 720p quality  please help
https://shahid.mbc.net/ar/episode/113347/مسرح-مصر-الموسم-1-الحلقة-1.html
thanks in advance

Post the full output of youtube-dl when run with --verbose option.

here's the log
[1/10/2016 3:12:08 AM] Unable to add https://shahid.mbc.net/ar/episode/113347/مسرح-مصر-الموسم-1-الحلقة-1.html. (Couldn't find any formats)

This does not look like valid youtube-dl log. Read bug reporting guide.

here's the log from command line
[debug] Encodings: locale cp1256, fs mbcs, out cp720, pref cp1256
[debug] youtube-dl version 2016.01.01
[debug] Python version 2.7.10 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-77556-g4160900, ffprobe N-77556-g4160900
[debug] Proxy map: {}
[Shahid] 113347: Downloading webpage
[Shahid] 113347: Downloading player JSON
[Shahid] 113347: Downloading m3u8 information
it stopped like that and nothing else happen looks like it's freezes since 5 minutes ago , i tried other episode link that works fine in the UI version and it works normally

i added an error message when the video is drm protected.

so no solution for downloading that video ?

it will be difficult to fix this problem(some of the extractor are broken because of DRM protection like nowtv).

aha ok, just let me know if you found a solution for that in the future.
thanks for all your help
best regards

Issue should be closed, appears to be resolved


Prow job update, license header checking added

/approve
/lgtm
@radoslawc I still don't understand why people in the org are still getting the "LGTM is restricted to collaborators", at least some of the time. Similarly, I noticed it sometimes does "needs-ok-to-test" even though people are org members. I wonder if it's a GH API limit issue?


Update Insertion sorting in_Java.java

Hey Pal,
Not a genuine contribution.
The code is already correct. Try something else.
Happy Coding !


Resolving base64 decoding bug

Base64 decoding requires that adjacent variables from the encoded string are combined to generate the final correct binary data stream. The current implementation will result in every 3rd byte decoded into junk, this fix resolves the issue.

Generally to accept your contribution we need you to sign ECA.
As this PR is just about 1 character, I pretty sure there is not possible IP issue, so I just integrated using my name. (commit 178c1a7cb180ab56fa26e3de796a2dfbbadb92ce)
@Jacob-Hinton, thx for you contribution :pray: !


docs: Add acr_values field description into the docs

Hi,
This PR adds the description for the new config field acrValues
the original issue is here -> https://github.com/dexidp/dex/issues/2417
Signed-off-by: Engin Diri<EMAIL_ADDRESS>

Hi @nate-double-u,
thanks for the suggestions. I updated the PR with your feedback.

Smol ping for this PR :)


Optimization flag ensures very large deviations of the scss file sizes

Description
Follow up to issue: https://github.com/angular/angular-cli/issues/19812
Sorry for the late creation of the example repo
I think I found a bug in Angular compiler: It is about the optimization flag in the angular.json file.

As soon as I set the flag to false, a sample scss file with 70 lines of code has a size of 20kb. Variables are also imported in this file. Only variables and mixins are imported and no other css code. The variable file is about 400 lines in size and estimated 10 of the 400 variables are used in the scss file in question.
If I replace the variables with the values in the file and remove the import, the file falls below my warning size of 8kb.

Angular version 11.1.11 is used.
If I set the optimization flag to true, the the size of the example scss file with variable imports is also smaller than the 8kb warning size.
Sizes of the example scss file:
optimization flag false: 20 kb
optimization flag true: < 2 kb
🔬 Minimal Reproduction
Here is the example repo: https://github.com/tobiasanton123/angular-optimization-flag
The stepts to reproduce are described in the README.md
The name of the example scss file is home.scss and is located in pages/home
🌍 Your Environment
Angular CLI: 11.1.1
Node: 12.18.0
OS: darwin x64

Angular: 11.1.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1101.1
@angular-devkit/build-angular   0.1101.1
@angular-devkit/core            11.1.1
@angular-devkit/schematics      11.1.1
@angular/cli                    11.1.1
@schematics/angular             11.1.1
@schematics/update              0.1101.1
rxjs                            6.6.3
typescript                      4.1.3

AFAICT in dev configuration, a long source map string is present, which increases the size. While in prod configuration, there are no source maps, hence the size is lower.

AFAICT in dev configuration, a long source map string is present, which increases the size. While in prod configuration, there are no source maps, hence the size is lower.

This seems plausible. If that is the reason, perhaps the anyComponentStyle limits for the dev build in the initially generated angular.json should be increased or even removed altogether to prevent misunderstandings in the future. For me this is the better solution than disabling the source maps.

This seems plausible. If that is the reason, perhaps the anyComponentStyle limits for the dev build in the initially generated angular.json should be increased or even removed altogether to prevent misunderstandings in the future. For me this is the better solution than disabling the source maps.

Hi @Spielboerg,
Bundle budgets shouldn't be used for unoptimized development builds, there isn't any benefit for of doing so. And as mentioned above by @devoto13, in this case the extra size is indeed caused by the sourceMap which is expected.
The Angular CLI doesn't generate the mentioned development configuration.
Hence, this is not really actionable from our-end.

Hi @Spielboerg,
Bundle budgets shouldn't be used for unoptimized development builds, there isn't any benefit for of doing so. And as mentioned above by @devoto13, in this case the extra size is indeed caused by the sourceMap which is expected.
The Angular CLI doesn't generate the mentioned development configuration.
Hence, this is not really actionable from our-end.

Hi @alan-agius4,
you are right, the initially generated angular.json has no dev configuration. We have a dev config in all our projects, which is why I assumed that this was added automatically. Sorry, my bad.
I think the limits were then added to all configurations during a ng update migration. This is fine in my eyes, because after the update you have to check the configuration for automatic changes and then increase or remove the limits for dev environments if needed.

Hi @alan-agius4,
you are right, the initially generated angular.json has no dev configuration. We have a dev config in all our projects, which is why I assumed that this was added automatically. Sorry, my bad.
I think the limits were then added to all configurations during a ng update migration. This is fine in my eyes, because after the update you have to check the configuration for automatic changes and then increase or remove the limits for dev environments if needed.